@wix/agent-skills 1.16.3 → 1.18.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 +115 -12
- package/skills/wix-app/references/APP_MARKET_REVIEW.md +1 -1
- package/skills/wix-app/references/BACKEND_API.md +18 -0
- package/skills/wix-app/references/CUSTOM_ELEMENT_WIDGET.md +6 -0
- package/skills/wix-app/references/DASHBOARD_MODAL.md +10 -2
- package/skills/wix-app/references/DASHBOARD_PAGE.md +32 -70
- package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +145 -127
- package/skills/wix-app/references/SITE_PLUGIN.md +14 -2
- package/skills/wix-app/references/WIX_PATTERNS_DOCS.md +74 -68
- package/skills/wix-app/references/backend-event/COMMON-EVENTS.md +2 -2
- package/skills/wix-app/references/dashboard-page/COLLECTION_TOOLKIT.md +79 -0
- package/skills/wix-app/references/dashboard-page/ENTITY_PAGE_TOOLKIT.md +73 -0
- package/skills/wix-app/references/dashboard-page/PATTERNS_BUNDLE_READING.md +52 -0
- package/skills/wix-app/references/dashboard-page/UX_SUCCESS_MODEL.md +184 -0
- package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +182 -99
- package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +94 -49
- package/skills/wix-app/references/editor-react-component/BRANDED-COMPONENTS.md +16 -6
- package/skills/wix-app/references/editor-react-component/BROWSER-SUPPORT.md +56 -0
- package/skills/wix-app/references/editor-react-component/COMPONENT-CONTRACT.md +275 -0
- package/skills/wix-app/references/editor-react-component/COMPONENT-PREVIEW.md +35 -40
- package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +167 -445
- package/skills/wix-app/references/editor-react-component/DESIGN-STATES.md +56 -29
- package/skills/wix-app/references/editor-react-component/DIRECTIONALITY.md +53 -158
- package/skills/wix-app/references/editor-react-component/EDITOR-EXTENSION-CONFIGURATION.md +78 -0
- package/skills/wix-app/references/editor-react-component/FUNCTION-HANDLERS.md +42 -134
- package/skills/wix-app/references/editor-react-component/MANIFEST-ERRORS.md +11 -3
- package/skills/wix-app/references/editor-react-component/PARTS.md +46 -24
- package/skills/wix-app/references/editor-react-component/PROPS-VS-CSS.md +63 -179
- package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +79 -163
- package/skills/wix-app/references/editor-react-component/SITE-CONTEXT-HOOKS.md +36 -21
- package/skills/wix-app/references/editor-react-component/SSR.md +30 -99
- package/skills/wix-base44-connector/SKILL.md +156 -50
- package/skills/wix-base44-connector/references/CAPABILITY_MAP.md +78 -0
- package/skills/wix-base44-connector/scripts/utils.js +239 -45
- package/skills/wix-headless/entry/bootstrap.mjs +9 -2
- package/skills/wix-headless/entry/skill.md +1 -1
- package/skills/wix-headless/references/CAPABILITIES.md +9 -1
- package/skills/wix-headless/references/DESIGN.md +1 -0
- package/skills/wix-headless/references/DISCOVERY.md +2 -1
- package/skills/wix-headless/references/IMAGE_GENERATION.md +1 -0
- package/skills/wix-headless/references/SDK_HANDOFF.md +5 -2
- package/skills/wix-headless/references/SEED.md +2 -1
- package/skills/wix-headless/references/SETUP.md +1 -0
- package/skills/wix-headless/references/inline-recipes/how-to-code-a-blog.md +2 -2
- package/skills/wix-headless/references/inline-recipes/how-to-code-a-store.md +68 -31
- package/skills/wix-headless/references/inline-recipes/how-to-code-forms.md +26 -10
- package/skills/wix-headless/references/inline-recipes/how-to-code-members-astro.md +8 -8
- package/skills/wix-headless/references/inline-recipes/how-to-code-members-custom-login.md +1 -1
- package/skills/wix-headless/references/inline-recipes/how-to-code-members-non-astro.md +1 -1
- package/skills/wix-headless/references/inline-recipes/how-to-code-pricing-plans.md +10 -8
- package/skills/wix-headless/references/inline-recipes/how-to-code-rentals.md +254 -0
- package/skills/wix-headless/references/inline-recipes/how-to-code-restaurant-orders.md +27 -24
- package/skills/wix-headless/references/inline-recipes/setup-online-store.md +13 -0
- package/skills/wix-headless/references/inline-recipes/setup-rentals.md +254 -0
- package/skills/wix-headless/references/managed/AUTHENTICATION.md +5 -0
- package/skills/wix-headless/references/non-astro.md +1 -1
- package/skills/wix-headless-fast/SKILL.md +166 -0
- package/skills/wix-headless-fast/entry/skill.md +99 -0
- package/skills/wix-headless-fast/install/deploy.mjs +433 -0
- package/skills/wix-headless-fast/install/fast-path.mjs +141 -0
- package/skills/wix-headless-fast/references/blog/INSTRUCTIONS.md +137 -0
- package/skills/wix-headless-fast/references/blog/app/components/blog/BlogFeedView.tsx +137 -0
- package/skills/wix-headless-fast/references/blog/app/components/blog/PostView.tsx +113 -0
- package/skills/wix-headless-fast/references/blog/app/components/blog/RichContent.tsx +42 -0
- package/skills/wix-headless-fast/references/blog/app/hooks/blog/useBlogFeed.ts +123 -0
- package/skills/wix-headless-fast/references/blog/app/hooks/blog/usePost.ts +70 -0
- package/skills/wix-headless-fast/references/blog/app/wix/blog/posts.ts +99 -0
- package/skills/wix-headless-fast/references/blog/app/wix/blog/taxonomy.ts +76 -0
- package/skills/wix-headless-fast/references/blog/app/wix/blog/types.ts +62 -0
- package/skills/wix-headless-fast/references/blog/app-astro/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-fast/references/blog/app-astro/pages/blog/[...slug].astro +99 -0
- package/skills/wix-headless-fast/references/blog/app-astro/pages/blog.astro +24 -0
- package/skills/wix-headless-fast/references/blog/lock/astro/package-lock.json +16156 -0
- package/skills/wix-headless-fast/references/blog/seed/SEED.md +72 -0
- package/skills/wix-headless-fast/references/blog/seed/seed-blog.mjs +287 -0
- package/skills/wix-headless-fast/references/bookings/INSTRUCTIONS.md +129 -0
- package/skills/wix-headless-fast/references/bookings/app/components/bookings/ServiceBookingView.tsx +143 -0
- package/skills/wix-headless-fast/references/bookings/app/components/bookings/ServicesView.tsx +119 -0
- package/skills/wix-headless-fast/references/bookings/app/hooks/bookings/useBookingFlow.ts +138 -0
- package/skills/wix-headless-fast/references/bookings/app/hooks/bookings/useServices.ts +54 -0
- package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking.ts +206 -0
- package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services.ts +96 -0
- package/skills/wix-headless-fast/references/bookings/app/wix/bookings/types.ts +70 -0
- package/skills/wix-headless-fast/references/bookings/app-astro/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-fast/references/bookings/app-astro/pages/services/[slug].astro +76 -0
- package/skills/wix-headless-fast/references/bookings/app-astro/pages/services.astro +22 -0
- package/skills/wix-headless-fast/references/bookings/lock/astro/package-lock.json +11962 -0
- package/skills/wix-headless-fast/references/bookings/seed/SEED.md +61 -0
- package/skills/wix-headless-fast/references/bookings/seed/seed-bookings.mjs +302 -0
- package/skills/wix-headless-fast/references/cms/INSTRUCTIONS.md +179 -0
- package/skills/wix-headless-fast/references/cms/app/hooks/cms/useCollection.ts +83 -0
- package/skills/wix-headless-fast/references/cms/app/hooks/cms/useItem.ts +57 -0
- package/skills/wix-headless-fast/references/cms/app/wix/cms/items.ts +151 -0
- package/skills/wix-headless-fast/references/cms/app/wix/cms/types.ts +75 -0
- package/skills/wix-headless-fast/references/cms/app-astro/layouts/SiteLayout.astro +41 -0
- package/skills/wix-headless-fast/references/cms/lock/astro/package-lock.json +11262 -0
- package/skills/wix-headless-fast/references/cms/seed/SEED.md +103 -0
- package/skills/wix-headless-fast/references/cms/seed/seed-cms.mjs +324 -0
- package/skills/wix-headless-fast/references/events/INSTRUCTIONS.md +149 -0
- package/skills/wix-headless-fast/references/events/app/components/events/EventConfirmationView.tsx +66 -0
- package/skills/wix-headless-fast/references/events/app/components/events/EventRegistrationView.tsx +176 -0
- package/skills/wix-headless-fast/references/events/app/components/events/EventsView.tsx +118 -0
- package/skills/wix-headless-fast/references/events/app/hooks/events/useEventRegistration.ts +117 -0
- package/skills/wix-headless-fast/references/events/app/hooks/events/useEvents.ts +59 -0
- package/skills/wix-headless-fast/references/events/app/wix/events/events.ts +136 -0
- package/skills/wix-headless-fast/references/events/app/wix/events/registration.ts +128 -0
- package/skills/wix-headless-fast/references/events/app/wix/events/types.ts +61 -0
- package/skills/wix-headless-fast/references/events/app-astro/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-fast/references/events/app-astro/pages/event-confirmation.astro +12 -0
- package/skills/wix-headless-fast/references/events/app-astro/pages/events/[slug].astro +80 -0
- package/skills/wix-headless-fast/references/events/app-astro/pages/events.astro +21 -0
- package/skills/wix-headless-fast/references/events/lock/astro/package-lock.json +11884 -0
- package/skills/wix-headless-fast/references/events/seed/SEED.md +86 -0
- package/skills/wix-headless-fast/references/events/seed/seed-events.mjs +276 -0
- package/skills/wix-headless-fast/references/forms/INSTRUCTIONS.md +150 -0
- package/skills/wix-headless-fast/references/forms/app/hooks/forms/useWixForm.ts +317 -0
- package/skills/wix-headless-fast/references/forms/app/wix/forms/forms.ts +269 -0
- package/skills/wix-headless-fast/references/forms/app/wix/forms/submissions.ts +231 -0
- package/skills/wix-headless-fast/references/forms/app/wix/forms/types.ts +135 -0
- package/skills/wix-headless-fast/references/forms/lock/astro/package-lock.json +10593 -0
- package/skills/wix-headless-fast/references/forms/seed/SEED.md +108 -0
- package/skills/wix-headless-fast/references/forms/seed/seed-forms.mjs +320 -0
- package/skills/wix-headless-fast/references/members/INSTRUCTIONS.md +63 -0
- package/skills/wix-headless-fast/references/members/app/components/members/AccountView.tsx +60 -0
- package/skills/wix-headless-fast/references/members/app/components/members/LoginForm.tsx +155 -0
- package/skills/wix-headless-fast/references/members/app/components/members/MemberMenu.tsx +78 -0
- package/skills/wix-headless-fast/references/members/app/components/members/RequireAuth.tsx +47 -0
- package/skills/wix-headless-fast/references/members/app/hooks/members/useMember.ts +66 -0
- package/skills/wix-headless-fast/references/members/app/wix/members/auth.ts +88 -0
- package/skills/wix-headless-fast/references/members/app/wix/members/client.ts +53 -0
- package/skills/wix-headless-fast/references/members/app/wix/members/member-store.ts +122 -0
- package/skills/wix-headless-fast/references/members/app/wix/members/members.ts +50 -0
- package/skills/wix-headless-fast/references/members/app/wix/members/types.ts +21 -0
- package/skills/wix-headless-fast/references/members/app-astro/layouts/SiteLayout.astro +42 -0
- package/skills/wix-headless-fast/references/members/app-astro/pages/account.astro +10 -0
- package/skills/wix-headless-fast/references/members/app-astro/pages/login.astro +11 -0
- package/skills/wix-headless-fast/references/members/lock/astro/package-lock.json +10329 -0
- package/skills/wix-headless-fast/references/members/seed/SEED.md +39 -0
- package/skills/wix-headless-fast/references/members/seed/seed-members.mjs +94 -0
- package/skills/wix-headless-fast/references/portfolio/INSTRUCTIONS.md +134 -0
- package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/CollectionProjectsView.tsx +110 -0
- package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/CollectionsView.tsx +90 -0
- package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/ProjectDetailView.tsx +115 -0
- package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useCollectionProjects.ts +59 -0
- package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useCollections.ts +39 -0
- package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useProjectDetail.ts +58 -0
- package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/portfolio.ts +165 -0
- package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/types.ts +55 -0
- package/skills/wix-headless-fast/references/portfolio/app-astro/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-fast/references/portfolio/app-astro/pages/portfolio/[slug].astro +30 -0
- package/skills/wix-headless-fast/references/portfolio/app-astro/pages/portfolio.astro +21 -0
- package/skills/wix-headless-fast/references/portfolio/app-astro/pages/projects/[slug].astro +29 -0
- package/skills/wix-headless-fast/references/portfolio/lock/astro/package-lock.json +10197 -0
- package/skills/wix-headless-fast/references/portfolio/seed/SEED.md +78 -0
- package/skills/wix-headless-fast/references/portfolio/seed/seed-portfolio.mjs +258 -0
- package/skills/wix-headless-fast/references/pricing-plans/INSTRUCTIONS.md +133 -0
- package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/PlanDetailView.tsx +58 -0
- package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/PlansView.tsx +126 -0
- package/skills/wix-headless-fast/references/pricing-plans/app/hooks/pricing-plans/usePlanPurchase.ts +37 -0
- package/skills/wix-headless-fast/references/pricing-plans/app/hooks/pricing-plans/usePlans.ts +39 -0
- package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans.ts +75 -0
- package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/purchase.ts +45 -0
- package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/types.ts +30 -0
- package/skills/wix-headless-fast/references/pricing-plans/app-astro/layouts/SiteLayout.astro +41 -0
- package/skills/wix-headless-fast/references/pricing-plans/app-astro/pages/plans/[slug].astro +40 -0
- package/skills/wix-headless-fast/references/pricing-plans/app-astro/pages/plans.astro +21 -0
- package/skills/wix-headless-fast/references/pricing-plans/lock/astro/package-lock.json +11226 -0
- package/skills/wix-headless-fast/references/pricing-plans/seed/SEED.md +71 -0
- package/skills/wix-headless-fast/references/pricing-plans/seed/seed-pricing-plans.mjs +279 -0
- package/skills/wix-headless-fast/references/restaurants/INSTRUCTIONS.md +165 -0
- package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/MenuView.tsx +142 -0
- package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/OrderCartButton.tsx +26 -0
- package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/OrderCartDrawer.tsx +121 -0
- package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/ReservationView.tsx +155 -0
- package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useMenus.ts +55 -0
- package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useOrderCart.ts +43 -0
- package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useReservation.ts +177 -0
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu.ts +165 -0
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/order-store.ts +103 -0
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/ordering.ts +254 -0
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservations.ts +146 -0
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/types.ts +168 -0
- package/skills/wix-headless-fast/references/restaurants/app-astro/layouts/SiteLayout.astro +47 -0
- package/skills/wix-headless-fast/references/restaurants/app-astro/pages/menu.astro +22 -0
- package/skills/wix-headless-fast/references/restaurants/app-astro/pages/reservations.astro +12 -0
- package/skills/wix-headless-fast/references/restaurants/lock/astro/package-lock.json +12560 -0
- package/skills/wix-headless-fast/references/restaurants/seed/SEED.md +81 -0
- package/skills/wix-headless-fast/references/restaurants/seed/seed-restaurants.mjs +479 -0
- package/skills/wix-headless-fast/references/shared/CONTENT.md +22 -0
- package/skills/wix-headless-fast/references/shared/CUSTOM_OPERATIONS.md +73 -0
- package/skills/wix-headless-fast/references/shared/DESIGN.md +26 -0
- package/skills/wix-headless-fast/references/shared/app/styles/global.css +52 -0
- package/skills/wix-headless-fast/references/shared/app/wix/config.ts +15 -0
- package/skills/wix-headless-fast/references/shared/app/wix/media.ts +27 -0
- package/skills/wix-headless-fast/references/shared/app/wix/money.ts +24 -0
- package/skills/wix-headless-fast/references/shared/app/wix/sdk.ts +76 -0
- package/skills/wix-headless-fast/references/shared/capabilities/media-upload/app/wix/media-upload/client.ts +46 -0
- package/skills/wix-headless-fast/references/shared/capabilities/media-upload/app-astro/pages/api/wix/media-upload.ts +46 -0
- package/skills/wix-headless-fast/references/shared/seed/images.mjs +145 -0
- package/skills/wix-headless-fast/references/storefront/INSTRUCTIONS.md +149 -0
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/CartButton.tsx +26 -0
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/CartDrawer.tsx +121 -0
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/ProductCard.tsx +100 -0
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/ProductDetailView.tsx +130 -0
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/ProductGrid.tsx +48 -0
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/ShopView.tsx +66 -0
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/VariantPicker.tsx +103 -0
- package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useCart.ts +48 -0
- package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useProductDetail.ts +140 -0
- package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useShop.ts +80 -0
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart-store.ts +101 -0
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart.ts +221 -0
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/catalog.ts +215 -0
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/types.ts +109 -0
- package/skills/wix-headless-fast/references/storefront/app-astro/layouts/SiteLayout.astro +46 -0
- package/skills/wix-headless-fast/references/storefront/app-astro/pages/products/[slug].astro +56 -0
- package/skills/wix-headless-fast/references/storefront/app-astro/pages/shop.astro +23 -0
- package/skills/wix-headless-fast/references/storefront/lock/astro/package-lock.json +12247 -0
- package/skills/wix-headless-fast/references/storefront/seed/SEED.md +85 -0
- package/skills/wix-headless-fast/references/storefront/seed/seed-store.mjs +415 -0
- package/skills/wix-manage/SKILL.md +28 -2
- package/skills/wix-manage/references/bookings/booking-system-integration-gaps.md +20 -13
- package/skills/wix-manage/references/bookings/end-to-end-booking-flow.md +24 -11
- package/skills/wix-manage/references/cms/cms-ecommerce-catalog-integration.md +5 -5
- package/skills/wix-manage/references/google-ads/manage-campaign-success-guide.md +141 -0
- package/skills/wix-manage/references/google-business-profile/connect-google-business-profile.md +134 -0
- package/skills/wix-manage/references/google-business-profile/manage-google-business-profile-locations.md +182 -0
- package/skills/wix-manage/references/marketing/create-and-publish-social-post.md +3 -0
- package/skills/wix-manage/references/seo/manage-seo-tags.md +315 -0
- package/skills/wix-manage/references/seo/manage-url-redirects.md +250 -0
- package/skills/wix-manage/references/sites/query-sites.md +72 -161
- package/skills/wix-manage/references/stores/create-product-catalog-v3.md +21 -6
- package/skills/wix-manage/references/stores/update-product-with-options.md +83 -0
- package/skills/wix-replatform/resources/rp-mapper/wix-business-solutions-taxonomy.md +5 -6
- package/skills/wix-vibe-headless/SKILL.md +18 -4
- package/skills/wix-vibe-headless/install/deploy.cjs +12 -4
- package/skills/wix-vibe-headless/install/pin-agents-md.cjs +2 -1
- package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed.md +16 -10
- package/skills/wix-vibe-headless/platforms/base44-ecom-light.md +13 -8
- package/skills/wix-vibe-headless/platforms/base44.md +27 -62
- package/skills/wix-vibe-headless/platforms/generic.md +6 -3
- package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +45 -0
- package/skills/wix-vibe-headless/references/bookings/app/components/RentalDurationPicker.jsx +67 -0
- package/skills/wix-vibe-headless/references/bookings/app/hooks/useRentalDuration.js +128 -0
- package/skills/wix-vibe-headless/references/bookings/app/hooks/useServiceDetail.js +5 -3
- package/skills/wix-vibe-headless/references/bookings/app/rest/wix-bookings-checkout.js +9 -8
- package/skills/wix-vibe-headless/references/bookings/app/rest/wix-bookings-rentals.js +250 -0
- package/skills/wix-vibe-headless/references/bookings/app/rest/wix-bookings-services.js +12 -5
- package/skills/wix-vibe-headless/references/bookings/seed/SEED.md +41 -0
- package/skills/wix-vibe-headless/references/bookings/seed/seed-rentals.js +267 -0
- package/skills/wix-vibe-headless/references/cms/INSTRUCTIONS.md +6 -3
- package/skills/wix-vibe-headless/references/forms/INSTRUCTIONS.md +470 -0
- package/skills/wix-vibe-headless/references/forms/app/hooks/useWixForm.js +425 -0
- package/skills/wix-vibe-headless/references/forms/app/lib/wix-form-schema-utils.js +187 -0
- package/skills/wix-vibe-headless/references/forms/app/rest/wix-forms-submissions.js +238 -0
- package/skills/wix-vibe-headless/references/forms/app/rest/wix-forms.js +108 -0
- package/skills/wix-vibe-headless/references/forms/seed/SEED.md +1762 -0
- package/skills/wix-vibe-headless/references/rentals/INSTRUCTIONS.md +13 -0
- package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +4 -1
- package/skills/wix-vibe-headless/references/restaurants/app/components/OrderCartDrawer.jsx +23 -11
- package/skills/wix-vibe-headless/references/restaurants/app/context/OrderCartContext.jsx +1 -1
- package/skills/wix-vibe-headless/references/restaurants/app/rest/wix-restaurants-ordering.js +29 -31
- package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +152 -92
- package/skills/wix-vibe-headless/references/storefront/app/components/CartDrawer.jsx +37 -38
- package/skills/wix-vibe-headless/references/storefront/app/context/CartContext.jsx +2 -2
- package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductDetail.js +15 -8
- package/skills/wix-vibe-headless/references/storefront/app/lib/storeImage.js +37 -0
- package/skills/wix-vibe-headless/references/storefront/app/rest/wix-store-cart.js +35 -35
- package/skills/wix-vibe-headless/references/storefront/app/rest/wix-store-catalog.js +18 -6
- package/skills/wix-vibe-headless/references/storefront/seed/SEED.md +30 -7
- package/skills/wix-vibe-headless/references/storefront/seed/seed-store.js +46 -10
- package/skills/wix-app/references/editor-react-component/A11Y-REVIEW-REFERENCE.md +0 -172
- package/skills/wix-app/references/editor-react-component/A11Y-REVIEW.md +0 -143
- package/skills/wix-app/references/editor-react-component/COMPONENT-API.md +0 -516
- package/skills/wix-app/references/editor-react-component/COMPONENT-CONFIGURATION.md +0 -225
- package/skills/wix-app/references/editor-react-component/EDIT-FLOW.md +0 -6
- package/skills/wix-app/references/editor-react-component/REACT-PATTERNS.md +0 -95
- package/skills/wix-vibe-headless/references/storefront/app/components/ProductCard.jsx +0 -110
- package/skills/wix-vibe-headless/references/storefront/app/components/ProductGallery.jsx +0 -51
- package/skills/wix-vibe-headless/references/storefront/app/components/ProductGrid.jsx +0 -49
- package/skills/wix-vibe-headless/references/storefront/app/components/VariantPicker.jsx +0 -92
- package/skills/wix-vibe-headless/references/storefront/app/pages/ProductDetail.jsx +0 -139
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// One item — by `_id` or by a field match (slug routing). SSR-friendly: pass the
|
|
2
|
+
// server-fetched item as `initialItem` and no client fetch happens; a SPA passes nothing.
|
|
3
|
+
import { useEffect, useState } from "react";
|
|
4
|
+
import { getItemBy, getItemById } from "../../wix/cms/items";
|
|
5
|
+
import type { CmsItem } from "../../wix/cms/types";
|
|
6
|
+
|
|
7
|
+
/** Exactly one of `id` / `by`. */
|
|
8
|
+
export interface UseItemRef {
|
|
9
|
+
id?: string;
|
|
10
|
+
by?: { field: string; value: string | number };
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface UseItemOptions {
|
|
14
|
+
initialItem?: CmsItem;
|
|
15
|
+
/** Reference field keys to inline as full items. */
|
|
16
|
+
include?: string[];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface UseItem {
|
|
20
|
+
/** null while loading OR when not found — branch on notFound for the miss state. */
|
|
21
|
+
item: CmsItem | null;
|
|
22
|
+
notFound: boolean;
|
|
23
|
+
error: string | null;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function useItem(collectionId: string, ref: UseItemRef, options: UseItemOptions = {}): UseItem {
|
|
27
|
+
const { initialItem, include } = options;
|
|
28
|
+
const [item, setItem] = useState<CmsItem | null>(initialItem ?? null);
|
|
29
|
+
const [notFound, setNotFound] = useState(false);
|
|
30
|
+
const [error, setError] = useState<string | null>(null);
|
|
31
|
+
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
if (initialItem) return;
|
|
34
|
+
let alive = true;
|
|
35
|
+
const fetching = ref.id
|
|
36
|
+
? getItemById(collectionId, ref.id, { include })
|
|
37
|
+
: ref.by
|
|
38
|
+
? getItemBy(collectionId, ref.by.field, ref.by.value, { include })
|
|
39
|
+
: Promise.reject(new Error("useItem: pass ref.id or ref.by"));
|
|
40
|
+
fetching
|
|
41
|
+
.then((found) => {
|
|
42
|
+
if (!alive) return;
|
|
43
|
+
setItem(found);
|
|
44
|
+
setNotFound(found === null);
|
|
45
|
+
})
|
|
46
|
+
.catch((e) => {
|
|
47
|
+
if (!alive) return;
|
|
48
|
+
setError(e instanceof Error ? e.message : String(e));
|
|
49
|
+
});
|
|
50
|
+
return () => {
|
|
51
|
+
alive = false;
|
|
52
|
+
};
|
|
53
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
54
|
+
}, [collectionId, ref.id, ref.by?.field, ref.by?.value]);
|
|
55
|
+
|
|
56
|
+
return { item, notFound, error };
|
|
57
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
// Wix Data reads/writes (@wix/data `items`) — the only file that touches raw data items.
|
|
2
|
+
// CMS is schema-generic: every function takes the collection id from the seed plan
|
|
3
|
+
// (seed/SEED.md) and returns plain CmsItem DTOs from ./types. Copy as-is; extend by adding
|
|
4
|
+
// functions, not by editing these.
|
|
5
|
+
// docs: https://dev.wix.com/docs/sdk/business-solutions/data/items/query.md
|
|
6
|
+
// docs: https://dev.wix.com/docs/sdk/business-solutions/data/items/update.md
|
|
7
|
+
import { items as itemsModule } from "@wix/data";
|
|
8
|
+
import { wixModule } from "../sdk";
|
|
9
|
+
import { imgSrc } from "../media";
|
|
10
|
+
import type { CmsFilter, CmsItem, CmsPage, CmsQuery } from "./types";
|
|
11
|
+
|
|
12
|
+
const items = wixModule(itemsModule);
|
|
13
|
+
|
|
14
|
+
type Raw = Record<string, any>;
|
|
15
|
+
|
|
16
|
+
// SDK → DTO: the SDK decodes date fields into Date objects (not serializable as island
|
|
17
|
+
// props) and IMAGE fields arrive as wix:image:// identifiers a browser can't load
|
|
18
|
+
// (ERR_UNKNOWN_URL_SCHEME). Normalize recursively — included reference items too.
|
|
19
|
+
function toValue(v: unknown): unknown {
|
|
20
|
+
if (v instanceof Date) return v.toISOString();
|
|
21
|
+
if (typeof v === "string" && v.startsWith("wix:image://")) return imgSrc(v, 1200, 900);
|
|
22
|
+
if (Array.isArray(v)) return v.map(toValue);
|
|
23
|
+
if (v && typeof v === "object") {
|
|
24
|
+
const out: Raw = {};
|
|
25
|
+
for (const [k, val] of Object.entries(v as Raw)) out[k] = toValue(val);
|
|
26
|
+
return out;
|
|
27
|
+
}
|
|
28
|
+
return v;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const toItem = (raw: Raw): CmsItem => toValue(raw) as CmsItem;
|
|
32
|
+
|
|
33
|
+
// An undefined comparand silently changes what a query matches (every row, or none) with no
|
|
34
|
+
// server error — the classic "my items shows everyone's items" bug. Throw at the call site;
|
|
35
|
+
// omit the filter entirely when you don't hold a value yet.
|
|
36
|
+
function assertFilterValue(f: CmsFilter): void {
|
|
37
|
+
if (f.op !== "isEmpty" && f.op !== "isNotEmpty" && f.value === undefined) {
|
|
38
|
+
throw new Error(
|
|
39
|
+
`cms: filter on "${f.field}" (${f.op}) has an undefined value — pass a real value or omit the filter.`,
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Query one page of a collection. An empty result on a PUBLIC collection is a seed
|
|
46
|
+
* permissions bug (read must be "ANYONE"), not a query bug — never reach for auth.elevate.
|
|
47
|
+
*/
|
|
48
|
+
export async function queryItems(collectionId: string, query: CmsQuery = {}): Promise<CmsPage> {
|
|
49
|
+
const { filters = [], sort = [], limit = 20, skip = 0, include = [], withTotal = false } = query;
|
|
50
|
+
let q = items.query(collectionId);
|
|
51
|
+
for (const f of filters) {
|
|
52
|
+
assertFilterValue(f);
|
|
53
|
+
const v = f.value as any;
|
|
54
|
+
switch (f.op) {
|
|
55
|
+
case "eq": q = q.eq(f.field, v); break;
|
|
56
|
+
case "ne": q = q.ne(f.field, v); break;
|
|
57
|
+
case "gt": q = q.gt(f.field, v); break;
|
|
58
|
+
case "ge": q = q.ge(f.field, v); break;
|
|
59
|
+
case "lt": q = q.lt(f.field, v); break;
|
|
60
|
+
case "le": q = q.le(f.field, v); break;
|
|
61
|
+
case "contains": q = q.contains(f.field, v); break;
|
|
62
|
+
case "startsWith": q = q.startsWith(f.field, v); break;
|
|
63
|
+
case "hasSome": q = q.hasSome(f.field, v); break;
|
|
64
|
+
case "hasAll": q = q.hasAll(f.field, v); break;
|
|
65
|
+
case "isEmpty": q = q.isEmpty(f.field); break;
|
|
66
|
+
case "isNotEmpty": q = q.isNotEmpty(f.field); break;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
for (const s of sort) q = s.direction === "desc" ? q.descending(s.field) : q.ascending(s.field);
|
|
70
|
+
if (include.length) q = q.include(...include);
|
|
71
|
+
const res = await q.limit(limit).skip(skip).find(withTotal ? { returnTotalCount: true } : undefined);
|
|
72
|
+
return {
|
|
73
|
+
items: (res.items ?? []).map((r: Raw) => toItem(r)),
|
|
74
|
+
hasNext: res.hasNext(),
|
|
75
|
+
total: res.totalCount ?? null,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** Fetch one item by `_id`. Null when not found. */
|
|
80
|
+
export async function getItemById(
|
|
81
|
+
collectionId: string,
|
|
82
|
+
itemId: string,
|
|
83
|
+
{ include = [] }: { include?: string[] } = {},
|
|
84
|
+
): Promise<CmsItem | null> {
|
|
85
|
+
const raw = await items.get(collectionId, itemId, {
|
|
86
|
+
...(include.length ? { includeReferences: include.map((field) => ({ field })) } : {}),
|
|
87
|
+
});
|
|
88
|
+
return raw ? toItem(raw as Raw) : null;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Fetch the first item whose `field` equals `value` — slug-style routing (Wix Data has no
|
|
93
|
+
* native get-by-slug). Null when not found → render a not-found state, never invent an item.
|
|
94
|
+
*/
|
|
95
|
+
export async function getItemBy(
|
|
96
|
+
collectionId: string,
|
|
97
|
+
field: string,
|
|
98
|
+
value: string | number,
|
|
99
|
+
{ include = [] }: { include?: string[] } = {},
|
|
100
|
+
): Promise<CmsItem | null> {
|
|
101
|
+
const page = await queryItems(collectionId, { filters: [{ field, op: "eq", value }], limit: 1, include });
|
|
102
|
+
return page.items[0] ?? null;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/** Count items matching the filters — empty-state logic and result counts. */
|
|
106
|
+
export async function countItems(collectionId: string, filters: CmsFilter[] = []): Promise<number> {
|
|
107
|
+
const page = await queryItems(collectionId, { filters, limit: 1, withTotal: true });
|
|
108
|
+
return page.total ?? page.items.length;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Insert an item (visitor form / member submission). Succeeds only when the collection's
|
|
113
|
+
* insert permission covers the caller (403 otherwise — a seed permissions step, not a code
|
|
114
|
+
* bug). Never set `_owner` — Wix stamps it from the caller's identity.
|
|
115
|
+
* Date fields must be Date objects (an ISO string is stored as text and breaks date queries).
|
|
116
|
+
*/
|
|
117
|
+
export async function insertItem(collectionId: string, data: Record<string, unknown>): Promise<CmsItem> {
|
|
118
|
+
const created = await items.insert(collectionId, data as Raw);
|
|
119
|
+
return toItem(created as Raw);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* REPLACE an item — fields omitted from `item` are WIPED (update does not patch). Spread the
|
|
124
|
+
* full item you hold and override; for an id + a few changed fields use patchItemFields.
|
|
125
|
+
* A round-tripped DTO carries dates as ISO strings — wrap each date field back
|
|
126
|
+
* (`new Date(iso)`) before updating, or the DATE field is silently rewritten as text.
|
|
127
|
+
*/
|
|
128
|
+
export async function updateItem(collectionId: string, item: CmsItem): Promise<CmsItem> {
|
|
129
|
+
const updated = await items.update(collectionId, item as Raw & { _id: string });
|
|
130
|
+
return toItem(updated as Raw);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/** Patch only the named fields — the safe partial change (no replace-wipes-fields footgun). */
|
|
134
|
+
export async function patchItemFields(
|
|
135
|
+
collectionId: string,
|
|
136
|
+
itemId: string,
|
|
137
|
+
fields: Record<string, unknown>,
|
|
138
|
+
): Promise<CmsItem> {
|
|
139
|
+
const entries = Object.entries(fields);
|
|
140
|
+
if (!entries.length) throw new Error("cms: patchItemFields called with no fields.");
|
|
141
|
+
let p = items.patch(collectionId, itemId);
|
|
142
|
+
for (const [k, v] of entries) p = p.setField(k, v);
|
|
143
|
+
const patched = await p.run();
|
|
144
|
+
return toItem(patched as Raw);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/** Remove an item by `_id`. Irreversible. Returns the removed item (null if it didn't exist). */
|
|
148
|
+
export async function removeItem(collectionId: string, itemId: string): Promise<CmsItem | null> {
|
|
149
|
+
const removed = await items.remove(collectionId, itemId);
|
|
150
|
+
return removed ? toItem(removed as Raw) : null;
|
|
151
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// CMS DTOs — the serializable shapes every hook, component, and page consumes. CMS is
|
|
2
|
+
// schema-generic: field keys come from the seed plan (seed/SEED.md), so an item is a flat
|
|
3
|
+
// field map rather than a fixed interface. Plain JSON: safe as Astro island props or across
|
|
4
|
+
// server/client boundaries. By the time an item leaves the data layer, Date fields are ISO
|
|
5
|
+
// strings and IMAGE fields are resolved https URLs.
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* One collection item: `_id` plus the collection's fields, flat on the item (there is no
|
|
9
|
+
* `item.data.*` — that is the REST shape and reads undefined here).
|
|
10
|
+
* Field values by type: TEXT/URL/EMAIL → string, NUMBER → number, BOOLEAN → boolean,
|
|
11
|
+
* DATE/DATETIME → ISO string, IMAGE → https URL ("" never happens — absent fields are
|
|
12
|
+
* undefined), RICH_TEXT → the stored HTML string, REFERENCE/MULTI_REFERENCE → id(s), or
|
|
13
|
+
* full CmsItem(s) when the query included the field.
|
|
14
|
+
*/
|
|
15
|
+
export interface CmsItem {
|
|
16
|
+
_id: string;
|
|
17
|
+
/** ISO string (the SDK's Date objects are serialized by the data layer). */
|
|
18
|
+
_createdDate?: string;
|
|
19
|
+
_updatedDate?: string;
|
|
20
|
+
/** Id of the member who created the row (member-scoped collections). */
|
|
21
|
+
_owner?: string;
|
|
22
|
+
[key: string]: unknown;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type CmsFilterOp =
|
|
26
|
+
| "eq"
|
|
27
|
+
| "ne"
|
|
28
|
+
| "gt"
|
|
29
|
+
| "ge"
|
|
30
|
+
| "lt"
|
|
31
|
+
| "le"
|
|
32
|
+
| "contains"
|
|
33
|
+
| "startsWith"
|
|
34
|
+
| "hasSome"
|
|
35
|
+
| "hasAll"
|
|
36
|
+
| "isEmpty"
|
|
37
|
+
| "isNotEmpty";
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* One query predicate. Comparands must match the field's stored type — a DATE/DATETIME
|
|
41
|
+
* field only matches a Date object (an ISO string compares as text and matches nothing).
|
|
42
|
+
*/
|
|
43
|
+
export interface CmsFilter {
|
|
44
|
+
field: string;
|
|
45
|
+
op: CmsFilterOp;
|
|
46
|
+
/** Required except for isEmpty/isNotEmpty; hasSome/hasAll take an array. */
|
|
47
|
+
value?: string | number | boolean | Date | (string | number | Date)[];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface CmsSort {
|
|
51
|
+
field: string;
|
|
52
|
+
/** Default "asc". */
|
|
53
|
+
direction?: "asc" | "desc";
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface CmsQuery {
|
|
57
|
+
filters?: CmsFilter[];
|
|
58
|
+
sort?: CmsSort[];
|
|
59
|
+
/** Page size (default 20). */
|
|
60
|
+
limit?: number;
|
|
61
|
+
/** Items to skip — page N is skip = N * limit. */
|
|
62
|
+
skip?: number;
|
|
63
|
+
/** Reference field keys to inline as full items (otherwise the field holds ids). */
|
|
64
|
+
include?: string[];
|
|
65
|
+
/** true → the page carries `total` (slower query; for counts/empty-state logic). */
|
|
66
|
+
withTotal?: boolean;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** One page of items. Load the next page with skip = items shown so far. */
|
|
70
|
+
export interface CmsPage {
|
|
71
|
+
items: CmsItem[];
|
|
72
|
+
hasNext: boolean;
|
|
73
|
+
/** Total matching items — only when the query asked `withTotal`, else null. */
|
|
74
|
+
total: number | null;
|
|
75
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The site chrome for every CMS page — THIS file (header/footer/nav) plus the @theme token
|
|
3
|
+
// block in src/styles/global.css are what you brand. Keep the <slot name="seo-tags" /> in
|
|
4
|
+
// <head> and the global.css import. Add one nav link per content surface you build (the
|
|
5
|
+
// routes are yours — CMS ships no fixed pages). (If another vertical is also deployed, its
|
|
6
|
+
// SiteLayout won; merge nav links there instead.)
|
|
7
|
+
import "../styles/global.css";
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
title: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
}
|
|
13
|
+
const { title, description } = Astro.props;
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
<!doctype html>
|
|
17
|
+
<html lang="en">
|
|
18
|
+
<head>
|
|
19
|
+
<meta charset="UTF-8" />
|
|
20
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
21
|
+
<title>{title}</title>
|
|
22
|
+
{description && <meta name="description" content={description} />}
|
|
23
|
+
<slot name="seo-tags" />
|
|
24
|
+
</head>
|
|
25
|
+
<body>
|
|
26
|
+
<header class="sticky top-0 z-40 border-b border-border bg-background/80 backdrop-blur">
|
|
27
|
+
<div class="mx-auto flex h-16 max-w-6xl items-center justify-between px-6">
|
|
28
|
+
<a href="/" class="text-base font-bold tracking-tight text-foreground no-underline">Brand Name</a>
|
|
29
|
+
<nav class="flex items-center gap-6 text-sm">
|
|
30
|
+
<!-- one link per content surface you build, e.g. <a href="/recipes">Recipes</a> -->
|
|
31
|
+
</nav>
|
|
32
|
+
</div>
|
|
33
|
+
</header>
|
|
34
|
+
<main class="mx-auto max-w-6xl px-6 pb-24 pt-10">
|
|
35
|
+
<slot />
|
|
36
|
+
</main>
|
|
37
|
+
<footer class="border-t border-border px-6 py-10 text-center text-sm text-muted-foreground">
|
|
38
|
+
© Brand Name
|
|
39
|
+
</footer>
|
|
40
|
+
</body>
|
|
41
|
+
</html>
|