@orion-studios/payload-studio 0.6.0-beta.61 → 0.6.0-beta.62
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
|
@@ -919,11 +919,6 @@ var registerProjectDynamicComponents = (editor, adapter) => {
|
|
|
919
919
|
droppable: false,
|
|
920
920
|
tagName: "div",
|
|
921
921
|
traits: [
|
|
922
|
-
{
|
|
923
|
-
label: "Component",
|
|
924
|
-
name: "data-orion-component",
|
|
925
|
-
type: "text"
|
|
926
|
-
},
|
|
927
922
|
...(definition.traits || []).map((trait) => ({
|
|
928
923
|
label: trait.label,
|
|
929
924
|
name: `data-orion-${trait.name.replace(/[A-Z]/g, (char) => `-${char.toLowerCase()}`)}`,
|
|
@@ -795,11 +795,6 @@ var registerProjectDynamicComponents = (editor, adapter) => {
|
|
|
795
795
|
droppable: false,
|
|
796
796
|
tagName: "div",
|
|
797
797
|
traits: [
|
|
798
|
-
{
|
|
799
|
-
label: "Component",
|
|
800
|
-
name: "data-orion-component",
|
|
801
|
-
type: "text"
|
|
802
|
-
},
|
|
803
798
|
...(definition.traits || []).map((trait) => ({
|
|
804
799
|
label: trait.label,
|
|
805
800
|
name: `data-orion-${trait.name.replace(/[A-Z]/g, (char) => `-${char.toLowerCase()}`)}`,
|
|
@@ -394,6 +394,12 @@
|
|
|
394
394
|
.orion-builder-v2-editor .gjs-trt-trait__label {
|
|
395
395
|
color: var(--builder-v2-muted);
|
|
396
396
|
font-weight: 800;
|
|
397
|
+
line-height: 1.25;
|
|
398
|
+
max-width: none;
|
|
399
|
+
overflow: visible;
|
|
400
|
+
overflow-wrap: anywhere;
|
|
401
|
+
text-overflow: clip;
|
|
402
|
+
white-space: normal;
|
|
397
403
|
}
|
|
398
404
|
|
|
399
405
|
.orion-builder-v2-editor .gjs-traits-label {
|
|
@@ -410,6 +416,24 @@
|
|
|
410
416
|
gap: 6px;
|
|
411
417
|
}
|
|
412
418
|
|
|
419
|
+
.orion-builder-v2-editor .gjs-trt-trait__wrp,
|
|
420
|
+
.orion-builder-v2-editor .gjs-trt-trait__cnt {
|
|
421
|
+
min-width: 0;
|
|
422
|
+
overflow: visible;
|
|
423
|
+
width: 100%;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
.orion-builder-v2-editor .gjs-trt-trait .gjs-field,
|
|
427
|
+
.orion-builder-v2-editor .gjs-trt-trait input,
|
|
428
|
+
.orion-builder-v2-editor .gjs-trt-trait select,
|
|
429
|
+
.orion-builder-v2-editor .gjs-trt-trait textarea {
|
|
430
|
+
min-width: 0;
|
|
431
|
+
overflow: visible;
|
|
432
|
+
text-overflow: clip;
|
|
433
|
+
white-space: normal;
|
|
434
|
+
width: 100%;
|
|
435
|
+
}
|
|
436
|
+
|
|
413
437
|
.orion-builder-v2-editor .gjs-sm-sectors {
|
|
414
438
|
display: grid;
|
|
415
439
|
gap: 10px;
|
|
@@ -732,13 +732,124 @@ function HeaderNavEditorWithPreview({
|
|
|
732
732
|
] });
|
|
733
733
|
}
|
|
734
734
|
|
|
735
|
-
// src/admin-app/components/
|
|
735
|
+
// src/admin-app/components/MediaDetailPanel.tsx
|
|
736
|
+
import { useState as useState4 } from "react";
|
|
736
737
|
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
737
738
|
function formatFileSize(bytes) {
|
|
738
739
|
if (bytes < 1024) return `${bytes} B`;
|
|
739
740
|
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
740
741
|
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
741
742
|
}
|
|
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
|
+
}
|
|
742
853
|
function MediaListItem({
|
|
743
854
|
id,
|
|
744
855
|
filename,
|
|
@@ -753,26 +864,26 @@ function MediaListItem({
|
|
|
753
864
|
const label = filename || `Media ${id}`;
|
|
754
865
|
const altText = alt || "";
|
|
755
866
|
const metaParts = [];
|
|
756
|
-
if (typeof filesize === "number") metaParts.push(
|
|
867
|
+
if (typeof filesize === "number") metaParts.push(formatFileSize2(filesize));
|
|
757
868
|
if (typeof width === "number" && typeof height === "number") metaParts.push(`${width}\xD7${height}`);
|
|
758
869
|
if (typeof mimeType === "string") metaParts.push(mimeType);
|
|
759
|
-
return /* @__PURE__ */
|
|
760
|
-
/* @__PURE__ */
|
|
761
|
-
url ? /* @__PURE__ */
|
|
762
|
-
/* @__PURE__ */
|
|
763
|
-
/* @__PURE__ */
|
|
764
|
-
/* @__PURE__ */
|
|
765
|
-
metaParts.length > 0 ? /* @__PURE__ */
|
|
870
|
+
return /* @__PURE__ */ jsxs6("a", { className: "orion-admin-list-item", href, children: [
|
|
871
|
+
/* @__PURE__ */ jsxs6("div", { style: { alignItems: "center", display: "flex", gap: "0.8rem" }, children: [
|
|
872
|
+
url ? /* @__PURE__ */ jsx6("img", { alt: altText || label, className: "orion-admin-media-preview", src: url }) : null,
|
|
873
|
+
/* @__PURE__ */ jsxs6("div", { children: [
|
|
874
|
+
/* @__PURE__ */ jsx6("strong", { children: label }),
|
|
875
|
+
/* @__PURE__ */ jsx6("div", { className: "orion-admin-list-meta", children: altText || "No alt text" }),
|
|
876
|
+
metaParts.length > 0 ? /* @__PURE__ */ jsx6("div", { className: "orion-admin-list-meta", style: { marginTop: "0.15rem" }, children: metaParts.join(" \xB7 ") }) : null
|
|
766
877
|
] })
|
|
767
878
|
] }),
|
|
768
|
-
/* @__PURE__ */
|
|
879
|
+
/* @__PURE__ */ jsx6("span", { className: "orion-admin-list-meta", children: "Edit" })
|
|
769
880
|
] });
|
|
770
881
|
}
|
|
771
882
|
|
|
772
883
|
// src/admin-app/components/MediaUploadForm.tsx
|
|
773
|
-
import { useState as
|
|
884
|
+
import { useState as useState5, useRef, useCallback } from "react";
|
|
774
885
|
import { useRouter } from "next/navigation";
|
|
775
|
-
import { jsx as
|
|
886
|
+
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
776
887
|
var MEDIA_LIBRARY_SYNC_EVENT = "orion-media-library-updated";
|
|
777
888
|
var notifyMediaLibraryUpdated = () => {
|
|
778
889
|
if (typeof window === "undefined") {
|
|
@@ -813,12 +924,12 @@ var parseUploadError = async (response) => {
|
|
|
813
924
|
function MediaUploadForm() {
|
|
814
925
|
const router = useRouter();
|
|
815
926
|
const fileInputRef = useRef(null);
|
|
816
|
-
const [alt, setAlt] =
|
|
817
|
-
const [file, setFile] =
|
|
818
|
-
const [preview, setPreview] =
|
|
819
|
-
const [dragging, setDragging] =
|
|
820
|
-
const [submitting, setSubmitting] =
|
|
821
|
-
const [error, setError] =
|
|
927
|
+
const [alt, setAlt] = useState5("");
|
|
928
|
+
const [file, setFile] = useState5(null);
|
|
929
|
+
const [preview, setPreview] = useState5(null);
|
|
930
|
+
const [dragging, setDragging] = useState5(false);
|
|
931
|
+
const [submitting, setSubmitting] = useState5(false);
|
|
932
|
+
const [error, setError] = useState5(null);
|
|
822
933
|
const handleFile = useCallback((selectedFile) => {
|
|
823
934
|
setFile(selectedFile);
|
|
824
935
|
if (preview) {
|
|
@@ -886,10 +997,10 @@ function MediaUploadForm() {
|
|
|
886
997
|
setSubmitting(false);
|
|
887
998
|
}
|
|
888
999
|
};
|
|
889
|
-
return /* @__PURE__ */
|
|
890
|
-
/* @__PURE__ */
|
|
1000
|
+
return /* @__PURE__ */ jsxs7("form", { className: "orion-admin-upload-form", onSubmit: upload, children: [
|
|
1001
|
+
/* @__PURE__ */ jsxs7("label", { children: [
|
|
891
1002
|
"Alt text",
|
|
892
|
-
/* @__PURE__ */
|
|
1003
|
+
/* @__PURE__ */ jsx7(
|
|
893
1004
|
"input",
|
|
894
1005
|
{
|
|
895
1006
|
onChange: (event) => setAlt(event.target.value),
|
|
@@ -899,7 +1010,7 @@ function MediaUploadForm() {
|
|
|
899
1010
|
}
|
|
900
1011
|
)
|
|
901
1012
|
] }),
|
|
902
|
-
/* @__PURE__ */
|
|
1013
|
+
/* @__PURE__ */ jsxs7(
|
|
903
1014
|
"div",
|
|
904
1015
|
{
|
|
905
1016
|
className: `orion-admin-dropzone${dragging ? " is-dragging" : ""}${file ? " has-file" : ""}`,
|
|
@@ -908,14 +1019,14 @@ function MediaUploadForm() {
|
|
|
908
1019
|
onDragOver,
|
|
909
1020
|
onDrop,
|
|
910
1021
|
children: [
|
|
911
|
-
preview ? /* @__PURE__ */
|
|
912
|
-
/* @__PURE__ */
|
|
913
|
-
/* @__PURE__ */
|
|
914
|
-
] }) : /* @__PURE__ */
|
|
915
|
-
/* @__PURE__ */
|
|
916
|
-
/* @__PURE__ */
|
|
1022
|
+
preview ? /* @__PURE__ */ jsxs7("div", { className: "orion-admin-dropzone-preview", children: [
|
|
1023
|
+
/* @__PURE__ */ jsx7("img", { alt: "Upload preview", src: preview }),
|
|
1024
|
+
/* @__PURE__ */ jsx7("span", { children: file?.name })
|
|
1025
|
+
] }) : /* @__PURE__ */ jsxs7("div", { className: "orion-admin-dropzone-label", children: [
|
|
1026
|
+
/* @__PURE__ */ jsx7("strong", { children: "Drop an image here" }),
|
|
1027
|
+
/* @__PURE__ */ jsx7("span", { children: "or click to browse" })
|
|
917
1028
|
] }),
|
|
918
|
-
/* @__PURE__ */
|
|
1029
|
+
/* @__PURE__ */ jsx7(
|
|
919
1030
|
"input",
|
|
920
1031
|
{
|
|
921
1032
|
accept: "image/*",
|
|
@@ -928,119 +1039,8 @@ function MediaUploadForm() {
|
|
|
928
1039
|
]
|
|
929
1040
|
}
|
|
930
1041
|
),
|
|
931
|
-
error ? /* @__PURE__ */
|
|
932
|
-
/* @__PURE__ */
|
|
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
|
-
] })
|
|
1042
|
+
error ? /* @__PURE__ */ jsx7("div", { className: "orion-admin-upload-error", children: error }) : null,
|
|
1043
|
+
/* @__PURE__ */ jsx7("button", { disabled: submitting, type: "submit", children: submitting ? "Uploading..." : "Upload" })
|
|
1044
1044
|
] });
|
|
1045
1045
|
}
|
|
1046
1046
|
|
|
@@ -1052,7 +1052,7 @@ export {
|
|
|
1052
1052
|
SiteHeaderPreview,
|
|
1053
1053
|
SiteFooterPreview,
|
|
1054
1054
|
HeaderNavEditorWithPreview,
|
|
1055
|
+
MediaDetailPanel,
|
|
1055
1056
|
MediaListItem,
|
|
1056
|
-
MediaUploadForm
|
|
1057
|
-
MediaDetailPanel
|
|
1057
|
+
MediaUploadForm
|
|
1058
1058
|
};
|
package/package.json
CHANGED