@orion-studios/payload-studio 0.5.0-beta.113 → 0.5.0-beta.114
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.js +1915 -490
- package/dist/admin/client.mjs +1327 -445
- package/dist/admin/index.d.mts +2 -1
- package/dist/admin/index.d.ts +2 -1
- package/dist/admin/index.js +253 -50
- package/dist/admin/index.mjs +1 -1
- package/dist/admin-app/client.d.mts +1 -0
- package/dist/admin-app/client.d.ts +1 -0
- package/dist/admin-app/client.js +266 -105
- package/dist/admin-app/client.mjs +105 -456
- package/dist/admin-app/index.d.mts +2 -1
- package/dist/admin-app/index.d.ts +2 -1
- package/dist/admin-app/styles.css +351 -0
- package/dist/admin.css +9 -0
- package/dist/{chunk-DAIZDGHL.mjs → chunk-4YPHQYRR.mjs} +253 -50
- package/dist/chunk-6NE7GIVT.mjs +555 -0
- package/dist/{chunk-3T2P6SDM.mjs → chunk-XKUTZ7IU.mjs} +215 -6
- package/dist/{index-DUi_XND6.d.ts → index-Crx_MtPw.d.ts} +33 -3
- package/dist/{index-gLl_358v.d.mts → index-Cv-6qnrw.d.mts} +33 -3
- package/dist/index-D5yjivF7.d.ts +382 -0
- package/dist/index-DH9KGEZ8.d.mts +382 -0
- package/dist/{index-BzKOThsI.d.mts → index-DWmudwDm.d.mts} +1 -1
- package/dist/{index-BzKOThsI.d.ts → index-DWmudwDm.d.ts} +1 -1
- package/dist/{index-7lxTrxSG.d.mts → index-c5-qTRbH.d.mts} +7 -1
- package/dist/{index-7lxTrxSG.d.ts → index-yfpxsgUu.d.ts} +7 -1
- package/dist/index.d.mts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +459 -56
- package/dist/index.mjs +9 -9
- package/dist/nextjs/index.mjs +2 -2
- package/dist/sitePreviewTypes-BECnq9xI.d.mts +41 -0
- package/dist/sitePreviewTypes-BECnq9xI.d.ts +41 -0
- package/dist/studio/index.d.mts +1 -1
- package/dist/studio/index.d.ts +1 -1
- package/dist/studio-pages/index.d.mts +3 -3
- package/dist/studio-pages/index.d.ts +3 -3
- package/dist/studio-pages/index.js +330 -7
- package/dist/studio-pages/index.mjs +10 -3
- package/package.json +1 -1
- package/dist/index-B7QvY3yF.d.mts +0 -245
- package/dist/index-BK03FiEM.d.ts +0 -245
- package/dist/{chunk-BET2YLAS.mjs → chunk-OTHERBGX.mjs} +3 -3
package/dist/admin-app/client.js
CHANGED
|
@@ -27,7 +27,9 @@ __export(client_exports, {
|
|
|
27
27
|
MediaDetailPanel: () => MediaDetailPanel,
|
|
28
28
|
MediaListItem: () => MediaListItem,
|
|
29
29
|
MediaUploadForm: () => MediaUploadForm,
|
|
30
|
-
PageEditorFrame: () => PageEditorFrame
|
|
30
|
+
PageEditorFrame: () => PageEditorFrame,
|
|
31
|
+
SiteFooterPreview: () => SiteFooterPreview,
|
|
32
|
+
SiteHeaderPreview: () => SiteHeaderPreview
|
|
31
33
|
});
|
|
32
34
|
module.exports = __toCommonJS(client_exports);
|
|
33
35
|
|
|
@@ -493,14 +495,175 @@ var buildNestedNavTree = (items) => {
|
|
|
493
495
|
return { childrenByParent, topLevel };
|
|
494
496
|
};
|
|
495
497
|
|
|
496
|
-
// src/admin-app/components/
|
|
498
|
+
// src/admin-app/components/SitePreview.tsx
|
|
497
499
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
500
|
+
var fallbackHeaderNav = [{ href: "/", label: "Home" }];
|
|
501
|
+
var socialGlyphByPlatform = {
|
|
502
|
+
facebook: "f",
|
|
503
|
+
instagram: "ig",
|
|
504
|
+
linkedin: "in",
|
|
505
|
+
pinterest: "p",
|
|
506
|
+
snapchat: "sc",
|
|
507
|
+
tiktok: "tt",
|
|
508
|
+
x: "x",
|
|
509
|
+
youtube: "yt"
|
|
510
|
+
};
|
|
511
|
+
var getInitials = (value) => {
|
|
512
|
+
const initials = value.trim().split(/\s+/).filter(Boolean).slice(0, 2).map((part) => part[0]?.toUpperCase() || "").join("");
|
|
513
|
+
return initials || "OS";
|
|
514
|
+
};
|
|
515
|
+
var getSocialGlyph = (platform) => {
|
|
516
|
+
const normalized = platform.trim().toLowerCase();
|
|
517
|
+
return socialGlyphByPlatform[normalized] || normalized.slice(0, 2).toUpperCase() || "\u2022";
|
|
518
|
+
};
|
|
519
|
+
var getTaglineLines = (tagline) => {
|
|
520
|
+
const parts = (tagline || "").split(".").map((part) => part.trim()).filter(Boolean);
|
|
521
|
+
const first = parts[0] ? `${parts[0]}.` : "Warm Gifts.";
|
|
522
|
+
const second = parts[1] ? `${parts[1]}.` : "Local Heart.";
|
|
523
|
+
return [first, second];
|
|
524
|
+
};
|
|
525
|
+
function PreviewSocialLinks({
|
|
526
|
+
links,
|
|
527
|
+
variant
|
|
528
|
+
}) {
|
|
529
|
+
if (links.length === 0) {
|
|
530
|
+
return null;
|
|
531
|
+
}
|
|
532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
533
|
+
"div",
|
|
534
|
+
{
|
|
535
|
+
className: variant === "header" ? "orion-admin-site-preview-social-list" : "orion-admin-site-preview-social-list orion-admin-site-preview-social-list--footer",
|
|
536
|
+
children: links.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
537
|
+
"a",
|
|
538
|
+
{
|
|
539
|
+
className: variant === "header" ? "orion-admin-site-preview-social-badge" : "orion-admin-site-preview-social-badge orion-admin-site-preview-social-badge--footer",
|
|
540
|
+
href: item.url,
|
|
541
|
+
tabIndex: -1,
|
|
542
|
+
children: getSocialGlyph(item.platform)
|
|
543
|
+
},
|
|
544
|
+
`${item.platform}-${item.url}`
|
|
545
|
+
))
|
|
546
|
+
}
|
|
547
|
+
);
|
|
548
|
+
}
|
|
549
|
+
function PreviewLogo({
|
|
550
|
+
className,
|
|
551
|
+
logoUrl,
|
|
552
|
+
siteName
|
|
553
|
+
}) {
|
|
554
|
+
if (logoUrl && logoUrl.trim().length > 0) {
|
|
555
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("img", { alt: `${siteName} logo`, className, src: logoUrl });
|
|
556
|
+
}
|
|
557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: `${className} orion-admin-site-preview-logo-fallback`, children: getInitials(siteName) });
|
|
558
|
+
}
|
|
559
|
+
function SiteHeaderPreview({ site }) {
|
|
560
|
+
const navItems = site.navItems.length > 0 ? site.navItems : fallbackHeaderNav;
|
|
561
|
+
const [taglineLineOne, taglineLineTwo] = getTaglineLines(site.tagline);
|
|
562
|
+
const socialLinks = site.socialLinks?.slice(0, 4) || [];
|
|
563
|
+
const activePath = site.activePath || navItems[0]?.href || "/";
|
|
564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { "aria-hidden": "true", className: "orion-admin-site-preview orion-admin-site-preview--header", children: [
|
|
565
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "orion-admin-site-preview-header-bar", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "orion-admin-site-preview-shell orion-admin-site-preview-shell--utility", children: [
|
|
566
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "orion-admin-site-preview-utility-copy", children: site.locationSummary?.address?.trim() || "Neighborhood gift shop" }),
|
|
567
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "orion-admin-site-preview-utility-meta", children: [
|
|
568
|
+
site.locationSummary?.hours?.trim() ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "orion-admin-site-preview-utility-copy", children: site.locationSummary.hours.trim() }) : null,
|
|
569
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PreviewSocialLinks, { links: socialLinks, variant: "header" }),
|
|
570
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("a", { className: "orion-admin-site-preview-header-action", href: site.actionHref || "/contact", tabIndex: -1, children: site.actionLabel || "Visit Today" })
|
|
571
|
+
] })
|
|
572
|
+
] }) }),
|
|
573
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "orion-admin-site-preview-header-main", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "orion-admin-site-preview-shell orion-admin-site-preview-shell--main", children: [
|
|
574
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("a", { className: "orion-admin-site-preview-brand", href: "/", tabIndex: -1, children: [
|
|
575
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
576
|
+
PreviewLogo,
|
|
577
|
+
{
|
|
578
|
+
className: "orion-admin-site-preview-header-logo",
|
|
579
|
+
logoUrl: site.logoUrl,
|
|
580
|
+
siteName: site.siteName
|
|
581
|
+
}
|
|
582
|
+
),
|
|
583
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "orion-admin-site-preview-tagline", children: [
|
|
584
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "orion-admin-site-preview-tagline-line", children: taglineLineOne }),
|
|
585
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "orion-admin-site-preview-tagline-line", children: taglineLineTwo })
|
|
586
|
+
] })
|
|
587
|
+
] }),
|
|
588
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("nav", { className: "orion-admin-site-preview-nav", children: navItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
589
|
+
"a",
|
|
590
|
+
{
|
|
591
|
+
className: item.href === activePath ? "is-active" : void 0,
|
|
592
|
+
href: item.href,
|
|
593
|
+
tabIndex: -1,
|
|
594
|
+
children: item.label
|
|
595
|
+
},
|
|
596
|
+
`${item.href}-${item.label}`
|
|
597
|
+
)) }),
|
|
598
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "orion-admin-site-preview-mobile-toggle", children: [
|
|
599
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", {}),
|
|
600
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", {}),
|
|
601
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", {})
|
|
602
|
+
] })
|
|
603
|
+
] }) })
|
|
604
|
+
] });
|
|
605
|
+
}
|
|
606
|
+
function SiteFooterPreview({ site }) {
|
|
607
|
+
const description = site.description?.trim() || site.tagline?.trim() || "Thoughtful gifts, warm local service, and a beautifully stocked neighborhood shop.";
|
|
608
|
+
const socialLinks = site.socialLinks?.slice(0, 4) || [];
|
|
609
|
+
const builtByLabel = site.builtByLabel || "Built by Orion Studios";
|
|
610
|
+
const builtByHref = site.builtByHref || "https://orionstudios.dev";
|
|
611
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { "aria-hidden": "true", className: "orion-admin-site-preview orion-admin-site-preview--footer", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "orion-admin-site-preview-footer-shell", children: [
|
|
612
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "orion-admin-site-preview-footer-grid", children: [
|
|
613
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
614
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "orion-admin-site-preview-footer-brand", children: [
|
|
615
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
616
|
+
PreviewLogo,
|
|
617
|
+
{
|
|
618
|
+
className: "orion-admin-site-preview-footer-logo",
|
|
619
|
+
logoUrl: site.logoUrl,
|
|
620
|
+
siteName: site.siteName
|
|
621
|
+
}
|
|
622
|
+
),
|
|
623
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "orion-admin-site-preview-footer-name", children: site.siteName })
|
|
624
|
+
] }),
|
|
625
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "orion-admin-site-preview-footer-description", children: description })
|
|
626
|
+
] }),
|
|
627
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
628
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "orion-admin-site-preview-footer-eyebrow", children: "Shop focus" }),
|
|
629
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "orion-admin-site-preview-footer-list", children: site.footerCategories.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { children: item }, item)) })
|
|
630
|
+
] }),
|
|
631
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
632
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "orion-admin-site-preview-footer-eyebrow", children: "Explore" }),
|
|
633
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "orion-admin-site-preview-footer-list", children: site.footerLinks.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("a", { href: item.href, tabIndex: -1, children: item.label }, `${item.href}-${item.label}`)) })
|
|
634
|
+
] }),
|
|
635
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
636
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "orion-admin-site-preview-footer-eyebrow", children: "Visit" }),
|
|
637
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "orion-admin-site-preview-footer-contact", children: [
|
|
638
|
+
site.locationSummary.address?.trim() ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { children: site.locationSummary.address.trim() }) : null,
|
|
639
|
+
site.locationSummary.hours?.trim() ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { children: site.locationSummary.hours.trim() }) : null,
|
|
640
|
+
site.locationSummary.phone?.trim() ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("a", { href: `tel:${site.locationSummary.phone.trim()}`, tabIndex: -1, children: site.locationSummary.phone.trim() }) : null,
|
|
641
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("a", { href: `mailto:${site.contactEmail}`, tabIndex: -1, children: site.contactEmail })
|
|
642
|
+
] }),
|
|
643
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PreviewSocialLinks, { links: socialLinks, variant: "footer" })
|
|
644
|
+
] })
|
|
645
|
+
] }),
|
|
646
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "orion-admin-site-preview-footer-meta", children: [
|
|
647
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: site.copyright }),
|
|
648
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("a", { href: builtByHref, tabIndex: -1, children: builtByLabel })
|
|
649
|
+
] })
|
|
650
|
+
] }) });
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
// src/admin-app/components/HeaderNavEditorWithPreview.tsx
|
|
654
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
498
655
|
var fallbackNav = [{ href: "/", label: "Home" }];
|
|
499
656
|
function HeaderNavEditorWithPreview({
|
|
657
|
+
activePath,
|
|
658
|
+
actionHref,
|
|
659
|
+
actionLabel,
|
|
500
660
|
brandName,
|
|
501
661
|
initialItems,
|
|
662
|
+
locationSummary,
|
|
502
663
|
logoUrl,
|
|
664
|
+
onItemsChange,
|
|
503
665
|
pageOptions,
|
|
666
|
+
socialLinks,
|
|
504
667
|
tagline = ""
|
|
505
668
|
}) {
|
|
506
669
|
const [liveItems, setLiveItems] = (0, import_react3.useState)(initialItems);
|
|
@@ -509,48 +672,44 @@ function HeaderNavEditorWithPreview({
|
|
|
509
672
|
const tree = buildNestedNavTree(normalized);
|
|
510
673
|
return tree.topLevel.length > 0 ? tree : buildNestedNavTree(fallbackNav);
|
|
511
674
|
}, [liveItems]);
|
|
512
|
-
return /* @__PURE__ */ (0,
|
|
513
|
-
/* @__PURE__ */ (0,
|
|
514
|
-
|
|
515
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
516
|
-
"div",
|
|
675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
676
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
677
|
+
HeaderNavItemsEditor,
|
|
517
678
|
{
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
679
|
+
initialItems,
|
|
680
|
+
onItemsChange: (items) => {
|
|
681
|
+
setLiveItems(items);
|
|
682
|
+
onItemsChange?.(items);
|
|
522
683
|
},
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
}) })
|
|
545
|
-
] }) })
|
|
684
|
+
pageOptions
|
|
685
|
+
}
|
|
686
|
+
),
|
|
687
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "orion-admin-preview-label", children: "Header Preview" }),
|
|
688
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "orion-admin-preview-frame", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "orion-admin-preview-surface", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
689
|
+
SiteHeaderPreview,
|
|
690
|
+
{
|
|
691
|
+
site: {
|
|
692
|
+
activePath,
|
|
693
|
+
actionHref,
|
|
694
|
+
actionLabel,
|
|
695
|
+
locationSummary,
|
|
696
|
+
logoUrl,
|
|
697
|
+
navItems: previewItems.topLevel.map((item) => ({
|
|
698
|
+
href: item.href,
|
|
699
|
+
label: item.label
|
|
700
|
+
})),
|
|
701
|
+
siteName: brandName,
|
|
702
|
+
socialLinks,
|
|
703
|
+
tagline
|
|
704
|
+
}
|
|
546
705
|
}
|
|
547
|
-
)
|
|
706
|
+
) }) })
|
|
548
707
|
] });
|
|
549
708
|
}
|
|
550
709
|
|
|
551
710
|
// src/admin-app/components/MediaDetailPanel.tsx
|
|
552
711
|
var import_react4 = require("react");
|
|
553
|
-
var
|
|
712
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
554
713
|
function formatFileSize(bytes) {
|
|
555
714
|
if (bytes < 1024) return `${bytes} B`;
|
|
556
715
|
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
@@ -600,10 +759,10 @@ function MediaDetailPanel({
|
|
|
600
759
|
metaRows.push({ label: "Uploaded", value: createdAt });
|
|
601
760
|
}
|
|
602
761
|
}
|
|
603
|
-
return /* @__PURE__ */ (0,
|
|
604
|
-
/* @__PURE__ */ (0,
|
|
605
|
-
/* @__PURE__ */ (0,
|
|
606
|
-
url ? /* @__PURE__ */ (0,
|
|
762
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "orion-admin-grid", style: { alignItems: "start" }, children: [
|
|
763
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { children: [
|
|
764
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "orion-admin-card", children: url ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("img", { alt: alt || filename || "Media", src: url, style: { borderRadius: 12, width: "100%" } }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: "No preview available." }) }),
|
|
765
|
+
url ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
607
766
|
"button",
|
|
608
767
|
{
|
|
609
768
|
className: "orion-admin-action-button",
|
|
@@ -614,28 +773,28 @@ function MediaDetailPanel({
|
|
|
614
773
|
}
|
|
615
774
|
) : null
|
|
616
775
|
] }),
|
|
617
|
-
/* @__PURE__ */ (0,
|
|
618
|
-
metaRows.length > 0 ? /* @__PURE__ */ (0,
|
|
619
|
-
/* @__PURE__ */ (0,
|
|
620
|
-
/* @__PURE__ */ (0,
|
|
776
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { display: "grid", gap: "0.8rem" }, children: [
|
|
777
|
+
metaRows.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "orion-admin-card orion-admin-meta-table", children: metaRows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "orion-admin-meta-row", children: [
|
|
778
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "orion-admin-meta-label", children: row.label }),
|
|
779
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "orion-admin-meta-value", children: row.value })
|
|
621
780
|
] }, row.label)) }) : null,
|
|
622
|
-
/* @__PURE__ */ (0,
|
|
623
|
-
/* @__PURE__ */ (0,
|
|
624
|
-
/* @__PURE__ */ (0,
|
|
781
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("form", { action: updateAction, className: "orion-admin-form", children: [
|
|
782
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("input", { name: "id", type: "hidden", value: id }),
|
|
783
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("label", { children: [
|
|
625
784
|
"Alt text",
|
|
626
|
-
/* @__PURE__ */ (0,
|
|
785
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("input", { defaultValue: alt || "", name: "alt", required: true, type: "text" })
|
|
627
786
|
] }),
|
|
628
|
-
/* @__PURE__ */ (0,
|
|
787
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { type: "submit", children: "Save" })
|
|
629
788
|
] }),
|
|
630
|
-
confirmDelete ? /* @__PURE__ */ (0,
|
|
631
|
-
/* @__PURE__ */ (0,
|
|
632
|
-
/* @__PURE__ */ (0,
|
|
633
|
-
/* @__PURE__ */ (0,
|
|
634
|
-
/* @__PURE__ */ (0,
|
|
635
|
-
/* @__PURE__ */ (0,
|
|
636
|
-
/* @__PURE__ */ (0,
|
|
789
|
+
confirmDelete ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "orion-admin-form", style: { borderColor: "#b42318" }, children: [
|
|
790
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { style: { fontWeight: 700, margin: 0 }, children: "Are you sure you want to delete this asset?" }),
|
|
791
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { style: { color: "var(--orion-admin-muted)", fontSize: "0.9rem", margin: 0 }, children: "This action cannot be undone." }),
|
|
792
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { display: "flex", gap: "0.5rem" }, children: [
|
|
793
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("form", { action: deleteAction, style: { flex: 1 }, children: [
|
|
794
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("input", { name: "id", type: "hidden", value: id }),
|
|
795
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("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" })
|
|
637
796
|
] }),
|
|
638
|
-
/* @__PURE__ */ (0,
|
|
797
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
639
798
|
"button",
|
|
640
799
|
{
|
|
641
800
|
onClick: () => setConfirmDelete(false),
|
|
@@ -645,7 +804,7 @@ function MediaDetailPanel({
|
|
|
645
804
|
}
|
|
646
805
|
)
|
|
647
806
|
] })
|
|
648
|
-
] }) : /* @__PURE__ */ (0,
|
|
807
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
649
808
|
"button",
|
|
650
809
|
{
|
|
651
810
|
className: "orion-admin-action-button",
|
|
@@ -660,7 +819,7 @@ function MediaDetailPanel({
|
|
|
660
819
|
}
|
|
661
820
|
|
|
662
821
|
// src/admin-app/components/MediaListItem.tsx
|
|
663
|
-
var
|
|
822
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
664
823
|
function formatFileSize2(bytes) {
|
|
665
824
|
if (bytes < 1024) return `${bytes} B`;
|
|
666
825
|
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
@@ -683,16 +842,16 @@ function MediaListItem({
|
|
|
683
842
|
if (typeof filesize === "number") metaParts.push(formatFileSize2(filesize));
|
|
684
843
|
if (typeof width === "number" && typeof height === "number") metaParts.push(`${width}\xD7${height}`);
|
|
685
844
|
if (typeof mimeType === "string") metaParts.push(mimeType);
|
|
686
|
-
return /* @__PURE__ */ (0,
|
|
687
|
-
/* @__PURE__ */ (0,
|
|
688
|
-
url ? /* @__PURE__ */ (0,
|
|
689
|
-
/* @__PURE__ */ (0,
|
|
690
|
-
/* @__PURE__ */ (0,
|
|
691
|
-
/* @__PURE__ */ (0,
|
|
692
|
-
metaParts.length > 0 ? /* @__PURE__ */ (0,
|
|
845
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("a", { className: "orion-admin-list-item", href, children: [
|
|
846
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: { alignItems: "center", display: "flex", gap: "0.8rem" }, children: [
|
|
847
|
+
url ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("img", { alt: altText || label, className: "orion-admin-media-preview", src: url }) : null,
|
|
848
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { children: [
|
|
849
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("strong", { children: label }),
|
|
850
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "orion-admin-list-meta", children: altText || "No alt text" }),
|
|
851
|
+
metaParts.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "orion-admin-list-meta", style: { marginTop: "0.15rem" }, children: metaParts.join(" \xB7 ") }) : null
|
|
693
852
|
] })
|
|
694
853
|
] }),
|
|
695
|
-
/* @__PURE__ */ (0,
|
|
854
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "orion-admin-list-meta", children: "Edit" })
|
|
696
855
|
] });
|
|
697
856
|
}
|
|
698
857
|
|
|
@@ -794,7 +953,7 @@ async function optimizeImageForUpload(file) {
|
|
|
794
953
|
}
|
|
795
954
|
|
|
796
955
|
// src/admin-app/components/MediaUploadForm.tsx
|
|
797
|
-
var
|
|
956
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
798
957
|
var MEDIA_LIBRARY_SYNC_EVENT = "orion-media-library-updated";
|
|
799
958
|
var notifyMediaLibraryUpdated = () => {
|
|
800
959
|
if (typeof window === "undefined") {
|
|
@@ -908,10 +1067,10 @@ function MediaUploadForm() {
|
|
|
908
1067
|
setSubmitting(false);
|
|
909
1068
|
}
|
|
910
1069
|
};
|
|
911
|
-
return /* @__PURE__ */ (0,
|
|
912
|
-
/* @__PURE__ */ (0,
|
|
1070
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("form", { className: "orion-admin-upload-form", onSubmit: upload, children: [
|
|
1071
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { children: [
|
|
913
1072
|
"Alt text",
|
|
914
|
-
/* @__PURE__ */ (0,
|
|
1073
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
915
1074
|
"input",
|
|
916
1075
|
{
|
|
917
1076
|
onChange: (event) => setAlt(event.target.value),
|
|
@@ -921,7 +1080,7 @@ function MediaUploadForm() {
|
|
|
921
1080
|
}
|
|
922
1081
|
)
|
|
923
1082
|
] }),
|
|
924
|
-
/* @__PURE__ */ (0,
|
|
1083
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
925
1084
|
"div",
|
|
926
1085
|
{
|
|
927
1086
|
className: `orion-admin-dropzone${dragging ? " is-dragging" : ""}${file ? " has-file" : ""}`,
|
|
@@ -930,14 +1089,14 @@ function MediaUploadForm() {
|
|
|
930
1089
|
onDragOver,
|
|
931
1090
|
onDrop,
|
|
932
1091
|
children: [
|
|
933
|
-
preview ? /* @__PURE__ */ (0,
|
|
934
|
-
/* @__PURE__ */ (0,
|
|
935
|
-
/* @__PURE__ */ (0,
|
|
936
|
-
] }) : /* @__PURE__ */ (0,
|
|
937
|
-
/* @__PURE__ */ (0,
|
|
938
|
-
/* @__PURE__ */ (0,
|
|
1092
|
+
preview ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "orion-admin-dropzone-preview", children: [
|
|
1093
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("img", { alt: "Upload preview", src: preview }),
|
|
1094
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: file?.name })
|
|
1095
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "orion-admin-dropzone-label", children: [
|
|
1096
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("strong", { children: "Drop an image here" }),
|
|
1097
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: "or click to browse" })
|
|
939
1098
|
] }),
|
|
940
|
-
/* @__PURE__ */ (0,
|
|
1099
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
941
1100
|
"input",
|
|
942
1101
|
{
|
|
943
1102
|
accept: "image/*",
|
|
@@ -950,14 +1109,14 @@ function MediaUploadForm() {
|
|
|
950
1109
|
]
|
|
951
1110
|
}
|
|
952
1111
|
),
|
|
953
|
-
error ? /* @__PURE__ */ (0,
|
|
954
|
-
/* @__PURE__ */ (0,
|
|
1112
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "orion-admin-upload-error", children: error }) : null,
|
|
1113
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { disabled: submitting, type: "submit", children: submitting ? "Uploading..." : "Upload" })
|
|
955
1114
|
] });
|
|
956
1115
|
}
|
|
957
1116
|
|
|
958
1117
|
// src/admin-app/components/PageEditorFrame.tsx
|
|
959
1118
|
var import_react6 = require("react");
|
|
960
|
-
var
|
|
1119
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
961
1120
|
var extractPageIDFromBuilderSrc = (value) => {
|
|
962
1121
|
if (!value || typeof value !== "string") {
|
|
963
1122
|
return null;
|
|
@@ -1199,8 +1358,8 @@ function PageEditorFrame({ src }) {
|
|
|
1199
1358
|
},
|
|
1200
1359
|
[]
|
|
1201
1360
|
);
|
|
1202
|
-
return /* @__PURE__ */ (0,
|
|
1203
|
-
/* @__PURE__ */ (0,
|
|
1361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { display: "grid", gap: "0.8rem" }, children: [
|
|
1362
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
1204
1363
|
"div",
|
|
1205
1364
|
{
|
|
1206
1365
|
style: {
|
|
@@ -1215,9 +1374,9 @@ function PageEditorFrame({ src }) {
|
|
|
1215
1374
|
padding: "0.7rem 0.8rem"
|
|
1216
1375
|
},
|
|
1217
1376
|
children: [
|
|
1218
|
-
/* @__PURE__ */ (0,
|
|
1219
|
-
/* @__PURE__ */ (0,
|
|
1220
|
-
/* @__PURE__ */ (0,
|
|
1377
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { display: "grid", gap: "0.2rem" }, children: [
|
|
1378
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { color: "var(--orion-admin-muted)", fontSize: "0.9rem" }, children: "Save changes to update the page layout and content." }),
|
|
1379
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1221
1380
|
"div",
|
|
1222
1381
|
{
|
|
1223
1382
|
style: {
|
|
@@ -1237,8 +1396,8 @@ function PageEditorFrame({ src }) {
|
|
|
1237
1396
|
}
|
|
1238
1397
|
)
|
|
1239
1398
|
] }),
|
|
1240
|
-
/* @__PURE__ */ (0,
|
|
1241
|
-
/* @__PURE__ */ (0,
|
|
1399
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { alignItems: "center", display: "flex", flexWrap: "wrap", gap: "0.5rem" }, children: [
|
|
1400
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1242
1401
|
"button",
|
|
1243
1402
|
{
|
|
1244
1403
|
className: "orion-admin-action-button",
|
|
@@ -1249,7 +1408,7 @@ function PageEditorFrame({ src }) {
|
|
|
1249
1408
|
children: "Undo"
|
|
1250
1409
|
}
|
|
1251
1410
|
),
|
|
1252
|
-
/* @__PURE__ */ (0,
|
|
1411
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1253
1412
|
"button",
|
|
1254
1413
|
{
|
|
1255
1414
|
className: "orion-admin-action-button",
|
|
@@ -1260,7 +1419,7 @@ function PageEditorFrame({ src }) {
|
|
|
1260
1419
|
children: "Redo"
|
|
1261
1420
|
}
|
|
1262
1421
|
),
|
|
1263
|
-
/* @__PURE__ */ (0,
|
|
1422
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1264
1423
|
"button",
|
|
1265
1424
|
{
|
|
1266
1425
|
className: "orion-admin-action-button",
|
|
@@ -1270,7 +1429,7 @@ function PageEditorFrame({ src }) {
|
|
|
1270
1429
|
children: saving === "draft" ? "Saving..." : "Save Draft"
|
|
1271
1430
|
}
|
|
1272
1431
|
),
|
|
1273
|
-
/* @__PURE__ */ (0,
|
|
1432
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1274
1433
|
"button",
|
|
1275
1434
|
{
|
|
1276
1435
|
className: "orion-admin-action-button",
|
|
@@ -1285,9 +1444,9 @@ function PageEditorFrame({ src }) {
|
|
|
1285
1444
|
]
|
|
1286
1445
|
}
|
|
1287
1446
|
),
|
|
1288
|
-
message ? /* @__PURE__ */ (0,
|
|
1289
|
-
error ? /* @__PURE__ */ (0,
|
|
1290
|
-
sessionExpired ? /* @__PURE__ */ (0,
|
|
1447
|
+
message ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { color: "var(--orion-admin-accent)", fontSize: "0.9rem", fontWeight: 700 }, children: message }) : null,
|
|
1448
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "orion-admin-error", children: error }) : null,
|
|
1449
|
+
sessionExpired ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1291
1450
|
"div",
|
|
1292
1451
|
{
|
|
1293
1452
|
style: {
|
|
@@ -1302,7 +1461,7 @@ function PageEditorFrame({ src }) {
|
|
|
1302
1461
|
children: "Session expired. Log in again in a new tab, then save your changes."
|
|
1303
1462
|
}
|
|
1304
1463
|
) : null,
|
|
1305
|
-
/* @__PURE__ */ (0,
|
|
1464
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1306
1465
|
"iframe",
|
|
1307
1466
|
{
|
|
1308
1467
|
ref: iframeRef,
|
|
@@ -1322,7 +1481,7 @@ function PageEditorFrame({ src }) {
|
|
|
1322
1481
|
}
|
|
1323
1482
|
}
|
|
1324
1483
|
),
|
|
1325
|
-
pendingNavigationURL && showUnsavedDialog ? /* @__PURE__ */ (0,
|
|
1484
|
+
pendingNavigationURL && showUnsavedDialog ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1326
1485
|
"div",
|
|
1327
1486
|
{
|
|
1328
1487
|
"data-orion-unsaved-dialog": "true",
|
|
@@ -1336,7 +1495,7 @@ function PageEditorFrame({ src }) {
|
|
|
1336
1495
|
position: "fixed",
|
|
1337
1496
|
zIndex: 2e3
|
|
1338
1497
|
},
|
|
1339
|
-
children: /* @__PURE__ */ (0,
|
|
1498
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
1340
1499
|
"div",
|
|
1341
1500
|
{
|
|
1342
1501
|
style: {
|
|
@@ -1351,12 +1510,12 @@ function PageEditorFrame({ src }) {
|
|
|
1351
1510
|
width: "100%"
|
|
1352
1511
|
},
|
|
1353
1512
|
children: [
|
|
1354
|
-
/* @__PURE__ */ (0,
|
|
1355
|
-
/* @__PURE__ */ (0,
|
|
1356
|
-
/* @__PURE__ */ (0,
|
|
1513
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
|
|
1514
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { color: "var(--orion-admin-text)", fontSize: "1rem", fontWeight: 700 }, children: "Unsaved changes" }),
|
|
1515
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { color: "var(--orion-admin-muted)", fontSize: "0.9rem", marginTop: "0.4rem" }, children: "You have unsaved edits in the page builder. Save before leaving this page?" })
|
|
1357
1516
|
] }),
|
|
1358
|
-
/* @__PURE__ */ (0,
|
|
1359
|
-
/* @__PURE__ */ (0,
|
|
1517
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { display: "flex", gap: "0.6rem", justifyContent: "flex-end" }, children: [
|
|
1518
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1360
1519
|
"button",
|
|
1361
1520
|
{
|
|
1362
1521
|
className: "orion-admin-action-button",
|
|
@@ -1368,7 +1527,7 @@ function PageEditorFrame({ src }) {
|
|
|
1368
1527
|
children: "Stay"
|
|
1369
1528
|
}
|
|
1370
1529
|
),
|
|
1371
|
-
/* @__PURE__ */ (0,
|
|
1530
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1372
1531
|
"button",
|
|
1373
1532
|
{
|
|
1374
1533
|
className: "orion-admin-action-button",
|
|
@@ -1399,5 +1558,7 @@ function PageEditorFrame({ src }) {
|
|
|
1399
1558
|
MediaDetailPanel,
|
|
1400
1559
|
MediaListItem,
|
|
1401
1560
|
MediaUploadForm,
|
|
1402
|
-
PageEditorFrame
|
|
1561
|
+
PageEditorFrame,
|
|
1562
|
+
SiteFooterPreview,
|
|
1563
|
+
SiteHeaderPreview
|
|
1403
1564
|
});
|