@burdenoff/microfe-store 2026.715.1 → 2026.716.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pages/CartPage.js +6 -6
- package/dist/pages/CartPage.js.map +1 -1
- package/dist/pages/MarketplaceHomePage.js.map +1 -1
- package/dist/pages/OrderConfirmationPage.js +137 -80
- package/dist/pages/OrderConfirmationPage.js.map +1 -1
- package/dist/pages/ProductDetailPage.js +573 -510
- package/dist/pages/ProductDetailPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -4,15 +4,15 @@ 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
5
|
import { InstallAppModal as ae } from "../components/InstallAppModal.js";
|
|
6
6
|
import { useInstallations as oe } from "../hooks/useInstallations.js";
|
|
7
|
-
import { nativeConfirm as se, nativeImpact as ce, nativeNotify as
|
|
8
|
-
import { useCallback as
|
|
9
|
-
import { AlertCircle as
|
|
10
|
-
import { Fragment as
|
|
11
|
-
import { useLocation as
|
|
12
|
-
import { EmphasisPanel as
|
|
13
|
-
import { useEventBus as
|
|
7
|
+
import { nativeConfirm as se, nativeImpact as ce, nativeNotify as le } from "../utils/nativeBridge.js";
|
|
8
|
+
import { useCallback as i, useEffect as ue, useMemo as de, useRef as fe, useState as a } from "react";
|
|
9
|
+
import { AlertCircle as o, ArrowLeft as pe, Check as me, Loader2 as he, Package as s, ShieldCheck as c, ShoppingCart as ge, Star as l, ThumbsUp as u } from "lucide-react";
|
|
10
|
+
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
11
|
+
import { useLocation as _e, useNavigate as ve, useParams as ye } from "react-router-dom";
|
|
12
|
+
import { EmphasisPanel as be, GlassCard as m, IllustratedEmptyState as xe, NextSteps as Se, PagePurpose as Ce } from "@burdenoff/fe-libs/ui";
|
|
13
|
+
import { useEventBus as we } from "@burdenoff/fe-libs/shared/events";
|
|
14
14
|
//#region src/pages/ProductDetailPage.tsx
|
|
15
|
-
var
|
|
15
|
+
var Te = (e, t) => ({
|
|
16
16
|
id: e.id,
|
|
17
17
|
publisherId: t?.id || "",
|
|
18
18
|
publisher: {
|
|
@@ -84,41 +84,41 @@ var Ee = (e, t) => ({
|
|
|
84
84
|
createdAt: e.createdAt,
|
|
85
85
|
updatedAt: e.updatedAt,
|
|
86
86
|
publishedAt: e.publishedAt
|
|
87
|
-
}),
|
|
87
|
+
}), Ee = ({ stars: e, percentage: t, count: r }) => /* @__PURE__ */ p("div", {
|
|
88
88
|
className: "flex items-center gap-2",
|
|
89
89
|
children: [
|
|
90
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ f("span", {
|
|
91
91
|
className: "w-3 text-xs text-text-muted",
|
|
92
92
|
children: e
|
|
93
93
|
}),
|
|
94
|
-
/* @__PURE__ */
|
|
94
|
+
/* @__PURE__ */ f("div", {
|
|
95
95
|
className: "h-2 flex-1 overflow-hidden rounded-full bg-bg-sunken",
|
|
96
|
-
children: /* @__PURE__ */
|
|
96
|
+
children: /* @__PURE__ */ f("div", {
|
|
97
97
|
className: "h-full rounded-full bg-status-warning-bg-subtle",
|
|
98
98
|
style: { width: `${t}%` }
|
|
99
99
|
})
|
|
100
100
|
}),
|
|
101
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ f("span", {
|
|
102
102
|
className: "w-12 text-right text-xs text-text-muted",
|
|
103
103
|
children: n(r)
|
|
104
104
|
})
|
|
105
105
|
]
|
|
106
|
-
}),
|
|
106
|
+
}), De = ({ review: e, onMarkHelpful: t, markingHelpful: n }) => /* @__PURE__ */ p("div", {
|
|
107
107
|
className: "rounded-lg border border-border-seam bg-bg-surface p-4 transition-[box-shadow,border-color] hover:border-border-strong hover:shadow-[var(--shadow-pop)]",
|
|
108
108
|
children: [
|
|
109
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ f("div", {
|
|
110
110
|
className: "mb-3 flex items-start justify-between",
|
|
111
|
-
children: /* @__PURE__ */
|
|
111
|
+
children: /* @__PURE__ */ p("div", {
|
|
112
112
|
className: "flex items-center gap-3",
|
|
113
|
-
children: [/* @__PURE__ */
|
|
113
|
+
children: [/* @__PURE__ */ f("div", {
|
|
114
114
|
className: "flex size-10 items-center justify-center rounded-full bg-bg-sunken text-text-muted",
|
|
115
|
-
children: /* @__PURE__ */
|
|
116
|
-
}), /* @__PURE__ */
|
|
115
|
+
children: /* @__PURE__ */ f(l, { className: "size-4 fill-current" })
|
|
116
|
+
}), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
|
|
117
117
|
className: "font-medium text-text-primary",
|
|
118
118
|
children: "Verified Buyer"
|
|
119
|
-
}), /* @__PURE__ */
|
|
119
|
+
}), /* @__PURE__ */ p("div", {
|
|
120
120
|
className: "flex items-center gap-2",
|
|
121
|
-
children: [/* @__PURE__ */
|
|
121
|
+
children: [/* @__PURE__ */ f("div", {
|
|
122
122
|
className: "flex gap-0.5",
|
|
123
123
|
children: [
|
|
124
124
|
1,
|
|
@@ -126,8 +126,8 @@ var Ee = (e, t) => ({
|
|
|
126
126
|
3,
|
|
127
127
|
4,
|
|
128
128
|
5
|
|
129
|
-
].map((t) => /* @__PURE__ */
|
|
130
|
-
}), /* @__PURE__ */
|
|
129
|
+
].map((t) => /* @__PURE__ */ f(l, { className: `size-3 ${t <= e.rating ? "fill-current text-status-warning-text" : "text-text-muted"}` }, t))
|
|
130
|
+
}), /* @__PURE__ */ f("span", {
|
|
131
131
|
className: "text-xs text-text-muted",
|
|
132
132
|
children: ((e) => {
|
|
133
133
|
try {
|
|
@@ -144,147 +144,147 @@ var Ee = (e, t) => ({
|
|
|
144
144
|
})] })]
|
|
145
145
|
})
|
|
146
146
|
}),
|
|
147
|
-
e.title && /* @__PURE__ */
|
|
147
|
+
e.title && /* @__PURE__ */ f("h4", {
|
|
148
148
|
className: "mb-2 font-medium text-text-primary",
|
|
149
149
|
children: e.title
|
|
150
150
|
}),
|
|
151
|
-
e.comment && /* @__PURE__ */
|
|
151
|
+
e.comment && /* @__PURE__ */ f("p", {
|
|
152
152
|
className: "mb-3 text-sm text-text-muted",
|
|
153
153
|
children: e.comment
|
|
154
154
|
}),
|
|
155
|
-
/* @__PURE__ */
|
|
155
|
+
/* @__PURE__ */ f("div", {
|
|
156
156
|
className: "flex items-center justify-between",
|
|
157
|
-
children: /* @__PURE__ */
|
|
157
|
+
children: /* @__PURE__ */ p("button", {
|
|
158
158
|
type: "button",
|
|
159
159
|
onClick: () => t(e.id),
|
|
160
160
|
disabled: n,
|
|
161
161
|
"aria-label": "Mark this review as helpful",
|
|
162
162
|
className: "flex items-center gap-1 text-xs text-text-muted transition-colors hover:text-text-primary disabled:cursor-not-allowed disabled:opacity-60",
|
|
163
|
-
children: [/* @__PURE__ */
|
|
163
|
+
children: [/* @__PURE__ */ f(u, { className: "size-3.5" }), /* @__PURE__ */ f("span", { children: n ? "Updating…" : `Helpful (${e.helpful})` })]
|
|
164
164
|
})
|
|
165
165
|
})
|
|
166
166
|
]
|
|
167
|
-
}),
|
|
167
|
+
}), Oe = () => /* @__PURE__ */ p("div", {
|
|
168
168
|
className: "h-full overflow-y-auto",
|
|
169
|
-
children: [/* @__PURE__ */
|
|
169
|
+
children: [/* @__PURE__ */ f("div", {
|
|
170
170
|
className: "sticky top-0 z-10 border-b border-border-default bg-bg-surface px-6 py-4",
|
|
171
|
-
children: /* @__PURE__ */
|
|
171
|
+
children: /* @__PURE__ */ p("div", {
|
|
172
172
|
className: "flex items-center gap-4",
|
|
173
173
|
children: [
|
|
174
|
-
/* @__PURE__ */
|
|
175
|
-
/* @__PURE__ */
|
|
176
|
-
/* @__PURE__ */
|
|
174
|
+
/* @__PURE__ */ f("div", { className: "size-10 animate-pulse rounded-lg bg-bg-sunken" }),
|
|
175
|
+
/* @__PURE__ */ f("div", { className: "h-6 w-48 flex-1 animate-pulse rounded bg-bg-sunken" }),
|
|
176
|
+
/* @__PURE__ */ p("div", {
|
|
177
177
|
className: "flex gap-2",
|
|
178
|
-
children: [/* @__PURE__ */
|
|
178
|
+
children: [/* @__PURE__ */ f("div", { className: "size-10 animate-pulse rounded-lg bg-bg-sunken" }), /* @__PURE__ */ f("div", { className: "size-10 animate-pulse rounded-lg bg-bg-sunken" })]
|
|
179
179
|
})
|
|
180
180
|
]
|
|
181
181
|
})
|
|
182
|
-
}), /* @__PURE__ */
|
|
182
|
+
}), /* @__PURE__ */ p("div", {
|
|
183
183
|
className: "mx-auto max-w-6xl p-6",
|
|
184
184
|
children: [
|
|
185
|
-
/* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ p("div", {
|
|
186
186
|
className: "mb-8 flex flex-col gap-6 md:flex-row",
|
|
187
|
-
children: [/* @__PURE__ */
|
|
187
|
+
children: [/* @__PURE__ */ p("div", {
|
|
188
188
|
className: "flex gap-4 md:w-1/2",
|
|
189
|
-
children: [/* @__PURE__ */
|
|
189
|
+
children: [/* @__PURE__ */ f("div", { className: "size-28 animate-pulse rounded-2xl bg-bg-sunken" }), /* @__PURE__ */ p("div", {
|
|
190
190
|
className: "flex flex-1 flex-col justify-center gap-2",
|
|
191
191
|
children: [
|
|
192
|
-
/* @__PURE__ */
|
|
193
|
-
/* @__PURE__ */
|
|
192
|
+
/* @__PURE__ */ f("div", { className: "h-8 w-3/4 animate-pulse rounded bg-bg-sunken" }),
|
|
193
|
+
/* @__PURE__ */ p("div", {
|
|
194
194
|
className: "flex items-center gap-2",
|
|
195
|
-
children: [/* @__PURE__ */
|
|
195
|
+
children: [/* @__PURE__ */ f("div", { className: "h-4 w-32 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ f("div", { className: "size-4 animate-pulse rounded-full bg-bg-sunken" })]
|
|
196
196
|
}),
|
|
197
|
-
/* @__PURE__ */
|
|
197
|
+
/* @__PURE__ */ p("div", {
|
|
198
198
|
className: "flex gap-3",
|
|
199
|
-
children: [/* @__PURE__ */
|
|
199
|
+
children: [/* @__PURE__ */ f("div", { className: "h-5 w-16 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ f("div", { className: "h-5 w-24 animate-pulse rounded bg-bg-sunken" })]
|
|
200
200
|
})
|
|
201
201
|
]
|
|
202
202
|
})]
|
|
203
|
-
}), /* @__PURE__ */
|
|
203
|
+
}), /* @__PURE__ */ p("div", {
|
|
204
204
|
className: "flex flex-col gap-4 md:w-1/2 md:items-end",
|
|
205
|
-
children: [/* @__PURE__ */
|
|
205
|
+
children: [/* @__PURE__ */ p("div", {
|
|
206
206
|
className: "flex items-center gap-4",
|
|
207
207
|
children: [
|
|
208
|
-
/* @__PURE__ */
|
|
208
|
+
/* @__PURE__ */ p("div", {
|
|
209
209
|
className: "text-center",
|
|
210
|
-
children: [/* @__PURE__ */
|
|
210
|
+
children: [/* @__PURE__ */ f("div", { className: "h-10 w-16 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ f("div", { className: "mt-1 h-3 w-20 animate-pulse rounded bg-bg-sunken" })]
|
|
211
211
|
}),
|
|
212
|
-
/* @__PURE__ */
|
|
213
|
-
/* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ f("div", { className: "h-12 w-px bg-border-default" }),
|
|
213
|
+
/* @__PURE__ */ p("div", {
|
|
214
214
|
className: "text-center",
|
|
215
|
-
children: [/* @__PURE__ */
|
|
215
|
+
children: [/* @__PURE__ */ f("div", { className: "h-8 w-16 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ f("div", { className: "mt-1 h-3 w-16 animate-pulse rounded bg-bg-sunken" })]
|
|
216
216
|
}),
|
|
217
|
-
/* @__PURE__ */
|
|
218
|
-
/* @__PURE__ */
|
|
217
|
+
/* @__PURE__ */ f("div", { className: "h-12 w-px bg-border-default" }),
|
|
218
|
+
/* @__PURE__ */ p("div", {
|
|
219
219
|
className: "text-center",
|
|
220
|
-
children: [/* @__PURE__ */
|
|
220
|
+
children: [/* @__PURE__ */ f("div", { className: "h-8 w-20 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ f("div", { className: "mt-1 h-3 w-12 animate-pulse rounded bg-bg-sunken" })]
|
|
221
221
|
})
|
|
222
222
|
]
|
|
223
|
-
}), /* @__PURE__ */
|
|
223
|
+
}), /* @__PURE__ */ p("div", {
|
|
224
224
|
className: "flex gap-3",
|
|
225
|
-
children: [/* @__PURE__ */
|
|
225
|
+
children: [/* @__PURE__ */ f("div", { className: "h-12 w-40 animate-pulse rounded-lg bg-bg-sunken" }), /* @__PURE__ */ f("div", { className: "size-12 animate-pulse rounded-lg bg-bg-sunken" })]
|
|
226
226
|
})]
|
|
227
227
|
})]
|
|
228
228
|
}),
|
|
229
|
-
/* @__PURE__ */
|
|
229
|
+
/* @__PURE__ */ p("section", {
|
|
230
230
|
className: "mb-8",
|
|
231
|
-
children: [/* @__PURE__ */
|
|
231
|
+
children: [/* @__PURE__ */ f("div", { className: "aspect-video animate-pulse rounded-lg bg-bg-sunken" }), /* @__PURE__ */ f("div", {
|
|
232
232
|
className: "mt-4 flex gap-4",
|
|
233
233
|
children: [...[
|
|
234
234
|
,
|
|
235
235
|
,
|
|
236
236
|
,
|
|
237
237
|
,
|
|
238
|
-
]].map((e, t) => /* @__PURE__ */
|
|
238
|
+
]].map((e, t) => /* @__PURE__ */ f("div", { className: "h-20 w-36 animate-pulse rounded-lg bg-bg-sunken" }, t))
|
|
239
239
|
})]
|
|
240
240
|
}),
|
|
241
|
-
/* @__PURE__ */
|
|
241
|
+
/* @__PURE__ */ p("section", {
|
|
242
242
|
className: "mb-8",
|
|
243
|
-
children: [/* @__PURE__ */
|
|
243
|
+
children: [/* @__PURE__ */ p("div", {
|
|
244
244
|
className: "mb-4 flex items-center gap-2",
|
|
245
|
-
children: [/* @__PURE__ */
|
|
246
|
-
}), /* @__PURE__ */
|
|
245
|
+
children: [/* @__PURE__ */ f("div", { className: "size-5 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ f("div", { className: "h-6 w-32 animate-pulse rounded bg-bg-sunken" })]
|
|
246
|
+
}), /* @__PURE__ */ p("div", {
|
|
247
247
|
className: "animate-pulse rounded-lg border border-border-seam bg-bg-surface p-4",
|
|
248
|
-
children: [/* @__PURE__ */
|
|
248
|
+
children: [/* @__PURE__ */ p("div", {
|
|
249
249
|
className: "space-y-2",
|
|
250
250
|
children: [
|
|
251
|
-
/* @__PURE__ */
|
|
252
|
-
/* @__PURE__ */
|
|
253
|
-
/* @__PURE__ */
|
|
254
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ f("div", { className: "h-4 w-full rounded bg-bg-sunken" }),
|
|
252
|
+
/* @__PURE__ */ f("div", { className: "h-4 w-full rounded bg-bg-sunken" }),
|
|
253
|
+
/* @__PURE__ */ f("div", { className: "h-4 w-3/4 rounded bg-bg-sunken" }),
|
|
254
|
+
/* @__PURE__ */ f("div", { className: "h-4 w-5/6 rounded bg-bg-sunken" })
|
|
255
255
|
]
|
|
256
|
-
}), /* @__PURE__ */
|
|
256
|
+
}), /* @__PURE__ */ f("div", {
|
|
257
257
|
className: "mt-4 flex gap-2",
|
|
258
258
|
children: [...[
|
|
259
259
|
,
|
|
260
260
|
,
|
|
261
261
|
,
|
|
262
262
|
,
|
|
263
|
-
]].map((e, t) => /* @__PURE__ */
|
|
263
|
+
]].map((e, t) => /* @__PURE__ */ f("div", { className: "h-6 w-16 rounded-full bg-bg-sunken" }, t))
|
|
264
264
|
})]
|
|
265
265
|
})]
|
|
266
266
|
}),
|
|
267
|
-
/* @__PURE__ */
|
|
267
|
+
/* @__PURE__ */ p("section", {
|
|
268
268
|
className: "mb-8",
|
|
269
269
|
children: [
|
|
270
|
-
/* @__PURE__ */
|
|
270
|
+
/* @__PURE__ */ p("div", {
|
|
271
271
|
className: "mb-4 flex items-center justify-between",
|
|
272
|
-
children: [/* @__PURE__ */
|
|
272
|
+
children: [/* @__PURE__ */ p("div", {
|
|
273
273
|
className: "flex items-center gap-2",
|
|
274
|
-
children: [/* @__PURE__ */
|
|
275
|
-
}), /* @__PURE__ */
|
|
274
|
+
children: [/* @__PURE__ */ f("div", { className: "size-5 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ f("div", { className: "h-6 w-40 animate-pulse rounded bg-bg-sunken" })]
|
|
275
|
+
}), /* @__PURE__ */ f("div", { className: "h-4 w-16 animate-pulse rounded bg-bg-sunken" })]
|
|
276
276
|
}),
|
|
277
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ p("div", {
|
|
278
278
|
className: "mb-6 flex flex-col gap-6 md:flex-row",
|
|
279
|
-
children: [/* @__PURE__ */
|
|
279
|
+
children: [/* @__PURE__ */ f("div", {
|
|
280
280
|
className: "animate-pulse rounded-lg border border-border-seam bg-bg-surface p-4 md:w-64",
|
|
281
|
-
children: /* @__PURE__ */
|
|
281
|
+
children: /* @__PURE__ */ p("div", {
|
|
282
282
|
className: "flex items-center gap-6",
|
|
283
|
-
children: [/* @__PURE__ */
|
|
283
|
+
children: [/* @__PURE__ */ p("div", {
|
|
284
284
|
className: "text-center",
|
|
285
285
|
children: [
|
|
286
|
-
/* @__PURE__ */
|
|
287
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ f("div", { className: "h-12 w-16 rounded bg-bg-sunken" }),
|
|
287
|
+
/* @__PURE__ */ f("div", {
|
|
288
288
|
className: "my-1 flex justify-center gap-0.5",
|
|
289
289
|
children: [...[
|
|
290
290
|
,
|
|
@@ -292,11 +292,11 @@ var Ee = (e, t) => ({
|
|
|
292
292
|
,
|
|
293
293
|
,
|
|
294
294
|
,
|
|
295
|
-
]].map((e, t) => /* @__PURE__ */
|
|
295
|
+
]].map((e, t) => /* @__PURE__ */ f("div", { className: "size-4 rounded bg-bg-sunken" }, t))
|
|
296
296
|
}),
|
|
297
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ f("div", { className: "h-3 w-20 rounded bg-bg-sunken" })
|
|
298
298
|
]
|
|
299
|
-
}), /* @__PURE__ */
|
|
299
|
+
}), /* @__PURE__ */ f("div", {
|
|
300
300
|
className: "flex-1 space-y-1",
|
|
301
301
|
children: [...[
|
|
302
302
|
,
|
|
@@ -304,29 +304,29 @@ var Ee = (e, t) => ({
|
|
|
304
304
|
,
|
|
305
305
|
,
|
|
306
306
|
,
|
|
307
|
-
]].map((e, t) => /* @__PURE__ */
|
|
307
|
+
]].map((e, t) => /* @__PURE__ */ p("div", {
|
|
308
308
|
className: "flex items-center gap-2",
|
|
309
309
|
children: [
|
|
310
|
-
/* @__PURE__ */
|
|
311
|
-
/* @__PURE__ */
|
|
312
|
-
/* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ f("div", { className: "h-2 w-3 rounded bg-bg-sunken" }),
|
|
311
|
+
/* @__PURE__ */ f("div", { className: "h-2 flex-1 rounded-full bg-bg-sunken" }),
|
|
312
|
+
/* @__PURE__ */ f("div", { className: "h-2 w-8 rounded bg-bg-sunken" })
|
|
313
313
|
]
|
|
314
314
|
}, t))
|
|
315
315
|
})]
|
|
316
316
|
})
|
|
317
|
-
}), /* @__PURE__ */
|
|
317
|
+
}), /* @__PURE__ */ f("div", { className: "h-12 w-32 animate-pulse rounded-lg bg-bg-sunken" })]
|
|
318
318
|
}),
|
|
319
|
-
/* @__PURE__ */
|
|
319
|
+
/* @__PURE__ */ f("div", {
|
|
320
320
|
className: "space-y-4",
|
|
321
|
-
children: [...[, ,]].map((e, t) => /* @__PURE__ */
|
|
321
|
+
children: [...[, ,]].map((e, t) => /* @__PURE__ */ p("div", {
|
|
322
322
|
className: "animate-pulse rounded-lg border border-border-seam bg-bg-surface p-4",
|
|
323
|
-
children: [/* @__PURE__ */
|
|
323
|
+
children: [/* @__PURE__ */ p("div", {
|
|
324
324
|
className: "mb-3 flex items-start gap-3",
|
|
325
|
-
children: [/* @__PURE__ */
|
|
325
|
+
children: [/* @__PURE__ */ f("div", { className: "size-10 rounded-full bg-bg-sunken" }), /* @__PURE__ */ p("div", {
|
|
326
326
|
className: "flex-1",
|
|
327
|
-
children: [/* @__PURE__ */
|
|
327
|
+
children: [/* @__PURE__ */ f("div", { className: "h-4 w-32 rounded bg-bg-sunken" }), /* @__PURE__ */ p("div", {
|
|
328
328
|
className: "mt-1 flex items-center gap-2",
|
|
329
|
-
children: [/* @__PURE__ */
|
|
329
|
+
children: [/* @__PURE__ */ f("div", {
|
|
330
330
|
className: "flex gap-0.5",
|
|
331
331
|
children: [...[
|
|
332
332
|
,
|
|
@@ -334,26 +334,26 @@ var Ee = (e, t) => ({
|
|
|
334
334
|
,
|
|
335
335
|
,
|
|
336
336
|
,
|
|
337
|
-
]].map((e, t) => /* @__PURE__ */
|
|
338
|
-
}), /* @__PURE__ */
|
|
337
|
+
]].map((e, t) => /* @__PURE__ */ f("div", { className: "size-3 rounded bg-bg-sunken" }, t))
|
|
338
|
+
}), /* @__PURE__ */ f("div", { className: "h-3 w-20 rounded bg-bg-sunken" })]
|
|
339
339
|
})]
|
|
340
340
|
})]
|
|
341
|
-
}), /* @__PURE__ */
|
|
341
|
+
}), /* @__PURE__ */ p("div", {
|
|
342
342
|
className: "space-y-2",
|
|
343
|
-
children: [/* @__PURE__ */
|
|
343
|
+
children: [/* @__PURE__ */ f("div", { className: "h-4 w-full rounded bg-bg-sunken" }), /* @__PURE__ */ f("div", { className: "h-4 w-2/3 rounded bg-bg-sunken" })]
|
|
344
344
|
})]
|
|
345
345
|
}, t))
|
|
346
346
|
})
|
|
347
347
|
]
|
|
348
348
|
}),
|
|
349
|
-
/* @__PURE__ */
|
|
349
|
+
/* @__PURE__ */ p("section", {
|
|
350
350
|
className: "mb-8",
|
|
351
|
-
children: [/* @__PURE__ */
|
|
351
|
+
children: [/* @__PURE__ */ p("div", {
|
|
352
352
|
className: "mb-4 flex items-center gap-2",
|
|
353
|
-
children: [/* @__PURE__ */
|
|
354
|
-
}), /* @__PURE__ */
|
|
353
|
+
children: [/* @__PURE__ */ f("div", { className: "size-5 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ f("div", { className: "h-6 w-48 animate-pulse rounded bg-bg-sunken" })]
|
|
354
|
+
}), /* @__PURE__ */ f("div", {
|
|
355
355
|
className: "animate-pulse rounded-lg border border-border-seam bg-bg-surface p-4",
|
|
356
|
-
children: /* @__PURE__ */
|
|
356
|
+
children: /* @__PURE__ */ f("div", {
|
|
357
357
|
className: "grid gap-4 md:grid-cols-2",
|
|
358
358
|
children: [...[
|
|
359
359
|
,
|
|
@@ -362,37 +362,37 @@ var Ee = (e, t) => ({
|
|
|
362
362
|
,
|
|
363
363
|
,
|
|
364
364
|
,
|
|
365
|
-
]].map((e, t) => /* @__PURE__ */
|
|
365
|
+
]].map((e, t) => /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("div", { className: "h-3 w-16 rounded bg-bg-sunken" }), /* @__PURE__ */ f("div", { className: "mt-1 h-5 w-24 rounded bg-bg-sunken" })] }, t))
|
|
366
366
|
})
|
|
367
367
|
})]
|
|
368
368
|
}),
|
|
369
|
-
/* @__PURE__ */
|
|
369
|
+
/* @__PURE__ */ p("section", {
|
|
370
370
|
className: "mb-8",
|
|
371
|
-
children: [/* @__PURE__ */
|
|
371
|
+
children: [/* @__PURE__ */ p("div", {
|
|
372
372
|
className: "mb-4 flex items-center justify-between",
|
|
373
|
-
children: [/* @__PURE__ */
|
|
373
|
+
children: [/* @__PURE__ */ p("div", {
|
|
374
374
|
className: "flex items-center gap-2",
|
|
375
|
-
children: [/* @__PURE__ */
|
|
376
|
-
}), /* @__PURE__ */
|
|
377
|
-
}), /* @__PURE__ */
|
|
375
|
+
children: [/* @__PURE__ */ f("div", { className: "size-5 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ f("div", { className: "h-6 w-40 animate-pulse rounded bg-bg-sunken" })]
|
|
376
|
+
}), /* @__PURE__ */ f("div", { className: "h-4 w-16 animate-pulse rounded bg-bg-sunken" })]
|
|
377
|
+
}), /* @__PURE__ */ f("div", {
|
|
378
378
|
className: "grid gap-4 md:grid-cols-4",
|
|
379
379
|
children: [...[
|
|
380
380
|
,
|
|
381
381
|
,
|
|
382
382
|
,
|
|
383
383
|
,
|
|
384
|
-
]].map((e, t) => /* @__PURE__ */
|
|
384
|
+
]].map((e, t) => /* @__PURE__ */ f("div", {
|
|
385
385
|
className: "animate-pulse rounded-lg border border-border-seam bg-bg-surface p-3",
|
|
386
|
-
children: /* @__PURE__ */
|
|
386
|
+
children: /* @__PURE__ */ p("div", {
|
|
387
387
|
className: "flex items-center gap-3",
|
|
388
|
-
children: [/* @__PURE__ */
|
|
388
|
+
children: [/* @__PURE__ */ f("div", { className: "size-14 rounded-xl bg-bg-sunken" }), /* @__PURE__ */ p("div", {
|
|
389
389
|
className: "flex-1",
|
|
390
390
|
children: [
|
|
391
|
-
/* @__PURE__ */
|
|
392
|
-
/* @__PURE__ */
|
|
393
|
-
/* @__PURE__ */
|
|
391
|
+
/* @__PURE__ */ f("div", { className: "h-4 w-24 rounded bg-bg-sunken" }),
|
|
392
|
+
/* @__PURE__ */ f("div", { className: "mt-1 h-3 w-16 rounded bg-bg-sunken" }),
|
|
393
|
+
/* @__PURE__ */ p("div", {
|
|
394
394
|
className: "mt-1 flex items-center gap-2",
|
|
395
|
-
children: [/* @__PURE__ */
|
|
395
|
+
children: [/* @__PURE__ */ f("div", { className: "h-3 w-8 rounded bg-bg-sunken" }), /* @__PURE__ */ f("div", { className: "h-3 w-12 rounded bg-bg-sunken" })]
|
|
396
396
|
})
|
|
397
397
|
]
|
|
398
398
|
})]
|
|
@@ -400,46 +400,46 @@ var Ee = (e, t) => ({
|
|
|
400
400
|
}, t))
|
|
401
401
|
})]
|
|
402
402
|
}),
|
|
403
|
-
/* @__PURE__ */
|
|
403
|
+
/* @__PURE__ */ p("section", {
|
|
404
404
|
className: "mb-8",
|
|
405
|
-
children: [/* @__PURE__ */
|
|
405
|
+
children: [/* @__PURE__ */ f("div", { className: "mb-4 h-6 w-36 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ p("div", {
|
|
406
406
|
className: "animate-pulse rounded-lg border border-border-seam bg-bg-surface p-4",
|
|
407
|
-
children: [/* @__PURE__ */
|
|
407
|
+
children: [/* @__PURE__ */ p("div", {
|
|
408
408
|
className: "flex items-center gap-4",
|
|
409
|
-
children: [/* @__PURE__ */
|
|
409
|
+
children: [/* @__PURE__ */ f("div", { className: "size-12 rounded-lg bg-bg-sunken" }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("div", {
|
|
410
410
|
className: "flex items-center gap-2",
|
|
411
|
-
children: [/* @__PURE__ */
|
|
412
|
-
}), /* @__PURE__ */
|
|
413
|
-
}), /* @__PURE__ */
|
|
411
|
+
children: [/* @__PURE__ */ f("div", { className: "h-5 w-32 rounded bg-bg-sunken" }), /* @__PURE__ */ f("div", { className: "size-4 rounded-full bg-bg-sunken" })]
|
|
412
|
+
}), /* @__PURE__ */ f("div", { className: "mt-1 h-4 w-40 rounded bg-bg-sunken" })] })]
|
|
413
|
+
}), /* @__PURE__ */ p("div", {
|
|
414
414
|
className: "mt-3 space-y-2",
|
|
415
|
-
children: [/* @__PURE__ */
|
|
415
|
+
children: [/* @__PURE__ */ f("div", { className: "h-4 w-full rounded bg-bg-sunken" }), /* @__PURE__ */ f("div", { className: "h-4 w-2/3 rounded bg-bg-sunken" })]
|
|
416
416
|
})]
|
|
417
417
|
})]
|
|
418
418
|
})
|
|
419
419
|
]
|
|
420
420
|
})]
|
|
421
|
-
}),
|
|
421
|
+
}), ke = ({ error: e, onRetry: t, onBack: n }) => /* @__PURE__ */ f("div", {
|
|
422
422
|
className: "flex h-full items-center justify-center",
|
|
423
|
-
children: /* @__PURE__ */
|
|
423
|
+
children: /* @__PURE__ */ p("div", {
|
|
424
424
|
className: "text-center",
|
|
425
425
|
children: [
|
|
426
|
-
/* @__PURE__ */
|
|
427
|
-
/* @__PURE__ */
|
|
426
|
+
/* @__PURE__ */ f(o, { className: "mx-auto mb-4 size-12 text-status-error-text" }),
|
|
427
|
+
/* @__PURE__ */ f("h2", {
|
|
428
428
|
className: "mb-2 text-xl font-semibold text-text-primary",
|
|
429
429
|
children: "Failed to load product"
|
|
430
430
|
}),
|
|
431
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ f("p", {
|
|
432
432
|
className: "mb-4 text-text-muted",
|
|
433
433
|
children: e.message || "An error occurred while loading the product details."
|
|
434
434
|
}),
|
|
435
|
-
/* @__PURE__ */
|
|
435
|
+
/* @__PURE__ */ p("div", {
|
|
436
436
|
className: "flex justify-center gap-3",
|
|
437
|
-
children: [/* @__PURE__ */
|
|
437
|
+
children: [/* @__PURE__ */ f("button", {
|
|
438
438
|
type: "button",
|
|
439
439
|
onClick: t,
|
|
440
440
|
className: "rounded-lg bg-action-primary-bg px-4 py-2 text-action-primary-text transition-opacity hover:opacity-90",
|
|
441
441
|
children: "Try Again"
|
|
442
|
-
}), /* @__PURE__ */
|
|
442
|
+
}), /* @__PURE__ */ f("button", {
|
|
443
443
|
type: "button",
|
|
444
444
|
onClick: n,
|
|
445
445
|
className: "rounded-lg border border-border-default px-4 py-2 text-text-primary transition-colors hover:bg-bg-sunken",
|
|
@@ -448,227 +448,229 @@ var Ee = (e, t) => ({
|
|
|
448
448
|
})
|
|
449
449
|
]
|
|
450
450
|
})
|
|
451
|
-
}),
|
|
452
|
-
let { productId:
|
|
453
|
-
filter:
|
|
454
|
-
productId:
|
|
455
|
-
workspaceId:
|
|
456
|
-
} : void 0, [
|
|
451
|
+
}), Ae = () => {
|
|
452
|
+
let { productId: o } = ye(), u = ve(), Ae = _e(), { basePath: h, workspaceId: g } = e(), { addProduct: je, cartItems: Me, addingToCart: Ne, createOrder: Pe, checkingOut: Fe } = t(), { installations: Ie, refetch: Le } = oe({
|
|
453
|
+
filter: de(() => o && g ? {
|
|
454
|
+
productId: o,
|
|
455
|
+
workspaceId: g
|
|
456
|
+
} : void 0, [o, g]),
|
|
457
457
|
limit: 1
|
|
458
|
-
}),
|
|
459
|
-
id:
|
|
460
|
-
slug:
|
|
458
|
+
}), Re = Ie.find((e) => e.productId === o && e.workspaceId === g && e.status === "ACTIVE"), _ = !!Re, v = Re?.version ?? null, { createReview: ze, loading: Be } = ee(), { updateReview: Ve, loading: He } = ie(), { deleteReview: Ue, loading: We } = te(), { markHelpful: Ge, loading: Ke } = ne(), y = we(), [b, qe] = a(!1), [x, Je] = a(!1), [Ye, S] = a(!1), [C, Xe] = a(1), [Ze, w] = a(null), [Qe, T] = a(null), [$e, E] = a("success"), [D, O] = a(!1), [k, A] = a(""), [j, M] = a(""), [N, P] = a(5), [et, tt] = a(null), [nt, rt] = a(!1), { data: it, loading: at, error: ot, refetch: F } = re({
|
|
459
|
+
id: o,
|
|
460
|
+
slug: o,
|
|
461
461
|
includeReviews: !0,
|
|
462
462
|
reviewsLimit: 10,
|
|
463
463
|
includeRelated: !0,
|
|
464
464
|
relatedLimit: 4,
|
|
465
465
|
includeVersions: !0
|
|
466
|
-
}),
|
|
466
|
+
}), I = it, L = I?.product, R = I?.publisher, z = Me.some((e) => e.productId === L?.id), st = (e) => {
|
|
467
467
|
let t = e.split(".");
|
|
468
468
|
for (; t.length < 3;) t.push("0");
|
|
469
469
|
return t.join(".");
|
|
470
|
-
},
|
|
471
|
-
if (
|
|
472
|
-
if (
|
|
473
|
-
u(`${
|
|
470
|
+
}, ct = L?.manifestVersion ?? null, lt = !!(_ && v && ct && st(v) !== st(ct)), ut = i(async () => {
|
|
471
|
+
if (L) {
|
|
472
|
+
if (w(null), z) {
|
|
473
|
+
u(`${h}/cart`);
|
|
474
474
|
return;
|
|
475
475
|
}
|
|
476
476
|
try {
|
|
477
|
-
await
|
|
477
|
+
await je(Te(L, R), void 0, C);
|
|
478
478
|
} catch (e) {
|
|
479
|
-
console.error("Failed to add product to cart:", e),
|
|
479
|
+
console.error("Failed to add product to cart:", e), w("Failed to add this product to cart. Please try again.");
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
482
|
}, [
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
483
|
+
L,
|
|
484
|
+
R,
|
|
485
|
+
je,
|
|
486
|
+
z,
|
|
487
487
|
u,
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
488
|
+
h,
|
|
489
|
+
C
|
|
490
|
+
]), dt = i(async () => {
|
|
491
|
+
if (L) {
|
|
492
|
+
w(null), S(!0);
|
|
492
493
|
try {
|
|
493
|
-
let e =
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
494
|
+
let e = L.price || 0, t = {
|
|
495
|
+
productId: L.id,
|
|
496
|
+
name: L.name,
|
|
497
|
+
quantity: C,
|
|
498
|
+
unitPrice: e,
|
|
499
|
+
subtotal: e * C,
|
|
500
|
+
itemType: L.nature?.toLowerCase() || "digital",
|
|
501
|
+
pricingModel: L.pricingModel || "PAID_ONETIME"
|
|
502
|
+
}, n = await Pe({
|
|
503
|
+
total: e * C,
|
|
504
|
+
lineItems: [t],
|
|
504
505
|
billingAccountId: ""
|
|
505
506
|
});
|
|
506
|
-
|
|
507
|
+
n?.id ? u(`/billing/checkout/store/${n.id}${Ae.search}`) : (console.error("Failed to create order"), w("Failed to create order. Please try again."), S(!1));
|
|
507
508
|
} catch (e) {
|
|
508
|
-
console.error("Buy Now error:", e),
|
|
509
|
+
console.error("Buy Now error:", e), w(e instanceof Error ? e.message : "Failed to start checkout"), S(!1);
|
|
509
510
|
}
|
|
510
511
|
}
|
|
511
512
|
}, [
|
|
512
|
-
|
|
513
|
-
|
|
513
|
+
L,
|
|
514
|
+
C,
|
|
515
|
+
Pe,
|
|
514
516
|
u
|
|
515
|
-
]),
|
|
516
|
-
|
|
517
|
-
}, [
|
|
518
|
-
|
|
519
|
-
let
|
|
520
|
-
|
|
521
|
-
let e =
|
|
522
|
-
e &&
|
|
517
|
+
]), B = i(() => {
|
|
518
|
+
L && rt(!0);
|
|
519
|
+
}, [L]), ft = fe(L);
|
|
520
|
+
ft.current = L;
|
|
521
|
+
let pt = fe(y);
|
|
522
|
+
pt.current = y, ue(() => {
|
|
523
|
+
let e = ft.current;
|
|
524
|
+
e && pt.current.emit("store.product.viewed", {
|
|
523
525
|
productId: e.id,
|
|
524
526
|
productSlug: e.slug,
|
|
525
527
|
productType: e.type,
|
|
526
528
|
pricingModel: e.pricingModel
|
|
527
529
|
});
|
|
528
|
-
}, [
|
|
529
|
-
let
|
|
530
|
-
|
|
531
|
-
productId:
|
|
530
|
+
}, [L?.id]);
|
|
531
|
+
let mt = i((e, t) => {
|
|
532
|
+
L && (y.emit("store.product.installed", {
|
|
533
|
+
productId: L.id,
|
|
532
534
|
workspaceId: e
|
|
533
|
-
}), console.log(`Successfully installed ${
|
|
535
|
+
}), console.log(`Successfully installed ${L.name} to workspace ${t} (${e})`), Le());
|
|
534
536
|
}, [
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
]),
|
|
537
|
+
L,
|
|
538
|
+
y,
|
|
539
|
+
Le
|
|
540
|
+
]), ht = i((e) => {
|
|
539
541
|
console.error("Installation failed:", e.message);
|
|
540
|
-
}, []),
|
|
541
|
-
|
|
542
|
-
}, [
|
|
543
|
-
if (!
|
|
544
|
-
if (
|
|
545
|
-
|
|
542
|
+
}, []), gt = i(() => {
|
|
543
|
+
A(I?.userReview?.title ?? ""), M(I?.userReview?.comment ?? ""), P(I?.userReview?.rating ?? 5), T(null), E("success"), O(!0);
|
|
544
|
+
}, [I?.userReview]), _t = i(async () => {
|
|
545
|
+
if (!L) return;
|
|
546
|
+
if (N < 1 || N > 5) {
|
|
547
|
+
E("error"), T("Choose a rating from 1 to 5 stars.");
|
|
546
548
|
return;
|
|
547
549
|
}
|
|
548
550
|
let e = {
|
|
549
|
-
productId:
|
|
550
|
-
rating:
|
|
551
|
-
title:
|
|
552
|
-
comment:
|
|
553
|
-
}, t =
|
|
554
|
-
data: await Ve(
|
|
551
|
+
productId: L.id,
|
|
552
|
+
rating: N,
|
|
553
|
+
title: k.trim() || void 0,
|
|
554
|
+
comment: j.trim() || void 0
|
|
555
|
+
}, t = I?.userReview ? {
|
|
556
|
+
data: await Ve(I.userReview.id, {
|
|
555
557
|
rating: e.rating,
|
|
556
558
|
title: e.title,
|
|
557
559
|
comment: e.comment
|
|
558
560
|
}),
|
|
559
561
|
errorMessage: null
|
|
560
|
-
} : await
|
|
562
|
+
} : await ze(e);
|
|
561
563
|
if (!t?.data) {
|
|
562
|
-
|
|
564
|
+
E("error"), T(t?.errorMessage ?? "We could not save your review. Please try again.");
|
|
563
565
|
return;
|
|
564
566
|
}
|
|
565
|
-
|
|
566
|
-
productId:
|
|
567
|
-
rating:
|
|
568
|
-
}), await
|
|
567
|
+
E("success"), T(I?.userReview ? "Your review was updated." : "Your review was submitted."), O(!1), y.emit("store.review.submitted", {
|
|
568
|
+
productId: L.id,
|
|
569
|
+
rating: N
|
|
570
|
+
}), await F();
|
|
569
571
|
}, [
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
572
|
+
y,
|
|
573
|
+
ze,
|
|
574
|
+
L,
|
|
575
|
+
I?.userReview,
|
|
576
|
+
F,
|
|
577
|
+
j,
|
|
578
|
+
N,
|
|
579
|
+
k,
|
|
578
580
|
Ve
|
|
579
|
-
]),
|
|
580
|
-
if (
|
|
581
|
+
]), vt = i(async () => {
|
|
582
|
+
if (I?.userReview && (ce("medium"), await se({
|
|
581
583
|
title: "Delete review",
|
|
582
584
|
message: "Are you sure you want to remove your review?",
|
|
583
585
|
okButtonTitle: "Delete",
|
|
584
586
|
cancelButtonTitle: "Cancel"
|
|
585
587
|
}) !== !1)) {
|
|
586
|
-
if (!await
|
|
587
|
-
|
|
588
|
+
if (!await Ue(I.userReview.id)) {
|
|
589
|
+
E("error"), T("We could not remove your review. Please try again."), le("error");
|
|
588
590
|
return;
|
|
589
591
|
}
|
|
590
|
-
|
|
592
|
+
E("success"), T("Your review was removed."), O(!1), A(""), M(""), P(5), le("success"), await F();
|
|
591
593
|
}
|
|
592
594
|
}, [
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
]),
|
|
597
|
-
|
|
598
|
-
}, [
|
|
599
|
-
if (
|
|
600
|
-
if (
|
|
601
|
-
error:
|
|
602
|
-
onRetry:
|
|
603
|
-
onBack: () => u(`${
|
|
595
|
+
Ue,
|
|
596
|
+
I?.userReview,
|
|
597
|
+
F
|
|
598
|
+
]), yt = i(async (e) => {
|
|
599
|
+
tt(e), await Ge(e) && await F(), tt(null);
|
|
600
|
+
}, [Ge, F]);
|
|
601
|
+
if (at) return /* @__PURE__ */ f(Oe, {});
|
|
602
|
+
if (ot) return /* @__PURE__ */ f(ke, {
|
|
603
|
+
error: ot,
|
|
604
|
+
onRetry: F,
|
|
605
|
+
onBack: () => u(`${h}/marketplace`)
|
|
604
606
|
});
|
|
605
|
-
if (!
|
|
607
|
+
if (!I?.product) return /* @__PURE__ */ f("div", {
|
|
606
608
|
className: "flex h-full items-center justify-center p-6",
|
|
607
|
-
children: /* @__PURE__ */
|
|
609
|
+
children: /* @__PURE__ */ f(xe, {
|
|
608
610
|
illustration: "empty-search",
|
|
609
611
|
title: "Product not found",
|
|
610
612
|
description: "The product you are looking for does not exist or has been removed.",
|
|
611
|
-
action: /* @__PURE__ */
|
|
613
|
+
action: /* @__PURE__ */ f("button", {
|
|
612
614
|
type: "button",
|
|
613
|
-
onClick: () => u(`${
|
|
615
|
+
onClick: () => u(`${h}/marketplace`),
|
|
614
616
|
className: "rounded-lg bg-action-primary-bg px-4 py-2 text-action-primary-text transition-opacity hover:opacity-90",
|
|
615
617
|
children: "Back to Marketplace"
|
|
616
618
|
})
|
|
617
619
|
})
|
|
618
620
|
});
|
|
619
|
-
let { reviews:
|
|
621
|
+
let { reviews: V, reviewsCount: bt, relatedProducts: H, ratingDistribution: U, isPurchased: W, userEntitlement: G } = I, K = L, q = U ? U.fiveStars + U.fourStars + U.threeStars + U.twoStars + U.oneStar : 0, xt = U ? [
|
|
620
622
|
{
|
|
621
623
|
stars: 5,
|
|
622
|
-
count:
|
|
623
|
-
percentage:
|
|
624
|
+
count: U.fiveStars,
|
|
625
|
+
percentage: q > 0 ? U.fiveStars / q * 100 : 0
|
|
624
626
|
},
|
|
625
627
|
{
|
|
626
628
|
stars: 4,
|
|
627
|
-
count:
|
|
628
|
-
percentage:
|
|
629
|
+
count: U.fourStars,
|
|
630
|
+
percentage: q > 0 ? U.fourStars / q * 100 : 0
|
|
629
631
|
},
|
|
630
632
|
{
|
|
631
633
|
stars: 3,
|
|
632
|
-
count:
|
|
633
|
-
percentage:
|
|
634
|
+
count: U.threeStars,
|
|
635
|
+
percentage: q > 0 ? U.threeStars / q * 100 : 0
|
|
634
636
|
},
|
|
635
637
|
{
|
|
636
638
|
stars: 2,
|
|
637
|
-
count:
|
|
638
|
-
percentage:
|
|
639
|
+
count: U.twoStars,
|
|
640
|
+
percentage: q > 0 ? U.twoStars / q * 100 : 0
|
|
639
641
|
},
|
|
640
642
|
{
|
|
641
643
|
stars: 1,
|
|
642
|
-
count:
|
|
643
|
-
percentage:
|
|
644
|
+
count: U.oneStar,
|
|
645
|
+
percentage: q > 0 ? U.oneStar / q * 100 : 0
|
|
644
646
|
}
|
|
645
|
-
] : [],
|
|
646
|
-
return /* @__PURE__ */
|
|
647
|
+
] : [], J = K.requiredPermissions || [], St = K.integrationDeps || [], Ct = () => K.pricingModel === "FREE" ? "Free" : K.pricingModel === "SUBSCRIPTION" ? `${r(K.price, K.currency)}/mo` : r(K.price, K.currency), Y = K.pricingModel === "FREE" || K.price === 0, X = K.nature === "PHYSICAL", Z = X && K.trackInventory === !0, Q = K.stockQuantity ?? 0, $ = Z && Q <= 0;
|
|
648
|
+
return /* @__PURE__ */ p("div", {
|
|
647
649
|
className: "h-full overflow-y-auto bg-bg-base",
|
|
648
650
|
children: [
|
|
649
|
-
/* @__PURE__ */
|
|
651
|
+
/* @__PURE__ */ f("div", {
|
|
650
652
|
className: "bg-bg-surface",
|
|
651
|
-
children: /* @__PURE__ */
|
|
653
|
+
children: /* @__PURE__ */ f("div", {
|
|
652
654
|
className: "mx-auto max-w-7xl",
|
|
653
|
-
children: /* @__PURE__ */
|
|
655
|
+
children: /* @__PURE__ */ p("div", {
|
|
654
656
|
className: "flex flex-col lg:flex-row",
|
|
655
|
-
children: [/* @__PURE__ */
|
|
657
|
+
children: [/* @__PURE__ */ p("div", {
|
|
656
658
|
className: "flex-1 px-6 py-8 lg:max-w-xl lg:py-12",
|
|
657
659
|
children: [
|
|
658
|
-
/* @__PURE__ */
|
|
660
|
+
/* @__PURE__ */ p("button", {
|
|
659
661
|
type: "button",
|
|
660
662
|
onClick: () => u(-1),
|
|
661
663
|
className: "mb-6 cursor-pointer inline-flex items-center gap-2 text-sm text-text-muted transition-colors hover:text-text-primary",
|
|
662
|
-
children: [/* @__PURE__ */
|
|
664
|
+
children: [/* @__PURE__ */ f(pe, { className: "size-4" }), "Back"]
|
|
663
665
|
}),
|
|
664
|
-
/* @__PURE__ */
|
|
666
|
+
/* @__PURE__ */ f("h1", {
|
|
665
667
|
className: "mb-3 text-4xl font-normal leading-tight text-text-primary lg:text-5xl",
|
|
666
|
-
children:
|
|
668
|
+
children: K.name
|
|
667
669
|
}),
|
|
668
|
-
|
|
670
|
+
_ && /* @__PURE__ */ p("div", {
|
|
669
671
|
className: "mb-4 inline-flex items-center gap-1.5 rounded-full bg-status-success-bg-subtle px-3 py-1 text-sm font-medium text-status-success-text",
|
|
670
672
|
children: [
|
|
671
|
-
/* @__PURE__ */
|
|
673
|
+
/* @__PURE__ */ f("svg", {
|
|
672
674
|
className: "size-3.5",
|
|
673
675
|
viewBox: "0 0 16 16",
|
|
674
676
|
fill: "none",
|
|
@@ -677,99 +679,143 @@ var Ee = (e, t) => ({
|
|
|
677
679
|
strokeLinecap: "round",
|
|
678
680
|
strokeLinejoin: "round",
|
|
679
681
|
"aria-hidden": "true",
|
|
680
|
-
children: /* @__PURE__ */
|
|
682
|
+
children: /* @__PURE__ */ f("polyline", { points: "2,8 6,12 14,4" })
|
|
681
683
|
}),
|
|
682
684
|
"Installed",
|
|
683
|
-
|
|
685
|
+
v ? ` v${v}` : ""
|
|
684
686
|
]
|
|
685
687
|
}),
|
|
686
|
-
/* @__PURE__ */
|
|
688
|
+
/* @__PURE__ */ p("div", {
|
|
687
689
|
className: "mb-2",
|
|
688
|
-
children: [
|
|
689
|
-
href:
|
|
690
|
+
children: [R?.websiteUrl ? /* @__PURE__ */ f("a", {
|
|
691
|
+
href: R.websiteUrl,
|
|
690
692
|
target: "_blank",
|
|
691
693
|
rel: "noreferrer",
|
|
692
694
|
className: "text-base font-medium text-text-link hover:underline",
|
|
693
|
-
children:
|
|
694
|
-
}) : /* @__PURE__ */
|
|
695
|
+
children: R.name
|
|
696
|
+
}) : /* @__PURE__ */ f("span", {
|
|
695
697
|
className: "text-base font-medium text-text-primary",
|
|
696
|
-
children:
|
|
697
|
-
}),
|
|
698
|
+
children: R?.name || K.authorName || "Unknown Publisher"
|
|
699
|
+
}), R?.isVerified && /* @__PURE__ */ f(c, { className: "ml-1.5 inline size-4 text-status-success-text" })]
|
|
698
700
|
}),
|
|
699
|
-
/* @__PURE__ */
|
|
701
|
+
/* @__PURE__ */ p("p", {
|
|
700
702
|
className: "mb-6 text-sm text-text-muted",
|
|
701
703
|
children: [
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
n(
|
|
704
|
+
K.category && /* @__PURE__ */ f("span", { children: K.category }),
|
|
705
|
+
K.category && " · ",
|
|
706
|
+
n(K.downloads),
|
|
705
707
|
"+ downloads"
|
|
706
708
|
]
|
|
707
709
|
}),
|
|
708
|
-
/* @__PURE__ */
|
|
710
|
+
/* @__PURE__ */ p(be, {
|
|
709
711
|
className: "mb-6 p-5",
|
|
710
712
|
children: [
|
|
711
|
-
/* @__PURE__ */
|
|
713
|
+
/* @__PURE__ */ p("div", {
|
|
712
714
|
className: "mb-6 flex items-center gap-4",
|
|
713
715
|
children: [
|
|
714
|
-
/* @__PURE__ */
|
|
716
|
+
/* @__PURE__ */ f("div", {
|
|
715
717
|
className: "flex size-12 items-center justify-center overflow-hidden rounded-xl bg-bg-sunken",
|
|
716
|
-
children:
|
|
717
|
-
src:
|
|
718
|
+
children: K.icon ? /* @__PURE__ */ f("img", {
|
|
719
|
+
src: K.icon,
|
|
718
720
|
alt: "",
|
|
719
721
|
className: "size-full object-cover"
|
|
720
|
-
}) : /* @__PURE__ */
|
|
722
|
+
}) : /* @__PURE__ */ f("span", {
|
|
721
723
|
className: "text-lg font-bold text-text-muted",
|
|
722
|
-
children:
|
|
724
|
+
children: K.name.charAt(0)
|
|
723
725
|
})
|
|
724
726
|
}),
|
|
725
|
-
/* @__PURE__ */
|
|
727
|
+
/* @__PURE__ */ p("div", {
|
|
726
728
|
className: "flex items-center gap-1 border-l border-border-default pl-4",
|
|
727
729
|
children: [
|
|
728
|
-
/* @__PURE__ */
|
|
730
|
+
/* @__PURE__ */ f("span", {
|
|
729
731
|
className: "text-sm font-medium text-text-primary",
|
|
730
|
-
children: (
|
|
732
|
+
children: (K.rating || 0).toFixed(1)
|
|
731
733
|
}),
|
|
732
|
-
/* @__PURE__ */
|
|
733
|
-
/* @__PURE__ */
|
|
734
|
+
/* @__PURE__ */ f(l, { className: "size-4 fill-current text-status-warning-text" }),
|
|
735
|
+
/* @__PURE__ */ p("span", {
|
|
734
736
|
className: "ml-1 text-xs text-text-muted",
|
|
735
|
-
children: [n(
|
|
737
|
+
children: [n(bt || K.reviewCount), " reviews"]
|
|
736
738
|
})
|
|
737
739
|
]
|
|
738
740
|
}),
|
|
739
|
-
/* @__PURE__ */
|
|
741
|
+
/* @__PURE__ */ p("div", {
|
|
740
742
|
className: "border-l border-border-default pl-4",
|
|
741
|
-
children: [/* @__PURE__ */
|
|
743
|
+
children: [/* @__PURE__ */ p("span", {
|
|
742
744
|
className: "text-sm font-medium text-text-primary",
|
|
743
|
-
children: [n(
|
|
744
|
-
}), /* @__PURE__ */
|
|
745
|
+
children: [n(K.downloads), "+"]
|
|
746
|
+
}), /* @__PURE__ */ f("p", {
|
|
745
747
|
className: "text-xs text-text-muted",
|
|
746
748
|
children: "Downloads"
|
|
747
749
|
})]
|
|
748
750
|
}),
|
|
749
|
-
/* @__PURE__ */
|
|
751
|
+
/* @__PURE__ */ p("div", {
|
|
750
752
|
className: "border-l border-border-default pl-4",
|
|
751
|
-
children: [/* @__PURE__ */
|
|
753
|
+
children: [/* @__PURE__ */ f("span", {
|
|
752
754
|
className: "rounded bg-bg-sunken px-2 py-1 text-xs font-medium text-text-primary",
|
|
753
|
-
children:
|
|
754
|
-
}), /* @__PURE__ */
|
|
755
|
+
children: K.type
|
|
756
|
+
}), /* @__PURE__ */ f("p", {
|
|
755
757
|
className: "mt-0.5 text-xs text-text-muted",
|
|
756
758
|
children: "Type"
|
|
757
759
|
})]
|
|
758
760
|
})
|
|
759
761
|
]
|
|
760
762
|
}),
|
|
761
|
-
|
|
763
|
+
Ze && /* @__PURE__ */ f("div", {
|
|
762
764
|
role: "alert",
|
|
763
765
|
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",
|
|
764
|
-
children:
|
|
766
|
+
children: Ze
|
|
765
767
|
}),
|
|
766
|
-
/* @__PURE__ */
|
|
768
|
+
X && /* @__PURE__ */ p("div", {
|
|
769
|
+
className: "mb-4 flex flex-wrap items-center gap-4",
|
|
770
|
+
children: [Z && ($ ? /* @__PURE__ */ p("span", {
|
|
771
|
+
className: "inline-flex items-center gap-1.5 rounded-full bg-status-error-bg-subtle px-3 py-1 text-sm font-medium text-status-error-text",
|
|
772
|
+
children: [/* @__PURE__ */ f(s, { className: "size-4" }), "Out of stock"]
|
|
773
|
+
}) : /* @__PURE__ */ p("span", {
|
|
774
|
+
className: "inline-flex items-center gap-1.5 rounded-full bg-status-success-bg-subtle px-3 py-1 text-sm font-medium text-status-success-text",
|
|
775
|
+
children: [
|
|
776
|
+
/* @__PURE__ */ f(s, { className: "size-4" }),
|
|
777
|
+
n(Q),
|
|
778
|
+
" in stock"
|
|
779
|
+
]
|
|
780
|
+
})), !$ && /* @__PURE__ */ p("div", {
|
|
781
|
+
className: "flex items-center gap-2",
|
|
782
|
+
children: [/* @__PURE__ */ f("span", {
|
|
783
|
+
className: "text-sm text-text-muted",
|
|
784
|
+
children: "Qty"
|
|
785
|
+
}), /* @__PURE__ */ p("div", {
|
|
786
|
+
className: "flex items-center rounded-full border border-border-default",
|
|
787
|
+
children: [
|
|
788
|
+
/* @__PURE__ */ f("button", {
|
|
789
|
+
type: "button",
|
|
790
|
+
onClick: () => Xe((e) => Math.max(1, e - 1)),
|
|
791
|
+
disabled: C <= 1,
|
|
792
|
+
"aria-label": "Decrease quantity",
|
|
793
|
+
className: "cursor-pointer px-3 py-1.5 text-text-primary transition-colors hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-40",
|
|
794
|
+
children: "−"
|
|
795
|
+
}),
|
|
796
|
+
/* @__PURE__ */ f("span", {
|
|
797
|
+
className: "min-w-8 px-2 text-center text-sm font-medium tabular-nums text-text-primary",
|
|
798
|
+
children: C
|
|
799
|
+
}),
|
|
800
|
+
/* @__PURE__ */ f("button", {
|
|
801
|
+
type: "button",
|
|
802
|
+
onClick: () => Xe((e) => Z ? Math.min(Q, e + 1) : e + 1),
|
|
803
|
+
disabled: Z && C >= Q,
|
|
804
|
+
"aria-label": "Increase quantity",
|
|
805
|
+
className: "cursor-pointer px-3 py-1.5 text-text-primary transition-colors hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-40",
|
|
806
|
+
children: "+"
|
|
807
|
+
})
|
|
808
|
+
]
|
|
809
|
+
})]
|
|
810
|
+
})]
|
|
811
|
+
}),
|
|
812
|
+
/* @__PURE__ */ p("div", {
|
|
767
813
|
className: "mb-6 flex items-center gap-3",
|
|
768
|
-
children: [
|
|
814
|
+
children: [_ ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ p("button", {
|
|
769
815
|
type: "button",
|
|
770
816
|
disabled: !0,
|
|
771
817
|
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",
|
|
772
|
-
children: [/* @__PURE__ */
|
|
818
|
+
children: [/* @__PURE__ */ f("svg", {
|
|
773
819
|
className: "size-4",
|
|
774
820
|
viewBox: "0 0 16 16",
|
|
775
821
|
fill: "none",
|
|
@@ -778,79 +824,96 @@ var Ee = (e, t) => ({
|
|
|
778
824
|
strokeLinecap: "round",
|
|
779
825
|
strokeLinejoin: "round",
|
|
780
826
|
"aria-hidden": "true",
|
|
781
|
-
children: /* @__PURE__ */
|
|
827
|
+
children: /* @__PURE__ */ f("polyline", { points: "2,8 6,12 14,4" })
|
|
782
828
|
}), "Installed"]
|
|
783
|
-
}),
|
|
829
|
+
}), lt && /* @__PURE__ */ p("button", {
|
|
784
830
|
type: "button",
|
|
785
|
-
onClick:
|
|
831
|
+
onClick: B,
|
|
786
832
|
className: "cursor-pointer rounded-full bg-action-primary-bg px-8 py-3 font-medium text-action-primary-text transition-opacity hover:opacity-90",
|
|
787
|
-
children: ["Update to v",
|
|
788
|
-
})] }) :
|
|
833
|
+
children: ["Update to v", K.manifestVersion]
|
|
834
|
+
})] }) : !X && W && !Y ? /* @__PURE__ */ f("button", {
|
|
789
835
|
type: "button",
|
|
790
|
-
onClick:
|
|
836
|
+
onClick: B,
|
|
791
837
|
className: "cursor-pointer rounded-full bg-action-primary-bg px-8 py-3 font-medium text-action-primary-text transition-opacity hover:opacity-90",
|
|
792
838
|
children: "Install to Workspace"
|
|
793
|
-
}) :
|
|
839
|
+
}) : !X && Y ? /* @__PURE__ */ f("button", {
|
|
794
840
|
type: "button",
|
|
795
|
-
onClick:
|
|
841
|
+
onClick: B,
|
|
796
842
|
className: "cursor-pointer rounded-full bg-action-primary-bg px-8 py-3 font-medium text-action-primary-text transition-opacity hover:opacity-90",
|
|
797
843
|
children: "Install"
|
|
798
|
-
}) : /* @__PURE__ */
|
|
844
|
+
}) : /* @__PURE__ */ f("button", {
|
|
799
845
|
type: "button",
|
|
800
|
-
onClick:
|
|
801
|
-
disabled:
|
|
846
|
+
onClick: dt,
|
|
847
|
+
disabled: Ye || Fe || $,
|
|
802
848
|
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",
|
|
803
|
-
children:
|
|
804
|
-
}),
|
|
849
|
+
children: Ye || Fe ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(he, { className: "size-4 animate-spin" }), "Processing…"] }) : $ ? "Out of stock" : `Buy ${Ct()}`
|
|
850
|
+
}), !Y && (!W || X) && /* @__PURE__ */ p("button", {
|
|
805
851
|
type: "button",
|
|
806
|
-
onClick:
|
|
807
|
-
disabled:
|
|
852
|
+
onClick: ut,
|
|
853
|
+
disabled: Ne || $,
|
|
808
854
|
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",
|
|
809
|
-
children: [
|
|
855
|
+
children: [Ne ? /* @__PURE__ */ f(he, { className: "size-4 animate-spin" }) : z ? /* @__PURE__ */ f(me, { className: "size-4 text-status-success-text" }) : /* @__PURE__ */ f(ge, { className: "size-4" }), z ? "In Cart" : "Add to Cart"]
|
|
810
856
|
})]
|
|
811
857
|
}),
|
|
812
|
-
/* @__PURE__ */
|
|
858
|
+
X ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ p("p", {
|
|
813
859
|
className: "flex items-center gap-2 text-xs text-text-muted",
|
|
814
|
-
children: [/* @__PURE__ */
|
|
815
|
-
}),
|
|
816
|
-
!$ && !J && /* @__PURE__ */ d("p", {
|
|
860
|
+
children: [/* @__PURE__ */ f(s, { className: "size-4" }), K.requiresShipping === !1 ? "Available for pickup — no shipping required" : "Ships to your delivery address"]
|
|
861
|
+
}), !Y && /* @__PURE__ */ p("p", {
|
|
817
862
|
className: "text-xs text-text-tertiary",
|
|
818
|
-
children: "All purchases are final. Digital app orders cannot be cancelled or refunded once completed."
|
|
819
|
-
}),
|
|
820
|
-
Y && /* @__PURE__ */ f("p", {
|
|
821
|
-
className: "mt-2 flex items-center gap-2 text-xs text-text-muted",
|
|
822
863
|
children: [
|
|
823
|
-
|
|
824
|
-
"
|
|
825
|
-
|
|
826
|
-
Y.expiresAt && ` (Expires: ${new Date(Y.expiresAt).toLocaleDateString()})`
|
|
864
|
+
"Returns and refunds are handled by ",
|
|
865
|
+
R?.name || "the seller",
|
|
866
|
+
" per their store policy."
|
|
827
867
|
]
|
|
828
|
-
})
|
|
868
|
+
})] }) : /* @__PURE__ */ p(d, { children: [
|
|
869
|
+
/* @__PURE__ */ p("p", {
|
|
870
|
+
className: "flex items-center gap-2 text-xs text-text-muted",
|
|
871
|
+
children: [/* @__PURE__ */ f(s, { className: "size-4" }), "This app is available for your workspace"]
|
|
872
|
+
}),
|
|
873
|
+
!Y && !W && /* @__PURE__ */ f("p", {
|
|
874
|
+
className: "text-xs text-text-tertiary",
|
|
875
|
+
children: "All purchases are final. Digital app orders cannot be cancelled or refunded once completed."
|
|
876
|
+
}),
|
|
877
|
+
G && /* @__PURE__ */ p("p", {
|
|
878
|
+
className: "mt-2 flex items-center gap-2 text-xs text-text-muted",
|
|
879
|
+
children: [
|
|
880
|
+
/* @__PURE__ */ f(c, { className: "size-4 text-status-success-text" }),
|
|
881
|
+
"License: ",
|
|
882
|
+
G.status,
|
|
883
|
+
G.expiresAt && ` (Expires: ${new Date(G.expiresAt).toLocaleDateString()})`
|
|
884
|
+
]
|
|
885
|
+
})
|
|
886
|
+
] })
|
|
829
887
|
]
|
|
830
888
|
})
|
|
831
889
|
]
|
|
832
|
-
}), /* @__PURE__ */
|
|
890
|
+
}), /* @__PURE__ */ f("div", {
|
|
833
891
|
className: "relative flex-1 overflow-hidden bg-bg-sunken lg:min-h-[500px]",
|
|
834
|
-
children:
|
|
835
|
-
src:
|
|
836
|
-
|
|
892
|
+
children: K.type === "WORKFLOW" ? /* @__PURE__ */ f("iframe", {
|
|
893
|
+
src: `${window.location.origin}/embed/workflow?productId=${encodeURIComponent(K.id)}&cta=false&theme=${document.documentElement.classList.contains("dark") ? "dark" : "light"}`,
|
|
894
|
+
title: `${K.name} workflow preview`,
|
|
895
|
+
loading: "lazy",
|
|
896
|
+
className: "size-full min-h-[300px] border-0 lg:min-h-[500px]"
|
|
897
|
+
}) : K.bannerUrl ? /* @__PURE__ */ f("img", {
|
|
898
|
+
src: K.bannerUrl,
|
|
899
|
+
alt: `${K.name} banner`,
|
|
837
900
|
className: "size-full object-cover"
|
|
838
|
-
}) :
|
|
839
|
-
src:
|
|
840
|
-
alt: `${
|
|
901
|
+
}) : K.screenshots && K.screenshots.length > 0 ? /* @__PURE__ */ f("img", {
|
|
902
|
+
src: K.screenshots[0],
|
|
903
|
+
alt: `${K.name} preview`,
|
|
841
904
|
className: "size-full object-cover"
|
|
842
|
-
}) : /* @__PURE__ */
|
|
905
|
+
}) : /* @__PURE__ */ p("div", {
|
|
843
906
|
className: "flex h-full min-h-[300px] flex-col items-center justify-center gap-3 p-8 text-center",
|
|
844
907
|
children: [
|
|
845
|
-
/* @__PURE__ */
|
|
908
|
+
/* @__PURE__ */ f("div", {
|
|
846
909
|
className: "flex size-20 items-center justify-center rounded-2xl bg-bg-surface text-3xl font-bold text-text-muted",
|
|
847
|
-
children:
|
|
910
|
+
children: K.name.charAt(0)
|
|
848
911
|
}),
|
|
849
|
-
/* @__PURE__ */
|
|
912
|
+
/* @__PURE__ */ f("p", {
|
|
850
913
|
className: "text-sm text-text-muted",
|
|
851
914
|
children: "No preview available"
|
|
852
915
|
}),
|
|
853
|
-
/* @__PURE__ */
|
|
916
|
+
/* @__PURE__ */ f("p", {
|
|
854
917
|
className: "max-w-[200px] text-xs text-text-muted opacity-60",
|
|
855
918
|
children: "Upload screenshots in the Store Listing tab to show a preview here"
|
|
856
919
|
})
|
|
@@ -860,17 +923,17 @@ var Ee = (e, t) => ({
|
|
|
860
923
|
})
|
|
861
924
|
})
|
|
862
925
|
}),
|
|
863
|
-
|
|
926
|
+
K.screenshots && K.screenshots.length > 0 && /* @__PURE__ */ f("div", {
|
|
864
927
|
className: "border-y border-border-default bg-bg-base",
|
|
865
|
-
children: /* @__PURE__ */
|
|
928
|
+
children: /* @__PURE__ */ p("div", {
|
|
866
929
|
className: "px-6 py-6",
|
|
867
|
-
children: [/* @__PURE__ */
|
|
930
|
+
children: [/* @__PURE__ */ f("h2", {
|
|
868
931
|
className: "mb-4 text-sm font-semibold uppercase tracking-wider text-text-muted",
|
|
869
932
|
children: "Preview"
|
|
870
|
-
}), /* @__PURE__ */
|
|
933
|
+
}), /* @__PURE__ */ p("div", {
|
|
871
934
|
className: "flex gap-4 overflow-x-auto pb-2",
|
|
872
935
|
style: { scrollSnapType: "x mandatory" },
|
|
873
|
-
children: [
|
|
936
|
+
children: [K.screenshots.map((e, t) => /* @__PURE__ */ f("div", {
|
|
874
937
|
className: "relative flex-shrink-0 overflow-hidden rounded-2xl shadow-lg",
|
|
875
938
|
style: {
|
|
876
939
|
width: "72vw",
|
|
@@ -879,44 +942,44 @@ var Ee = (e, t) => ({
|
|
|
879
942
|
aspectRatio: "16/9",
|
|
880
943
|
scrollSnapAlign: "start"
|
|
881
944
|
},
|
|
882
|
-
children: /* @__PURE__ */
|
|
945
|
+
children: /* @__PURE__ */ f("img", {
|
|
883
946
|
src: e,
|
|
884
947
|
alt: `Screenshot ${t + 1}`,
|
|
885
948
|
className: "size-full object-cover"
|
|
886
949
|
})
|
|
887
|
-
}, t)), /* @__PURE__ */
|
|
950
|
+
}, t)), /* @__PURE__ */ f("div", { className: "flex-shrink-0 w-2" })]
|
|
888
951
|
})]
|
|
889
952
|
})
|
|
890
953
|
}),
|
|
891
|
-
/* @__PURE__ */
|
|
954
|
+
/* @__PURE__ */ p("main", {
|
|
892
955
|
className: "mx-auto max-w-7xl px-6 py-8",
|
|
893
956
|
children: [
|
|
894
|
-
/* @__PURE__ */
|
|
957
|
+
/* @__PURE__ */ p(Ce, {
|
|
895
958
|
className: "mb-6",
|
|
896
959
|
children: [
|
|
897
960
|
"Everything you need to decide whether to install ",
|
|
898
|
-
|
|
961
|
+
K.name,
|
|
899
962
|
": what it does, screenshots, pricing, the permissions and integrations it needs, and real customer reviews. When you're ready, install it (free apps) or buy it, then add it to a workspace — and leave a review once you've used it."
|
|
900
963
|
]
|
|
901
964
|
}),
|
|
902
|
-
/* @__PURE__ */
|
|
965
|
+
/* @__PURE__ */ f(Se, {
|
|
903
966
|
className: "mb-8",
|
|
904
967
|
storageKey: "store-product-detail",
|
|
905
968
|
steps: [
|
|
906
|
-
|
|
969
|
+
Y ? {
|
|
907
970
|
id: "install",
|
|
908
971
|
label: "Install this app",
|
|
909
972
|
description: "It’s free — add it to a workspace in a couple of clicks.",
|
|
910
|
-
onClick:
|
|
911
|
-
done:
|
|
973
|
+
onClick: B,
|
|
974
|
+
done: _
|
|
912
975
|
} : {
|
|
913
976
|
id: "buy",
|
|
914
|
-
label:
|
|
915
|
-
description:
|
|
916
|
-
onClick:
|
|
917
|
-
done:
|
|
977
|
+
label: W ? "Install to a workspace" : "Buy or add to cart",
|
|
978
|
+
description: W ? "You already own this — install it where you need it." : "Purchase now, or add it to your cart to check out later.",
|
|
979
|
+
onClick: W ? B : dt,
|
|
980
|
+
done: _
|
|
918
981
|
},
|
|
919
|
-
...
|
|
982
|
+
...J.length > 0 ? [{
|
|
920
983
|
id: "permissions",
|
|
921
984
|
label: "Review what it can access",
|
|
922
985
|
description: "Check the permissions this app requires before installing.",
|
|
@@ -930,66 +993,66 @@ var Ee = (e, t) => ({
|
|
|
930
993
|
}
|
|
931
994
|
]
|
|
932
995
|
}),
|
|
933
|
-
/* @__PURE__ */
|
|
996
|
+
/* @__PURE__ */ p("div", {
|
|
934
997
|
className: "flex flex-col gap-8 lg:flex-row",
|
|
935
|
-
children: [/* @__PURE__ */
|
|
998
|
+
children: [/* @__PURE__ */ p("div", {
|
|
936
999
|
className: "flex-1 lg:max-w-3xl",
|
|
937
1000
|
children: [
|
|
938
|
-
/* @__PURE__ */
|
|
1001
|
+
/* @__PURE__ */ p("section", {
|
|
939
1002
|
className: "mb-8",
|
|
940
1003
|
children: [
|
|
941
|
-
/* @__PURE__ */
|
|
1004
|
+
/* @__PURE__ */ f("div", {
|
|
942
1005
|
className: "mb-4 flex items-center justify-between text-left",
|
|
943
|
-
children: /* @__PURE__ */
|
|
1006
|
+
children: /* @__PURE__ */ f("h2", {
|
|
944
1007
|
className: "text-lg font-medium text-text-primary",
|
|
945
1008
|
children: "About this app"
|
|
946
1009
|
})
|
|
947
1010
|
}),
|
|
948
|
-
/* @__PURE__ */
|
|
1011
|
+
/* @__PURE__ */ p("div", {
|
|
949
1012
|
className: "text-sm leading-relaxed text-text-secondary",
|
|
950
|
-
children: [/* @__PURE__ */
|
|
951
|
-
className:
|
|
952
|
-
children:
|
|
953
|
-
}), ((
|
|
1013
|
+
children: [/* @__PURE__ */ f("p", {
|
|
1014
|
+
className: b ? "" : "line-clamp-4",
|
|
1015
|
+
children: K.longDescription || K.description || "No description available."
|
|
1016
|
+
}), ((K.longDescription || K.description)?.length ?? 0) > 200 && /* @__PURE__ */ f("button", {
|
|
954
1017
|
type: "button",
|
|
955
|
-
onClick: () =>
|
|
1018
|
+
onClick: () => qe(!b),
|
|
956
1019
|
className: "cursor-pointer mt-3 text-sm font-medium text-text-link",
|
|
957
|
-
children:
|
|
1020
|
+
children: b ? "Show less" : "Show more"
|
|
958
1021
|
})]
|
|
959
1022
|
}),
|
|
960
|
-
|
|
1023
|
+
K.tags && K.tags.length > 0 && /* @__PURE__ */ f("div", {
|
|
961
1024
|
className: "mt-4 flex flex-wrap gap-2",
|
|
962
|
-
children:
|
|
1025
|
+
children: K.tags.map((e) => /* @__PURE__ */ f("span", {
|
|
963
1026
|
className: "rounded-full border border-border-seam px-3 py-1.5 text-xs text-text-muted transition-colors hover:bg-bg-sunken",
|
|
964
1027
|
children: e
|
|
965
1028
|
}, e))
|
|
966
1029
|
})
|
|
967
1030
|
]
|
|
968
1031
|
}),
|
|
969
|
-
/* @__PURE__ */
|
|
1032
|
+
/* @__PURE__ */ p("section", {
|
|
970
1033
|
id: "ratings-reviews",
|
|
971
1034
|
className: "mb-8 scroll-mt-6",
|
|
972
1035
|
children: [
|
|
973
|
-
/* @__PURE__ */
|
|
1036
|
+
/* @__PURE__ */ f("div", {
|
|
974
1037
|
className: "mb-4 flex items-center justify-between text-left",
|
|
975
|
-
children: /* @__PURE__ */
|
|
1038
|
+
children: /* @__PURE__ */ f("h2", {
|
|
976
1039
|
className: "text-lg font-medium text-text-primary",
|
|
977
1040
|
children: "Ratings & Reviews"
|
|
978
1041
|
})
|
|
979
1042
|
}),
|
|
980
|
-
/* @__PURE__ */
|
|
1043
|
+
/* @__PURE__ */ p(m, {
|
|
981
1044
|
treatment: "insight",
|
|
982
1045
|
className: "p-5",
|
|
983
|
-
children: [
|
|
1046
|
+
children: [V && V.length > 0 ? /* @__PURE__ */ p("div", {
|
|
984
1047
|
className: "flex items-start gap-8",
|
|
985
|
-
children: [/* @__PURE__ */
|
|
1048
|
+
children: [/* @__PURE__ */ p("div", {
|
|
986
1049
|
className: "text-center",
|
|
987
1050
|
children: [
|
|
988
|
-
/* @__PURE__ */
|
|
1051
|
+
/* @__PURE__ */ f("p", {
|
|
989
1052
|
className: "text-5xl font-light tabular-nums text-text-primary",
|
|
990
|
-
children: (
|
|
1053
|
+
children: (K.rating || 0).toFixed(1)
|
|
991
1054
|
}),
|
|
992
|
-
/* @__PURE__ */
|
|
1055
|
+
/* @__PURE__ */ f("div", {
|
|
993
1056
|
className: "my-2 flex justify-center gap-0.5",
|
|
994
1057
|
children: [
|
|
995
1058
|
1,
|
|
@@ -997,21 +1060,21 @@ var Ee = (e, t) => ({
|
|
|
997
1060
|
3,
|
|
998
1061
|
4,
|
|
999
1062
|
5
|
|
1000
|
-
].map((e) => /* @__PURE__ */
|
|
1063
|
+
].map((e) => /* @__PURE__ */ f(l, { className: `size-4 ${e <= Math.round(K.rating || 0) ? "fill-current text-status-warning-text" : "text-text-muted"}` }, e))
|
|
1001
1064
|
}),
|
|
1002
|
-
/* @__PURE__ */
|
|
1065
|
+
/* @__PURE__ */ p("p", {
|
|
1003
1066
|
className: "text-sm text-text-muted",
|
|
1004
|
-
children: [n(
|
|
1067
|
+
children: [n(bt || K.reviewCount), " reviews"]
|
|
1005
1068
|
})
|
|
1006
1069
|
]
|
|
1007
|
-
}),
|
|
1070
|
+
}), xt.length > 0 && /* @__PURE__ */ f("div", {
|
|
1008
1071
|
className: "flex-1 space-y-1.5",
|
|
1009
|
-
children:
|
|
1072
|
+
children: xt.map((e) => /* @__PURE__ */ f(Ee, { ...e }, e.stars))
|
|
1010
1073
|
})]
|
|
1011
|
-
}) : /* @__PURE__ */
|
|
1074
|
+
}) : /* @__PURE__ */ p("div", {
|
|
1012
1075
|
className: "flex flex-col items-center justify-center py-6 text-center",
|
|
1013
1076
|
children: [
|
|
1014
|
-
/* @__PURE__ */
|
|
1077
|
+
/* @__PURE__ */ f("div", {
|
|
1015
1078
|
className: "mb-3 flex gap-0.5",
|
|
1016
1079
|
children: [
|
|
1017
1080
|
1,
|
|
@@ -1019,37 +1082,37 @@ var Ee = (e, t) => ({
|
|
|
1019
1082
|
3,
|
|
1020
1083
|
4,
|
|
1021
1084
|
5
|
|
1022
|
-
].map((e) => /* @__PURE__ */
|
|
1085
|
+
].map((e) => /* @__PURE__ */ f(l, { className: "size-5 text-border-default" }, e))
|
|
1023
1086
|
}),
|
|
1024
|
-
/* @__PURE__ */
|
|
1087
|
+
/* @__PURE__ */ f("p", {
|
|
1025
1088
|
className: "font-medium text-text-primary",
|
|
1026
1089
|
children: "No reviews yet"
|
|
1027
1090
|
}),
|
|
1028
|
-
/* @__PURE__ */
|
|
1091
|
+
/* @__PURE__ */ f("p", {
|
|
1029
1092
|
className: "mt-1 text-sm text-text-muted",
|
|
1030
1093
|
children: "Be the first to share your experience with this app."
|
|
1031
1094
|
})
|
|
1032
1095
|
]
|
|
1033
|
-
}), /* @__PURE__ */
|
|
1096
|
+
}), /* @__PURE__ */ p("div", {
|
|
1034
1097
|
className: "mt-6 border-t border-border-seam pt-4",
|
|
1035
|
-
children: [
|
|
1036
|
-
role:
|
|
1037
|
-
className: `mb-3 rounded-lg px-3 py-2 text-sm ${
|
|
1038
|
-
children:
|
|
1039
|
-
}),
|
|
1098
|
+
children: [Qe && /* @__PURE__ */ f("p", {
|
|
1099
|
+
role: $e === "success" ? "status" : "alert",
|
|
1100
|
+
className: `mb-3 rounded-lg px-3 py-2 text-sm ${$e === "success" ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-error-bg-subtle text-status-error-text"}`,
|
|
1101
|
+
children: Qe
|
|
1102
|
+
}), _ || I?.userReview ? /* @__PURE__ */ p("div", {
|
|
1040
1103
|
className: "space-y-4",
|
|
1041
|
-
children: [/* @__PURE__ */
|
|
1104
|
+
children: [/* @__PURE__ */ f("button", {
|
|
1042
1105
|
type: "button",
|
|
1043
|
-
onClick: () =>
|
|
1106
|
+
onClick: () => D ? O(!1) : gt(),
|
|
1044
1107
|
className: "w-full cursor-pointer py-2 text-center text-sm font-medium text-text-primary transition-colors hover:text-text-link",
|
|
1045
|
-
children:
|
|
1046
|
-
}),
|
|
1108
|
+
children: I?.userReview ? D ? "Cancel review editing" : "Edit your review" : D ? "Cancel review" : "Write a Review"
|
|
1109
|
+
}), D && /* @__PURE__ */ p("div", {
|
|
1047
1110
|
className: "rounded-xl border border-border-seam bg-bg-sunken p-4",
|
|
1048
1111
|
children: [
|
|
1049
|
-
/* @__PURE__ */
|
|
1112
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
|
|
1050
1113
|
className: "text-sm font-medium text-text-primary",
|
|
1051
1114
|
children: "Your rating"
|
|
1052
|
-
}), /* @__PURE__ */
|
|
1115
|
+
}), /* @__PURE__ */ f("div", {
|
|
1053
1116
|
className: "mt-2 flex flex-wrap gap-2",
|
|
1054
1117
|
children: [
|
|
1055
1118
|
1,
|
|
@@ -1057,29 +1120,29 @@ var Ee = (e, t) => ({
|
|
|
1057
1120
|
3,
|
|
1058
1121
|
4,
|
|
1059
1122
|
5
|
|
1060
|
-
].map((e) => /* @__PURE__ */
|
|
1123
|
+
].map((e) => /* @__PURE__ */ p("button", {
|
|
1061
1124
|
type: "button",
|
|
1062
|
-
onClick: () =>
|
|
1063
|
-
className: `cursor-pointer rounded-full border px-3 py-1.5 text-sm transition-colors ${
|
|
1125
|
+
onClick: () => P(e),
|
|
1126
|
+
className: `cursor-pointer rounded-full border px-3 py-1.5 text-sm transition-colors ${N === 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"}`,
|
|
1064
1127
|
children: [e, " ★"]
|
|
1065
1128
|
}, e))
|
|
1066
1129
|
})] }),
|
|
1067
|
-
/* @__PURE__ */
|
|
1130
|
+
/* @__PURE__ */ p("label", {
|
|
1068
1131
|
className: "mt-4 block text-sm font-medium text-text-primary",
|
|
1069
|
-
children: ["Title", /* @__PURE__ */
|
|
1132
|
+
children: ["Title", /* @__PURE__ */ f("input", {
|
|
1070
1133
|
"aria-label": "Review title",
|
|
1071
|
-
value:
|
|
1072
|
-
onChange: (e) =>
|
|
1134
|
+
value: k,
|
|
1135
|
+
onChange: (e) => A(e.target.value),
|
|
1073
1136
|
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",
|
|
1074
1137
|
placeholder: "Summarize your experience"
|
|
1075
1138
|
})]
|
|
1076
1139
|
}),
|
|
1077
|
-
/* @__PURE__ */
|
|
1140
|
+
/* @__PURE__ */ p("label", {
|
|
1078
1141
|
className: "mt-4 block text-sm font-medium text-text-primary",
|
|
1079
|
-
children: ["Review", /* @__PURE__ */
|
|
1142
|
+
children: ["Review", /* @__PURE__ */ f("textarea", {
|
|
1080
1143
|
"aria-label": "Review body",
|
|
1081
|
-
value:
|
|
1082
|
-
onChange: (e) =>
|
|
1144
|
+
value: j,
|
|
1145
|
+
onChange: (e) => M(e.target.value),
|
|
1083
1146
|
rows: 4,
|
|
1084
1147
|
required: !0,
|
|
1085
1148
|
"aria-required": "true",
|
|
@@ -1087,187 +1150,187 @@ var Ee = (e, t) => ({
|
|
|
1087
1150
|
placeholder: "What worked well? What should improve?"
|
|
1088
1151
|
})]
|
|
1089
1152
|
}),
|
|
1090
|
-
/* @__PURE__ */
|
|
1153
|
+
/* @__PURE__ */ p("div", {
|
|
1091
1154
|
className: "mt-4 flex flex-wrap gap-3",
|
|
1092
|
-
children: [/* @__PURE__ */
|
|
1155
|
+
children: [/* @__PURE__ */ f("button", {
|
|
1093
1156
|
type: "button",
|
|
1094
|
-
onClick:
|
|
1095
|
-
disabled:
|
|
1157
|
+
onClick: _t,
|
|
1158
|
+
disabled: Be || He,
|
|
1096
1159
|
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",
|
|
1097
|
-
children:
|
|
1098
|
-
}),
|
|
1160
|
+
children: Be || He ? "Saving..." : I?.userReview ? "Update Review" : "Submit Review"
|
|
1161
|
+
}), I?.userReview && /* @__PURE__ */ f("button", {
|
|
1099
1162
|
type: "button",
|
|
1100
|
-
onClick:
|
|
1101
|
-
disabled:
|
|
1163
|
+
onClick: vt,
|
|
1164
|
+
disabled: We,
|
|
1102
1165
|
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",
|
|
1103
|
-
children:
|
|
1166
|
+
children: We ? "Removing..." : "Delete Review"
|
|
1104
1167
|
})]
|
|
1105
1168
|
})
|
|
1106
1169
|
]
|
|
1107
1170
|
})]
|
|
1108
|
-
}) : /* @__PURE__ */
|
|
1171
|
+
}) : /* @__PURE__ */ f("p", {
|
|
1109
1172
|
className: "text-center text-sm text-text-muted",
|
|
1110
1173
|
children: "Install this app to leave a review."
|
|
1111
1174
|
})]
|
|
1112
1175
|
})]
|
|
1113
1176
|
}),
|
|
1114
|
-
|
|
1177
|
+
V && V.length > 0 && /* @__PURE__ */ p("div", {
|
|
1115
1178
|
className: "mt-4 space-y-3",
|
|
1116
|
-
children: [/* @__PURE__ */
|
|
1179
|
+
children: [/* @__PURE__ */ f("ul", {
|
|
1117
1180
|
className: "space-y-3",
|
|
1118
|
-
children: (
|
|
1181
|
+
children: (x ? V : V.slice(0, 2)).map((e) => /* @__PURE__ */ f("li", { children: /* @__PURE__ */ f(De, {
|
|
1119
1182
|
review: e,
|
|
1120
|
-
onMarkHelpful:
|
|
1121
|
-
markingHelpful:
|
|
1183
|
+
onMarkHelpful: yt,
|
|
1184
|
+
markingHelpful: Ke && et === e.id
|
|
1122
1185
|
}) }, e.id))
|
|
1123
|
-
}),
|
|
1186
|
+
}), V.length > 2 && /* @__PURE__ */ f("button", {
|
|
1124
1187
|
type: "button",
|
|
1125
|
-
onClick: () =>
|
|
1188
|
+
onClick: () => Je(!x),
|
|
1126
1189
|
className: "cursor-pointer text-sm font-medium text-text-link",
|
|
1127
|
-
children:
|
|
1190
|
+
children: x ? "Show less" : `Show all ${V.length} reviews`
|
|
1128
1191
|
})]
|
|
1129
1192
|
}),
|
|
1130
|
-
(!
|
|
1193
|
+
(!V || V.length === 0) && /* @__PURE__ */ f("p", {
|
|
1131
1194
|
className: "mt-4 text-sm text-text-muted",
|
|
1132
1195
|
children: "No reviews yet. Be the first to review!"
|
|
1133
1196
|
})
|
|
1134
1197
|
]
|
|
1135
1198
|
}),
|
|
1136
|
-
|
|
1199
|
+
J.length > 0 && /* @__PURE__ */ p("section", {
|
|
1137
1200
|
id: "about-permissions",
|
|
1138
1201
|
className: "mb-8 scroll-mt-6",
|
|
1139
|
-
children: [/* @__PURE__ */
|
|
1202
|
+
children: [/* @__PURE__ */ f("h2", {
|
|
1140
1203
|
className: "mb-4 text-lg font-medium text-text-primary",
|
|
1141
1204
|
children: "Required Permissions"
|
|
1142
|
-
}), /* @__PURE__ */
|
|
1205
|
+
}), /* @__PURE__ */ f("div", {
|
|
1143
1206
|
className: "space-y-2",
|
|
1144
|
-
children:
|
|
1207
|
+
children: J.map((e) => /* @__PURE__ */ p("div", {
|
|
1145
1208
|
className: "flex items-center gap-3 rounded-lg bg-bg-surface px-4 py-3",
|
|
1146
|
-
children: [/* @__PURE__ */
|
|
1209
|
+
children: [/* @__PURE__ */ f(c, { className: "size-5 text-status-success-text" }), /* @__PURE__ */ f("span", {
|
|
1147
1210
|
className: "text-sm text-text-primary",
|
|
1148
1211
|
children: e
|
|
1149
1212
|
})]
|
|
1150
1213
|
}, e))
|
|
1151
1214
|
})]
|
|
1152
1215
|
}),
|
|
1153
|
-
|
|
1216
|
+
St.length > 0 && /* @__PURE__ */ p("section", {
|
|
1154
1217
|
className: "mb-8",
|
|
1155
|
-
children: [/* @__PURE__ */
|
|
1218
|
+
children: [/* @__PURE__ */ f("h2", {
|
|
1156
1219
|
className: "mb-4 text-lg font-medium text-text-primary",
|
|
1157
1220
|
children: "Integrations"
|
|
1158
|
-
}), /* @__PURE__ */
|
|
1221
|
+
}), /* @__PURE__ */ f("div", {
|
|
1159
1222
|
className: "flex flex-wrap gap-2",
|
|
1160
|
-
children:
|
|
1223
|
+
children: St.map((e) => /* @__PURE__ */ f("span", {
|
|
1161
1224
|
className: "rounded-lg bg-bg-surface px-4 py-2 text-sm font-medium text-text-primary",
|
|
1162
1225
|
children: e
|
|
1163
1226
|
}, e))
|
|
1164
1227
|
})]
|
|
1165
1228
|
}),
|
|
1166
|
-
/* @__PURE__ */
|
|
1229
|
+
/* @__PURE__ */ p("section", {
|
|
1167
1230
|
className: "mb-8",
|
|
1168
|
-
children: [/* @__PURE__ */
|
|
1231
|
+
children: [/* @__PURE__ */ f("h2", {
|
|
1169
1232
|
className: "mb-4 text-lg font-medium text-text-primary",
|
|
1170
1233
|
children: "Additional Information"
|
|
1171
|
-
}), /* @__PURE__ */
|
|
1234
|
+
}), /* @__PURE__ */ p(m, {
|
|
1172
1235
|
treatment: "metric",
|
|
1173
1236
|
className: "grid grid-cols-2 gap-6 p-5 md:grid-cols-3",
|
|
1174
1237
|
children: [
|
|
1175
|
-
|
|
1238
|
+
K.manifestVersion && /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
|
|
1176
1239
|
className: "text-xs text-text-muted",
|
|
1177
1240
|
children: "Version"
|
|
1178
|
-
}), /* @__PURE__ */
|
|
1241
|
+
}), /* @__PURE__ */ f("p", {
|
|
1179
1242
|
className: "mt-1 text-sm font-medium text-text-primary",
|
|
1180
|
-
children:
|
|
1243
|
+
children: K.manifestVersion
|
|
1181
1244
|
})] }),
|
|
1182
|
-
/* @__PURE__ */
|
|
1245
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
|
|
1183
1246
|
className: "text-xs text-text-muted",
|
|
1184
1247
|
children: "Type"
|
|
1185
|
-
}), /* @__PURE__ */
|
|
1248
|
+
}), /* @__PURE__ */ f("p", {
|
|
1186
1249
|
className: "mt-1 text-sm font-medium text-text-primary",
|
|
1187
|
-
children:
|
|
1250
|
+
children: K.type
|
|
1188
1251
|
})] }),
|
|
1189
|
-
|
|
1252
|
+
K.publishedAt && /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
|
|
1190
1253
|
className: "text-xs text-text-muted",
|
|
1191
1254
|
children: "Published"
|
|
1192
|
-
}), /* @__PURE__ */
|
|
1255
|
+
}), /* @__PURE__ */ f("p", {
|
|
1193
1256
|
className: "mt-1 text-sm font-medium text-text-primary",
|
|
1194
|
-
children: new Date(
|
|
1257
|
+
children: new Date(K.publishedAt).toLocaleDateString()
|
|
1195
1258
|
})] }),
|
|
1196
|
-
/* @__PURE__ */
|
|
1259
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
|
|
1197
1260
|
className: "text-xs text-text-muted",
|
|
1198
1261
|
children: "Updated"
|
|
1199
|
-
}), /* @__PURE__ */
|
|
1262
|
+
}), /* @__PURE__ */ f("p", {
|
|
1200
1263
|
className: "mt-1 text-sm font-medium text-text-primary",
|
|
1201
|
-
children: new Date(
|
|
1264
|
+
children: new Date(K.updatedAt).toLocaleDateString()
|
|
1202
1265
|
})] }),
|
|
1203
|
-
|
|
1266
|
+
K.license && /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
|
|
1204
1267
|
className: "text-xs text-text-muted",
|
|
1205
1268
|
children: "License"
|
|
1206
|
-
}), /* @__PURE__ */
|
|
1269
|
+
}), /* @__PURE__ */ f("p", {
|
|
1207
1270
|
className: "mt-1 text-sm font-medium text-text-primary",
|
|
1208
|
-
children:
|
|
1271
|
+
children: K.license
|
|
1209
1272
|
})] }),
|
|
1210
|
-
|
|
1273
|
+
K.minPlatformVersion && /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
|
|
1211
1274
|
className: "text-xs text-text-muted",
|
|
1212
1275
|
children: "Min Platform Version"
|
|
1213
|
-
}), /* @__PURE__ */
|
|
1276
|
+
}), /* @__PURE__ */ f("p", {
|
|
1214
1277
|
className: "mt-1 text-sm font-medium text-text-primary",
|
|
1215
|
-
children:
|
|
1278
|
+
children: K.minPlatformVersion
|
|
1216
1279
|
})] })
|
|
1217
1280
|
]
|
|
1218
1281
|
})]
|
|
1219
1282
|
})
|
|
1220
1283
|
]
|
|
1221
|
-
}), /* @__PURE__ */
|
|
1284
|
+
}), /* @__PURE__ */ p("div", {
|
|
1222
1285
|
className: "w-full lg:w-80",
|
|
1223
1286
|
children: [
|
|
1224
|
-
(
|
|
1287
|
+
(K.documentationUrl || K.repositoryUrl || R?.email) && /* @__PURE__ */ p(m, {
|
|
1225
1288
|
className: "mb-6 p-4",
|
|
1226
|
-
children: [/* @__PURE__ */
|
|
1289
|
+
children: [/* @__PURE__ */ f("h3", {
|
|
1227
1290
|
className: "font-medium text-text-primary",
|
|
1228
1291
|
children: "App support"
|
|
1229
|
-
}), /* @__PURE__ */
|
|
1292
|
+
}), /* @__PURE__ */ p("div", {
|
|
1230
1293
|
className: "mt-3 space-y-2 text-sm",
|
|
1231
1294
|
children: [
|
|
1232
|
-
|
|
1233
|
-
href:
|
|
1295
|
+
K.documentationUrl && /* @__PURE__ */ f("a", {
|
|
1296
|
+
href: K.documentationUrl,
|
|
1234
1297
|
target: "_blank",
|
|
1235
1298
|
rel: "noreferrer",
|
|
1236
1299
|
className: "block text-text-link hover:underline",
|
|
1237
1300
|
children: "Documentation"
|
|
1238
1301
|
}),
|
|
1239
|
-
|
|
1240
|
-
href:
|
|
1302
|
+
K.repositoryUrl && /* @__PURE__ */ f("a", {
|
|
1303
|
+
href: K.repositoryUrl,
|
|
1241
1304
|
target: "_blank",
|
|
1242
1305
|
rel: "noreferrer",
|
|
1243
1306
|
className: "block text-text-link hover:underline",
|
|
1244
1307
|
children: "Source repository"
|
|
1245
1308
|
}),
|
|
1246
|
-
|
|
1247
|
-
href: `mailto:${
|
|
1309
|
+
R?.email && /* @__PURE__ */ f("a", {
|
|
1310
|
+
href: `mailto:${R.email}`,
|
|
1248
1311
|
className: "block text-text-link hover:underline",
|
|
1249
1312
|
children: "Contact publisher"
|
|
1250
1313
|
})
|
|
1251
1314
|
]
|
|
1252
1315
|
})]
|
|
1253
1316
|
}),
|
|
1254
|
-
|
|
1317
|
+
R && /* @__PURE__ */ p(m, {
|
|
1255
1318
|
className: "mb-6 p-4",
|
|
1256
1319
|
children: [
|
|
1257
|
-
/* @__PURE__ */
|
|
1320
|
+
/* @__PURE__ */ f("h3", {
|
|
1258
1321
|
className: "font-medium text-text-primary",
|
|
1259
1322
|
children: "Publisher"
|
|
1260
1323
|
}),
|
|
1261
|
-
/* @__PURE__ */
|
|
1324
|
+
/* @__PURE__ */ f("p", {
|
|
1262
1325
|
className: "mt-2 text-sm text-text-primary",
|
|
1263
|
-
children:
|
|
1326
|
+
children: R.name
|
|
1264
1327
|
}),
|
|
1265
|
-
|
|
1328
|
+
R.bio && /* @__PURE__ */ f("p", {
|
|
1266
1329
|
className: "mt-2 text-sm text-text-muted",
|
|
1267
|
-
children:
|
|
1330
|
+
children: R.bio
|
|
1268
1331
|
}),
|
|
1269
|
-
|
|
1270
|
-
href:
|
|
1332
|
+
R.websiteUrl && /* @__PURE__ */ f("a", {
|
|
1333
|
+
href: R.websiteUrl,
|
|
1271
1334
|
target: "_blank",
|
|
1272
1335
|
rel: "noreferrer",
|
|
1273
1336
|
className: "mt-3 inline-block text-sm text-text-link hover:underline",
|
|
@@ -1275,42 +1338,42 @@ var Ee = (e, t) => ({
|
|
|
1275
1338
|
})
|
|
1276
1339
|
]
|
|
1277
1340
|
}),
|
|
1278
|
-
|
|
1341
|
+
H && H.length > 0 && /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("div", {
|
|
1279
1342
|
className: "mb-4 flex items-center justify-between text-left",
|
|
1280
|
-
children: /* @__PURE__ */
|
|
1343
|
+
children: /* @__PURE__ */ f("span", {
|
|
1281
1344
|
className: "font-medium text-text-primary",
|
|
1282
1345
|
children: "Similar apps"
|
|
1283
1346
|
})
|
|
1284
|
-
}), /* @__PURE__ */
|
|
1347
|
+
}), /* @__PURE__ */ f("div", {
|
|
1285
1348
|
className: "space-y-3",
|
|
1286
|
-
children:
|
|
1349
|
+
children: H.slice(0, 4).map((e) => /* @__PURE__ */ p("button", {
|
|
1287
1350
|
type: "button",
|
|
1288
|
-
onClick: () => u(`${
|
|
1351
|
+
onClick: () => u(`${h}/marketplace/product/${e.id}`),
|
|
1289
1352
|
className: "flex w-full cursor-pointer items-center gap-3 rounded-lg p-2 text-left transition-colors hover:bg-bg-sunken",
|
|
1290
|
-
children: [e.icon ? /* @__PURE__ */
|
|
1353
|
+
children: [e.icon ? /* @__PURE__ */ f("img", {
|
|
1291
1354
|
src: e.icon,
|
|
1292
1355
|
alt: e.name,
|
|
1293
1356
|
className: "size-12 rounded-xl object-cover"
|
|
1294
|
-
}) : /* @__PURE__ */
|
|
1357
|
+
}) : /* @__PURE__ */ f("div", {
|
|
1295
1358
|
className: "flex size-12 items-center justify-center rounded-xl bg-bg-sunken text-lg font-bold text-text-muted",
|
|
1296
1359
|
children: e.name.charAt(0)
|
|
1297
|
-
}), /* @__PURE__ */
|
|
1360
|
+
}), /* @__PURE__ */ p("div", {
|
|
1298
1361
|
className: "flex-1 overflow-hidden",
|
|
1299
1362
|
children: [
|
|
1300
|
-
/* @__PURE__ */
|
|
1363
|
+
/* @__PURE__ */ f("p", {
|
|
1301
1364
|
className: "truncate text-sm font-medium text-text-primary",
|
|
1302
1365
|
children: e.name
|
|
1303
1366
|
}),
|
|
1304
|
-
/* @__PURE__ */
|
|
1367
|
+
/* @__PURE__ */ f("p", {
|
|
1305
1368
|
className: "text-xs text-text-muted",
|
|
1306
|
-
children:
|
|
1369
|
+
children: R?.name || "Unknown"
|
|
1307
1370
|
}),
|
|
1308
|
-
(e.reviewCount ?? 0) > 0 && /* @__PURE__ */
|
|
1371
|
+
(e.reviewCount ?? 0) > 0 && /* @__PURE__ */ p("div", {
|
|
1309
1372
|
className: "flex items-center gap-1",
|
|
1310
|
-
children: [/* @__PURE__ */
|
|
1373
|
+
children: [/* @__PURE__ */ f("span", {
|
|
1311
1374
|
className: "text-xs text-text-muted",
|
|
1312
1375
|
children: (e.rating || 0).toFixed(1)
|
|
1313
|
-
}), /* @__PURE__ */
|
|
1376
|
+
}), /* @__PURE__ */ f(l, { className: "size-3 fill-current text-status-warning-text" })]
|
|
1314
1377
|
})
|
|
1315
1378
|
]
|
|
1316
1379
|
})]
|
|
@@ -1321,27 +1384,27 @@ var Ee = (e, t) => ({
|
|
|
1321
1384
|
})
|
|
1322
1385
|
]
|
|
1323
1386
|
}),
|
|
1324
|
-
|
|
1325
|
-
isOpen:
|
|
1326
|
-
onClose: () =>
|
|
1387
|
+
K && /* @__PURE__ */ f(ae, {
|
|
1388
|
+
isOpen: nt,
|
|
1389
|
+
onClose: () => rt(!1),
|
|
1327
1390
|
app: {
|
|
1328
|
-
id:
|
|
1329
|
-
applicationId:
|
|
1330
|
-
name:
|
|
1331
|
-
slug:
|
|
1332
|
-
icon:
|
|
1333
|
-
type:
|
|
1334
|
-
version:
|
|
1335
|
-
permissions:
|
|
1391
|
+
id: K.id,
|
|
1392
|
+
applicationId: K.productId,
|
|
1393
|
+
name: K.name,
|
|
1394
|
+
slug: K.slug,
|
|
1395
|
+
icon: K.icon,
|
|
1396
|
+
type: K.type,
|
|
1397
|
+
version: K.manifestVersion,
|
|
1398
|
+
permissions: J.length > 0 ? J : void 0
|
|
1336
1399
|
},
|
|
1337
|
-
purchaseState:
|
|
1338
|
-
onInstallSuccess:
|
|
1339
|
-
onInstallError:
|
|
1400
|
+
purchaseState: W && !Y ? "purchased" : "free",
|
|
1401
|
+
onInstallSuccess: mt,
|
|
1402
|
+
onInstallError: ht
|
|
1340
1403
|
})
|
|
1341
1404
|
]
|
|
1342
1405
|
});
|
|
1343
1406
|
};
|
|
1344
1407
|
//#endregion
|
|
1345
|
-
export {
|
|
1408
|
+
export { Ae as ProductDetailPage };
|
|
1346
1409
|
|
|
1347
1410
|
//# sourceMappingURL=ProductDetailPage.js.map
|