@burdenoff/website-sdk 2026.709.3 → 2026.716.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -6224,6 +6224,1898 @@ function ContractsPage(props) {
6224
6224
  }) }) })
6225
6225
  ] });
6226
6226
  }
6227
+ function formatPrice2(price, currency, pricingModel) {
6228
+ if (pricingModel === "FREE" || !price || price === 0) return "Free";
6229
+ const curr = currency || "USD";
6230
+ try {
6231
+ return new Intl.NumberFormat("en-US", {
6232
+ style: "currency",
6233
+ currency: curr
6234
+ }).format(price);
6235
+ } catch {
6236
+ return `${curr} ${price.toFixed(2)}`;
6237
+ }
6238
+ }
6239
+ function formatDownloads(n) {
6240
+ if (!n) return "0";
6241
+ if (n >= 1e6) return `${(n / 1e6).toFixed(1)}M`;
6242
+ if (n >= 1e3) return `${(n / 1e3).toFixed(1)}K`;
6243
+ return n.toString();
6244
+ }
6245
+ function StarRating({ rating }) {
6246
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex items-center gap-0.5", children: [1, 2, 3, 4, 5].map((star) => /* @__PURE__ */ jsxRuntime.jsx(
6247
+ "svg",
6248
+ {
6249
+ viewBox: "0 0 12 12",
6250
+ className: `w-3 h-3 ${star <= Math.round(rating) ? "text-amber-400 fill-current" : "text-muted-foreground/30 fill-current"}`,
6251
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6 1l1.545 3.09L11 4.59l-2.5 2.41.59 3.41L6 8.79l-3.09 1.61L3.5 7 1 4.59l3.455-.5L6 1z" })
6252
+ },
6253
+ star
6254
+ )) });
6255
+ }
6256
+ function TypeBadge({ type }) {
6257
+ const labels = {
6258
+ APP: "App",
6259
+ NODE: "Node",
6260
+ WORKFLOW: "Workflow",
6261
+ TEMPLATE: "Template",
6262
+ INTEGRATION: "Integration",
6263
+ EXTENSION: "Extension",
6264
+ THEME: "Theme"
6265
+ };
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
+ }
6268
+ function ProductCard({ product, onClick, href }) {
6269
+ const priceLabel = formatPrice2(
6270
+ product.price,
6271
+ product.currency,
6272
+ product.pricingModel
6273
+ );
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: [
6275
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-2", children: [
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
+ "img",
6278
+ {
6279
+ src: product.icon,
6280
+ alt: "",
6281
+ "aria-hidden": "true",
6282
+ className: "w-full h-full object-cover"
6283
+ }
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
+ ) }) }),
6326
+ /* @__PURE__ */ jsxRuntime.jsx(TypeBadge, { type: product.type })
6327
+ ] }),
6328
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
6329
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-semibold text-foreground text-sm leading-snug line-clamp-1 group-hover:text-primary transition-colors", children: product.name }),
6330
+ product.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-xs mt-1 line-clamp-2 leading-relaxed", children: product.description })
6331
+ ] }),
6332
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
6333
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5", children: product.rating != null && product.rating > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
6334
+ /* @__PURE__ */ jsxRuntime.jsx(StarRating, { rating: product.rating }),
6335
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: product.rating.toFixed(1) })
6336
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: "No reviews yet" }) }),
6337
+ /* @__PURE__ */ jsxRuntime.jsx(
6338
+ "span",
6339
+ {
6340
+ className: `text-xs font-semibold ${priceLabel === "Free" ? "text-emerald-500" : "text-foreground"}`,
6341
+ children: priceLabel
6342
+ }
6343
+ )
6344
+ ] })
6345
+ ] });
6346
+ if (href) {
6347
+ return /* @__PURE__ */ jsxRuntime.jsx("a", { href, onClick, className: "block h-full no-underline", children: inner });
6348
+ }
6349
+ return /* @__PURE__ */ jsxRuntime.jsx(
6350
+ "button",
6351
+ {
6352
+ type: "button",
6353
+ onClick,
6354
+ className: "block w-full text-left h-full",
6355
+ children: inner
6356
+ }
6357
+ );
6358
+ }
6359
+
6360
+ // src/store/queries.ts
6361
+ var STORE_PRODUCT_FIELDS = `
6362
+ fragment StoreProductFields on StoreProduct {
6363
+ id name slug type subType nature status pricingModel
6364
+ price currency description icon bannerUrl screenshots
6365
+ category tags featured downloads viewCount rating reviewCount
6366
+ publisherId authorName license compatibleProducts
6367
+ }
6368
+ `;
6369
+ var HOME_GROUPED_PRODUCTS_QUERY = `
6370
+ ${STORE_PRODUCT_FIELDS}
6371
+ query HomeGroupedProducts($compatibleWith: String) {
6372
+ homeGroupedProducts(compatibleWith: $compatibleWith) {
6373
+ featured { ...StoreProductFields }
6374
+ mostDownloaded { ...StoreProductFields }
6375
+ recentlyAdded { ...StoreProductFields }
6376
+ freeItems { ...StoreProductFields }
6377
+ }
6378
+ }
6379
+ `;
6380
+ var BROWSE_STORE_QUERY = `
6381
+ ${STORE_PRODUCT_FIELDS}
6382
+ query BrowseStore($input: BrowseStoreInput!) {
6383
+ browseStore(input: $input) {
6384
+ products { ...StoreProductFields }
6385
+ totalCount
6386
+ hasMore
6387
+ nextCursor
6388
+ facets {
6389
+ types { value count }
6390
+ categories { value count }
6391
+ pricingModels { value count }
6392
+ priceRange { min max }
6393
+ }
6394
+ }
6395
+ }
6396
+ `;
6397
+ var STORE_PRODUCT_DETAILS_QUERY = `
6398
+ ${STORE_PRODUCT_FIELDS}
6399
+ query StoreProductDetails($input: StoreProductDetailsInput!) {
6400
+ storeProductDetails(input: $input) {
6401
+ product { ...StoreProductFields longDescription videoUrls minPlatformVersion }
6402
+ publisher { id name email websiteUrl logoUrl bio isVerified tier }
6403
+ reviews { id rating title comment verifiedPurchase helpful createdAt }
6404
+ reviewsCount
6405
+ relatedProducts { ...StoreProductFields }
6406
+ ratingDistribution { fiveStars fourStars threeStars twoStars oneStar }
6407
+ }
6408
+ }
6409
+ `;
6410
+ var CATEGORIES_QUERY = `
6411
+ query Categories {
6412
+ categories {
6413
+ id name slug description icon parentId
6414
+ }
6415
+ }
6416
+ `;
6417
+ function dedupAcross(lists) {
6418
+ const seen = /* @__PURE__ */ new Set();
6419
+ return lists.map((list) => {
6420
+ const out = [];
6421
+ for (const p of list) {
6422
+ if (!seen.has(p.id)) {
6423
+ seen.add(p.id);
6424
+ out.push(p);
6425
+ }
6426
+ }
6427
+ return out;
6428
+ });
6429
+ }
6430
+ function FeaturedHeroCard({
6431
+ product,
6432
+ onNavigate
6433
+ }) {
6434
+ const priceLabel = formatPrice2(
6435
+ product.price,
6436
+ product.currency,
6437
+ product.pricingModel
6438
+ );
6439
+ return /* @__PURE__ */ jsxRuntime.jsxs(
6440
+ "button",
6441
+ {
6442
+ type: "button",
6443
+ onClick: () => onNavigate(`/store/${product.slug}`),
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",
6445
+ children: [
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: [
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
+ )
6533
+ ] }),
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" }),
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
+ ) }) })
6585
+ ] }),
6586
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-5 flex flex-col flex-1", children: [
6587
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-3 mb-2", children: [
6588
+ /* @__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
+ )
6596
+ ] }),
6597
+ product.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground line-clamp-2 leading-relaxed flex-1", children: product.description }),
6598
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 flex items-center gap-2", children: [
6599
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs px-2 py-0.5 rounded-full bg-primary/10 text-primary font-medium", children: product.type }),
6600
+ product.authorName && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-muted-foreground truncate", children: [
6601
+ "by ",
6602
+ product.authorName
6603
+ ] })
6604
+ ] })
6605
+ ] })
6606
+ ]
6607
+ }
6608
+ );
6609
+ }
6610
+ function ScrollRow({
6611
+ products,
6612
+ onProductClick
6613
+ }) {
6614
+ const ref = React.useRef(null);
6615
+ function scroll(dir) {
6616
+ ref.current?.scrollBy({
6617
+ left: dir === "r" ? 272 : -272,
6618
+ behavior: "smooth"
6619
+ });
6620
+ }
6621
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative group/row", children: [
6622
+ /* @__PURE__ */ jsxRuntime.jsx(
6623
+ "button",
6624
+ {
6625
+ type: "button",
6626
+ onClick: () => scroll("l"),
6627
+ "aria-label": "Scroll left",
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",
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
+ )
6642
+ }
6643
+ ),
6644
+ /* @__PURE__ */ jsxRuntime.jsx(
6645
+ "div",
6646
+ {
6647
+ ref,
6648
+ className: "flex gap-3 overflow-x-auto pb-1 snap-x snap-mandatory",
6649
+ 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))
6657
+ }
6658
+ ),
6659
+ /* @__PURE__ */ jsxRuntime.jsx(
6660
+ "button",
6661
+ {
6662
+ type: "button",
6663
+ onClick: () => scroll("r"),
6664
+ "aria-label": "Scroll right",
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",
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
+ )
6679
+ }
6680
+ )
6681
+ ] });
6682
+ }
6683
+ function SectionHead({
6684
+ title,
6685
+ hint,
6686
+ browseHref,
6687
+ onNavigate
6688
+ }) {
6689
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-end justify-between mb-5 gap-4", children: [
6690
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
6691
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl font-bold text-foreground", children: title }),
6692
+ hint && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground mt-0.5", children: hint })
6693
+ ] }),
6694
+ /* @__PURE__ */ jsxRuntime.jsx(
6695
+ "button",
6696
+ {
6697
+ type: "button",
6698
+ onClick: () => onNavigate(browseHref),
6699
+ className: "text-sm text-primary hover:underline font-medium flex-shrink-0 underline-offset-2",
6700
+ children: "See all \u2192"
6701
+ }
6702
+ )
6703
+ ] });
6704
+ }
6705
+ var TYPE_FILTERS = [
6706
+ { type: "NODE", label: "Nodes" },
6707
+ { type: "WORKFLOW", label: "Workflows" },
6708
+ { type: "TEMPLATE", label: "Templates" },
6709
+ { type: "INTEGRATION", label: "Integrations" },
6710
+ { type: "APP", label: "Apps" },
6711
+ { type: "EXTENSION", label: "Extensions" }
6712
+ ];
6713
+ function TypeFilters({
6714
+ browsePath,
6715
+ onNavigate
6716
+ }) {
6717
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2 justify-center", children: TYPE_FILTERS.map((f) => /* @__PURE__ */ jsxRuntime.jsx(
6718
+ "button",
6719
+ {
6720
+ type: "button",
6721
+ onClick: () => onNavigate(`${browsePath}?type=${f.type}`),
6722
+ className: "px-4 py-1.5 rounded-full border border-border bg-background text-sm text-foreground hover:border-primary/50 hover:bg-primary/5 hover:text-primary transition-all duration-200",
6723
+ children: f.label
6724
+ },
6725
+ f.type
6726
+ )) });
6727
+ }
6728
+ function HeroCardSkeleton() {
6729
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-border bg-card overflow-hidden animate-pulse h-full", children: [
6730
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-44 sm:h-52 bg-muted" }),
6731
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-5 space-y-3", children: [
6732
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-5 bg-muted rounded w-1/2" }),
6733
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-3 bg-muted rounded w-3/4" }),
6734
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-3 bg-muted rounded w-5/6" }),
6735
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-5 bg-muted rounded w-16 mt-2" })
6736
+ ] })
6737
+ ] });
6738
+ }
6739
+ function GridCardSkeleton() {
6740
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-xl border border-border bg-card p-4 h-36 animate-pulse", children: [
6741
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3 mb-3", children: [
6742
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-12 h-12 rounded-lg bg-muted flex-shrink-0" }),
6743
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-2 pt-1", children: [
6744
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-3 bg-muted rounded w-3/4" }),
6745
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-3 bg-muted rounded w-1/2" })
6746
+ ] })
6747
+ ] }),
6748
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-3 bg-muted rounded w-full mb-2" }),
6749
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-3 bg-muted rounded w-5/6" })
6750
+ ] });
6751
+ }
6752
+ function ScrollCardSkeleton() {
6753
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-shrink-0 w-56 rounded-xl border border-border bg-card p-4 h-36 animate-pulse", children: [
6754
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3 mb-3", children: [
6755
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-12 h-12 rounded-lg bg-muted flex-shrink-0" }),
6756
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-2 pt-1", children: [
6757
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-3 bg-muted rounded w-3/4" }),
6758
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-3 bg-muted rounded w-1/2" })
6759
+ ] })
6760
+ ] }),
6761
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-3 bg-muted rounded w-full mb-2" }),
6762
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-3 bg-muted rounded w-5/6" })
6763
+ ] });
6764
+ }
6765
+ function StoreHomePage({
6766
+ compatibleWith,
6767
+ appLoginUrl,
6768
+ onNavigate,
6769
+ productName,
6770
+ heroTitle,
6771
+ heroSubtitle,
6772
+ browsePath = "/store/browse",
6773
+ seoTitle,
6774
+ seoDescription,
6775
+ seoKeywords
6776
+ }) {
6777
+ const client = useWebSDK();
6778
+ const [grouped, setGrouped] = React.useState(null);
6779
+ const [loading, setLoading] = React.useState(true);
6780
+ const [error, setError] = React.useState(null);
6781
+ React.useEffect(() => {
6782
+ let cancelled = false;
6783
+ async function load() {
6784
+ setLoading(true);
6785
+ try {
6786
+ const res = await client.query(
6787
+ HOME_GROUPED_PRODUCTS_QUERY,
6788
+ { compatibleWith: compatibleWith ?? null }
6789
+ );
6790
+ if (cancelled) return;
6791
+ if (res.errors?.length) throw new Error(res.errors[0].message);
6792
+ if (!res.data?.homeGroupedProducts) throw new Error("No data");
6793
+ setGrouped(res.data.homeGroupedProducts);
6794
+ setError(null);
6795
+ } catch {
6796
+ if (!cancelled) setError("Failed to load store. Please try again.");
6797
+ } finally {
6798
+ if (!cancelled) setLoading(false);
6799
+ }
6800
+ }
6801
+ load();
6802
+ return () => {
6803
+ cancelled = true;
6804
+ };
6805
+ }, [client, compatibleWith]);
6806
+ function navigate(path) {
6807
+ if (onNavigate) {
6808
+ onNavigate(path);
6809
+ return;
6810
+ }
6811
+ window.location.href = path;
6812
+ }
6813
+ function handleProductClick(product) {
6814
+ navigate(`/store/${product.slug}`);
6815
+ }
6816
+ const deduped = grouped ? dedupAcross([grouped.featured, grouped.mostDownloaded, grouped.freeItems]) : [[], [], []];
6817
+ const featuredItems = deduped[0] ?? [];
6818
+ const popularItems = deduped[1] ?? [];
6819
+ const freeItems = deduped[2] ?? [];
6820
+ const resolvedTitle = heroTitle ?? `${productName ? `${productName} ` : ""}Store`;
6821
+ const resolvedSubtitle = heroSubtitle ?? "Discover workflows, nodes, integrations, and templates built by the community.";
6822
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full", children: [
6823
+ /* @__PURE__ */ jsxRuntime.jsx(
6824
+ PageHead,
6825
+ {
6826
+ title: seoTitle ?? `Store${productName ? ` \u2013 ${productName}` : ""}`,
6827
+ description: seoDescription ?? resolvedSubtitle,
6828
+ keywords: seoKeywords,
6829
+ productName
6830
+ }
6831
+ ),
6832
+ /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "relative overflow-hidden pt-14 pb-12 sm:pt-20 sm:pb-16", children: [
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
+ ),
6883
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center", children: [
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: [
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
+ ),
6892
+ "Community Marketplace"
6893
+ ] }),
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 }),
6895
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg text-muted-foreground max-w-2xl mx-auto mb-8 leading-relaxed", children: resolvedSubtitle }),
6896
+ /* @__PURE__ */ jsxRuntime.jsxs(
6897
+ "form",
6898
+ {
6899
+ className: "max-w-xl mx-auto flex gap-2 mb-7",
6900
+ onSubmit: (e) => {
6901
+ e.preventDefault();
6902
+ const q = new FormData(e.currentTarget).get("q");
6903
+ navigate(
6904
+ q.trim() ? `${browsePath}?q=${encodeURIComponent(q.trim())}` : browsePath
6905
+ );
6906
+ },
6907
+ children: [
6908
+ /* @__PURE__ */ jsxRuntime.jsx(
6909
+ "input",
6910
+ {
6911
+ name: "q",
6912
+ type: "search",
6913
+ placeholder: "Search nodes, workflows, templates\u2026",
6914
+ className: "flex-1 h-12 rounded-xl border border-border bg-background px-4 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/40 shadow-sm"
6915
+ }
6916
+ ),
6917
+ /* @__PURE__ */ jsxRuntime.jsx(
6918
+ "button",
6919
+ {
6920
+ type: "submit",
6921
+ className: "h-12 px-6 rounded-xl bg-primary text-primary-foreground text-sm font-semibold hover:opacity-90 transition-opacity shadow-sm",
6922
+ children: "Search"
6923
+ }
6924
+ )
6925
+ ]
6926
+ }
6927
+ ),
6928
+ /* @__PURE__ */ jsxRuntime.jsx(TypeFilters, { browsePath, onNavigate: navigate })
6929
+ ] })
6930
+ ] }),
6931
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pb-20 space-y-14 pt-4", children: [
6932
+ /* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
6933
+ /* @__PURE__ */ jsxRuntime.jsx(
6934
+ SectionHead,
6935
+ {
6936
+ title: "Featured",
6937
+ hint: "Hand-picked highlights from the community",
6938
+ browseHref: `${browsePath}?featured=true`,
6939
+ onNavigate: navigate
6940
+ }
6941
+ ),
6942
+ loading ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[1fr_2fr] gap-4 items-start", children: [
6943
+ /* @__PURE__ */ jsxRuntime.jsx(HeroCardSkeleton, {}),
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)) })
6945
+ ] }) : error ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "py-16 text-center", children: [
6946
+ /* @__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
+ )
6956
+ ] }) : 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
+ ),
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(
6965
+ ProductCard,
6966
+ {
6967
+ product,
6968
+ onClick: () => handleProductClick(product)
6969
+ },
6970
+ product.id
6971
+ )) })
6972
+ ] }) : null
6973
+ ] }),
6974
+ (loading || popularItems.length > 0) && /* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
6975
+ /* @__PURE__ */ jsxRuntime.jsx(
6976
+ SectionHead,
6977
+ {
6978
+ title: "Most Popular",
6979
+ hint: "Top downloads across the community",
6980
+ browseHref: `${browsePath}?sortBy=DOWNLOADS`,
6981
+ onNavigate: navigate
6982
+ }
6983
+ ),
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
+ )
6991
+ ] }),
6992
+ (loading || freeItems.length > 0) && /* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
6993
+ /* @__PURE__ */ jsxRuntime.jsx(
6994
+ SectionHead,
6995
+ {
6996
+ title: "Free to Use",
6997
+ hint: "Zero cost, full power \u2014 community-contributed freebies",
6998
+ browseHref: `${browsePath}?pricingModel=FREE`,
6999
+ onNavigate: navigate
7000
+ }
7001
+ ),
7002
+ loading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4", children: [...Array(6)].map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(GridCardSkeleton, {}, i)) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4", children: freeItems.slice(0, 6).map((product) => /* @__PURE__ */ jsxRuntime.jsx(
7003
+ ProductCard,
7004
+ {
7005
+ product,
7006
+ onClick: () => handleProductClick(product)
7007
+ },
7008
+ product.id
7009
+ )) })
7010
+ ] })
7011
+ ] }),
7012
+ /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "relative overflow-hidden border-t border-border", children: [
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
+ ),
7027
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative max-w-2xl mx-auto px-4 py-16 text-center", children: [
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: [
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
+ ),
7036
+ "Become a publisher"
7037
+ ] }),
7038
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl sm:text-3xl font-bold text-foreground mb-3", children: "Built something useful?" }),
7039
+ /* @__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
+ " ",
7042
+ productName ?? "the",
7043
+ " community. Earn from your work or contribute for free."
7044
+ ] }),
7045
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col sm:flex-row gap-3 justify-center", children: [
7046
+ /* @__PURE__ */ jsxRuntime.jsx(
7047
+ "a",
7048
+ {
7049
+ href: appLoginUrl,
7050
+ target: "_blank",
7051
+ rel: "noopener noreferrer",
7052
+ className: "inline-flex items-center justify-center h-11 px-7 rounded-lg bg-primary text-primary-foreground text-sm font-semibold hover:opacity-90 transition-opacity",
7053
+ children: "Submit to Store"
7054
+ }
7055
+ ),
7056
+ /* @__PURE__ */ jsxRuntime.jsx(
7057
+ "button",
7058
+ {
7059
+ type: "button",
7060
+ onClick: () => navigate(browsePath),
7061
+ className: "inline-flex items-center justify-center h-11 px-7 rounded-lg border border-border bg-background text-sm font-medium text-foreground hover:border-primary/40 hover:bg-primary/5 transition-all",
7062
+ children: "Browse the store"
7063
+ }
7064
+ )
7065
+ ] })
7066
+ ] })
7067
+ ] })
7068
+ ] });
7069
+ }
7070
+ var SORT_OPTIONS = [
7071
+ { value: "RELEVANCE", label: "Relevance" },
7072
+ { value: "NEWEST", label: "Newest" },
7073
+ { value: "DOWNLOADS", label: "Most Downloaded" },
7074
+ { value: "RATING", label: "Top Rated" },
7075
+ { value: "PRICE_LOW", label: "Price: Low to High" },
7076
+ { value: "PRICE_HIGH", label: "Price: High to Low" },
7077
+ { value: "NAME_ASC", label: "Name A\u2013Z" }
7078
+ ];
7079
+ var TYPE_OPTIONS = [
7080
+ { value: "", label: "All types" },
7081
+ { value: "APP", label: "Apps" },
7082
+ { value: "NODE", label: "Nodes" },
7083
+ { value: "WORKFLOW", label: "Workflows" },
7084
+ { value: "TEMPLATE", label: "Templates" },
7085
+ { value: "INTEGRATION", label: "Integrations" },
7086
+ { value: "EXTENSION", label: "Extensions" },
7087
+ { value: "THEME", label: "Themes" }
7088
+ ];
7089
+ var PRICING_OPTIONS = [
7090
+ { value: "", label: "All pricing" },
7091
+ { value: "FREE", label: "Free" },
7092
+ { value: "ONE_TIME", label: "Paid (one-time)" },
7093
+ { value: "SUBSCRIPTION", label: "Subscription" }
7094
+ ];
7095
+ function parseUrlParams() {
7096
+ if (typeof window === "undefined")
7097
+ return {
7098
+ q: "",
7099
+ type: "",
7100
+ pricingModel: "",
7101
+ category: "",
7102
+ sortBy: "RELEVANCE",
7103
+ featured: false
7104
+ };
7105
+ const p = new URLSearchParams(window.location.search);
7106
+ return {
7107
+ q: p.get("q") ?? "",
7108
+ type: p.get("type") ?? "",
7109
+ pricingModel: p.get("pricingModel") ?? "",
7110
+ category: p.get("category") ?? "",
7111
+ sortBy: p.get("sortBy") ?? (p.get("q") ? "RELEVANCE" : "NEWEST"),
7112
+ featured: p.get("featured") === "true"
7113
+ };
7114
+ }
7115
+ function FacetList({
7116
+ title,
7117
+ facets,
7118
+ selected,
7119
+ onSelect
7120
+ }) {
7121
+ if (facets.length === 0) return null;
7122
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
7123
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-2", children: title }),
7124
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-1", children: facets.map((f) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs(
7125
+ "button",
7126
+ {
7127
+ type: "button",
7128
+ onClick: () => onSelect(selected === f.value ? "" : f.value),
7129
+ className: `w-full text-left text-sm px-2 py-1 rounded flex items-center justify-between gap-2 transition-colors ${selected === f.value ? "bg-primary/10 text-primary font-medium" : "text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,
7130
+ children: [
7131
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: f.value }),
7132
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs opacity-60 flex-shrink-0", children: f.count })
7133
+ ]
7134
+ }
7135
+ ) }, f.value)) })
7136
+ ] });
7137
+ }
7138
+ function StoreBrowsePage({
7139
+ compatibleWith,
7140
+ onNavigate,
7141
+ productName,
7142
+ seoTitle,
7143
+ seoDescription
7144
+ }) {
7145
+ const client = useWebSDK();
7146
+ const initial = parseUrlParams();
7147
+ const [search, setSearch] = React.useState(initial.q);
7148
+ const [inputValue, setInputValue] = React.useState(initial.q);
7149
+ const [type, setType] = React.useState(initial.type);
7150
+ const [pricingModel, setPricingModel] = React.useState(initial.pricingModel);
7151
+ const [category, setCategory] = React.useState(initial.category);
7152
+ const [sortBy, setSortBy] = React.useState(initial.sortBy);
7153
+ const [featured, setFeatured] = React.useState(initial.featured);
7154
+ const [offset, setOffset] = React.useState(0);
7155
+ const [result, setResult] = React.useState(null);
7156
+ const [allProducts, setAllProducts] = React.useState(
7157
+ []
7158
+ );
7159
+ const [categories, setCategories] = React.useState([]);
7160
+ const [loading, setLoading] = React.useState(true);
7161
+ const [loadingMore, setLoadingMore] = React.useState(false);
7162
+ const [filtersOpen, setFiltersOpen] = React.useState(false);
7163
+ const searchRef = React.useRef(null);
7164
+ const PAGE_SIZE = 24;
7165
+ React.useEffect(() => {
7166
+ client.query(CATEGORIES_QUERY, {}).then((r) => {
7167
+ if (r.data?.categories) setCategories(r.data.categories);
7168
+ }).catch(() => {
7169
+ });
7170
+ }, [client]);
7171
+ React.useEffect(() => {
7172
+ let cancelled = false;
7173
+ setOffset(0);
7174
+ setLoading(true);
7175
+ setAllProducts([]);
7176
+ client.query(BROWSE_STORE_QUERY, {
7177
+ input: {
7178
+ filter: {
7179
+ search: search || void 0,
7180
+ type: type || void 0,
7181
+ pricingModel: pricingModel || void 0,
7182
+ category: category || void 0,
7183
+ compatibleWith: compatibleWith ?? void 0,
7184
+ featured: featured || void 0
7185
+ },
7186
+ sortBy,
7187
+ pagination: { limit: PAGE_SIZE, offset: 0 }
7188
+ }
7189
+ }).then((r) => {
7190
+ if (cancelled) return;
7191
+ if (r.data?.browseStore) {
7192
+ setResult(r.data.browseStore);
7193
+ setAllProducts(r.data.browseStore.products);
7194
+ }
7195
+ }).catch(() => {
7196
+ }).finally(() => {
7197
+ if (!cancelled) setLoading(false);
7198
+ });
7199
+ return () => {
7200
+ cancelled = true;
7201
+ };
7202
+ }, [
7203
+ client,
7204
+ search,
7205
+ type,
7206
+ pricingModel,
7207
+ category,
7208
+ sortBy,
7209
+ compatibleWith,
7210
+ featured
7211
+ ]);
7212
+ function loadMore() {
7213
+ const nextOffset = offset + PAGE_SIZE;
7214
+ setLoadingMore(true);
7215
+ client.query(BROWSE_STORE_QUERY, {
7216
+ input: {
7217
+ filter: {
7218
+ search: search || void 0,
7219
+ type: type || void 0,
7220
+ pricingModel: pricingModel || void 0,
7221
+ category: category || void 0,
7222
+ compatibleWith: compatibleWith ?? void 0,
7223
+ featured: featured || void 0
7224
+ },
7225
+ sortBy,
7226
+ pagination: { limit: PAGE_SIZE, offset: nextOffset }
7227
+ }
7228
+ }).then((r) => {
7229
+ if (r.data?.browseStore) {
7230
+ setResult(r.data.browseStore);
7231
+ setAllProducts((prev) => [...prev, ...r.data.browseStore.products]);
7232
+ setOffset(nextOffset);
7233
+ }
7234
+ }).catch(() => {
7235
+ }).finally(() => setLoadingMore(false));
7236
+ }
7237
+ function navigate(path) {
7238
+ if (onNavigate) {
7239
+ onNavigate(path);
7240
+ return;
7241
+ }
7242
+ window.location.href = path;
7243
+ }
7244
+ function handleSearchSubmit(e) {
7245
+ e.preventDefault();
7246
+ setSearch(inputValue);
7247
+ setSortBy(inputValue ? "RELEVANCE" : "NEWEST");
7248
+ }
7249
+ function resetFilters() {
7250
+ setSearch("");
7251
+ setInputValue("");
7252
+ setType("");
7253
+ setPricingModel("");
7254
+ setCategory("");
7255
+ setSortBy("NEWEST");
7256
+ setFeatured(false);
7257
+ searchRef.current?.focus();
7258
+ }
7259
+ const hasActiveFilters = !!(search || type || pricingModel || category || featured);
7260
+ const facetTypes = result?.facets?.types ?? [];
7261
+ const facetCategories = result?.facets?.categories ?? [];
7262
+ const sidebarContent = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
7263
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
7264
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-2", children: "Type" }),
7265
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1", children: TYPE_OPTIONS.map((opt) => /* @__PURE__ */ jsxRuntime.jsx(
7266
+ "button",
7267
+ {
7268
+ type: "button",
7269
+ onClick: () => setType(opt.value),
7270
+ className: `w-full text-left text-sm px-2 py-1.5 rounded transition-colors ${type === opt.value ? "bg-primary/10 text-primary font-medium" : "text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,
7271
+ children: opt.label
7272
+ },
7273
+ opt.value
7274
+ )) })
7275
+ ] }),
7276
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
7277
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-2", children: "Pricing" }),
7278
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1", children: PRICING_OPTIONS.map((opt) => /* @__PURE__ */ jsxRuntime.jsx(
7279
+ "button",
7280
+ {
7281
+ type: "button",
7282
+ onClick: () => setPricingModel(opt.value),
7283
+ className: `w-full text-left text-sm px-2 py-1.5 rounded transition-colors ${pricingModel === opt.value ? "bg-primary/10 text-primary font-medium" : "text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,
7284
+ children: opt.label
7285
+ },
7286
+ opt.value
7287
+ )) })
7288
+ ] }),
7289
+ (facetCategories.length > 0 || categories.length > 0) && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
7290
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-2", children: "Category" }),
7291
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
7292
+ /* @__PURE__ */ jsxRuntime.jsx(
7293
+ "button",
7294
+ {
7295
+ type: "button",
7296
+ onClick: () => setCategory(""),
7297
+ className: `w-full text-left text-sm px-2 py-1.5 rounded transition-colors ${!category ? "bg-primary/10 text-primary font-medium" : "text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,
7298
+ children: "All categories"
7299
+ }
7300
+ ),
7301
+ (facetCategories.length > 0 ? facetCategories : categories.slice(0, 12).map((c) => ({ value: c.slug, count: 0 }))).map((f) => {
7302
+ const cat = categories.find((c) => c.slug === f.value);
7303
+ return /* @__PURE__ */ jsxRuntime.jsxs(
7304
+ "button",
7305
+ {
7306
+ type: "button",
7307
+ onClick: () => setCategory(category === f.value ? "" : f.value),
7308
+ className: `w-full text-left text-sm px-2 py-1.5 rounded flex items-center justify-between gap-2 transition-colors ${category === f.value ? "bg-primary/10 text-primary font-medium" : "text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,
7309
+ children: [
7310
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: cat?.name ?? f.value }),
7311
+ f.count > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs opacity-60 flex-shrink-0", children: f.count })
7312
+ ]
7313
+ },
7314
+ f.value
7315
+ );
7316
+ })
7317
+ ] })
7318
+ ] }),
7319
+ facetTypes.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
7320
+ FacetList,
7321
+ {
7322
+ title: "Available types",
7323
+ facets: facetTypes,
7324
+ selected: type,
7325
+ onSelect: setType
7326
+ }
7327
+ ),
7328
+ hasActiveFilters && /* @__PURE__ */ jsxRuntime.jsx(
7329
+ "button",
7330
+ {
7331
+ type: "button",
7332
+ onClick: resetFilters,
7333
+ className: "text-sm text-muted-foreground hover:text-foreground underline",
7334
+ children: "Clear all filters"
7335
+ }
7336
+ )
7337
+ ] });
7338
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full", children: [
7339
+ /* @__PURE__ */ jsxRuntime.jsx(
7340
+ PageHead,
7341
+ {
7342
+ title: seoTitle ?? `Browse Store${productName ? ` \u2013 ${productName}` : ""}`,
7343
+ description: seoDescription ?? "Browse all apps, workflows, nodes, and templates.",
7344
+ productName
7345
+ }
7346
+ ),
7347
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8", children: [
7348
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col sm:flex-row gap-3 mb-6", children: [
7349
+ /* @__PURE__ */ jsxRuntime.jsxs("form", { className: "flex-1 flex gap-2", onSubmit: handleSearchSubmit, children: [
7350
+ /* @__PURE__ */ jsxRuntime.jsx(
7351
+ "input",
7352
+ {
7353
+ ref: searchRef,
7354
+ type: "search",
7355
+ value: inputValue,
7356
+ onChange: (e) => setInputValue(e.target.value),
7357
+ placeholder: "Search\u2026",
7358
+ className: "flex-1 h-10 rounded-lg border border-border bg-background px-4 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/50"
7359
+ }
7360
+ ),
7361
+ /* @__PURE__ */ jsxRuntime.jsx(
7362
+ "button",
7363
+ {
7364
+ type: "submit",
7365
+ className: "h-10 px-5 rounded-lg bg-primary text-primary-foreground text-sm font-medium hover:opacity-90 transition-opacity",
7366
+ children: "Search"
7367
+ }
7368
+ )
7369
+ ] }),
7370
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
7371
+ /* @__PURE__ */ jsxRuntime.jsx(
7372
+ "select",
7373
+ {
7374
+ value: sortBy,
7375
+ onChange: (e) => setSortBy(e.target.value),
7376
+ className: "h-10 rounded-lg border border-border bg-background px-3 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-primary/50",
7377
+ children: SORT_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: o.label }, o.value))
7378
+ }
7379
+ ),
7380
+ /* @__PURE__ */ jsxRuntime.jsxs(
7381
+ "button",
7382
+ {
7383
+ type: "button",
7384
+ onClick: () => setFiltersOpen(!filtersOpen),
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",
7386
+ children: [
7387
+ "Filters",
7388
+ " ",
7389
+ hasActiveFilters && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: "\u2022" })
7390
+ ]
7391
+ }
7392
+ )
7393
+ ] })
7394
+ ] }),
7395
+ filtersOpen && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:hidden mb-6 p-4 border border-border rounded-xl bg-card", children: sidebarContent }),
7396
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-8", children: [
7397
+ /* @__PURE__ */ jsxRuntime.jsx("aside", { className: "hidden lg:block w-52 flex-shrink-0", children: sidebarContent }),
7398
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
7399
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mb-4 flex-wrap", children: [
7400
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: loading ? "Loading\u2026" : `${result?.totalCount ?? 0} results` }),
7401
+ hasActiveFilters && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap gap-1.5", children: [
7402
+ search && /* @__PURE__ */ jsxRuntime.jsx(
7403
+ Chip,
7404
+ {
7405
+ label: `"${search}"`,
7406
+ onRemove: () => {
7407
+ setSearch("");
7408
+ setInputValue("");
7409
+ }
7410
+ }
7411
+ ),
7412
+ 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
+ ),
7420
+ 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
+ )
7428
+ ] })
7429
+ ] }),
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(
7431
+ "div",
7432
+ {
7433
+ className: "bg-card border border-border rounded-xl p-4 h-36 animate-pulse"
7434
+ },
7435
+ i
7436
+ )) }) : allProducts.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "py-20 text-center", children: [
7437
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-muted-foreground mb-4", children: [
7438
+ "No results found",
7439
+ search ? ` for "${search}"` : "",
7440
+ "."
7441
+ ] }),
7442
+ /* @__PURE__ */ jsxRuntime.jsx(
7443
+ "button",
7444
+ {
7445
+ type: "button",
7446
+ onClick: resetFilters,
7447
+ className: "text-sm text-primary hover:underline",
7448
+ children: "Clear filters"
7449
+ }
7450
+ )
7451
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7452
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 gap-4", children: allProducts.map((product) => /* @__PURE__ */ jsxRuntime.jsx(
7453
+ ProductCard,
7454
+ {
7455
+ product,
7456
+ onClick: () => navigate(`/store/${product.slug}`)
7457
+ },
7458
+ product.id
7459
+ )) }),
7460
+ result?.hasMore && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-8 text-center", children: /* @__PURE__ */ jsxRuntime.jsx(
7461
+ "button",
7462
+ {
7463
+ type: "button",
7464
+ onClick: loadMore,
7465
+ disabled: loadingMore,
7466
+ className: "h-10 px-8 rounded-lg border border-border text-sm font-medium text-foreground hover:bg-muted/50 transition-colors disabled:opacity-50",
7467
+ children: loadingMore ? "Loading\u2026" : "Load more"
7468
+ }
7469
+ ) })
7470
+ ] })
7471
+ ] })
7472
+ ] })
7473
+ ] })
7474
+ ] });
7475
+ }
7476
+ function Chip({ label, onRemove }) {
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: [
7478
+ 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
+ )
7489
+ ] });
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
+ }
7570
+ var ANIM_STYLES = `
7571
+ @keyframes sdFadeUp {
7572
+ from { opacity: 0; transform: translateY(16px); }
7573
+ to { opacity: 1; transform: translateY(0); }
7574
+ }
7575
+ @keyframes sdFadeIn {
7576
+ from { opacity: 0; }
7577
+ to { opacity: 1; }
7578
+ }
7579
+ @keyframes sdScaleIn {
7580
+ from { opacity: 0; transform: scale(0.94); }
7581
+ to { opacity: 1; transform: scale(1); }
7582
+ }
7583
+ @keyframes sdGlowPulse {
7584
+ 0%, 100% { opacity: 0.35; }
7585
+ 50% { opacity: 0.65; }
7586
+ }
7587
+ @media (prefers-reduced-motion: reduce) {
7588
+ .sd-fu, .sd-fi, .sd-si { animation: none !important; opacity: 1 !important; transform: none !important; }
7589
+ .sd-gp { animation: none !important; }
7590
+ }
7591
+ .sd-fu { animation: sdFadeUp 0.55s cubic-bezier(0.16,1,0.3,1) both; }
7592
+ .sd-fi { animation: sdFadeIn 0.45s ease-out both; }
7593
+ .sd-si { animation: sdScaleIn 0.45s cubic-bezier(0.16,1,0.3,1) both; }
7594
+ .sd-gp { animation: sdGlowPulse 3s ease-in-out infinite; }
7595
+ .sd-d1 { animation-delay: 60ms; }
7596
+ .sd-d2 { animation-delay: 120ms; }
7597
+ .sd-d3 { animation-delay: 180ms; }
7598
+ .sd-d4 { animation-delay: 240ms; }
7599
+ .sd-d5 { animation-delay: 320ms; }
7600
+ .sd-d6 { animation-delay: 400ms; }
7601
+ `;
7602
+ function RatingBar({
7603
+ label,
7604
+ count,
7605
+ total
7606
+ }) {
7607
+ const pct = total > 0 ? Math.round(count / total * 100) : 0;
7608
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
7609
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-12 text-right shrink-0", children: label }),
7610
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 h-1.5 bg-muted rounded-full overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
7611
+ "div",
7612
+ {
7613
+ className: "h-full bg-amber-400 rounded-full transition-all duration-700",
7614
+ style: { width: `${pct}%` }
7615
+ }
7616
+ ) }),
7617
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-6 shrink-0", children: count })
7618
+ ] });
7619
+ }
7620
+ function IconBlock({ src }) {
7621
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-shrink-0", children: [
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
+ ) }) })
7679
+ ] });
7680
+ }
7681
+ function StoreProductDetailPage({
7682
+ slug,
7683
+ id,
7684
+ appLoginUrl,
7685
+ onNavigate,
7686
+ productName
7687
+ }) {
7688
+ const client = useWebSDK();
7689
+ const [details, setDetails] = React.useState(null);
7690
+ const [loading, setLoading] = React.useState(true);
7691
+ const [error, setError] = React.useState(null);
7692
+ const [activeScreenshot, setActiveScreenshot] = React.useState(0);
7693
+ const [screenshotKey, setScreenshotKey] = React.useState(0);
7694
+ const [embedFailed, setEmbedFailed] = React.useState(false);
7695
+ React.useEffect(() => {
7696
+ if (!slug && !id) {
7697
+ setError("Product not found.");
7698
+ setLoading(false);
7699
+ return;
7700
+ }
7701
+ let cancelled = false;
7702
+ setLoading(true);
7703
+ client.query(STORE_PRODUCT_DETAILS_QUERY, {
7704
+ input: { slug: slug ?? void 0, id: id ?? void 0 }
7705
+ }).then((r) => {
7706
+ if (cancelled) return;
7707
+ if (r.errors?.length) throw new Error(r.errors[0].message);
7708
+ if (!r.data?.storeProductDetails) throw new Error("Not found");
7709
+ setDetails(r.data.storeProductDetails);
7710
+ }).catch(() => {
7711
+ if (!cancelled) setError("Product not found or unavailable.");
7712
+ }).finally(() => {
7713
+ if (!cancelled) setLoading(false);
7714
+ });
7715
+ return () => {
7716
+ cancelled = true;
7717
+ };
7718
+ }, [client, slug, id]);
7719
+ function navigate(path) {
7720
+ if (onNavigate) {
7721
+ onNavigate(path);
7722
+ return;
7723
+ }
7724
+ window.location.href = path;
7725
+ }
7726
+ function switchScreenshot(i) {
7727
+ setActiveScreenshot(i);
7728
+ setScreenshotKey((k) => k + 1);
7729
+ }
7730
+ if (loading) {
7731
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12 animate-pulse", children: [
7732
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 bg-muted rounded w-40 mb-8" }),
7733
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-6 mb-8", children: [
7734
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-20 h-20 rounded-2xl bg-muted flex-shrink-0" }),
7735
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-3 pt-1", children: [
7736
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-6 bg-muted rounded w-1/3" }),
7737
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 bg-muted rounded w-1/2" }),
7738
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 bg-muted rounded w-1/4" })
7739
+ ] })
7740
+ ] }),
7741
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-56 bg-muted rounded-xl mb-8" }),
7742
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: [...Array(5)].map((_, i) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 bg-muted rounded" }, i)) })
7743
+ ] });
7744
+ }
7745
+ if (error || !details) {
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: [
7747
+ /* @__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
+ )
7757
+ ] });
7758
+ }
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
+ );
7772
+ const screenshots = product.screenshots ?? [];
7773
+ const totalRatings = ratingDistribution ? ratingDistribution.fiveStars + ratingDistribution.fourStars + ratingDistribution.threeStars + ratingDistribution.twoStars + ratingDistribution.oneStar : 0;
7774
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full", children: [
7775
+ /* @__PURE__ */ jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: ANIM_STYLES } }),
7776
+ /* @__PURE__ */ jsxRuntime.jsx(
7777
+ PageHead,
7778
+ {
7779
+ title: `${product.name}${productName ? ` \u2013 ${productName} Store` : " \u2013 Store"}`,
7780
+ description: product.description ?? void 0,
7781
+ productName
7782
+ }
7783
+ ),
7784
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative overflow-hidden", children: [
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
+ ),
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: [
7829
+ /* @__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
+ ),
7839
+ /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", children: "\u203A" }),
7840
+ product.category && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7841
+ /* @__PURE__ */ jsxRuntime.jsx(
7842
+ "button",
7843
+ {
7844
+ type: "button",
7845
+ onClick: () => navigate(`/store/browse?category=${product.category}`),
7846
+ className: "hover:text-primary transition-colors",
7847
+ children: product.category
7848
+ }
7849
+ ),
7850
+ /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", children: "\u203A" })
7851
+ ] }),
7852
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground font-medium", children: product.name })
7853
+ ] }),
7854
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-5 items-start", children: [
7855
+ /* @__PURE__ */ jsxRuntime.jsx(IconBlock, { src: product.icon, name: product.name }),
7856
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
7857
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sd-fu flex items-start gap-2 flex-wrap mb-1", children: [
7858
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-2xl sm:text-3xl font-bold text-foreground leading-tight", children: product.name }),
7859
+ /* @__PURE__ */ jsxRuntime.jsx(TypeBadge, { type: product.type })
7860
+ ] }),
7861
+ product.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "sd-fu sd-d1 text-muted-foreground text-sm mb-2 leading-relaxed", children: product.description }),
7862
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sd-fu sd-d2 flex items-center gap-3 text-sm text-muted-foreground flex-wrap", children: [
7863
+ product.rating != null && product.rating > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1", children: [
7864
+ /* @__PURE__ */ jsxRuntime.jsx(StarRating, { rating: product.rating }),
7865
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-foreground", children: product.rating.toFixed(1) }),
7866
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
7867
+ "(",
7868
+ reviewsCount ?? 0,
7869
+ ")"
7870
+ ] })
7871
+ ] }),
7872
+ product.downloads != null && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
7873
+ formatDownloads(product.downloads),
7874
+ " downloads"
7875
+ ] }),
7876
+ product.authorName && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
7877
+ "by ",
7878
+ product.authorName
7879
+ ] }),
7880
+ product.license && /* @__PURE__ */ jsxRuntime.jsx("span", { children: product.license })
7881
+ ] })
7882
+ ] })
7883
+ ] })
7884
+ ] })
7885
+ ] }),
7886
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid lg:grid-cols-[1fr_300px] gap-8", children: [
7887
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
7888
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sd-fu sd-d3 lg:hidden mb-6 p-4 rounded-xl border border-border bg-card flex items-center gap-4", children: [
7889
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
7890
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-2xl font-bold text-foreground", children: priceLabel }),
7891
+ product.pricingModel === "SUBSCRIPTION" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-muted-foreground", children: "per month" })
7892
+ ] }),
7893
+ /* @__PURE__ */ jsxRuntime.jsx(
7894
+ "a",
7895
+ {
7896
+ href: appLoginUrl,
7897
+ target: "_blank",
7898
+ rel: "noopener noreferrer",
7899
+ className: "flex-1 h-11 rounded-lg bg-primary text-primary-foreground text-sm font-semibold flex items-center justify-center hover:opacity-90 transition-opacity",
7900
+ children: priceLabel === "Free" ? "Install Free" : `Get for ${priceLabel}`
7901
+ }
7902
+ )
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
+ ) }),
7912
+ screenshots.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sd-fu sd-d3 mb-8", children: [
7913
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-xl overflow-hidden bg-muted aspect-video mb-3 shadow-md", children: /* @__PURE__ */ jsxRuntime.jsx(
7914
+ "img",
7915
+ {
7916
+ src: screenshots[activeScreenshot],
7917
+ alt: `Screenshot ${activeScreenshot + 1}`,
7918
+ className: "sd-fi w-full h-full object-cover"
7919
+ },
7920
+ screenshotKey
7921
+ ) }),
7922
+ screenshots.length > 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-2 overflow-x-auto pb-1", children: screenshots.map((src, i) => /* @__PURE__ */ jsxRuntime.jsx(
7923
+ "button",
7924
+ {
7925
+ type: "button",
7926
+ onClick: () => switchScreenshot(i),
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"}`,
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
+ )
7936
+ },
7937
+ i
7938
+ )) })
7939
+ ] }),
7940
+ product.longDescription && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sd-fu sd-d4 mb-8", children: [
7941
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-bold text-foreground mb-3", children: "About" }),
7942
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "prose prose-sm max-w-none text-muted-foreground leading-relaxed whitespace-pre-line", children: product.longDescription })
7943
+ ] }),
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: [
7945
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-sm font-semibold text-foreground mb-3", children: "Publisher" }),
7946
+ /* @__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() }),
7955
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
7956
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
7957
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-foreground text-sm", children: publisher.name }),
7958
+ publisher.isVerified && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-primary font-medium", children: "\u2713 Verified" })
7959
+ ] }),
7960
+ publisher.bio && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-0.5 line-clamp-2", children: publisher.bio })
7961
+ ] })
7962
+ ] })
7963
+ ] }),
7964
+ (reviews?.length ?? 0) > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sd-fu sd-d5 mb-8", children: [
7965
+ /* @__PURE__ */ jsxRuntime.jsxs("h2", { className: "text-lg font-bold text-foreground mb-4", children: [
7966
+ "Reviews (",
7967
+ reviewsCount ?? reviews.length,
7968
+ ")"
7969
+ ] }),
7970
+ ratingDistribution && totalRatings > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sd-si flex gap-6 mb-5 p-4 rounded-xl border border-border bg-card", children: [
7971
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
7972
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-4xl font-bold text-foreground tabular-nums", children: product.rating?.toFixed(1) ?? "\u2014" }),
7973
+ product.rating != null && /* @__PURE__ */ jsxRuntime.jsx(StarRating, { rating: product.rating }),
7974
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-xs text-muted-foreground mt-1", children: [
7975
+ totalRatings,
7976
+ " ratings"
7977
+ ] })
7978
+ ] }),
7979
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-1.5 pt-1", children: [
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
+ )
8020
+ ] })
8021
+ ] }),
8022
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: reviews.slice(0, 5).map((review, idx) => /* @__PURE__ */ jsxRuntime.jsxs(
8023
+ "div",
8024
+ {
8025
+ className: "sd-fu p-4 rounded-xl border border-border bg-card hover:border-primary/20 transition-colors duration-200",
8026
+ style: { animationDelay: `${(idx + 5) * 60}ms` },
8027
+ children: [
8028
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2 mb-2", children: [
8029
+ /* @__PURE__ */ jsxRuntime.jsx(StarRating, { rating: review.rating }),
8030
+ review.verifiedPurchase && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-emerald-500 font-medium", children: "Verified" })
8031
+ ] }),
8032
+ review.title && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-semibold text-sm text-foreground mb-1", children: review.title }),
8033
+ 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
+ "en-US",
8036
+ {
8037
+ year: "numeric",
8038
+ month: "short",
8039
+ day: "numeric"
8040
+ }
8041
+ ) })
8042
+ ]
8043
+ },
8044
+ review.id
8045
+ )) })
8046
+ ] }),
8047
+ (relatedProducts?.length ?? 0) > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sd-fu sd-d6", children: [
8048
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-bold text-foreground mb-4", children: "Related" }),
8049
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4", children: relatedProducts.slice(0, 6).map((p) => /* @__PURE__ */ jsxRuntime.jsx(
8050
+ ProductCard,
8051
+ {
8052
+ product: p,
8053
+ onClick: () => navigate(`/store/${p.slug}`)
8054
+ },
8055
+ p.id
8056
+ )) })
8057
+ ] })
8058
+ ] }),
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: [
8060
+ /* @__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
+ ),
8068
+ product.pricingModel === "SUBSCRIPTION" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-muted-foreground", children: "per month" })
8069
+ ] }),
8070
+ /* @__PURE__ */ jsxRuntime.jsx(
8071
+ "a",
8072
+ {
8073
+ href: appLoginUrl,
8074
+ target: "_blank",
8075
+ rel: "noopener noreferrer",
8076
+ className: "flex items-center justify-center w-full h-11 rounded-lg bg-primary text-primary-foreground text-sm font-semibold hover:opacity-90 active:scale-[0.98] transition-all duration-150",
8077
+ children: priceLabel === "Free" ? "Install Free" : `Get for ${priceLabel}`
8078
+ }
8079
+ ),
8080
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground text-center", children: "Login required to install" }),
8081
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-t border-border pt-4 space-y-2 text-xs text-muted-foreground", children: [
8082
+ product.type && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
8083
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Type" }),
8084
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground font-medium", children: product.type })
8085
+ ] }),
8086
+ product.category && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
8087
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Category" }),
8088
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground font-medium", children: product.category })
8089
+ ] }),
8090
+ product.license && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
8091
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "License" }),
8092
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground font-medium", children: product.license })
8093
+ ] }),
8094
+ product.minPlatformVersion && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
8095
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Requires" }),
8096
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-foreground font-medium", children: [
8097
+ "v",
8098
+ product.minPlatformVersion,
8099
+ "+"
8100
+ ] })
8101
+ ] }),
8102
+ product.downloads != null && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
8103
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Downloads" }),
8104
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground font-medium", children: formatDownloads(product.downloads) })
8105
+ ] })
8106
+ ] }),
8107
+ (product.tags?.length ?? 0) > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1.5 pt-1", children: product.tags.map((tag) => /* @__PURE__ */ jsxRuntime.jsx(
8108
+ "span",
8109
+ {
8110
+ className: "text-xs px-2 py-0.5 rounded-full bg-primary/10 text-primary font-medium",
8111
+ children: tag
8112
+ },
8113
+ tag
8114
+ )) })
8115
+ ] }) })
8116
+ ] }) })
8117
+ ] });
8118
+ }
6227
8119
 
