@orion-studios/payload-studio 0.6.0-beta.62 → 0.6.0-beta.64
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/admin/client.mjs
CHANGED
|
@@ -397,9 +397,10 @@
|
|
|
397
397
|
line-height: 1.25;
|
|
398
398
|
max-width: none;
|
|
399
399
|
overflow: visible;
|
|
400
|
-
overflow-wrap:
|
|
400
|
+
overflow-wrap: normal;
|
|
401
401
|
text-overflow: clip;
|
|
402
402
|
white-space: normal;
|
|
403
|
+
word-break: normal;
|
|
403
404
|
}
|
|
404
405
|
|
|
405
406
|
.orion-builder-v2-editor .gjs-traits-label {
|
|
@@ -416,22 +417,46 @@
|
|
|
416
417
|
gap: 6px;
|
|
417
418
|
}
|
|
418
419
|
|
|
419
|
-
.orion-builder-v2-editor .gjs-trt-trait__wrp
|
|
420
|
+
.orion-builder-v2-editor .gjs-trt-trait__wrp {
|
|
421
|
+
display: grid !important;
|
|
422
|
+
gap: 6px;
|
|
423
|
+
grid-template-columns: minmax(0, 1fr) !important;
|
|
424
|
+
min-width: 0 !important;
|
|
425
|
+
overflow: visible !important;
|
|
426
|
+
width: 100% !important;
|
|
427
|
+
}
|
|
428
|
+
|
|
420
429
|
.orion-builder-v2-editor .gjs-trt-trait__cnt {
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
width:
|
|
430
|
+
float: none !important;
|
|
431
|
+
margin-left: 0 !important;
|
|
432
|
+
max-width: none !important;
|
|
433
|
+
min-width: 0 !important;
|
|
434
|
+
overflow: visible !important;
|
|
435
|
+
padding-left: 0 !important;
|
|
436
|
+
width: 100% !important;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
.orion-builder-v2-editor .gjs-trt-trait__label {
|
|
440
|
+
display: block !important;
|
|
441
|
+
flex: none;
|
|
442
|
+
float: none !important;
|
|
443
|
+
max-width: none !important;
|
|
444
|
+
min-width: 0 !important;
|
|
445
|
+
padding: 0 !important;
|
|
446
|
+
width: 100% !important;
|
|
424
447
|
}
|
|
425
448
|
|
|
426
449
|
.orion-builder-v2-editor .gjs-trt-trait .gjs-field,
|
|
427
450
|
.orion-builder-v2-editor .gjs-trt-trait input,
|
|
428
451
|
.orion-builder-v2-editor .gjs-trt-trait select,
|
|
429
452
|
.orion-builder-v2-editor .gjs-trt-trait textarea {
|
|
430
|
-
|
|
453
|
+
box-sizing: border-box;
|
|
454
|
+
max-width: none !important;
|
|
455
|
+
min-width: 0 !important;
|
|
431
456
|
overflow: visible;
|
|
432
457
|
text-overflow: clip;
|
|
433
458
|
white-space: normal;
|
|
434
|
-
width: 100
|
|
459
|
+
width: 100% !important;
|
|
435
460
|
}
|
|
436
461
|
|
|
437
462
|
.orion-builder-v2-editor .gjs-sm-sectors {
|
|
@@ -732,124 +732,13 @@ function HeaderNavEditorWithPreview({
|
|
|
732
732
|
] });
|
|
733
733
|
}
|
|
734
734
|
|
|
735
|
-
// src/admin-app/components/
|
|
736
|
-
import { useState as useState4 } from "react";
|
|
735
|
+
// src/admin-app/components/MediaListItem.tsx
|
|
737
736
|
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
738
737
|
function formatFileSize(bytes) {
|
|
739
738
|
if (bytes < 1024) return `${bytes} B`;
|
|
740
739
|
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
741
740
|
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
742
741
|
}
|
|
743
|
-
function MediaDetailPanel({
|
|
744
|
-
id,
|
|
745
|
-
filename,
|
|
746
|
-
alt,
|
|
747
|
-
url,
|
|
748
|
-
filesize,
|
|
749
|
-
width,
|
|
750
|
-
height,
|
|
751
|
-
mimeType,
|
|
752
|
-
createdAt,
|
|
753
|
-
updateAction,
|
|
754
|
-
deleteAction
|
|
755
|
-
}) {
|
|
756
|
-
const [copied, setCopied] = useState4(false);
|
|
757
|
-
const [confirmDelete, setConfirmDelete] = useState4(false);
|
|
758
|
-
const copyUrl = async () => {
|
|
759
|
-
if (!url) return;
|
|
760
|
-
try {
|
|
761
|
-
await navigator.clipboard.writeText(url);
|
|
762
|
-
setCopied(true);
|
|
763
|
-
setTimeout(() => setCopied(false), 2e3);
|
|
764
|
-
} catch {
|
|
765
|
-
const input = document.createElement("input");
|
|
766
|
-
input.value = url;
|
|
767
|
-
document.body.appendChild(input);
|
|
768
|
-
input.select();
|
|
769
|
-
document.execCommand("copy");
|
|
770
|
-
document.body.removeChild(input);
|
|
771
|
-
setCopied(true);
|
|
772
|
-
setTimeout(() => setCopied(false), 2e3);
|
|
773
|
-
}
|
|
774
|
-
};
|
|
775
|
-
const metaRows = [];
|
|
776
|
-
if (filename) metaRows.push({ label: "Filename", value: filename });
|
|
777
|
-
if (typeof filesize === "number") metaRows.push({ label: "File size", value: formatFileSize(filesize) });
|
|
778
|
-
if (typeof width === "number" && typeof height === "number") metaRows.push({ label: "Dimensions", value: `${width} \xD7 ${height} px` });
|
|
779
|
-
if (mimeType) metaRows.push({ label: "Type", value: mimeType });
|
|
780
|
-
if (createdAt) {
|
|
781
|
-
try {
|
|
782
|
-
metaRows.push({ label: "Uploaded", value: new Date(createdAt).toLocaleDateString() });
|
|
783
|
-
} catch {
|
|
784
|
-
metaRows.push({ label: "Uploaded", value: createdAt });
|
|
785
|
-
}
|
|
786
|
-
}
|
|
787
|
-
return /* @__PURE__ */ jsxs5("div", { className: "orion-admin-grid", style: { alignItems: "start" }, children: [
|
|
788
|
-
/* @__PURE__ */ jsxs5("div", { children: [
|
|
789
|
-
/* @__PURE__ */ jsx5("div", { className: "orion-admin-card", children: url ? /* @__PURE__ */ jsx5("img", { alt: alt || filename || "Media", src: url, style: { borderRadius: 12, width: "100%" } }) : /* @__PURE__ */ jsx5("span", { children: "No preview available." }) }),
|
|
790
|
-
url ? /* @__PURE__ */ jsx5(
|
|
791
|
-
"button",
|
|
792
|
-
{
|
|
793
|
-
className: "orion-admin-action-button",
|
|
794
|
-
onClick: copyUrl,
|
|
795
|
-
style: { marginTop: "0.6rem", width: "100%" },
|
|
796
|
-
type: "button",
|
|
797
|
-
children: copied ? "Copied!" : "Copy URL"
|
|
798
|
-
}
|
|
799
|
-
) : null
|
|
800
|
-
] }),
|
|
801
|
-
/* @__PURE__ */ jsxs5("div", { style: { display: "grid", gap: "0.8rem" }, children: [
|
|
802
|
-
metaRows.length > 0 ? /* @__PURE__ */ jsx5("div", { className: "orion-admin-card orion-admin-meta-table", children: metaRows.map((row) => /* @__PURE__ */ jsxs5("div", { className: "orion-admin-meta-row", children: [
|
|
803
|
-
/* @__PURE__ */ jsx5("span", { className: "orion-admin-meta-label", children: row.label }),
|
|
804
|
-
/* @__PURE__ */ jsx5("span", { className: "orion-admin-meta-value", children: row.value })
|
|
805
|
-
] }, row.label)) }) : null,
|
|
806
|
-
/* @__PURE__ */ jsxs5("form", { action: updateAction, className: "orion-admin-form", children: [
|
|
807
|
-
/* @__PURE__ */ jsx5("input", { name: "id", type: "hidden", value: id }),
|
|
808
|
-
/* @__PURE__ */ jsxs5("label", { children: [
|
|
809
|
-
"Alt text",
|
|
810
|
-
/* @__PURE__ */ jsx5("input", { defaultValue: alt || "", name: "alt", required: true, type: "text" })
|
|
811
|
-
] }),
|
|
812
|
-
/* @__PURE__ */ jsx5("button", { type: "submit", children: "Save" })
|
|
813
|
-
] }),
|
|
814
|
-
confirmDelete ? /* @__PURE__ */ jsxs5("div", { className: "orion-admin-form", style: { borderColor: "#b42318" }, children: [
|
|
815
|
-
/* @__PURE__ */ jsx5("p", { style: { fontWeight: 700, margin: 0 }, children: "Are you sure you want to delete this asset?" }),
|
|
816
|
-
/* @__PURE__ */ jsx5("p", { style: { color: "var(--orion-admin-muted)", fontSize: "0.9rem", margin: 0 }, children: "This action cannot be undone." }),
|
|
817
|
-
/* @__PURE__ */ jsxs5("div", { style: { display: "flex", gap: "0.5rem" }, children: [
|
|
818
|
-
/* @__PURE__ */ jsxs5("form", { action: deleteAction, style: { flex: 1 }, children: [
|
|
819
|
-
/* @__PURE__ */ jsx5("input", { name: "id", type: "hidden", value: id }),
|
|
820
|
-
/* @__PURE__ */ jsx5("button", { style: { background: "#b42318", border: 0, borderRadius: 10, color: "#fff", cursor: "pointer", fontWeight: 800, padding: "0.55rem 0.8rem", width: "100%" }, type: "submit", children: "Yes, Delete" })
|
|
821
|
-
] }),
|
|
822
|
-
/* @__PURE__ */ jsx5(
|
|
823
|
-
"button",
|
|
824
|
-
{
|
|
825
|
-
onClick: () => setConfirmDelete(false),
|
|
826
|
-
style: { background: "transparent", border: "1px solid var(--orion-admin-border)", borderRadius: 10, cursor: "pointer", flex: 1, fontWeight: 700, padding: "0.55rem 0.8rem" },
|
|
827
|
-
type: "button",
|
|
828
|
-
children: "Cancel"
|
|
829
|
-
}
|
|
830
|
-
)
|
|
831
|
-
] })
|
|
832
|
-
] }) : /* @__PURE__ */ jsx5(
|
|
833
|
-
"button",
|
|
834
|
-
{
|
|
835
|
-
className: "orion-admin-action-button",
|
|
836
|
-
onClick: () => setConfirmDelete(true),
|
|
837
|
-
style: { background: "#b42318" },
|
|
838
|
-
type: "button",
|
|
839
|
-
children: "Delete Asset"
|
|
840
|
-
}
|
|
841
|
-
)
|
|
842
|
-
] })
|
|
843
|
-
] });
|
|
844
|
-
}
|
|
845
|
-
|
|
846
|
-
// src/admin-app/components/MediaListItem.tsx
|
|
847
|
-
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
848
|
-
function formatFileSize2(bytes) {
|
|
849
|
-
if (bytes < 1024) return `${bytes} B`;
|
|
850
|
-
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
851
|
-
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
852
|
-
}
|
|
853
742
|
function MediaListItem({
|
|
854
743
|
id,
|
|
855
744
|
filename,
|
|
@@ -864,26 +753,26 @@ function MediaListItem({
|
|
|
864
753
|
const label = filename || `Media ${id}`;
|
|
865
754
|
const altText = alt || "";
|
|
866
755
|
const metaParts = [];
|
|
867
|
-
if (typeof filesize === "number") metaParts.push(
|
|
756
|
+
if (typeof filesize === "number") metaParts.push(formatFileSize(filesize));
|
|
868
757
|
if (typeof width === "number" && typeof height === "number") metaParts.push(`${width}\xD7${height}`);
|
|
869
758
|
if (typeof mimeType === "string") metaParts.push(mimeType);
|
|
870
|
-
return /* @__PURE__ */
|
|
871
|
-
/* @__PURE__ */
|
|
872
|
-
url ? /* @__PURE__ */
|
|
873
|
-
/* @__PURE__ */
|
|
874
|
-
/* @__PURE__ */
|
|
875
|
-
/* @__PURE__ */
|
|
876
|
-
metaParts.length > 0 ? /* @__PURE__ */
|
|
759
|
+
return /* @__PURE__ */ jsxs5("a", { className: "orion-admin-list-item", href, children: [
|
|
760
|
+
/* @__PURE__ */ jsxs5("div", { style: { alignItems: "center", display: "flex", gap: "0.8rem" }, children: [
|
|
761
|
+
url ? /* @__PURE__ */ jsx5("img", { alt: altText || label, className: "orion-admin-media-preview", src: url }) : null,
|
|
762
|
+
/* @__PURE__ */ jsxs5("div", { children: [
|
|
763
|
+
/* @__PURE__ */ jsx5("strong", { children: label }),
|
|
764
|
+
/* @__PURE__ */ jsx5("div", { className: "orion-admin-list-meta", children: altText || "No alt text" }),
|
|
765
|
+
metaParts.length > 0 ? /* @__PURE__ */ jsx5("div", { className: "orion-admin-list-meta", style: { marginTop: "0.15rem" }, children: metaParts.join(" \xB7 ") }) : null
|
|
877
766
|
] })
|
|
878
767
|
] }),
|
|
879
|
-
/* @__PURE__ */
|
|
768
|
+
/* @__PURE__ */ jsx5("span", { className: "orion-admin-list-meta", children: "Edit" })
|
|
880
769
|
] });
|
|
881
770
|
}
|
|
882
771
|
|
|
883
772
|
// src/admin-app/components/MediaUploadForm.tsx
|
|
884
|
-
import { useState as
|
|
773
|
+
import { useState as useState4, useRef, useCallback } from "react";
|
|
885
774
|
import { useRouter } from "next/navigation";
|
|
886
|
-
import { jsx as
|
|
775
|
+
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
887
776
|
var MEDIA_LIBRARY_SYNC_EVENT = "orion-media-library-updated";
|
|
888
777
|
var notifyMediaLibraryUpdated = () => {
|
|
889
778
|
if (typeof window === "undefined") {
|
|
@@ -924,12 +813,12 @@ var parseUploadError = async (response) => {
|
|
|
924
813
|
function MediaUploadForm() {
|
|
925
814
|
const router = useRouter();
|
|
926
815
|
const fileInputRef = useRef(null);
|
|
927
|
-
const [alt, setAlt] =
|
|
928
|
-
const [file, setFile] =
|
|
929
|
-
const [preview, setPreview] =
|
|
930
|
-
const [dragging, setDragging] =
|
|
931
|
-
const [submitting, setSubmitting] =
|
|
932
|
-
const [error, setError] =
|
|
816
|
+
const [alt, setAlt] = useState4("");
|
|
817
|
+
const [file, setFile] = useState4(null);
|
|
818
|
+
const [preview, setPreview] = useState4(null);
|
|
819
|
+
const [dragging, setDragging] = useState4(false);
|
|
820
|
+
const [submitting, setSubmitting] = useState4(false);
|
|
821
|
+
const [error, setError] = useState4(null);
|
|
933
822
|
const handleFile = useCallback((selectedFile) => {
|
|
934
823
|
setFile(selectedFile);
|
|
935
824
|
if (preview) {
|
|
@@ -997,10 +886,10 @@ function MediaUploadForm() {
|
|
|
997
886
|
setSubmitting(false);
|
|
998
887
|
}
|
|
999
888
|
};
|
|
1000
|
-
return /* @__PURE__ */
|
|
1001
|
-
/* @__PURE__ */
|
|
889
|
+
return /* @__PURE__ */ jsxs6("form", { className: "orion-admin-upload-form", onSubmit: upload, children: [
|
|
890
|
+
/* @__PURE__ */ jsxs6("label", { children: [
|
|
1002
891
|
"Alt text",
|
|
1003
|
-
/* @__PURE__ */
|
|
892
|
+
/* @__PURE__ */ jsx6(
|
|
1004
893
|
"input",
|
|
1005
894
|
{
|
|
1006
895
|
onChange: (event) => setAlt(event.target.value),
|
|
@@ -1010,7 +899,7 @@ function MediaUploadForm() {
|
|
|
1010
899
|
}
|
|
1011
900
|
)
|
|
1012
901
|
] }),
|
|
1013
|
-
/* @__PURE__ */
|
|
902
|
+
/* @__PURE__ */ jsxs6(
|
|
1014
903
|
"div",
|
|
1015
904
|
{
|
|
1016
905
|
className: `orion-admin-dropzone${dragging ? " is-dragging" : ""}${file ? " has-file" : ""}`,
|
|
@@ -1019,14 +908,14 @@ function MediaUploadForm() {
|
|
|
1019
908
|
onDragOver,
|
|
1020
909
|
onDrop,
|
|
1021
910
|
children: [
|
|
1022
|
-
preview ? /* @__PURE__ */
|
|
1023
|
-
/* @__PURE__ */
|
|
1024
|
-
/* @__PURE__ */
|
|
1025
|
-
] }) : /* @__PURE__ */
|
|
1026
|
-
/* @__PURE__ */
|
|
1027
|
-
/* @__PURE__ */
|
|
911
|
+
preview ? /* @__PURE__ */ jsxs6("div", { className: "orion-admin-dropzone-preview", children: [
|
|
912
|
+
/* @__PURE__ */ jsx6("img", { alt: "Upload preview", src: preview }),
|
|
913
|
+
/* @__PURE__ */ jsx6("span", { children: file?.name })
|
|
914
|
+
] }) : /* @__PURE__ */ jsxs6("div", { className: "orion-admin-dropzone-label", children: [
|
|
915
|
+
/* @__PURE__ */ jsx6("strong", { children: "Drop an image here" }),
|
|
916
|
+
/* @__PURE__ */ jsx6("span", { children: "or click to browse" })
|
|
1028
917
|
] }),
|
|
1029
|
-
/* @__PURE__ */
|
|
918
|
+
/* @__PURE__ */ jsx6(
|
|
1030
919
|
"input",
|
|
1031
920
|
{
|
|
1032
921
|
accept: "image/*",
|
|
@@ -1039,8 +928,119 @@ function MediaUploadForm() {
|
|
|
1039
928
|
]
|
|
1040
929
|
}
|
|
1041
930
|
),
|
|
1042
|
-
error ? /* @__PURE__ */
|
|
1043
|
-
/* @__PURE__ */
|
|
931
|
+
error ? /* @__PURE__ */ jsx6("div", { className: "orion-admin-upload-error", children: error }) : null,
|
|
932
|
+
/* @__PURE__ */ jsx6("button", { disabled: submitting, type: "submit", children: submitting ? "Uploading..." : "Upload" })
|
|
933
|
+
] });
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
// src/admin-app/components/MediaDetailPanel.tsx
|
|
937
|
+
import { useState as useState5 } from "react";
|
|
938
|
+
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
939
|
+
function formatFileSize2(bytes) {
|
|
940
|
+
if (bytes < 1024) return `${bytes} B`;
|
|
941
|
+
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
942
|
+
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
943
|
+
}
|
|
944
|
+
function MediaDetailPanel({
|
|
945
|
+
id,
|
|
946
|
+
filename,
|
|
947
|
+
alt,
|
|
948
|
+
url,
|
|
949
|
+
filesize,
|
|
950
|
+
width,
|
|
951
|
+
height,
|
|
952
|
+
mimeType,
|
|
953
|
+
createdAt,
|
|
954
|
+
updateAction,
|
|
955
|
+
deleteAction
|
|
956
|
+
}) {
|
|
957
|
+
const [copied, setCopied] = useState5(false);
|
|
958
|
+
const [confirmDelete, setConfirmDelete] = useState5(false);
|
|
959
|
+
const copyUrl = async () => {
|
|
960
|
+
if (!url) return;
|
|
961
|
+
try {
|
|
962
|
+
await navigator.clipboard.writeText(url);
|
|
963
|
+
setCopied(true);
|
|
964
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
965
|
+
} catch {
|
|
966
|
+
const input = document.createElement("input");
|
|
967
|
+
input.value = url;
|
|
968
|
+
document.body.appendChild(input);
|
|
969
|
+
input.select();
|
|
970
|
+
document.execCommand("copy");
|
|
971
|
+
document.body.removeChild(input);
|
|
972
|
+
setCopied(true);
|
|
973
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
974
|
+
}
|
|
975
|
+
};
|
|
976
|
+
const metaRows = [];
|
|
977
|
+
if (filename) metaRows.push({ label: "Filename", value: filename });
|
|
978
|
+
if (typeof filesize === "number") metaRows.push({ label: "File size", value: formatFileSize2(filesize) });
|
|
979
|
+
if (typeof width === "number" && typeof height === "number") metaRows.push({ label: "Dimensions", value: `${width} \xD7 ${height} px` });
|
|
980
|
+
if (mimeType) metaRows.push({ label: "Type", value: mimeType });
|
|
981
|
+
if (createdAt) {
|
|
982
|
+
try {
|
|
983
|
+
metaRows.push({ label: "Uploaded", value: new Date(createdAt).toLocaleDateString() });
|
|
984
|
+
} catch {
|
|
985
|
+
metaRows.push({ label: "Uploaded", value: createdAt });
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
return /* @__PURE__ */ jsxs7("div", { className: "orion-admin-grid", style: { alignItems: "start" }, children: [
|
|
989
|
+
/* @__PURE__ */ jsxs7("div", { children: [
|
|
990
|
+
/* @__PURE__ */ jsx7("div", { className: "orion-admin-card", children: url ? /* @__PURE__ */ jsx7("img", { alt: alt || filename || "Media", src: url, style: { borderRadius: 12, width: "100%" } }) : /* @__PURE__ */ jsx7("span", { children: "No preview available." }) }),
|
|
991
|
+
url ? /* @__PURE__ */ jsx7(
|
|
992
|
+
"button",
|
|
993
|
+
{
|
|
994
|
+
className: "orion-admin-action-button",
|
|
995
|
+
onClick: copyUrl,
|
|
996
|
+
style: { marginTop: "0.6rem", width: "100%" },
|
|
997
|
+
type: "button",
|
|
998
|
+
children: copied ? "Copied!" : "Copy URL"
|
|
999
|
+
}
|
|
1000
|
+
) : null
|
|
1001
|
+
] }),
|
|
1002
|
+
/* @__PURE__ */ jsxs7("div", { style: { display: "grid", gap: "0.8rem" }, children: [
|
|
1003
|
+
metaRows.length > 0 ? /* @__PURE__ */ jsx7("div", { className: "orion-admin-card orion-admin-meta-table", children: metaRows.map((row) => /* @__PURE__ */ jsxs7("div", { className: "orion-admin-meta-row", children: [
|
|
1004
|
+
/* @__PURE__ */ jsx7("span", { className: "orion-admin-meta-label", children: row.label }),
|
|
1005
|
+
/* @__PURE__ */ jsx7("span", { className: "orion-admin-meta-value", children: row.value })
|
|
1006
|
+
] }, row.label)) }) : null,
|
|
1007
|
+
/* @__PURE__ */ jsxs7("form", { action: updateAction, className: "orion-admin-form", children: [
|
|
1008
|
+
/* @__PURE__ */ jsx7("input", { name: "id", type: "hidden", value: id }),
|
|
1009
|
+
/* @__PURE__ */ jsxs7("label", { children: [
|
|
1010
|
+
"Alt text",
|
|
1011
|
+
/* @__PURE__ */ jsx7("input", { defaultValue: alt || "", name: "alt", required: true, type: "text" })
|
|
1012
|
+
] }),
|
|
1013
|
+
/* @__PURE__ */ jsx7("button", { type: "submit", children: "Save" })
|
|
1014
|
+
] }),
|
|
1015
|
+
confirmDelete ? /* @__PURE__ */ jsxs7("div", { className: "orion-admin-form", style: { borderColor: "#b42318" }, children: [
|
|
1016
|
+
/* @__PURE__ */ jsx7("p", { style: { fontWeight: 700, margin: 0 }, children: "Are you sure you want to delete this asset?" }),
|
|
1017
|
+
/* @__PURE__ */ jsx7("p", { style: { color: "var(--orion-admin-muted)", fontSize: "0.9rem", margin: 0 }, children: "This action cannot be undone." }),
|
|
1018
|
+
/* @__PURE__ */ jsxs7("div", { style: { display: "flex", gap: "0.5rem" }, children: [
|
|
1019
|
+
/* @__PURE__ */ jsxs7("form", { action: deleteAction, style: { flex: 1 }, children: [
|
|
1020
|
+
/* @__PURE__ */ jsx7("input", { name: "id", type: "hidden", value: id }),
|
|
1021
|
+
/* @__PURE__ */ jsx7("button", { style: { background: "#b42318", border: 0, borderRadius: 10, color: "#fff", cursor: "pointer", fontWeight: 800, padding: "0.55rem 0.8rem", width: "100%" }, type: "submit", children: "Yes, Delete" })
|
|
1022
|
+
] }),
|
|
1023
|
+
/* @__PURE__ */ jsx7(
|
|
1024
|
+
"button",
|
|
1025
|
+
{
|
|
1026
|
+
onClick: () => setConfirmDelete(false),
|
|
1027
|
+
style: { background: "transparent", border: "1px solid var(--orion-admin-border)", borderRadius: 10, cursor: "pointer", flex: 1, fontWeight: 700, padding: "0.55rem 0.8rem" },
|
|
1028
|
+
type: "button",
|
|
1029
|
+
children: "Cancel"
|
|
1030
|
+
}
|
|
1031
|
+
)
|
|
1032
|
+
] })
|
|
1033
|
+
] }) : /* @__PURE__ */ jsx7(
|
|
1034
|
+
"button",
|
|
1035
|
+
{
|
|
1036
|
+
className: "orion-admin-action-button",
|
|
1037
|
+
onClick: () => setConfirmDelete(true),
|
|
1038
|
+
style: { background: "#b42318" },
|
|
1039
|
+
type: "button",
|
|
1040
|
+
children: "Delete Asset"
|
|
1041
|
+
}
|
|
1042
|
+
)
|
|
1043
|
+
] })
|
|
1044
1044
|
] });
|
|
1045
1045
|
}
|
|
1046
1046
|
|
|
@@ -1052,7 +1052,7 @@ export {
|
|
|
1052
1052
|
SiteHeaderPreview,
|
|
1053
1053
|
SiteFooterPreview,
|
|
1054
1054
|
HeaderNavEditorWithPreview,
|
|
1055
|
-
MediaDetailPanel,
|
|
1056
1055
|
MediaListItem,
|
|
1057
|
-
MediaUploadForm
|
|
1056
|
+
MediaUploadForm,
|
|
1057
|
+
MediaDetailPanel
|
|
1058
1058
|
};
|
package/package.json
CHANGED