@burdenoff/microfe-headshotmarketing 2026.801.2 → 2026.827.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.
Files changed (60) hide show
  1. package/dist/generated/wspace-operations.d.ts +44 -0
  2. package/dist/generated/wspace-operations.d.ts.map +1 -1
  3. package/dist/generated/wspace-operations.js +30 -4
  4. package/dist/generated/wspace-operations.js.map +1 -1
  5. package/dist/headshotmarketing/components/InfluencerModals.d.ts.map +1 -1
  6. package/dist/headshotmarketing/components/InfluencerModals.js +201 -214
  7. package/dist/headshotmarketing/components/InfluencerModals.js.map +1 -1
  8. package/dist/headshotmarketing/components/StatusBadge.d.ts.map +1 -1
  9. package/dist/headshotmarketing/components/StatusBadge.js +2 -0
  10. package/dist/headshotmarketing/components/StatusBadge.js.map +1 -1
  11. package/dist/headshotmarketing/pages/ads/AdCreativesPage.js +59 -29
  12. package/dist/headshotmarketing/pages/ads/AdCreativesPage.js.map +1 -1
  13. package/dist/headshotmarketing/pages/analytics/AnalyticsPage.d.ts.map +1 -1
  14. package/dist/headshotmarketing/pages/analytics/AnalyticsPage.js +389 -215
  15. package/dist/headshotmarketing/pages/analytics/AnalyticsPage.js.map +1 -1
  16. package/dist/headshotmarketing/pages/content/AIExecutionLedger.d.ts +26 -0
  17. package/dist/headshotmarketing/pages/content/AIExecutionLedger.d.ts.map +1 -0
  18. package/dist/headshotmarketing/pages/content/AIExecutionLedger.js +215 -0
  19. package/dist/headshotmarketing/pages/content/AIExecutionLedger.js.map +1 -0
  20. package/dist/headshotmarketing/pages/content/AIToolsPage.d.ts.map +1 -1
  21. package/dist/headshotmarketing/pages/content/AIToolsPage.js +396 -379
  22. package/dist/headshotmarketing/pages/content/AIToolsPage.js.map +1 -1
  23. package/dist/headshotmarketing/pages/content/AssetLibraryPage.d.ts.map +1 -1
  24. package/dist/headshotmarketing/pages/content/AssetLibraryPage.js +436 -343
  25. package/dist/headshotmarketing/pages/content/AssetLibraryPage.js.map +1 -1
  26. package/dist/headshotmarketing/pages/content/ContentAnalyticsPage.d.ts.map +1 -1
  27. package/dist/headshotmarketing/pages/content/ContentAnalyticsPage.js +233 -223
  28. package/dist/headshotmarketing/pages/content/ContentAnalyticsPage.js.map +1 -1
  29. package/dist/headshotmarketing/pages/content/ContentPage.js +4 -4
  30. package/dist/headshotmarketing/pages/crm/ContactsPage.d.ts.map +1 -1
  31. package/dist/headshotmarketing/pages/crm/ContactsPage.js +339 -278
  32. package/dist/headshotmarketing/pages/crm/ContactsPage.js.map +1 -1
  33. package/dist/headshotmarketing/pages/crm/CrmPage.d.ts.map +1 -1
  34. package/dist/headshotmarketing/pages/crm/CrmPage.js +118 -112
  35. package/dist/headshotmarketing/pages/crm/CrmPage.js.map +1 -1
  36. package/dist/headshotmarketing/pages/crm/CrmSubNav.d.ts +14 -0
  37. package/dist/headshotmarketing/pages/crm/CrmSubNav.d.ts.map +1 -0
  38. package/dist/headshotmarketing/pages/crm/CrmSubNav.js +51 -0
  39. package/dist/headshotmarketing/pages/crm/CrmSubNav.js.map +1 -0
  40. package/dist/headshotmarketing/pages/crm/LeadsPage.d.ts.map +1 -1
  41. package/dist/headshotmarketing/pages/crm/LeadsPage.js +122 -116
  42. package/dist/headshotmarketing/pages/crm/LeadsPage.js.map +1 -1
  43. package/dist/headshotmarketing/pages/crm/PipelinePage.d.ts.map +1 -1
  44. package/dist/headshotmarketing/pages/crm/PipelinePage.js +192 -183
  45. package/dist/headshotmarketing/pages/crm/PipelinePage.js.map +1 -1
  46. package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.d.ts.map +1 -1
  47. package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js +184 -162
  48. package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js.map +1 -1
  49. package/dist/headshotmarketing/pages/influencers/InfluencersPage.d.ts.map +1 -1
  50. package/dist/headshotmarketing/pages/influencers/InfluencersPage.js +8 -14
  51. package/dist/headshotmarketing/pages/influencers/InfluencersPage.js.map +1 -1
  52. package/dist/headshotmarketing/types/index.d.ts +9 -4
  53. package/dist/headshotmarketing/types/index.d.ts.map +1 -1
  54. package/dist/headshotmarketing/utils/contentMapper.js +1 -1
  55. package/dist/headshotmarketing/utils/contentMapper.js.map +1 -1
  56. package/dist/headshotmarketing/utils/influencerMapper.d.ts +16 -2
  57. package/dist/headshotmarketing/utils/influencerMapper.d.ts.map +1 -1
  58. package/dist/headshotmarketing/utils/influencerMapper.js +56 -40
  59. package/dist/headshotmarketing/utils/influencerMapper.js.map +1 -1
  60. package/package.json +2 -2
