@burdenoff/microfe-headshotmarketing 2026.704.4 → 2026.704.5
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.js +118 -111
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.js +27 -19
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/headshotmarketing/components/Toast.js +56 -2
- package/dist/headshotmarketing/components/Toast.js.map +1 -0
- package/dist/headshotmarketing/pages/HomeFunnel.js +54 -0
- package/dist/headshotmarketing/pages/HomeFunnel.js.map +1 -0
- package/dist/headshotmarketing/pages/HomePage.js +423 -259
- package/dist/headshotmarketing/pages/HomePage.js.map +1 -1
- package/dist/headshotmarketing/pages/HomeStatCard.js +79 -0
- package/dist/headshotmarketing/pages/HomeStatCard.js.map +1 -0
- package/dist/headshotmarketing/pages/ads/AdPlatformChips.js +93 -0
- package/dist/headshotmarketing/pages/ads/AdPlatformChips.js.map +1 -0
- package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js +452 -390
- package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/ReportsPage.js +405 -115
- package/dist/headshotmarketing/pages/analytics/ReportsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js +565 -345
- package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowCanvasNode.js +107 -0
- package/dist/headshotmarketing/pages/automation/WorkflowCanvasNode.js.map +1 -0
- package/dist/headshotmarketing/pages/automation/WorkflowNodeConfigPanel.js +213 -0
- package/dist/headshotmarketing/pages/automation/WorkflowNodeConfigPanel.js.map +1 -0
- package/dist/headshotmarketing/pages/automation/workflowBuilderModel.js +150 -0
- package/dist/headshotmarketing/pages/automation/workflowBuilderModel.js.map +1 -0
- package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js +380 -371
- package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js.map +1 -1
- package/dist/headshotmarketing/pages/builder/SectionCanvasBlock.js +92 -0
- package/dist/headshotmarketing/pages/builder/SectionCanvasBlock.js.map +1 -0
- package/dist/headshotmarketing/pages/builder/SectionContent.js +346 -0
- package/dist/headshotmarketing/pages/builder/SectionContent.js.map +1 -0
- package/dist/headshotmarketing/pages/builder/SectionInspector.js +358 -0
- package/dist/headshotmarketing/pages/builder/SectionInspector.js.map +1 -0
- package/dist/headshotmarketing/pages/builder/builderCatalog.js +274 -0
- package/dist/headshotmarketing/pages/builder/builderCatalog.js.map +1 -0
- package/dist/headshotmarketing/pages/content/AIToolsPage.js +479 -193
- package/dist/headshotmarketing/pages/content/AIToolsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/AssetLibraryPage.js +492 -197
- package/dist/headshotmarketing/pages/content/AssetLibraryPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/AssetThumbnail.js +37 -0
- package/dist/headshotmarketing/pages/content/AssetThumbnail.js.map +1 -0
- package/dist/headshotmarketing/pages/content/ContentCreationPage.js +672 -219
- package/dist/headshotmarketing/pages/content/ContentCreationPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentLibraryCard.js +200 -0
- package/dist/headshotmarketing/pages/content/ContentLibraryCard.js.map +1 -0
- package/dist/headshotmarketing/pages/content/ContentPage.js +224 -204
- package/dist/headshotmarketing/pages/content/ContentPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentSubNav.js +51 -0
- package/dist/headshotmarketing/pages/content/ContentSubNav.js.map +1 -0
- package/dist/headshotmarketing/pages/crm/LeadsPage.js +250 -131
- package/dist/headshotmarketing/pages/crm/LeadsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/LeadsWidgets.js +179 -0
- package/dist/headshotmarketing/pages/crm/LeadsWidgets.js.map +1 -0
- package/dist/headshotmarketing/pages/events/CreateEventPage.js +631 -379
- package/dist/headshotmarketing/pages/events/CreateEventPage.js.map +1 -1
- package/dist/headshotmarketing/pages/events/EventImageUpload.js +123 -0
- package/dist/headshotmarketing/pages/events/EventImageUpload.js.map +1 -0
- package/dist/headshotmarketing/pages/events/EventPagePreview.js +99 -0
- package/dist/headshotmarketing/pages/events/EventPagePreview.js.map +1 -0
- package/dist/headshotmarketing/pages/events/EventsPage.js +267 -228
- package/dist/headshotmarketing/pages/events/EventsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/seo/SeoScoreGauge.js +50 -0
- package/dist/headshotmarketing/pages/seo/SeoScoreGauge.js.map +1 -0
- package/dist/headshotmarketing/pages/seo/SeoScorePanel.js +147 -0
- package/dist/headshotmarketing/pages/seo/SeoScorePanel.js.map +1 -0
- package/dist/headshotmarketing/pages/seo/SeoToolsPage.js +562 -419
- package/dist/headshotmarketing/pages/seo/SeoToolsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/MediaDropZone.js +108 -0
- package/dist/headshotmarketing/pages/social-media/MediaDropZone.js.map +1 -0
- package/dist/headshotmarketing/pages/social-media/SocialComposerPreview.js +100 -0
- package/dist/headshotmarketing/pages/social-media/SocialComposerPreview.js.map +1 -0
- package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js +315 -250
- package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/socialComposerMeta.js +60 -0
- package/dist/headshotmarketing/pages/social-media/socialComposerMeta.js.map +1 -0
- package/dist/headshotmarketing/utils/automationMapper.js +1 -1
- package/dist/headshotmarketing/utils/automationMapper.js.map +1 -1
- package/dist/headshotmarketing/utils/contentMapper.js +4 -24
- package/dist/headshotmarketing/utils/contentMapper.js.map +1 -1
- package/dist/headshotmarketing/utils/eventsMapper.js +9 -9
- package/dist/headshotmarketing/utils/eventsMapper.js.map +1 -1
- package/dist/headshotmarketing/utils/helpers.js +7 -4
- package/dist/headshotmarketing/utils/helpers.js.map +1 -1
- package/dist/headshotmarketing/utils/influencerMapper.js +1 -1
- package/dist/headshotmarketing/utils/influencerMapper.js.map +1 -1
- package/dist/node_modules/lodash/_arrayEach.js +14 -0
- package/dist/node_modules/lodash/_arrayEach.js.map +1 -0
- package/dist/node_modules/lodash/_assignValue.js +17 -0
- package/dist/node_modules/lodash/_assignValue.js.map +1 -0
- package/dist/node_modules/lodash/_baseAssign.js +16 -0
- package/dist/node_modules/lodash/_baseAssign.js.map +1 -0
- package/dist/node_modules/lodash/_baseAssignIn.js +16 -0
- package/dist/node_modules/lodash/_baseAssignIn.js.map +1 -0
- package/dist/node_modules/lodash/_baseClone.js +64 -0
- package/dist/node_modules/lodash/_baseClone.js.map +1 -0
- package/dist/node_modules/lodash/_baseCreate.js +21 -0
- package/dist/node_modules/lodash/_baseCreate.js.map +1 -0
- package/dist/node_modules/lodash/_baseIsMap.js +16 -0
- package/dist/node_modules/lodash/_baseIsMap.js.map +1 -0
- package/dist/node_modules/lodash/_baseIsSet.js +16 -0
- package/dist/node_modules/lodash/_baseIsSet.js.map +1 -0
- package/dist/node_modules/lodash/_baseKeysIn.js +20 -0
- package/dist/node_modules/lodash/_baseKeysIn.js.map +1 -0
- package/dist/node_modules/lodash/_baseUnset.js +26 -0
- package/dist/node_modules/lodash/_baseUnset.js.map +1 -0
- package/dist/node_modules/lodash/_cloneArrayBuffer.js +16 -0
- package/dist/node_modules/lodash/_cloneArrayBuffer.js.map +1 -0
- package/dist/node_modules/lodash/_cloneBuffer.js +17 -0
- package/dist/node_modules/lodash/_cloneBuffer.js.map +1 -0
- package/dist/node_modules/lodash/_cloneDataView.js +16 -0
- package/dist/node_modules/lodash/_cloneDataView.js.map +1 -0
- package/dist/node_modules/lodash/_cloneRegExp.js +15 -0
- package/dist/node_modules/lodash/_cloneRegExp.js.map +1 -0
- package/dist/node_modules/lodash/_cloneSymbol.js +15 -0
- package/dist/node_modules/lodash/_cloneSymbol.js.map +1 -0
- package/dist/node_modules/lodash/_cloneTypedArray.js +16 -0
- package/dist/node_modules/lodash/_cloneTypedArray.js.map +1 -0
- package/dist/node_modules/lodash/_copyArray.js +15 -0
- package/dist/node_modules/lodash/_copyArray.js.map +1 -0
- package/dist/node_modules/lodash/_copyObject.js +22 -0
- package/dist/node_modules/lodash/_copyObject.js.map +1 -0
- package/dist/node_modules/lodash/_copySymbols.js +16 -0
- package/dist/node_modules/lodash/_copySymbols.js.map +1 -0
- package/dist/node_modules/lodash/_copySymbolsIn.js +16 -0
- package/dist/node_modules/lodash/_copySymbolsIn.js.map +1 -0
- package/dist/node_modules/lodash/_customOmitClone.js +15 -0
- package/dist/node_modules/lodash/_customOmitClone.js.map +1 -0
- package/dist/node_modules/lodash/_flatRest.js +17 -0
- package/dist/node_modules/lodash/_flatRest.js.map +1 -0
- package/dist/node_modules/lodash/_getAllKeysIn.js +17 -0
- package/dist/node_modules/lodash/_getAllKeysIn.js.map +1 -0
- package/dist/node_modules/lodash/_getSymbolsIn.js +18 -0
- package/dist/node_modules/lodash/_getSymbolsIn.js.map +1 -0
- package/dist/node_modules/lodash/_initCloneArray.js +15 -0
- package/dist/node_modules/lodash/_initCloneArray.js.map +1 -0
- package/dist/node_modules/lodash/_initCloneByTag.js +40 -0
- package/dist/node_modules/lodash/_initCloneByTag.js.map +1 -0
- package/dist/node_modules/lodash/_initCloneObject.js +17 -0
- package/dist/node_modules/lodash/_initCloneObject.js.map +1 -0
- package/dist/node_modules/lodash/_nativeKeysIn.js +15 -0
- package/dist/node_modules/lodash/_nativeKeysIn.js.map +1 -0
- package/dist/node_modules/lodash/_parent.js +16 -0
- package/dist/node_modules/lodash/_parent.js.map +1 -0
- package/dist/node_modules/lodash/flatten.js +15 -0
- package/dist/node_modules/lodash/flatten.js.map +1 -0
- package/dist/node_modules/lodash/isMap.js +14 -0
- package/dist/node_modules/lodash/isMap.js.map +1 -0
- package/dist/node_modules/lodash/isSet.js +14 -0
- package/dist/node_modules/lodash/isSet.js.map +1 -0
- package/dist/node_modules/lodash/keysIn.js +17 -0
- package/dist/node_modules/lodash/keysIn.js.map +1 -0
- package/dist/node_modules/lodash/omit.js +28 -0
- package/dist/node_modules/lodash/omit.js.map +1 -0
- package/dist/node_modules/recharts/es6/chart/FunnelChart.js +15 -0
- package/dist/node_modules/recharts/es6/chart/FunnelChart.js.map +1 -0
- package/dist/node_modules/recharts/es6/numberAxis/Funnel.js +370 -0
- package/dist/node_modules/recharts/es6/numberAxis/Funnel.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/ActiveShapeUtils.js +1 -1
- package/dist/node_modules/recharts/es6/util/FunnelUtils.js +81 -0
- package/dist/node_modules/recharts/es6/util/FunnelUtils.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,231 +1,526 @@
|
|
|
1
1
|
import { cn as e, formatNumber as t } from "../../utils/helpers.js";
|
|
2
2
|
import { PageLayout as n } from "../../components/PageLayout.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
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";
|
|
8
|
+
import { AssetUploadButton as a } from "../../components/AssetUploadButton.js";
|
|
9
|
+
import { ActionMenu as o } from "../../components/ActionMenu.js";
|
|
9
10
|
import "../../components/index.js";
|
|
10
|
-
import { useHeadshotmarketingBootstrap as
|
|
11
|
-
import { usePagination as
|
|
12
|
-
import { toAssetModel as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
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";
|
|
14
|
+
import { AssetThumbnail as s } from "./AssetThumbnail.js";
|
|
15
|
+
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";
|
|
20
22
|
//#region src/headshotmarketing/pages/content/AssetLibraryPage.tsx
|
|
21
|
-
var
|
|
23
|
+
var v = m`
|
|
22
24
|
mutation HeadshotmarketingDeleteAsset($id: ID!) {
|
|
23
25
|
headshotmarketingDeleteAsset(id: $id)
|
|
24
26
|
}
|
|
25
|
-
`,
|
|
26
|
-
image:
|
|
27
|
-
video:
|
|
28
|
-
document:
|
|
29
|
-
audio:
|
|
30
|
-
font:
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
27
|
+
`, y = {
|
|
28
|
+
image: "success",
|
|
29
|
+
video: "info",
|
|
30
|
+
document: "warning",
|
|
31
|
+
audio: "info",
|
|
32
|
+
font: "secondary"
|
|
33
|
+
}, ye = [
|
|
34
|
+
{
|
|
35
|
+
value: "all",
|
|
36
|
+
label: "All types"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
value: "image",
|
|
40
|
+
label: "Images"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
value: "video",
|
|
44
|
+
label: "Videos"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
value: "document",
|
|
48
|
+
label: "Documents"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
value: "audio",
|
|
52
|
+
label: "Audio"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
value: "font",
|
|
56
|
+
label: "Fonts"
|
|
57
|
+
}
|
|
58
|
+
], be = [
|
|
59
|
+
{
|
|
60
|
+
value: "newest",
|
|
61
|
+
label: "Newest first"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
value: "name",
|
|
65
|
+
label: "Name (A–Z)"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
value: "size",
|
|
69
|
+
label: "Largest first"
|
|
70
|
+
}
|
|
37
71
|
];
|
|
38
|
-
function
|
|
72
|
+
function b(e) {
|
|
73
|
+
let t = e.name.includes(".") && !e.name.endsWith(".") ? e.name.split(".").pop() ?? "" : "";
|
|
74
|
+
if (t && t.length <= 5 && /^[a-z0-9]+$/i.test(t)) return t.toUpperCase();
|
|
75
|
+
let n = e.mimeType.split("/")[1]?.split(";")[0];
|
|
76
|
+
return n ? n.toUpperCase().slice(0, 5) : e.type.toUpperCase();
|
|
77
|
+
}
|
|
78
|
+
function x(e) {
|
|
79
|
+
return e >= 1048576 ? `${(e / 1048576).toFixed(1)} MB` : e >= 1024 ? `${(e / 1024).toFixed(0)} KB` : `${e} B`;
|
|
80
|
+
}
|
|
81
|
+
function S(e, t) {
|
|
39
82
|
let n = document.createElement("a");
|
|
40
83
|
n.href = e, n.download = t, n.target = "_blank", n.rel = "noopener", document.body.appendChild(n), n.click(), n.remove();
|
|
41
84
|
}
|
|
42
|
-
var
|
|
43
|
-
let { data:
|
|
44
|
-
let
|
|
45
|
-
return t
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}, [
|
|
50
|
-
|
|
85
|
+
var C = () => {
|
|
86
|
+
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(() => {
|
|
87
|
+
let e = D.trim().toLowerCase();
|
|
88
|
+
return G.filter((t) => {
|
|
89
|
+
let n = !e || t.name.toLowerCase().includes(e) || t.tags.some((t) => t.toLowerCase().includes(e)), r = O === "all" || t.type === O;
|
|
90
|
+
return n && r;
|
|
91
|
+
});
|
|
92
|
+
}, [
|
|
93
|
+
G,
|
|
94
|
+
D,
|
|
95
|
+
O
|
|
96
|
+
]), q = l(() => {
|
|
97
|
+
let e = [...K];
|
|
98
|
+
switch (A) {
|
|
99
|
+
case "name": return e.sort((e, t) => e.name.localeCompare(t.name));
|
|
100
|
+
case "size": return e.sort((e, t) => t.size - e.size);
|
|
101
|
+
default: return e.sort((e, t) => new Date(t.createdAt).getTime() - new Date(e.createdAt).getTime());
|
|
102
|
+
}
|
|
103
|
+
}, [K, A]);
|
|
104
|
+
c(() => {
|
|
105
|
+
W(q.length);
|
|
106
|
+
}, [q.length, W]), c(() => {
|
|
107
|
+
U(1);
|
|
51
108
|
}, [
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
109
|
+
D,
|
|
110
|
+
O,
|
|
111
|
+
A,
|
|
112
|
+
U
|
|
113
|
+
]), c(() => {
|
|
114
|
+
F(/* @__PURE__ */ new Set());
|
|
115
|
+
}, [D, O]);
|
|
116
|
+
let J = l(() => q.slice(V, V + H), [
|
|
117
|
+
q,
|
|
118
|
+
V,
|
|
119
|
+
H
|
|
120
|
+
]), 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) => {
|
|
121
|
+
F((t) => {
|
|
122
|
+
let n = new Set(t);
|
|
123
|
+
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
124
|
+
});
|
|
125
|
+
}, ke = () => {
|
|
126
|
+
F((e) => e.size === q.length && q.length > 0 ? /* @__PURE__ */ new Set() : new Set(q.map((e) => e.id)));
|
|
127
|
+
}, Z = () => F(/* @__PURE__ */ new Set()), Q = async (e) => {
|
|
128
|
+
if (L(null), window.confirm(`Delete "${e.name}"? This action can't be undone.`)) try {
|
|
129
|
+
await E({ variables: { id: e.id } }), F((t) => {
|
|
130
|
+
if (!t.has(e.id)) return t;
|
|
131
|
+
let n = new Set(t);
|
|
132
|
+
return n.delete(e.id), n;
|
|
133
|
+
}), await w();
|
|
59
134
|
} catch (e) {
|
|
60
|
-
|
|
135
|
+
L(e instanceof Error ? e.message : "Failed to delete the asset.");
|
|
61
136
|
}
|
|
62
|
-
}
|
|
63
|
-
|
|
137
|
+
}, Ae = () => {
|
|
138
|
+
Y.forEach((e, t) => {
|
|
139
|
+
window.setTimeout(() => S(e.url, e.name), t * 150);
|
|
140
|
+
});
|
|
141
|
+
}, je = async () => {
|
|
142
|
+
let e = Y.map((e) => e.id);
|
|
143
|
+
if (e.length !== 0 && window.confirm(`Delete ${e.length} asset${e.length > 1 ? "s" : ""}? This action can't be undone.`)) {
|
|
144
|
+
L(null), z(!0);
|
|
145
|
+
try {
|
|
146
|
+
let t = (await Promise.allSettled(e.map((e) => E({ variables: { id: e } })))).filter((e) => e.status === "rejected").length;
|
|
147
|
+
await w(), Z(), t > 0 && L(`Deleted ${e.length - t} of ${e.length}; ${t} could not be removed.`);
|
|
148
|
+
} catch (e) {
|
|
149
|
+
L(e instanceof Error ? e.message : "Bulk delete failed.");
|
|
150
|
+
} finally {
|
|
151
|
+
z(!1);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}, Me = [
|
|
155
|
+
{
|
|
156
|
+
key: "select",
|
|
157
|
+
header: "",
|
|
158
|
+
className: "w-10",
|
|
159
|
+
render: (e) => /* @__PURE__ */ h("input", {
|
|
160
|
+
type: "checkbox",
|
|
161
|
+
checked: P.has(e.id),
|
|
162
|
+
onChange: () => X(e.id),
|
|
163
|
+
onClick: (e) => e.stopPropagation(),
|
|
164
|
+
"aria-label": `Select ${e.name}`,
|
|
165
|
+
className: "h-4 w-4 cursor-pointer accent-[var(--color-action-primary-bg)]"
|
|
166
|
+
})
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
key: "preview",
|
|
170
|
+
header: "",
|
|
171
|
+
className: "w-16",
|
|
172
|
+
render: (e) => /* @__PURE__ */ h("div", {
|
|
173
|
+
className: "h-9 w-12 overflow-hidden rounded-md border border-border-subtle",
|
|
174
|
+
children: /* @__PURE__ */ h(s, {
|
|
175
|
+
asset: e,
|
|
176
|
+
iconSize: "h-4 w-4",
|
|
177
|
+
playBadgeSize: "h-6 w-6"
|
|
178
|
+
})
|
|
179
|
+
})
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
key: "name",
|
|
183
|
+
header: "Name",
|
|
184
|
+
sortable: !0,
|
|
185
|
+
render: (e) => /* @__PURE__ */ h("span", {
|
|
186
|
+
className: "font-medium text-text-primary",
|
|
187
|
+
children: e.name
|
|
188
|
+
})
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
key: "type",
|
|
192
|
+
header: "Type",
|
|
193
|
+
render: (e) => /* @__PURE__ */ h(_, {
|
|
194
|
+
variant: y[e.type],
|
|
195
|
+
children: b(e)
|
|
196
|
+
})
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
key: "size",
|
|
200
|
+
header: "Size",
|
|
201
|
+
sortable: !0,
|
|
202
|
+
render: (e) => /* @__PURE__ */ h("span", {
|
|
203
|
+
className: "text-text-secondary",
|
|
204
|
+
children: x(e.size)
|
|
205
|
+
})
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
key: "dimensions",
|
|
209
|
+
header: "Dimensions",
|
|
210
|
+
render: (e) => /* @__PURE__ */ h("span", {
|
|
211
|
+
className: "text-text-secondary",
|
|
212
|
+
children: e.dimensions ? `${e.dimensions.width}×${e.dimensions.height}` : "—"
|
|
213
|
+
})
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
key: "actions",
|
|
217
|
+
header: "",
|
|
218
|
+
className: "w-12 text-right",
|
|
219
|
+
render: (e) => /* @__PURE__ */ h("div", {
|
|
220
|
+
className: "flex justify-end",
|
|
221
|
+
onClick: (e) => e.stopPropagation(),
|
|
222
|
+
role: "presentation",
|
|
223
|
+
children: /* @__PURE__ */ h(o, {
|
|
224
|
+
id: `asset-row-menu-${e.id}`,
|
|
225
|
+
items: [
|
|
226
|
+
{
|
|
227
|
+
key: "copy",
|
|
228
|
+
label: "Copy URL",
|
|
229
|
+
icon: /* @__PURE__ */ h(d, { className: "h-4 w-4" }),
|
|
230
|
+
onClick: () => void T(e.url)
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
key: "download",
|
|
234
|
+
label: "Download",
|
|
235
|
+
icon: /* @__PURE__ */ h(f, { className: "h-4 w-4" }),
|
|
236
|
+
onClick: () => S(e.url, e.name)
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
key: "delete",
|
|
240
|
+
label: "Delete",
|
|
241
|
+
icon: /* @__PURE__ */ h(p, { className: "h-4 w-4" }),
|
|
242
|
+
danger: !0,
|
|
243
|
+
onClick: () => void Q(e)
|
|
244
|
+
}
|
|
245
|
+
]
|
|
246
|
+
})
|
|
247
|
+
})
|
|
248
|
+
}
|
|
249
|
+
], $ = "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)]";
|
|
250
|
+
return /* @__PURE__ */ g(n, {
|
|
64
251
|
title: "Asset Library",
|
|
65
252
|
description: "Manage your marketing assets and media files",
|
|
66
|
-
actions: /* @__PURE__ */
|
|
67
|
-
children: [/* @__PURE__ */
|
|
68
|
-
loading:
|
|
69
|
-
error:
|
|
70
|
-
onRetry: () => void
|
|
71
|
-
hasData: !!
|
|
253
|
+
actions: /* @__PURE__ */ h(a, { onUploaded: () => void w() }),
|
|
254
|
+
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, {
|
|
255
|
+
loading: C,
|
|
256
|
+
error: xe,
|
|
257
|
+
onRetry: () => void w(),
|
|
258
|
+
hasData: !!m,
|
|
72
259
|
children: [
|
|
73
|
-
|
|
260
|
+
I && /* @__PURE__ */ h("div", {
|
|
74
261
|
role: "alert",
|
|
75
262
|
className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
|
|
76
|
-
children:
|
|
263
|
+
children: I
|
|
77
264
|
}),
|
|
78
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ h(_e, { children: /* @__PURE__ */ h("div", {
|
|
79
266
|
className: "grid grid-cols-2 gap-4 sm:grid-cols-4",
|
|
80
267
|
children: [
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
className: "
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
className: "
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
268
|
+
{
|
|
269
|
+
label: "Total Assets",
|
|
270
|
+
value: t(G.length),
|
|
271
|
+
icon: /* @__PURE__ */ h(se, { className: "h-5 w-5" })
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
label: "Images",
|
|
275
|
+
value: t(Ee),
|
|
276
|
+
icon: /* @__PURE__ */ h(ue, { className: "h-5 w-5" })
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
label: "Videos",
|
|
280
|
+
value: t(De),
|
|
281
|
+
icon: /* @__PURE__ */ h(pe, { className: "h-5 w-5" })
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
label: "Total Size",
|
|
285
|
+
value: x(Te),
|
|
286
|
+
icon: /* @__PURE__ */ h(le, { className: "h-5 w-5" })
|
|
287
|
+
}
|
|
288
|
+
].map((e) => /* @__PURE__ */ g("div", {
|
|
289
|
+
className: "flex items-center gap-3",
|
|
290
|
+
children: [/* @__PURE__ */ h("span", {
|
|
291
|
+
className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-bg-sunken text-text-secondary",
|
|
292
|
+
children: e.icon
|
|
293
|
+
}), /* @__PURE__ */ g("div", {
|
|
294
|
+
className: "min-w-0",
|
|
295
|
+
children: [/* @__PURE__ */ h("p", {
|
|
296
|
+
className: "truncate text-xs text-text-secondary",
|
|
297
|
+
children: e.label
|
|
298
|
+
}), /* @__PURE__ */ h("p", {
|
|
299
|
+
className: "text-2xl font-semibold text-text-primary",
|
|
300
|
+
children: e.value
|
|
301
|
+
})]
|
|
302
|
+
})]
|
|
303
|
+
}, e.label))
|
|
110
304
|
}) }),
|
|
111
|
-
/* @__PURE__ */
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
className:
|
|
117
|
-
children:
|
|
118
|
-
|
|
305
|
+
/* @__PURE__ */ h(te, {
|
|
306
|
+
searchValue: D,
|
|
307
|
+
onSearchChange: Se,
|
|
308
|
+
searchPlaceholder: "Search assets by name or tag...",
|
|
309
|
+
filters: /* @__PURE__ */ g("div", {
|
|
310
|
+
className: "flex flex-nowrap items-center gap-2 overflow-x-auto",
|
|
311
|
+
children: [/* @__PURE__ */ h("select", {
|
|
312
|
+
value: O,
|
|
313
|
+
onChange: (e) => k(e.target.value),
|
|
314
|
+
"aria-label": "Filter by type",
|
|
315
|
+
className: $,
|
|
316
|
+
children: ye.map((e) => /* @__PURE__ */ h("option", {
|
|
317
|
+
value: e.value,
|
|
318
|
+
children: e.label
|
|
319
|
+
}, e.value))
|
|
320
|
+
}), /* @__PURE__ */ g("div", {
|
|
321
|
+
className: "relative",
|
|
322
|
+
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", {
|
|
323
|
+
value: A,
|
|
324
|
+
onChange: (e) => j(e.target.value),
|
|
325
|
+
"aria-label": "Sort assets",
|
|
326
|
+
className: e($, "pl-9"),
|
|
327
|
+
children: be.map((e) => /* @__PURE__ */ h("option", {
|
|
328
|
+
value: e.value,
|
|
329
|
+
children: e.label
|
|
330
|
+
}, e.value))
|
|
331
|
+
})]
|
|
332
|
+
})]
|
|
333
|
+
}),
|
|
334
|
+
actions: /* @__PURE__ */ g("div", {
|
|
335
|
+
className: "flex items-center gap-1 rounded-md border border-border-subtle p-0.5",
|
|
336
|
+
children: [/* @__PURE__ */ h("button", {
|
|
337
|
+
type: "button",
|
|
338
|
+
onClick: () => N("grid"),
|
|
339
|
+
"aria-label": "Grid view",
|
|
340
|
+
"aria-pressed": M === "grid",
|
|
341
|
+
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"),
|
|
342
|
+
children: /* @__PURE__ */ h(de, { className: "h-4 w-4" })
|
|
343
|
+
}), /* @__PURE__ */ h("button", {
|
|
344
|
+
type: "button",
|
|
345
|
+
onClick: () => N("list"),
|
|
346
|
+
"aria-label": "List view",
|
|
347
|
+
"aria-pressed": M === "list",
|
|
348
|
+
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"),
|
|
349
|
+
children: /* @__PURE__ */ h(fe, { className: "h-4 w-4" })
|
|
350
|
+
})]
|
|
351
|
+
})
|
|
119
352
|
}),
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
353
|
+
P.size > 0 && /* @__PURE__ */ g("div", {
|
|
354
|
+
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",
|
|
355
|
+
children: [/* @__PURE__ */ g("div", {
|
|
356
|
+
className: "flex items-center gap-3",
|
|
357
|
+
children: [/* @__PURE__ */ g("span", {
|
|
358
|
+
className: "text-sm font-medium text-text-primary",
|
|
359
|
+
children: [P.size, " selected"]
|
|
360
|
+
}), /* @__PURE__ */ h("button", {
|
|
361
|
+
type: "button",
|
|
362
|
+
onClick: ke,
|
|
363
|
+
className: "text-xs font-medium text-text-secondary underline-offset-2 hover:text-text-primary hover:underline",
|
|
364
|
+
children: Oe ? "Clear all" : `Select all ${q.length}`
|
|
365
|
+
})]
|
|
366
|
+
}), /* @__PURE__ */ g("div", {
|
|
367
|
+
className: "flex flex-wrap items-center gap-2",
|
|
368
|
+
children: [
|
|
369
|
+
/* @__PURE__ */ g("button", {
|
|
370
|
+
type: "button",
|
|
371
|
+
onClick: Ae,
|
|
372
|
+
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",
|
|
373
|
+
children: [/* @__PURE__ */ h(f, { className: "h-4 w-4" }), "Download"]
|
|
374
|
+
}),
|
|
375
|
+
/* @__PURE__ */ g("button", {
|
|
376
|
+
type: "button",
|
|
377
|
+
onClick: () => void je(),
|
|
378
|
+
disabled: R,
|
|
379
|
+
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",
|
|
380
|
+
children: [/* @__PURE__ */ h(p, { className: "h-4 w-4" }), R ? "Deleting…" : "Delete"]
|
|
381
|
+
}),
|
|
382
|
+
/* @__PURE__ */ h("button", {
|
|
383
|
+
type: "button",
|
|
384
|
+
onClick: Z,
|
|
385
|
+
"aria-label": "Clear selection",
|
|
386
|
+
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",
|
|
387
|
+
children: /* @__PURE__ */ h(me, { className: "h-4 w-4" })
|
|
388
|
+
})
|
|
389
|
+
]
|
|
390
|
+
})]
|
|
124
391
|
}),
|
|
125
|
-
|
|
126
|
-
illustration:
|
|
127
|
-
title:
|
|
128
|
-
description:
|
|
129
|
-
action:
|
|
130
|
-
}) : /* @__PURE__ */
|
|
131
|
-
className: "
|
|
132
|
-
children:
|
|
133
|
-
className: "
|
|
134
|
-
children:
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
className: "
|
|
138
|
-
children: /* @__PURE__ */
|
|
139
|
-
|
|
140
|
-
onClick: () => N(e.url, e.name),
|
|
141
|
-
"aria-label": `Download ${e.name}`,
|
|
142
|
-
className: "rounded-md bg-bg-surface/90 p-1.5 text-text-primary hover:bg-bg-surface",
|
|
143
|
-
children: /* @__PURE__ */ E(h, { className: "h-4 w-4" })
|
|
144
|
-
})
|
|
145
|
-
})]
|
|
146
|
-
}), /* @__PURE__ */ D("div", {
|
|
147
|
-
className: "p-3",
|
|
148
|
-
children: [
|
|
149
|
-
/* @__PURE__ */ D("div", {
|
|
150
|
-
className: "flex items-start justify-between gap-2",
|
|
151
|
-
children: [/* @__PURE__ */ E("p", {
|
|
152
|
-
className: "text-sm font-medium text-text-primary truncate",
|
|
153
|
-
children: e.name
|
|
154
|
-
}), /* @__PURE__ */ E(c, {
|
|
155
|
-
id: `asset-menu-${e.id}`,
|
|
156
|
-
items: [
|
|
157
|
-
{
|
|
158
|
-
key: "copy",
|
|
159
|
-
label: "Copy URL",
|
|
160
|
-
icon: /* @__PURE__ */ E(m, { className: "h-4 w-4" }),
|
|
161
|
-
onClick: () => void P(e.url)
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
key: "download",
|
|
165
|
-
label: "Download",
|
|
166
|
-
icon: /* @__PURE__ */ E(h, { className: "h-4 w-4" }),
|
|
167
|
-
onClick: () => N(e.url, e.name)
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
key: "delete",
|
|
171
|
-
label: "Delete",
|
|
172
|
-
icon: /* @__PURE__ */ E(b, { className: "h-4 w-4" }),
|
|
173
|
-
danger: !0,
|
|
174
|
-
onClick: () => void ne(e)
|
|
175
|
-
}
|
|
176
|
-
]
|
|
177
|
-
})]
|
|
178
|
-
}),
|
|
179
|
-
/* @__PURE__ */ D("div", {
|
|
180
|
-
className: "flex items-center justify-between mt-1",
|
|
181
|
-
children: [/* @__PURE__ */ E("span", {
|
|
182
|
-
className: "text-xs text-text-secondary",
|
|
183
|
-
children: Q(e.size)
|
|
184
|
-
}), /* @__PURE__ */ D("div", {
|
|
185
|
-
className: "flex items-center gap-1",
|
|
186
|
-
children: [/* @__PURE__ */ E(_, { className: "h-3 w-3 text-text-secondary" }), /* @__PURE__ */ E("span", {
|
|
187
|
-
className: "text-xs text-text-secondary",
|
|
188
|
-
children: e.folder
|
|
189
|
-
})]
|
|
190
|
-
})]
|
|
191
|
-
}),
|
|
192
|
-
e.dimensions && /* @__PURE__ */ D("span", {
|
|
193
|
-
className: "text-[10px] text-text-secondary",
|
|
392
|
+
q.length === 0 ? /* @__PURE__ */ h(ee, {
|
|
393
|
+
illustration: G.length === 0 ? "empty-files" : "empty-search",
|
|
394
|
+
title: G.length === 0 ? "No assets yet" : "No assets match your filters",
|
|
395
|
+
description: G.length === 0 ? "Upload images, videos, logos or documents to build your shared asset library." : "Try a different search term or type filter.",
|
|
396
|
+
action: G.length === 0 ? /* @__PURE__ */ h(a, { onUploaded: () => void w() }) : void 0
|
|
397
|
+
}) : /* @__PURE__ */ g("div", {
|
|
398
|
+
className: "space-y-4",
|
|
399
|
+
children: [M === "grid" ? /* @__PURE__ */ h("div", {
|
|
400
|
+
className: "grid grid-cols-2 gap-4 md:grid-cols-3 lg:grid-cols-4",
|
|
401
|
+
children: J.map((t) => {
|
|
402
|
+
let n = P.has(t.id);
|
|
403
|
+
return /* @__PURE__ */ g("div", {
|
|
404
|
+
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"),
|
|
405
|
+
children: [/* @__PURE__ */ g("div", {
|
|
406
|
+
className: "relative h-32 overflow-hidden rounded-t-lg",
|
|
194
407
|
children: [
|
|
195
|
-
|
|
196
|
-
"
|
|
197
|
-
|
|
408
|
+
/* @__PURE__ */ h(s, { asset: t }),
|
|
409
|
+
/* @__PURE__ */ h("label", {
|
|
410
|
+
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",
|
|
411
|
+
title: "Select asset",
|
|
412
|
+
children: /* @__PURE__ */ h("input", {
|
|
413
|
+
type: "checkbox",
|
|
414
|
+
checked: n,
|
|
415
|
+
onChange: () => X(t.id),
|
|
416
|
+
"aria-label": `Select ${t.name}`,
|
|
417
|
+
className: "h-4 w-4 cursor-pointer accent-[var(--color-action-primary-bg)]"
|
|
418
|
+
})
|
|
419
|
+
}),
|
|
420
|
+
/* @__PURE__ */ h("div", {
|
|
421
|
+
className: "absolute right-2 top-2 z-20",
|
|
422
|
+
children: /* @__PURE__ */ h(_, {
|
|
423
|
+
variant: y[t.type],
|
|
424
|
+
className: "shadow-pop backdrop-blur-sm",
|
|
425
|
+
children: b(t)
|
|
426
|
+
})
|
|
427
|
+
}),
|
|
428
|
+
/* @__PURE__ */ h("div", {
|
|
429
|
+
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",
|
|
430
|
+
children: /* @__PURE__ */ h("button", {
|
|
431
|
+
type: "button",
|
|
432
|
+
onClick: () => S(t.url, t.name),
|
|
433
|
+
"aria-label": `Download ${t.name}`,
|
|
434
|
+
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",
|
|
435
|
+
children: /* @__PURE__ */ h(f, { className: "h-4 w-4" })
|
|
436
|
+
})
|
|
437
|
+
})
|
|
198
438
|
]
|
|
199
|
-
}),
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
439
|
+
}), /* @__PURE__ */ g("div", {
|
|
440
|
+
className: "p-3",
|
|
441
|
+
children: [
|
|
442
|
+
/* @__PURE__ */ g("div", {
|
|
443
|
+
className: "flex items-start justify-between gap-2",
|
|
444
|
+
children: [/* @__PURE__ */ h("p", {
|
|
445
|
+
className: "truncate text-sm font-medium text-text-primary",
|
|
446
|
+
children: t.name
|
|
447
|
+
}), /* @__PURE__ */ h(o, {
|
|
448
|
+
id: `asset-menu-${t.id}`,
|
|
449
|
+
items: [
|
|
450
|
+
{
|
|
451
|
+
key: "copy",
|
|
452
|
+
label: "Copy URL",
|
|
453
|
+
icon: /* @__PURE__ */ h(d, { className: "h-4 w-4" }),
|
|
454
|
+
onClick: () => void T(t.url)
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
key: "download",
|
|
458
|
+
label: "Download",
|
|
459
|
+
icon: /* @__PURE__ */ h(f, { className: "h-4 w-4" }),
|
|
460
|
+
onClick: () => S(t.url, t.name)
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
key: "delete",
|
|
464
|
+
label: "Delete",
|
|
465
|
+
icon: /* @__PURE__ */ h(p, { className: "h-4 w-4" }),
|
|
466
|
+
danger: !0,
|
|
467
|
+
onClick: () => void Q(t)
|
|
468
|
+
}
|
|
469
|
+
]
|
|
470
|
+
})]
|
|
471
|
+
}),
|
|
472
|
+
/* @__PURE__ */ g("div", {
|
|
473
|
+
className: "mt-1 flex items-center justify-between",
|
|
474
|
+
children: [/* @__PURE__ */ g("span", {
|
|
475
|
+
className: "text-xs text-text-secondary",
|
|
476
|
+
children: [x(t.size), t.dimensions ? ` · ${t.dimensions.width}×${t.dimensions.height}` : ""]
|
|
477
|
+
}), /* @__PURE__ */ g("div", {
|
|
478
|
+
className: "flex min-w-0 items-center gap-1",
|
|
479
|
+
children: [/* @__PURE__ */ h(ce, { className: "h-3 w-3 shrink-0 text-text-secondary" }), /* @__PURE__ */ h("span", {
|
|
480
|
+
className: "truncate text-xs text-text-secondary",
|
|
481
|
+
children: t.folder
|
|
482
|
+
})]
|
|
483
|
+
})]
|
|
484
|
+
}),
|
|
485
|
+
t.tags.length > 0 && /* @__PURE__ */ g("div", {
|
|
486
|
+
className: "mt-2 flex flex-wrap gap-1",
|
|
487
|
+
children: [t.tags.slice(0, 2).map((e) => /* @__PURE__ */ h("span", {
|
|
488
|
+
className: "rounded-full bg-bg-sunken px-2 py-0.5 text-[10px] text-text-secondary",
|
|
489
|
+
children: e
|
|
490
|
+
}, e)), t.tags.length > 2 && /* @__PURE__ */ g("span", {
|
|
491
|
+
className: "rounded-full bg-bg-sunken px-2 py-0.5 text-[10px] text-text-secondary",
|
|
492
|
+
children: ["+", t.tags.length - 2]
|
|
493
|
+
})]
|
|
494
|
+
})
|
|
495
|
+
]
|
|
496
|
+
})]
|
|
497
|
+
}, t.id);
|
|
498
|
+
})
|
|
499
|
+
}) : /* @__PURE__ */ h(r, {
|
|
500
|
+
data: J,
|
|
501
|
+
columns: Me,
|
|
502
|
+
pageSize: B,
|
|
503
|
+
emptyMessage: "No assets match your filters"
|
|
504
|
+
}), /* @__PURE__ */ h(ne, {
|
|
505
|
+
page: Ce,
|
|
506
|
+
pageSize: B,
|
|
507
|
+
total: q.length,
|
|
508
|
+
onPageChange: U,
|
|
509
|
+
onPageSizeChange: we,
|
|
510
|
+
pageSizeOptions: [
|
|
511
|
+
12,
|
|
512
|
+
24,
|
|
513
|
+
48
|
|
514
|
+
],
|
|
515
|
+
disabled: C,
|
|
516
|
+
hideWhenSinglePage: !0
|
|
517
|
+
})]
|
|
518
|
+
})
|
|
224
519
|
]
|
|
225
520
|
})]
|
|
226
521
|
});
|
|
227
522
|
};
|
|
228
523
|
//#endregion
|
|
229
|
-
export {
|
|
524
|
+
export { C as AssetLibraryPage };
|
|
230
525
|
|
|
231
526
|
//# sourceMappingURL=AssetLibraryPage.js.map
|