@wix/agent-skills 1.19.0 → 1.19.2

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 (80) hide show
  1. package/package.json +1 -1
  2. package/skills/wix-app/SKILL.md +33 -31
  3. package/skills/wix-app/references/DASHBOARD_PAGE.md +6 -10
  4. package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +17 -8
  5. package/skills/wix-app/references/WIX_PATTERNS_DOCS.md +53 -131
  6. package/skills/wix-app/references/dashboard-page/UX_SUCCESS_MODEL.md +1 -2
  7. package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +88 -73
  8. package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +46 -22
  9. package/skills/wix-app/references/editor-react-component/COMPONENT-CONTRACT.md +20 -6
  10. package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +9 -0
  11. package/skills/wix-app/references/editor-react-component/FUNCTION-HANDLERS.md +71 -31
  12. package/skills/wix-app/references/editor-react-component/PARTS.md +5 -2
  13. package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +4 -5
  14. package/skills/wix-app/scripts/pkg-root.cjs +73 -0
  15. package/skills/wix-app/scripts/scan-a11y-code.cjs +310 -40
  16. package/skills/wix-app/scripts/scan-a11y-eslint.cjs +118 -24
  17. package/skills/wix-app/scripts/scan-a11y-render.cjs +551 -0
  18. package/skills/wix-app/scripts/scan-a11y-review.cjs +373 -0
  19. package/skills/wix-base44-connector/SKILL.md +67 -43
  20. package/skills/wix-base44-connector/scripts/utils.cjs +39 -3
  21. package/skills/wix-docs/SKILL.md +47 -20
  22. package/skills/wix-headless/SKILL.md +1 -0
  23. package/skills/wix-headless/entry/bootstrap.mjs +106 -50
  24. package/skills/wix-headless/entry/skill.md +5 -3
  25. package/skills/wix-headless/references/CAPABILITIES.md +7 -2
  26. package/skills/wix-headless/references/SDK_HANDOFF.md +2 -1
  27. package/skills/wix-headless/references/inline-recipes/experience-store.md +48 -0
  28. package/skills/wix-headless/references/inline-recipes/how-to-code-a-store.md +350 -114
  29. package/skills/wix-headless/references/inline-recipes/how-to-code-members-astro.md +1 -1
  30. package/skills/wix-headless/references/managed/AUTHENTICATION.md +25 -5
  31. package/skills/wix-headless/references/managed/CREATE.md +5 -0
  32. package/skills/wix-headless-fast/SKILL.md +25 -7
  33. package/skills/wix-headless-fast/entry/skill.md +23 -14
  34. package/skills/wix-headless-fast/install/fast-path.mjs +48 -5
  35. package/skills/wix-headless-fast/install/pin-agents-md.mjs +57 -0
  36. package/skills/wix-headless-fast/references/shared/CUSTOM_OPERATIONS.md +3 -3
  37. package/skills/wix-headless-fast/references/storefront/INSTRUCTIONS.md +204 -35
  38. package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useShop.ts +146 -36
  39. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart-store.ts +8 -2
  40. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/catalog.ts +95 -20
  41. package/skills/wix-headless-fast/references/storefront/seed/SEED.md +21 -2
  42. package/skills/wix-headless-fast/references/storefront/seed/seed-store.mjs +104 -18
  43. package/skills/wix-manage/SKILL.md +16 -10
  44. package/skills/wix-manage/references/bookings/create-and-update-booking-services.md +4 -1
  45. package/skills/wix-manage/references/bookings/create-appointment-service.md +3 -1
  46. package/skills/wix-manage/references/bookings/create-class-service.md +3 -1
  47. package/skills/wix-manage/references/bookings/create-course-service.md +4 -2
  48. package/skills/wix-manage/references/bookings/end-to-end-booking-flow.md +68 -3
  49. package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-seasonal-promotion.md +1 -1
  50. package/skills/wix-manage/references/google-ads/billing-and-payment.md +3 -3
  51. package/skills/wix-manage/references/google-ads/create-performance-max-campaign.md +8 -8
  52. package/skills/wix-manage/references/google-ads/get-campaign-suggestions.md +4 -4
  53. package/skills/wix-manage/references/google-ads/google-ads-dashboard-navigation.md +1 -1
  54. package/skills/wix-manage/references/google-ads/install-and-create-account.md +9 -9
  55. package/skills/wix-manage/references/google-ads/manage-campaign-success-guide.md +108 -14
  56. package/skills/wix-manage/references/google-ads/query-campaign-analytics.md +7 -7
  57. package/skills/wix-manage/references/seo/manage-content-plan.md +182 -136
  58. package/skills/wix-manage/references/seo/manage-google-search-console.md +272 -0
  59. package/skills/wix-manage/references/sites/upload-static-site.md +283 -0
  60. package/skills/wix-manage/references/stores/change-store-currency.md +1 -1
  61. package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed-with-install.md +3 -1
  62. package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed.md +3 -1
  63. package/skills/wix-vibe-headless/platforms/base44-ecom-light.md +1 -1
  64. package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +69 -27
  65. package/skills/wix-vibe-headless/references/storefront/app/components/CartDrawer.jsx +32 -14
  66. package/skills/wix-vibe-headless/references/storefront/app/context/CartContext.jsx +14 -3
  67. package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductCard.js +41 -35
  68. package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductDetail.js +77 -30
  69. package/skills/wix-vibe-headless/references/storefront/app/rest/wix-store-cart.js +31 -2
  70. package/skills/wix-vibe-headless/references/storefront/app/rest/wix-store-catalog.js +31 -6
  71. package/skills/wix-app/references/dashboard-page/COLLECTION_TOOLKIT.md +0 -80
  72. package/skills/wix-app/references/dashboard-page/ENTITY_PAGE_TOOLKIT.md +0 -140
  73. package/skills/wix-app/references/dashboard-page/PATTERNS_BUNDLE_READING.md +0 -112
  74. package/skills/wix-headless-fast/references/storefront/app/components/storefront/ProductCard.tsx +0 -100
  75. package/skills/wix-headless-fast/references/storefront/app/components/storefront/ProductDetailView.tsx +0 -130
  76. package/skills/wix-headless-fast/references/storefront/app/components/storefront/ProductGrid.tsx +0 -48
  77. package/skills/wix-headless-fast/references/storefront/app/components/storefront/ShopView.tsx +0 -66
  78. package/skills/wix-headless-fast/references/storefront/app/components/storefront/VariantPicker.tsx +0 -103
  79. package/skills/wix-headless-fast/references/storefront/app-astro/pages/products/[slug].astro +0 -56
  80. package/skills/wix-headless-fast/references/storefront/app-astro/pages/shop.astro +0 -23