@@ -1,37 +1,40 @@
1
- import { cn as e, formatNumber as t } from "../../utils/helpers.js";
2
- import { PageLayout as n } from "../../components/PageLayout.js";
3
- import { DataTable as r } from "../../components/DataTable.js";
4
- import { EmptyState as ee } from "../../components/EmptyState.js";
5
- import { FilterBar as te } from "../../components/FilterBar.js";
6
- import { QueryStateBoundary as i } from "../../components/QueryStateBoundary.js";
7
- import { Pagination as ne } from "../../components/Pagination.js";
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 re } from "../../hooks/useHeadshotmarketingBootstrap.js";
12
- import { usePagination as ie } from "../../hooks/usePagination.js";
13
- import { toAssetModel as ae } from "../../utils/contentMapper.js";
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 oe, Copy as d, Download as f, Files as se, FolderOpen as ce, HardDrive as le, Image as ue, LayoutGrid as de, List as fe, Trash2 as p, Video as pe, X as me } from "lucide-react";
17
- import { useCopyToClipboard as he } from "@burdenoff/fe-libs/shared/hooks";
18
- import { gql as m } from "@apollo/client";
19
- import { useMutation as ge } from "@apollo/client/react";
20
- import { jsx as h, jsxs as g } from "react/jsx-runtime";
21
- import { Badge as _, EmphasisPanel as _e, PagePurpose as ve } from "@burdenoff/fe-libs/ui";
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 v = m`
26
+ var be = g`
24
27
  mutation HeadshotmarketingDeleteCanonicalFileAsset($id: ID!) {
25
28
  headshotmarketingDeleteFileMarketingMeta(fileId: $id)
26
29
  deleteFile(id: $id)
27
30
  }
