@wix/agent-skills 1.17.0 → 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 +14 -3
- package/skills/wix-app/references/SITE_PLUGIN.md +12 -0
- package/skills/wix-app/references/WIX_PATTERNS_DOCS.md +74 -68
- 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/ANIMATED-COMPONENTS.md +12 -11
- package/skills/wix-app/references/editor-react-component/BRANDED-COMPONENTS.md +1 -0
- package/skills/wix-app/references/editor-react-component/BROWSER-SUPPORT.md +56 -0
- package/skills/wix-app/references/editor-react-component/COMPONENT-PREVIEW.md +16 -8
- package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +19 -1
- package/skills/wix-app/references/editor-react-component/DESIGN-STATES.md +3 -0
- package/skills/wix-base44-connector/SKILL.md +133 -44
- package/skills/wix-base44-connector/references/CAPABILITY_MAP.md +78 -0
- package/skills/wix-base44-connector/scripts/utils.js +216 -30
- 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 +4 -1
- 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 +26 -8
- 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-rentals.md +254 -0
- 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/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 +18 -2
- 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/stores/create-product-catalog-v3.md +21 -6
- package/skills/wix-manage/references/stores/update-product-with-options.md +83 -0
- 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 +3 -1
- package/skills/wix-vibe-headless/platforms/base44-ecom-light.md +3 -1
- package/skills/wix-vibe-headless/platforms/base44.md +23 -61
- package/skills/wix-vibe-headless/platforms/generic.md +6 -3
- package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +43 -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-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/storefront/INSTRUCTIONS.md +137 -84
- 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-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-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
|
@@ -205,21 +205,21 @@ Wire the named part completely:
|
|
|
205
205
|
|
|
206
206
|
## 4. Suppress Autoplay in `component.preview.tsx`
|
|
207
207
|
|
|
208
|
-
The Wix CLI scaffold generates `component.preview.tsx`.
|
|
209
|
-
|
|
210
|
-
|
|
208
|
+
The Wix CLI scaffold generates `component.preview.tsx`. Read the file first,
|
|
209
|
+
then edit only the body of the existing preview component. Do not overwrite
|
|
210
|
+
the file from scratch.
|
|
211
211
|
|
|
212
|
-
###
|
|
212
|
+
### Edit the generated `component.preview.tsx`
|
|
213
213
|
|
|
214
|
-
Add `useIsEditMode` to the existing `@wix/react-component-utils` import.
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
214
|
+
Add `useIsEditMode` to the existing `@wix/react-component-utils` import. Then
|
|
215
|
+
edit only the body of the existing `ComponentNamePreview` function — add the
|
|
216
|
+
`isEditMode` check and gate the autoplay props. Do not touch the
|
|
217
|
+
`withFallbackPlaceholder` call, the `withDefaults` export, or any other part
|
|
218
|
+
of the file.
|
|
218
219
|
|
|
219
220
|
```tsx
|
|
220
|
-
const
|
|
221
|
+
const ComponentNamePreview: FC<ComponentProps<typeof Component>> = (props) => {
|
|
221
222
|
const isEditMode = useIsEditMode();
|
|
222
|
-
|
|
223
223
|
return (
|
|
224
224
|
<Component
|
|
225
225
|
{...props}
|
|
@@ -243,4 +243,5 @@ In preview mode (`isEditMode` is `false`) → both use the user's configured val
|
|
|
243
243
|
- [ ] Hover has a paired editor design state; `:focus-visible` remains a
|
|
244
244
|
standalone keyboard indicator.
|
|
245
245
|
- [ ] Hover-only visibility changes behavior, not the button's editable styling surface.
|
|
246
|
-
- [ ] The preview
|
|
246
|
+
- [ ] The preview exports the adapter with synchronized fallback metadata and
|
|
247
|
+
disables autoplay in design mode.
|
|
@@ -26,6 +26,7 @@ using CSS Modules `@value`, then consume with `var()`.
|
|
|
26
26
|
**Body:** `wst-paragraph-1..3-font` / `wst-paragraph-1..3-color`
|
|
27
27
|
|
|
28
28
|
- Do not use `var(--wst-*)` directly; import the `@value` alias first.
|
|
29
|
+
- Do not pass a fallback as `var()`'s second argument
|
|
29
30
|
- Do not use `@import`; CSS Modules resolves theme aliases through `@value`.
|
|
30
31
|
- Do not use `wst-base-1-color` for text. Prefer heading/paragraph color tokens,
|
|
31
32
|
or `wst-base-2-color` when a base contrast color is required.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Browser Support
|
|
2
|
+
|
|
3
|
+
Which CSS features and DOM APIs an Editor React Component may use. This is about
|
|
4
|
+
support in the visitor's browser, a separate question from whether an API exists
|
|
5
|
+
during server rendering.
|
|
6
|
+
|
|
7
|
+
## The rule
|
|
8
|
+
|
|
9
|
+
**Use only features at Baseline "Widely Available", or ones that fall back to it** —
|
|
10
|
+
supported for 30+ months in every browser [Wix
|
|
11
|
+
supports](https://support.wix.com/en/article/supported-devices-browsers-and-operating-systems):
|
|
12
|
+
Chrome (desktop + Android), Edge, Firefox (desktop + Android), Safari (macOS +
|
|
13
|
+
iOS/iPadOS).
|
|
14
|
+
|
|
15
|
+
A fallback must genuinely degrade rather than break: the unsupported path still
|
|
16
|
+
has to render a usable component.
|
|
17
|
+
|
|
18
|
+
## Deciding, without looking it up
|
|
19
|
+
|
|
20
|
+
These rules resolve nearly everything. Stop at the first step that answers:
|
|
21
|
+
|
|
22
|
+
1. **Named literally in the skill or repository instructions?** → pre-authorized:
|
|
23
|
+
use it, no warning. A string test, not a judgment call — `@property` in your
|
|
24
|
+
instructions authorizes it, a general endorsement of modern CSS authorizes
|
|
25
|
+
nothing. A feature named only in the *user's* request is **not** pre-authorized;
|
|
26
|
+
run the steps below, then the [insist protocol](#insist-protocol).
|
|
27
|
+
2. **Date arithmetic.** Subtract 30 months from today's real date. Was it already
|
|
28
|
+
shipping in every browser above by then? Mobile lags — iOS Safari and Firefox
|
|
29
|
+
Android are the usual holdouts.
|
|
30
|
+
3. **Smell test**, when that's inconclusive. Widely Available means *boring* for 2.5
|
|
31
|
+
years. Learned it as "the modern way", or would enjoy showing it off → no. Plain
|
|
32
|
+
CSS or DOM you'd have written five years ago → yes. Called "now Baseline"
|
|
33
|
+
anywhere → that phrasing marks *newly* available → no.
|
|
34
|
+
4. **Still unsure → not permitted.** Permitting wrongly ships a component that is
|
|
35
|
+
broken for real visitors; denying wrongly costs only a slightly plainer
|
|
36
|
+
implementation the user can ask you to change.
|
|
37
|
+
|
|
38
|
+
Search only when it earns the cost — the user asks about support directly, or the
|
|
39
|
+
feature is central enough that deny-and-offer would waste a real round trip. Prefer
|
|
40
|
+
fetching an MDN or caniuse page over driving a browser.
|
|
41
|
+
|
|
42
|
+
**Standing exception:** `@property` is always fine for design tokens, generated or
|
|
43
|
+
hand-written — rewriting a token registration, or warning about one, breaks the
|
|
44
|
+
component.
|
|
45
|
+
|
|
46
|
+
**Feels new, is not** — run the arithmetic, not the reputation: `:has()`,
|
|
47
|
+
`@container` size queries, `subgrid`, `color-mix()`, `inert`,
|
|
48
|
+
`Array.prototype.toSorted`.
|
|
49
|
+
|
|
50
|
+
## Insist protocol
|
|
51
|
+
|
|
52
|
+
1. **Build the widely-supported alternative** by default. Don't ask first, and don't
|
|
53
|
+
leave the component unbuilt.
|
|
54
|
+
2. **Use the feature only if the user then asks for it explicitly**, and guard it so
|
|
55
|
+
it degrades rather than breaks — `@supports` for CSS, `CSS.supports()` or a
|
|
56
|
+
capability check for JS.
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
# Editor Preview Entry
|
|
2
2
|
|
|
3
|
-
Use this
|
|
4
|
-
|
|
3
|
+
Use this when creating a component or changing its data, root, or editor-only
|
|
4
|
+
behavior.
|
|
5
5
|
|
|
6
|
-
## Preserve the
|
|
6
|
+
## Preserve the Structure, Synchronize the Contract
|
|
7
7
|
|
|
8
8
|
The Wix CLI scaffold generates `component.preview.tsx` and wires its URL into
|
|
9
9
|
the extension's editor resource. It includes `withDefaults`,
|
|
10
10
|
`withFallbackPlaceholder`, required-data fields, and the root class name.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
Keep the wrapper structure and synchronize its values:
|
|
13
|
+
|
|
14
|
+
- Wrap the preview adapter when one exists; otherwise wrap `Component`.
|
|
15
|
+
- In `requiredDataFields`, normally use only the one prop crucial to meaningful
|
|
16
|
+
rendering, such as `animationUrl`. Use more only when each is essential.
|
|
17
|
+
- Set `rootClassName` to the elected root's exact global class, not `styles.root`.
|
|
18
|
+
|
|
19
|
+
Never remove `withFallbackPlaceholder`.
|
|
15
20
|
|
|
16
21
|
## Detect Editor Design Mode
|
|
17
22
|
|
|
@@ -35,10 +40,13 @@ timers, or network activity while a site owner is designing.
|
|
|
35
40
|
For autoplaying components, force autoplay off in editor design mode and keep
|
|
36
41
|
the live/preview prop values unchanged.
|
|
37
42
|
|
|
43
|
+
Export the adapter through `withFallbackPlaceholder` and synchronize its data
|
|
44
|
+
field and root class.
|
|
45
|
+
|
|
38
46
|
## Checklist
|
|
39
47
|
|
|
40
|
-
- [ ] Generated
|
|
41
|
-
- [ ]
|
|
48
|
+
- [ ] Generated wrappers target the preview adapter when one exists.
|
|
49
|
+
- [ ] Normally one crucial data field and the exact root global class are set.
|
|
42
50
|
- [ ] The extension still loads the preview URL as its editor resource.
|
|
43
51
|
- [ ] `useIsEditMode()` is called inside a component.
|
|
44
52
|
- [ ] Live/preview behavior still receives the site owner's original props.
|
|
@@ -177,6 +177,22 @@ A dynamic runtime value that cannot be represented statically may use a narrowly
|
|
|
177
177
|
scoped CSS custom property set from JSX, but keep the actual style rule in CSS
|
|
178
178
|
and do not expose a visual prop solely for that purpose.
|
|
179
179
|
|
|
180
|
+
```css
|
|
181
|
+
/* Typography: zero config builds the `font` control from both longhands.
|
|
182
|
+
A part with a size but no family gets a control with no default. */
|
|
183
|
+
.cta {
|
|
184
|
+
font-family: 'Inter', sans-serif;
|
|
185
|
+
font-size: 14px;
|
|
186
|
+
font-weight: 600;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/* Avoid: a module-only wrapper is not an editor element. A size here is
|
|
190
|
+
uneditable and silently overrides the parent's typography control. */
|
|
191
|
+
.cta-label {
|
|
192
|
+
font-size: 14px;
|
|
193
|
+
}
|
|
194
|
+
```
|
|
195
|
+
|
|
180
196
|
## Interaction and Motion
|
|
181
197
|
|
|
182
198
|
- Set `pointer-events: auto` on the root and each interactive element.
|
|
@@ -198,7 +214,7 @@ When creating a component and the request has no visual direction, use a
|
|
|
198
214
|
restrained accessible default. When editing an existing component, preserve its
|
|
199
215
|
visual language unless the request changes it.
|
|
200
216
|
|
|
201
|
-
- body text at least 16px and labels at least 14px
|
|
217
|
+
- body text at least 16px and labels at least 14px, with an explicit `font-family`
|
|
202
218
|
- WCAG AA contrast (4.5:1 body text, 3:1 large text and UI controls)
|
|
203
219
|
- touch targets at least 44 by 44px
|
|
204
220
|
- clear hierarchy and visible focus states
|
|
@@ -220,4 +236,6 @@ than hardcoded generic color choices.
|
|
|
220
236
|
- [ ] A sizing chain exists only on bounded growing axes.
|
|
221
237
|
- [ ] Layout is container-driven and uses logical inline properties.
|
|
222
238
|
- [ ] Static styling stays in CSS; custom properties exist only when needed.
|
|
239
|
+
- [ ] Every part that sets `font-size` also sets `font-family`, on the part that
|
|
240
|
+
should own the typography control.
|
|
223
241
|
- [ ] Interactive elements expose pointer events and accessible design states.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: wix-base44-connector
|
|
3
|
-
description: "Build on
|
|
3
|
+
description: "Build on and manage the connected Wix site from a Base44 app: discover and call any Wix API (endpoints, request/response shapes, fields), gather site context, route each call to the right identity, and follow curated recipes for admin tasks."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Building on Wix from Base44
|
|
@@ -10,6 +10,17 @@ find the APIs and learn their contracts from the docs, write the code. **Discove
|
|
|
10
10
|
request and response fields all come from the calls below, never from memory or pattern. 404 or
|
|
11
11
|
empty ⇒ discover, not permute. Examples teach mechanics and go stale — verify before relying.
|
|
12
12
|
|
|
13
|
+
**Start every Wix task by getting the site context** (`wx.context`, below). It reports what the
|
|
14
|
+
site actually has and how each part is configured, so every call targets what is really there
|
|
15
|
+
instead of a guess from a name. It is the first step of a task, not a one-time setup: a later turn
|
|
16
|
+
does not inherit an earlier turn's context, so re-read it before building on or calling a Wix API.
|
|
17
|
+
|
|
18
|
+
**A management or admin task starts at the recipes**: call `wx.mgmtRecipes` (Learn Wix) and follow
|
|
19
|
+
the one that fits. A recipe states outright what an API does not support, which fields a bulk call
|
|
20
|
+
actually writes, and the order two calls have to go in — from the schemas alone those get re-derived
|
|
21
|
+
several errors at a time. A REST search ranks the matching recipes too (`recipes` in its return), so
|
|
22
|
+
they also surface from a search that began at the methods.
|
|
23
|
+
|
|
13
24
|
## What are you building?
|
|
14
25
|
|
|
15
26
|
The app's audience picks the token, and the token picks the architecture: the **visitor token is
|
|
@@ -18,22 +29,24 @@ the connector's, server-side only.
|
|
|
18
29
|
|
|
19
30
|
```
|
|
20
31
|
browser ──(visitor token)─► wixapis.com the visitor's own reads & actions
|
|
21
|
-
base44/functions
|
|
32
|
+
base44/functions/… ──(admin token)───► wixapis.com work that needs the owner's identity
|
|
22
33
|
exec_tool ──(admin token)───► wixapis.com you: ad hoc probing/managing while building
|
|
23
34
|
```
|
|
24
35
|
|
|
25
|
-
**A site for visitors** —
|
|
26
|
-
|
|
36
|
+
**A site for visitors** — store, blog, booking, ecom, CMS, CRM, and the rest of the business solutions.
|
|
37
|
+
Your app is the site's frontend — whether the site is headless (no pages of its own) or your
|
|
38
|
+
frontend extends an existing site. **The complete visitor experience —
|
|
27
39
|
every page, every read, every action a visitor takes — is browser calls on the visitor token;
|
|
28
40
|
none of it needs a backend function.** Public reads
|
|
29
|
-
included (the visitor token queries
|
|
30
|
-
|
|
31
|
-
|
|
41
|
+
included (the visitor token queries public content directly), and per-visitor state is scoped to
|
|
42
|
+
the CALLER — an API that acts on "the current visitor's" data resolves the visitor from the
|
|
43
|
+
token, so only the visitor token reaches that visitor's own state. One shared visitor client
|
|
44
|
+
carries it all (Write the code, below). `base44/functions/…` appear only where work
|
|
32
45
|
needs the owner's identity — elevated-permission ops a visitor triggers, webhooks, scheduled
|
|
33
46
|
jobs — and for the app's non-Wix backend.
|
|
34
47
|
|
|
35
|
-
**An admin tool for the owner** — dashboard, back office.
|
|
36
|
-
|
|
48
|
+
**An admin tool for the owner** — dashboard, back office. Admin pages and agent act as the
|
|
49
|
+
owner, using the secret admin token: `pages → base44/functions/… ──(admin token)──► wixapis.com`.
|
|
37
50
|
|
|
38
51
|
## The helpers
|
|
39
52
|
|
|
@@ -49,15 +62,25 @@ const wx = (() => { const m = { exports: {} };
|
|
|
49
62
|
new Function("module", "exports", "require", fs.readFileSync(P, "utf8"))(m, m.exports, require); return m.exports; })();
|
|
50
63
|
```
|
|
51
64
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
`wx.
|
|
56
|
-
|
|
57
|
-
`
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
65
|
+
`wx` exports these helpers:
|
|
66
|
+
|
|
67
|
+
- `wx.post/get/patch/put/del(url, [body], token?)` — JSON transports, one per verb (`get`/`del` take no body): Bearer from `token`, non-2xx **throws** the API's own error
|
|
68
|
+
- `wx.clip(value)` — cap a return value: oversized → `{ truncated, total, head }`; renders `undefined` as `null` so absence stays visible
|
|
69
|
+
- `wx.context(token, section?)` — the site's dynamic context report; no section → its outline
|
|
70
|
+
- `wx.browse(menuUrl, { include, filter, depth })` — walk a docs-portal menu deterministically
|
|
71
|
+
- `wx.search(term, { type, max, lines })` — ranked docs search; hits carry endpoint (`VERB url`) + docsUrl + gist, and the worked requests the docs publish for them. A REST search also ranks the **management recipes**, returned as their own `recipes` list ahead of the methods — each with its steps, the endpoints it calls, and `file` when the wix-manage skill is on disk
|
|
72
|
+
- `wx.page(docsUrl)` — read a doc page; its worked examples come back as titles + line numbers
|
|
73
|
+
- `wx.bash(cmd)` — shell over saved files (GNU grep/sed; awk is mawk; no rg)
|
|
74
|
+
- `wx.spec(docsUrl | code)` — a method's exact schema, plus the titles of the docs' own request examples saved at `examplesPath`; pass a hit's docsUrl (direct load), or raw code to query the index yourself
|
|
75
|
+
- `wx.mgmtRecipes(q?)` — management-recipe index; no arg → categories, a word → matching recipes
|
|
76
|
+
- `wx.installApp(appDefId, siteId, token)` — install a Wix app on the site (Apps Installer). If discovery finds an API whose app isn't installed on the site, install it first — that's a one-call prerequisite, **not** a reason to fall back to a hand-built alternative. `appDefId` from `search` or the Apps-Created-by-Wix table; `siteId` from `context` (the site report)
|
|
77
|
+
|
|
78
|
+
Every helper answers inline when the result fits (≤ 4,000 chars — exec results clip at ~5,000).
|
|
79
|
+
A bigger result is saved under `.agents/skills/wix-base44-connector/tmp/` and comes back as
|
|
80
|
+
`{ path, bytes, lines, outline }` — the outline is your map into the file. Work a saved file in
|
|
81
|
+
two moves: find with `wx.bash("grep -n 'term' <path> | head -40")` (or across every save:
|
|
82
|
+
`grep -rn 'term' .agents/skills/wix-base44-connector/tmp/`), then quote with `read_file` — an
|
|
83
|
+
`offset`/`limit` window at the lines grep named, or the whole file when it fits the 45K cap.
|
|
61
84
|
|
|
62
85
|
## Gather context — the dynamic context report
|
|
63
86
|
|
|
@@ -72,8 +95,27 @@ An empty report = bad token, never an empty site.
|
|
|
72
95
|
|
|
73
96
|
## Learn Wix — find the APIs, learn their contracts
|
|
74
97
|
|
|
98
|
+
### Management recipes — first stop for an admin task
|
|
99
|
+
|
|
100
|
+
Curated admin flows, by category — ecommerce, bookings, stores, cms, google-ads, sites, contacts,
|
|
101
|
+
get-paid, marketing, pricing-plans, events, blog, forms, restaurants, domains, media, …:
|
|
102
|
+
|
|
103
|
+
```js
|
|
104
|
+
await wx.mgmtRecipes(); // categories with counts
|
|
105
|
+
await wx.mgmtRecipes("stores"); // a category's list — or any task word: wx.mgmtRecipes("coupon")
|
|
106
|
+
// each row points at its recipe: `file` when the wix-manage skill is installed — read_file it
|
|
107
|
+
// straight off disk — else `url`: wx.page(url), whole when small, saved + outline when big
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
A recipe carries prerequisites, order, and gotchas that no method page has. A REST search ranks
|
|
111
|
+
these same recipes as its own `recipes` list, so they surface either way.
|
|
112
|
+
|
|
113
|
+
### Find a method — search and browse
|
|
114
|
+
|
|
75
115
|
```js
|
|
76
|
-
//
|
|
116
|
+
// name the method? search finds it in one call:
|
|
117
|
+
await wx.search("stores v3 update product"); // → [{ method, endpoint: "VERB url", docsUrl, gist }]; call wx.<verb>(url, body, token); spec(docsUrl) for the full schema
|
|
118
|
+
// exploring an unfamiliar product? browse is deterministic — menuUrl alone orients (children + counts);
|
|
77
119
|
// filter before listing methods. browse works for both portals this skill uses — REST
|
|
78
120
|
// (api-reference) and WIX_HEADLESS (go-headless) — just pass that portal's menu URL.
|
|
79
121
|
await wx.browse("https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings",
|
|
@@ -91,6 +133,22 @@ await wx.search("pause a pricing plan subscription and resume it");
|
|
|
91
133
|
await wx.search("mint a visitor token and read the current cart", { type: "WIX_HEADLESS" });
|
|
92
134
|
```
|
|
93
135
|
|
|
136
|
+
Products and their capabilities — the common ones, partial lists:
|
|
137
|
+
|
|
138
|
+
- **Stores** — products · categories · product options and variants · inventory · promotions · *+7 more*
|
|
139
|
+
- **Bookings** — services · appointments · classes · staff members · time slots · waitlists · *+7 more*
|
|
140
|
+
- **eCommerce** — cart · checkout · orders · order fulfillment · discount rules · *+7 more*
|
|
141
|
+
- **Events** — events · ticket definitions · RSVP · check-in · *+6 more*
|
|
142
|
+
- **Restaurants** — menus · items · item modifiers · online orders · reservations · *+9 more*
|
|
143
|
+
- **Blog** — posts · draft posts · categories · tags · *+3 more*
|
|
144
|
+
- **CMS** — data items · data collections · collection permissions · external databases · *+4 more*
|
|
145
|
+
- **Pricing Plans** — plans · orders · recurring subscriptions · free trial periods · *+4 more*
|
|
146
|
+
- **Members & Contacts** — contacts · labels · extended fields · members · badges · *+7 more*
|
|
147
|
+
- **Forms** — form schemas · form submissions · interactive form sessions · *+3 more*
|
|
148
|
+
- **Loyalty** — loyalty points · earning rules · tiers · rewards · *+5 more*
|
|
149
|
+
|
|
150
|
+
Full list — all 36 products, their capabilities and docs paths: `references/CAPABILITY_MAP.md`.
|
|
151
|
+
|
|
94
152
|
Go deeper for fields, enums, or absence — only the spec index proves absence.
|
|
95
153
|
|
|
96
154
|
### Read a doc page
|
|
@@ -100,8 +158,9 @@ map and window in the SAME exec; coordinates are for your code, not for a second
|
|
|
100
158
|
|
|
101
159
|
```js
|
|
102
160
|
const pg = await wx.page(docsUrl); // whole text when small; else { path, bytes, lines, outline }
|
|
103
|
-
//
|
|
104
|
-
// body
|
|
161
|
+
// pg.examples lists the page's worked requests as { title, line } — a complete request (URL,
|
|
162
|
+
// headers, body) is usually all you need: read_file(pg.path, offset: <its line>)
|
|
163
|
+
// anything else, windowed to your term in the same round:
|
|
105
164
|
return wx.bash(`sed -n '/^## REST API/,/^## JavaScript SDK/p' ${pg.path} | grep -B5 -A40 -i 'examples\\|<term>' | head -c 3800`);
|
|
106
165
|
// a giant fenced example → its field vocabulary instead of paging it:
|
|
107
166
|
// wx.bash(`sed -n '<a>,<b>p' ${pg.path} | grep -oE '"[a-zA-Z]+":' | sort -u | head -60`)
|
|
@@ -112,7 +171,17 @@ lines weren't enough.
|
|
|
112
171
|
|
|
113
172
|
### The spec index — a located method's exact schema
|
|
114
173
|
|
|
115
|
-
|
|
174
|
+
Pass a method's `docsUrl` (a search/browse hit carries it) — spec loads that method's schema (request
|
|
175
|
+
body, responses, filterable-fields map, examples) in one call, a direct lookup. Read the field
|
|
176
|
+
**descriptions**, not just the names — they carry the rules (which field is canonical, when one is empty):
|
|
177
|
+
|
|
178
|
+
```js
|
|
179
|
+
const sp = await wx.spec(hit.docsUrl);
|
|
180
|
+
// sp.examples — the method's worked requests as { title, line }, all saved at sp.examplesPath.
|
|
181
|
+
// The one that matches the task is rarely the first: read_file(sp.examplesPath, offset: <its line>)
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Want to shape the result yourself? Pass raw code against the index (`lightIndex` + `getResourceSchemaByUrl`):
|
|
116
185
|
|
|
117
186
|
```js
|
|
118
187
|
await wx.spec(`
|
|
@@ -134,40 +203,52 @@ await wx.spec(`
|
|
|
134
203
|
`filterable` maps each field to its allowed operators + sort — filter server-side only on what it
|
|
135
204
|
lists, else filter in code.
|
|
136
205
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
~100 curated multi-step management (admin) flows across 23 categories — the largest are
|
|
140
|
-
ecommerce (24), bookings (13), stores (9), cms (7), google-ads (7), sites (7), contacts (5),
|
|
141
|
-
then get-paid, marketing, pricing-plans, events, blog, forms, restaurants, domains, media, …:
|
|
142
|
-
|
|
143
|
-
```js
|
|
144
|
-
await wx.mgmtRecipes(); // categories with counts
|
|
145
|
-
await wx.mgmtRecipes("stores"); // a category's list — or any task word: wx.mgmtRecipes("coupon")
|
|
146
|
-
await wx.page(url); // read the chosen recipe — whole when small, saved + outline when
|
|
147
|
-
// big; then grep / read_file windows by the outline's line numbers
|
|
148
|
-
```
|
|
206
|
+
## Write the code
|
|
149
207
|
|
|
150
|
-
|
|
151
|
-
|
|
208
|
+
**REST, not the JS SDK** — everywhere: the admin ops you run while building, backend functions,
|
|
209
|
+
frontend pages. Doc pages carry twin REST and SDK halves; read the REST one.
|
|
152
210
|
|
|
153
|
-
|
|
211
|
+
**Send what the page documents, nothing more** — required fields, nesting, and enum values exactly
|
|
212
|
+
as spelled; a header only when the operation's REST section lists it. Never `wix-site-id`: every
|
|
213
|
+
token here is already bound to a site, and in the browser the header fails CORS preflight outright.
|
|
154
214
|
|
|
155
|
-
**
|
|
156
|
-
|
|
215
|
+
**Shapes are discovery too**: read a method's request/response schema from `spec()` — its field
|
|
216
|
+
descriptions state which field is canonical and when one reads back empty. Don't infer shape from a
|
|
217
|
+
single live probe: it reflects only the params you sent, so probe with the same request your code makes.
|
|
157
218
|
|
|
158
|
-
### Admin
|
|
219
|
+
### Admin ops while building — you, in exec_tool
|
|
159
220
|
|
|
160
221
|
```js
|
|
161
222
|
const { accessToken } = await base44.asServiceRole.connectors.getConnection("wix");
|
|
162
223
|
const data = await wx.post("https://www.wixapis.com/contacts/v5/contacts/query", // spec-index publicUrl
|
|
163
224
|
{ query: { cursorPaging: { limit: 10 } } }, accessToken);
|
|
164
225
|
// let it throw — the thrown message is your result; .catch hides the answer
|
|
165
|
-
return wx.clip({ error: null, count: data.contacts?.length, first: data.contacts
|
|
166
|
-
//
|
|
226
|
+
return wx.clip({ error: null, count: data.contacts?.length, first: data.contacts[0] });
|
|
227
|
+
// `first` is one complete record — read the real field shapes off it; don't code from remembered key names
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### Backend functions — the app, as the owner
|
|
231
|
+
|
|
232
|
+
The same API call, deployed. **No helpers run here** — `wx.*` is a build tool loaded into exec,
|
|
233
|
+
absent from `base44/functions/…`; write plain `fetch`. Nor `clip`, which caps what an exec returns
|
|
234
|
+
to you: a function returns its data to the app.
|
|
235
|
+
|
|
236
|
+
```js
|
|
237
|
+
// inside base44/functions/… — plain fetch, no wx
|
|
238
|
+
const { accessToken } = await base44.asServiceRole.connectors.getConnection("wix");
|
|
239
|
+
const res = await fetch("https://www.wixapis.com/contacts/v5/contacts/query", {
|
|
240
|
+
method: "POST",
|
|
241
|
+
headers: { Authorization: `Bearer ${accessToken}`, "Content-Type": "application/json" },
|
|
242
|
+
body: JSON.stringify({ query: { cursorPaging: { limit: 10 } } }),
|
|
243
|
+
});
|
|
244
|
+
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`); // the API's own error, not a generic one
|
|
245
|
+
return (await res.json()).contacts;
|
|
167
246
|
```
|
|
168
247
|
|
|
169
|
-
|
|
170
|
-
|
|
248
|
+
- That `Authorization: Bearer …` is the whole auth for this lane, unless the operation's page says
|
|
249
|
+
otherwise.
|
|
250
|
+
- One file per business area, not per call — each file is its own deploy, and deploys cost time.
|
|
251
|
+
- Call every function you deploy and fix what breaks. Deploying is not testing.
|
|
171
252
|
|
|
172
253
|
### A visitor client — src/lib/wixClient.js
|
|
173
254
|
|
|
@@ -200,3 +281,11 @@ return await wx.post("<a public read from Learn Wix>", { query: {} }, access_tok
|
|
|
200
281
|
// a lean default response isn't the whole shape — contracts often define a fields param
|
|
201
282
|
// that opts INTO heavier parts (formatted prices, media); read the contract for it
|
|
202
283
|
```
|
|
284
|
+
|
|
285
|
+
No OAuth app in the context report to take the `clientId` from? Create one (admin, one-time) —
|
|
286
|
+
the returned `id` IS the `clientId`:
|
|
287
|
+
|
|
288
|
+
```js
|
|
289
|
+
const { oAuthApp } = await wx.post("https://www.wixapis.com/oauth-app/v1/oauth-apps",
|
|
290
|
+
{ oAuthApp: { name: "My App" } }, accessToken); // oAuthApp.id is the visitor clientId
|
|
291
|
+
```
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Capability map — which Wix product owns what
|
|
2
|
+
|
|
3
|
+
Every Wix product, its capabilities, and its docs path. Paths are relative to
|
|
4
|
+
`https://dev.wix.com/docs/api-reference/`; read a product's `<path>/introduction.md` for detail.
|
|
5
|
+
Capabilities come from those introduction pages — re-derive from them when a product looks wrong or
|
|
6
|
+
missing.
|
|
7
|
+
|
|
8
|
+
## Business solutions
|
|
9
|
+
|
|
10
|
+
| Product | Path | Features |
|
|
11
|
+
|---|---|---|
|
|
12
|
+
| Stores | `business-solutions/stores` | Products · Categories · Product options and variants · Inventory · Brands · Ribbons · Product info sections · Product customizations · Promotions · Store locations · Site currency · Currency conversion |
|
|
13
|
+
| Bookings | `business-solutions/bookings` | Services · Appointments · Classes · Courses · Staff members · Resources · Pricing · Policies · Time slots · Bookings · Waitlists · External calendar · Checkout and orders |
|
|
14
|
+
| eCommerce | `business-solutions/e-commerce` | Cart · Checkout · Abandoned checkout · Orders · Order transactions · Order fulfillment · Discount rules · Recommendations · Shipping rates · Additional fees · Payments · Catalog |
|
|
15
|
+
| Restaurants | `business-solutions/restaurants` | Menus · Sections · Items · Item variants · Item modifiers · Item labels · Online orders · Operations · Fulfillment methods · Availability exceptions · Service fees · Reservations · Time slots · Experiences |
|
|
16
|
+
| Events | `business-solutions/events` | Events · Ticket definitions · Tickets · RSVP · Orders and checkout · Check-in · Event guests · Guest list · Event schedule · Policies |
|
|
17
|
+
| Blog | `business-solutions/blog` | Posts · Draft posts · Categories · Tags · Post stats · Blog roles · Paid post subscriptions |
|
|
18
|
+
| CMS | `business-solutions/cms` | Data items · Data collections · Collection permissions · Aggregations · Indexes · External databases · Backups · Background tasks |
|
|
19
|
+
| Pricing Plans | `business-solutions/pricing-plans` | Plans · Orders · Recurring subscriptions · Single payment plans · Free plans · Free trial periods · Order cancellation · Credits |
|
|
20
|
+
| Portfolio | `business-solutions/portfolio` | Projects · Project items · Collections · Portfolio settings · Gallery layouts · Cover media |
|
|
21
|
+
| Gift Cards | `business-solutions/gift-cards` | Gift cards · Gift card products · Redemption codes · Balance tracking · Denominations · Expiration policies · Transactions |
|
|
22
|
+
| Coupons | `business-solutions/coupons` | Coupons · Percentage discounts · Fixed amount discounts · Free shipping · Buy X Get Y · Coupon scopes · Usage limits · Expiration dates |
|
|
23
|
+
| Donations | `business-solutions/donations` | Donation campaigns · Fundraising goals · One-time and recurring donations · Predefined and custom amounts · Cover fees · Campaign progress |
|
|
24
|
+
| Benefit Programs | `business-solutions/benefit-programs` | Benefit programs · Program templates · Membership tiers · Credits · Benefit redemption · Visitor enrollment · Balances · Eligibility checks |
|
|
25
|
+
| Meetings | `business-solutions/meetings` | Scheduling links · Shareable booking page · Meeting duration and location · Video, phone, in-person · Hosts · Calendar sync · Intake forms · Paid meetings · Rescheduling |
|
|
26
|
+
| Rentals | `business-solutions/rentals` | Rental services · Hourly and daily durations · Customer-selected length · Bookable resources · Resource attributes · Per-hour and per-day pricing · Availability · Consecutive multi-day bookings |
|
|
27
|
+
| Suppliers Hub | `business-solutions/suppliers-hub` | Marketplace products · Suppliers · Dropshipping · Wholesale price tiers · Categories and tags · Product search · Bulk catalog operations · Mockup generation |
|
|
28
|
+
| Forum | `business-solutions/forum` | **Deprecated** — discontinued March 2026; migrate to Community → Groups |
|
|
29
|
+
|
|
30
|
+
## Site-wide products (CRM and business management)
|
|
31
|
+
|
|
32
|
+
| Product | Path | Features |
|
|
33
|
+
|---|---|---|
|
|
34
|
+
| Members & Contacts | `crm/members-contacts` | Contacts · Labels · Extended fields · Notes · Attachments · Activity log · Members · Member profiles · Member authentication · Privacy settings · Badges · Followers |
|
|
35
|
+
| Forms | `crm/forms` | Form schemas · Form submissions · Form schema templates · Intake forms · Interactive form sessions · Chat settings |
|
|
36
|
+
| Loyalty Program | `crm/loyalty-program` | Loyalty program · Loyalty points · Earning rules · Tiers · Loyalty accounts · Transactions · Rewards · Loyalty coupons · Checkout discount |
|
|
37
|
+
| Community | `crm/community` | Groups · Group rules · Group membership · Join requests · Comments · Reviews · Review requests · Reports · Moderation rules |
|
|
38
|
+
| Communication | `crm/communication` | Inbox · Conversations · Messages · Email subscriptions · Communication channels |
|
|
39
|
+
| CRM | `crm/crm` | Tasks · Pipelines · Cards |
|
|
40
|
+
| Automations | `business-management/automations` | Automations · Triggers · Actions · Conditions · Delays · Pre-installed automations · Trigger catalog · Action catalog |
|
|
41
|
+
| Marketing | `business-management/marketing` | Email campaigns · Transactional emails · Sender details · Sending domains · Marketing consent · Referral program · Referral rewards · Marketing tags · Social media posts · Google Ads · Ads.txt |
|
|
42
|
+
| Payments | `business-management/payments` | Checkout sessions · Payment methods · Transactions · Refunds · Disputes · Payouts · Balances · Tax documents · Payment service provider integration |
|
|
43
|
+
| Get Paid | `business-management/get-paid` | Invoices · Invoice presets · Billable items · Payment links · Receipts · Receipt presets · Bulk downloads |
|
|
44
|
+
| SEO | `business-management/seo` | Site SEO tags · SEO patterns · Item SEO tags · Resolved tags · Verification tags · Redirects |
|
|
45
|
+
| Multilingual | `business-management/multilingual` | Locales · Locale settings · Translation schemas · Translation content · Published translated content · Machine translation · Word credits |
|
|
46
|
+
| Notifications | `business-management/notifications` | Notifications · Notification templates · Dashboard site feed · Owner app notification center · Mobile push |
|
|
47
|
+
| Locations | `business-management/locations` | Locations · Default location · Business schedule · Special hours · Location types · Location archiving |
|
|
48
|
+
| Branches | `business-management/branches` | Branches · Default branch · Branch tags · Branch types |
|
|
49
|
+
| Online Programs | `business-management/online-programs` | Programs · Sections · Steps · Join applications · Instructors · Enrollment · Payment flows |
|
|
50
|
+
| Calendar | `business-management/calendar` | Schedules · Events · Recurring events · Schedule time frames · Event views · Participation — **infrastructure** under Bookings, not a product a site owner picks |
|
|
51
|
+
| Analytics | `business-management/analytics` | Analytics data · Semantic models · Sessions |
|
|
52
|
+
| Site Search | `business-management/site-search` | Search · Search schemas |
|
|
53
|
+
|
|
54
|
+
Also under `business-management/`, thinner or platform-facing: `site-properties`, `site-urls`,
|
|
55
|
+
`tags`, `dashboard`, `secrets`, `functions`, `app-installation`, `async-job`, `captcha`,
|
|
56
|
+
`cookie-consent-policy`, `custom-embeds`, `data-extension-schema`, `google-business-profile`,
|
|
57
|
+
`headless`, `ai-site-chat`, `faq-app`.
|
|
58
|
+
|
|
59
|
+
## Not in the docs
|
|
60
|
+
|
|
61
|
+
- No roles API and no segments API in `crm/` or `business-management/` — contact **labels** serve
|
|
62
|
+
segmentation.
|
|
63
|
+
- For a single method, `spec(docsUrl)` is what proves absence.
|
|
64
|
+
|
|
65
|
+
## Where things actually live
|
|
66
|
+
|
|
67
|
+
- **SEO spans two products** — the tag model is `business-management/seo`; Ads.txt and keyword
|
|
68
|
+
suggestions are `business-management/marketing/seo`.
|
|
69
|
+
- **Badges and Followers** live under `crm/members-contacts/members/activity/`, not member
|
|
70
|
+
management. Profiles are `members/member-management/members-about-v2`, privacy is
|
|
71
|
+
`member-management/privacy`, custom fields are `member-management/custom-fields`.
|
|
72
|
+
- **Meetings and Rentals ship no APIs of their own** — both are Wix Bookings with restricted field
|
|
73
|
+
values, so their contracts are the Bookings ones.
|
|
74
|
+
- **Loyalty coupons** (`crm/loyalty-program/rewards/coupons`) are a different resource from
|
|
75
|
+
eCommerce **Coupons** (`business-solutions/coupons`).
|
|
76
|
+
- **Stores categories** are called *Collections* in Catalog V1 and *Categories* in Catalog V3.
|
|
77
|
+
- **Stores, Coupons and Suppliers Hub have no usable introduction page** — start from the menu page
|
|
78
|
+
and the sub-section introductions.
|