create-brainerce-store 1.28.13 → 1.28.15

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/dist/index.js CHANGED
@@ -31,7 +31,7 @@ var require_package = __commonJS({
31
31
  "package.json"(exports2, module2) {
32
32
  module2.exports = {
33
33
  name: "create-brainerce-store",
34
- version: "1.28.13",
34
+ version: "1.28.15",
35
35
  description: "Scaffold a production-ready e-commerce storefront connected to Brainerce",
36
36
  bin: {
37
37
  "create-brainerce-store": "dist/index.js"
package/messages/en.json CHANGED
@@ -94,7 +94,8 @@
94
94
  "frequentlyBoughtTogether": "Frequently Bought Together",
95
95
  "addSelectedToCart": "Add Selected to Cart",
96
96
  "totalPrice": "Total: {price}",
97
- "addingAll": "Adding..."
97
+ "addingAll": "Adding...",
98
+ "by": "By"
98
99
  },
99
100
  "cart": {
100
101
  "pageTitle": "Shopping Cart",
package/messages/he.json CHANGED
@@ -94,7 +94,8 @@
94
94
  "frequentlyBoughtTogether": "לקוחות קנו גם",
95
95
  "addSelectedToCart": "הוסף הנבחרים לעגלה",
96
96
  "totalPrice": "סה\"כ: {price}",
97
- "addingAll": "מוסיף..."
97
+ "addingAll": "מוסיף...",
98
+ "by": "מאת"
98
99
  },
99
100
  "cart": {
100
101
  "pageTitle": "עגלת קניות",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-brainerce-store",
3
- "version": "1.28.13",
3
+ "version": "1.28.15",
4
4
  "description": "Scaffold a production-ready e-commerce storefront connected to Brainerce",
5
5
  "bin": {
6
6
  "create-brainerce-store": "dist/index.js"
@@ -23,24 +23,30 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
23
23
  const client = getServerClient();
24
24
  const product = await client.getProductBySlug(slug, { locale });
25
25
  const imageUrl = product.images?.[0]?.url;
26
- const description = product.description?.substring(0, 160) || product.name;
26
+ // Prefer merchant-authored SEO copy; fall back to the visible name/description.
27
+ // Both are served already locale-resolved by the backend.
28
+ const seoTitle = (product as { seoTitle?: string | null }).seoTitle || product.name;
29
+ const seoDescription =
30
+ (product as { seoDescription?: string | null }).seoDescription ||
31
+ product.description?.substring(0, 160) ||
32
+ product.name;
27
33
 
28
34
  return {
29
- title: product.name,
30
- description,
35
+ title: seoTitle,
36
+ description: seoDescription,
31
37
  alternates: {
32
38
  canonical: `/products/${slug}`,
33
39
  },
34
40
  openGraph: {
35
- title: product.name,
36
- description,
41
+ title: seoTitle,
42
+ description: seoDescription,
37
43
  images: imageUrl ? [{ url: imageUrl, alt: product.name }] : [],
38
44
  type: 'website',
39
45
  },
40
46
  twitter: {
41
47
  card: 'summary_large_image',
42
- title: product.name,
43
- description,
48
+ title: seoTitle,
49
+ description: seoDescription,
44
50
  images: imageUrl ? [imageUrl] : [],
45
51
  },
46
52
  };
@@ -297,9 +297,37 @@ export function ProductClientSection({ product: initialProduct }: ProductClientS
297
297
  </div>
298
298
  )}
299
299
 
300
+ {/* Brand */}
301
+ {(product as { brands?: Array<{ id: string; name: string }> }).brands &&
302
+ (product as { brands: Array<{ id: string; name: string }> }).brands.length > 0 && (
303
+ <div className="text-muted-foreground text-sm">
304
+ {t('by')}{' '}
305
+ <span className="text-foreground font-medium">
306
+ {(product as { brands: Array<{ id: string; name: string }> }).brands
307
+ .map((b) => b.name)
308
+ .join(', ')}
309
+ </span>
310
+ </div>
311
+ )}
312
+
300
313
  {/* Title */}
301
314
  <h1 className="text-foreground text-2xl font-bold sm:text-3xl">{product.name}</h1>
302
315
 
316
+ {/* Tags */}
317
+ {(product as { tags?: Array<{ id: string; name: string }> }).tags &&
318
+ (product as { tags: Array<{ id: string; name: string }> }).tags.length > 0 && (
319
+ <div className="flex flex-wrap gap-1.5">
320
+ {(product as { tags: Array<{ id: string; name: string }> }).tags.map((tag) => (
321
+ <span
322
+ key={tag.id}
323
+ className="border-border text-muted-foreground rounded-full border px-2.5 py-0.5 text-xs"
324
+ >
325
+ #{tag.name}
326
+ </span>
327
+ ))}
328
+ </div>
329
+ )}
330
+
303
331
  {/* Price */}
304
332
  <PriceDisplay
305
333
  price={priceInfo.originalPrice}