@@ -1,130 +0,0 @@
1
- // The full product detail surface: gallery, price, option/modifier picker, quantity,
2
- // add-to-cart — styled from the @theme tokens. Mount as-is (Astro: an island with the
3
- // server-fetched `initial` product; SPA: pass the `slug`). All selection→variant logic lives
4
- // in useProductDetail — never bypass it to add a product with options.
5
- import { useState } from "react";
6
- import { useProductDetail } from "../../hooks/storefront/useProductDetail";
7
- import VariantPicker from "./VariantPicker";
8
-
9
- export interface ProductDetailViewProps {
10
- /** Server-fetched product (Astro/Next SSR). */
11
- initial?: import("../../wix/storefront/types").ProductDetail | null;
12
- /** SPA alternative: fetch by slug on mount. */
13
- slug?: string;
14
- }
15
-
16
- export default function ProductDetailView({ initial, slug }: ProductDetailViewProps) {
17
- const {
18
- product,
19
- notFound,
20
- optionGroups,
21
- selectOption,
22
- modifierValues,
23
- setModifier,
24
- price,
25
- compareAtPrice,
26
- canAdd,
27
- quantity,
28
- setQuantity,
29
- add,
30
- adding,
31
- error,
32
- } = useProductDetail({ initial, slug });
33
- const [imageIndex, setImageIndex] = useState(0);
34
-
35
- if (notFound)
36
- return <p className="py-16 text-center text-muted-foreground">This product doesn't exist (anymore).</p>;
37
- if (!product) return <div className="aspect-square max-w-md animate-pulse rounded-xl bg-secondary" />;
38
-
39
- const soldOut = product.availability === "OUT_OF_STOCK" && !product.preorder;
40
- const mainImage = product.gallery[imageIndex] ?? product.imageUrl;
41
-
42
- return (
43
- <div className="grid gap-10 md:grid-cols-2">
44
- <div>
45
- <div className="aspect-square overflow-hidden rounded-xl bg-secondary">
46
- {mainImage && <img src={mainImage} alt={product.name} className="h-full w-full object-cover" />}
47
- </div>
48
- {product.gallery.length > 1 && (
49
- <div className="mt-3 flex flex-wrap gap-2">
50
- {product.gallery.map((url, i) => (
51
- <button
52
- key={url}
53
- type="button"
54
- aria-label={`Image ${i + 1}`}
55
- onClick={() => setImageIndex(i)}
56
- className={`h-16 w-16 overflow-hidden rounded-md border-2 transition-colors ${
57
- i === imageIndex ? "border-primary" : "border-transparent hover:border-border"
58
- }`}
59
- >
60
- <img src={url} alt="" className="h-full w-full object-cover" />
61
- </button>
62
- ))}
63
- </div>
64
- )}
65
- </div>
66
-
67
- <div>
68
- <h1 className="text-2xl font-semibold tracking-tight">{product.name}</h1>
69
- <p className="mt-2 flex items-baseline gap-3">
70
- <span className="text-xl font-medium">{price}</span>
71
- {compareAtPrice && <span className="text-base text-muted-foreground line-through">{compareAtPrice}</span>}
72
- </p>
73
- {soldOut && <p className="mt-2 text-sm font-medium text-red-600">Out of stock</p>}
74
- {product.preorder && <p className="mt-2 text-sm text-muted-foreground">Available for pre-order</p>}
75
-
76
- {product.descriptionHtml && (
77
- // plainDescription is HTML (despite the name) — render it, don't print it.
78
- <div
79
- className="mt-4 space-y-2 text-sm leading-relaxed text-muted-foreground [&_strong]:font-semibold [&_strong]:text-foreground"
80
- dangerouslySetInnerHTML={{ __html: product.descriptionHtml }}
81
- />
82
- )}
83
-
84
- <div className="mt-6">
85
- <VariantPicker
86
- optionGroups={optionGroups}
87
- selectOption={selectOption}
88
- modifiers={product.modifiers}
89
- modifierValues={modifierValues}
90
- setModifier={setModifier}
91
- />
92
- </div>
93
-
94
- {!soldOut && (
95
- <div className="mt-2 flex items-center gap-3">
96
- <div className="inline-flex items-center gap-3 rounded-full border border-border px-3 py-2">
97
- <button
98
- type="button"
99
- aria-label="Decrease quantity"
100
- disabled={quantity <= 1}
101
- onClick={() => setQuantity(quantity - 1)}
102
- className="px-1 text-base disabled:opacity-40"
103
- >
104
- −
105
- </button>
106
- <span className="text-sm tabular-nums">{quantity}</span>
107
- <button
108
- type="button"
109
- aria-label="Increase quantity"
110
- onClick={() => setQuantity(quantity + 1)}
111
- className="px-1 text-base"
112
- >
113
- +
114
- </button>
115
- </div>
116
- <button
117
- type="button"
118
- disabled={!canAdd || adding}
119
- onClick={() => add().catch(() => {})}
120
- className="rounded-full bg-primary px-8 py-3 text-sm font-semibold text-primary-foreground transition-opacity hover:opacity-90 disabled:opacity-50"
121
- >
122
- {adding ? "Adding…" : canAdd ? "Add to cart" : "Select options"}
123
- </button>
124
- </div>
125
- )}
126
- {error && <p className="mt-3 text-sm text-red-600">{error}</p>}
127
- </div>
128
- </div>
129
- );
130
- }
@@ -1,48 +0,0 @@
1
- // Listing grid with loading skeletons and an honest empty state — a REFERENCE layout on the
2
- // @theme tokens. Keep the states (they're correct); choosing a grid arrangement that fits the
3
- // brand is encouraged. Never mock products: empty catalog → the empty state.
4
- import type { ComponentType } from "react";
5
- import type { ProductSummary } from "../../wix/storefront/types";
6
- import ProductCard, { type ProductCardProps } from "./ProductCard";
7
-
8
- export interface ProductGridProps {
9
- /** null → loading skeletons; [] → the empty state. */
10
- products: ProductSummary[] | null;
11
- emptyMessage?: string;
12
- productHref?: ProductCardProps["productHref"];
13
- LinkComponent?: ProductCardProps["LinkComponent"];
14
- /** Swap in your own tile (built on ProductSummary) without re-doing the states. */
15
- CardComponent?: ComponentType<ProductCardProps>;
16
- }
17
-
18
- export default function ProductGrid({
19
- products,
20
- emptyMessage = "No products yet — check back soon.",
21
- productHref,
22
- LinkComponent,
23
- CardComponent = ProductCard,
24
- }: ProductGridProps) {
25
- if (products === null) {
26
- return (
27
- <div className="grid grid-cols-2 gap-x-5 gap-y-8 sm:grid-cols-3 lg:grid-cols-4" aria-busy="true">
28
- {Array.from({ length: 8 }, (_, i) => (
29
- <div key={i}>
30
- <div className="aspect-square animate-pulse rounded-lg bg-secondary" />
31
- <div className="mt-3 h-3.5 w-3/4 animate-pulse rounded bg-secondary" />
32
- <div className="mt-2 h-3.5 w-1/3 animate-pulse rounded bg-secondary" />
33
- </div>
34
- ))}
35
- </div>
36
- );
37
- }
38
- if (products.length === 0) {
39
- return <p className="py-16 text-center text-muted-foreground">{emptyMessage}</p>;
40
- }
41
- return (
42
- <div className="grid grid-cols-2 gap-x-5 gap-y-8 sm:grid-cols-3 lg:grid-cols-4">
43
- {products.map((p) => (
44
- <CardComponent key={p.id} product={p} productHref={productHref} LinkComponent={LinkComponent} />
45
- ))}
46
- </div>
47
- );
48
- }
@@ -1,66 +0,0 @@
1
- // The full shop surface: live category filter bar + product grid, styled from the @theme
2
- // tokens. Mount as-is (Astro: one island with server-fetched initial data; SPA: no props).
3
- import { useShop } from "../../hooks/storefront/useShop";
4
- import type { Category, ProductSummary } from "../../wix/storefront/types";
5
- import ProductGrid, { type ProductGridProps } from "./ProductGrid";
6
-
7
- export interface ShopViewProps {
8
- /** Server-fetched data (Astro/Next SSR) — omit in a SPA and it fetches client-side. */
9
- initialProducts?: ProductSummary[];
10
- initialCategories?: Category[];
11
- emptyMessage?: string;
12
- productHref?: ProductGridProps["productHref"];
13
- LinkComponent?: ProductGridProps["LinkComponent"];
14
- CardComponent?: ProductGridProps["CardComponent"];
15
- }
16
-
17
- const pill = (active: boolean) =>
18
- `rounded-full border px-4 py-1.5 text-sm font-medium transition-colors ${
19
- active
20
- ? "border-primary bg-primary text-primary-foreground"
21
- : "border-border text-foreground hover:bg-secondary"
22
- }`;
23
-
24
- export default function ShopView({
25
- initialProducts,
26
- initialCategories,
27
- emptyMessage,
28
- productHref,
29
- LinkComponent,
30
- CardComponent,
31
- }: ShopViewProps) {
32
- const { products, categories, activeCategoryId, setActiveCategoryId, loading, error } = useShop({
33
- initialProducts,
34
- initialCategories,
35
- });
36
-
37
- return (
38
- <div>
39
- {categories.length > 1 && (
40
- <div className="mb-8 flex flex-wrap gap-2" role="group" aria-label="Categories">
41
- <button type="button" className={pill(activeCategoryId === null)} onClick={() => setActiveCategoryId(null)}>
42
- All
43
- </button>
44
- {categories.map((c) => (
45
- <button
46
- key={c.id}
47
- type="button"
48
- className={pill(activeCategoryId === c.id)}
49
- onClick={() => setActiveCategoryId(c.id)}
50
- >
51
- {c.name}
52
- </button>
53
- ))}
54
- </div>
55
- )}
56
- {error && <p className="mb-4 text-sm text-red-600">{error}</p>}
57
- <ProductGrid
58
- products={loading ? null : products}
59
- emptyMessage={emptyMessage}
60
- productHref={productHref}
61
- LinkComponent={LinkComponent}
62
- CardComponent={CardComponent}
63
- />
64
- </div>
65
- );
66
- }
@@ -1,103 +0,0 @@
1
- // Option/modifier selector — wire as-is on the PDP (color options render as swatches, text
2
- // options as pills, modifiers as pills or a text input). Styled from the @theme tokens.
3
- import type { ProductModifier } from "../../wix/storefront/types";
4
- import type { OptionGroupView } from "../../hooks/storefront/useProductDetail";
5
-
6
- export interface VariantPickerProps {
7
- optionGroups: OptionGroupView[];
8
- selectOption: (optionName: string, choiceName: string) => void;
9
- modifiers?: ProductModifier[];
10
- modifierValues?: Record<string, string>;
11
- setModifier?: (key: string, value: string) => void;
12
- }
13
-
14
- const chip = (selected: boolean) =>
15
- `rounded-full border px-4 py-1.5 text-sm transition-colors disabled:cursor-not-allowed disabled:opacity-40 disabled:line-through ${
16
- selected
17
- ? "border-primary bg-primary text-primary-foreground"
18
- : "border-border text-foreground hover:bg-secondary"
19
- }`;
20
-
21
- export default function VariantPicker({
22
- optionGroups,
23
- selectOption,
24
- modifiers = [],
25
- modifierValues = {},
26
- setModifier,
27
- }: VariantPickerProps) {
28
- return (
29
- <div>
30
- {optionGroups.map((group) => (
31
- <div className="mb-5" key={group.id || group.name}>
32
- <p className="mb-2 text-xs font-semibold uppercase tracking-wider text-muted-foreground">
33
- {group.name}
34
- </p>
35
- <div className="flex flex-wrap items-center gap-2">
36
- {group.choices.map((choice) =>
37
- group.isColor && choice.colorCode ? (
38
- <button
39
- key={choice.choiceId || choice.name}
40
- type="button"
41
- style={{ background: choice.colorCode }}
42
- title={choice.name}
43
- aria-label={`${group.name}: ${choice.name}`}
44
- aria-pressed={choice.selected}
45
- disabled={!choice.inStock}
46
- onClick={() => selectOption(group.name, choice.name)}
47
- className={`h-8 w-8 rounded-full border transition-shadow disabled:cursor-not-allowed disabled:opacity-35 ${
48
- choice.selected
49
- ? "border-primary ring-2 ring-primary ring-offset-2 ring-offset-background"
50
- : "border-border"
51
- }`}
52
- />
53
- ) : (
54
- <button
55
- key={choice.choiceId || choice.name}
56
- type="button"
57
- aria-pressed={choice.selected}
58
- disabled={!choice.inStock}
59
- onClick={() => selectOption(group.name, choice.name)}
60
- className={chip(choice.selected)}
61
- >
62
- {choice.name}
63
- </button>
64
- ),
65
- )}
66
- </div>
67
- </div>
68
- ))}
69
-
70
- {modifiers.map((m) => (
71
- <div className="mb-5" key={m.key}>
72
- <p className="mb-2 text-xs font-semibold uppercase tracking-wider text-muted-foreground">
73
- {m.name}
74
- {m.mandatory ? " *" : ""}
75
- </p>
76
- {m.type === "text" ? (
77
- <input
78
- type="text"
79
- value={modifierValues[m.key] ?? ""}
80
- onChange={(e) => setModifier?.(m.key, e.target.value)}
81
- aria-label={m.name}
82
- className="w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground outline-none transition-shadow focus:ring-2 focus:ring-primary"
83
- />
84
- ) : (
85
- <div className="flex flex-wrap gap-2">
86
- {m.choices.map((c) => (
87
- <button
88
- key={c.key}
89
- type="button"
90
- aria-pressed={modifierValues[m.key] === c.key}
91
- onClick={() => setModifier?.(m.key, c.key)}
92
- className={chip(modifierValues[m.key] === c.key)}
93
- >
94
- {c.name}
95
- </button>
96
- ))}
97
- </div>
98
- )}
99
- </div>
100
- ))}
101
- </div>
102
- );
103
- }
@@ -1,56 +0,0 @@
1
- ---
2
- // Product detail page — wire as-is; theme via SiteLayout's tokens.
3
- //
4
- // This is a Wix ITEM PAGE: the wixMetadata export + <SEO.Tags> below are what let the site
5
- // owner edit this page's title/description/OG in the dashboard, and register the route in
6
- // the sitemap. Keep all three SEO pieces when editing this file.
7
- import SiteLayout from "../../layouts/SiteLayout.astro";
8
- import ProductDetailView from "../../components/storefront/ProductDetailView";
9
- import { fetchProductBySlug } from "../../wix/storefront/catalog";
10
- import { WIX_APPS } from "@wix/essentials";
11
- import { SEO } from "@wix/seo/components";
12
- import { loadSEOTagsServiceConfig } from "@wix/seo/services";
13
- import { seoTags } from "@wix/seo";
14
-
15
- export const wixMetadata = {
16
- appDefId: WIX_APPS.checkoutAndOrders.id,
17
- pageIdentifier: WIX_APPS.checkoutAndOrders.productPageMetadata.pageIdentifier,
18
- identifiers: {
19
- slug: WIX_APPS.checkoutAndOrders.productPageMetadata.identifiers.handle,
20
- },
21
- };
22
-
23
- const slug = Astro.params.slug!;
24
-
25
- // Behind Wix's proxy the request URL is the internal one — the real public page URL
26
- // arrives on x-wix-forwarded-url. The SEO service needs the public URL.
27
- const forwardedUrl = Astro.request.headers.get("x-wix-forwarded-url");
28
- const pageUrl =
29
- forwardedUrl && URL.canParse(forwardedUrl) && /^https?:$/.test(new URL(forwardedUrl).protocol)
30
- ? forwardedUrl
31
- : Astro.url.href;
32
-
33
- let product = null;
34
- let seoTagsServiceConfig = null;
35
- try {
36
- [product, seoTagsServiceConfig] = await Promise.all([
37
- fetchProductBySlug(slug),
38
- loadSEOTagsServiceConfig({
39
- pageUrl,
40
- itemType: seoTags.ItemType.STORES_PRODUCT,
41
- itemData: { slug },
42
- }),
43
- ]);
44
- } catch {
45
- // Guarded: an unhandled SSR throw truncates the response mid-stream.
46
- }
47
-
48
- if (!product) {
49
- return new Response(null, { status: 404 });
50
- }
51
- ---
52
-
53
- <SiteLayout title={product.name}>
54
- <SEO.Tags seoTagsServiceConfig={seoTagsServiceConfig} slot="seo-tags" />
55
- <ProductDetailView client:load initial={product} />
56
- </SiteLayout>
@@ -1,23 +0,0 @@
1
- ---
2
- // Shop listing — products and categories are fetched SERVER-SIDE (SEO) and handed to the
3
- // island as serialized DTO props; category switches then filter live on the client.
4
- // Wire as-is; theme via SiteLayout's tokens.
5
- import SiteLayout from "../layouts/SiteLayout.astro";
6
- import ShopView from "../components/storefront/ShopView";
7
- import { fetchProducts, fetchCategories } from "../wix/storefront/catalog";
8
- import type { Category, ProductSummary } from "../wix/storefront/types";
9
-
10
- let products: ProductSummary[] = [];
11
- let categories: Category[] = [];
12
- try {
13
- [products, categories] = await Promise.all([fetchProducts(), fetchCategories()]);
14
- } catch {
15
- // An unguarded SSR throw truncates the response mid-stream; the island renders the
16
- // shipped empty state instead.
17
- }
18
- ---
19
-
20
- <SiteLayout title="Shop">
21
- <h1 class="mb-8 text-2xl font-semibold tracking-tight">Shop</h1>
22
- <ShopView client:load initialProducts={products} initialCategories={categories} />
23
- </SiteLayout>