@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.js
CHANGED
|
@@ -6266,11 +6266,7 @@ function TypeBadge({ type }) {
|
|
|
6266
6266
|
return /* @__PURE__ */ jsxRuntime.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 });
|
|
6267
6267
|
}
|
|
6268
6268
|
function ProductCard({ product, onClick, href }) {
|
|
6269
|
-
const priceLabel = formatPrice2(
|
|
6270
|
-
product.price,
|
|
6271
|
-
product.currency,
|
|
6272
|
-
product.pricingModel
|
|
6273
|
-
);
|
|
6269
|
+
const priceLabel = formatPrice2(product.price, product.currency, product.pricingModel);
|
|
6274
6270
|
const inner = /* @__PURE__ */ jsxRuntime.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: [
|
|
6275
6271
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-2", children: [
|
|
6276
6272
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-12 h-12 rounded-lg bg-muted flex-shrink-0 overflow-hidden", children: product.icon ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6281,48 +6277,11 @@ function ProductCard({ product, onClick, href }) {
|
|
|
6281
6277
|
"aria-hidden": "true",
|
|
6282
6278
|
className: "w-full h-full object-cover"
|
|
6283
6279
|
}
|
|
6284
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center bg-gradient-to-br from-primary/15 to-primary/5", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6285
|
-
"
|
|
6286
|
-
{
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
fill: "none",
|
|
6290
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
6291
|
-
"aria-hidden": "true",
|
|
6292
|
-
children: [
|
|
6293
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6294
|
-
"polygon",
|
|
6295
|
-
{
|
|
6296
|
-
points: "16,4 28,10 16,16 4,10",
|
|
6297
|
-
className: "fill-primary/30",
|
|
6298
|
-
stroke: "currentColor",
|
|
6299
|
-
strokeWidth: "0.6",
|
|
6300
|
-
strokeOpacity: "0.35"
|
|
6301
|
-
}
|
|
6302
|
-
),
|
|
6303
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6304
|
-
"polygon",
|
|
6305
|
-
{
|
|
6306
|
-
points: "4,10 16,16 16,28 4,22",
|
|
6307
|
-
className: "fill-primary/15",
|
|
6308
|
-
stroke: "currentColor",
|
|
6309
|
-
strokeWidth: "0.6",
|
|
6310
|
-
strokeOpacity: "0.35"
|
|
6311
|
-
}
|
|
6312
|
-
),
|
|
6313
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6314
|
-
"polygon",
|
|
6315
|
-
{
|
|
6316
|
-
points: "28,10 16,16 16,28 28,22",
|
|
6317
|
-
className: "fill-primary/20",
|
|
6318
|
-
stroke: "currentColor",
|
|
6319
|
-
strokeWidth: "0.6",
|
|
6320
|
-
strokeOpacity: "0.35"
|
|
6321
|
-
}
|
|
6322
|
-
)
|
|
6323
|
-
]
|
|
6324
|
-
}
|
|
6325
|
-
) }) }),
|
|
6280
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center bg-gradient-to-br from-primary/15 to-primary/5", children: /* @__PURE__ */ jsxRuntime.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: [
|
|
6281
|
+
/* @__PURE__ */ jsxRuntime.jsx("polygon", { points: "16,4 28,10 16,16 4,10", className: "fill-primary/30", stroke: "currentColor", strokeWidth: "0.6", strokeOpacity: "0.35" }),
|
|
6282
|
+
/* @__PURE__ */ jsxRuntime.jsx("polygon", { points: "4,10 16,16 16,28 4,22", className: "fill-primary/15", stroke: "currentColor", strokeWidth: "0.6", strokeOpacity: "0.35" }),
|
|
6283
|
+
/* @__PURE__ */ jsxRuntime.jsx("polygon", { points: "28,10 16,16 16,28 28,22", className: "fill-primary/20", stroke: "currentColor", strokeWidth: "0.6", strokeOpacity: "0.35" })
|
|
6284
|
+
] }) }) }),
|
|
6326
6285
|
/* @__PURE__ */ jsxRuntime.jsx(TypeBadge, { type: product.type })
|
|
6327
6286
|
] }),
|
|
6328
6287
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
@@ -6431,11 +6390,7 @@ function FeaturedHeroCard({
|
|
|
6431
6390
|
product,
|
|
6432
6391
|
onNavigate
|
|
6433
6392
|
}) {
|
|
6434
|
-
const priceLabel = formatPrice2(
|
|
6435
|
-
product.price,
|
|
6436
|
-
product.currency,
|
|
6437
|
-
product.pricingModel
|
|
6438
|
-
);
|
|
6393
|
+
const priceLabel = formatPrice2(product.price, product.currency, product.pricingModel);
|
|
6439
6394
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6440
6395
|
"button",
|
|
6441
6396
|
{
|
|
@@ -6444,155 +6399,28 @@ function FeaturedHeroCard({
|
|
|
6444
6399
|
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",
|
|
6445
6400
|
children: [
|
|
6446
6401
|
/* @__PURE__ */ jsxRuntime.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: [
|
|
6447
|
-
product.bannerUrl ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
6448
|
-
"
|
|
6449
|
-
|
|
6450
|
-
|
|
6451
|
-
|
|
6452
|
-
|
|
6453
|
-
className: "
|
|
6454
|
-
|
|
6455
|
-
|
|
6456
|
-
|
|
6457
|
-
"svg",
|
|
6458
|
-
{
|
|
6459
|
-
className: "absolute inset-0 w-full h-full opacity-[0.07]",
|
|
6460
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
6461
|
-
"aria-hidden": "true",
|
|
6462
|
-
children: [
|
|
6463
|
-
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6464
|
-
"pattern",
|
|
6465
|
-
{
|
|
6466
|
-
id: "fg-hero-grid",
|
|
6467
|
-
width: "36",
|
|
6468
|
-
height: "36",
|
|
6469
|
-
patternUnits: "userSpaceOnUse",
|
|
6470
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6471
|
-
"path",
|
|
6472
|
-
{
|
|
6473
|
-
d: "M 36 0 L 0 0 0 36",
|
|
6474
|
-
fill: "none",
|
|
6475
|
-
stroke: "currentColor",
|
|
6476
|
-
strokeWidth: "1"
|
|
6477
|
-
}
|
|
6478
|
-
)
|
|
6479
|
-
}
|
|
6480
|
-
) }),
|
|
6481
|
-
/* @__PURE__ */ jsxRuntime.jsx("rect", { width: "100%", height: "100%", fill: "url(#fg-hero-grid)" })
|
|
6482
|
-
]
|
|
6483
|
-
}
|
|
6484
|
-
),
|
|
6485
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6486
|
-
"div",
|
|
6487
|
-
{
|
|
6488
|
-
className: "absolute inset-0 flex items-center justify-center",
|
|
6489
|
-
"aria-hidden": "true",
|
|
6490
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6491
|
-
"svg",
|
|
6492
|
-
{
|
|
6493
|
-
viewBox: "0 0 64 64",
|
|
6494
|
-
className: "w-20 h-20 opacity-25",
|
|
6495
|
-
fill: "none",
|
|
6496
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
6497
|
-
children: [
|
|
6498
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6499
|
-
"polygon",
|
|
6500
|
-
{
|
|
6501
|
-
points: "32,8 56,20 32,32 8,20",
|
|
6502
|
-
className: "fill-primary/40",
|
|
6503
|
-
stroke: "currentColor",
|
|
6504
|
-
strokeWidth: "1",
|
|
6505
|
-
strokeOpacity: "0.5"
|
|
6506
|
-
}
|
|
6507
|
-
),
|
|
6508
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6509
|
-
"polygon",
|
|
6510
|
-
{
|
|
6511
|
-
points: "8,20 32,32 32,56 8,44",
|
|
6512
|
-
className: "fill-primary/20",
|
|
6513
|
-
stroke: "currentColor",
|
|
6514
|
-
strokeWidth: "1",
|
|
6515
|
-
strokeOpacity: "0.5"
|
|
6516
|
-
}
|
|
6517
|
-
),
|
|
6518
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6519
|
-
"polygon",
|
|
6520
|
-
{
|
|
6521
|
-
points: "56,20 32,32 32,56 56,44",
|
|
6522
|
-
className: "fill-primary/30",
|
|
6523
|
-
stroke: "currentColor",
|
|
6524
|
-
strokeWidth: "1",
|
|
6525
|
-
strokeOpacity: "0.5"
|
|
6526
|
-
}
|
|
6527
|
-
)
|
|
6528
|
-
]
|
|
6529
|
-
}
|
|
6530
|
-
)
|
|
6531
|
-
}
|
|
6532
|
-
)
|
|
6402
|
+
product.bannerUrl ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: product.bannerUrl, alt: "", "aria-hidden": "true", className: "w-full h-full object-cover" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6403
|
+
/* @__PURE__ */ jsxRuntime.jsxs("svg", { className: "absolute inset-0 w-full h-full opacity-[0.07]", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [
|
|
6404
|
+
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx("pattern", { id: "fg-hero-grid", width: "36", height: "36", patternUnits: "userSpaceOnUse", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M 36 0 L 0 0 0 36", fill: "none", stroke: "currentColor", strokeWidth: "1" }) }) }),
|
|
6405
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { width: "100%", height: "100%", fill: "url(#fg-hero-grid)" })
|
|
6406
|
+
] }),
|
|
6407
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { viewBox: "0 0 64 64", className: "w-20 h-20 opacity-25", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
6408
|
+
/* @__PURE__ */ jsxRuntime.jsx("polygon", { points: "32,8 56,20 32,32 8,20", className: "fill-primary/40", stroke: "currentColor", strokeWidth: "1", strokeOpacity: "0.5" }),
|
|
6409
|
+
/* @__PURE__ */ jsxRuntime.jsx("polygon", { points: "8,20 32,32 32,56 8,44", className: "fill-primary/20", stroke: "currentColor", strokeWidth: "1", strokeOpacity: "0.5" }),
|
|
6410
|
+
/* @__PURE__ */ jsxRuntime.jsx("polygon", { points: "56,20 32,32 32,56 56,44", className: "fill-primary/30", stroke: "currentColor", strokeWidth: "1", strokeOpacity: "0.5" })
|
|
6411
|
+
] }) })
|
|
6533
6412
|
] }),
|
|
6534
6413
|
/* @__PURE__ */ jsxRuntime.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" }),
|
|
6535
|
-
/* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx(
|
|
6536
|
-
"
|
|
6537
|
-
{
|
|
6538
|
-
|
|
6539
|
-
|
|
6540
|
-
"aria-hidden": "true",
|
|
6541
|
-
className: "w-full h-full object-cover"
|
|
6542
|
-
}
|
|
6543
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full bg-gradient-to-br from-primary/25 to-primary/10 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6544
|
-
"svg",
|
|
6545
|
-
{
|
|
6546
|
-
viewBox: "0 0 32 32",
|
|
6547
|
-
className: "w-8 h-8",
|
|
6548
|
-
fill: "none",
|
|
6549
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
6550
|
-
"aria-hidden": "true",
|
|
6551
|
-
children: [
|
|
6552
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6553
|
-
"polygon",
|
|
6554
|
-
{
|
|
6555
|
-
points: "16,4 28,10 16,16 4,10",
|
|
6556
|
-
className: "fill-primary/40",
|
|
6557
|
-
stroke: "currentColor",
|
|
6558
|
-
strokeWidth: "0.6",
|
|
6559
|
-
strokeOpacity: "0.4"
|
|
6560
|
-
}
|
|
6561
|
-
),
|
|
6562
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6563
|
-
"polygon",
|
|
6564
|
-
{
|
|
6565
|
-
points: "4,10 16,16 16,28 4,22",
|
|
6566
|
-
className: "fill-primary/20",
|
|
6567
|
-
stroke: "currentColor",
|
|
6568
|
-
strokeWidth: "0.6",
|
|
6569
|
-
strokeOpacity: "0.4"
|
|
6570
|
-
}
|
|
6571
|
-
),
|
|
6572
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6573
|
-
"polygon",
|
|
6574
|
-
{
|
|
6575
|
-
points: "28,10 16,16 16,28 28,22",
|
|
6576
|
-
className: "fill-primary/30",
|
|
6577
|
-
stroke: "currentColor",
|
|
6578
|
-
strokeWidth: "0.6",
|
|
6579
|
-
strokeOpacity: "0.4"
|
|
6580
|
-
}
|
|
6581
|
-
)
|
|
6582
|
-
]
|
|
6583
|
-
}
|
|
6584
|
-
) }) })
|
|
6414
|
+
/* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx("img", { src: product.icon, alt: "", "aria-hidden": "true", className: "w-full h-full object-cover" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full bg-gradient-to-br from-primary/25 to-primary/10 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.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: [
|
|
6415
|
+
/* @__PURE__ */ jsxRuntime.jsx("polygon", { points: "16,4 28,10 16,16 4,10", className: "fill-primary/40", stroke: "currentColor", strokeWidth: "0.6", strokeOpacity: "0.4" }),
|
|
6416
|
+
/* @__PURE__ */ jsxRuntime.jsx("polygon", { points: "4,10 16,16 16,28 4,22", className: "fill-primary/20", stroke: "currentColor", strokeWidth: "0.6", strokeOpacity: "0.4" }),
|
|
6417
|
+
/* @__PURE__ */ jsxRuntime.jsx("polygon", { points: "28,10 16,16 16,28 28,22", className: "fill-primary/30", stroke: "currentColor", strokeWidth: "0.6", strokeOpacity: "0.4" })
|
|
6418
|
+
] }) }) })
|
|
6585
6419
|
] }),
|
|
6586
6420
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-5 flex flex-col flex-1", children: [
|
|
6587
6421
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-3 mb-2", children: [
|
|
6588
6422
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-bold text-foreground group-hover:text-primary transition-colors line-clamp-1", children: product.name }),
|
|
6589
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6590
|
-
"span",
|
|
6591
|
-
{
|
|
6592
|
-
className: `text-sm font-bold flex-shrink-0 ${priceLabel === "Free" ? "text-emerald-500" : "text-foreground"}`,
|
|
6593
|
-
children: priceLabel
|
|
6594
|
-
}
|
|
6595
|
-
)
|
|
6423
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-sm font-bold flex-shrink-0 ${priceLabel === "Free" ? "text-emerald-500" : "text-foreground"}`, children: priceLabel })
|
|
6596
6424
|
] }),
|
|
6597
6425
|
product.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground line-clamp-2 leading-relaxed flex-1", children: product.description }),
|
|
6598
6426
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 flex items-center gap-2", children: [
|
|
@@ -6613,10 +6441,7 @@ function ScrollRow({
|
|
|
6613
6441
|
}) {
|
|
6614
6442
|
const ref = React.useRef(null);
|
|
6615
6443
|
function scroll(dir) {
|
|
6616
|
-
ref.current?.scrollBy({
|
|
6617
|
-
left: dir === "r" ? 272 : -272,
|
|
6618
|
-
behavior: "smooth"
|
|
6619
|
-
});
|
|
6444
|
+
ref.current?.scrollBy({ left: dir === "r" ? 272 : -272, behavior: "smooth" });
|
|
6620
6445
|
}
|
|
6621
6446
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative group/row", children: [
|
|
6622
6447
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6626,19 +6451,7 @@ function ScrollRow({
|
|
|
6626
6451
|
onClick: () => scroll("l"),
|
|
6627
6452
|
"aria-label": "Scroll left",
|
|
6628
6453
|
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",
|
|
6629
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6630
|
-
"svg",
|
|
6631
|
-
{
|
|
6632
|
-
viewBox: "0 0 16 16",
|
|
6633
|
-
className: "w-4 h-4",
|
|
6634
|
-
fill: "none",
|
|
6635
|
-
stroke: "currentColor",
|
|
6636
|
-
strokeWidth: "1.5",
|
|
6637
|
-
strokeLinecap: "round",
|
|
6638
|
-
strokeLinejoin: "round",
|
|
6639
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10 3L6 8l4 5" })
|
|
6640
|
-
}
|
|
6641
|
-
)
|
|
6454
|
+
children: /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx("path", { d: "M10 3L6 8l4 5" }) })
|
|
6642
6455
|
}
|
|
6643
6456
|
),
|
|
6644
6457
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6647,13 +6460,7 @@ function ScrollRow({
|
|
|
6647
6460
|
ref,
|
|
6648
6461
|
className: "flex gap-3 overflow-x-auto pb-1 snap-x snap-mandatory",
|
|
6649
6462
|
style: { scrollbarWidth: "none", msOverflowStyle: "none" },
|
|
6650
|
-
children: products.map((product) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0 w-56 snap-start", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6651
|
-
ProductCard,
|
|
6652
|
-
{
|
|
6653
|
-
product,
|
|
6654
|
-
onClick: () => onProductClick(product)
|
|
6655
|
-
}
|
|
6656
|
-
) }, product.id))
|
|
6463
|
+
children: products.map((product) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0 w-56 snap-start", children: /* @__PURE__ */ jsxRuntime.jsx(ProductCard, { product, onClick: () => onProductClick(product) }) }, product.id))
|
|
6657
6464
|
}
|
|
6658
6465
|
),
|
|
6659
6466
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6663,19 +6470,7 @@ function ScrollRow({
|
|
|
6663
6470
|
onClick: () => scroll("r"),
|
|
6664
6471
|
"aria-label": "Scroll right",
|
|
6665
6472
|
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",
|
|
6666
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6667
|
-
"svg",
|
|
6668
|
-
{
|
|
6669
|
-
viewBox: "0 0 16 16",
|
|
6670
|
-
className: "w-4 h-4",
|
|
6671
|
-
fill: "none",
|
|
6672
|
-
stroke: "currentColor",
|
|
6673
|
-
strokeWidth: "1.5",
|
|
6674
|
-
strokeLinecap: "round",
|
|
6675
|
-
strokeLinejoin: "round",
|
|
6676
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6 3l4 5-4 5" })
|
|
6677
|
-
}
|
|
6678
|
-
)
|
|
6473
|
+
children: /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx("path", { d: "M6 3l4 5-4 5" }) })
|
|
6679
6474
|
}
|
|
6680
6475
|
)
|
|
6681
6476
|
] });
|
|
@@ -6778,8 +6573,10 @@ function StoreHomePage({
|
|
|
6778
6573
|
const [grouped, setGrouped] = React.useState(null);
|
|
6779
6574
|
const [loading, setLoading] = React.useState(true);
|
|
6780
6575
|
const [error, setError] = React.useState(null);
|
|
6576
|
+
const [retryKey, setRetryKey] = React.useState(0);
|
|
6781
6577
|
React.useEffect(() => {
|
|
6782
6578
|
let cancelled = false;
|
|
6579
|
+
let autoRetryTimer = null;
|
|
6783
6580
|
async function load() {
|
|
6784
6581
|
setLoading(true);
|
|
6785
6582
|
try {
|
|
@@ -6793,7 +6590,15 @@ function StoreHomePage({
|
|
|
6793
6590
|
setGrouped(res.data.homeGroupedProducts);
|
|
6794
6591
|
setError(null);
|
|
6795
6592
|
} catch {
|
|
6796
|
-
if (!cancelled)
|
|
6593
|
+
if (!cancelled) {
|
|
6594
|
+
if (retryKey < 1) {
|
|
6595
|
+
autoRetryTimer = setTimeout(() => {
|
|
6596
|
+
if (!cancelled) setRetryKey(1);
|
|
6597
|
+
}, 2e3);
|
|
6598
|
+
} else {
|
|
6599
|
+
setError("Failed to load store. Please try again.");
|
|
6600
|
+
}
|
|
6601
|
+
}
|
|
6797
6602
|
} finally {
|
|
6798
6603
|
if (!cancelled) setLoading(false);
|
|
6799
6604
|
}
|
|
@@ -6801,8 +6606,9 @@ function StoreHomePage({
|
|
|
6801
6606
|
load();
|
|
6802
6607
|
return () => {
|
|
6803
6608
|
cancelled = true;
|
|
6609
|
+
if (autoRetryTimer) clearTimeout(autoRetryTimer);
|
|
6804
6610
|
};
|
|
6805
|
-
}, [client, compatibleWith]);
|
|
6611
|
+
}, [client, compatibleWith, retryKey]);
|
|
6806
6612
|
function navigate(path) {
|
|
6807
6613
|
if (onNavigate) {
|
|
6808
6614
|
onNavigate(path);
|
|
@@ -6830,65 +6636,16 @@ function StoreHomePage({
|
|
|
6830
6636
|
}
|
|
6831
6637
|
),
|
|
6832
6638
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "relative overflow-hidden pt-14 pb-12 sm:pt-20 sm:pb-16", children: [
|
|
6833
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6834
|
-
|
|
6835
|
-
{
|
|
6836
|
-
|
|
6837
|
-
|
|
6838
|
-
|
|
6839
|
-
),
|
|
6840
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6841
|
-
"svg",
|
|
6842
|
-
{
|
|
6843
|
-
className: "absolute inset-0 w-full h-full opacity-[0.035] pointer-events-none",
|
|
6844
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
6845
|
-
"aria-hidden": "true",
|
|
6846
|
-
children: [
|
|
6847
|
-
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6848
|
-
"pattern",
|
|
6849
|
-
{
|
|
6850
|
-
id: "store-home-grid",
|
|
6851
|
-
width: "40",
|
|
6852
|
-
height: "40",
|
|
6853
|
-
patternUnits: "userSpaceOnUse",
|
|
6854
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6855
|
-
"path",
|
|
6856
|
-
{
|
|
6857
|
-
d: "M 40 0 L 0 0 0 40",
|
|
6858
|
-
fill: "none",
|
|
6859
|
-
stroke: "currentColor",
|
|
6860
|
-
strokeWidth: "1"
|
|
6861
|
-
}
|
|
6862
|
-
)
|
|
6863
|
-
}
|
|
6864
|
-
) }),
|
|
6865
|
-
/* @__PURE__ */ jsxRuntime.jsx("rect", { width: "100%", height: "100%", fill: "url(#store-home-grid)" })
|
|
6866
|
-
]
|
|
6867
|
-
}
|
|
6868
|
-
),
|
|
6869
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6870
|
-
"div",
|
|
6871
|
-
{
|
|
6872
|
-
className: "absolute -top-16 left-1/3 w-80 h-80 rounded-full bg-primary/10 blur-3xl pointer-events-none",
|
|
6873
|
-
"aria-hidden": "true"
|
|
6874
|
-
}
|
|
6875
|
-
),
|
|
6876
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6877
|
-
"div",
|
|
6878
|
-
{
|
|
6879
|
-
className: "absolute top-8 right-1/4 w-56 h-56 rounded-full bg-primary/8 blur-2xl pointer-events-none",
|
|
6880
|
-
"aria-hidden": "true"
|
|
6881
|
-
}
|
|
6882
|
-
),
|
|
6639
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 bg-gradient-to-b from-background via-primary/[0.06] to-background pointer-events-none", "aria-hidden": "true" }),
|
|
6640
|
+
/* @__PURE__ */ jsxRuntime.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: [
|
|
6641
|
+
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx("pattern", { id: "store-home-grid", width: "40", height: "40", patternUnits: "userSpaceOnUse", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M 40 0 L 0 0 0 40", fill: "none", stroke: "currentColor", strokeWidth: "1" }) }) }),
|
|
6642
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { width: "100%", height: "100%", fill: "url(#store-home-grid)" })
|
|
6643
|
+
] }),
|
|
6644
|
+
/* @__PURE__ */ jsxRuntime.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" }),
|
|
6645
|
+
/* @__PURE__ */ jsxRuntime.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" }),
|
|
6883
6646
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center", children: [
|
|
6884
6647
|
/* @__PURE__ */ jsxRuntime.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: [
|
|
6885
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6886
|
-
"span",
|
|
6887
|
-
{
|
|
6888
|
-
className: "w-1.5 h-1.5 rounded-full bg-primary flex-shrink-0",
|
|
6889
|
-
"aria-hidden": "true"
|
|
6890
|
-
}
|
|
6891
|
-
),
|
|
6648
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-primary flex-shrink-0", "aria-hidden": "true" }),
|
|
6892
6649
|
"Community Marketplace"
|
|
6893
6650
|
] }),
|
|
6894
6651
|
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-4xl sm:text-5xl md:text-6xl font-extrabold tracking-tight text-foreground mb-4 leading-[1.08]", children: resolvedTitle }),
|
|
@@ -6900,9 +6657,7 @@ function StoreHomePage({
|
|
|
6900
6657
|
onSubmit: (e) => {
|
|
6901
6658
|
e.preventDefault();
|
|
6902
6659
|
const q = new FormData(e.currentTarget).get("q");
|
|
6903
|
-
navigate(
|
|
6904
|
-
q.trim() ? `${browsePath}?q=${encodeURIComponent(q.trim())}` : browsePath
|
|
6905
|
-
);
|
|
6660
|
+
navigate(q.trim() ? `${browsePath}?q=${encodeURIComponent(q.trim())}` : browsePath);
|
|
6906
6661
|
},
|
|
6907
6662
|
children: [
|
|
6908
6663
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6944,23 +6699,9 @@ function StoreHomePage({
|
|
|
6944
6699
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4", children: [...Array(4)].map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(GridCardSkeleton, {}, i)) })
|
|
6945
6700
|
] }) : error ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "py-16 text-center", children: [
|
|
6946
6701
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mb-4", children: error }),
|
|
6947
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6948
|
-
"button",
|
|
6949
|
-
{
|
|
6950
|
-
type: "button",
|
|
6951
|
-
onClick: () => window.location.reload(),
|
|
6952
|
-
className: "text-sm text-primary hover:underline",
|
|
6953
|
-
children: "Retry"
|
|
6954
|
-
}
|
|
6955
|
-
)
|
|
6702
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: () => setRetryKey((k) => k + 1), className: "text-sm text-primary hover:underline", children: "Retry" })
|
|
6956
6703
|
] }) : featuredItems.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[1fr_2fr] gap-4 items-start", children: [
|
|
6957
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6958
|
-
FeaturedHeroCard,
|
|
6959
|
-
{
|
|
6960
|
-
product: featuredItems[0],
|
|
6961
|
-
onNavigate: navigate
|
|
6962
|
-
}
|
|
6963
|
-
),
|
|
6704
|
+
/* @__PURE__ */ jsxRuntime.jsx(FeaturedHeroCard, { product: featuredItems[0], onNavigate: navigate }),
|
|
6964
6705
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4", children: featuredItems.slice(1, 5).map((product) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6965
6706
|
ProductCard,
|
|
6966
6707
|
{
|
|
@@ -6981,13 +6722,7 @@ function StoreHomePage({
|
|
|
6981
6722
|
onNavigate: navigate
|
|
6982
6723
|
}
|
|
6983
6724
|
),
|
|
6984
|
-
loading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-3 overflow-hidden", children: [...Array(5)].map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(ScrollCardSkeleton, {}, i)) }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
6985
|
-
ScrollRow,
|
|
6986
|
-
{
|
|
6987
|
-
products: popularItems,
|
|
6988
|
-
onProductClick: handleProductClick
|
|
6989
|
-
}
|
|
6990
|
-
)
|
|
6725
|
+
loading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-3 overflow-hidden", children: [...Array(5)].map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(ScrollCardSkeleton, {}, i)) }) : /* @__PURE__ */ jsxRuntime.jsx(ScrollRow, { products: popularItems, onProductClick: handleProductClick })
|
|
6991
6726
|
] }),
|
|
6992
6727
|
(loading || freeItems.length > 0) && /* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
|
|
6993
6728
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7010,35 +6745,16 @@ function StoreHomePage({
|
|
|
7010
6745
|
] })
|
|
7011
6746
|
] }),
|
|
7012
6747
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "relative overflow-hidden border-t border-border", children: [
|
|
7013
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7014
|
-
|
|
7015
|
-
{
|
|
7016
|
-
className: "absolute inset-0 bg-gradient-to-br from-primary/8 via-background to-primary/5 pointer-events-none",
|
|
7017
|
-
"aria-hidden": "true"
|
|
7018
|
-
}
|
|
7019
|
-
),
|
|
7020
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7021
|
-
"div",
|
|
7022
|
-
{
|
|
7023
|
-
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",
|
|
7024
|
-
"aria-hidden": "true"
|
|
7025
|
-
}
|
|
7026
|
-
),
|
|
6748
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 bg-gradient-to-br from-primary/8 via-background to-primary/5 pointer-events-none", "aria-hidden": "true" }),
|
|
6749
|
+
/* @__PURE__ */ jsxRuntime.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" }),
|
|
7027
6750
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative max-w-2xl mx-auto px-4 py-16 text-center", children: [
|
|
7028
6751
|
/* @__PURE__ */ jsxRuntime.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: [
|
|
7029
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7030
|
-
"span",
|
|
7031
|
-
{
|
|
7032
|
-
className: "w-1.5 h-1.5 rounded-full bg-primary flex-shrink-0",
|
|
7033
|
-
"aria-hidden": "true"
|
|
7034
|
-
}
|
|
7035
|
-
),
|
|
6752
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-primary flex-shrink-0", "aria-hidden": "true" }),
|
|
7036
6753
|
"Become a publisher"
|
|
7037
6754
|
] }),
|
|
7038
6755
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl sm:text-3xl font-bold text-foreground mb-3", children: "Built something useful?" }),
|
|
7039
6756
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-muted-foreground mb-8 max-w-lg mx-auto leading-relaxed", children: [
|
|
7040
|
-
"Share your workflows, nodes, and integrations with",
|
|
7041
|
-
" ",
|
|
6757
|
+
"Share your workflows, nodes, and integrations with ",
|
|
7042
6758
|
productName ?? "the",
|
|
7043
6759
|
" community. Earn from your work or contribute for free."
|
|
7044
6760
|
] }),
|
|
@@ -7094,14 +6810,7 @@ var PRICING_OPTIONS = [
|
|
|
7094
6810
|
];
|
|
7095
6811
|
function parseUrlParams() {
|
|
7096
6812
|
if (typeof window === "undefined")
|
|
7097
|
-
return {
|
|
7098
|
-
q: "",
|
|
7099
|
-
type: "",
|
|
7100
|
-
pricingModel: "",
|
|
7101
|
-
category: "",
|
|
7102
|
-
sortBy: "RELEVANCE",
|
|
7103
|
-
featured: false
|
|
7104
|
-
};
|
|
6813
|
+
return { q: "", type: "", pricingModel: "", category: "", sortBy: "RELEVANCE", featured: false };
|
|
7105
6814
|
const p = new URLSearchParams(window.location.search);
|
|
7106
6815
|
return {
|
|
7107
6816
|
q: p.get("q") ?? "",
|
|
@@ -7153,9 +6862,7 @@ function StoreBrowsePage({
|
|
|
7153
6862
|
const [featured, setFeatured] = React.useState(initial.featured);
|
|
7154
6863
|
const [offset, setOffset] = React.useState(0);
|
|
7155
6864
|
const [result, setResult] = React.useState(null);
|
|
7156
|
-
const [allProducts, setAllProducts] = React.useState(
|
|
7157
|
-
[]
|
|
7158
|
-
);
|
|
6865
|
+
const [allProducts, setAllProducts] = React.useState([]);
|
|
7159
6866
|
const [categories, setCategories] = React.useState([]);
|
|
7160
6867
|
const [loading, setLoading] = React.useState(true);
|
|
7161
6868
|
const [loadingMore, setLoadingMore] = React.useState(false);
|
|
@@ -7199,16 +6906,7 @@ function StoreBrowsePage({
|
|
|
7199
6906
|
return () => {
|
|
7200
6907
|
cancelled = true;
|
|
7201
6908
|
};
|
|
7202
|
-
}, [
|
|
7203
|
-
client,
|
|
7204
|
-
search,
|
|
7205
|
-
type,
|
|
7206
|
-
pricingModel,
|
|
7207
|
-
category,
|
|
7208
|
-
sortBy,
|
|
7209
|
-
compatibleWith,
|
|
7210
|
-
featured
|
|
7211
|
-
]);
|
|
6909
|
+
}, [client, search, type, pricingModel, category, sortBy, compatibleWith, featured]);
|
|
7212
6910
|
function loadMore() {
|
|
7213
6911
|
const nextOffset = offset + PAGE_SIZE;
|
|
7214
6912
|
setLoadingMore(true);
|
|
@@ -7384,8 +7082,7 @@ function StoreBrowsePage({
|
|
|
7384
7082
|
onClick: () => setFiltersOpen(!filtersOpen),
|
|
7385
7083
|
className: "lg:hidden h-10 px-4 rounded-lg border border-border bg-background text-sm text-foreground hover:bg-muted/50 transition-colors",
|
|
7386
7084
|
children: [
|
|
7387
|
-
"Filters",
|
|
7388
|
-
" ",
|
|
7085
|
+
"Filters ",
|
|
7389
7086
|
hasActiveFilters && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: "\u2022" })
|
|
7390
7087
|
]
|
|
7391
7088
|
}
|
|
@@ -7399,32 +7096,14 @@ function StoreBrowsePage({
|
|
|
7399
7096
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mb-4 flex-wrap", children: [
|
|
7400
7097
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: loading ? "Loading\u2026" : `${result?.totalCount ?? 0} results` }),
|
|
7401
7098
|
hasActiveFilters && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap gap-1.5", children: [
|
|
7402
|
-
search && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7403
|
-
|
|
7404
|
-
|
|
7405
|
-
|
|
7406
|
-
onRemove: () => {
|
|
7407
|
-
setSearch("");
|
|
7408
|
-
setInputValue("");
|
|
7409
|
-
}
|
|
7410
|
-
}
|
|
7411
|
-
),
|
|
7099
|
+
search && /* @__PURE__ */ jsxRuntime.jsx(Chip, { label: `"${search}"`, onRemove: () => {
|
|
7100
|
+
setSearch("");
|
|
7101
|
+
setInputValue("");
|
|
7102
|
+
} }),
|
|
7412
7103
|
type && /* @__PURE__ */ jsxRuntime.jsx(Chip, { label: type, onRemove: () => setType("") }),
|
|
7413
|
-
pricingModel && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7414
|
-
Chip,
|
|
7415
|
-
{
|
|
7416
|
-
label: pricingModel,
|
|
7417
|
-
onRemove: () => setPricingModel("")
|
|
7418
|
-
}
|
|
7419
|
-
),
|
|
7104
|
+
pricingModel && /* @__PURE__ */ jsxRuntime.jsx(Chip, { label: pricingModel, onRemove: () => setPricingModel("") }),
|
|
7420
7105
|
category && /* @__PURE__ */ jsxRuntime.jsx(Chip, { label: category, onRemove: () => setCategory("") }),
|
|
7421
|
-
featured && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7422
|
-
Chip,
|
|
7423
|
-
{
|
|
7424
|
-
label: "Featured",
|
|
7425
|
-
onRemove: () => setFeatured(false)
|
|
7426
|
-
}
|
|
7427
|
-
)
|
|
7106
|
+
featured && /* @__PURE__ */ jsxRuntime.jsx(Chip, { label: "Featured", onRemove: () => setFeatured(false) })
|
|
7428
7107
|
] })
|
|
7429
7108
|
] }),
|
|
7430
7109
|
loading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 gap-4", children: [...Array(12)].map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7476,97 +7155,9 @@ function StoreBrowsePage({
|
|
|
7476
7155
|
function Chip({ label, onRemove }) {
|
|
7477
7156
|
return /* @__PURE__ */ jsxRuntime.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: [
|
|
7478
7157
|
label,
|
|
7479
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7480
|
-
"button",
|
|
7481
|
-
{
|
|
7482
|
-
type: "button",
|
|
7483
|
-
onClick: onRemove,
|
|
7484
|
-
"aria-label": `Remove ${label}`,
|
|
7485
|
-
className: "hover:opacity-70",
|
|
7486
|
-
children: "\xD7"
|
|
7487
|
-
}
|
|
7488
|
-
)
|
|
7158
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: onRemove, "aria-label": `Remove ${label}`, className: "hover:opacity-70", children: "\xD7" })
|
|
7489
7159
|
] });
|
|
7490
7160
|
}
|
|
7491
|
-
function detectTheme() {
|
|
7492
|
-
if (typeof document === "undefined") return "light";
|
|
7493
|
-
const root = document.documentElement;
|
|
7494
|
-
return root.classList.contains("dark") || root.getAttribute("data-theme") === "dark" ? "dark" : "light";
|
|
7495
|
-
}
|
|
7496
|
-
function WorkflowEmbed({
|
|
7497
|
-
appUrl,
|
|
7498
|
-
productId,
|
|
7499
|
-
theme,
|
|
7500
|
-
clickToInteract = true,
|
|
7501
|
-
hideCta = false,
|
|
7502
|
-
className,
|
|
7503
|
-
onError
|
|
7504
|
-
}) {
|
|
7505
|
-
const iframeRef = React.useRef(null);
|
|
7506
|
-
const [status, setStatus] = React.useState("loading");
|
|
7507
|
-
const [interactive, setInteractive] = React.useState(!clickToInteract);
|
|
7508
|
-
const resolvedTheme = React.useMemo(() => theme ?? detectTheme(), [theme]);
|
|
7509
|
-
const src = React.useMemo(() => {
|
|
7510
|
-
const base = appUrl.replace(/\/+$/, "");
|
|
7511
|
-
const params = new URLSearchParams({
|
|
7512
|
-
productId,
|
|
7513
|
-
theme: resolvedTheme
|
|
7514
|
-
});
|
|
7515
|
-
if (hideCta) params.set("cta", "false");
|
|
7516
|
-
return `${base}/embed/workflow?${params.toString()}`;
|
|
7517
|
-
}, [appUrl, productId, resolvedTheme, hideCta]);
|
|
7518
|
-
React.useEffect(() => {
|
|
7519
|
-
const handler = (event) => {
|
|
7520
|
-
if (event.source !== iframeRef.current?.contentWindow) return;
|
|
7521
|
-
const data = event.data;
|
|
7522
|
-
if (data?.type === "fluidgrids:embed:loaded") setStatus("loaded");
|
|
7523
|
-
if (data?.type === "fluidgrids:embed:error") {
|
|
7524
|
-
setStatus("error");
|
|
7525
|
-
onError?.(data.message ?? "Failed to load workflow preview");
|
|
7526
|
-
}
|
|
7527
|
-
};
|
|
7528
|
-
window.addEventListener("message", handler);
|
|
7529
|
-
return () => window.removeEventListener("message", handler);
|
|
7530
|
-
}, [onError]);
|
|
7531
|
-
if (status === "error") return null;
|
|
7532
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7533
|
-
"div",
|
|
7534
|
-
{
|
|
7535
|
-
className: `relative w-full overflow-hidden rounded-xl border border-border bg-muted ${className ?? ""}`,
|
|
7536
|
-
style: { aspectRatio: "16 / 9" },
|
|
7537
|
-
children: [
|
|
7538
|
-
status === "loading" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7539
|
-
"div",
|
|
7540
|
-
{
|
|
7541
|
-
className: "absolute inset-0 animate-pulse bg-muted",
|
|
7542
|
-
"aria-hidden": "true"
|
|
7543
|
-
}
|
|
7544
|
-
),
|
|
7545
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7546
|
-
"iframe",
|
|
7547
|
-
{
|
|
7548
|
-
ref: iframeRef,
|
|
7549
|
-
src,
|
|
7550
|
-
title: "Workflow preview",
|
|
7551
|
-
loading: "lazy",
|
|
7552
|
-
className: "h-full w-full border-0",
|
|
7553
|
-
style: interactive ? void 0 : { pointerEvents: "none" }
|
|
7554
|
-
}
|
|
7555
|
-
),
|
|
7556
|
-
clickToInteract && !interactive && status === "loaded" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7557
|
-
"button",
|
|
7558
|
-
{
|
|
7559
|
-
type: "button",
|
|
7560
|
-
onClick: () => setInteractive(true),
|
|
7561
|
-
className: "absolute inset-0 flex items-end justify-center bg-transparent pb-4",
|
|
7562
|
-
"aria-label": "Click to explore the workflow",
|
|
7563
|
-
children: /* @__PURE__ */ jsxRuntime.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" })
|
|
7564
|
-
}
|
|
7565
|
-
)
|
|
7566
|
-
]
|
|
7567
|
-
}
|
|
7568
|
-
);
|
|
7569
|
-
}
|
|
7570
7161
|
var ANIM_STYLES = `
|
|
7571
7162
|
@keyframes sdFadeUp {
|
|
7572
7163
|
from { opacity: 0; transform: translateY(16px); }
|
|
@@ -7599,11 +7190,50 @@ var ANIM_STYLES = `
|
|
|
7599
7190
|
.sd-d5 { animation-delay: 320ms; }
|
|
7600
7191
|
.sd-d6 { animation-delay: 400ms; }
|
|
7601
7192
|
`;
|
|
7602
|
-
function
|
|
7603
|
-
|
|
7604
|
-
|
|
7605
|
-
|
|
7606
|
-
})
|
|
7193
|
+
function mdInline(text) {
|
|
7194
|
+
const parts = text.split(/(\*\*[^*]+\*\*)/g);
|
|
7195
|
+
if (parts.length === 1) return text;
|
|
7196
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: parts.map(
|
|
7197
|
+
(part, i) => part.startsWith("**") && part.endsWith("**") ? /* @__PURE__ */ jsxRuntime.jsx("strong", { className: "font-semibold text-foreground", children: part.slice(2, -2) }, i) : part || null
|
|
7198
|
+
) });
|
|
7199
|
+
}
|
|
7200
|
+
function MdAbout({ content }) {
|
|
7201
|
+
let key = 0;
|
|
7202
|
+
const nodes = [];
|
|
7203
|
+
let listItems = [];
|
|
7204
|
+
const flushList = () => {
|
|
7205
|
+
if (!listItems.length) return;
|
|
7206
|
+
nodes.push(
|
|
7207
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "list-disc list-inside space-y-0.5 my-2", children: listItems.map((item, i) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "text-sm leading-relaxed", children: mdInline(item) }, i)) }, key++)
|
|
7208
|
+
);
|
|
7209
|
+
listItems = [];
|
|
7210
|
+
};
|
|
7211
|
+
for (const line of content.split("\n")) {
|
|
7212
|
+
if (!line.trim()) {
|
|
7213
|
+
flushList();
|
|
7214
|
+
continue;
|
|
7215
|
+
}
|
|
7216
|
+
const hm = line.match(/^(#{1,3})\s+(.*)/);
|
|
7217
|
+
if (hm) {
|
|
7218
|
+
flushList();
|
|
7219
|
+
nodes.push(
|
|
7220
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-semibold text-foreground mt-4 first:mt-0 text-sm", children: mdInline(hm[2]) }, key++)
|
|
7221
|
+
);
|
|
7222
|
+
continue;
|
|
7223
|
+
}
|
|
7224
|
+
if (/^[-*]\s/.test(line)) {
|
|
7225
|
+
listItems.push(line.replace(/^[-*]\s+/, ""));
|
|
7226
|
+
continue;
|
|
7227
|
+
}
|
|
7228
|
+
flushList();
|
|
7229
|
+
nodes.push(
|
|
7230
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm leading-relaxed mb-1", children: mdInline(line) }, key++)
|
|
7231
|
+
);
|
|
7232
|
+
}
|
|
7233
|
+
flushList();
|
|
7234
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: nodes });
|
|
7235
|
+
}
|
|
7236
|
+
function RatingBar({ label, count, total }) {
|
|
7607
7237
|
const pct = total > 0 ? Math.round(count / total * 100) : 0;
|
|
7608
7238
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
|
|
7609
7239
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-12 text-right shrink-0", children: label }),
|
|
@@ -7619,63 +7249,12 @@ function RatingBar({
|
|
|
7619
7249
|
}
|
|
7620
7250
|
function IconBlock({ src }) {
|
|
7621
7251
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-shrink-0", children: [
|
|
7622
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7623
|
-
|
|
7624
|
-
{
|
|
7625
|
-
|
|
7626
|
-
|
|
7627
|
-
|
|
7628
|
-
),
|
|
7629
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "sd-si relative w-20 h-20 rounded-2xl overflow-hidden shadow-lg ring-1 ring-border", children: src ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
7630
|
-
"img",
|
|
7631
|
-
{
|
|
7632
|
-
src,
|
|
7633
|
-
alt: "",
|
|
7634
|
-
"aria-hidden": true,
|
|
7635
|
-
className: "w-full h-full object-cover"
|
|
7636
|
-
}
|
|
7637
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full bg-gradient-to-br from-primary/25 to-primary/8 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7638
|
-
"svg",
|
|
7639
|
-
{
|
|
7640
|
-
viewBox: "0 0 40 40",
|
|
7641
|
-
className: "w-10 h-10",
|
|
7642
|
-
fill: "none",
|
|
7643
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
7644
|
-
"aria-hidden": "true",
|
|
7645
|
-
children: [
|
|
7646
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7647
|
-
"polygon",
|
|
7648
|
-
{
|
|
7649
|
-
points: "20,4 34,11 20,18 6,11",
|
|
7650
|
-
className: "fill-primary/40",
|
|
7651
|
-
stroke: "currentColor",
|
|
7652
|
-
strokeWidth: "0.6",
|
|
7653
|
-
strokeOpacity: "0.4"
|
|
7654
|
-
}
|
|
7655
|
-
),
|
|
7656
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7657
|
-
"polygon",
|
|
7658
|
-
{
|
|
7659
|
-
points: "6,11 20,18 20,34 6,27",
|
|
7660
|
-
className: "fill-primary/20",
|
|
7661
|
-
stroke: "currentColor",
|
|
7662
|
-
strokeWidth: "0.6",
|
|
7663
|
-
strokeOpacity: "0.4"
|
|
7664
|
-
}
|
|
7665
|
-
),
|
|
7666
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7667
|
-
"polygon",
|
|
7668
|
-
{
|
|
7669
|
-
points: "34,11 20,18 20,34 34,27",
|
|
7670
|
-
className: "fill-primary/30",
|
|
7671
|
-
stroke: "currentColor",
|
|
7672
|
-
strokeWidth: "0.6",
|
|
7673
|
-
strokeOpacity: "0.4"
|
|
7674
|
-
}
|
|
7675
|
-
)
|
|
7676
|
-
]
|
|
7677
|
-
}
|
|
7678
|
-
) }) })
|
|
7252
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "sd-gp absolute -inset-1.5 rounded-2xl bg-primary/30 blur-md pointer-events-none", "aria-hidden": "true" }),
|
|
7253
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "sd-si relative w-20 h-20 rounded-2xl overflow-hidden shadow-lg ring-1 ring-border", children: src ? /* @__PURE__ */ jsxRuntime.jsx("img", { src, alt: "", "aria-hidden": true, className: "w-full h-full object-cover" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full bg-gradient-to-br from-primary/25 to-primary/8 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.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: [
|
|
7254
|
+
/* @__PURE__ */ jsxRuntime.jsx("polygon", { points: "20,4 34,11 20,18 6,11", className: "fill-primary/40", stroke: "currentColor", strokeWidth: "0.6", strokeOpacity: "0.4" }),
|
|
7255
|
+
/* @__PURE__ */ jsxRuntime.jsx("polygon", { points: "6,11 20,18 20,34 6,27", className: "fill-primary/20", stroke: "currentColor", strokeWidth: "0.6", strokeOpacity: "0.4" }),
|
|
7256
|
+
/* @__PURE__ */ jsxRuntime.jsx("polygon", { points: "34,11 20,18 20,34 34,27", className: "fill-primary/30", stroke: "currentColor", strokeWidth: "0.6", strokeOpacity: "0.4" })
|
|
7257
|
+
] }) }) })
|
|
7679
7258
|
] });
|
|
7680
7259
|
}
|
|
7681
7260
|
function StoreProductDetailPage({
|
|
@@ -7691,7 +7270,6 @@ function StoreProductDetailPage({
|
|
|
7691
7270
|
const [error, setError] = React.useState(null);
|
|
7692
7271
|
const [activeScreenshot, setActiveScreenshot] = React.useState(0);
|
|
7693
7272
|
const [screenshotKey, setScreenshotKey] = React.useState(0);
|
|
7694
|
-
const [embedFailed, setEmbedFailed] = React.useState(false);
|
|
7695
7273
|
React.useEffect(() => {
|
|
7696
7274
|
if (!slug && !id) {
|
|
7697
7275
|
setError("Product not found.");
|
|
@@ -7745,30 +7323,11 @@ function StoreProductDetailPage({
|
|
|
7745
7323
|
if (error || !details) {
|
|
7746
7324
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-20 text-center", children: [
|
|
7747
7325
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mb-4", children: error ?? "Product not found." }),
|
|
7748
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7749
|
-
"button",
|
|
7750
|
-
{
|
|
7751
|
-
type: "button",
|
|
7752
|
-
onClick: () => navigate("/store"),
|
|
7753
|
-
className: "text-sm text-primary hover:underline",
|
|
7754
|
-
children: "Back to Store"
|
|
7755
|
-
}
|
|
7756
|
-
)
|
|
7326
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: () => navigate("/store"), className: "text-sm text-primary hover:underline", children: "Back to Store" })
|
|
7757
7327
|
] });
|
|
7758
7328
|
}
|
|
7759
|
-
const {
|
|
7760
|
-
|
|
7761
|
-
publisher,
|
|
7762
|
-
reviews,
|
|
7763
|
-
reviewsCount,
|
|
7764
|
-
relatedProducts,
|
|
7765
|
-
ratingDistribution
|
|
7766
|
-
} = details;
|
|
7767
|
-
const priceLabel = formatPrice2(
|
|
7768
|
-
product.price,
|
|
7769
|
-
product.currency,
|
|
7770
|
-
product.pricingModel
|
|
7771
|
-
);
|
|
7329
|
+
const { product, publisher, reviews, reviewsCount, relatedProducts, ratingDistribution } = details;
|
|
7330
|
+
const priceLabel = formatPrice2(product.price, product.currency, product.pricingModel);
|
|
7772
7331
|
const screenshots = product.screenshots ?? [];
|
|
7773
7332
|
const totalRatings = ratingDistribution ? ratingDistribution.fiveStars + ratingDistribution.fourStars + ratingDistribution.threeStars + ratingDistribution.twoStars + ratingDistribution.oneStar : 0;
|
|
7774
7333
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full", children: [
|
|
@@ -7782,60 +7341,15 @@ function StoreProductDetailPage({
|
|
|
7782
7341
|
}
|
|
7783
7342
|
),
|
|
7784
7343
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative overflow-hidden", children: [
|
|
7785
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7786
|
-
|
|
7787
|
-
{
|
|
7788
|
-
|
|
7789
|
-
|
|
7790
|
-
|
|
7791
|
-
),
|
|
7792
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
7793
|
-
"svg",
|
|
7794
|
-
{
|
|
7795
|
-
className: "absolute inset-0 w-full h-full opacity-[0.04] pointer-events-none",
|
|
7796
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
7797
|
-
"aria-hidden": "true",
|
|
7798
|
-
children: [
|
|
7799
|
-
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7800
|
-
"pattern",
|
|
7801
|
-
{
|
|
7802
|
-
id: "sd-grid",
|
|
7803
|
-
width: "40",
|
|
7804
|
-
height: "40",
|
|
7805
|
-
patternUnits: "userSpaceOnUse",
|
|
7806
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7807
|
-
"path",
|
|
7808
|
-
{
|
|
7809
|
-
d: "M 40 0 L 0 0 0 40",
|
|
7810
|
-
fill: "none",
|
|
7811
|
-
stroke: "currentColor",
|
|
7812
|
-
strokeWidth: "1"
|
|
7813
|
-
}
|
|
7814
|
-
)
|
|
7815
|
-
}
|
|
7816
|
-
) }),
|
|
7817
|
-
/* @__PURE__ */ jsxRuntime.jsx("rect", { width: "100%", height: "100%", fill: "url(#sd-grid)" })
|
|
7818
|
-
]
|
|
7819
|
-
}
|
|
7820
|
-
),
|
|
7821
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7822
|
-
"div",
|
|
7823
|
-
{
|
|
7824
|
-
className: "absolute -top-12 -left-12 w-72 h-72 rounded-full bg-primary/10 blur-3xl pointer-events-none",
|
|
7825
|
-
"aria-hidden": "true"
|
|
7826
|
-
}
|
|
7827
|
-
),
|
|
7344
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 bg-gradient-to-b from-primary/[0.07] via-background to-background pointer-events-none", "aria-hidden": "true" }),
|
|
7345
|
+
/* @__PURE__ */ jsxRuntime.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: [
|
|
7346
|
+
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx("pattern", { id: "sd-grid", width: "40", height: "40", patternUnits: "userSpaceOnUse", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M 40 0 L 0 0 0 40", fill: "none", stroke: "currentColor", strokeWidth: "1" }) }) }),
|
|
7347
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { width: "100%", height: "100%", fill: "url(#sd-grid)" })
|
|
7348
|
+
] }),
|
|
7349
|
+
/* @__PURE__ */ jsxRuntime.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" }),
|
|
7828
7350
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pt-6 pb-8", children: [
|
|
7829
7351
|
/* @__PURE__ */ jsxRuntime.jsxs("nav", { className: "sd-fi text-sm text-muted-foreground mb-6 flex items-center gap-1.5 flex-wrap", children: [
|
|
7830
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7831
|
-
"button",
|
|
7832
|
-
{
|
|
7833
|
-
type: "button",
|
|
7834
|
-
onClick: () => navigate("/store"),
|
|
7835
|
-
className: "hover:text-primary transition-colors",
|
|
7836
|
-
children: "Store"
|
|
7837
|
-
}
|
|
7838
|
-
),
|
|
7352
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: () => navigate("/store"), className: "hover:text-primary transition-colors", children: "Store" }),
|
|
7839
7353
|
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", children: "\u203A" }),
|
|
7840
7354
|
product.category && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7841
7355
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7901,14 +7415,6 @@ function StoreProductDetailPage({
|
|
|
7901
7415
|
}
|
|
7902
7416
|
)
|
|
7903
7417
|
] }),
|
|
7904
|
-
product.type === "WORKFLOW" && !embedFailed && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sd-fu sd-d3 mb-8", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7905
|
-
WorkflowEmbed,
|
|
7906
|
-
{
|
|
7907
|
-
appUrl: appLoginUrl,
|
|
7908
|
-
productId: product.id,
|
|
7909
|
-
onError: () => setEmbedFailed(true)
|
|
7910
|
-
}
|
|
7911
|
-
) }),
|
|
7912
7418
|
screenshots.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sd-fu sd-d3 mb-8", children: [
|
|
7913
7419
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-xl overflow-hidden bg-muted aspect-video mb-3 shadow-md", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7914
7420
|
"img",
|
|
@@ -7925,33 +7431,19 @@ function StoreProductDetailPage({
|
|
|
7925
7431
|
type: "button",
|
|
7926
7432
|
onClick: () => switchScreenshot(i),
|
|
7927
7433
|
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"}`,
|
|
7928
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7929
|
-
"img",
|
|
7930
|
-
{
|
|
7931
|
-
src,
|
|
7932
|
-
alt: `Thumbnail ${i + 1}`,
|
|
7933
|
-
className: "w-full h-full object-cover"
|
|
7934
|
-
}
|
|
7935
|
-
)
|
|
7434
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("img", { src, alt: `Thumbnail ${i + 1}`, className: "w-full h-full object-cover" })
|
|
7936
7435
|
},
|
|
7937
7436
|
i
|
|
7938
7437
|
)) })
|
|
7939
7438
|
] }),
|
|
7940
7439
|
product.longDescription && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sd-fu sd-d4 mb-8", children: [
|
|
7941
7440
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-bold text-foreground mb-3", children: "About" }),
|
|
7942
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "
|
|
7441
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(MdAbout, { content: product.longDescription }) })
|
|
7943
7442
|
] }),
|
|
7944
7443
|
publisher && /* @__PURE__ */ jsxRuntime.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: [
|
|
7945
7444
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-sm font-semibold text-foreground mb-3", children: "Publisher" }),
|
|
7946
7445
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
7947
|
-
publisher.logoUrl ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
7948
|
-
"img",
|
|
7949
|
-
{
|
|
7950
|
-
src: publisher.logoUrl,
|
|
7951
|
-
alt: publisher.name,
|
|
7952
|
-
className: "w-10 h-10 rounded-full object-cover"
|
|
7953
|
-
}
|
|
7954
|
-
) : /* @__PURE__ */ jsxRuntime.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() }),
|
|
7446
|
+
publisher.logoUrl ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: publisher.logoUrl, alt: publisher.name, className: "w-10 h-10 rounded-full object-cover" }) : /* @__PURE__ */ jsxRuntime.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() }),
|
|
7955
7447
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
7956
7448
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
7957
7449
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-foreground text-sm", children: publisher.name }),
|
|
@@ -7977,46 +7469,11 @@ function StoreProductDetailPage({
|
|
|
7977
7469
|
] })
|
|
7978
7470
|
] }),
|
|
7979
7471
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-1.5 pt-1", children: [
|
|
7980
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7981
|
-
|
|
7982
|
-
|
|
7983
|
-
|
|
7984
|
-
|
|
7985
|
-
total: totalRatings
|
|
7986
|
-
}
|
|
7987
|
-
),
|
|
7988
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7989
|
-
RatingBar,
|
|
7990
|
-
{
|
|
7991
|
-
label: "4 \u2605",
|
|
7992
|
-
count: ratingDistribution.fourStars,
|
|
7993
|
-
total: totalRatings
|
|
7994
|
-
}
|
|
7995
|
-
),
|
|
7996
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7997
|
-
RatingBar,
|
|
7998
|
-
{
|
|
7999
|
-
label: "3 \u2605",
|
|
8000
|
-
count: ratingDistribution.threeStars,
|
|
8001
|
-
total: totalRatings
|
|
8002
|
-
}
|
|
8003
|
-
),
|
|
8004
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8005
|
-
RatingBar,
|
|
8006
|
-
{
|
|
8007
|
-
label: "2 \u2605",
|
|
8008
|
-
count: ratingDistribution.twoStars,
|
|
8009
|
-
total: totalRatings
|
|
8010
|
-
}
|
|
8011
|
-
),
|
|
8012
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8013
|
-
RatingBar,
|
|
8014
|
-
{
|
|
8015
|
-
label: "1 \u2605",
|
|
8016
|
-
count: ratingDistribution.oneStar,
|
|
8017
|
-
total: totalRatings
|
|
8018
|
-
}
|
|
8019
|
-
)
|
|
7472
|
+
/* @__PURE__ */ jsxRuntime.jsx(RatingBar, { label: "5 \u2605", count: ratingDistribution.fiveStars, total: totalRatings }),
|
|
7473
|
+
/* @__PURE__ */ jsxRuntime.jsx(RatingBar, { label: "4 \u2605", count: ratingDistribution.fourStars, total: totalRatings }),
|
|
7474
|
+
/* @__PURE__ */ jsxRuntime.jsx(RatingBar, { label: "3 \u2605", count: ratingDistribution.threeStars, total: totalRatings }),
|
|
7475
|
+
/* @__PURE__ */ jsxRuntime.jsx(RatingBar, { label: "2 \u2605", count: ratingDistribution.twoStars, total: totalRatings }),
|
|
7476
|
+
/* @__PURE__ */ jsxRuntime.jsx(RatingBar, { label: "1 \u2605", count: ratingDistribution.oneStar, total: totalRatings })
|
|
8020
7477
|
] })
|
|
8021
7478
|
] }),
|
|
8022
7479
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: reviews.slice(0, 5).map((review, idx) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -8031,14 +7488,11 @@ function StoreProductDetailPage({
|
|
|
8031
7488
|
] }),
|
|
8032
7489
|
review.title && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-semibold text-sm text-foreground mb-1", children: review.title }),
|
|
8033
7490
|
review.comment && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground leading-relaxed", children: review.comment }),
|
|
8034
|
-
review.createdAt && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-2", children: new Date(review.createdAt).toLocaleDateString(
|
|
8035
|
-
"
|
|
8036
|
-
|
|
8037
|
-
|
|
8038
|
-
|
|
8039
|
-
day: "numeric"
|
|
8040
|
-
}
|
|
8041
|
-
) })
|
|
7491
|
+
review.createdAt && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-2", children: new Date(review.createdAt).toLocaleDateString("en-US", {
|
|
7492
|
+
year: "numeric",
|
|
7493
|
+
month: "short",
|
|
7494
|
+
day: "numeric"
|
|
7495
|
+
}) })
|
|
8042
7496
|
]
|
|
8043
7497
|
},
|
|
8044
7498
|
review.id
|
|
@@ -8058,13 +7512,7 @@ function StoreProductDetailPage({
|
|
|
8058
7512
|
] }),
|
|
8059
7513
|
/* @__PURE__ */ jsxRuntime.jsx("aside", { className: "lg:sticky lg:top-24 self-start", children: /* @__PURE__ */ jsxRuntime.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: [
|
|
8060
7514
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
8061
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8062
|
-
"div",
|
|
8063
|
-
{
|
|
8064
|
-
className: `text-3xl font-extrabold ${priceLabel === "Free" ? "text-emerald-500" : "text-foreground"}`,
|
|
8065
|
-
children: priceLabel
|
|
8066
|
-
}
|
|
8067
|
-
),
|
|
7515
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `text-3xl font-extrabold ${priceLabel === "Free" ? "text-emerald-500" : "text-foreground"}`, children: priceLabel }),
|
|
8068
7516
|
product.pricingModel === "SUBSCRIPTION" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-muted-foreground", children: "per month" })
|
|
8069
7517
|
] }),
|
|
8070
7518
|
/* @__PURE__ */ jsxRuntime.jsx(
|