6228
8120
  // src/data/products.ts
6229
8121
  var ECOSYSTEM_PRODUCTS = [
@@ -6423,12 +8315,18 @@ exports.PressKitPage = PressKitPage;
6423
8315
  exports.PricingPage = PricingPage;
6424
8316
  exports.PricingSection = PricingSection;
6425
8317
  exports.ProblemsSolvedSection = ProblemsSolvedSection;
8318
+ exports.ProductCard = ProductCard;
6426
8319
  exports.ProductProvider = ProductProvider;
6427
8320
  exports.ResourceLinks = ResourceLinks;
6428
8321
  exports.RybbitAnalytics = RybbitAnalytics;
6429
8322
  exports.Select = Select;
6430
8323
  exports.SocialLinks = SocialLinks;
8324
+ exports.StarRating = StarRating;
8325
+ exports.StoreBrowsePage = StoreBrowsePage;
8326
+ exports.StoreHomePage = StoreHomePage;
8327
+ exports.StoreProductDetailPage = StoreProductDetailPage;
6431
8328
  exports.Textarea = Textarea;
8329
+ exports.TypeBadge = TypeBadge;
6432
8330
  exports.UnsubscribePage = UnsubscribePage;
6433
8331
  exports.WaitlistForm = WaitlistForm;
6434
8332
  exports.WaitlistPage = WaitlistPage;
@@ -6438,6 +8336,8 @@ exports.WebsiteSwitcher = WebsiteSwitcher;
6438
8336
  exports.buttonVariants = buttonVariants;
6439
8337
  exports.cn = cn;
6440
8338
  exports.detectElectronPlatform = detectElectronPlatform;
8339
+ exports.formatDownloads = formatDownloads;
8340
+ exports.formatPrice = formatPrice2;
6441
8341
  exports.useContentPage = useContentPage;
6442
8342
  exports.useContentPages = useContentPages;
6443
8343
  exports.useProduct = useProduct;