@wix/agent-skills 1.19.2 → 1.20.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.
Files changed (75) hide show
  1. package/package.json +1 -1
  2. package/skills/wix-app/references/SERVICE_PLUGIN.md +14 -1
  3. package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +7 -6
  4. package/skills/wix-app/references/service-plugin/ADDITIONAL-FEES.md +4 -0
  5. package/skills/wix-app/references/service-plugin/AVAILABILITY-TIME-SLOTS-CONFIGURATION.md +118 -0
  6. package/skills/wix-app/references/service-plugin/BOOKING-POLICY.md +65 -0
  7. package/skills/wix-app/references/service-plugin/BOOKINGS-PRICING.md +71 -0
  8. package/skills/wix-app/references/service-plugin/BOOKINGS-STAFF-SORTING.md +11 -3
  9. package/skills/wix-app/references/service-plugin/BOOKINGS-VALIDATION.md +137 -0
  10. package/skills/wix-app/references/service-plugin/DISCOUNT-TRIGGERS.md +23 -16
  11. package/skills/wix-app/references/service-plugin/GIFT-CARDS.md +4 -0
  12. package/skills/wix-app/references/service-plugin/PAYMENT-SETTINGS.md +4 -2
  13. package/skills/wix-app/references/service-plugin/REALTIME-PERMISSIONS.md +45 -0
  14. package/skills/wix-app/references/service-plugin/SHIPPING-RATES.md +15 -0
  15. package/skills/wix-app/references/service-plugin/TOOLS_PROVIDER.md +4 -0
  16. package/skills/wix-app/references/service-plugin/VALIDATIONS.md +4 -0
  17. package/skills/wix-headless/references/CAPABILITIES.md +2 -2
  18. package/skills/wix-headless/references/inline-recipes/experience-store.md +4 -3
  19. package/skills/wix-headless/references/inline-recipes/how-to-code-a-store.md +98 -18
  20. package/skills/wix-headless/references/managed/DEPLOYMENT.md +8 -8
  21. package/skills/wix-headless-fast/install/fast-path.mjs +3 -1
  22. package/skills/wix-headless-fast/references/shared/app/wix/media.ts +13 -0
  23. package/skills/wix-headless-fast/references/storefront/INSTRUCTIONS.md +227 -56
  24. package/skills/wix-headless-fast/references/storefront/app/components/storefront/CartDrawer.tsx +37 -3
  25. package/skills/wix-headless-fast/references/storefront/app/components/storefront/FilterPanel.tsx +266 -0
  26. package/skills/wix-headless-fast/references/storefront/app/components/storefront/QuickAdd.tsx +165 -0
  27. package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useProductDetail.ts +48 -15
  28. package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useShop.ts +129 -11
  29. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart.ts +36 -6
  30. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/catalog.ts +190 -24
  31. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/types.ts +62 -4
  32. package/skills/wix-headless-fast/references/storefront/app-astro/layouts/SiteLayout.astro +21 -2
  33. package/skills/wix-headless-fast/references/storefront/seed/SEED.md +5 -1
  34. package/skills/wix-headless-fast/references/storefront/seed/seed-store.mjs +59 -6
  35. package/skills/wix-manage/SKILL.md +4 -1
  36. package/skills/wix-manage/references/events/create-wix-event.md +46 -0
  37. package/skills/wix-manage/references/events/manage-wix-events.md +51 -1
  38. package/skills/wix-manage/references/google-ads/manage-campaign-lifecycle.md +6 -6
  39. package/skills/wix-manage/references/seo/manage-seo-suggestions.md +351 -0
  40. package/skills/wix-vibe-headless/install/deploy.cjs +33 -2
  41. package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed-with-install.md +1 -1
  42. package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed.md +13 -4
  43. package/skills/wix-vibe-headless/platforms/base44-ecom-light.md +1 -1
  44. package/skills/wix-vibe-headless/platforms/base44.md +19 -4
  45. package/skills/wix-vibe-headless/platforms/generic.md +6 -0
  46. package/skills/wix-vibe-headless/references/_shared/nav/nav.tanstack.js +30 -0
  47. package/skills/wix-vibe-headless/references/_shared/routing.md +86 -0
  48. package/skills/wix-vibe-headless/references/blog/INSTRUCTIONS.md +44 -0
  49. package/skills/wix-vibe-headless/references/blog/app/components/PostCard.jsx +1 -1
  50. package/skills/wix-vibe-headless/references/blog/app/components/PostChips.jsx +1 -1
  51. package/skills/wix-vibe-headless/references/blog/app/pages/CategoryPage.jsx +1 -1
  52. package/skills/wix-vibe-headless/references/blog/app/pages/PostDetail.jsx +1 -1
  53. package/skills/wix-vibe-headless/references/blog/app/pages/TagPage.jsx +1 -1
  54. package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +42 -0
  55. package/skills/wix-vibe-headless/references/bookings/app/components/ServiceCard.jsx +1 -1
  56. package/skills/wix-vibe-headless/references/bookings/app/pages/ServiceDetail.jsx +1 -1
  57. package/skills/wix-vibe-headless/references/events/INSTRUCTIONS.md +42 -0
  58. package/skills/wix-vibe-headless/references/events/app/components/EventCard.jsx +1 -1
  59. package/skills/wix-vibe-headless/references/events/app/pages/EventDetail.jsx +1 -1
  60. package/skills/wix-vibe-headless/references/members/INSTRUCTIONS.md +42 -0
  61. package/skills/wix-vibe-headless/references/members/app/components/MemberMenu.jsx +1 -1
  62. package/skills/wix-vibe-headless/references/members/app/components/RequireAuth.jsx +1 -1
  63. package/skills/wix-vibe-headless/references/members/app/pages/Login.jsx +1 -1
  64. package/skills/wix-vibe-headless/references/portfolio/INSTRUCTIONS.md +43 -0
  65. package/skills/wix-vibe-headless/references/portfolio/app/components/CollectionCard.jsx +1 -1
  66. package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectCard.jsx +1 -1
  67. package/skills/wix-vibe-headless/references/portfolio/app/pages/CollectionPage.jsx +1 -1
  68. package/skills/wix-vibe-headless/references/portfolio/app/pages/ProjectDetail.jsx +1 -1
  69. package/skills/wix-vibe-headless/references/pricing-plans/INSTRUCTIONS.md +43 -0
  70. package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanCard.jsx +1 -1
  71. package/skills/wix-vibe-headless/references/pricing-plans/app/pages/PlanDetail.jsx +1 -1
  72. package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +36 -0
  73. package/skills/wix-vibe-headless/references/shared/app/lib/nav.js +9 -0
  74. package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +43 -2
  75. package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductCard.js +7 -1
