@burdenoff/website-sdk 2026.716.2 → 2026.716.3
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.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +141 -693
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +141 -693
- package/dist/index.mjs.map +1 -1
- package/dist/store/index.d.mts +154 -27
- package/dist/store/index.d.ts +154 -27
- package/dist/store/index.js +284 -837
- package/dist/store/index.js.map +1 -1
- package/dist/store/index.mjs +286 -838
- package/dist/store/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/product-card-Dm1zkFkm.d.mts +0 -157
- package/dist/product-card-Dm1zkFkm.d.ts +0 -157
package/dist/index.mjs
CHANGED
|
@@ -6240,11 +6240,7 @@ function TypeBadge({ type }) {
|
|
|
6240
6240
|
return /* @__PURE__ */ jsx("span", { className: "inline-block text-xs px-2 py-0.5 rounded-full bg-primary/10 text-primary font-medium", children: labels[type] ?? type });
|
|
6241
6241
|
}
|
|
6242
6242
|
function ProductCard({ product, onClick, href }) {
|
|
6243
|
-
const priceLabel = formatPrice2(
|
|
6244
|
-
product.price,
|
|
6245
|
-
product.currency,
|
|
6246
|
-
product.pricingModel
|
|
6247
|
-
);
|
|
6243
|
+
const priceLabel = formatPrice2(product.price, product.currency, product.pricingModel);
|
|
6248
6244
|
const inner = /* @__PURE__ */ jsxs("div", { className: "group bg-card border border-border rounded-xl p-4 flex flex-col gap-3 transition-all duration-200 hover:shadow-md hover:border-primary/30 cursor-pointer h-full", children: [
|
|
6249
6245
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-2", children: [
|
|
6250
6246
|
/* @__PURE__ */ jsx("div", { className: "w-12 h-12 rounded-lg bg-muted flex-shrink-0 overflow-hidden", children: product.icon ? /* @__PURE__ */ jsx(
|
|
@@ -6255,48 +6251,11 @@ function ProductCard({ product, onClick, href }) {
|
|
|
6255
6251
|
"aria-hidden": "true",
|
|
6256
6252
|
className: "w-full h-full object-cover"
|
|
6257
6253
|
}
|
|
6258
|
-
) : /* @__PURE__ */ jsx("div", { className: "w-full h-full flex items-center justify-center bg-gradient-to-br from-primary/15 to-primary/5", children: /* @__PURE__ */ jsxs(
|
|
6259
|
-
"
|
|
6260
|
-
{
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
fill: "none",
|
|
6264
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
6265
|
-
"aria-hidden": "true",
|
|
6266
|
-
children: [
|
|
6267
|
-
/* @__PURE__ */ jsx(
|
|
6268
|
-
"polygon",
|
|
6269
|
-
{
|
|
6270
|
-
points: "16,4 28,10 16,16 4,10",
|
|
6271
|
-
className: "fill-primary/30",
|
|
6272
|
-
stroke: "currentColor",
|
|
6273
|
-
strokeWidth: "0.6",
|
|
6274
|
-
strokeOpacity: "0.35"
|
|
6275
|
-
}
|
|
6276
|
-
),
|
|
6277
|
-
/* @__PURE__ */ jsx(
|
|
6278
|
-
"polygon",
|
|
6279
|
-
{
|
|
6280
|
-
points: "4,10 16,16 16,28 4,22",
|
|
6281
|
-
className: "fill-primary/15",
|
|
6282
|
-
stroke: "currentColor",
|
|
6283
|
-
strokeWidth: "0.6",
|
|
6284
|
-
strokeOpacity: "0.35"
|
|
6285
|
-
}
|
|
6286
|
-
),
|
|
6287
|
-
/* @__PURE__ */ jsx(
|
|
6288
|
-
"polygon",
|
|
6289
|
-
{
|
|
6290
|
-
points: "28,10 16,16 16,28 28,22",
|
|
6291
|
-
className: "fill-primary/20",
|
|
6292
|
-
stroke: "currentColor",
|
|
6293
|
-
strokeWidth: "0.6",
|
|
6294
|
-
strokeOpacity: "0.35"
|
|
6295
|
-
}
|
|
6296
|
-
)
|
|
6297
|
-
]
|
|
6298
|
-
}
|
|
6299
|
-
) }) }),
|
|
6254
|
+
) : /* @__PURE__ */ jsx("div", { className: "w-full h-full flex items-center justify-center bg-gradient-to-br from-primary/15 to-primary/5", children: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 32 32", className: "w-8 h-8", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [
|
|
6255
|
+
/* @__PURE__ */ jsx("polygon", { points: "16,4 28,10 16,16 4,10", className: "fill-primary/30", stroke: "currentColor", strokeWidth: "0.6", strokeOpacity: "0.35" }),
|
|
6256
|
+
/* @__PURE__ */ jsx("polygon", { points: "4,10 16,16 16,28 4,22", className: "fill-primary/15", stroke: "currentColor", strokeWidth: "0.6", strokeOpacity: "0.35" }),
|
|
6257
|
+
/* @__PURE__ */ jsx("polygon", { points: "28,10 16,16 16,28 28,22", className: "fill-primary/20", stroke: "currentColor", strokeWidth: "0.6", strokeOpacity: "0.35" })
|
|
6258
|
+
] }) }) }),
|
|
6300
6259
|
/* @__PURE__ */ jsx(TypeBadge, { type: product.type })
|
|
6301
6260
|
] }),
|
|
6302
6261
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
@@ -6405,11 +6364,7 @@ function FeaturedHeroCard({
|
|
|
6405
6364
|
product,
|
|
6406
6365
|
onNavigate
|
|
6407
6366
|
}) {
|
|
6408
|
-
const priceLabel = formatPrice2(
|
|
6409
|
-
product.price,
|
|
6410
|
-
product.currency,
|
|
6411
|
-
product.pricingModel
|
|
6412
|
-
);
|
|
6367
|
+
const priceLabel = formatPrice2(product.price, product.currency, product.pricingModel);
|
|
6413
6368
|
return /* @__PURE__ */ jsxs(
|
|
6414
6369
|
"button",
|
|
6415
6370
|
{
|
|
@@ -6418,155 +6373,28 @@ function FeaturedHeroCard({
|
|
|
6418
6373
|
className: "group w-full text-left h-full rounded-2xl border border-border bg-card overflow-hidden hover:border-primary/40 transition-all duration-300 hover:shadow-xl hover:shadow-primary/10 flex flex-col",
|
|
6419
6374
|
children: [
|
|
6420
6375
|
/* @__PURE__ */ jsxs("div", { className: "relative h-44 sm:h-52 bg-gradient-to-br from-primary/20 via-primary/8 to-background overflow-hidden flex-shrink-0", children: [
|
|
6421
|
-
product.bannerUrl ? /* @__PURE__ */ jsx(
|
|
6422
|
-
"
|
|
6423
|
-
|
|
6424
|
-
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
className: "
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
|
-
|
|
6431
|
-
"svg",
|
|
6432
|
-
{
|
|
6433
|
-
className: "absolute inset-0 w-full h-full opacity-[0.07]",
|
|
6434
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
6435
|
-
"aria-hidden": "true",
|
|
6436
|
-
children: [
|
|
6437
|
-
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx(
|
|
6438
|
-
"pattern",
|
|
6439
|
-
{
|
|
6440
|
-
id: "fg-hero-grid",
|
|
6441
|
-
width: "36",
|
|
6442
|
-
height: "36",
|
|
6443
|
-
patternUnits: "userSpaceOnUse",
|
|
6444
|
-
children: /* @__PURE__ */ jsx(
|
|
6445
|
-
"path",
|
|
6446
|
-
{
|
|
6447
|
-
d: "M 36 0 L 0 0 0 36",
|
|
6448
|
-
fill: "none",
|
|
6449
|
-
stroke: "currentColor",
|
|
6450
|
-
strokeWidth: "1"
|
|
6451
|
-
}
|
|
6452
|
-
)
|
|
6453
|
-
}
|
|
6454
|
-
) }),
|
|
6455
|
-
/* @__PURE__ */ jsx("rect", { width: "100%", height: "100%", fill: "url(#fg-hero-grid)" })
|
|
6456
|
-
]
|
|
6457
|
-
}
|
|
6458
|
-
),
|
|
6459
|
-
/* @__PURE__ */ jsx(
|
|
6460
|
-
"div",
|
|
6461
|
-
{
|
|
6462
|
-
className: "absolute inset-0 flex items-center justify-center",
|
|
6463
|
-
"aria-hidden": "true",
|
|
6464
|
-
children: /* @__PURE__ */ jsxs(
|
|
6465
|
-
"svg",
|
|
6466
|
-
{
|
|
6467
|
-
viewBox: "0 0 64 64",
|
|
6468
|
-
className: "w-20 h-20 opacity-25",
|
|
6469
|
-
fill: "none",
|
|
6470
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
6471
|
-
children: [
|
|
6472
|
-
/* @__PURE__ */ jsx(
|
|
6473
|
-
"polygon",
|
|
6474
|
-
{
|
|
6475
|
-
points: "32,8 56,20 32,32 8,20",
|
|
6476
|
-
className: "fill-primary/40",
|
|
6477
|
-
stroke: "currentColor",
|
|
6478
|
-
strokeWidth: "1",
|
|
6479
|
-
strokeOpacity: "0.5"
|
|
6480
|
-
}
|
|
6481
|
-
),
|
|
6482
|
-
/* @__PURE__ */ jsx(
|
|
6483
|
-
"polygon",
|
|
6484
|
-
{
|
|
6485
|
-
points: "8,20 32,32 32,56 8,44",
|
|
6486
|
-
className: "fill-primary/20",
|
|
6487
|
-
stroke: "currentColor",
|
|
6488
|
-
strokeWidth: "1",
|
|
6489
|
-
strokeOpacity: "0.5"
|
|
6490
|
-
}
|
|
6491
|
-
),
|
|
6492
|
-
/* @__PURE__ */ jsx(
|
|
6493
|
-
"polygon",
|
|
6494
|
-
{
|
|
6495
|
-
points: "56,20 32,32 32,56 56,44",
|
|
6496
|
-
className: "fill-primary/30",
|
|
6497
|
-
stroke: "currentColor",
|
|
6498
|
-
strokeWidth: "1",
|
|
6499
|
-
strokeOpacity: "0.5"
|
|
6500
|
-
}
|
|
6501
|
-
)
|
|
6502
|
-
]
|
|
6503
|
-
}
|
|
6504
|
-
)
|
|
6505
|
-
}
|
|
6506
|
-
)
|
|
6376
|
+
product.bannerUrl ? /* @__PURE__ */ jsx("img", { src: product.bannerUrl, alt: "", "aria-hidden": "true", className: "w-full h-full object-cover" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6377
|
+
/* @__PURE__ */ jsxs("svg", { className: "absolute inset-0 w-full h-full opacity-[0.07]", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [
|
|
6378
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("pattern", { id: "fg-hero-grid", width: "36", height: "36", patternUnits: "userSpaceOnUse", children: /* @__PURE__ */ jsx("path", { d: "M 36 0 L 0 0 0 36", fill: "none", stroke: "currentColor", strokeWidth: "1" }) }) }),
|
|
6379
|
+
/* @__PURE__ */ jsx("rect", { width: "100%", height: "100%", fill: "url(#fg-hero-grid)" })
|
|
6380
|
+
] }),
|
|
6381
|
+
/* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center", "aria-hidden": "true", children: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 64 64", className: "w-20 h-20 opacity-25", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
6382
|
+
/* @__PURE__ */ jsx("polygon", { points: "32,8 56,20 32,32 8,20", className: "fill-primary/40", stroke: "currentColor", strokeWidth: "1", strokeOpacity: "0.5" }),
|
|
6383
|
+
/* @__PURE__ */ jsx("polygon", { points: "8,20 32,32 32,56 8,44", className: "fill-primary/20", stroke: "currentColor", strokeWidth: "1", strokeOpacity: "0.5" }),
|
|
6384
|
+
/* @__PURE__ */ jsx("polygon", { points: "56,20 32,32 32,56 56,44", className: "fill-primary/30", stroke: "currentColor", strokeWidth: "1", strokeOpacity: "0.5" })
|
|
6385
|
+
] }) })
|
|
6507
6386
|
] }),
|
|
6508
6387
|
/* @__PURE__ */ jsx("span", { className: "absolute top-3 left-3 text-xs font-semibold px-2.5 py-1 rounded-full bg-primary text-primary-foreground shadow-sm", children: "Featured" }),
|
|
6509
|
-
/* @__PURE__ */ jsx("div", { className: "absolute bottom-4 left-4 w-14 h-14 rounded-xl shadow-lg overflow-hidden border-2 border-background", children: product.icon ? /* @__PURE__ */ jsx(
|
|
6510
|
-
"
|
|
6511
|
-
{
|
|
6512
|
-
|
|
6513
|
-
|
|
6514
|
-
"aria-hidden": "true",
|
|
6515
|
-
className: "w-full h-full object-cover"
|
|
6516
|
-
}
|
|
6517
|
-
) : /* @__PURE__ */ jsx("div", { className: "w-full h-full bg-gradient-to-br from-primary/25 to-primary/10 flex items-center justify-center", children: /* @__PURE__ */ jsxs(
|
|
6518
|
-
"svg",
|
|
6519
|
-
{
|
|
6520
|
-
viewBox: "0 0 32 32",
|
|
6521
|
-
className: "w-8 h-8",
|
|
6522
|
-
fill: "none",
|
|
6523
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
6524
|
-
"aria-hidden": "true",
|
|
6525
|
-
children: [
|
|
6526
|
-
/* @__PURE__ */ jsx(
|
|
6527
|
-
"polygon",
|
|
6528
|
-
{
|
|
6529
|
-
points: "16,4 28,10 16,16 4,10",
|
|
6530
|
-
className: "fill-primary/40",
|
|
6531
|
-
stroke: "currentColor",
|
|
6532
|
-
strokeWidth: "0.6",
|
|
6533
|
-
strokeOpacity: "0.4"
|
|
6534
|
-
}
|
|
6535
|
-
),
|
|
6536
|
-
/* @__PURE__ */ jsx(
|
|
6537
|
-
"polygon",
|
|
6538
|
-
{
|
|
6539
|
-
points: "4,10 16,16 16,28 4,22",
|
|
6540
|
-
className: "fill-primary/20",
|
|
6541
|
-
stroke: "currentColor",
|
|
6542
|
-
strokeWidth: "0.6",
|
|
6543
|
-
strokeOpacity: "0.4"
|
|
6544
|
-
}
|
|
6545
|
-
),
|
|
6546
|
-
/* @__PURE__ */ jsx(
|
|
6547
|
-
"polygon",
|
|
6548
|
-
{
|
|
6549
|
-
points: "28,10 16,16 16,28 28,22",
|
|
6550
|
-
className: "fill-primary/30",
|
|
6551
|
-
stroke: "currentColor",
|
|
6552
|
-
strokeWidth: "0.6",
|
|
6553
|
-
strokeOpacity: "0.4"
|
|
6554
|
-
}
|
|
6555
|
-
)
|
|
6556
|
-
]
|
|
6557
|
-
}
|
|
6558
|
-
) }) })
|
|
6388
|
+
/* @__PURE__ */ jsx("div", { className: "absolute bottom-4 left-4 w-14 h-14 rounded-xl shadow-lg overflow-hidden border-2 border-background", children: product.icon ? /* @__PURE__ */ jsx("img", { src: product.icon, alt: "", "aria-hidden": "true", className: "w-full h-full object-cover" }) : /* @__PURE__ */ jsx("div", { className: "w-full h-full bg-gradient-to-br from-primary/25 to-primary/10 flex items-center justify-center", children: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 32 32", className: "w-8 h-8", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [
|
|
6389
|
+
/* @__PURE__ */ jsx("polygon", { points: "16,4 28,10 16,16 4,10", className: "fill-primary/40", stroke: "currentColor", strokeWidth: "0.6", strokeOpacity: "0.4" }),
|
|
6390
|
+
/* @__PURE__ */ jsx("polygon", { points: "4,10 16,16 16,28 4,22", className: "fill-primary/20", stroke: "currentColor", strokeWidth: "0.6", strokeOpacity: "0.4" }),
|
|
6391
|
+
/* @__PURE__ */ jsx("polygon", { points: "28,10 16,16 16,28 28,22", className: "fill-primary/30", stroke: "currentColor", strokeWidth: "0.6", strokeOpacity: "0.4" })
|
|
6392
|
+
] }) }) })
|
|
6559
6393
|
] }),
|
|
6560
6394
|
/* @__PURE__ */ jsxs("div", { className: "p-5 flex flex-col flex-1", children: [
|
|
6561
6395
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-3 mb-2", children: [
|
|
6562
6396
|
/* @__PURE__ */ jsx("h3", { className: "text-base font-bold text-foreground group-hover:text-primary transition-colors line-clamp-1", children: product.name }),
|
|
6563
|
-
/* @__PURE__ */ jsx(
|
|
6564
|
-
"span",
|
|
6565
|
-
{
|
|
6566
|
-
className: `text-sm font-bold flex-shrink-0 ${priceLabel === "Free" ? "text-emerald-500" : "text-foreground"}`,
|
|
6567
|
-
children: priceLabel
|
|
6568
|
-
}
|
|
6569
|
-
)
|
|
6397
|
+
/* @__PURE__ */ jsx("span", { className: `text-sm font-bold flex-shrink-0 ${priceLabel === "Free" ? "text-emerald-500" : "text-foreground"}`, children: priceLabel })
|
|
6570
6398
|
] }),
|
|
6571
6399
|
product.description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground line-clamp-2 leading-relaxed flex-1", children: product.description }),
|
|
6572
6400
|
/* @__PURE__ */ jsxs("div", { className: "mt-3 flex items-center gap-2", children: [
|
|
@@ -6587,10 +6415,7 @@ function ScrollRow({
|
|
|
6587
6415
|
}) {
|
|
6588
6416
|
const ref = useRef(null);
|
|
6589
6417
|
function scroll(dir) {
|
|
6590
|
-
ref.current?.scrollBy({
|
|
6591
|
-
left: dir === "r" ? 272 : -272,
|
|
6592
|
-
behavior: "smooth"
|
|
6593
|
-
});
|
|
6418
|
+
ref.current?.scrollBy({ left: dir === "r" ? 272 : -272, behavior: "smooth" });
|
|
6594
6419
|
}
|
|
6595
6420
|
return /* @__PURE__ */ jsxs("div", { className: "relative group/row", children: [
|
|
6596
6421
|
/* @__PURE__ */ jsx(
|
|
@@ -6600,19 +6425,7 @@ function ScrollRow({
|
|
|
6600
6425
|
onClick: () => scroll("l"),
|
|
6601
6426
|
"aria-label": "Scroll left",
|
|
6602
6427
|
className: "absolute left-0 top-1/2 -translate-y-1/2 -translate-x-4 z-10 w-8 h-8 rounded-full bg-background border border-border shadow-md items-center justify-center text-muted-foreground hover:text-primary hover:border-primary/40 transition-all hidden sm:flex opacity-0 group-hover/row:opacity-100",
|
|
6603
|
-
children: /* @__PURE__ */ jsx(
|
|
6604
|
-
"svg",
|
|
6605
|
-
{
|
|
6606
|
-
viewBox: "0 0 16 16",
|
|
6607
|
-
className: "w-4 h-4",
|
|
6608
|
-
fill: "none",
|
|
6609
|
-
stroke: "currentColor",
|
|
6610
|
-
strokeWidth: "1.5",
|
|
6611
|
-
strokeLinecap: "round",
|
|
6612
|
-
strokeLinejoin: "round",
|
|
6613
|
-
children: /* @__PURE__ */ jsx("path", { d: "M10 3L6 8l4 5" })
|
|
6614
|
-
}
|
|
6615
|
-
)
|
|
6428
|
+
children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "w-4 h-4", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M10 3L6 8l4 5" }) })
|
|
6616
6429
|
}
|
|
6617
6430
|
),
|
|
6618
6431
|
/* @__PURE__ */ jsx(
|
|
@@ -6621,13 +6434,7 @@ function ScrollRow({
|
|
|
6621
6434
|
ref,
|
|
6622
6435
|
className: "flex gap-3 overflow-x-auto pb-1 snap-x snap-mandatory",
|
|
6623
6436
|
style: { scrollbarWidth: "none", msOverflowStyle: "none" },
|
|
6624
|
-
children: products.map((product) => /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 w-56 snap-start", children: /* @__PURE__ */ jsx(
|
|
6625
|
-
ProductCard,
|
|
6626
|
-
{
|
|
6627
|
-
product,
|
|
6628
|
-
onClick: () => onProductClick(product)
|
|
6629
|
-
}
|
|
6630
|
-
) }, product.id))
|
|
6437
|
+
children: products.map((product) => /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 w-56 snap-start", children: /* @__PURE__ */ jsx(ProductCard, { product, onClick: () => onProductClick(product) }) }, product.id))
|
|
6631
6438
|
}
|
|
6632
6439
|
),
|
|
6633
6440
|
/* @__PURE__ */ jsx(
|
|
@@ -6637,19 +6444,7 @@ function ScrollRow({
|
|
|
6637
6444
|
onClick: () => scroll("r"),
|
|
6638
6445
|
"aria-label": "Scroll right",
|
|
6639
6446
|
className: "absolute right-0 top-1/2 -translate-y-1/2 translate-x-4 z-10 w-8 h-8 rounded-full bg-background border border-border shadow-md items-center justify-center text-muted-foreground hover:text-primary hover:border-primary/40 transition-all hidden sm:flex opacity-0 group-hover/row:opacity-100",
|
|
6640
|
-
children: /* @__PURE__ */ jsx(
|
|
6641
|
-
"svg",
|
|
6642
|
-
{
|
|
6643
|
-
viewBox: "0 0 16 16",
|
|
6644
|
-
className: "w-4 h-4",
|
|
6645
|
-
fill: "none",
|
|
6646
|
-
stroke: "currentColor",
|
|
6647
|
-
strokeWidth: "1.5",
|
|
6648
|
-
strokeLinecap: "round",
|
|
6649
|
-
strokeLinejoin: "round",
|
|
6650
|
-
children: /* @__PURE__ */ jsx("path", { d: "M6 3l4 5-4 5" })
|
|
6651
|
-
}
|
|
6652
|
-
)
|
|
6447
|
+
children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "w-4 h-4", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M6 3l4 5-4 5" }) })
|
|
6653
6448
|
}
|
|
6654
6449
|
)
|
|
6655
6450
|
] });
|
|
@@ -6752,8 +6547,10 @@ function StoreHomePage({
|
|
|
6752
6547
|
const [grouped, setGrouped] = useState(null);
|
|
6753
6548
|
const [loading, setLoading] = useState(true);
|
|
6754
6549
|
const [error, setError] = useState(null);
|
|
6550
|
+
const [retryKey, setRetryKey] = useState(0);
|
|
6755
6551
|
useEffect(() => {
|
|
6756
6552
|
let cancelled = false;
|
|
6553
|
+
let autoRetryTimer = null;
|
|
6757
6554
|
async function load() {
|
|
6758
6555
|
setLoading(true);
|
|
6759
6556
|
try {
|
|
@@ -6767,7 +6564,15 @@ function StoreHomePage({
|
|
|
6767
6564
|
setGrouped(res.data.homeGroupedProducts);
|
|
6768
6565
|
setError(null);
|
|
6769
6566
|
} catch {
|
|
6770
|
-
if (!cancelled)
|
|
6567
|
+
if (!cancelled) {
|
|
6568
|
+
if (retryKey < 1) {
|
|
6569
|
+
autoRetryTimer = setTimeout(() => {
|
|
6570
|
+
if (!cancelled) setRetryKey(1);
|
|
6571
|
+
}, 2e3);
|
|
6572
|
+
} else {
|
|
6573
|
+
setError("Failed to load store. Please try again.");
|
|
6574
|
+
}
|
|
6575
|
+
}
|
|
6771
6576
|
} finally {
|
|
6772
6577
|
if (!cancelled) setLoading(false);
|
|
6773
6578
|
}
|
|
@@ -6775,8 +6580,9 @@ function StoreHomePage({
|
|
|
6775
6580
|
load();
|
|
6776
6581
|
return () => {
|
|
6777
6582
|
cancelled = true;
|
|
6583
|
+
if (autoRetryTimer) clearTimeout(autoRetryTimer);
|
|
6778
6584
|
};
|
|
6779
|
-
}, [client, compatibleWith]);
|
|
6585
|
+
}, [client, compatibleWith, retryKey]);
|
|
6780
6586
|
function navigate(path) {
|
|
6781
6587
|
if (onNavigate) {
|
|
6782
6588
|
onNavigate(path);
|
|
@@ -6804,65 +6610,16 @@ function StoreHomePage({
|
|
|
6804
6610
|
}
|
|
6805
6611
|
),
|
|
6806
6612
|
/* @__PURE__ */ jsxs("section", { className: "relative overflow-hidden pt-14 pb-12 sm:pt-20 sm:pb-16", children: [
|
|
6807
|
-
/* @__PURE__ */ jsx(
|
|
6808
|
-
|
|
6809
|
-
{
|
|
6810
|
-
|
|
6811
|
-
|
|
6812
|
-
|
|
6813
|
-
),
|
|
6814
|
-
/* @__PURE__ */ jsxs(
|
|
6815
|
-
"svg",
|
|
6816
|
-
{
|
|
6817
|
-
className: "absolute inset-0 w-full h-full opacity-[0.035] pointer-events-none",
|
|
6818
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
6819
|
-
"aria-hidden": "true",
|
|
6820
|
-
children: [
|
|
6821
|
-
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx(
|
|
6822
|
-
"pattern",
|
|
6823
|
-
{
|
|
6824
|
-
id: "store-home-grid",
|
|
6825
|
-
width: "40",
|
|
6826
|
-
height: "40",
|
|
6827
|
-
patternUnits: "userSpaceOnUse",
|
|
6828
|
-
children: /* @__PURE__ */ jsx(
|
|
6829
|
-
"path",
|
|
6830
|
-
{
|
|
6831
|
-
d: "M 40 0 L 0 0 0 40",
|
|
6832
|
-
fill: "none",
|
|
6833
|
-
stroke: "currentColor",
|
|
6834
|
-
strokeWidth: "1"
|
|
6835
|
-
}
|
|
6836
|
-
)
|
|
6837
|
-
}
|
|
6838
|
-
) }),
|
|
6839
|
-
/* @__PURE__ */ jsx("rect", { width: "100%", height: "100%", fill: "url(#store-home-grid)" })
|
|
6840
|
-
]
|
|
6841
|
-
}
|
|
6842
|
-
),
|
|
6843
|
-
/* @__PURE__ */ jsx(
|
|
6844
|
-
"div",
|
|
6845
|
-
{
|
|
6846
|
-
className: "absolute -top-16 left-1/3 w-80 h-80 rounded-full bg-primary/10 blur-3xl pointer-events-none",
|
|
6847
|
-
"aria-hidden": "true"
|
|
6848
|
-
}
|
|
6849
|
-
),
|
|
6850
|
-
/* @__PURE__ */ jsx(
|
|
6851
|
-
"div",
|
|
6852
|
-
{
|
|
6853
|
-
className: "absolute top-8 right-1/4 w-56 h-56 rounded-full bg-primary/8 blur-2xl pointer-events-none",
|
|
6854
|
-
"aria-hidden": "true"
|
|
6855
|
-
}
|
|
6856
|
-
),
|
|
6613
|
+
/* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-gradient-to-b from-background via-primary/[0.06] to-background pointer-events-none", "aria-hidden": "true" }),
|
|
6614
|
+
/* @__PURE__ */ jsxs("svg", { className: "absolute inset-0 w-full h-full opacity-[0.035] pointer-events-none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [
|
|
6615
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("pattern", { id: "store-home-grid", width: "40", height: "40", patternUnits: "userSpaceOnUse", children: /* @__PURE__ */ jsx("path", { d: "M 40 0 L 0 0 0 40", fill: "none", stroke: "currentColor", strokeWidth: "1" }) }) }),
|
|
6616
|
+
/* @__PURE__ */ jsx("rect", { width: "100%", height: "100%", fill: "url(#store-home-grid)" })
|
|
6617
|
+
] }),
|
|
6618
|
+
/* @__PURE__ */ jsx("div", { className: "absolute -top-16 left-1/3 w-80 h-80 rounded-full bg-primary/10 blur-3xl pointer-events-none", "aria-hidden": "true" }),
|
|
6619
|
+
/* @__PURE__ */ jsx("div", { className: "absolute top-8 right-1/4 w-56 h-56 rounded-full bg-primary/8 blur-2xl pointer-events-none", "aria-hidden": "true" }),
|
|
6857
6620
|
/* @__PURE__ */ jsxs("div", { className: "relative max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center", children: [
|
|
6858
6621
|
/* @__PURE__ */ jsxs("div", { className: "inline-flex items-center gap-2 px-3 py-1 rounded-full border border-primary/30 bg-primary/10 text-xs font-semibold text-primary mb-5", children: [
|
|
6859
|
-
/* @__PURE__ */ jsx(
|
|
6860
|
-
"span",
|
|
6861
|
-
{
|
|
6862
|
-
className: "w-1.5 h-1.5 rounded-full bg-primary flex-shrink-0",
|
|
6863
|
-
"aria-hidden": "true"
|
|
6864
|
-
}
|
|
6865
|
-
),
|
|
6622
|
+
/* @__PURE__ */ jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-primary flex-shrink-0", "aria-hidden": "true" }),
|
|
6866
6623
|
"Community Marketplace"
|
|
6867
6624
|
] }),
|
|
6868
6625
|
/* @__PURE__ */ jsx("h1", { className: "text-4xl sm:text-5xl md:text-6xl font-extrabold tracking-tight text-foreground mb-4 leading-[1.08]", children: resolvedTitle }),
|
|
@@ -6874,9 +6631,7 @@ function StoreHomePage({
|
|
|
6874
6631
|
onSubmit: (e) => {
|
|
6875
6632
|
e.preventDefault();
|
|
6876
6633
|
const q = new FormData(e.currentTarget).get("q");
|
|
6877
|
-
navigate(
|
|
6878
|
-
q.trim() ? `${browsePath}?q=${encodeURIComponent(q.trim())}` : browsePath
|
|
6879
|
-
);
|
|
6634
|
+
navigate(q.trim() ? `${browsePath}?q=${encodeURIComponent(q.trim())}` : browsePath);
|
|
6880
6635
|
},
|
|
6881
6636
|
children: [
|
|
6882
6637
|
/* @__PURE__ */ jsx(
|
|
@@ -6918,23 +6673,9 @@ function StoreHomePage({
|
|
|
6918
6673
|
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4", children: [...Array(4)].map((_, i) => /* @__PURE__ */ jsx(GridCardSkeleton, {}, i)) })
|
|
6919
6674
|
] }) : error ? /* @__PURE__ */ jsxs("div", { className: "py-16 text-center", children: [
|
|
6920
6675
|
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground mb-4", children: error }),
|
|
6921
|
-
/* @__PURE__ */ jsx(
|
|
6922
|
-
"button",
|
|
6923
|
-
{
|
|
6924
|
-
type: "button",
|
|
6925
|
-
onClick: () => window.location.reload(),
|
|
6926
|
-
className: "text-sm text-primary hover:underline",
|
|
6927
|
-
children: "Retry"
|
|
6928
|
-
}
|
|
6929
|
-
)
|
|
6676
|
+
/* @__PURE__ */ jsx("button", { type: "button", onClick: () => setRetryKey((k) => k + 1), className: "text-sm text-primary hover:underline", children: "Retry" })
|
|
6930
6677
|
] }) : featuredItems.length > 0 ? /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[1fr_2fr] gap-4 items-start", children: [
|
|
6931
|
-
/* @__PURE__ */ jsx(
|
|
6932
|
-
FeaturedHeroCard,
|
|
6933
|
-
{
|
|
6934
|
-
product: featuredItems[0],
|
|
6935
|
-
onNavigate: navigate
|
|
6936
|
-
}
|
|
6937
|
-
),
|
|
6678
|
+
/* @__PURE__ */ jsx(FeaturedHeroCard, { product: featuredItems[0], onNavigate: navigate }),
|
|
6938
6679
|
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4", children: featuredItems.slice(1, 5).map((product) => /* @__PURE__ */ jsx(
|
|
6939
6680
|
ProductCard,
|
|
6940
6681
|
{
|
|
@@ -6955,13 +6696,7 @@ function StoreHomePage({
|
|
|
6955
6696
|
onNavigate: navigate
|
|
6956
6697
|
}
|
|
6957
6698
|
),
|
|
6958
|
-
loading ? /* @__PURE__ */ jsx("div", { className: "flex gap-3 overflow-hidden", children: [...Array(5)].map((_, i) => /* @__PURE__ */ jsx(ScrollCardSkeleton, {}, i)) }) : /* @__PURE__ */ jsx(
|
|
6959
|
-
ScrollRow,
|
|
6960
|
-
{
|
|
6961
|
-
products: popularItems,
|
|
6962
|
-
onProductClick: handleProductClick
|
|
6963
|
-
}
|
|
6964
|
-
)
|
|
6699
|
+
loading ? /* @__PURE__ */ jsx("div", { className: "flex gap-3 overflow-hidden", children: [...Array(5)].map((_, i) => /* @__PURE__ */ jsx(ScrollCardSkeleton, {}, i)) }) : /* @__PURE__ */ jsx(ScrollRow, { products: popularItems, onProductClick: handleProductClick })
|
|
6965
6700
|
] }),
|
|
6966
6701
|
(loading || freeItems.length > 0) && /* @__PURE__ */ jsxs("section", { children: [
|
|
6967
6702
|
/* @__PURE__ */ jsx(
|
|
@@ -6984,35 +6719,16 @@ function StoreHomePage({
|
|
|
6984
6719
|
] })
|
|
6985
6720
|
] }),
|
|
6986
6721
|
/* @__PURE__ */ jsxs("section", { className: "relative overflow-hidden border-t border-border", children: [
|
|
6987
|
-
/* @__PURE__ */ jsx(
|
|
6988
|
-
|
|
6989
|
-
{
|
|
6990
|
-
className: "absolute inset-0 bg-gradient-to-br from-primary/8 via-background to-primary/5 pointer-events-none",
|
|
6991
|
-
"aria-hidden": "true"
|
|
6992
|
-
}
|
|
6993
|
-
),
|
|
6994
|
-
/* @__PURE__ */ jsx(
|
|
6995
|
-
"div",
|
|
6996
|
-
{
|
|
6997
|
-
className: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-80 h-40 rounded-full bg-primary/12 blur-3xl pointer-events-none",
|
|
6998
|
-
"aria-hidden": "true"
|
|
6999
|
-
}
|
|
7000
|
-
),
|
|
6722
|
+
/* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-gradient-to-br from-primary/8 via-background to-primary/5 pointer-events-none", "aria-hidden": "true" }),
|
|
6723
|
+
/* @__PURE__ */ jsx("div", { className: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-80 h-40 rounded-full bg-primary/12 blur-3xl pointer-events-none", "aria-hidden": "true" }),
|
|
7001
6724
|
/* @__PURE__ */ jsxs("div", { className: "relative max-w-2xl mx-auto px-4 py-16 text-center", children: [
|
|
7002
6725
|
/* @__PURE__ */ jsxs("div", { className: "inline-flex items-center gap-2 px-3 py-1 rounded-full border border-primary/30 bg-primary/10 text-xs font-semibold text-primary mb-5", children: [
|
|
7003
|
-
/* @__PURE__ */ jsx(
|
|
7004
|
-
"span",
|
|
7005
|
-
{
|
|
7006
|
-
className: "w-1.5 h-1.5 rounded-full bg-primary flex-shrink-0",
|
|
7007
|
-
"aria-hidden": "true"
|
|
7008
|
-
}
|
|
7009
|
-
),
|
|
6726
|
+
/* @__PURE__ */ jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-primary flex-shrink-0", "aria-hidden": "true" }),
|
|
7010
6727
|
"Become a publisher"
|
|
7011
6728
|
] }),
|
|
7012
6729
|
/* @__PURE__ */ jsx("h2", { className: "text-2xl sm:text-3xl font-bold text-foreground mb-3", children: "Built something useful?" }),
|
|
7013
6730
|
/* @__PURE__ */ jsxs("p", { className: "text-muted-foreground mb-8 max-w-lg mx-auto leading-relaxed", children: [
|
|
7014
|
-
"Share your workflows, nodes, and integrations with",
|
|
7015
|
-
" ",
|
|
6731
|
+
"Share your workflows, nodes, and integrations with ",
|
|
7016
6732
|
productName ?? "the",
|
|
7017
6733
|
" community. Earn from your work or contribute for free."
|
|
7018
6734
|
] }),
|
|
@@ -7068,14 +6784,7 @@ var PRICING_OPTIONS = [
|
|
|
7068
6784
|
];
|
|
7069
6785
|
function parseUrlParams() {
|
|
7070
6786
|
if (typeof window === "undefined")
|
|
7071
|
-
return {
|
|
7072
|
-
q: "",
|
|
7073
|
-
type: "",
|
|
7074
|
-
pricingModel: "",
|
|
7075
|
-
category: "",
|
|
7076
|
-
sortBy: "RELEVANCE",
|
|
7077
|
-
featured: false
|
|
7078
|
-
};
|
|
6787
|
+
return { q: "", type: "", pricingModel: "", category: "", sortBy: "RELEVANCE", featured: false };
|
|
7079
6788
|
const p = new URLSearchParams(window.location.search);
|
|
7080
6789
|
return {
|
|
7081
6790
|
q: p.get("q") ?? "",
|
|
@@ -7127,9 +6836,7 @@ function StoreBrowsePage({
|
|
|
7127
6836
|
const [featured, setFeatured] = useState(initial.featured);
|
|
7128
6837
|
const [offset, setOffset] = useState(0);
|
|
7129
6838
|
const [result, setResult] = useState(null);
|
|
7130
|
-
const [allProducts, setAllProducts] = useState(
|
|
7131
|
-
[]
|
|
7132
|
-
);
|
|
6839
|
+
const [allProducts, setAllProducts] = useState([]);
|
|
7133
6840
|
const [categories, setCategories] = useState([]);
|
|
7134
6841
|
const [loading, setLoading] = useState(true);
|
|
7135
6842
|
const [loadingMore, setLoadingMore] = useState(false);
|
|
@@ -7173,16 +6880,7 @@ function StoreBrowsePage({
|
|
|
7173
6880
|
return () => {
|
|
7174
6881
|
cancelled = true;
|
|
7175
6882
|
};
|
|
7176
|
-
}, [
|
|
7177
|
-
client,
|
|
7178
|
-
search,
|
|
7179
|
-
type,
|
|
7180
|
-
pricingModel,
|
|
7181
|
-
category,
|
|
7182
|
-
sortBy,
|
|
7183
|
-
compatibleWith,
|
|
7184
|
-
featured
|
|
7185
|
-
]);
|
|
6883
|
+
}, [client, search, type, pricingModel, category, sortBy, compatibleWith, featured]);
|
|
7186
6884
|
function loadMore() {
|
|
7187
6885
|
const nextOffset = offset + PAGE_SIZE;
|
|
7188
6886
|
setLoadingMore(true);
|
|
@@ -7358,8 +7056,7 @@ function StoreBrowsePage({
|
|
|
7358
7056
|
onClick: () => setFiltersOpen(!filtersOpen),
|
|
7359
7057
|
className: "lg:hidden h-10 px-4 rounded-lg border border-border bg-background text-sm text-foreground hover:bg-muted/50 transition-colors",
|
|
7360
7058
|
children: [
|
|
7361
|
-
"Filters",
|
|
7362
|
-
" ",
|
|
7059
|
+
"Filters ",
|
|
7363
7060
|
hasActiveFilters && /* @__PURE__ */ jsx("span", { className: "text-primary", children: "\u2022" })
|
|
7364
7061
|
]
|
|
7365
7062
|
}
|
|
@@ -7373,32 +7070,14 @@ function StoreBrowsePage({
|
|
|
7373
7070
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-4 flex-wrap", children: [
|
|
7374
7071
|
/* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: loading ? "Loading\u2026" : `${result?.totalCount ?? 0} results` }),
|
|
7375
7072
|
hasActiveFilters && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-1.5", children: [
|
|
7376
|
-
search && /* @__PURE__ */ jsx(
|
|
7377
|
-
|
|
7378
|
-
|
|
7379
|
-
|
|
7380
|
-
onRemove: () => {
|
|
7381
|
-
setSearch("");
|
|
7382
|
-
setInputValue("");
|
|
7383
|
-
}
|
|
7384
|
-
}
|
|
7385
|
-
),
|
|
7073
|
+
search && /* @__PURE__ */ jsx(Chip, { label: `"${search}"`, onRemove: () => {
|
|
7074
|
+
setSearch("");
|
|
7075
|
+
setInputValue("");
|
|
7076
|
+
} }),
|
|
7386
7077
|
type && /* @__PURE__ */ jsx(Chip, { label: type, onRemove: () => setType("") }),
|
|
7387
|
-
pricingModel && /* @__PURE__ */ jsx(
|
|
7388
|
-
Chip,
|
|
7389
|
-
{
|
|
7390
|
-
label: pricingModel,
|
|
7391
|
-
onRemove: () => setPricingModel("")
|
|
7392
|
-
}
|
|
7393
|
-
),
|
|
7078
|
+
pricingModel && /* @__PURE__ */ jsx(Chip, { label: pricingModel, onRemove: () => setPricingModel("") }),
|
|
7394
7079
|
category && /* @__PURE__ */ jsx(Chip, { label: category, onRemove: () => setCategory("") }),
|
|
7395
|
-
featured && /* @__PURE__ */ jsx(
|
|
7396
|
-
Chip,
|
|
7397
|
-
{
|
|
7398
|
-
label: "Featured",
|
|
7399
|
-
onRemove: () => setFeatured(false)
|
|
7400
|
-
}
|
|
7401
|
-
)
|
|
7080
|
+
featured && /* @__PURE__ */ jsx(Chip, { label: "Featured", onRemove: () => setFeatured(false) })
|
|
7402
7081
|
] })
|
|
7403
7082
|
] }),
|
|
7404
7083
|
loading ? /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 gap-4", children: [...Array(12)].map((_, i) => /* @__PURE__ */ jsx(
|
|
@@ -7450,97 +7129,9 @@ function StoreBrowsePage({
|
|
|
7450
7129
|
function Chip({ label, onRemove }) {
|
|
7451
7130
|
return /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1 text-xs bg-primary/10 text-primary rounded-full px-2.5 py-0.5 font-medium", children: [
|
|
7452
7131
|
label,
|
|
7453
|
-
/* @__PURE__ */ jsx(
|
|
7454
|
-
"button",
|
|
7455
|
-
{
|
|
7456
|
-
type: "button",
|
|
7457
|
-
onClick: onRemove,
|
|
7458
|
-
"aria-label": `Remove ${label}`,
|
|
7459
|
-
className: "hover:opacity-70",
|
|
7460
|
-
children: "\xD7"
|
|
7461
|
-
}
|
|
7462
|
-
)
|
|
7132
|
+
/* @__PURE__ */ jsx("button", { type: "button", onClick: onRemove, "aria-label": `Remove ${label}`, className: "hover:opacity-70", children: "\xD7" })
|
|
7463
7133
|
] });
|
|
7464
7134
|
}
|
|
7465
|
-
function detectTheme() {
|
|
7466
|
-
if (typeof document === "undefined") return "light";
|
|
7467
|
-
const root = document.documentElement;
|
|
7468
|
-
return root.classList.contains("dark") || root.getAttribute("data-theme") === "dark" ? "dark" : "light";
|
|
7469
|
-
}
|
|
7470
|
-
function WorkflowEmbed({
|
|
7471
|
-
appUrl,
|
|
7472
|
-
productId,
|
|
7473
|
-
theme,
|
|
7474
|
-
clickToInteract = true,
|
|
7475
|
-
hideCta = false,
|
|
7476
|
-
className,
|
|
7477
|
-
onError
|
|
7478
|
-
}) {
|
|
7479
|
-
const iframeRef = useRef(null);
|
|
7480
|
-
const [status, setStatus] = useState("loading");
|
|
7481
|
-
const [interactive, setInteractive] = useState(!clickToInteract);
|
|
7482
|
-
const resolvedTheme = useMemo(() => theme ?? detectTheme(), [theme]);
|
|
7483
|
-
const src = useMemo(() => {
|
|
7484
|
-
const base = appUrl.replace(/\/+$/, "");
|
|
7485
|
-
const params = new URLSearchParams({
|
|
7486
|
-
productId,
|
|
7487
|
-
theme: resolvedTheme
|
|
7488
|
-
});
|
|
7489
|
-
if (hideCta) params.set("cta", "false");
|
|
7490
|
-
return `${base}/embed/workflow?${params.toString()}`;
|
|
7491
|
-
}, [appUrl, productId, resolvedTheme, hideCta]);
|
|
7492
|
-
useEffect(() => {
|
|
7493
|
-
const handler = (event) => {
|
|
7494
|
-
if (event.source !== iframeRef.current?.contentWindow) return;
|
|
7495
|
-
const data = event.data;
|
|
7496
|
-
if (data?.type === "fluidgrids:embed:loaded") setStatus("loaded");
|
|
7497
|
-
if (data?.type === "fluidgrids:embed:error") {
|
|
7498
|
-
setStatus("error");
|
|
7499
|
-
onError?.(data.message ?? "Failed to load workflow preview");
|
|
7500
|
-
}
|
|
7501
|
-
};
|
|
7502
|
-
window.addEventListener("message", handler);
|
|
7503
|
-
return () => window.removeEventListener("message", handler);
|
|
7504
|
-
}, [onError]);
|
|
7505
|
-
if (status === "error") return null;
|
|
7506
|
-
return /* @__PURE__ */ jsxs(
|
|
7507
|
-
"div",
|
|
7508
|
-
{
|
|
7509
|
-
className: `relative w-full overflow-hidden rounded-xl border border-border bg-muted ${className ?? ""}`,
|
|
7510
|
-
style: { aspectRatio: "16 / 9" },
|
|
7511
|
-
children: [
|
|
7512
|
-
status === "loading" && /* @__PURE__ */ jsx(
|
|
7513
|
-
"div",
|
|
7514
|
-
{
|
|
7515
|
-
className: "absolute inset-0 animate-pulse bg-muted",
|
|
7516
|
-
"aria-hidden": "true"
|
|
7517
|
-
}
|
|
7518
|
-
),
|
|
7519
|
-
/* @__PURE__ */ jsx(
|
|
7520
|
-
"iframe",
|
|
7521
|
-
{
|
|
7522
|
-
ref: iframeRef,
|
|
7523
|
-
src,
|
|
7524
|
-
title: "Workflow preview",
|
|
7525
|
-
loading: "lazy",
|
|
7526
|
-
className: "h-full w-full border-0",
|
|
7527
|
-
style: interactive ? void 0 : { pointerEvents: "none" }
|
|
7528
|
-
}
|
|
7529
|
-
),
|
|
7530
|
-
clickToInteract && !interactive && status === "loaded" && /* @__PURE__ */ jsx(
|
|
7531
|
-
"button",
|
|
7532
|
-
{
|
|
7533
|
-
type: "button",
|
|
7534
|
-
onClick: () => setInteractive(true),
|
|
7535
|
-
className: "absolute inset-0 flex items-end justify-center bg-transparent pb-4",
|
|
7536
|
-
"aria-label": "Click to explore the workflow",
|
|
7537
|
-
children: /* @__PURE__ */ jsx("span", { className: "rounded-full border border-border bg-background/90 px-4 py-1.5 text-xs font-medium text-foreground shadow-sm backdrop-blur transition-colors hover:bg-background", children: "Click to explore" })
|
|
7538
|
-
}
|
|
7539
|
-
)
|
|
7540
|
-
]
|
|
7541
|
-
}
|
|
7542
|
-
);
|
|
7543
|
-
}
|
|
7544
7135
|
var ANIM_STYLES = `
|
|
7545
7136
|
@keyframes sdFadeUp {
|
|
7546
7137
|
from { opacity: 0; transform: translateY(16px); }
|
|
@@ -7573,11 +7164,50 @@ var ANIM_STYLES = `
|
|
|
7573
7164
|
.sd-d5 { animation-delay: 320ms; }
|
|
7574
7165
|
.sd-d6 { animation-delay: 400ms; }
|
|
7575
7166
|
`;
|
|
7576
|
-
function
|
|
7577
|
-
|
|
7578
|
-
|
|
7579
|
-
|
|
7580
|
-
})
|
|
7167
|
+
function mdInline(text) {
|
|
7168
|
+
const parts = text.split(/(\*\*[^*]+\*\*)/g);
|
|
7169
|
+
if (parts.length === 1) return text;
|
|
7170
|
+
return /* @__PURE__ */ jsx(Fragment, { children: parts.map(
|
|
7171
|
+
(part, i) => part.startsWith("**") && part.endsWith("**") ? /* @__PURE__ */ jsx("strong", { className: "font-semibold text-foreground", children: part.slice(2, -2) }, i) : part || null
|
|
7172
|
+
) });
|
|
7173
|
+
}
|
|
7174
|
+
function MdAbout({ content }) {
|
|
7175
|
+
let key = 0;
|
|
7176
|
+
const nodes = [];
|
|
7177
|
+
let listItems = [];
|
|
7178
|
+
const flushList = () => {
|
|
7179
|
+
if (!listItems.length) return;
|
|
7180
|
+
nodes.push(
|
|
7181
|
+
/* @__PURE__ */ jsx("ul", { className: "list-disc list-inside space-y-0.5 my-2", children: listItems.map((item, i) => /* @__PURE__ */ jsx("li", { className: "text-sm leading-relaxed", children: mdInline(item) }, i)) }, key++)
|
|
7182
|
+
);
|
|
7183
|
+
listItems = [];
|
|
7184
|
+
};
|
|
7185
|
+
for (const line of content.split("\n")) {
|
|
7186
|
+
if (!line.trim()) {
|
|
7187
|
+
flushList();
|
|
7188
|
+
continue;
|
|
7189
|
+
}
|
|
7190
|
+
const hm = line.match(/^(#{1,3})\s+(.*)/);
|
|
7191
|
+
if (hm) {
|
|
7192
|
+
flushList();
|
|
7193
|
+
nodes.push(
|
|
7194
|
+
/* @__PURE__ */ jsx("p", { className: "font-semibold text-foreground mt-4 first:mt-0 text-sm", children: mdInline(hm[2]) }, key++)
|
|
7195
|
+
);
|
|
7196
|
+
continue;
|
|
7197
|
+
}
|
|
7198
|
+
if (/^[-*]\s/.test(line)) {
|
|
7199
|
+
listItems.push(line.replace(/^[-*]\s+/, ""));
|
|
7200
|
+
continue;
|
|
7201
|
+
}
|
|
7202
|
+
flushList();
|
|
7203
|
+
nodes.push(
|
|
7204
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm leading-relaxed mb-1", children: mdInline(line) }, key++)
|
|
7205
|
+
);
|
|
7206
|
+
}
|
|
7207
|
+
flushList();
|
|
7208
|
+
return /* @__PURE__ */ jsx(Fragment, { children: nodes });
|
|
7209
|
+
}
|
|
7210
|
+
function RatingBar({ label, count, total }) {
|
|
7581
7211
|
const pct = total > 0 ? Math.round(count / total * 100) : 0;
|
|
7582
7212
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
|
|
7583
7213
|
/* @__PURE__ */ jsx("span", { className: "w-12 text-right shrink-0", children: label }),
|
|
@@ -7593,63 +7223,12 @@ function RatingBar({
|
|
|
7593
7223
|
}
|
|
7594
7224
|
function IconBlock({ src }) {
|
|
7595
7225
|
return /* @__PURE__ */ jsxs("div", { className: "relative flex-shrink-0", children: [
|
|
7596
|
-
/* @__PURE__ */ jsx(
|
|
7597
|
-
|
|
7598
|
-
{
|
|
7599
|
-
|
|
7600
|
-
|
|
7601
|
-
|
|
7602
|
-
),
|
|
7603
|
-
/* @__PURE__ */ jsx("div", { className: "sd-si relative w-20 h-20 rounded-2xl overflow-hidden shadow-lg ring-1 ring-border", children: src ? /* @__PURE__ */ jsx(
|
|
7604
|
-
"img",
|
|
7605
|
-
{
|
|
7606
|
-
src,
|
|
7607
|
-
alt: "",
|
|
7608
|
-
"aria-hidden": true,
|
|
7609
|
-
className: "w-full h-full object-cover"
|
|
7610
|
-
}
|
|
7611
|
-
) : /* @__PURE__ */ jsx("div", { className: "w-full h-full bg-gradient-to-br from-primary/25 to-primary/8 flex items-center justify-center", children: /* @__PURE__ */ jsxs(
|
|
7612
|
-
"svg",
|
|
7613
|
-
{
|
|
7614
|
-
viewBox: "0 0 40 40",
|
|
7615
|
-
className: "w-10 h-10",
|
|
7616
|
-
fill: "none",
|
|
7617
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
7618
|
-
"aria-hidden": "true",
|
|
7619
|
-
children: [
|
|
7620
|
-
/* @__PURE__ */ jsx(
|
|
7621
|
-
"polygon",
|
|
7622
|
-
{
|
|
7623
|
-
points: "20,4 34,11 20,18 6,11",
|
|
7624
|
-
className: "fill-primary/40",
|
|
7625
|
-
stroke: "currentColor",
|
|
7626
|
-
strokeWidth: "0.6",
|
|
7627
|
-
strokeOpacity: "0.4"
|
|
7628
|
-
}
|
|
7629
|
-
),
|
|
7630
|
-
/* @__PURE__ */ jsx(
|
|
7631
|
-
"polygon",
|
|
7632
|
-
{
|
|
7633
|
-
points: "6,11 20,18 20,34 6,27",
|
|
7634
|
-
className: "fill-primary/20",
|
|
7635
|
-
stroke: "currentColor",
|
|
7636
|
-
strokeWidth: "0.6",
|
|
7637
|
-
strokeOpacity: "0.4"
|
|
7638
|
-
}
|
|
7639
|
-
),
|
|
7640
|
-
/* @__PURE__ */ jsx(
|
|
7641
|
-
"polygon",
|
|
7642
|
-
{
|
|
7643
|
-
points: "34,11 20,18 20,34 34,27",
|
|
7644
|
-
className: "fill-primary/30",
|
|
7645
|
-
stroke: "currentColor",
|
|
7646
|
-
strokeWidth: "0.6",
|
|
7647
|
-
strokeOpacity: "0.4"
|
|
7648
|
-
}
|
|
7649
|
-
)
|
|
7650
|
-
]
|
|
7651
|
-
}
|
|
7652
|
-
) }) })
|
|
7226
|
+
/* @__PURE__ */ jsx("div", { className: "sd-gp absolute -inset-1.5 rounded-2xl bg-primary/30 blur-md pointer-events-none", "aria-hidden": "true" }),
|
|
7227
|
+
/* @__PURE__ */ jsx("div", { className: "sd-si relative w-20 h-20 rounded-2xl overflow-hidden shadow-lg ring-1 ring-border", children: src ? /* @__PURE__ */ jsx("img", { src, alt: "", "aria-hidden": true, className: "w-full h-full object-cover" }) : /* @__PURE__ */ jsx("div", { className: "w-full h-full bg-gradient-to-br from-primary/25 to-primary/8 flex items-center justify-center", children: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 40 40", className: "w-10 h-10", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [
|
|
7228
|
+
/* @__PURE__ */ jsx("polygon", { points: "20,4 34,11 20,18 6,11", className: "fill-primary/40", stroke: "currentColor", strokeWidth: "0.6", strokeOpacity: "0.4" }),
|
|
7229
|
+
/* @__PURE__ */ jsx("polygon", { points: "6,11 20,18 20,34 6,27", className: "fill-primary/20", stroke: "currentColor", strokeWidth: "0.6", strokeOpacity: "0.4" }),
|
|
7230
|
+
/* @__PURE__ */ jsx("polygon", { points: "34,11 20,18 20,34 34,27", className: "fill-primary/30", stroke: "currentColor", strokeWidth: "0.6", strokeOpacity: "0.4" })
|
|
7231
|
+
] }) }) })
|
|
7653
7232
|
] });
|
|
7654
7233
|
}
|
|
7655
7234
|
function StoreProductDetailPage({
|
|
@@ -7665,7 +7244,6 @@ function StoreProductDetailPage({
|
|
|
7665
7244
|
const [error, setError] = useState(null);
|
|
7666
7245
|
const [activeScreenshot, setActiveScreenshot] = useState(0);
|
|
7667
7246
|
const [screenshotKey, setScreenshotKey] = useState(0);
|
|
7668
|
-
const [embedFailed, setEmbedFailed] = useState(false);
|
|
7669
7247
|
useEffect(() => {
|
|
7670
7248
|
if (!slug && !id) {
|
|
7671
7249
|
setError("Product not found.");
|
|
@@ -7719,30 +7297,11 @@ function StoreProductDetailPage({
|
|
|
7719
7297
|
if (error || !details) {
|
|
7720
7298
|
return /* @__PURE__ */ jsxs("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-20 text-center", children: [
|
|
7721
7299
|
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground mb-4", children: error ?? "Product not found." }),
|
|
7722
|
-
/* @__PURE__ */ jsx(
|
|
7723
|
-
"button",
|
|
7724
|
-
{
|
|
7725
|
-
type: "button",
|
|
7726
|
-
onClick: () => navigate("/store"),
|
|
7727
|
-
className: "text-sm text-primary hover:underline",
|
|
7728
|
-
children: "Back to Store"
|
|
7729
|
-
}
|
|
7730
|
-
)
|
|
7300
|
+
/* @__PURE__ */ jsx("button", { type: "button", onClick: () => navigate("/store"), className: "text-sm text-primary hover:underline", children: "Back to Store" })
|
|
7731
7301
|
] });
|
|
7732
7302
|
}
|
|
7733
|
-
const {
|
|
7734
|
-
|
|
7735
|
-
publisher,
|
|
7736
|
-
reviews,
|
|
7737
|
-
reviewsCount,
|
|
7738
|
-
relatedProducts,
|
|
7739
|
-
ratingDistribution
|
|
7740
|
-
} = details;
|
|
7741
|
-
const priceLabel = formatPrice2(
|
|
7742
|
-
product.price,
|
|
7743
|
-
product.currency,
|
|
7744
|
-
product.pricingModel
|
|
7745
|
-
);
|
|
7303
|
+
const { product, publisher, reviews, reviewsCount, relatedProducts, ratingDistribution } = details;
|
|
7304
|
+
const priceLabel = formatPrice2(product.price, product.currency, product.pricingModel);
|
|
7746
7305
|
const screenshots = product.screenshots ?? [];
|
|
7747
7306
|
const totalRatings = ratingDistribution ? ratingDistribution.fiveStars + ratingDistribution.fourStars + ratingDistribution.threeStars + ratingDistribution.twoStars + ratingDistribution.oneStar : 0;
|
|
7748
7307
|
return /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
|
|
@@ -7756,60 +7315,15 @@ function StoreProductDetailPage({
|
|
|
7756
7315
|
}
|
|
7757
7316
|
),
|
|
7758
7317
|
/* @__PURE__ */ jsxs("div", { className: "relative overflow-hidden", children: [
|
|
7759
|
-
/* @__PURE__ */ jsx(
|
|
7760
|
-
|
|
7761
|
-
{
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
),
|
|
7766
|
-
/* @__PURE__ */ jsxs(
|
|
7767
|
-
"svg",
|
|
7768
|
-
{
|
|
7769
|
-
className: "absolute inset-0 w-full h-full opacity-[0.04] pointer-events-none",
|
|
7770
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
7771
|
-
"aria-hidden": "true",
|
|
7772
|
-
children: [
|
|
7773
|
-
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx(
|
|
7774
|
-
"pattern",
|
|
7775
|
-
{
|
|
7776
|
-
id: "sd-grid",
|
|
7777
|
-
width: "40",
|
|
7778
|
-
height: "40",
|
|
7779
|
-
patternUnits: "userSpaceOnUse",
|
|
7780
|
-
children: /* @__PURE__ */ jsx(
|
|
7781
|
-
"path",
|
|
7782
|
-
{
|
|
7783
|
-
d: "M 40 0 L 0 0 0 40",
|
|
7784
|
-
fill: "none",
|
|
7785
|
-
stroke: "currentColor",
|
|
7786
|
-
strokeWidth: "1"
|
|
7787
|
-
}
|
|
7788
|
-
)
|
|
7789
|
-
}
|
|
7790
|
-
) }),
|
|
7791
|
-
/* @__PURE__ */ jsx("rect", { width: "100%", height: "100%", fill: "url(#sd-grid)" })
|
|
7792
|
-
]
|
|
7793
|
-
}
|
|
7794
|
-
),
|
|
7795
|
-
/* @__PURE__ */ jsx(
|
|
7796
|
-
"div",
|
|
7797
|
-
{
|
|
7798
|
-
className: "absolute -top-12 -left-12 w-72 h-72 rounded-full bg-primary/10 blur-3xl pointer-events-none",
|
|
7799
|
-
"aria-hidden": "true"
|
|
7800
|
-
}
|
|
7801
|
-
),
|
|
7318
|
+
/* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-gradient-to-b from-primary/[0.07] via-background to-background pointer-events-none", "aria-hidden": "true" }),
|
|
7319
|
+
/* @__PURE__ */ jsxs("svg", { className: "absolute inset-0 w-full h-full opacity-[0.04] pointer-events-none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [
|
|
7320
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("pattern", { id: "sd-grid", width: "40", height: "40", patternUnits: "userSpaceOnUse", children: /* @__PURE__ */ jsx("path", { d: "M 40 0 L 0 0 0 40", fill: "none", stroke: "currentColor", strokeWidth: "1" }) }) }),
|
|
7321
|
+
/* @__PURE__ */ jsx("rect", { width: "100%", height: "100%", fill: "url(#sd-grid)" })
|
|
7322
|
+
] }),
|
|
7323
|
+
/* @__PURE__ */ jsx("div", { className: "absolute -top-12 -left-12 w-72 h-72 rounded-full bg-primary/10 blur-3xl pointer-events-none", "aria-hidden": "true" }),
|
|
7802
7324
|
/* @__PURE__ */ jsxs("div", { className: "relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pt-6 pb-8", children: [
|
|
7803
7325
|
/* @__PURE__ */ jsxs("nav", { className: "sd-fi text-sm text-muted-foreground mb-6 flex items-center gap-1.5 flex-wrap", children: [
|
|
7804
|
-
/* @__PURE__ */ jsx(
|
|
7805
|
-
"button",
|
|
7806
|
-
{
|
|
7807
|
-
type: "button",
|
|
7808
|
-
onClick: () => navigate("/store"),
|
|
7809
|
-
className: "hover:text-primary transition-colors",
|
|
7810
|
-
children: "Store"
|
|
7811
|
-
}
|
|
7812
|
-
),
|
|
7326
|
+
/* @__PURE__ */ jsx("button", { type: "button", onClick: () => navigate("/store"), className: "hover:text-primary transition-colors", children: "Store" }),
|
|
7813
7327
|
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: "\u203A" }),
|
|
7814
7328
|
product.category && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7815
7329
|
/* @__PURE__ */ jsx(
|
|
@@ -7875,14 +7389,6 @@ function StoreProductDetailPage({
|
|
|
7875
7389
|
}
|
|
7876
7390
|
)
|
|
7877
7391
|
] }),
|
|
7878
|
-
product.type === "WORKFLOW" && !embedFailed && /* @__PURE__ */ jsx("div", { className: "sd-fu sd-d3 mb-8", children: /* @__PURE__ */ jsx(
|
|
7879
|
-
WorkflowEmbed,
|
|
7880
|
-
{
|
|
7881
|
-
appUrl: appLoginUrl,
|
|
7882
|
-
productId: product.id,
|
|
7883
|
-
onError: () => setEmbedFailed(true)
|
|
7884
|
-
}
|
|
7885
|
-
) }),
|
|
7886
7392
|
screenshots.length > 0 && /* @__PURE__ */ jsxs("div", { className: "sd-fu sd-d3 mb-8", children: [
|
|
7887
7393
|
/* @__PURE__ */ jsx("div", { className: "rounded-xl overflow-hidden bg-muted aspect-video mb-3 shadow-md", children: /* @__PURE__ */ jsx(
|
|
7888
7394
|
"img",
|
|
@@ -7899,33 +7405,19 @@ function StoreProductDetailPage({
|
|
|
7899
7405
|
type: "button",
|
|
7900
7406
|
onClick: () => switchScreenshot(i),
|
|
7901
7407
|
className: `w-20 h-14 rounded-lg overflow-hidden flex-shrink-0 border-2 transition-all duration-200 ${i === activeScreenshot ? "border-primary shadow-sm shadow-primary/20" : "border-transparent opacity-50 hover:opacity-80"}`,
|
|
7902
|
-
children: /* @__PURE__ */ jsx(
|
|
7903
|
-
"img",
|
|
7904
|
-
{
|
|
7905
|
-
src,
|
|
7906
|
-
alt: `Thumbnail ${i + 1}`,
|
|
7907
|
-
className: "w-full h-full object-cover"
|
|
7908
|
-
}
|
|
7909
|
-
)
|
|
7408
|
+
children: /* @__PURE__ */ jsx("img", { src, alt: `Thumbnail ${i + 1}`, className: "w-full h-full object-cover" })
|
|
7910
7409
|
},
|
|
7911
7410
|
i
|
|
7912
7411
|
)) })
|
|
7913
7412
|
] }),
|
|
7914
7413
|
product.longDescription && /* @__PURE__ */ jsxs("div", { className: "sd-fu sd-d4 mb-8", children: [
|
|
7915
7414
|
/* @__PURE__ */ jsx("h2", { className: "text-lg font-bold text-foreground mb-3", children: "About" }),
|
|
7916
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
7415
|
+
/* @__PURE__ */ jsx("div", { className: "text-muted-foreground", children: /* @__PURE__ */ jsx(MdAbout, { content: product.longDescription }) })
|
|
7917
7416
|
] }),
|
|
7918
7417
|
publisher && /* @__PURE__ */ jsxs("div", { className: "sd-fu sd-d5 mb-8 p-4 rounded-xl border border-border bg-card hover:border-primary/30 transition-colors duration-300", children: [
|
|
7919
7418
|
/* @__PURE__ */ jsx("h2", { className: "text-sm font-semibold text-foreground mb-3", children: "Publisher" }),
|
|
7920
7419
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
7921
|
-
publisher.logoUrl ? /* @__PURE__ */ jsx(
|
|
7922
|
-
"img",
|
|
7923
|
-
{
|
|
7924
|
-
src: publisher.logoUrl,
|
|
7925
|
-
alt: publisher.name,
|
|
7926
|
-
className: "w-10 h-10 rounded-full object-cover"
|
|
7927
|
-
}
|
|
7928
|
-
) : /* @__PURE__ */ jsx("div", { className: "w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center text-primary text-sm font-bold", children: publisher.name.charAt(0).toUpperCase() }),
|
|
7420
|
+
publisher.logoUrl ? /* @__PURE__ */ jsx("img", { src: publisher.logoUrl, alt: publisher.name, className: "w-10 h-10 rounded-full object-cover" }) : /* @__PURE__ */ jsx("div", { className: "w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center text-primary text-sm font-bold", children: publisher.name.charAt(0).toUpperCase() }),
|
|
7929
7421
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
7930
7422
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
7931
7423
|
/* @__PURE__ */ jsx("span", { className: "font-semibold text-foreground text-sm", children: publisher.name }),
|
|
@@ -7951,46 +7443,11 @@ function StoreProductDetailPage({
|
|
|
7951
7443
|
] })
|
|
7952
7444
|
] }),
|
|
7953
7445
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-1.5 pt-1", children: [
|
|
7954
|
-
/* @__PURE__ */ jsx(
|
|
7955
|
-
|
|
7956
|
-
|
|
7957
|
-
|
|
7958
|
-
|
|
7959
|
-
total: totalRatings
|
|
7960
|
-
}
|
|
7961
|
-
),
|
|
7962
|
-
/* @__PURE__ */ jsx(
|
|
7963
|
-
RatingBar,
|
|
7964
|
-
{
|
|
7965
|
-
label: "4 \u2605",
|
|
7966
|
-
count: ratingDistribution.fourStars,
|
|
7967
|
-
total: totalRatings
|
|
7968
|
-
}
|
|
7969
|
-
),
|
|
7970
|
-
/* @__PURE__ */ jsx(
|
|
7971
|
-
RatingBar,
|
|
7972
|
-
{
|
|
7973
|
-
label: "3 \u2605",
|
|
7974
|
-
count: ratingDistribution.threeStars,
|
|
7975
|
-
total: totalRatings
|
|
7976
|
-
}
|
|
7977
|
-
),
|
|
7978
|
-
/* @__PURE__ */ jsx(
|
|
7979
|
-
RatingBar,
|
|
7980
|
-
{
|
|
7981
|
-
label: "2 \u2605",
|
|
7982
|
-
count: ratingDistribution.twoStars,
|
|
7983
|
-
total: totalRatings
|
|
7984
|
-
}
|
|
7985
|
-
),
|
|
7986
|
-
/* @__PURE__ */ jsx(
|
|
7987
|
-
RatingBar,
|
|
7988
|
-
{
|
|
7989
|
-
label: "1 \u2605",
|
|
7990
|
-
count: ratingDistribution.oneStar,
|
|
7991
|
-
total: totalRatings
|
|
7992
|
-
}
|
|
7993
|
-
)
|
|
7446
|
+
/* @__PURE__ */ jsx(RatingBar, { label: "5 \u2605", count: ratingDistribution.fiveStars, total: totalRatings }),
|
|
7447
|
+
/* @__PURE__ */ jsx(RatingBar, { label: "4 \u2605", count: ratingDistribution.fourStars, total: totalRatings }),
|
|
7448
|
+
/* @__PURE__ */ jsx(RatingBar, { label: "3 \u2605", count: ratingDistribution.threeStars, total: totalRatings }),
|
|
7449
|
+
/* @__PURE__ */ jsx(RatingBar, { label: "2 \u2605", count: ratingDistribution.twoStars, total: totalRatings }),
|
|
7450
|
+
/* @__PURE__ */ jsx(RatingBar, { label: "1 \u2605", count: ratingDistribution.oneStar, total: totalRatings })
|
|
7994
7451
|
] })
|
|
7995
7452
|
] }),
|
|
7996
7453
|
/* @__PURE__ */ jsx("div", { className: "space-y-3", children: reviews.slice(0, 5).map((review, idx) => /* @__PURE__ */ jsxs(
|
|
@@ -8005,14 +7462,11 @@ function StoreProductDetailPage({
|
|
|
8005
7462
|
] }),
|
|
8006
7463
|
review.title && /* @__PURE__ */ jsx("p", { className: "font-semibold text-sm text-foreground mb-1", children: review.title }),
|
|
8007
7464
|
review.comment && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground leading-relaxed", children: review.comment }),
|
|
8008
|
-
review.createdAt && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mt-2", children: new Date(review.createdAt).toLocaleDateString(
|
|
8009
|
-
"
|
|
8010
|
-
|
|
8011
|
-
|
|
8012
|
-
|
|
8013
|
-
day: "numeric"
|
|
8014
|
-
}
|
|
8015
|
-
) })
|
|
7465
|
+
review.createdAt && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mt-2", children: new Date(review.createdAt).toLocaleDateString("en-US", {
|
|
7466
|
+
year: "numeric",
|
|
7467
|
+
month: "short",
|
|
7468
|
+
day: "numeric"
|
|
7469
|
+
}) })
|
|
8016
7470
|
]
|
|
8017
7471
|
},
|
|
8018
7472
|
review.id
|
|
@@ -8032,13 +7486,7 @@ function StoreProductDetailPage({
|
|
|
8032
7486
|
] }),
|
|
8033
7487
|
/* @__PURE__ */ jsx("aside", { className: "lg:sticky lg:top-24 self-start", children: /* @__PURE__ */ jsxs("div", { className: "sd-fu sd-d4 bg-card border border-border rounded-xl p-5 space-y-4 hover:border-primary/30 transition-colors duration-300 hover:shadow-lg hover:shadow-primary/5", children: [
|
|
8034
7488
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
8035
|
-
/* @__PURE__ */ jsx(
|
|
8036
|
-
"div",
|
|
8037
|
-
{
|
|
8038
|
-
className: `text-3xl font-extrabold ${priceLabel === "Free" ? "text-emerald-500" : "text-foreground"}`,
|
|
8039
|
-
children: priceLabel
|
|
8040
|
-
}
|
|
8041
|
-
),
|
|
7489
|
+
/* @__PURE__ */ jsx("div", { className: `text-3xl font-extrabold ${priceLabel === "Free" ? "text-emerald-500" : "text-foreground"}`, children: priceLabel }),
|
|
8042
7490
|
product.pricingModel === "SUBSCRIPTION" && /* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground", children: "per month" })
|
|
8043
7491
|
] }),
|
|
8044
7492
|
/* @__PURE__ */ jsx(
|