28
- `, y = {
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
- }, ye = [
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
- ], be = [
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 b(e) {
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 x(e) {
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 S(e, t) {
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 C = () => {
87
- let { data: m, loading: C, error: xe, refetch: w } = re(), { copy: T } = he(), [E] = ge(v), [D, Se] = u(""), [O, k] = u("all"), [A, j] = u("newest"), [M, N] = u("grid"), [P, F] = u(/* @__PURE__ */ new Set()), [I, L] = u(null), [R, z] = u(!1), { page: Ce, pageSize: B, offset: V, limit: H, setPage: U, setPageSize: we, setTotal: W } = ie({ initialPageSize: 12 }), G = l(() => (m?.headshotmarketingAssets.items ?? []).map((e) => ae(e)), [m?.headshotmarketingAssets.items]), K = l(() => {
88
- let e = D.trim().toLowerCase();
89
- return G.filter((t) => {
90
- let n = !e || t.name.toLowerCase().includes(e) || t.tags.some((t) => t.toLowerCase().includes(e)), r = O === "all" || t.type === O;
91
- return n && r;
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
- G,
95
- D,
96
- O
97
- ]), q = l(() => {
98
- let e = [...K];
99
- switch (A) {
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
- }, [K, A]);
129
+ }, [Z, F]);
105
130
  c(() => {
106
- W(q.length);
107
- }, [q.length, W]), c(() => {
108
- U(1);
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
- D,
111
- O,
112
- A,
113
- U
143
+ j,
144
+ M,
145
+ N
114
146
  ]), c(() => {
115
- F(/* @__PURE__ */ new Set());
116
- }, [D, O]);
117
- let J = l(() => q.slice(V, V + H), [
118
- q,
119
- V,
120
- H
121
- ]), Te = l(() => G.reduce((e, t) => e + t.size, 0), [G]), Ee = l(() => G.filter((e) => e.type === "image").length, [G]), De = l(() => G.filter((e) => e.type === "video").length, [G]), Y = l(() => q.filter((e) => P.has(e.id)), [q, P]), Oe = q.length > 0 && q.every((e) => P.has(e.id)), X = (e) => {
122
- F((t) => {
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
- }, ke = () => {
127
- F((e) => e.size === q.length && q.length > 0 ? /* @__PURE__ */ new Set() : new Set(q.map((e) => e.id)));
128
- }, Z = () => F(/* @__PURE__ */ new Set()), Q = async (e) => {
129
- if (L(null), window.confirm(`Delete "${e.name}"? This action can't be undone.`)) try {
130
- await E({ variables: { id: e.id } }), F((t) => {
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 w();
166
+ }), await D();
135
167
  } catch (e) {
136
- L(e instanceof Error ? e.message : "Failed to delete the asset.");
168
+ B(e instanceof Error ? e.message : "Failed to delete the asset.");
137
169
  }
