@burdenoff/website-sdk 2026.710.1 → 2026.716.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +690 -84
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +690 -84
- package/dist/index.mjs.map +1 -1
- package/dist/product-card-Dm1zkFkm.d.mts +157 -0
- package/dist/product-card-Dm1zkFkm.d.ts +157 -0
- package/dist/store/index.d.mts +27 -154
- package/dist/store/index.d.ts +27 -154
- package/dist/store/index.js +834 -227
- package/dist/store/index.js.map +1 -1
- package/dist/store/index.mjs +835 -229
- package/dist/store/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6266,7 +6266,11 @@ 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(
|
|
6269
|
+
const priceLabel = formatPrice2(
|
|
6270
|
+
product.price,
|
|
6271
|
+
product.currency,
|
|
6272
|
+
product.pricingModel
|
|
6273
|
+
);
|
|
6270
6274
|
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: [
|
|
6271
6275
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-2", children: [
|
|
6272
6276
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-12 h-12 rounded-lg bg-muted flex-shrink-0 overflow-hidden", children: product.icon ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6277,11 +6281,48 @@ function ProductCard({ product, onClick, href }) {
|
|
|
6277
6281
|
"aria-hidden": "true",
|
|
6278
6282
|
className: "w-full h-full object-cover"
|
|
6279
6283
|
}
|
|
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(
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
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
|
+
"svg",
|
|
6286
|
+
{
|
|
6287
|
+
viewBox: "0 0 32 32",
|
|
6288
|
+
className: "w-8 h-8",
|
|
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
|
+
) }) }),
|
|
6285
6326
|
/* @__PURE__ */ jsxRuntime.jsx(TypeBadge, { type: product.type })
|
|
6286
6327
|
] }),
|
|
6287
6328
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
@@ -6390,7 +6431,11 @@ function FeaturedHeroCard({
|
|
|
6390
6431
|
product,
|
|
6391
6432
|
onNavigate
|
|
6392
6433
|
}) {
|
|
6393
|
-
const priceLabel = formatPrice2(
|
|
6434
|
+
const priceLabel = formatPrice2(
|
|
6435
|
+
product.price,
|
|
6436
|
+
product.currency,
|
|
6437
|
+
product.pricingModel
|
|
6438
|
+
);
|
|
6394
6439
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6395
6440
|
"button",
|
|
6396
6441
|
{
|
|
@@ -6399,28 +6444,155 @@ function FeaturedHeroCard({
|
|
|
6399
6444
|
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",
|
|
6400
6445
|
children: [
|
|
6401
6446
|
/* @__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: [
|
|
6402
|
-
product.bannerUrl ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
|
|
6447
|
+
product.bannerUrl ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
6448
|
+
"img",
|
|
6449
|
+
{
|
|
6450
|
+
src: product.bannerUrl,
|
|
6451
|
+
alt: "",
|
|
6452
|
+
"aria-hidden": "true",
|
|
6453
|
+
className: "w-full h-full object-cover"
|
|
6454
|
+
}
|
|
6455
|
+
) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6456
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
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
|
+
)
|
|
6412
6533
|
] }),
|
|
6413
6534
|
/* @__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" }),
|
|
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(
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
|
|
6418
|
-
|
|
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
|
+
"img",
|
|
6537
|
+
{
|
|
6538
|
+
src: product.icon,
|
|
6539
|
+
alt: "",
|
|
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
|
+
) }) })
|
|
6419
6585
|
] }),
|
|
6420
6586
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-5 flex flex-col flex-1", children: [
|
|
6421
6587
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-3 mb-2", children: [
|
|
6422
6588
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-bold text-foreground group-hover:text-primary transition-colors line-clamp-1", children: product.name }),
|
|
6423
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
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
|
+
)
|
|
6424
6596
|
] }),
|
|
6425
6597
|
product.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground line-clamp-2 leading-relaxed flex-1", children: product.description }),
|
|
6426
6598
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 flex items-center gap-2", children: [
|
|
@@ -6441,7 +6613,10 @@ function ScrollRow({
|
|
|
6441
6613
|
}) {
|
|
6442
6614
|
const ref = React.useRef(null);
|
|
6443
6615
|
function scroll(dir) {
|
|
6444
|
-
ref.current?.scrollBy({
|
|
6616
|
+
ref.current?.scrollBy({
|
|
6617
|
+
left: dir === "r" ? 272 : -272,
|
|
6618
|
+
behavior: "smooth"
|
|
6619
|
+
});
|
|
6445
6620
|
}
|
|
6446
6621
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative group/row", children: [
|
|
6447
6622
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6451,7 +6626,19 @@ function ScrollRow({
|
|
|
6451
6626
|
onClick: () => scroll("l"),
|
|
6452
6627
|
"aria-label": "Scroll left",
|
|
6453
6628
|
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",
|
|
6454
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
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
|
+
)
|
|
6455
6642
|
}
|
|
6456
6643
|
),
|
|
6457
6644
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6460,7 +6647,13 @@ function ScrollRow({
|
|
|
6460
6647
|
ref,
|
|
6461
6648
|
className: "flex gap-3 overflow-x-auto pb-1 snap-x snap-mandatory",
|
|
6462
6649
|
style: { scrollbarWidth: "none", msOverflowStyle: "none" },
|
|
6463
|
-
children: products.map((product) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0 w-56 snap-start", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
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))
|
|
6464
6657
|
}
|
|
6465
6658
|
),
|
|
6466
6659
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6470,7 +6663,19 @@ function ScrollRow({
|
|
|
6470
6663
|
onClick: () => scroll("r"),
|
|
6471
6664
|
"aria-label": "Scroll right",
|
|
6472
6665
|
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",
|
|
6473
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
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
|
+
)
|
|
6474
6679
|
}
|
|
6475
6680
|
)
|
|
6476
6681
|
] });
|
|
@@ -6625,16 +6830,65 @@ function StoreHomePage({
|
|
|
6625
6830
|
}
|
|
6626
6831
|
),
|
|
6627
6832
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "relative overflow-hidden pt-14 pb-12 sm:pt-20 sm:pb-16", children: [
|
|
6628
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6629
|
-
|
|
6630
|
-
|
|
6631
|
-
|
|
6632
|
-
|
|
6633
|
-
|
|
6634
|
-
|
|
6833
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6834
|
+
"div",
|
|
6835
|
+
{
|
|
6836
|
+
className: "absolute inset-0 bg-gradient-to-b from-background via-primary/[0.06] to-background pointer-events-none",
|
|
6837
|
+
"aria-hidden": "true"
|
|
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
|
+
),
|
|
6635
6883
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center", children: [
|
|
6636
6884
|
/* @__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: [
|
|
6637
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
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
|
+
),
|
|
6638
6892
|
"Community Marketplace"
|
|
6639
6893
|
] }),
|
|
6640
6894
|
/* @__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 }),
|
|
@@ -6646,7 +6900,9 @@ function StoreHomePage({
|
|
|
6646
6900
|
onSubmit: (e) => {
|
|
6647
6901
|
e.preventDefault();
|
|
6648
6902
|
const q = new FormData(e.currentTarget).get("q");
|
|
6649
|
-
navigate(
|
|
6903
|
+
navigate(
|
|
6904
|
+
q.trim() ? `${browsePath}?q=${encodeURIComponent(q.trim())}` : browsePath
|
|
6905
|
+
);
|
|
6650
6906
|
},
|
|
6651
6907
|
children: [
|
|
6652
6908
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6688,9 +6944,23 @@ function StoreHomePage({
|
|
|
6688
6944
|
/* @__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)) })
|
|
6689
6945
|
] }) : error ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "py-16 text-center", children: [
|
|
6690
6946
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mb-4", children: error }),
|
|
6691
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
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
|
+
)
|
|
6692
6956
|
] }) : featuredItems.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[1fr_2fr] gap-4 items-start", children: [
|
|
6693
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6957
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6958
|
+
FeaturedHeroCard,
|
|
6959
|
+
{
|
|
6960
|
+
product: featuredItems[0],
|
|
6961
|
+
onNavigate: navigate
|
|
6962
|
+
}
|
|
6963
|
+
),
|
|
6694
6964
|
/* @__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(
|
|
6695
6965
|
ProductCard,
|
|
6696
6966
|
{
|
|
@@ -6711,7 +6981,13 @@ function StoreHomePage({
|
|
|
6711
6981
|
onNavigate: navigate
|
|
6712
6982
|
}
|
|
6713
6983
|
),
|
|
6714
|
-
loading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-3 overflow-hidden", children: [...Array(5)].map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(ScrollCardSkeleton, {}, i)) }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
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
|
+
)
|
|
6715
6991
|
] }),
|
|
6716
6992
|
(loading || freeItems.length > 0) && /* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
|
|
6717
6993
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6734,16 +7010,35 @@ function StoreHomePage({
|
|
|
6734
7010
|
] })
|
|
6735
7011
|
] }),
|
|
6736
7012
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "relative overflow-hidden border-t border-border", children: [
|
|
6737
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6738
|
-
|
|
7013
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7014
|
+
"div",
|
|
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
|
+
),
|
|
6739
7027
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative max-w-2xl mx-auto px-4 py-16 text-center", children: [
|
|
6740
7028
|
/* @__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: [
|
|
6741
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
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
|
+
),
|
|
6742
7036
|
"Become a publisher"
|
|
6743
7037
|
] }),
|
|
6744
7038
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl sm:text-3xl font-bold text-foreground mb-3", children: "Built something useful?" }),
|
|
6745
7039
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-muted-foreground mb-8 max-w-lg mx-auto leading-relaxed", children: [
|
|
6746
|
-
"Share your workflows, nodes, and integrations with
|
|
7040
|
+
"Share your workflows, nodes, and integrations with",
|
|
7041
|
+
" ",
|
|
6747
7042
|
productName ?? "the",
|
|
6748
7043
|
" community. Earn from your work or contribute for free."
|
|
6749
7044
|
] }),
|
|
@@ -6799,7 +7094,14 @@ var PRICING_OPTIONS = [
|
|
|
6799
7094
|
];
|
|
6800
7095
|
function parseUrlParams() {
|
|
6801
7096
|
if (typeof window === "undefined")
|
|
6802
|
-
return {
|
|
7097
|
+
return {
|
|
7098
|
+
q: "",
|
|
7099
|
+
type: "",
|
|
7100
|
+
pricingModel: "",
|
|
7101
|
+
category: "",
|
|
7102
|
+
sortBy: "RELEVANCE",
|
|
7103
|
+
featured: false
|
|
7104
|
+
};
|
|
6803
7105
|
const p = new URLSearchParams(window.location.search);
|
|
6804
7106
|
return {
|
|
6805
7107
|
q: p.get("q") ?? "",
|
|
@@ -6851,7 +7153,9 @@ function StoreBrowsePage({
|
|
|
6851
7153
|
const [featured, setFeatured] = React.useState(initial.featured);
|
|
6852
7154
|
const [offset, setOffset] = React.useState(0);
|
|
6853
7155
|
const [result, setResult] = React.useState(null);
|
|
6854
|
-
const [allProducts, setAllProducts] = React.useState(
|
|
7156
|
+
const [allProducts, setAllProducts] = React.useState(
|
|
7157
|
+
[]
|
|
7158
|
+
);
|
|
6855
7159
|
const [categories, setCategories] = React.useState([]);
|
|
6856
7160
|
const [loading, setLoading] = React.useState(true);
|
|
6857
7161
|
const [loadingMore, setLoadingMore] = React.useState(false);
|
|
@@ -6895,7 +7199,16 @@ function StoreBrowsePage({
|
|
|
6895
7199
|
return () => {
|
|
6896
7200
|
cancelled = true;
|
|
6897
7201
|
};
|
|
6898
|
-
}, [
|
|
7202
|
+
}, [
|
|
7203
|
+
client,
|
|
7204
|
+
search,
|
|
7205
|
+
type,
|
|
7206
|
+
pricingModel,
|
|
7207
|
+
category,
|
|
7208
|
+
sortBy,
|
|
7209
|
+
compatibleWith,
|
|
7210
|
+
featured
|
|
7211
|
+
]);
|
|
6899
7212
|
function loadMore() {
|
|
6900
7213
|
const nextOffset = offset + PAGE_SIZE;
|
|
6901
7214
|
setLoadingMore(true);
|
|
@@ -7071,7 +7384,8 @@ function StoreBrowsePage({
|
|
|
7071
7384
|
onClick: () => setFiltersOpen(!filtersOpen),
|
|
7072
7385
|
className: "lg:hidden h-10 px-4 rounded-lg border border-border bg-background text-sm text-foreground hover:bg-muted/50 transition-colors",
|
|
7073
7386
|
children: [
|
|
7074
|
-
"Filters
|
|
7387
|
+
"Filters",
|
|
7388
|
+
" ",
|
|
7075
7389
|
hasActiveFilters && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: "\u2022" })
|
|
7076
7390
|
]
|
|
7077
7391
|
}
|
|
@@ -7085,14 +7399,32 @@ function StoreBrowsePage({
|
|
|
7085
7399
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mb-4 flex-wrap", children: [
|
|
7086
7400
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: loading ? "Loading\u2026" : `${result?.totalCount ?? 0} results` }),
|
|
7087
7401
|
hasActiveFilters && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap gap-1.5", children: [
|
|
7088
|
-
search && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7089
|
-
|
|
7090
|
-
|
|
7091
|
-
|
|
7402
|
+
search && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7403
|
+
Chip,
|
|
7404
|
+
{
|
|
7405
|
+
label: `"${search}"`,
|
|
7406
|
+
onRemove: () => {
|
|
7407
|
+
setSearch("");
|
|
7408
|
+
setInputValue("");
|
|
7409
|
+
}
|
|
7410
|
+
}
|
|
7411
|
+
),
|
|
7092
7412
|
type && /* @__PURE__ */ jsxRuntime.jsx(Chip, { label: type, onRemove: () => setType("") }),
|
|
7093
|
-
pricingModel && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7413
|
+
pricingModel && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7414
|
+
Chip,
|
|
7415
|
+
{
|
|
7416
|
+
label: pricingModel,
|
|
7417
|
+
onRemove: () => setPricingModel("")
|
|
7418
|
+
}
|
|
7419
|
+
),
|
|
7094
7420
|
category && /* @__PURE__ */ jsxRuntime.jsx(Chip, { label: category, onRemove: () => setCategory("") }),
|
|
7095
|
-
featured && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7421
|
+
featured && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7422
|
+
Chip,
|
|
7423
|
+
{
|
|
7424
|
+
label: "Featured",
|
|
7425
|
+
onRemove: () => setFeatured(false)
|
|
7426
|
+
}
|
|
7427
|
+
)
|
|
7096
7428
|
] })
|
|
7097
7429
|
] }),
|
|
7098
7430
|
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(
|
|
@@ -7144,9 +7476,97 @@ function StoreBrowsePage({
|
|
|
7144
7476
|
function Chip({ label, onRemove }) {
|
|
7145
7477
|
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: [
|
|
7146
7478
|
label,
|
|
7147
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
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
|
+
)
|
|
7148
7489
|
] });
|
|
7149
7490
|
}
|
|
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
|
+
}
|
|
7150
7570
|
var ANIM_STYLES = `
|
|
7151
7571
|
@keyframes sdFadeUp {
|
|
7152
7572
|
from { opacity: 0; transform: translateY(16px); }
|
|
@@ -7179,7 +7599,11 @@ var ANIM_STYLES = `
|
|
|
7179
7599
|
.sd-d5 { animation-delay: 320ms; }
|
|
7180
7600
|
.sd-d6 { animation-delay: 400ms; }
|
|
7181
7601
|
`;
|
|
7182
|
-
function RatingBar({
|
|
7602
|
+
function RatingBar({
|
|
7603
|
+
label,
|
|
7604
|
+
count,
|
|
7605
|
+
total
|
|
7606
|
+
}) {
|
|
7183
7607
|
const pct = total > 0 ? Math.round(count / total * 100) : 0;
|
|
7184
7608
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
|
|
7185
7609
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-12 text-right shrink-0", children: label }),
|
|
@@ -7195,12 +7619,63 @@ function RatingBar({ label, count, total }) {
|
|
|
7195
7619
|
}
|
|
7196
7620
|
function IconBlock({ src }) {
|
|
7197
7621
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-shrink-0", children: [
|
|
7198
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7199
|
-
|
|
7200
|
-
|
|
7201
|
-
|
|
7202
|
-
|
|
7203
|
-
|
|
7622
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7623
|
+
"div",
|
|
7624
|
+
{
|
|
7625
|
+
className: "sd-gp absolute -inset-1.5 rounded-2xl bg-primary/30 blur-md pointer-events-none",
|
|
7626
|
+
"aria-hidden": "true"
|
|
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
|
+
) }) })
|
|
7204
7679
|
] });
|
|
7205
7680
|
}
|
|
7206
7681
|
function StoreProductDetailPage({
|
|
@@ -7216,6 +7691,7 @@ function StoreProductDetailPage({
|
|
|
7216
7691
|
const [error, setError] = React.useState(null);
|
|
7217
7692
|
const [activeScreenshot, setActiveScreenshot] = React.useState(0);
|
|
7218
7693
|
const [screenshotKey, setScreenshotKey] = React.useState(0);
|
|
7694
|
+
const [embedFailed, setEmbedFailed] = React.useState(false);
|
|
7219
7695
|
React.useEffect(() => {
|
|
7220
7696
|
if (!slug && !id) {
|
|
7221
7697
|
setError("Product not found.");
|
|
@@ -7269,11 +7745,30 @@ function StoreProductDetailPage({
|
|
|
7269
7745
|
if (error || !details) {
|
|
7270
7746
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-20 text-center", children: [
|
|
7271
7747
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mb-4", children: error ?? "Product not found." }),
|
|
7272
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
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
|
+
)
|
|
7273
7757
|
] });
|
|
7274
7758
|
}
|
|
7275
|
-
const {
|
|
7276
|
-
|
|
7759
|
+
const {
|
|
7760
|
+
product,
|
|
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
|
+
);
|
|
7277
7772
|
const screenshots = product.screenshots ?? [];
|
|
7278
7773
|
const totalRatings = ratingDistribution ? ratingDistribution.fiveStars + ratingDistribution.fourStars + ratingDistribution.threeStars + ratingDistribution.twoStars + ratingDistribution.oneStar : 0;
|
|
7279
7774
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full", children: [
|
|
@@ -7287,15 +7782,60 @@ function StoreProductDetailPage({
|
|
|
7287
7782
|
}
|
|
7288
7783
|
),
|
|
7289
7784
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative overflow-hidden", children: [
|
|
7290
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7291
|
-
|
|
7292
|
-
|
|
7293
|
-
|
|
7294
|
-
|
|
7295
|
-
|
|
7785
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7786
|
+
"div",
|
|
7787
|
+
{
|
|
7788
|
+
className: "absolute inset-0 bg-gradient-to-b from-primary/[0.07] via-background to-background pointer-events-none",
|
|
7789
|
+
"aria-hidden": "true"
|
|
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
|
+
),
|
|
7296
7828
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pt-6 pb-8", children: [
|
|
7297
7829
|
/* @__PURE__ */ jsxRuntime.jsxs("nav", { className: "sd-fi text-sm text-muted-foreground mb-6 flex items-center gap-1.5 flex-wrap", children: [
|
|
7298
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
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
|
+
),
|
|
7299
7839
|
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", children: "\u203A" }),
|
|
7300
7840
|
product.category && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7301
7841
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7361,6 +7901,14 @@ function StoreProductDetailPage({
|
|
|
7361
7901
|
}
|
|
7362
7902
|
)
|
|
7363
7903
|
] }),
|
|
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
|
+
) }),
|
|
7364
7912
|
screenshots.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sd-fu sd-d3 mb-8", children: [
|
|
7365
7913
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-xl overflow-hidden bg-muted aspect-video mb-3 shadow-md", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7366
7914
|
"img",
|
|
@@ -7377,7 +7925,14 @@ function StoreProductDetailPage({
|
|
|
7377
7925
|
type: "button",
|
|
7378
7926
|
onClick: () => switchScreenshot(i),
|
|
7379
7927
|
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"}`,
|
|
7380
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
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
|
+
)
|
|
7381
7936
|
},
|
|
7382
7937
|
i
|
|
7383
7938
|
)) })
|
|
@@ -7389,7 +7944,14 @@ function StoreProductDetailPage({
|
|
|
7389
7944
|
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: [
|
|
7390
7945
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-sm font-semibold text-foreground mb-3", children: "Publisher" }),
|
|
7391
7946
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
7392
|
-
publisher.logoUrl ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
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() }),
|
|
7393
7955
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
7394
7956
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
7395
7957
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-foreground text-sm", children: publisher.name }),
|
|
@@ -7415,11 +7977,46 @@ function StoreProductDetailPage({
|
|
|
7415
7977
|
] })
|
|
7416
7978
|
] }),
|
|
7417
7979
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-1.5 pt-1", children: [
|
|
7418
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7419
|
-
|
|
7420
|
-
|
|
7421
|
-
|
|
7422
|
-
|
|
7980
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7981
|
+
RatingBar,
|
|
7982
|
+
{
|
|
7983
|
+
label: "5 \u2605",
|
|
7984
|
+
count: ratingDistribution.fiveStars,
|
|
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
|
+
)
|
|
7423
8020
|
] })
|
|
7424
8021
|
] }),
|
|
7425
8022
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: reviews.slice(0, 5).map((review, idx) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -7434,11 +8031,14 @@ function StoreProductDetailPage({
|
|
|
7434
8031
|
] }),
|
|
7435
8032
|
review.title && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-semibold text-sm text-foreground mb-1", children: review.title }),
|
|
7436
8033
|
review.comment && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground leading-relaxed", children: review.comment }),
|
|
7437
|
-
review.createdAt && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-2", children: new Date(review.createdAt).toLocaleDateString(
|
|
7438
|
-
|
|
7439
|
-
|
|
7440
|
-
|
|
7441
|
-
|
|
8034
|
+
review.createdAt && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-2", children: new Date(review.createdAt).toLocaleDateString(
|
|
8035
|
+
"en-US",
|
|
8036
|
+
{
|
|
8037
|
+
year: "numeric",
|
|
8038
|
+
month: "short",
|
|
8039
|
+
day: "numeric"
|
|
8040
|
+
}
|
|
8041
|
+
) })
|
|
7442
8042
|
]
|
|
7443
8043
|
},
|
|
7444
8044
|
review.id
|
|
@@ -7458,7 +8058,13 @@ function StoreProductDetailPage({
|
|
|
7458
8058
|
] }),
|
|
7459
8059
|
/* @__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: [
|
|
7460
8060
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
7461
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
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
|
+
),
|
|
7462
8068
|
product.pricingModel === "SUBSCRIPTION" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-muted-foreground", children: "per month" })
|
|
7463
8069
|
] }),
|
|
7464
8070
|
/* @__PURE__ */ jsxRuntime.jsx(
|