@@ -107,6 +107,7 @@ export default function ProductCard({ product }) {
107
107
  promoBadge, // { type: 'ribbon', label } | null — the primary ribbon, for a single-badge slot
108
108
  priceDisplay, // the price the buyer pays (discounted when an automatic discount applies), or a min–max range
109
109
  compareAtDisplay, // struck "was" price | null — never beside a range (the PDP shows the real comparison)
110
+ teaser, // plain-text description for the tile — plainDescription is HTML; never render it raw on a card
110
111
  colors, // hex colour strings
111
112
  optionLabel, // e.g. "3 sizes · 2 materials", or ""
112
113
  isQuickAddable, // no product options and not sold out; does NOT check modifiers
@@ -265,7 +266,9 @@ The product-detail example above provides both groups:
265
266
  // Text modifier: d.setModifier(m.key, text)
266
267
  ```
267
268
  Retired option choices are filtered out. Respect each choice's `inStock` and modifier's
268
- `mandatory` flag; the hook supplies colour values and selection state without prescribing layout.
269
+ `mandatory` flag. A choice with `isColorSwatch` renders as a **color swatch** filled with its
270
+ `colorCode` and labelled by its name — not as a text pill; the hook supplies the values and selection
271
+ state without prescribing the rest of the layout.
269
272
 
270
273
  ### Images
271
274
  `useProductCard` returns normalized `image`/`hoverImage`, and `useProductDetail` returns normalized
@@ -341,13 +344,26 @@ currency; `convertedAmount` is in display currency. Format
341
344
  back to `USD`). Use `summary.priceSummary.subtotal` (after discounts) with `cart.subtotal` as the
342
345
  fallback while `summary` is null, a Discount row only when `priceSummary.discount` is above zero, and
343
346
  line `pricing.totalPrice`; never sum lines yourself. Shipping and tax resolve at checkout — say
344
- "calculated at checkout", never a hardcoded charge, threshold, or a made-up zero.
347
+ "calculated at checkout", never a hardcoded charge, threshold, or a made-up zero. The estimate's
348
+ `priceSummary.delivery`, `tax`, and `additionalFees` read `"0"` when nothing was calculated (verified
349
+ live), so a zero there is not "Free shipping" or "No tax" — don't render those rows from the estimate.
345
350
 
346
351
  Line `quantityInfo.confirmedQuantity` is the current quantity; `availableQuantity` caps increases
347
352
  when finite. `status` can be `IN_STOCK`, `PARTIALLY_IN_STOCK`, `OUT_OF_STOCK`, or
348
353
  `REMOVED_FROM_CATALOG`; surface unavailable lines and prevent checkout until resolved.
349
354
 
350
355
  ## Routes and provider
356
+
357
+ > **The template decides this step, and `src/routes/__root.jsx` is the question to ask first.**
358
+ > Present → TanStack Start, which mounts these pages as route files at the end of this step; absent
359
+ > → React Router, which the wiring below is written for. Ask in that order: an `src/App.jsx` can
360
+ > exist on a TanStack app because an agent created one, and `__root.jsx` is never there by mistake.
361
+ > The installed `src/lib/nav.js` defaults to the React Router adapter, so on TanStack swap it:
362
+ > [both patterns](../_shared/routing.md).
363
+ >
364
+ > **Import `Link`, `useParams` and friends from `@/lib/nav` in the pages you write too** — same
365
+ > names as the router exports, and nothing you write is pinned to one template.
366
+
351
367
  **No shipped source reads needed to wire this.** `CartDrawer` and `CartButton`
352
368
  are default exports that take **no props**. `CartProvider` is a named export accepting `children`;
353
369
  wire these exactly as shown below.
@@ -434,6 +450,31 @@ function Layout() {
434
450
  }
435
451
  ```
436
452
 
453
+
454
+ ### TanStack Start template — the same pages, mounted as files
455
+
456
+ Chrome (header, footer, the fixed banner region described above) goes in `src/routes/__root.jsx`
457
+ around its `<Outlet/>`, and any provider this vertical asks for wraps that `<Outlet/>` once. Each
458
+ route is a two-line file; shipped pages stay in `src/pages/` untouched.
459
+
460
+ | route | file | component |
461
+ |---|---|---|
462
+ | `/` | `src/routes/index.jsx` | `Home` |
463
+ | `/shop` | `src/routes/shop.jsx` | `Shop` |
464
+ | `/product/:slug` | `src/routes/product.$slug.jsx` | `ProductDetail` |
465
+
466
+ ```jsx
467
+ // src/routes/shop.jsx
468
+ import { createFileRoute } from "@tanstack/react-router";
469
+ import Shop from "@/pages/Shop";
470
+
471
+ export const Route = createFileRoute("/shop")({ component: Shop });
472
+ ```
473
+
474
+ Path params are `$name` in both the filename and the route path; `useParams()` from `@/lib/nav`
475
+ reads them unchanged. Full pattern, including `ssr: false` for per-user routes:
476
+ [`../_shared/routing.md`](../_shared/routing.md).
477
+
437
478
  ## What a complete storefront shows
438
479
 
439
480
  The wiring above is necessary, not sufficient. These are defaults for when the brief doesn't say
@@ -4,7 +4,7 @@
4
4
  // without touching the badge logic, price rules, or colour-dot extraction.
5
5
  //
6
6
  // Usage:
7
- // const { isSoldOut, leftBadges, ribbons, promoBadge, priceDisplay, compareAtDisplay,
7
+ // const { isSoldOut, leftBadges, ribbons, promoBadge, priceDisplay, compareAtDisplay, teaser,
8
8
  // colors, optionLabel, isQuickAddable, directAddVariantId, image, hoverImage } = useProductCard(product);
9
9
  // // then render however you want; quick-add: addToCart(product.id, directAddVariantId) from useCart().
10
10
 
@@ -73,6 +73,11 @@ export function useProductCard(product) {
73
73
  // The variant a direct add sends (a product with no options still has one variant).
74
74
  const directAddVariantId = isQuickAddable ? minVariant?.id ?? null : null;
75
75
 
76
+ // plainDescription is an HTML string despite its name (<p>…</p>). A card wants plain text:
77
+ // strip the tags and cut at a word boundary, so no tile ever prints a literal "<p>".
78
+ const text = (product?.plainDescription || "").replace(/<[^>]+>/g, " ").replace(/\s+/g, " ").trim();
79
+ const teaser = text.length > 140 ? `${text.slice(0, 140).replace(/\s+\S*$/, "")}…` : text;
80
+
76
81
  // Images: normalised through lib/storeImage so URLs are consistent across the tile,
77
82
  // the PDP gallery, and the cart. Hover image is the second gallery shot (if one exists).
78
83
  const image = productImage(product);
@@ -87,6 +92,7 @@ export function useProductCard(product) {
87
92
  promoBadge, // { type: 'ribbon', label } | null — the primary ribbon, for a single-badge slot
88
93
  priceDisplay, // formatted price the buyer pays, or a min–max range
89
94
  compareAtDisplay, // formatted struck "was" price | null (never beside a range)
95
+ teaser, // plain-text description for the tile (tags stripped, ~140 chars) — never render plainDescription raw on a card
90
96
  colors, // hex strings — render as dots; the tile shows up to however many you want
91
97
  optionLabel, // "3 sizes · 2 materials" or empty string
92
98
  isQuickAddable,