138
- }, Ae = () => {
139
- Y.forEach((e, t) => {
140
- window.setTimeout(() => S(e.url, e.name), t * 150);
170
+ }, He = () => {
171
+ Ie.forEach((e, t) => {
172
+ window.setTimeout(() => T(e.url, e.name), t * 150);
141
173
  });
142
- }, je = async () => {
143
- let e = Y.map((e) => e.id);
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
- L(null), z(!0);
177
+ B(null), H(!0);
146
178
  try {
147
- let t = (await Promise.allSettled(e.map((e) => E({ variables: { id: e } })))).filter((e) => e.status === "rejected").length;
148
- await w(), Z(), t > 0 && L(`Deleted ${e.length - t} of ${e.length}; ${t} could not be removed.`);
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
- L(e instanceof Error ? e.message : "Bulk delete failed.");
182
+ B(e instanceof Error ? e.message : "Bulk delete failed.");
151
183
  } finally {
152
- z(!1);
184
+ H(!1);
153
185
  }
154
186
  }
155
- }, Me = [
187
+ }, We = [
156
188
  {
157
189
  key: "select",
158
190
  header: "",
159
191
  className: "w-10",
160
- render: (e) => /* @__PURE__ */ h("input", {
192
+ render: (e) => /* @__PURE__ */ _("input", {
161
193
  type: "checkbox",
162
- checked: P.has(e.id),
163
- onChange: () => X(e.id),
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__ */ h("div", {
205
+ render: (e) => /* @__PURE__ */ _("div", {
174
206
  className: "h-9 w-12 overflow-hidden rounded-md border border-border-subtle",
175
- children: /* @__PURE__ */ h(s, {
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__ */ h("span", {
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__ */ h(_, {
195
- variant: y[e.type],
196
- children: b(e)
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__ */ h("span", {
235
+ render: (e) => /* @__PURE__ */ _("span", {
204
236
  className: "text-text-secondary",
205
- children: x(e.size)
237
+ children: w(e.size)
206
238
  })
207
239
  },
208
240
  {
209
241
  key: "dimensions",
210
242
  header: "Dimensions",
211
- render: (e) => /* @__PURE__ */ h("span", {
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__ */ h("div", {
260
+ render: (e) => /* @__PURE__ */ _("div", {
221
261
  className: "flex justify-end",
222
262
  onClick: (e) => e.stopPropagation(),
223
263
  role: "presentation",
224
- children: /* @__PURE__ */ h(o, {
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__ */ h(d, { className: "h-4 w-4" }),
231
- onClick: () => void T(e.url)
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__ */ h(f, { className: "h-4 w-4" }),
237
- onClick: () => S(e.url, e.name)
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(p, { className: "h-4 w-4" }),
282
+ icon: /* @__PURE__ */ _(h, { className: "h-4 w-4" }),
243
283
  danger: !0,
244
- onClick: () => void Q(e)
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__ */ g(n, {
291
+ return /* @__PURE__ */ v(i, {
252
292
  title: "Asset Library",
253
293
  description: "Manage your marketing assets and media files",
254
- actions: /* @__PURE__ */ h(a, { onUploaded: () => void w() }),
255
- children: [/* @__PURE__ */ h(ve, { 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." }), /* @__PURE__ */ g(i, {
256
- loading: C,
257
- error: xe,
258
- onRetry: () => void w(),
259
- hasData: !!m,
260
- children: [
261
- I && /* @__PURE__ */ h("div", {
262
- role: "alert",
263
- className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
264
- children: I
265
- }),
266
- /* @__PURE__ */ h(_e, { children: /* @__PURE__ */ h("div", {
267
- className: "grid grid-cols-2 gap-4 sm:grid-cols-4",
268
- children: [
269
- {
270
- label: "Total Assets",
271
- value: t(G.length),
272
- icon: /* @__PURE__ */ h(se, { className: "h-5 w-5" })
273
- },
274
- {
275
- label: "Images",
276
- value: t(Ee),
277
- icon: /* @__PURE__ */ h(ue, { className: "h-5 w-5" })
278
- },
279
- {
280
- label: "Videos",
281
- value: t(De),
282
- icon: /* @__PURE__ */ h(pe, { className: "h-5 w-5" })
283
- },
284
- {
285
- label: "Total Size",
286
- value: x(Te),
287
- icon: /* @__PURE__ */ h(le, { className: "h-5 w-5" })
288
- }
289
- ].map((e) => /* @__PURE__ */ g("div", {
290
- className: "flex items-center gap-3",
291
- children: [/* @__PURE__ */ h("span", {
292
- className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-bg-sunken text-text-secondary",
293
- children: e.icon
294
- }), /* @__PURE__ */ g("div", {
295
- className: "min-w-0",
296
- children: [/* @__PURE__ */ h("p", {
297
- className: "truncate text-xs text-text-secondary",
298
- children: e.label
299
- }), /* @__PURE__ */ h("p", {
300
- className: "text-2xl font-semibold text-text-primary",
301
- children: e.value
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
- }, e.label))
305
- }) }),
306
- /* @__PURE__ */ h(te, {
307
- searchValue: D,
308
- onSearchChange: Se,
309
- searchPlaceholder: "Search assets by name or tag...",
310
- filters: /* @__PURE__ */ g("div", {
311
- className: "flex flex-nowrap items-center gap-2 overflow-x-auto",
312
- children: [/* @__PURE__ */ h("select", {
313
- value: O,
314
- onChange: (e) => k(e.target.value),
315
- "aria-label": "Filter by type",
316
- className: $,
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
- actions: /* @__PURE__ */ g("div", {
336
- className: "flex items-center gap-1 rounded-md border border-border-subtle p-0.5",
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: Ae,
373
- 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",
374
- children: [/* @__PURE__ */ h(f, { className: "h-4 w-4" }), "Download"]
375
- }),
376
- /* @__PURE__ */ g("button", {
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: () => void je(),
379
- disabled: R,
380
- 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",
381
- children: [/* @__PURE__ */ h(p, { className: "h-4 w-4" }), R ? "Deleting…" : "Delete"]
382
- }),
383
- /* @__PURE__ */ h("button", {
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: Z,
386
- "aria-label": "Clear selection",
387
- 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",
388
- children: /* @__PURE__ */ h(me, { className: "h-4 w-4" })
389
- })
390
- ]
391
- })]
392
- }),
393
- q.length === 0 ? /* @__PURE__ */ h(ee, {
394
- illustration: G.length === 0 ? "empty-files" : "empty-search",
395
- title: G.length === 0 ? "No assets yet" : "No assets match your filters",
396
- description: G.length === 0 ? "Upload images, videos, logos or documents to build your shared asset library." : "Try a different search term or type filter.",
397
- action: G.length === 0 ? /* @__PURE__ */ h(a, { onUploaded: () => void w() }) : void 0
398
- }) : /* @__PURE__ */ g("div", {
399
- className: "space-y-4",
400
- children: [M === "grid" ? /* @__PURE__ */ h("div", {
401
- className: "grid grid-cols-2 gap-4 md:grid-cols-3 lg:grid-cols-4",
402
- children: J.map((t) => {
403
- let n = P.has(t.id);
404
- return /* @__PURE__ */ g("div", {
405
- className: e("group overflow-hidden rounded-lg border bg-gloss-card transition-shadow hover:shadow-pop", n ? "border-action-primary-bg ring-2 ring-[var(--color-action-primary-bg)]" : "border-border-seam"),
406
- children: [/* @__PURE__ */ g("div", {
407
- className: "relative h-32 overflow-hidden rounded-t-lg",
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__ */ h(s, { asset: t }),
410
- /* @__PURE__ */ h("label", {
411
- 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",
412
- title: "Select asset",
413
- children: /* @__PURE__ */ h("input", {
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__ */ h("div", {
422
- className: "absolute right-2 top-2 z-20",
423
- children: /* @__PURE__ */ h(_, {
424
- variant: y[t.type],
425
- className: "shadow-pop backdrop-blur-sm",
426
- children: b(t)
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__ */ h("div", {
430
- 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",
431
- children: /* @__PURE__ */ h("button", {
432
- type: "button",
433
- onClick: () => S(t.url, t.name),
434
- "aria-label": `Download ${t.name}`,
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
- }), /* @__PURE__ */ g("div", {
441
- className: "p-3",
442
- children: [
443
- /* @__PURE__ */ g("div", {
444
- className: "flex items-start justify-between gap-2",
445
- children: [/* @__PURE__ */ h("p", {
446
- className: "truncate text-sm font-medium text-text-primary",
447
- children: t.name
448
- }), /* @__PURE__ */ h(o, {
449
- id: `asset-menu-${t.id}`,
450
- items: [
451
- {
452
- key: "copy",
453
- label: "Copy URL",
454
- icon: /* @__PURE__ */ h(d, { className: "h-4 w-4" }),
455
- onClick: () => void T(t.url)
456
- },
457
- {
458
- key: "download",
459
- label: "Download",
460
- icon: /* @__PURE__ */ h(f, { className: "h-4 w-4" }),
461
- onClick: () => S(t.url, t.name)
462
- },
463
- {
464
- key: "delete",
465
- label: "Delete",
466
- icon: /* @__PURE__ */ h(p, { className: "h-4 w-4" }),
467
- danger: !0,
468
- onClick: () => void Q(t)
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
- /* @__PURE__ */ g("div", {
474
- className: "mt-1 flex items-center justify-between",
475
- children: [/* @__PURE__ */ g("span", {
476
- className: "text-xs text-text-secondary",
477
- children: [x(t.size), t.dimensions ? ` · ${t.dimensions.width}×${t.dimensions.height}` : ""]
478
- }), /* @__PURE__ */ g("div", {
479
- className: "flex min-w-0 items-center gap-1",
480
- children: [/* @__PURE__ */ h(ce, { className: "h-3 w-3 shrink-0 text-text-secondary" }), /* @__PURE__ */ h("span", {
481
- className: "truncate text-xs text-text-secondary",
482
- children: t.folder
483
- })]
484
- })]
485
- }),
486
- t.tags.length > 0 && /* @__PURE__ */ g("div", {
487
- className: "mt-2 flex flex-wrap gap-1",
488
- children: [t.tags.slice(0, 2).map((e) => /* @__PURE__ */ h("span", {
489
- className: "rounded-full bg-bg-sunken px-2 py-0.5 text-[10px] text-text-secondary",
490
- children: e
491
- }, e)), t.tags.length > 2 && /* @__PURE__ */ g("span", {
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
- }, t.id);
499
- })
500
- }) : /* @__PURE__ */ h(r, {
501
- data: J,
502
- columns: Me,
503
- pageSize: B,
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 { C as AssetLibraryPage };
618
+ export { E as AssetLibraryPage };
526
619
 
527
620
  //# sourceMappingURL=AssetLibraryPage.js.map