@burdenoff/microfe-store 2026.608.1 → 2026.614.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/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js +24 -0
- package/dist/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js.map +1 -0
- package/dist/node_modules/@apollo/client/errors/utils.js +16 -0
- package/dist/node_modules/@apollo/client/errors/utils.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/core/ApolloLink.js +52 -0
- package/dist/node_modules/@apollo/client/link/core/ApolloLink.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/subscriptions/index.js +41 -0
- package/dist/node_modules/@apollo/client/link/subscriptions/index.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/utils/createOperation.js +34 -0
- package/dist/node_modules/@apollo/client/link/utils/createOperation.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/caching/sizes.js +6 -0
- package/dist/node_modules/@apollo/client/utilities/caching/sizes.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/graphql/print.js +16 -0
- package/dist/node_modules/@apollo/client/utilities/graphql/print.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/caches.js +19 -0
- package/dist/node_modules/@apollo/client/utilities/internal/caches.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js +21 -0
- package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getMainDefinition.js +17 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getMainDefinition.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js +9 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js +9 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js +8 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js +9 -0
- package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js +10 -0
- package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js +8 -0
- package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js +10 -0
- package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/memoize.js +23 -0
- package/dist/node_modules/@apollo/client/utilities/internal/memoize.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js +10 -0
- package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/invariant/index.js +57 -0
- package/dist/node_modules/@apollo/client/utilities/invariant/index.js.map +1 -0
- package/dist/node_modules/@apollo/client/version.js +6 -0
- package/dist/node_modules/@apollo/client/version.js.map +1 -0
- package/dist/node_modules/@wry/caches/lib/weak.js +67 -0
- package/dist/node_modules/@wry/caches/lib/weak.js.map +1 -0
- package/dist/node_modules/@wry/trie/lib/index.js +53 -0
- package/dist/node_modules/@wry/trie/lib/index.js.map +1 -0
- package/dist/node_modules/graphql-ws/dist/client.js +272 -0
- package/dist/node_modules/graphql-ws/dist/client.js.map +1 -0
- package/dist/node_modules/graphql-ws/dist/common-CGW11Fyb.js +62 -0
- package/dist/node_modules/graphql-ws/dist/common-CGW11Fyb.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js +21 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js +78 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js +117 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js +93 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/config.js +12 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/config.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js +9 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +16 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js +8 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js +13 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js +11 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js +11 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js +22 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js +8 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js +8 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js +6 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js +13 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js +14 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map +1 -0
- package/dist/node_modules/rxjs/node_modules/tslib/tslib.es6.js +52 -0
- package/dist/node_modules/rxjs/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/pages/CartPage.js +1 -2
- package/dist/pages/CartPage.js.map +1 -1
- package/dist/pages/ProductDetailPage.js +247 -225
- package/dist/pages/ProductDetailPage.js.map +1 -1
- package/dist/pages/PublisherSubmitPage.js +36 -36
- package/dist/providers/StoreProvider.js +68 -37
- package/dist/providers/StoreProvider.js.map +1 -1
- package/package.json +2 -1
|
@@ -2,15 +2,16 @@ import { useStore as e } from "../providers/StoreProvider.js";
|
|
|
2
2
|
import { useCart as t } from "../hooks/useCart.js";
|
|
3
3
|
import { formatNumber as n, formatPrice as r } from "../utils/index.js";
|
|
4
4
|
import { useCreateReview as ee, useDeleteReview as te, useMarkReviewHelpful as ne, useStoreProductDetails as re, useUpdateReview as ie } from "../hooks/useStoreGraphQL.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
5
|
+
import { useInstallations as ae } from "../hooks/useInstallations.js";
|
|
6
|
+
import { nativeConfirm as oe, nativeImpact as se, nativeNotify as ce } from "../utils/nativeBridge.js";
|
|
7
|
+
import { InstallAppModal as le } from "../components/InstallAppModal.js";
|
|
8
|
+
import { useCallback as i, useEffect as ue, useMemo as de, useRef as a, useState as o } from "react";
|
|
9
|
+
import { AlertCircle as s, ArrowLeft as fe, Check as pe, Loader2 as me, Package as he, ShieldCheck as c, ShoppingCart as ge, Star as l, ThumbsUp as u } from "lucide-react";
|
|
10
|
+
import { Fragment as _e, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
11
|
+
import { useLocation as ve, useNavigate as ye, useParams as be } from "react-router-dom";
|
|
12
|
+
import { useEventBus as xe } from "@burdenoff/fe-libs/shared/events";
|
|
12
13
|
//#region src/pages/ProductDetailPage.tsx
|
|
13
|
-
var
|
|
14
|
+
var Se = (e, t) => ({
|
|
14
15
|
id: e.id,
|
|
15
16
|
publisherId: t?.id || "",
|
|
16
17
|
publisher: {
|
|
@@ -82,7 +83,7 @@ var ye = (e, t) => ({
|
|
|
82
83
|
createdAt: e.createdAt,
|
|
83
84
|
updatedAt: e.updatedAt,
|
|
84
85
|
publishedAt: e.publishedAt
|
|
85
|
-
}),
|
|
86
|
+
}), Ce = ({ stars: e, percentage: t, count: r }) => /* @__PURE__ */ f("div", {
|
|
86
87
|
className: "flex items-center gap-2",
|
|
87
88
|
children: [
|
|
88
89
|
/* @__PURE__ */ d("span", {
|
|
@@ -101,7 +102,7 @@ var ye = (e, t) => ({
|
|
|
101
102
|
children: n(r)
|
|
102
103
|
})
|
|
103
104
|
]
|
|
104
|
-
}),
|
|
105
|
+
}), we = ({ review: e, onMarkHelpful: t, markingHelpful: n }) => /* @__PURE__ */ f("div", {
|
|
105
106
|
className: "rounded-lg border border-border-default bg-bg-surface p-4",
|
|
106
107
|
children: [
|
|
107
108
|
/* @__PURE__ */ d("div", {
|
|
@@ -162,7 +163,7 @@ var ye = (e, t) => ({
|
|
|
162
163
|
})
|
|
163
164
|
})
|
|
164
165
|
]
|
|
165
|
-
}),
|
|
166
|
+
}), Te = () => /* @__PURE__ */ f("div", {
|
|
166
167
|
className: "h-full overflow-y-auto",
|
|
167
168
|
children: [/* @__PURE__ */ d("div", {
|
|
168
169
|
className: "sticky top-0 z-10 border-b border-border-default bg-bg-surface px-6 py-4",
|
|
@@ -416,7 +417,7 @@ var ye = (e, t) => ({
|
|
|
416
417
|
})
|
|
417
418
|
]
|
|
418
419
|
})]
|
|
419
|
-
}),
|
|
420
|
+
}), Ee = ({ error: e, onRetry: t, onBack: n }) => /* @__PURE__ */ d("div", {
|
|
420
421
|
className: "flex h-full items-center justify-center",
|
|
421
422
|
children: /* @__PURE__ */ f("div", {
|
|
422
423
|
className: "text-center",
|
|
@@ -446,8 +447,14 @@ var ye = (e, t) => ({
|
|
|
446
447
|
})
|
|
447
448
|
]
|
|
448
449
|
})
|
|
449
|
-
}),
|
|
450
|
-
let { productId: s } =
|
|
450
|
+
}), De = () => {
|
|
451
|
+
let { productId: s } = be(), u = ye(), De = ve(), { basePath: p, workspaceId: m } = e(), { addProduct: h, cartItems: Oe, addingToCart: g, createOrder: _, checkingOut: v } = t(), { installations: ke } = ae({
|
|
452
|
+
filter: de(() => s && m ? {
|
|
453
|
+
productId: s,
|
|
454
|
+
workspaceId: m
|
|
455
|
+
} : void 0, [s, m]),
|
|
456
|
+
limit: 1
|
|
457
|
+
}), Ae = ke.some((e) => e.productId === s && e.workspaceId === m && e.status === "ACTIVE"), { createReview: y, loading: b } = ee(), { updateReview: x, loading: S } = ie(), { deleteReview: C, loading: w } = te(), { markHelpful: T, loading: je } = ne(), E = xe(), [D, Me] = o(!1), [O, Ne] = o(!1), [Pe, k] = o(!1), [Fe, A] = o(null), [Ie, j] = o(null), [Le, M] = o("success"), [N, P] = o(!1), [F, I] = o(""), [L, R] = o(""), [z, B] = o(5), [Re, ze] = o(null), [Be, Ve] = o(!1), { data: He, loading: Ue, error: We, refetch: V } = re({
|
|
451
458
|
id: s,
|
|
452
459
|
slug: s,
|
|
453
460
|
includeReviews: !0,
|
|
@@ -455,135 +462,135 @@ var ye = (e, t) => ({
|
|
|
455
462
|
includeRelated: !0,
|
|
456
463
|
relatedLimit: 4,
|
|
457
464
|
includeVersions: !0
|
|
458
|
-
}),
|
|
459
|
-
if (
|
|
460
|
-
if (
|
|
465
|
+
}), H = He, U = H?.product, W = H?.publisher, G = Oe.some((e) => e.productId === U?.id), Ge = i(async () => {
|
|
466
|
+
if (U) {
|
|
467
|
+
if (A(null), G) {
|
|
461
468
|
u(`${p}/cart`);
|
|
462
469
|
return;
|
|
463
470
|
}
|
|
464
471
|
try {
|
|
465
|
-
await
|
|
472
|
+
await h(Se(U, W), void 0, 1);
|
|
466
473
|
} catch (e) {
|
|
467
|
-
console.error("Failed to add product to cart:", e),
|
|
474
|
+
console.error("Failed to add product to cart:", e), A("Failed to add this product to cart. Please try again.");
|
|
468
475
|
}
|
|
469
476
|
}
|
|
470
477
|
}, [
|
|
471
|
-
H,
|
|
472
478
|
U,
|
|
473
|
-
m,
|
|
474
479
|
W,
|
|
480
|
+
h,
|
|
481
|
+
G,
|
|
475
482
|
u,
|
|
476
483
|
p
|
|
477
|
-
]),
|
|
478
|
-
if (
|
|
479
|
-
|
|
484
|
+
]), Ke = i(async () => {
|
|
485
|
+
if (U) {
|
|
486
|
+
A(null), k(!0);
|
|
480
487
|
try {
|
|
481
|
-
let e =
|
|
488
|
+
let e = U.price || 0, t = await _({
|
|
482
489
|
total: e,
|
|
483
490
|
lineItems: [{
|
|
484
|
-
productId:
|
|
485
|
-
name:
|
|
491
|
+
productId: U.id,
|
|
492
|
+
name: U.name,
|
|
486
493
|
quantity: 1,
|
|
487
494
|
unitPrice: e,
|
|
488
495
|
subtotal: e,
|
|
489
|
-
itemType:
|
|
490
|
-
pricingModel:
|
|
496
|
+
itemType: U.nature?.toLowerCase() || "digital",
|
|
497
|
+
pricingModel: U.pricingModel || "PAID_ONETIME"
|
|
491
498
|
}],
|
|
492
499
|
billingAccountId: ""
|
|
493
500
|
});
|
|
494
|
-
t?.id ? u(`/billing/checkout/store/${t.id}`) : (console.error("Failed to create order"),
|
|
501
|
+
t?.id ? u(`/billing/checkout/store/${t.id}${De.search}`) : (console.error("Failed to create order"), A("Failed to create order. Please try again."), k(!1));
|
|
495
502
|
} catch (e) {
|
|
496
|
-
console.error("Buy Now error:", e),
|
|
503
|
+
console.error("Buy Now error:", e), A(e instanceof Error ? e.message : "Failed to start checkout"), k(!1);
|
|
497
504
|
}
|
|
498
505
|
}
|
|
499
506
|
}, [
|
|
500
|
-
|
|
501
|
-
|
|
507
|
+
U,
|
|
508
|
+
_,
|
|
502
509
|
u
|
|
503
|
-
]),
|
|
504
|
-
|
|
505
|
-
}, [
|
|
506
|
-
|
|
507
|
-
let
|
|
508
|
-
|
|
509
|
-
let e =
|
|
510
|
-
e &&
|
|
510
|
+
]), qe = i(() => {
|
|
511
|
+
U && Ve(!0);
|
|
512
|
+
}, [U]), Je = a(U);
|
|
513
|
+
Je.current = U;
|
|
514
|
+
let Ye = a(E);
|
|
515
|
+
Ye.current = E, ue(() => {
|
|
516
|
+
let e = Je.current;
|
|
517
|
+
e && Ye.current.emit("store.product.viewed", {
|
|
511
518
|
productId: e.id,
|
|
512
519
|
productSlug: e.slug,
|
|
513
520
|
productType: e.type,
|
|
514
521
|
pricingModel: e.pricingModel
|
|
515
522
|
});
|
|
516
|
-
}, [
|
|
517
|
-
let
|
|
518
|
-
|
|
519
|
-
productId:
|
|
523
|
+
}, [U?.id]);
|
|
524
|
+
let Xe = i((e, t) => {
|
|
525
|
+
U && (E.emit("store.product.installed", {
|
|
526
|
+
productId: U.id,
|
|
520
527
|
workspaceId: e
|
|
521
|
-
}), console.log(`Successfully installed ${
|
|
522
|
-
}, [
|
|
528
|
+
}), console.log(`Successfully installed ${U.name} to workspace ${t} (${e})`));
|
|
529
|
+
}, [U, E]), Ze = i((e) => {
|
|
523
530
|
console.error("Installation failed:", e.message);
|
|
524
|
-
}, []),
|
|
525
|
-
|
|
526
|
-
}, [
|
|
527
|
-
if (!
|
|
528
|
-
if (
|
|
529
|
-
|
|
531
|
+
}, []), Qe = i(() => {
|
|
532
|
+
I(H?.userReview?.title ?? ""), R(H?.userReview?.comment ?? ""), B(H?.userReview?.rating ?? 5), j(null), M("success"), P(!0);
|
|
533
|
+
}, [H?.userReview]), $e = i(async () => {
|
|
534
|
+
if (!U) return;
|
|
535
|
+
if (z < 1 || z > 5) {
|
|
536
|
+
M("error"), j("Choose a rating from 1 to 5 stars.");
|
|
530
537
|
return;
|
|
531
538
|
}
|
|
532
539
|
let e = {
|
|
533
|
-
productId:
|
|
534
|
-
rating:
|
|
535
|
-
title:
|
|
536
|
-
comment:
|
|
540
|
+
productId: U.id,
|
|
541
|
+
rating: z,
|
|
542
|
+
title: F.trim() || void 0,
|
|
543
|
+
comment: L.trim() || void 0
|
|
537
544
|
};
|
|
538
|
-
if (!(
|
|
545
|
+
if (!(H?.userReview ? await x(H.userReview.id, {
|
|
539
546
|
rating: e.rating,
|
|
540
547
|
title: e.title,
|
|
541
548
|
comment: e.comment
|
|
542
|
-
}) : await
|
|
543
|
-
|
|
549
|
+
}) : await y(e))) {
|
|
550
|
+
M("error"), j("We could not save your review. Please try again.");
|
|
544
551
|
return;
|
|
545
552
|
}
|
|
546
|
-
|
|
547
|
-
productId:
|
|
548
|
-
rating:
|
|
549
|
-
}), await
|
|
553
|
+
M("success"), j(H?.userReview ? "Your review was updated." : "Your review was submitted."), P(!1), E.emit("store.review.submitted", {
|
|
554
|
+
productId: U.id,
|
|
555
|
+
rating: z
|
|
556
|
+
}), await V();
|
|
550
557
|
}, [
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
]),
|
|
561
|
-
if (
|
|
558
|
+
E,
|
|
559
|
+
y,
|
|
560
|
+
U,
|
|
561
|
+
H?.userReview,
|
|
562
|
+
V,
|
|
563
|
+
L,
|
|
564
|
+
z,
|
|
565
|
+
F,
|
|
566
|
+
x
|
|
567
|
+
]), et = i(async () => {
|
|
568
|
+
if (H?.userReview && (se("medium"), await oe({
|
|
562
569
|
title: "Delete review",
|
|
563
570
|
message: "Are you sure you want to remove your review?",
|
|
564
571
|
okButtonTitle: "Delete",
|
|
565
572
|
cancelButtonTitle: "Cancel"
|
|
566
573
|
}) !== !1)) {
|
|
567
|
-
if (!await
|
|
568
|
-
|
|
574
|
+
if (!await C(H.userReview.id)) {
|
|
575
|
+
M("error"), j("We could not remove your review. Please try again."), ce("error");
|
|
569
576
|
return;
|
|
570
577
|
}
|
|
571
|
-
|
|
578
|
+
M("success"), j("Your review was removed."), P(!1), I(""), R(""), B(5), ce("success"), await V();
|
|
572
579
|
}
|
|
573
580
|
}, [
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
]),
|
|
578
|
-
|
|
579
|
-
}, [
|
|
580
|
-
if (
|
|
581
|
-
if (
|
|
582
|
-
error:
|
|
583
|
-
onRetry:
|
|
581
|
+
C,
|
|
582
|
+
H?.userReview,
|
|
583
|
+
V
|
|
584
|
+
]), tt = i(async (e) => {
|
|
585
|
+
ze(e), await T(e) && await V(), ze(null);
|
|
586
|
+
}, [T, V]);
|
|
587
|
+
if (Ue) return /* @__PURE__ */ d(Te, {});
|
|
588
|
+
if (We) return /* @__PURE__ */ d(Ee, {
|
|
589
|
+
error: We,
|
|
590
|
+
onRetry: V,
|
|
584
591
|
onBack: () => u(`${p}/marketplace`)
|
|
585
592
|
});
|
|
586
|
-
if (!
|
|
593
|
+
if (!H?.product) return /* @__PURE__ */ d("div", {
|
|
587
594
|
className: "flex h-full items-center justify-center",
|
|
588
595
|
children: /* @__PURE__ */ f("div", {
|
|
589
596
|
className: "text-center",
|
|
@@ -605,33 +612,33 @@ var ye = (e, t) => ({
|
|
|
605
612
|
]
|
|
606
613
|
})
|
|
607
614
|
});
|
|
608
|
-
let { reviews:
|
|
615
|
+
let { reviews: K, reviewsCount: nt, relatedProducts: q, ratingDistribution: J, isPurchased: Y, userEntitlement: X } = H, Z = U, Q = J ? J.fiveStars + J.fourStars + J.threeStars + J.twoStars + J.oneStar : 0, rt = J ? [
|
|
609
616
|
{
|
|
610
617
|
stars: 5,
|
|
611
|
-
count:
|
|
612
|
-
percentage:
|
|
618
|
+
count: J.fiveStars,
|
|
619
|
+
percentage: Q > 0 ? J.fiveStars / Q * 100 : 0
|
|
613
620
|
},
|
|
614
621
|
{
|
|
615
622
|
stars: 4,
|
|
616
|
-
count:
|
|
617
|
-
percentage:
|
|
623
|
+
count: J.fourStars,
|
|
624
|
+
percentage: Q > 0 ? J.fourStars / Q * 100 : 0
|
|
618
625
|
},
|
|
619
626
|
{
|
|
620
627
|
stars: 3,
|
|
621
|
-
count:
|
|
622
|
-
percentage:
|
|
628
|
+
count: J.threeStars,
|
|
629
|
+
percentage: Q > 0 ? J.threeStars / Q * 100 : 0
|
|
623
630
|
},
|
|
624
631
|
{
|
|
625
632
|
stars: 2,
|
|
626
|
-
count:
|
|
627
|
-
percentage:
|
|
633
|
+
count: J.twoStars,
|
|
634
|
+
percentage: Q > 0 ? J.twoStars / Q * 100 : 0
|
|
628
635
|
},
|
|
629
636
|
{
|
|
630
637
|
stars: 1,
|
|
631
|
-
count:
|
|
632
|
-
percentage:
|
|
638
|
+
count: J.oneStar,
|
|
639
|
+
percentage: Q > 0 ? J.oneStar / Q * 100 : 0
|
|
633
640
|
}
|
|
634
|
-
] : [],
|
|
641
|
+
] : [], it = Z.requiredPermissions || [], at = Z.integrationDeps || [], ot = () => Z.pricingModel === "FREE" ? "Free" : Z.pricingModel === "SUBSCRIPTION" ? `${r(Z.price, Z.currency)}/mo` : r(Z.price, Z.currency), $ = Z.pricingModel === "FREE" || Z.price === 0;
|
|
635
642
|
return /* @__PURE__ */ f("div", {
|
|
636
643
|
className: "h-full overflow-y-auto bg-bg-base",
|
|
637
644
|
children: [
|
|
@@ -648,31 +655,31 @@ var ye = (e, t) => ({
|
|
|
648
655
|
type: "button",
|
|
649
656
|
onClick: () => u(-1),
|
|
650
657
|
className: "mb-6 cursor-pointer inline-flex items-center gap-2 text-sm text-text-muted transition-colors hover:text-text-primary",
|
|
651
|
-
children: [/* @__PURE__ */ d(
|
|
658
|
+
children: [/* @__PURE__ */ d(fe, { className: "size-4" }), "Back"]
|
|
652
659
|
}),
|
|
653
660
|
/* @__PURE__ */ d("h1", {
|
|
654
661
|
className: "mb-4 text-4xl font-normal leading-tight text-text-primary lg:text-5xl",
|
|
655
|
-
children:
|
|
662
|
+
children: Z.name
|
|
656
663
|
}),
|
|
657
664
|
/* @__PURE__ */ f("div", {
|
|
658
665
|
className: "mb-2",
|
|
659
|
-
children: [
|
|
660
|
-
href:
|
|
666
|
+
children: [W?.websiteUrl ? /* @__PURE__ */ d("a", {
|
|
667
|
+
href: W.websiteUrl,
|
|
661
668
|
target: "_blank",
|
|
662
669
|
rel: "noreferrer",
|
|
663
670
|
className: "text-base font-medium text-text-link hover:underline",
|
|
664
|
-
children:
|
|
671
|
+
children: W.name
|
|
665
672
|
}) : /* @__PURE__ */ d("span", {
|
|
666
673
|
className: "text-base font-medium text-text-primary",
|
|
667
|
-
children:
|
|
668
|
-
}),
|
|
674
|
+
children: W?.name || Z.authorName || "Unknown Publisher"
|
|
675
|
+
}), W?.isVerified && /* @__PURE__ */ d(c, { className: "ml-1.5 inline size-4 text-status-success-text" })]
|
|
669
676
|
}),
|
|
670
677
|
/* @__PURE__ */ f("p", {
|
|
671
678
|
className: "mb-6 text-sm text-text-muted",
|
|
672
679
|
children: [
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
n(
|
|
680
|
+
Z.category && /* @__PURE__ */ d("span", { children: Z.category }),
|
|
681
|
+
Z.category && " · ",
|
|
682
|
+
n(Z.downloads),
|
|
676
683
|
"+ downloads"
|
|
677
684
|
]
|
|
678
685
|
}),
|
|
@@ -681,13 +688,13 @@ var ye = (e, t) => ({
|
|
|
681
688
|
children: [
|
|
682
689
|
/* @__PURE__ */ d("div", {
|
|
683
690
|
className: "flex size-12 items-center justify-center overflow-hidden rounded-xl bg-bg-sunken",
|
|
684
|
-
children:
|
|
685
|
-
src:
|
|
691
|
+
children: Z.icon ? /* @__PURE__ */ d("img", {
|
|
692
|
+
src: Z.icon,
|
|
686
693
|
alt: "",
|
|
687
694
|
className: "size-full object-cover"
|
|
688
695
|
}) : /* @__PURE__ */ d("span", {
|
|
689
696
|
className: "text-lg font-bold text-text-muted",
|
|
690
|
-
children:
|
|
697
|
+
children: Z.name.charAt(0)
|
|
691
698
|
})
|
|
692
699
|
}),
|
|
693
700
|
/* @__PURE__ */ f("div", {
|
|
@@ -695,12 +702,12 @@ var ye = (e, t) => ({
|
|
|
695
702
|
children: [
|
|
696
703
|
/* @__PURE__ */ d("span", {
|
|
697
704
|
className: "text-sm font-medium text-text-primary",
|
|
698
|
-
children: (
|
|
705
|
+
children: (Z.rating || 0).toFixed(1)
|
|
699
706
|
}),
|
|
700
707
|
/* @__PURE__ */ d(l, { className: "size-4 fill-current text-status-warning-text" }),
|
|
701
708
|
/* @__PURE__ */ f("span", {
|
|
702
709
|
className: "ml-1 text-xs text-text-muted",
|
|
703
|
-
children: [n(
|
|
710
|
+
children: [n(nt || Z.reviewCount), " reviews"]
|
|
704
711
|
})
|
|
705
712
|
]
|
|
706
713
|
}),
|
|
@@ -708,7 +715,7 @@ var ye = (e, t) => ({
|
|
|
708
715
|
className: "border-l border-border-default pl-4",
|
|
709
716
|
children: [/* @__PURE__ */ f("span", {
|
|
710
717
|
className: "text-sm font-medium text-text-primary",
|
|
711
|
-
children: [n(
|
|
718
|
+
children: [n(Z.downloads), "+"]
|
|
712
719
|
}), /* @__PURE__ */ d("p", {
|
|
713
720
|
className: "text-xs text-text-muted",
|
|
714
721
|
children: "Downloads"
|
|
@@ -718,7 +725,7 @@ var ye = (e, t) => ({
|
|
|
718
725
|
className: "border-l border-border-default pl-4",
|
|
719
726
|
children: [/* @__PURE__ */ d("span", {
|
|
720
727
|
className: "rounded bg-bg-sunken px-2 py-1 text-xs font-medium text-text-primary",
|
|
721
|
-
children:
|
|
728
|
+
children: Z.type
|
|
722
729
|
}), /* @__PURE__ */ d("p", {
|
|
723
730
|
className: "mt-0.5 text-xs text-text-muted",
|
|
724
731
|
children: "Type"
|
|
@@ -726,56 +733,71 @@ var ye = (e, t) => ({
|
|
|
726
733
|
})
|
|
727
734
|
]
|
|
728
735
|
}),
|
|
729
|
-
|
|
736
|
+
Fe && /* @__PURE__ */ d("div", {
|
|
730
737
|
role: "alert",
|
|
731
738
|
className: "mb-4 rounded-lg border border-status-error-bg bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
|
|
732
|
-
children:
|
|
739
|
+
children: Fe
|
|
733
740
|
}),
|
|
734
741
|
/* @__PURE__ */ f("div", {
|
|
735
742
|
className: "mb-6 flex items-center gap-3",
|
|
736
|
-
children: [
|
|
743
|
+
children: [Ae ? /* @__PURE__ */ f("button", {
|
|
744
|
+
type: "button",
|
|
745
|
+
disabled: !0,
|
|
746
|
+
className: "flex items-center gap-2 rounded-full bg-status-success-bg-subtle px-8 py-3 font-medium text-status-success-text cursor-default",
|
|
747
|
+
children: [/* @__PURE__ */ d("svg", {
|
|
748
|
+
className: "size-4",
|
|
749
|
+
viewBox: "0 0 16 16",
|
|
750
|
+
fill: "none",
|
|
751
|
+
stroke: "currentColor",
|
|
752
|
+
strokeWidth: "2",
|
|
753
|
+
strokeLinecap: "round",
|
|
754
|
+
strokeLinejoin: "round",
|
|
755
|
+
"aria-hidden": "true",
|
|
756
|
+
children: /* @__PURE__ */ d("polyline", { points: "2,8 6,12 14,4" })
|
|
757
|
+
}), "Installed"]
|
|
758
|
+
}) : Y && !$ ? /* @__PURE__ */ d("button", {
|
|
737
759
|
type: "button",
|
|
738
|
-
onClick:
|
|
760
|
+
onClick: qe,
|
|
739
761
|
className: "cursor-pointer rounded-full bg-action-primary-bg px-8 py-3 font-medium text-action-primary-text transition-opacity hover:opacity-90",
|
|
740
762
|
children: "Install to Workspace"
|
|
741
763
|
}) : $ ? /* @__PURE__ */ d("button", {
|
|
742
764
|
type: "button",
|
|
743
|
-
onClick:
|
|
765
|
+
onClick: qe,
|
|
744
766
|
className: "cursor-pointer rounded-full bg-action-primary-bg px-8 py-3 font-medium text-action-primary-text transition-opacity hover:opacity-90",
|
|
745
767
|
children: "Install"
|
|
746
768
|
}) : /* @__PURE__ */ d("button", {
|
|
747
769
|
type: "button",
|
|
748
|
-
onClick:
|
|
749
|
-
disabled:
|
|
770
|
+
onClick: Ke,
|
|
771
|
+
disabled: Pe || v,
|
|
750
772
|
className: "cursor-pointer flex items-center gap-2 rounded-full bg-action-primary-bg px-8 py-3 font-medium text-action-primary-text transition-opacity hover:opacity-90 disabled:opacity-70",
|
|
751
|
-
children:
|
|
752
|
-
}), !$ && !
|
|
773
|
+
children: Pe || v ? /* @__PURE__ */ f(_e, { children: [/* @__PURE__ */ d(me, { className: "size-4 animate-spin" }), "Processing…"] }) : `Buy ${ot()}`
|
|
774
|
+
}), !$ && !Y && /* @__PURE__ */ f("button", {
|
|
753
775
|
type: "button",
|
|
754
|
-
onClick:
|
|
755
|
-
disabled:
|
|
776
|
+
onClick: Ge,
|
|
777
|
+
disabled: g,
|
|
756
778
|
className: "cursor-pointer flex items-center gap-2 rounded-full border border-border-default px-4 py-3 text-sm text-text-primary transition-colors hover:bg-bg-sunken disabled:opacity-50",
|
|
757
|
-
children: [
|
|
779
|
+
children: [g ? /* @__PURE__ */ d(me, { className: "size-4 animate-spin" }) : G ? /* @__PURE__ */ d(pe, { className: "size-4 text-status-success-text" }) : /* @__PURE__ */ d(ge, { className: "size-4" }), G ? "In Cart" : "Add to Cart"]
|
|
758
780
|
})]
|
|
759
781
|
}),
|
|
760
782
|
/* @__PURE__ */ f("p", {
|
|
761
783
|
className: "flex items-center gap-2 text-xs text-text-muted",
|
|
762
|
-
children: [/* @__PURE__ */ d(
|
|
784
|
+
children: [/* @__PURE__ */ d(he, { className: "size-4" }), "This app is available for your workspace"]
|
|
763
785
|
}),
|
|
764
|
-
|
|
786
|
+
X && /* @__PURE__ */ f("p", {
|
|
765
787
|
className: "mt-2 flex items-center gap-2 text-xs text-text-muted",
|
|
766
788
|
children: [
|
|
767
789
|
/* @__PURE__ */ d(c, { className: "size-4 text-status-success-text" }),
|
|
768
790
|
"License: ",
|
|
769
|
-
|
|
770
|
-
|
|
791
|
+
X.status,
|
|
792
|
+
X.expiresAt && ` (Expires: ${new Date(X.expiresAt).toLocaleDateString()})`
|
|
771
793
|
]
|
|
772
794
|
})
|
|
773
795
|
]
|
|
774
796
|
}), /* @__PURE__ */ d("div", {
|
|
775
797
|
className: "relative flex-1 bg-bg-sunken lg:min-h-[500px]",
|
|
776
|
-
children:
|
|
777
|
-
src:
|
|
778
|
-
alt: `${
|
|
798
|
+
children: Z.screenshots && Z.screenshots.length > 0 ? /* @__PURE__ */ d("img", {
|
|
799
|
+
src: Z.screenshots[0],
|
|
800
|
+
alt: `${Z.name} screenshot`,
|
|
779
801
|
className: "size-full object-cover"
|
|
780
802
|
}) : /* @__PURE__ */ d("div", {
|
|
781
803
|
className: "flex h-full min-h-[300px] items-center justify-center",
|
|
@@ -783,7 +805,7 @@ var ye = (e, t) => ({
|
|
|
783
805
|
className: "text-center",
|
|
784
806
|
children: [/* @__PURE__ */ d("div", {
|
|
785
807
|
className: "mx-auto mb-4 flex size-24 items-center justify-center rounded-2xl bg-bg-surface text-4xl font-bold text-text-muted",
|
|
786
|
-
children:
|
|
808
|
+
children: Z.name.charAt(0)
|
|
787
809
|
}), /* @__PURE__ */ d("p", {
|
|
788
810
|
className: "text-sm text-text-muted",
|
|
789
811
|
children: "No preview available"
|
|
@@ -801,11 +823,11 @@ var ye = (e, t) => ({
|
|
|
801
823
|
children: [/* @__PURE__ */ f("div", {
|
|
802
824
|
className: "flex-1 lg:max-w-3xl",
|
|
803
825
|
children: [
|
|
804
|
-
|
|
826
|
+
Z.screenshots && Z.screenshots.length > 1 && /* @__PURE__ */ d("section", {
|
|
805
827
|
className: "mb-8",
|
|
806
828
|
children: /* @__PURE__ */ d("div", {
|
|
807
829
|
className: "flex gap-4 overflow-x-auto pb-4",
|
|
808
|
-
children:
|
|
830
|
+
children: Z.screenshots.map((e, t) => /* @__PURE__ */ d("div", {
|
|
809
831
|
className: "relative h-64 w-96 flex-shrink-0 overflow-hidden rounded-xl bg-bg-sunken",
|
|
810
832
|
children: /* @__PURE__ */ d("img", {
|
|
811
833
|
src: e,
|
|
@@ -828,18 +850,18 @@ var ye = (e, t) => ({
|
|
|
828
850
|
/* @__PURE__ */ f("div", {
|
|
829
851
|
className: "text-sm leading-relaxed text-text-secondary",
|
|
830
852
|
children: [/* @__PURE__ */ d("p", {
|
|
831
|
-
className:
|
|
832
|
-
children:
|
|
833
|
-
}), ((
|
|
853
|
+
className: D ? "" : "line-clamp-4",
|
|
854
|
+
children: Z.longDescription || Z.description || "No description available."
|
|
855
|
+
}), ((Z.longDescription || Z.description)?.length ?? 0) > 200 && /* @__PURE__ */ d("button", {
|
|
834
856
|
type: "button",
|
|
835
|
-
onClick: () =>
|
|
857
|
+
onClick: () => Me(!D),
|
|
836
858
|
className: "cursor-pointer mt-3 text-sm font-medium text-text-link",
|
|
837
|
-
children:
|
|
859
|
+
children: D ? "Show less" : "Show more"
|
|
838
860
|
})]
|
|
839
861
|
}),
|
|
840
|
-
|
|
862
|
+
Z.tags && Z.tags.length > 0 && /* @__PURE__ */ d("div", {
|
|
841
863
|
className: "mt-4 flex flex-wrap gap-2",
|
|
842
|
-
children:
|
|
864
|
+
children: Z.tags.map((e) => /* @__PURE__ */ d("span", {
|
|
843
865
|
className: "rounded-full border border-border-default px-3 py-1.5 text-xs text-text-muted transition-colors hover:bg-bg-sunken",
|
|
844
866
|
children: e
|
|
845
867
|
}, e))
|
|
@@ -858,14 +880,14 @@ var ye = (e, t) => ({
|
|
|
858
880
|
}),
|
|
859
881
|
/* @__PURE__ */ f("div", {
|
|
860
882
|
className: "rounded-xl border border-border-default bg-bg-surface p-5",
|
|
861
|
-
children: [
|
|
883
|
+
children: [K && K.length > 0 ? /* @__PURE__ */ f("div", {
|
|
862
884
|
className: "flex items-start gap-8",
|
|
863
885
|
children: [/* @__PURE__ */ f("div", {
|
|
864
886
|
className: "text-center",
|
|
865
887
|
children: [
|
|
866
888
|
/* @__PURE__ */ d("p", {
|
|
867
889
|
className: "text-5xl font-light text-text-primary",
|
|
868
|
-
children: (
|
|
890
|
+
children: (Z.rating || 0).toFixed(1)
|
|
869
891
|
}),
|
|
870
892
|
/* @__PURE__ */ d("div", {
|
|
871
893
|
className: "my-2 flex justify-center gap-0.5",
|
|
@@ -875,16 +897,16 @@ var ye = (e, t) => ({
|
|
|
875
897
|
3,
|
|
876
898
|
4,
|
|
877
899
|
5
|
|
878
|
-
].map((e) => /* @__PURE__ */ d(l, { className: `size-4 ${e <= Math.round(
|
|
900
|
+
].map((e) => /* @__PURE__ */ d(l, { className: `size-4 ${e <= Math.round(Z.rating || 0) ? "fill-current text-status-warning-text" : "text-text-muted"}` }, e))
|
|
879
901
|
}),
|
|
880
902
|
/* @__PURE__ */ f("p", {
|
|
881
903
|
className: "text-sm text-text-muted",
|
|
882
|
-
children: [n(
|
|
904
|
+
children: [n(nt || Z.reviewCount), " reviews"]
|
|
883
905
|
})
|
|
884
906
|
]
|
|
885
|
-
}),
|
|
907
|
+
}), rt.length > 0 && /* @__PURE__ */ d("div", {
|
|
886
908
|
className: "flex-1 space-y-1.5",
|
|
887
|
-
children:
|
|
909
|
+
children: rt.map((e) => /* @__PURE__ */ d(Ce, { ...e }, e.stars))
|
|
888
910
|
})]
|
|
889
911
|
}) : /* @__PURE__ */ f("div", {
|
|
890
912
|
className: "flex flex-col items-center justify-center py-6 text-center",
|
|
@@ -910,18 +932,18 @@ var ye = (e, t) => ({
|
|
|
910
932
|
]
|
|
911
933
|
}), /* @__PURE__ */ f("div", {
|
|
912
934
|
className: "mt-6 border-t border-border-default pt-4",
|
|
913
|
-
children: [
|
|
914
|
-
role:
|
|
915
|
-
className: `mb-3 rounded-lg px-3 py-2 text-sm ${
|
|
916
|
-
children:
|
|
917
|
-
}),
|
|
935
|
+
children: [Ie && /* @__PURE__ */ d("p", {
|
|
936
|
+
role: Le === "success" ? "status" : "alert",
|
|
937
|
+
className: `mb-3 rounded-lg px-3 py-2 text-sm ${Le === "success" ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-error-bg-subtle text-status-error-text"}`,
|
|
938
|
+
children: Ie
|
|
939
|
+
}), Y || H?.userReview ? /* @__PURE__ */ f("div", {
|
|
918
940
|
className: "space-y-4",
|
|
919
941
|
children: [/* @__PURE__ */ d("button", {
|
|
920
942
|
type: "button",
|
|
921
|
-
onClick: () =>
|
|
943
|
+
onClick: () => N ? P(!1) : Qe(),
|
|
922
944
|
className: "w-full cursor-pointer py-2 text-center text-sm font-medium text-text-primary transition-colors hover:text-text-link",
|
|
923
|
-
children:
|
|
924
|
-
}),
|
|
945
|
+
children: H?.userReview ? N ? "Cancel review editing" : "Edit your review" : N ? "Cancel review" : "Write a Review"
|
|
946
|
+
}), N && /* @__PURE__ */ f("div", {
|
|
925
947
|
className: "rounded-xl border border-border-default bg-bg-sunken p-4",
|
|
926
948
|
children: [
|
|
927
949
|
/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
|
|
@@ -937,8 +959,8 @@ var ye = (e, t) => ({
|
|
|
937
959
|
5
|
|
938
960
|
].map((e) => /* @__PURE__ */ f("button", {
|
|
939
961
|
type: "button",
|
|
940
|
-
onClick: () =>
|
|
941
|
-
className: `cursor-pointer rounded-full border px-3 py-1.5 text-sm transition-colors ${
|
|
962
|
+
onClick: () => B(e),
|
|
963
|
+
className: `cursor-pointer rounded-full border px-3 py-1.5 text-sm transition-colors ${z === e ? "border-action-primary-border bg-action-primary-bg text-action-primary-text" : "border-border-default bg-bg-surface text-text-primary hover:bg-bg-surface"}`,
|
|
942
964
|
children: [e, " ★"]
|
|
943
965
|
}, e))
|
|
944
966
|
})] }),
|
|
@@ -946,8 +968,8 @@ var ye = (e, t) => ({
|
|
|
946
968
|
className: "mt-4 block text-sm font-medium text-text-primary",
|
|
947
969
|
children: ["Title", /* @__PURE__ */ d("input", {
|
|
948
970
|
"aria-label": "Review title",
|
|
949
|
-
value:
|
|
950
|
-
onChange: (e) =>
|
|
971
|
+
value: F,
|
|
972
|
+
onChange: (e) => I(e.target.value),
|
|
951
973
|
className: "mt-2 w-full rounded-lg border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary outline-none focus:border-action-primary-border",
|
|
952
974
|
placeholder: "Summarize your experience"
|
|
953
975
|
})]
|
|
@@ -956,8 +978,8 @@ var ye = (e, t) => ({
|
|
|
956
978
|
className: "mt-4 block text-sm font-medium text-text-primary",
|
|
957
979
|
children: ["Review", /* @__PURE__ */ d("textarea", {
|
|
958
980
|
"aria-label": "Review body",
|
|
959
|
-
value:
|
|
960
|
-
onChange: (e) =>
|
|
981
|
+
value: L,
|
|
982
|
+
onChange: (e) => R(e.target.value),
|
|
961
983
|
rows: 4,
|
|
962
984
|
required: !0,
|
|
963
985
|
"aria-required": "true",
|
|
@@ -969,16 +991,16 @@ var ye = (e, t) => ({
|
|
|
969
991
|
className: "mt-4 flex flex-wrap gap-3",
|
|
970
992
|
children: [/* @__PURE__ */ d("button", {
|
|
971
993
|
type: "button",
|
|
972
|
-
onClick:
|
|
973
|
-
disabled:
|
|
994
|
+
onClick: $e,
|
|
995
|
+
disabled: b || S,
|
|
974
996
|
className: "cursor-pointer rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60",
|
|
975
|
-
children:
|
|
976
|
-
}),
|
|
997
|
+
children: b || S ? "Saving..." : H?.userReview ? "Update Review" : "Submit Review"
|
|
998
|
+
}), H?.userReview && /* @__PURE__ */ d("button", {
|
|
977
999
|
type: "button",
|
|
978
|
-
onClick:
|
|
979
|
-
disabled:
|
|
1000
|
+
onClick: et,
|
|
1001
|
+
disabled: w,
|
|
980
1002
|
className: "cursor-pointer rounded-lg border border-status-error-border px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle disabled:cursor-not-allowed disabled:opacity-60",
|
|
981
|
-
children:
|
|
1003
|
+
children: w ? "Removing..." : "Delete Review"
|
|
982
1004
|
})]
|
|
983
1005
|
})
|
|
984
1006
|
]
|
|
@@ -989,36 +1011,36 @@ var ye = (e, t) => ({
|
|
|
989
1011
|
})]
|
|
990
1012
|
})]
|
|
991
1013
|
}),
|
|
992
|
-
|
|
1014
|
+
K && K.length > 0 && /* @__PURE__ */ f("div", {
|
|
993
1015
|
className: "mt-4 space-y-3",
|
|
994
1016
|
children: [/* @__PURE__ */ d("ul", {
|
|
995
1017
|
className: "space-y-3",
|
|
996
|
-
children: (
|
|
1018
|
+
children: (O ? K : K.slice(0, 2)).map((e) => /* @__PURE__ */ d("li", { children: /* @__PURE__ */ d(we, {
|
|
997
1019
|
review: e,
|
|
998
|
-
onMarkHelpful:
|
|
999
|
-
markingHelpful:
|
|
1020
|
+
onMarkHelpful: tt,
|
|
1021
|
+
markingHelpful: je && Re === e.id
|
|
1000
1022
|
}) }, e.id))
|
|
1001
|
-
}),
|
|
1023
|
+
}), K.length > 2 && /* @__PURE__ */ d("button", {
|
|
1002
1024
|
type: "button",
|
|
1003
|
-
onClick: () =>
|
|
1025
|
+
onClick: () => Ne(!O),
|
|
1004
1026
|
className: "cursor-pointer text-sm font-medium text-text-link",
|
|
1005
|
-
children:
|
|
1027
|
+
children: O ? "Show less" : `Show all ${K.length} reviews`
|
|
1006
1028
|
})]
|
|
1007
1029
|
}),
|
|
1008
|
-
(!
|
|
1030
|
+
(!K || K.length === 0) && /* @__PURE__ */ d("p", {
|
|
1009
1031
|
className: "mt-4 text-sm text-text-muted",
|
|
1010
1032
|
children: "No reviews yet. Be the first to review!"
|
|
1011
1033
|
})
|
|
1012
1034
|
]
|
|
1013
1035
|
}),
|
|
1014
|
-
|
|
1036
|
+
it.length > 0 && /* @__PURE__ */ f("section", {
|
|
1015
1037
|
className: "mb-8",
|
|
1016
1038
|
children: [/* @__PURE__ */ d("h2", {
|
|
1017
1039
|
className: "mb-4 text-lg font-medium text-text-primary",
|
|
1018
1040
|
children: "Required Permissions"
|
|
1019
1041
|
}), /* @__PURE__ */ d("div", {
|
|
1020
1042
|
className: "space-y-2",
|
|
1021
|
-
children:
|
|
1043
|
+
children: it.map((e) => /* @__PURE__ */ f("div", {
|
|
1022
1044
|
className: "flex items-center gap-3 rounded-lg bg-bg-surface px-4 py-3",
|
|
1023
1045
|
children: [/* @__PURE__ */ d(c, { className: "size-5 text-status-success-text" }), /* @__PURE__ */ d("span", {
|
|
1024
1046
|
className: "text-sm text-text-primary",
|
|
@@ -1027,14 +1049,14 @@ var ye = (e, t) => ({
|
|
|
1027
1049
|
}, e))
|
|
1028
1050
|
})]
|
|
1029
1051
|
}),
|
|
1030
|
-
|
|
1052
|
+
at.length > 0 && /* @__PURE__ */ f("section", {
|
|
1031
1053
|
className: "mb-8",
|
|
1032
1054
|
children: [/* @__PURE__ */ d("h2", {
|
|
1033
1055
|
className: "mb-4 text-lg font-medium text-text-primary",
|
|
1034
1056
|
children: "Integrations"
|
|
1035
1057
|
}), /* @__PURE__ */ d("div", {
|
|
1036
1058
|
className: "flex flex-wrap gap-2",
|
|
1037
|
-
children:
|
|
1059
|
+
children: at.map((e) => /* @__PURE__ */ d("span", {
|
|
1038
1060
|
className: "rounded-lg bg-bg-surface px-4 py-2 text-sm font-medium text-text-primary",
|
|
1039
1061
|
children: e
|
|
1040
1062
|
}, e))
|
|
@@ -1048,47 +1070,47 @@ var ye = (e, t) => ({
|
|
|
1048
1070
|
}), /* @__PURE__ */ f("div", {
|
|
1049
1071
|
className: "grid grid-cols-2 gap-6 md:grid-cols-3",
|
|
1050
1072
|
children: [
|
|
1051
|
-
|
|
1073
|
+
Z.manifestVersion && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
|
|
1052
1074
|
className: "text-xs text-text-muted",
|
|
1053
1075
|
children: "Version"
|
|
1054
1076
|
}), /* @__PURE__ */ d("p", {
|
|
1055
1077
|
className: "mt-1 text-sm font-medium text-text-primary",
|
|
1056
|
-
children:
|
|
1078
|
+
children: Z.manifestVersion
|
|
1057
1079
|
})] }),
|
|
1058
1080
|
/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
|
|
1059
1081
|
className: "text-xs text-text-muted",
|
|
1060
1082
|
children: "Type"
|
|
1061
1083
|
}), /* @__PURE__ */ d("p", {
|
|
1062
1084
|
className: "mt-1 text-sm font-medium text-text-primary",
|
|
1063
|
-
children:
|
|
1085
|
+
children: Z.type
|
|
1064
1086
|
})] }),
|
|
1065
|
-
|
|
1087
|
+
Z.publishedAt && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
|
|
1066
1088
|
className: "text-xs text-text-muted",
|
|
1067
1089
|
children: "Published"
|
|
1068
1090
|
}), /* @__PURE__ */ d("p", {
|
|
1069
1091
|
className: "mt-1 text-sm font-medium text-text-primary",
|
|
1070
|
-
children: new Date(
|
|
1092
|
+
children: new Date(Z.publishedAt).toLocaleDateString()
|
|
1071
1093
|
})] }),
|
|
1072
1094
|
/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
|
|
1073
1095
|
className: "text-xs text-text-muted",
|
|
1074
1096
|
children: "Updated"
|
|
1075
1097
|
}), /* @__PURE__ */ d("p", {
|
|
1076
1098
|
className: "mt-1 text-sm font-medium text-text-primary",
|
|
1077
|
-
children: new Date(
|
|
1099
|
+
children: new Date(Z.updatedAt).toLocaleDateString()
|
|
1078
1100
|
})] }),
|
|
1079
|
-
|
|
1101
|
+
Z.license && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
|
|
1080
1102
|
className: "text-xs text-text-muted",
|
|
1081
1103
|
children: "License"
|
|
1082
1104
|
}), /* @__PURE__ */ d("p", {
|
|
1083
1105
|
className: "mt-1 text-sm font-medium text-text-primary",
|
|
1084
|
-
children:
|
|
1106
|
+
children: Z.license
|
|
1085
1107
|
})] }),
|
|
1086
|
-
|
|
1108
|
+
Z.minPlatformVersion && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
|
|
1087
1109
|
className: "text-xs text-text-muted",
|
|
1088
1110
|
children: "Min Platform Version"
|
|
1089
1111
|
}), /* @__PURE__ */ d("p", {
|
|
1090
1112
|
className: "mt-1 text-sm font-medium text-text-primary",
|
|
1091
|
-
children:
|
|
1113
|
+
children: Z.minPlatformVersion
|
|
1092
1114
|
})] })
|
|
1093
1115
|
]
|
|
1094
1116
|
})]
|
|
@@ -1097,7 +1119,7 @@ var ye = (e, t) => ({
|
|
|
1097
1119
|
}), /* @__PURE__ */ f("div", {
|
|
1098
1120
|
className: "w-full lg:w-80",
|
|
1099
1121
|
children: [
|
|
1100
|
-
(
|
|
1122
|
+
(Z.documentationUrl || Z.repositoryUrl || W?.email) && /* @__PURE__ */ f("div", {
|
|
1101
1123
|
className: "mb-6 rounded-xl border border-border-default bg-bg-surface p-4",
|
|
1102
1124
|
children: [/* @__PURE__ */ d("h3", {
|
|
1103
1125
|
className: "font-medium text-text-primary",
|
|
@@ -1105,29 +1127,29 @@ var ye = (e, t) => ({
|
|
|
1105
1127
|
}), /* @__PURE__ */ f("div", {
|
|
1106
1128
|
className: "mt-3 space-y-2 text-sm",
|
|
1107
1129
|
children: [
|
|
1108
|
-
|
|
1109
|
-
href:
|
|
1130
|
+
Z.documentationUrl && /* @__PURE__ */ d("a", {
|
|
1131
|
+
href: Z.documentationUrl,
|
|
1110
1132
|
target: "_blank",
|
|
1111
1133
|
rel: "noreferrer",
|
|
1112
1134
|
className: "block text-text-link hover:underline",
|
|
1113
1135
|
children: "Documentation"
|
|
1114
1136
|
}),
|
|
1115
|
-
|
|
1116
|
-
href:
|
|
1137
|
+
Z.repositoryUrl && /* @__PURE__ */ d("a", {
|
|
1138
|
+
href: Z.repositoryUrl,
|
|
1117
1139
|
target: "_blank",
|
|
1118
1140
|
rel: "noreferrer",
|
|
1119
1141
|
className: "block text-text-link hover:underline",
|
|
1120
1142
|
children: "Source repository"
|
|
1121
1143
|
}),
|
|
1122
|
-
|
|
1123
|
-
href: `mailto:${
|
|
1144
|
+
W?.email && /* @__PURE__ */ d("a", {
|
|
1145
|
+
href: `mailto:${W.email}`,
|
|
1124
1146
|
className: "block text-text-link hover:underline",
|
|
1125
1147
|
children: "Contact publisher"
|
|
1126
1148
|
})
|
|
1127
1149
|
]
|
|
1128
1150
|
})]
|
|
1129
1151
|
}),
|
|
1130
|
-
|
|
1152
|
+
W && /* @__PURE__ */ f("div", {
|
|
1131
1153
|
className: "mb-6 rounded-xl border border-border-default bg-bg-surface p-4",
|
|
1132
1154
|
children: [
|
|
1133
1155
|
/* @__PURE__ */ d("h3", {
|
|
@@ -1136,14 +1158,14 @@ var ye = (e, t) => ({
|
|
|
1136
1158
|
}),
|
|
1137
1159
|
/* @__PURE__ */ d("p", {
|
|
1138
1160
|
className: "mt-2 text-sm text-text-primary",
|
|
1139
|
-
children:
|
|
1161
|
+
children: W.name
|
|
1140
1162
|
}),
|
|
1141
|
-
|
|
1163
|
+
W.bio && /* @__PURE__ */ d("p", {
|
|
1142
1164
|
className: "mt-2 text-sm text-text-muted",
|
|
1143
|
-
children:
|
|
1165
|
+
children: W.bio
|
|
1144
1166
|
}),
|
|
1145
|
-
|
|
1146
|
-
href:
|
|
1167
|
+
W.websiteUrl && /* @__PURE__ */ d("a", {
|
|
1168
|
+
href: W.websiteUrl,
|
|
1147
1169
|
target: "_blank",
|
|
1148
1170
|
rel: "noreferrer",
|
|
1149
1171
|
className: "mt-3 inline-block text-sm text-text-link hover:underline",
|
|
@@ -1151,7 +1173,7 @@ var ye = (e, t) => ({
|
|
|
1151
1173
|
})
|
|
1152
1174
|
]
|
|
1153
1175
|
}),
|
|
1154
|
-
|
|
1176
|
+
q && q.length > 0 && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("div", {
|
|
1155
1177
|
className: "mb-4 flex items-center justify-between text-left",
|
|
1156
1178
|
children: /* @__PURE__ */ d("span", {
|
|
1157
1179
|
className: "font-medium text-text-primary",
|
|
@@ -1159,7 +1181,7 @@ var ye = (e, t) => ({
|
|
|
1159
1181
|
})
|
|
1160
1182
|
}), /* @__PURE__ */ d("div", {
|
|
1161
1183
|
className: "space-y-3",
|
|
1162
|
-
children:
|
|
1184
|
+
children: q.slice(0, 4).map((e) => /* @__PURE__ */ f("button", {
|
|
1163
1185
|
type: "button",
|
|
1164
1186
|
onClick: () => u(`${p}/marketplace/product/${e.id}`),
|
|
1165
1187
|
className: "flex w-full cursor-pointer items-center gap-3 rounded-lg p-2 text-left transition-colors hover:bg-bg-sunken",
|
|
@@ -1179,7 +1201,7 @@ var ye = (e, t) => ({
|
|
|
1179
1201
|
}),
|
|
1180
1202
|
/* @__PURE__ */ d("p", {
|
|
1181
1203
|
className: "text-xs text-text-muted",
|
|
1182
|
-
children:
|
|
1204
|
+
children: W?.name || "Unknown"
|
|
1183
1205
|
}),
|
|
1184
1206
|
(e.reviewCount ?? 0) > 0 && /* @__PURE__ */ f("div", {
|
|
1185
1207
|
className: "flex items-center gap-1",
|
|
@@ -1196,25 +1218,25 @@ var ye = (e, t) => ({
|
|
|
1196
1218
|
})]
|
|
1197
1219
|
})
|
|
1198
1220
|
}),
|
|
1199
|
-
|
|
1200
|
-
isOpen:
|
|
1201
|
-
onClose: () =>
|
|
1221
|
+
Z && /* @__PURE__ */ d(le, {
|
|
1222
|
+
isOpen: Be,
|
|
1223
|
+
onClose: () => Ve(!1),
|
|
1202
1224
|
app: {
|
|
1203
|
-
id:
|
|
1204
|
-
name:
|
|
1205
|
-
slug:
|
|
1206
|
-
icon:
|
|
1207
|
-
type:
|
|
1208
|
-
version:
|
|
1225
|
+
id: Z.id,
|
|
1226
|
+
name: Z.name,
|
|
1227
|
+
slug: Z.slug,
|
|
1228
|
+
icon: Z.icon,
|
|
1229
|
+
type: Z.type,
|
|
1230
|
+
version: Z.manifestVersion
|
|
1209
1231
|
},
|
|
1210
|
-
purchaseState:
|
|
1211
|
-
onInstallSuccess:
|
|
1212
|
-
onInstallError:
|
|
1232
|
+
purchaseState: Y && !$ ? "purchased" : "free",
|
|
1233
|
+
onInstallSuccess: Xe,
|
|
1234
|
+
onInstallError: Ze
|
|
1213
1235
|
})
|
|
1214
1236
|
]
|
|
1215
1237
|
});
|
|
1216
1238
|
};
|
|
1217
1239
|
//#endregion
|
|
1218
|
-
export {
|
|
1240
|
+
export { De as ProductDetailPage };
|
|
1219
1241
|
|
|
1220
1242
|
//# sourceMappingURL=ProductDetailPage.js.map
|