@burdenoff/microfe-headshotmarketing 2026.801.3 → 2026.829.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/generated/wspace-operations.d.ts +44 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -1
- package/dist/generated/wspace-operations.js +30 -4
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/headshotmarketing/HeadshotMarketingRoot.d.ts.map +1 -1
- package/dist/headshotmarketing/HeadshotMarketingRoot.js +43 -49
- package/dist/headshotmarketing/HeadshotMarketingRoot.js.map +1 -1
- package/dist/headshotmarketing/components/DataTable.d.ts.map +1 -1
- package/dist/headshotmarketing/components/DataTable.js +87 -79
- package/dist/headshotmarketing/components/DataTable.js.map +1 -1
- package/dist/headshotmarketing/components/InfluencerModals.d.ts.map +1 -1
- package/dist/headshotmarketing/components/InfluencerModals.js +201 -214
- package/dist/headshotmarketing/components/InfluencerModals.js.map +1 -1
- package/dist/headshotmarketing/components/Pagination.js +23 -23
- package/dist/headshotmarketing/components/QueryStateBoundary.js +12 -12
- package/dist/headshotmarketing/components/StatusBadge.d.ts.map +1 -1
- package/dist/headshotmarketing/components/StatusBadge.js +2 -0
- package/dist/headshotmarketing/components/StatusBadge.js.map +1 -1
- package/dist/headshotmarketing/hooks/index.d.ts +1 -0
- package/dist/headshotmarketing/hooks/index.d.ts.map +1 -1
- package/dist/headshotmarketing/hooks/index.js +1 -0
- package/dist/headshotmarketing/pages/HomePage.js +164 -164
- package/dist/headshotmarketing/pages/HomePage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdCreativesPage.js +59 -29
- package/dist/headshotmarketing/pages/ads/AdCreativesPage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdsPage.js +57 -57
- package/dist/headshotmarketing/pages/analytics/AnalyticsPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/analytics/AnalyticsPage.js +389 -215
- package/dist/headshotmarketing/pages/analytics/AnalyticsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js +5 -5
- package/dist/headshotmarketing/pages/content/AIExecutionLedger.d.ts +26 -0
- package/dist/headshotmarketing/pages/content/AIExecutionLedger.d.ts.map +1 -0
- package/dist/headshotmarketing/pages/content/AIExecutionLedger.js +215 -0
- package/dist/headshotmarketing/pages/content/AIExecutionLedger.js.map +1 -0
- package/dist/headshotmarketing/pages/content/AIToolsPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/content/AIToolsPage.js +396 -379
- package/dist/headshotmarketing/pages/content/AIToolsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/AssetLibraryPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/content/AssetLibraryPage.js +436 -343
- package/dist/headshotmarketing/pages/content/AssetLibraryPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentAnalyticsPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentAnalyticsPage.js +233 -223
- package/dist/headshotmarketing/pages/content/ContentAnalyticsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentPage.js +4 -4
- package/dist/headshotmarketing/pages/crm/ContactsPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/crm/ContactsPage.js +339 -278
- package/dist/headshotmarketing/pages/crm/ContactsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/CrmPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/crm/CrmPage.js +118 -112
- package/dist/headshotmarketing/pages/crm/CrmPage.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/CrmSubNav.d.ts +14 -0
- package/dist/headshotmarketing/pages/crm/CrmSubNav.d.ts.map +1 -0
- package/dist/headshotmarketing/pages/crm/CrmSubNav.js +51 -0
- package/dist/headshotmarketing/pages/crm/CrmSubNav.js.map +1 -0
- package/dist/headshotmarketing/pages/crm/LeadsPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/crm/LeadsPage.js +122 -116
- package/dist/headshotmarketing/pages/crm/LeadsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/PipelinePage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/crm/PipelinePage.js +192 -183
- package/dist/headshotmarketing/pages/crm/PipelinePage.js.map +1 -1
- package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js +184 -162
- package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js.map +1 -1
- package/dist/headshotmarketing/pages/influencers/InfluencersPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/influencers/InfluencersPage.js +8 -14
- package/dist/headshotmarketing/pages/influencers/InfluencersPage.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js +115 -115
- package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js.map +1 -1
- package/dist/headshotmarketing/types/index.d.ts +9 -4
- package/dist/headshotmarketing/types/index.d.ts.map +1 -1
- package/dist/headshotmarketing/utils/contentMapper.js +1 -1
- package/dist/headshotmarketing/utils/contentMapper.js.map +1 -1
- package/dist/headshotmarketing/utils/influencerMapper.d.ts +16 -2
- package/dist/headshotmarketing/utils/influencerMapper.d.ts.map +1 -1
- package/dist/headshotmarketing/utils/influencerMapper.js +56 -40
- package/dist/headshotmarketing/utils/influencerMapper.js.map +1 -1
- package/dist/shared/hooks/useTr.d.ts +17 -0
- package/dist/shared/hooks/useTr.d.ts.map +1 -0
- package/dist/shared/hooks/useTr.js +14 -0
- package/dist/shared/hooks/useTr.js.map +1 -0
- package/package.json +2 -2
|
@@ -1,37 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { useHeadshotmarketingAssetFoldersQuery as e } from "../../../generated/wspace-operations.js";
|
|
2
|
+
import { useHeadshotMarketing as t } from "../../context/HeadshotMarketingContext.js";
|
|
3
|
+
import { cn as n, formatNumber as r } from "../../utils/helpers.js";
|
|
4
|
+
import { PageLayout as i } from "../../components/PageLayout.js";
|
|
5
|
+
import { DataTable as ee } from "../../components/DataTable.js";
|
|
6
|
+
import { EmptyState as te } from "../../components/EmptyState.js";
|
|
7
|
+
import { FilterBar as ne } from "../../components/FilterBar.js";
|
|
8
|
+
import { QueryStateBoundary as re } from "../../components/QueryStateBoundary.js";
|
|
9
|
+
import { Pagination as ie } from "../../components/Pagination.js";
|
|
8
10
|
import { AssetUploadButton as a } from "../../components/AssetUploadButton.js";
|
|
9
11
|
import { ActionMenu as o } from "../../components/ActionMenu.js";
|
|
10
12
|
import "../../components/index.js";
|
|
11
|
-
import { useHeadshotmarketingBootstrap as
|
|
12
|
-
import { usePagination as
|
|
13
|
-
import {
|
|
13
|
+
import { useHeadshotmarketingBootstrap as ae } from "../../hooks/useHeadshotmarketingBootstrap.js";
|
|
14
|
+
import { usePagination as oe } from "../../hooks/usePagination.js";
|
|
15
|
+
import { ContentSubNav as se } from "./ContentSubNav.js";
|
|
16
|
+
import { toAssetModel as ce } from "../../utils/contentMapper.js";
|
|
14
17
|
import { AssetThumbnail as s } from "./AssetThumbnail.js";
|
|
15
18
|
import { useEffect as c, useMemo as l, useState as u } from "react";
|
|
16
|
-
import { ArrowUpDown as
|
|
17
|
-
import { useCopyToClipboard as
|
|
18
|
-
import { gql as
|
|
19
|
-
import { useMutation as
|
|
20
|
-
import { jsx as
|
|
21
|
-
import { Badge as
|
|
19
|
+
import { ArrowUpDown as le, Copy as d, Download as f, Files as p, FolderOpen as m, HardDrive as ue, Image as de, LayoutGrid as fe, List as pe, Trash2 as h, Video as me, X as he } from "lucide-react";
|
|
20
|
+
import { useCopyToClipboard as ge } from "@burdenoff/fe-libs/shared/hooks";
|
|
21
|
+
import { gql as g } from "@apollo/client";
|
|
22
|
+
import { useMutation as _e } from "@apollo/client/react";
|
|
23
|
+
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
24
|
+
import { Badge as y, EmphasisPanel as ve, PagePurpose as ye } from "@burdenoff/fe-libs/ui";
|
|
22
25
|
//#region src/headshotmarketing/pages/content/AssetLibraryPage.tsx
|
|
23
|
-
var
|
|
26
|
+
var be = g`
|
|
24
27
|
mutation HeadshotmarketingDeleteCanonicalFileAsset($id: ID!) {
|
|
25
28
|
headshotmarketingDeleteFileMarketingMeta(fileId: $id)
|
|
26
29
|
deleteFile(id: $id)
|
|
27
30
|
}
|
|
28
|
-
`,
|
|
31
|
+
`, b = "__all__", x = "__unfiled__", S = {
|
|
29
32
|
image: "success",
|
|
30
33
|
video: "info",
|
|
31
34
|
document: "warning",
|
|
32
35
|
audio: "info",
|
|
33
36
|
font: "secondary"
|
|
34
|
-
},
|
|
37
|
+
}, xe = [
|
|
35
38
|
{
|
|
36
39
|
value: "all",
|
|
37
40
|
label: "All types"
|
|
@@ -56,7 +59,7 @@ var v = m`
|
|
|
56
59
|
value: "font",
|
|
57
60
|
label: "Fonts"
|
|
58
61
|
}
|
|
59
|
-
],
|
|
62
|
+
], Se = [
|
|
60
63
|
{
|
|
61
64
|
value: "newest",
|
|
62
65
|
label: "Newest first"
|
|
@@ -70,97 +73,126 @@ var v = m`
|
|
|
70
73
|
label: "Largest first"
|
|
71
74
|
}
|
|
72
75
|
];
|
|
73
|
-
function
|
|
76
|
+
function C(e) {
|
|
74
77
|
let t = e.name.includes(".") && !e.name.endsWith(".") ? e.name.split(".").pop() ?? "" : "";
|
|
75
78
|
if (t && t.length <= 5 && /^[a-z0-9]+$/i.test(t)) return t.toUpperCase();
|
|
76
79
|
let n = e.mimeType.split("/")[1]?.split(";")[0];
|
|
77
80
|
return n ? n.toUpperCase().slice(0, 5) : e.type.toUpperCase();
|
|
78
81
|
}
|
|
79
|
-
function
|
|
82
|
+
function w(e) {
|
|
80
83
|
return e >= 1048576 ? `${(e / 1048576).toFixed(1)} MB` : e >= 1024 ? `${(e / 1024).toFixed(0)} KB` : `${e} B`;
|
|
81
84
|
}
|
|
82
|
-
function
|
|
85
|
+
function T(e, t) {
|
|
83
86
|
let n = document.createElement("a");
|
|
84
87
|
n.href = e, n.download = t, n.target = "_blank", n.rel = "noopener", document.body.appendChild(n), n.click(), n.remove();
|
|
85
88
|
}
|
|
86
|
-
var
|
|
87
|
-
let { data:
|
|
88
|
-
let e =
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
var E = () => {
|
|
90
|
+
let { data: g, loading: E, error: Ce, refetch: D } = ae(), { navigate: we, basePath: Te } = t(), { copy: O } = ge(), [k] = _e(be), { data: A } = e({ errorPolicy: "all" }), [j, Ee] = u(""), [M, De] = u("all"), [N, P] = u(b), [F, Oe] = u("newest"), [I, L] = u("grid"), [R, z] = u(/* @__PURE__ */ new Set()), [ke, B] = u(null), [V, H] = u(!1), { page: Ae, pageSize: U, offset: W, limit: G, setPage: K, setPageSize: je, setTotal: q } = oe({ initialPageSize: 12 }), J = l(() => (g?.headshotmarketingAssets.items ?? []).map((e) => ce(e)), [g?.headshotmarketingAssets.items]), Y = l(() => {
|
|
91
|
+
let e = /* @__PURE__ */ new Map();
|
|
92
|
+
for (let t of A?.getFolders?.folders ?? []) e.set(t.id, t.name);
|
|
93
|
+
return e;
|
|
94
|
+
}, [A?.getFolders?.folders]), X = l(() => {
|
|
95
|
+
let e = /* @__PURE__ */ new Map(), t = 0;
|
|
96
|
+
for (let n of J) n.folderId === null ? t += 1 : e.set(n.folderId, (e.get(n.folderId) ?? 0) + 1);
|
|
97
|
+
let n = [];
|
|
98
|
+
for (let [t, r] of e) {
|
|
99
|
+
let e = Y.get(t);
|
|
100
|
+
e && n.push({
|
|
101
|
+
id: t,
|
|
102
|
+
name: e,
|
|
103
|
+
count: r
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
return n.sort((e, t) => e.name.localeCompare(t.name)), t > 0 && n.length > 0 && n.push({
|
|
107
|
+
id: x,
|
|
108
|
+
name: "Unfiled",
|
|
109
|
+
count: t
|
|
110
|
+
}), n;
|
|
111
|
+
}, [J, Y]), Z = l(() => {
|
|
112
|
+
let e = j.trim().toLowerCase();
|
|
113
|
+
return J.filter((t) => {
|
|
114
|
+
let n = !e || t.name.toLowerCase().includes(e) || t.tags.some((t) => t.toLowerCase().includes(e)), r = M === "all" || t.type === M, i = N === b || (N === x ? t.folderId === null : t.folderId === N);
|
|
115
|
+
return n && r && i;
|
|
92
116
|
});
|
|
93
117
|
}, [
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
118
|
+
J,
|
|
119
|
+
j,
|
|
120
|
+
M,
|
|
121
|
+
N
|
|
122
|
+
]), Q = l(() => {
|
|
123
|
+
let e = [...Z];
|
|
124
|
+
switch (F) {
|
|
100
125
|
case "name": return e.sort((e, t) => e.name.localeCompare(t.name));
|
|
101
126
|
case "size": return e.sort((e, t) => t.size - e.size);
|
|
102
127
|
default: return e.sort((e, t) => new Date(t.createdAt).getTime() - new Date(e.createdAt).getTime());
|
|
103
128
|
}
|
|
104
|
-
}, [
|
|
129
|
+
}, [Z, F]);
|
|
105
130
|
c(() => {
|
|
106
|
-
|
|
107
|
-
}, [
|
|
108
|
-
|
|
131
|
+
q(Q.length);
|
|
132
|
+
}, [Q.length, q]), c(() => {
|
|
133
|
+
K(1);
|
|
134
|
+
}, [
|
|
135
|
+
j,
|
|
136
|
+
M,
|
|
137
|
+
N,
|
|
138
|
+
F,
|
|
139
|
+
K
|
|
140
|
+
]), c(() => {
|
|
141
|
+
z(/* @__PURE__ */ new Set());
|
|
109
142
|
}, [
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
U
|
|
143
|
+
j,
|
|
144
|
+
M,
|
|
145
|
+
N
|
|
114
146
|
]), c(() => {
|
|
115
|
-
|
|
116
|
-
}, [
|
|
117
|
-
let
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
]),
|
|
122
|
-
|
|
147
|
+
N !== b && !X.some((e) => e.id === N) && P(b);
|
|
148
|
+
}, [X, N]);
|
|
149
|
+
let Me = l(() => Q.slice(W, W + G), [
|
|
150
|
+
Q,
|
|
151
|
+
W,
|
|
152
|
+
G
|
|
153
|
+
]), Ne = l(() => J.reduce((e, t) => e + t.size, 0), [J]), Pe = l(() => J.filter((e) => e.type === "image").length, [J]), Fe = l(() => J.filter((e) => e.type === "video").length, [J]), Ie = l(() => Q.filter((e) => R.has(e.id)), [Q, R]), Le = Q.length > 0 && Q.every((e) => R.has(e.id)), Re = (e) => {
|
|
154
|
+
z((t) => {
|
|
123
155
|
let n = new Set(t);
|
|
124
156
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
125
157
|
});
|
|
126
|
-
},
|
|
127
|
-
|
|
128
|
-
},
|
|
129
|
-
if (
|
|
130
|
-
await
|
|
158
|
+
}, ze = () => {
|
|
159
|
+
z((e) => e.size === Q.length && Q.length > 0 ? /* @__PURE__ */ new Set() : new Set(Q.map((e) => e.id)));
|
|
160
|
+
}, Be = () => z(/* @__PURE__ */ new Set()), Ve = async (e) => {
|
|
161
|
+
if (B(null), window.confirm(`Delete "${e.name}"? This action can't be undone.`)) try {
|
|
162
|
+
await k({ variables: { id: e.id } }), z((t) => {
|
|
131
163
|
if (!t.has(e.id)) return t;
|
|
132
164
|
let n = new Set(t);
|
|
133
165
|
return n.delete(e.id), n;
|
|
134
|
-
}), await
|
|
166
|
+
}), await D();
|
|
135
167
|
} catch (e) {
|
|
136
|
-
|
|
168
|
+
B(e instanceof Error ? e.message : "Failed to delete the asset.");
|
|
137
169
|
}
|
|
138
|
-
},
|
|
139
|
-
|
|
140
|
-
window.setTimeout(() =>
|
|
170
|
+
}, He = () => {
|
|
171
|
+
Ie.forEach((e, t) => {
|
|
172
|
+
window.setTimeout(() => T(e.url, e.name), t * 150);
|
|
141
173
|
});
|
|
142
|
-
},
|
|
143
|
-
let e =
|
|
174
|
+
}, Ue = async () => {
|
|
175
|
+
let e = Ie.map((e) => e.id);
|
|
144
176
|
if (e.length !== 0 && window.confirm(`Delete ${e.length} asset${e.length > 1 ? "s" : ""}? This action can't be undone.`)) {
|
|
145
|
-
|
|
177
|
+
B(null), H(!0);
|
|
146
178
|
try {
|
|
147
|
-
let t = (await Promise.allSettled(e.map((e) =>
|
|
148
|
-
await
|
|
179
|
+
let t = (await Promise.allSettled(e.map((e) => k({ variables: { id: e } })))).filter((e) => e.status === "rejected").length;
|
|
180
|
+
await D(), Be(), t > 0 && B(`Deleted ${e.length - t} of ${e.length}; ${t} could not be removed.`);
|
|
149
181
|
} catch (e) {
|
|
150
|
-
|
|
182
|
+
B(e instanceof Error ? e.message : "Bulk delete failed.");
|
|
151
183
|
} finally {
|
|
152
|
-
|
|
184
|
+
H(!1);
|
|
153
185
|
}
|
|
154
186
|
}
|
|
155
|
-
},
|
|
187
|
+
}, We = [
|
|
156
188
|
{
|
|
157
189
|
key: "select",
|
|
158
190
|
header: "",
|
|
159
191
|
className: "w-10",
|
|
160
|
-
render: (e) => /* @__PURE__ */
|
|
192
|
+
render: (e) => /* @__PURE__ */ _("input", {
|
|
161
193
|
type: "checkbox",
|
|
162
|
-
checked:
|
|
163
|
-
onChange: () =>
|
|
194
|
+
checked: R.has(e.id),
|
|
195
|
+
onChange: () => Re(e.id),
|
|
164
196
|
onClick: (e) => e.stopPropagation(),
|
|
165
197
|
"aria-label": `Select ${e.name}`,
|
|
166
198
|
className: "h-4 w-4 cursor-pointer accent-[var(--color-action-primary-bg)]"
|
|
@@ -170,9 +202,9 @@ var C = () => {
|
|
|
170
202
|
key: "preview",
|
|
171
203
|
header: "",
|
|
172
204
|
className: "w-16",
|
|
173
|
-
render: (e) => /* @__PURE__ */
|
|
205
|
+
render: (e) => /* @__PURE__ */ _("div", {
|
|
174
206
|
className: "h-9 w-12 overflow-hidden rounded-md border border-border-subtle",
|
|
175
|
-
children: /* @__PURE__ */
|
|
207
|
+
children: /* @__PURE__ */ _(s, {
|
|
176
208
|
asset: e,
|
|
177
209
|
iconSize: "h-4 w-4",
|
|
178
210
|
playBadgeSize: "h-6 w-6"
|
|
@@ -183,7 +215,7 @@ var C = () => {
|
|
|
183
215
|
key: "name",
|
|
184
216
|
header: "Name",
|
|
185
217
|
sortable: !0,
|
|
186
|
-
render: (e) => /* @__PURE__ */
|
|
218
|
+
render: (e) => /* @__PURE__ */ _("span", {
|
|
187
219
|
className: "font-medium text-text-primary",
|
|
188
220
|
children: e.name
|
|
189
221
|
})
|
|
@@ -191,337 +223,398 @@ var C = () => {
|
|
|
191
223
|
{
|
|
192
224
|
key: "type",
|
|
193
225
|
header: "Type",
|
|
194
|
-
render: (e) => /* @__PURE__ */
|
|
195
|
-
variant:
|
|
196
|
-
children:
|
|
226
|
+
render: (e) => /* @__PURE__ */ _(y, {
|
|
227
|
+
variant: S[e.type],
|
|
228
|
+
children: C(e)
|
|
197
229
|
})
|
|
198
230
|
},
|
|
199
231
|
{
|
|
200
232
|
key: "size",
|
|
201
233
|
header: "Size",
|
|
202
234
|
sortable: !0,
|
|
203
|
-
render: (e) => /* @__PURE__ */
|
|
235
|
+
render: (e) => /* @__PURE__ */ _("span", {
|
|
204
236
|
className: "text-text-secondary",
|
|
205
|
-
children:
|
|
237
|
+
children: w(e.size)
|
|
206
238
|
})
|
|
207
239
|
},
|
|
208
240
|
{
|
|
209
241
|
key: "dimensions",
|
|
210
242
|
header: "Dimensions",
|
|
211
|
-
render: (e) => /* @__PURE__ */
|
|
243
|
+
render: (e) => /* @__PURE__ */ _("span", {
|
|
212
244
|
className: "text-text-secondary",
|
|
213
245
|
children: e.dimensions ? `${e.dimensions.width}×${e.dimensions.height}` : "—"
|
|
214
246
|
})
|
|
215
247
|
},
|
|
248
|
+
{
|
|
249
|
+
key: "folderId",
|
|
250
|
+
header: "Folder",
|
|
251
|
+
render: (e) => /* @__PURE__ */ _("span", {
|
|
252
|
+
className: "text-text-secondary",
|
|
253
|
+
children: e.folderId === null ? "Unfiled" : Y.get(e.folderId) ?? "Unnamed folder"
|
|
254
|
+
})
|
|
255
|
+
},
|
|
216
256
|
{
|
|
217
257
|
key: "actions",
|
|
218
258
|
header: "",
|
|
219
259
|
className: "w-12 text-right",
|
|
220
|
-
render: (e) => /* @__PURE__ */
|
|
260
|
+
render: (e) => /* @__PURE__ */ _("div", {
|
|
221
261
|
className: "flex justify-end",
|
|
222
262
|
onClick: (e) => e.stopPropagation(),
|
|
223
263
|
role: "presentation",
|
|
224
|
-
children: /* @__PURE__ */
|
|
264
|
+
children: /* @__PURE__ */ _(o, {
|
|
225
265
|
id: `asset-row-menu-${e.id}`,
|
|
226
266
|
items: [
|
|
227
267
|
{
|
|
228
268
|
key: "copy",
|
|
229
269
|
label: "Copy URL",
|
|
230
|
-
icon: /* @__PURE__ */
|
|
231
|
-
onClick: () => void
|
|
270
|
+
icon: /* @__PURE__ */ _(d, { className: "h-4 w-4" }),
|
|
271
|
+
onClick: () => void O(e.url)
|
|
232
272
|
},
|
|
233
273
|
{
|
|
234
274
|
key: "download",
|
|
235
275
|
label: "Download",
|
|
236
|
-
icon: /* @__PURE__ */
|
|
237
|
-
onClick: () =>
|
|
276
|
+
icon: /* @__PURE__ */ _(f, { className: "h-4 w-4" }),
|
|
277
|
+
onClick: () => T(e.url, e.name)
|
|
238
278
|
},
|
|
239
279
|
{
|
|
240
280
|
key: "delete",
|
|
241
281
|
label: "Delete",
|
|
242
|
-
icon: /* @__PURE__ */ h
|
|
282
|
+
icon: /* @__PURE__ */ _(h, { className: "h-4 w-4" }),
|
|
243
283
|
danger: !0,
|
|
244
|
-
onClick: () => void
|
|
284
|
+
onClick: () => void Ve(e)
|
|
245
285
|
}
|
|
246
286
|
]
|
|
247
287
|
})
|
|
248
288
|
})
|
|
249
289
|
}
|
|
250
290
|
], $ = "min-h-[40px] rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]";
|
|
251
|
-
return /* @__PURE__ */
|
|
291
|
+
return /* @__PURE__ */ v(i, {
|
|
252
292
|
title: "Asset Library",
|
|
253
293
|
description: "Manage your marketing assets and media files",
|
|
254
|
-
actions: /* @__PURE__ */
|
|
255
|
-
children: [
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
294
|
+
actions: /* @__PURE__ */ _(a, { onUploaded: () => void D() }),
|
|
295
|
+
children: [
|
|
296
|
+
/* @__PURE__ */ _(ye, { children: "Your shared store of brand assets — images, videos, logos and documents your team reuses across campaigns. Browse by category, search by tag, and grab the right file without hunting through folders." }),
|
|
297
|
+
/* @__PURE__ */ _(se, {
|
|
298
|
+
active: "assets",
|
|
299
|
+
basePath: Te,
|
|
300
|
+
navigate: we
|
|
301
|
+
}),
|
|
302
|
+
/* @__PURE__ */ v(re, {
|
|
303
|
+
loading: E,
|
|
304
|
+
error: Ce,
|
|
305
|
+
onRetry: () => void D(),
|
|
306
|
+
hasData: !!g,
|
|
307
|
+
children: [
|
|
308
|
+
ke && /* @__PURE__ */ _("div", {
|
|
309
|
+
role: "alert",
|
|
310
|
+
className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
|
|
311
|
+
children: ke
|
|
312
|
+
}),
|
|
313
|
+
/* @__PURE__ */ _(ve, { children: /* @__PURE__ */ _("div", {
|
|
314
|
+
className: "grid grid-cols-2 gap-4 sm:grid-cols-4",
|
|
315
|
+
children: [
|
|
316
|
+
{
|
|
317
|
+
label: "Total Assets",
|
|
318
|
+
value: r(J.length),
|
|
319
|
+
icon: /* @__PURE__ */ _(p, { className: "h-5 w-5" })
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
label: "Images",
|
|
323
|
+
value: r(Pe),
|
|
324
|
+
icon: /* @__PURE__ */ _(de, { className: "h-5 w-5" })
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
label: "Videos",
|
|
328
|
+
value: r(Fe),
|
|
329
|
+
icon: /* @__PURE__ */ _(me, { className: "h-5 w-5" })
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
label: "Total Size",
|
|
333
|
+
value: w(Ne),
|
|
334
|
+
icon: /* @__PURE__ */ _(ue, { className: "h-5 w-5" })
|
|
335
|
+
}
|
|
336
|
+
].map((e) => /* @__PURE__ */ v("div", {
|
|
337
|
+
className: "flex items-center gap-3",
|
|
338
|
+
children: [/* @__PURE__ */ _("span", {
|
|
339
|
+
className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-bg-sunken text-text-secondary",
|
|
340
|
+
children: e.icon
|
|
341
|
+
}), /* @__PURE__ */ v("div", {
|
|
342
|
+
className: "min-w-0",
|
|
343
|
+
children: [/* @__PURE__ */ _("p", {
|
|
344
|
+
className: "truncate text-xs text-text-secondary",
|
|
345
|
+
children: e.label
|
|
346
|
+
}), /* @__PURE__ */ _("p", {
|
|
347
|
+
className: "text-2xl font-semibold text-text-primary",
|
|
348
|
+
children: e.value
|
|
349
|
+
})]
|
|
302
350
|
})]
|
|
303
|
-
})
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
children: ye.map((e) => /* @__PURE__ */ h("option", {
|
|
318
|
-
value: e.value,
|
|
319
|
-
children: e.label
|
|
320
|
-
}, e.value))
|
|
321
|
-
}), /* @__PURE__ */ g("div", {
|
|
322
|
-
className: "relative",
|
|
323
|
-
children: [/* @__PURE__ */ h(oe, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ h("select", {
|
|
324
|
-
value: A,
|
|
325
|
-
onChange: (e) => j(e.target.value),
|
|
326
|
-
"aria-label": "Sort assets",
|
|
327
|
-
className: e($, "pl-9"),
|
|
328
|
-
children: be.map((e) => /* @__PURE__ */ h("option", {
|
|
351
|
+
}, e.label))
|
|
352
|
+
}) }),
|
|
353
|
+
/* @__PURE__ */ _(ne, {
|
|
354
|
+
searchValue: j,
|
|
355
|
+
onSearchChange: Ee,
|
|
356
|
+
searchPlaceholder: "Search assets by name or tag...",
|
|
357
|
+
filters: /* @__PURE__ */ v("div", {
|
|
358
|
+
className: "flex flex-nowrap items-center gap-2 overflow-x-auto",
|
|
359
|
+
children: [/* @__PURE__ */ _("select", {
|
|
360
|
+
value: M,
|
|
361
|
+
onChange: (e) => De(e.target.value),
|
|
362
|
+
"aria-label": "Filter by type",
|
|
363
|
+
className: $,
|
|
364
|
+
children: xe.map((e) => /* @__PURE__ */ _("option", {
|
|
329
365
|
value: e.value,
|
|
330
366
|
children: e.label
|
|
331
367
|
}, e.value))
|
|
368
|
+
}), /* @__PURE__ */ v("div", {
|
|
369
|
+
className: "relative",
|
|
370
|
+
children: [/* @__PURE__ */ _(le, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ _("select", {
|
|
371
|
+
value: F,
|
|
372
|
+
onChange: (e) => Oe(e.target.value),
|
|
373
|
+
"aria-label": "Sort assets",
|
|
374
|
+
className: n($, "pl-9"),
|
|
375
|
+
children: Se.map((e) => /* @__PURE__ */ _("option", {
|
|
376
|
+
value: e.value,
|
|
377
|
+
children: e.label
|
|
378
|
+
}, e.value))
|
|
379
|
+
})]
|
|
332
380
|
})]
|
|
333
|
-
})
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
children: [/* @__PURE__ */ h("button", {
|
|
338
|
-
type: "button",
|
|
339
|
-
onClick: () => N("grid"),
|
|
340
|
-
"aria-label": "Grid view",
|
|
341
|
-
"aria-pressed": M === "grid",
|
|
342
|
-
className: e("flex min-h-[36px] min-w-[36px] items-center justify-center rounded p-1.5 transition-colors", M === "grid" ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:text-text-primary"),
|
|
343
|
-
children: /* @__PURE__ */ h(de, { className: "h-4 w-4" })
|
|
344
|
-
}), /* @__PURE__ */ h("button", {
|
|
345
|
-
type: "button",
|
|
346
|
-
onClick: () => N("list"),
|
|
347
|
-
"aria-label": "List view",
|
|
348
|
-
"aria-pressed": M === "list",
|
|
349
|
-
className: e("flex min-h-[36px] min-w-[36px] items-center justify-center rounded p-1.5 transition-colors", M === "list" ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:text-text-primary"),
|
|
350
|
-
children: /* @__PURE__ */ h(fe, { className: "h-4 w-4" })
|
|
351
|
-
})]
|
|
352
|
-
})
|
|
353
|
-
}),
|
|
354
|
-
P.size > 0 && /* @__PURE__ */ g("div", {
|
|
355
|
-
className: "flex flex-col gap-3 rounded-lg border border-action-primary-bg/40 bg-action-primary-bg/10 px-4 py-3 sm:flex-row sm:items-center sm:justify-between",
|
|
356
|
-
children: [/* @__PURE__ */ g("div", {
|
|
357
|
-
className: "flex items-center gap-3",
|
|
358
|
-
children: [/* @__PURE__ */ g("span", {
|
|
359
|
-
className: "text-sm font-medium text-text-primary",
|
|
360
|
-
children: [P.size, " selected"]
|
|
361
|
-
}), /* @__PURE__ */ h("button", {
|
|
362
|
-
type: "button",
|
|
363
|
-
onClick: ke,
|
|
364
|
-
className: "text-xs font-medium text-text-secondary underline-offset-2 hover:text-text-primary hover:underline",
|
|
365
|
-
children: Oe ? "Clear all" : `Select all ${q.length}`
|
|
366
|
-
})]
|
|
367
|
-
}), /* @__PURE__ */ g("div", {
|
|
368
|
-
className: "flex flex-wrap items-center gap-2",
|
|
369
|
-
children: [
|
|
370
|
-
/* @__PURE__ */ g("button", {
|
|
381
|
+
}),
|
|
382
|
+
actions: /* @__PURE__ */ v("div", {
|
|
383
|
+
className: "flex items-center gap-1 rounded-md border border-border-subtle p-0.5",
|
|
384
|
+
children: [/* @__PURE__ */ _("button", {
|
|
371
385
|
type: "button",
|
|
372
|
-
onClick:
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
386
|
+
onClick: () => L("grid"),
|
|
387
|
+
"aria-label": "Grid view",
|
|
388
|
+
"aria-pressed": I === "grid",
|
|
389
|
+
className: n("flex min-h-[36px] min-w-[36px] items-center justify-center rounded p-1.5 transition-colors", I === "grid" ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:text-text-primary"),
|
|
390
|
+
children: /* @__PURE__ */ _(fe, { className: "h-4 w-4" })
|
|
391
|
+
}), /* @__PURE__ */ _("button", {
|
|
377
392
|
type: "button",
|
|
378
|
-
onClick: () =>
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
393
|
+
onClick: () => L("list"),
|
|
394
|
+
"aria-label": "List view",
|
|
395
|
+
"aria-pressed": I === "list",
|
|
396
|
+
className: n("flex min-h-[36px] min-w-[36px] items-center justify-center rounded p-1.5 transition-colors", I === "list" ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:text-text-primary"),
|
|
397
|
+
children: /* @__PURE__ */ _(pe, { className: "h-4 w-4" })
|
|
398
|
+
})]
|
|
399
|
+
})
|
|
400
|
+
}),
|
|
401
|
+
/* @__PURE__ */ v("div", {
|
|
402
|
+
className: n("grid gap-4", X.length > 0 && "lg:grid-cols-[220px_minmax(0,1fr)]"),
|
|
403
|
+
children: [X.length > 0 && /* @__PURE__ */ v("nav", {
|
|
404
|
+
"aria-label": "Asset folders",
|
|
405
|
+
className: "h-fit rounded-lg border border-border-seam bg-gloss-card p-2 shadow-pop",
|
|
406
|
+
children: [/* @__PURE__ */ v("button", {
|
|
384
407
|
type: "button",
|
|
385
|
-
onClick:
|
|
386
|
-
"aria-
|
|
387
|
-
className: "
|
|
388
|
-
children: /* @__PURE__ */
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
className: "
|
|
408
|
+
onClick: () => P(b),
|
|
409
|
+
"aria-pressed": N === b,
|
|
410
|
+
className: n("flex w-full items-center justify-between gap-2 rounded-md px-3 py-2 text-left text-sm transition-colors", N === b ? "bg-bg-sunken font-medium text-text-primary" : "text-text-secondary hover:bg-bg-sunken hover:text-text-primary"),
|
|
411
|
+
children: [/* @__PURE__ */ v("span", {
|
|
412
|
+
className: "flex min-w-0 items-center gap-2",
|
|
413
|
+
children: [/* @__PURE__ */ _(p, { className: "h-4 w-4 shrink-0" }), /* @__PURE__ */ _("span", {
|
|
414
|
+
className: "truncate",
|
|
415
|
+
children: "All Assets"
|
|
416
|
+
})]
|
|
417
|
+
}), /* @__PURE__ */ _("span", {
|
|
418
|
+
className: "shrink-0 text-xs tabular-nums text-text-secondary",
|
|
419
|
+
children: J.length
|
|
420
|
+
})]
|
|
421
|
+
}), X.length === 0 ? /* @__PURE__ */ _("p", {
|
|
422
|
+
className: "px-3 py-2 text-xs text-text-secondary",
|
|
423
|
+
children: "No folders in use yet."
|
|
424
|
+
}) : /* @__PURE__ */ _("ul", {
|
|
425
|
+
className: "mt-1 space-y-0.5",
|
|
426
|
+
children: X.map((e) => /* @__PURE__ */ _("li", { children: /* @__PURE__ */ v("button", {
|
|
427
|
+
type: "button",
|
|
428
|
+
onClick: () => P(e.id),
|
|
429
|
+
"aria-pressed": N === e.id,
|
|
430
|
+
className: n("flex w-full items-center justify-between gap-2 rounded-md px-3 py-2 text-left text-sm transition-colors", N === e.id ? "bg-bg-sunken font-medium text-text-primary" : "text-text-secondary hover:bg-bg-sunken hover:text-text-primary"),
|
|
431
|
+
children: [/* @__PURE__ */ v("span", {
|
|
432
|
+
className: "flex min-w-0 items-center gap-2",
|
|
433
|
+
children: [/* @__PURE__ */ _(m, { className: "h-4 w-4 shrink-0" }), /* @__PURE__ */ _("span", {
|
|
434
|
+
className: "truncate",
|
|
435
|
+
children: e.name
|
|
436
|
+
})]
|
|
437
|
+
}), /* @__PURE__ */ _("span", {
|
|
438
|
+
className: "shrink-0 text-xs tabular-nums text-text-secondary",
|
|
439
|
+
children: e.count
|
|
440
|
+
})]
|
|
441
|
+
}) }, e.id))
|
|
442
|
+
})]
|
|
443
|
+
}), /* @__PURE__ */ v("div", {
|
|
444
|
+
className: "min-w-0 space-y-4",
|
|
445
|
+
children: [R.size > 0 && /* @__PURE__ */ v("div", {
|
|
446
|
+
className: "flex flex-col gap-3 rounded-lg border border-action-primary-bg/40 bg-action-primary-bg/10 px-4 py-3 sm:flex-row sm:items-center sm:justify-between",
|
|
447
|
+
children: [/* @__PURE__ */ v("div", {
|
|
448
|
+
className: "flex items-center gap-3",
|
|
449
|
+
children: [/* @__PURE__ */ v("span", {
|
|
450
|
+
className: "text-sm font-medium text-text-primary",
|
|
451
|
+
children: [R.size, " selected"]
|
|
452
|
+
}), /* @__PURE__ */ _("button", {
|
|
453
|
+
type: "button",
|
|
454
|
+
onClick: ze,
|
|
455
|
+
className: "text-xs font-medium text-text-secondary underline-offset-2 hover:text-text-primary hover:underline",
|
|
456
|
+
children: Le ? "Clear all" : `Select all ${Q.length}`
|
|
457
|
+
})]
|
|
458
|
+
}), /* @__PURE__ */ v("div", {
|
|
459
|
+
className: "flex flex-wrap items-center gap-2",
|
|
408
460
|
children: [
|
|
409
|
-
/* @__PURE__ */
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
children: /* @__PURE__ */
|
|
414
|
-
type: "checkbox",
|
|
415
|
-
checked: n,
|
|
416
|
-
onChange: () => X(t.id),
|
|
417
|
-
"aria-label": `Select ${t.name}`,
|
|
418
|
-
className: "h-4 w-4 cursor-pointer accent-[var(--color-action-primary-bg)]"
|
|
419
|
-
})
|
|
461
|
+
/* @__PURE__ */ v("button", {
|
|
462
|
+
type: "button",
|
|
463
|
+
onClick: He,
|
|
464
|
+
className: "inline-flex min-h-[36px] items-center gap-1.5 rounded-md border border-border-subtle bg-bg-surface px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
465
|
+
children: [/* @__PURE__ */ _(f, { className: "h-4 w-4" }), "Download"]
|
|
420
466
|
}),
|
|
421
|
-
/* @__PURE__ */
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
})
|
|
467
|
+
/* @__PURE__ */ v("button", {
|
|
468
|
+
type: "button",
|
|
469
|
+
onClick: () => void Ue(),
|
|
470
|
+
disabled: V,
|
|
471
|
+
className: "inline-flex min-h-[36px] items-center gap-1.5 rounded-md border border-status-error-border/40 bg-status-error-bg/10 px-3 py-1.5 text-sm font-medium text-status-error-text hover:bg-status-error-bg/20 disabled:opacity-60",
|
|
472
|
+
children: [/* @__PURE__ */ _(h, { className: "h-4 w-4" }), V ? "Deleting…" : "Delete"]
|
|
428
473
|
}),
|
|
429
|
-
/* @__PURE__ */
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
className: "pointer-events-auto flex h-10 w-10 items-center justify-center rounded-full bg-bg-surface/90 text-text-primary shadow-pop transition-transform hover:scale-105",
|
|
436
|
-
children: /* @__PURE__ */ h(f, { className: "h-4 w-4" })
|
|
437
|
-
})
|
|
474
|
+
/* @__PURE__ */ _("button", {
|
|
475
|
+
type: "button",
|
|
476
|
+
onClick: Be,
|
|
477
|
+
"aria-label": "Clear selection",
|
|
478
|
+
className: "inline-flex min-h-[36px] min-w-[36px] items-center justify-center rounded-md text-text-secondary hover:bg-bg-sunken hover:text-text-primary",
|
|
479
|
+
children: /* @__PURE__ */ _(he, { className: "h-4 w-4" })
|
|
438
480
|
})
|
|
439
481
|
]
|
|
440
|
-
})
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
{
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
482
|
+
})]
|
|
483
|
+
}), Q.length === 0 ? /* @__PURE__ */ _(te, {
|
|
484
|
+
illustration: J.length === 0 ? "empty-files" : "empty-search",
|
|
485
|
+
title: J.length === 0 ? "No assets yet" : "No assets match your filters",
|
|
486
|
+
description: J.length === 0 ? "Upload images, videos, logos or documents to build your shared asset library." : "Try a different search term, folder or type filter.",
|
|
487
|
+
action: J.length === 0 ? /* @__PURE__ */ _(a, { onUploaded: () => void D() }) : void 0
|
|
488
|
+
}) : /* @__PURE__ */ v("div", {
|
|
489
|
+
className: "space-y-4",
|
|
490
|
+
children: [I === "grid" ? /* @__PURE__ */ _("div", {
|
|
491
|
+
className: "grid grid-cols-2 gap-4 md:grid-cols-3 lg:grid-cols-4",
|
|
492
|
+
children: Me.map((e) => {
|
|
493
|
+
let t = R.has(e.id);
|
|
494
|
+
return /* @__PURE__ */ v("div", {
|
|
495
|
+
className: n("group overflow-hidden rounded-lg border bg-gloss-card transition-shadow hover:shadow-pop", t ? "border-action-primary-bg ring-2 ring-[var(--color-action-primary-bg)]" : "border-border-seam"),
|
|
496
|
+
children: [/* @__PURE__ */ v("div", {
|
|
497
|
+
className: "relative h-32 overflow-hidden rounded-t-lg",
|
|
498
|
+
children: [
|
|
499
|
+
/* @__PURE__ */ _(s, { asset: e }),
|
|
500
|
+
/* @__PURE__ */ _("label", {
|
|
501
|
+
className: "absolute left-2 top-2 z-20 flex h-6 w-6 cursor-pointer items-center justify-center rounded-md border border-border-default bg-bg-surface/90 shadow-pop backdrop-blur-sm",
|
|
502
|
+
title: "Select asset",
|
|
503
|
+
children: /* @__PURE__ */ _("input", {
|
|
504
|
+
type: "checkbox",
|
|
505
|
+
checked: t,
|
|
506
|
+
onChange: () => Re(e.id),
|
|
507
|
+
"aria-label": `Select ${e.name}`,
|
|
508
|
+
className: "h-4 w-4 cursor-pointer accent-[var(--color-action-primary-bg)]"
|
|
509
|
+
})
|
|
510
|
+
}),
|
|
511
|
+
/* @__PURE__ */ _("div", {
|
|
512
|
+
className: "absolute right-2 top-2 z-20",
|
|
513
|
+
children: /* @__PURE__ */ _(y, {
|
|
514
|
+
variant: S[e.type],
|
|
515
|
+
className: "shadow-pop backdrop-blur-sm",
|
|
516
|
+
children: C(e)
|
|
517
|
+
})
|
|
518
|
+
}),
|
|
519
|
+
/* @__PURE__ */ _("div", {
|
|
520
|
+
className: "pointer-events-none absolute inset-0 z-10 flex items-center justify-center bg-black/0 opacity-0 transition-all duration-200 group-hover:bg-black/25 group-hover:opacity-100",
|
|
521
|
+
children: /* @__PURE__ */ _("button", {
|
|
522
|
+
type: "button",
|
|
523
|
+
onClick: () => T(e.url, e.name),
|
|
524
|
+
"aria-label": `Download ${e.name}`,
|
|
525
|
+
className: "pointer-events-auto flex h-10 w-10 items-center justify-center rounded-full bg-bg-surface/90 text-text-primary shadow-pop transition-transform hover:scale-105",
|
|
526
|
+
children: /* @__PURE__ */ _(f, { className: "h-4 w-4" })
|
|
527
|
+
})
|
|
528
|
+
})
|
|
529
|
+
]
|
|
530
|
+
}), /* @__PURE__ */ v("div", {
|
|
531
|
+
className: "p-3",
|
|
532
|
+
children: [
|
|
533
|
+
/* @__PURE__ */ v("div", {
|
|
534
|
+
className: "flex items-start justify-between gap-2",
|
|
535
|
+
children: [/* @__PURE__ */ _("p", {
|
|
536
|
+
className: "truncate text-sm font-medium text-text-primary",
|
|
537
|
+
children: e.name
|
|
538
|
+
}), /* @__PURE__ */ _(o, {
|
|
539
|
+
id: `asset-menu-${e.id}`,
|
|
540
|
+
items: [
|
|
541
|
+
{
|
|
542
|
+
key: "copy",
|
|
543
|
+
label: "Copy URL",
|
|
544
|
+
icon: /* @__PURE__ */ _(d, { className: "h-4 w-4" }),
|
|
545
|
+
onClick: () => void O(e.url)
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
key: "download",
|
|
549
|
+
label: "Download",
|
|
550
|
+
icon: /* @__PURE__ */ _(f, { className: "h-4 w-4" }),
|
|
551
|
+
onClick: () => T(e.url, e.name)
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
key: "delete",
|
|
555
|
+
label: "Delete",
|
|
556
|
+
icon: /* @__PURE__ */ _(h, { className: "h-4 w-4" }),
|
|
557
|
+
danger: !0,
|
|
558
|
+
onClick: () => void Ve(e)
|
|
559
|
+
}
|
|
560
|
+
]
|
|
561
|
+
})]
|
|
562
|
+
}),
|
|
563
|
+
/* @__PURE__ */ v("div", {
|
|
564
|
+
className: "mt-1 flex items-center justify-between",
|
|
565
|
+
children: [/* @__PURE__ */ v("span", {
|
|
566
|
+
className: "text-xs text-text-secondary",
|
|
567
|
+
children: [w(e.size), e.dimensions ? ` · ${e.dimensions.width}×${e.dimensions.height}` : ""]
|
|
568
|
+
}), /* @__PURE__ */ v("div", {
|
|
569
|
+
className: "flex min-w-0 items-center gap-1",
|
|
570
|
+
children: [/* @__PURE__ */ _(m, { className: "h-3 w-3 shrink-0 text-text-secondary" }), /* @__PURE__ */ _("span", {
|
|
571
|
+
className: "truncate text-xs text-text-secondary",
|
|
572
|
+
children: e.folderId === null ? "Unfiled" : Y.get(e.folderId) ?? "Unnamed folder"
|
|
573
|
+
})]
|
|
574
|
+
})]
|
|
575
|
+
}),
|
|
576
|
+
e.tags.length > 0 && /* @__PURE__ */ v("div", {
|
|
577
|
+
className: "mt-2 flex flex-wrap gap-1",
|
|
578
|
+
children: [e.tags.slice(0, 2).map((e) => /* @__PURE__ */ _("span", {
|
|
579
|
+
className: "rounded-full bg-bg-sunken px-2 py-0.5 text-[10px] text-text-secondary",
|
|
580
|
+
children: e
|
|
581
|
+
}, e)), e.tags.length > 2 && /* @__PURE__ */ v("span", {
|
|
582
|
+
className: "rounded-full bg-bg-sunken px-2 py-0.5 text-[10px] text-text-secondary",
|
|
583
|
+
children: ["+", e.tags.length - 2]
|
|
584
|
+
})]
|
|
585
|
+
})
|
|
470
586
|
]
|
|
471
587
|
})]
|
|
472
|
-
})
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
className: "rounded-full bg-bg-sunken px-2 py-0.5 text-[10px] text-text-secondary",
|
|
493
|
-
children: ["+", t.tags.length - 2]
|
|
494
|
-
})]
|
|
495
|
-
})
|
|
496
|
-
]
|
|
588
|
+
}, e.id);
|
|
589
|
+
})
|
|
590
|
+
}) : /* @__PURE__ */ _(ee, {
|
|
591
|
+
data: Me,
|
|
592
|
+
columns: We,
|
|
593
|
+
pageSize: U,
|
|
594
|
+
emptyMessage: "No assets match your filters"
|
|
595
|
+
}), /* @__PURE__ */ _(ie, {
|
|
596
|
+
page: Ae,
|
|
597
|
+
pageSize: U,
|
|
598
|
+
total: Q.length,
|
|
599
|
+
onPageChange: K,
|
|
600
|
+
onPageSizeChange: je,
|
|
601
|
+
pageSizeOptions: [
|
|
602
|
+
12,
|
|
603
|
+
24,
|
|
604
|
+
48
|
|
605
|
+
],
|
|
606
|
+
disabled: E,
|
|
607
|
+
hideWhenSinglePage: !0
|
|
497
608
|
})]
|
|
498
|
-
}
|
|
499
|
-
})
|
|
500
|
-
})
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
emptyMessage: "No assets match your filters"
|
|
505
|
-
}), /* @__PURE__ */ h(ne, {
|
|
506
|
-
page: Ce,
|
|
507
|
-
pageSize: B,
|
|
508
|
-
total: q.length,
|
|
509
|
-
onPageChange: U,
|
|
510
|
-
onPageSizeChange: we,
|
|
511
|
-
pageSizeOptions: [
|
|
512
|
-
12,
|
|
513
|
-
24,
|
|
514
|
-
48
|
|
515
|
-
],
|
|
516
|
-
disabled: C,
|
|
517
|
-
hideWhenSinglePage: !0
|
|
518
|
-
})]
|
|
519
|
-
})
|
|
520
|
-
]
|
|
521
|
-
})]
|
|
609
|
+
})]
|
|
610
|
+
})]
|
|
611
|
+
})
|
|
612
|
+
]
|
|
613
|
+
})
|
|
614
|
+
]
|
|
522
615
|
});
|
|
523
616
|
};
|
|
524
617
|
//#endregion
|
|
525
|
-
export {
|
|
618
|
+
export { E as AssetLibraryPage };
|
|
526
619
|
|
|
527
620
|
//# sourceMappingURL=AssetLibraryPage.js.map
|