@orion-studios/payload-studio 0.5.0-beta.98 → 0.6.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -68
- package/dist/admin/client.d.mts +5 -0
- package/dist/admin/client.d.ts +5 -0
- package/dist/admin/client.js +4491 -736
- package/dist/admin/client.mjs +3367 -752
- package/dist/admin/index.d.mts +2 -1
- package/dist/admin/index.d.ts +2 -1
- package/dist/admin/index.js +498 -53
- package/dist/admin/index.mjs +2 -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 +285 -109
- package/dist/admin-app/client.mjs +59 -871
- package/dist/admin-app/index.d.mts +2 -1
- package/dist/admin-app/index.d.ts +2 -1
- package/dist/admin-app/index.mjs +5 -3
- package/dist/admin-app/styles.css +1708 -56
- package/dist/admin.css +158 -35
- package/dist/blocks/index.js +415 -200
- package/dist/blocks/index.mjs +2 -2
- package/dist/{chunk-XK3K5GRP.mjs → chunk-JQAHXYAM.mjs} +271 -67
- package/dist/chunk-KPIX7OSV.mjs +1051 -0
- package/dist/chunk-OQSEJXC4.mjs +166 -0
- package/dist/{chunk-XHWQJUX5.mjs → chunk-OTHERBGX.mjs} +3 -3
- package/dist/chunk-PF3EBZXF.mjs +326 -0
- package/dist/chunk-Q2HGC67S.mjs +904 -0
- package/dist/{chunk-XVH5SCBD.mjs → chunk-RKTIFEUY.mjs} +4 -19
- package/dist/chunk-W2UOCJDX.mjs +32 -0
- package/dist/{chunk-C4J35SPJ.mjs → chunk-XKUTZ7IU.mjs} +257 -452
- package/dist/{index-ZbOx4OCF.d.ts → index-52HdVLQq.d.ts} +12 -22
- package/dist/index-BMitiKK8.d.ts +435 -0
- package/dist/index-Crx_MtPw.d.ts +223 -0
- package/dist/index-Cv-6qnrw.d.mts +223 -0
- package/dist/{index-ZbOx4OCF.d.mts → index-DEQC3Dwj.d.mts} +12 -22
- package/dist/{index-BIwu3qIH.d.mts → index-DWmudwDm.d.mts} +2 -1
- package/dist/{index-BIwu3qIH.d.ts → index-DWmudwDm.d.ts} +2 -1
- package/dist/index-D_b24Gef.d.mts +435 -0
- package/dist/index.d.mts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +1968 -1198
- package/dist/index.mjs +10 -8
- package/dist/nextjs/index.js +5 -684
- package/dist/nextjs/index.mjs +2 -3
- package/dist/sitePreviewTypes-BkHCWxNW.d.mts +58 -0
- package/dist/sitePreviewTypes-BkHCWxNW.d.ts +58 -0
- package/dist/studio/index.d.mts +1 -1
- package/dist/studio/index.d.ts +1 -1
- package/dist/studio-pages/builder.css +125 -83
- package/dist/studio-pages/client.d.mts +58 -1
- package/dist/studio-pages/client.d.ts +58 -1
- package/dist/studio-pages/client.js +450 -241
- package/dist/studio-pages/client.mjs +455 -247
- package/dist/studio-pages/index.d.mts +3 -2
- package/dist/studio-pages/index.d.ts +3 -2
- package/dist/studio-pages/index.js +418 -183
- package/dist/studio-pages/index.mjs +15 -6
- package/package.json +19 -5
- package/dist/chunk-2FO2ROW4.mjs +0 -468
- package/dist/chunk-SIL2J5MF.mjs +0 -155
- package/dist/index-BFXZue5i.d.ts +0 -178
- package/dist/index-CoYRBbf6.d.mts +0 -178
- package/dist/index-R7hA134j.d.mts +0 -140
- package/dist/index-vjrjy0P4.d.ts +0 -140
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "../chunk-ROTPP5CU.mjs";
|
|
7
7
|
|
|
8
8
|
// src/studio-pages/builder/BuilderPageEditor.tsx
|
|
9
|
-
import { useCallback, useEffect as useEffect5, useMemo as useMemo2, useRef as
|
|
9
|
+
import { useCallback, useEffect as useEffect5, useMemo as useMemo2, useRef as useRef3, useState as useState6 } from "react";
|
|
10
10
|
|
|
11
11
|
// src/blocks/blocks/sectionStyleFields.ts
|
|
12
12
|
var sectionStyleDefaults = {
|
|
@@ -15,15 +15,15 @@ var sectionStyleDefaults = {
|
|
|
15
15
|
contentGradientAngle: "135",
|
|
16
16
|
contentGradientFrom: "#ffffff",
|
|
17
17
|
contentGradientPreset: "none",
|
|
18
|
-
contentGradientTo: "#
|
|
18
|
+
contentGradientTo: "#f4f6f8",
|
|
19
19
|
contentWidth: "inherit",
|
|
20
20
|
sectionPaddingX: "inherit",
|
|
21
21
|
sectionBackgroundColor: "#ffffff",
|
|
22
22
|
sectionBackgroundMode: "none",
|
|
23
23
|
sectionGradientAngle: "135",
|
|
24
|
-
sectionGradientFrom: "#
|
|
25
|
-
sectionGradientPreset: "
|
|
26
|
-
sectionGradientTo: "#
|
|
24
|
+
sectionGradientFrom: "#334b63",
|
|
25
|
+
sectionGradientPreset: "slate",
|
|
26
|
+
sectionGradientTo: "#496582",
|
|
27
27
|
sectionPaddingY: "md",
|
|
28
28
|
sectionWidth: "content"
|
|
29
29
|
};
|
|
@@ -41,13 +41,13 @@ var defaultBuilderBlockSettingsV2 = {
|
|
|
41
41
|
contentGradientAngle: "135",
|
|
42
42
|
contentGradientFrom: "#ffffff",
|
|
43
43
|
contentGradientPreset: "none",
|
|
44
|
-
contentGradientTo: "#
|
|
44
|
+
contentGradientTo: "#f4f6f8",
|
|
45
45
|
sectionBackgroundColor: "#ffffff",
|
|
46
46
|
sectionBackgroundMode: "none",
|
|
47
47
|
sectionGradientAngle: "135",
|
|
48
|
-
sectionGradientFrom: "#
|
|
49
|
-
sectionGradientPreset: "
|
|
50
|
-
sectionGradientTo: "#
|
|
48
|
+
sectionGradientFrom: "#334b63",
|
|
49
|
+
sectionGradientPreset: "slate",
|
|
50
|
+
sectionGradientTo: "#496582"
|
|
51
51
|
},
|
|
52
52
|
layout: {
|
|
53
53
|
contentWidth: "inherit",
|
|
@@ -108,9 +108,9 @@ var defaultBuilderItemSettingsV2 = {
|
|
|
108
108
|
};
|
|
109
109
|
var defaultBuilderThemeTokens = {
|
|
110
110
|
colors: {
|
|
111
|
-
accent: "#
|
|
112
|
-
bodyText: "#
|
|
113
|
-
headingText: "#
|
|
111
|
+
accent: "#334b63",
|
|
112
|
+
bodyText: "#425163",
|
|
113
|
+
headingText: "#182332",
|
|
114
114
|
surface: "#ffffff"
|
|
115
115
|
},
|
|
116
116
|
radii: {
|
|
@@ -504,72 +504,7 @@ var alignOptions = [
|
|
|
504
504
|
{ label: "Right", value: "right" },
|
|
505
505
|
{ label: "Justify", value: "justify" }
|
|
506
506
|
];
|
|
507
|
-
var layoutFieldSet = [
|
|
508
|
-
{
|
|
509
|
-
group: "layout",
|
|
510
|
-
key: "settings.layout.contentWidth",
|
|
511
|
-
label: "Content Width",
|
|
512
|
-
options: [
|
|
513
|
-
{ label: "Inherit Page Default", value: "inherit" },
|
|
514
|
-
{ label: "Narrow", value: "narrow" },
|
|
515
|
-
{ label: "Content", value: "content" },
|
|
516
|
-
{ label: "Wide", value: "wide" },
|
|
517
|
-
{ label: "Full", value: "full" }
|
|
518
|
-
],
|
|
519
|
-
tags: ["width", "container"],
|
|
520
|
-
type: "select"
|
|
521
|
-
},
|
|
522
|
-
{
|
|
523
|
-
group: "layout",
|
|
524
|
-
key: "settings.layout.linkVerticalPadding",
|
|
525
|
-
label: "Keep Top and Bottom Equal",
|
|
526
|
-
tags: ["spacing", "padding", "equal", "lock", "vertical"],
|
|
527
|
-
type: "checkbox"
|
|
528
|
-
},
|
|
529
|
-
{
|
|
530
|
-
group: "layout",
|
|
531
|
-
key: "settings.layout.paddingTopPt",
|
|
532
|
-
label: "Top Padding (pt)",
|
|
533
|
-
max: 240,
|
|
534
|
-
min: 0,
|
|
535
|
-
tags: ["spacing", "padding", "top", "vertical"],
|
|
536
|
-
type: "number"
|
|
537
|
-
},
|
|
538
|
-
{
|
|
539
|
-
group: "layout",
|
|
540
|
-
key: "settings.layout.paddingBottomPt",
|
|
541
|
-
label: "Bottom Padding (pt)",
|
|
542
|
-
max: 240,
|
|
543
|
-
min: 0,
|
|
544
|
-
tags: ["spacing", "padding", "bottom", "vertical"],
|
|
545
|
-
type: "number"
|
|
546
|
-
},
|
|
547
|
-
{
|
|
548
|
-
group: "layout",
|
|
549
|
-
key: "settings.layout.linkHorizontalPadding",
|
|
550
|
-
label: "Keep Left and Right Equal",
|
|
551
|
-
tags: ["spacing", "padding", "equal", "lock", "horizontal"],
|
|
552
|
-
type: "checkbox"
|
|
553
|
-
},
|
|
554
|
-
{
|
|
555
|
-
group: "layout",
|
|
556
|
-
key: "settings.layout.paddingLeftPt",
|
|
557
|
-
label: "Left Padding (pt)",
|
|
558
|
-
max: 240,
|
|
559
|
-
min: 0,
|
|
560
|
-
tags: ["spacing", "padding", "left", "horizontal"],
|
|
561
|
-
type: "number"
|
|
562
|
-
},
|
|
563
|
-
{
|
|
564
|
-
group: "layout",
|
|
565
|
-
key: "settings.layout.paddingRightPt",
|
|
566
|
-
label: "Right Padding (pt)",
|
|
567
|
-
max: 240,
|
|
568
|
-
min: 0,
|
|
569
|
-
tags: ["spacing", "padding", "right", "horizontal"],
|
|
570
|
-
type: "number"
|
|
571
|
-
}
|
|
572
|
-
];
|
|
507
|
+
var layoutFieldSet = [];
|
|
573
508
|
var typographyFieldSet = [
|
|
574
509
|
{
|
|
575
510
|
group: "typography",
|
|
@@ -626,44 +561,7 @@ var typographyFieldSet = [
|
|
|
626
561
|
type: "select"
|
|
627
562
|
}
|
|
628
563
|
];
|
|
629
|
-
var styleFieldSet = [
|
|
630
|
-
{
|
|
631
|
-
group: "style",
|
|
632
|
-
key: "settings.appearance.sectionBackgroundMode",
|
|
633
|
-
label: "Section Background",
|
|
634
|
-
options: [
|
|
635
|
-
{ label: "None", value: "none" },
|
|
636
|
-
{ label: "Color", value: "color" },
|
|
637
|
-
{ label: "Gradient", value: "gradient" }
|
|
638
|
-
],
|
|
639
|
-
tags: ["background", "section"],
|
|
640
|
-
type: "select"
|
|
641
|
-
},
|
|
642
|
-
{
|
|
643
|
-
group: "style",
|
|
644
|
-
key: "settings.appearance.sectionBackgroundColor",
|
|
645
|
-
label: "Section Background Color",
|
|
646
|
-
type: "color"
|
|
647
|
-
},
|
|
648
|
-
{
|
|
649
|
-
group: "style",
|
|
650
|
-
key: "settings.appearance.contentBackgroundMode",
|
|
651
|
-
label: "Content Background",
|
|
652
|
-
options: [
|
|
653
|
-
{ label: "None", value: "none" },
|
|
654
|
-
{ label: "Color", value: "color" },
|
|
655
|
-
{ label: "Gradient", value: "gradient" }
|
|
656
|
-
],
|
|
657
|
-
tags: ["background", "content"],
|
|
658
|
-
type: "select"
|
|
659
|
-
},
|
|
660
|
-
{
|
|
661
|
-
group: "style",
|
|
662
|
-
key: "settings.appearance.contentBackgroundColor",
|
|
663
|
-
label: "Content Background Color",
|
|
664
|
-
type: "color"
|
|
665
|
-
}
|
|
666
|
-
];
|
|
564
|
+
var styleFieldSet = [];
|
|
667
565
|
var commonAdvanced = [
|
|
668
566
|
{
|
|
669
567
|
group: "advanced",
|
|
@@ -714,10 +612,8 @@ var mediaFieldSet = [
|
|
|
714
612
|
];
|
|
715
613
|
var commonInspectorGroups = [
|
|
716
614
|
{ key: "basics", label: "Basics" },
|
|
717
|
-
{ key: "layout", label: "Layout" },
|
|
718
615
|
{ key: "typography", label: "Typography" },
|
|
719
616
|
{ key: "media", label: "Media" },
|
|
720
|
-
{ key: "style", label: "Style" },
|
|
721
617
|
{ key: "advanced", label: "Advanced" }
|
|
722
618
|
];
|
|
723
619
|
var inspectorDefinitionByBlockType = {
|
|
@@ -772,6 +668,7 @@ var inspectorDefinitionByBlockType = {
|
|
|
772
668
|
faq: {
|
|
773
669
|
blockType: "faq",
|
|
774
670
|
fields: [
|
|
671
|
+
{ group: "basics", inlineEditable: true, key: "eyebrow", label: "Eyebrow", type: "text" },
|
|
775
672
|
{ group: "basics", inlineEditable: true, key: "title", label: "Title", type: "text" },
|
|
776
673
|
...layoutFieldSet,
|
|
777
674
|
...typographyFieldSet,
|
|
@@ -782,6 +679,7 @@ var inspectorDefinitionByBlockType = {
|
|
|
782
679
|
featureGrid: {
|
|
783
680
|
blockType: "featureGrid",
|
|
784
681
|
fields: [
|
|
682
|
+
{ group: "basics", inlineEditable: true, key: "eyebrow", label: "Eyebrow", type: "text" },
|
|
785
683
|
{ group: "basics", inlineEditable: true, key: "title", label: "Title", type: "text" },
|
|
786
684
|
{
|
|
787
685
|
group: "basics",
|
|
@@ -789,7 +687,11 @@ var inspectorDefinitionByBlockType = {
|
|
|
789
687
|
label: "Variant",
|
|
790
688
|
options: [
|
|
791
689
|
{ label: "Cards", value: "cards" },
|
|
792
|
-
{ label: "Highlight", value: "highlight" }
|
|
690
|
+
{ label: "Highlight", value: "highlight" },
|
|
691
|
+
{ label: "Split List", value: "splitList" },
|
|
692
|
+
{ label: "Panels", value: "panels" },
|
|
693
|
+
{ label: "Catalog", value: "catalog" },
|
|
694
|
+
{ label: "Contact Split", value: "contact" }
|
|
793
695
|
],
|
|
794
696
|
type: "select"
|
|
795
697
|
},
|
|
@@ -804,6 +706,7 @@ var inspectorDefinitionByBlockType = {
|
|
|
804
706
|
formEmbed: {
|
|
805
707
|
blockType: "formEmbed",
|
|
806
708
|
fields: [
|
|
709
|
+
{ group: "basics", inlineEditable: true, key: "eyebrow", label: "Eyebrow", type: "text" },
|
|
807
710
|
{ group: "basics", inlineEditable: true, key: "title", label: "Title", type: "text" },
|
|
808
711
|
{ group: "basics", inlineEditable: true, key: "description", label: "Description", type: "textarea" },
|
|
809
712
|
{
|
|
@@ -836,7 +739,7 @@ var inspectorDefinitionByBlockType = {
|
|
|
836
739
|
type: "select"
|
|
837
740
|
},
|
|
838
741
|
{
|
|
839
|
-
group: "
|
|
742
|
+
group: "basics",
|
|
840
743
|
key: "heroHeight",
|
|
841
744
|
label: "Hero Height",
|
|
842
745
|
options: [
|
|
@@ -889,6 +792,16 @@ var inspectorDefinitionByBlockType = {
|
|
|
889
792
|
richText: {
|
|
890
793
|
blockType: "richText",
|
|
891
794
|
fields: [
|
|
795
|
+
{
|
|
796
|
+
group: "basics",
|
|
797
|
+
key: "variant",
|
|
798
|
+
label: "Variant",
|
|
799
|
+
options: [
|
|
800
|
+
{ label: "Default", value: "default" },
|
|
801
|
+
{ label: "Quote Banner", value: "quoteBanner" }
|
|
802
|
+
],
|
|
803
|
+
type: "select"
|
|
804
|
+
},
|
|
892
805
|
{ group: "basics", inlineEditable: true, key: "title", label: "Title", type: "text" },
|
|
893
806
|
{
|
|
894
807
|
group: "basics",
|
|
@@ -1029,9 +942,7 @@ function BlockInspectorRenderer({
|
|
|
1029
942
|
const [expandedGroups, setExpandedGroups] = useState2({
|
|
1030
943
|
advanced: false,
|
|
1031
944
|
basics: false,
|
|
1032
|
-
layout: false,
|
|
1033
945
|
media: false,
|
|
1034
|
-
style: false,
|
|
1035
946
|
typography: false
|
|
1036
947
|
});
|
|
1037
948
|
const definition = inspectorDefinitionByBlockType[blockType];
|
|
@@ -1074,10 +985,7 @@ function BlockInspectorRenderer({
|
|
|
1074
985
|
};
|
|
1075
986
|
return /* @__PURE__ */ jsxs3("div", { className: "orion-builder-settings-root", children: [
|
|
1076
987
|
/* @__PURE__ */ jsxs3("div", { className: "orion-builder-settings-summary-row", children: [
|
|
1077
|
-
/* @__PURE__ */
|
|
1078
|
-
groupLabel("basics"),
|
|
1079
|
-
" and Styling"
|
|
1080
|
-
] }),
|
|
988
|
+
/* @__PURE__ */ jsx3("div", { className: "orion-builder-settings-summary-title", children: "Content Settings" }),
|
|
1081
989
|
/* @__PURE__ */ jsxs3("div", { className: "orion-builder-settings-summary-actions", children: [
|
|
1082
990
|
/* @__PURE__ */ jsx3(
|
|
1083
991
|
"button",
|
|
@@ -1106,7 +1014,7 @@ function BlockInspectorRenderer({
|
|
|
1106
1014
|
{
|
|
1107
1015
|
className: "orion-builder-settings-input",
|
|
1108
1016
|
onChange: (event) => onSearchQueryChange(event.target.value),
|
|
1109
|
-
placeholder: "Search
|
|
1017
|
+
placeholder: "Search content, text, media...",
|
|
1110
1018
|
type: "search",
|
|
1111
1019
|
value: searchQuery
|
|
1112
1020
|
}
|
|
@@ -1335,6 +1243,33 @@ function BlockInspectorRenderer({
|
|
|
1335
1243
|
] });
|
|
1336
1244
|
}
|
|
1337
1245
|
|
|
1246
|
+
// src/studio-pages/document.ts
|
|
1247
|
+
var ensureNodeID = (value, index) => {
|
|
1248
|
+
if (typeof value === "string" && value.trim().length > 0) {
|
|
1249
|
+
return value.trim();
|
|
1250
|
+
}
|
|
1251
|
+
return `node-${index + 1}`;
|
|
1252
|
+
};
|
|
1253
|
+
var layoutToStudioDocument = (layout, title, metadata) => {
|
|
1254
|
+
const nodes = layout.filter((block) => typeof block.blockType === "string").map((rawBlock, index) => {
|
|
1255
|
+
const block = migrateBlockToSettingsV2(rawBlock);
|
|
1256
|
+
const blockType = String(block.blockType);
|
|
1257
|
+
const { id, blockType: _ignoredBlockType, ...data } = block;
|
|
1258
|
+
return {
|
|
1259
|
+
id: ensureNodeID(id, index),
|
|
1260
|
+
type: blockType,
|
|
1261
|
+
data
|
|
1262
|
+
};
|
|
1263
|
+
});
|
|
1264
|
+
return {
|
|
1265
|
+
metadata,
|
|
1266
|
+
schemaVersion: 1,
|
|
1267
|
+
title,
|
|
1268
|
+
nodes,
|
|
1269
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
1270
|
+
};
|
|
1271
|
+
};
|
|
1272
|
+
|
|
1338
1273
|
// src/studio-pages/index.ts
|
|
1339
1274
|
var withSectionStyleDefaults = (value) => ({
|
|
1340
1275
|
...sectionStyleDefaults,
|
|
@@ -1364,11 +1299,14 @@ var defaultNodeData = {
|
|
|
1364
1299
|
}),
|
|
1365
1300
|
cta: {
|
|
1366
1301
|
...withSectionStyleDefaults({}),
|
|
1367
|
-
backgroundColor: "
|
|
1302
|
+
backgroundColor: "",
|
|
1303
|
+
bullets: [],
|
|
1368
1304
|
buttonHref: "/contact",
|
|
1369
1305
|
buttonLabel: "Contact Us",
|
|
1370
1306
|
description: "Optional supporting copy.",
|
|
1307
|
+
eyebrow: "",
|
|
1371
1308
|
headline: "Ready to get started?",
|
|
1309
|
+
imageURL: "",
|
|
1372
1310
|
style: "light"
|
|
1373
1311
|
},
|
|
1374
1312
|
faq: {
|
|
@@ -1384,6 +1322,7 @@ var defaultNodeData = {
|
|
|
1384
1322
|
{ description: "Explain this point.", iconType: "badge", icon: "02", imageCornerStyle: "rounded", imageFit: "cover", imagePosition: "center", title: "Feature Two" },
|
|
1385
1323
|
{ description: "Explain this point.", iconType: "badge", icon: "03", imageCornerStyle: "rounded", imageFit: "cover", imagePosition: "center", title: "Feature Three" }
|
|
1386
1324
|
],
|
|
1325
|
+
subtitle: "",
|
|
1387
1326
|
title: "Section Title",
|
|
1388
1327
|
variant: "cards"
|
|
1389
1328
|
},
|
|
@@ -1391,16 +1330,18 @@ var defaultNodeData = {
|
|
|
1391
1330
|
...withSectionStyleDefaults({}),
|
|
1392
1331
|
description: "Collect lead details from visitors.",
|
|
1393
1332
|
formType: "quote",
|
|
1333
|
+
submitLabel: "Submit",
|
|
1394
1334
|
title: "Request a Quote"
|
|
1395
1335
|
},
|
|
1396
1336
|
hero: {
|
|
1397
1337
|
...withSectionStyleDefaults({}),
|
|
1398
1338
|
backgroundColor: "",
|
|
1339
|
+
backgroundImageURL: "",
|
|
1399
1340
|
backgroundOverlayMode: "none",
|
|
1400
1341
|
backgroundOverlayOpacity: 45,
|
|
1401
1342
|
backgroundOverlayColor: "#000000",
|
|
1402
|
-
backgroundOverlayGradientFrom: "#
|
|
1403
|
-
backgroundOverlayGradientTo: "#
|
|
1343
|
+
backgroundOverlayGradientFrom: "#334b63",
|
|
1344
|
+
backgroundOverlayGradientTo: "#496582",
|
|
1404
1345
|
backgroundOverlayGradientAngle: "135",
|
|
1405
1346
|
backgroundOverlayGradientFromStrength: 100,
|
|
1406
1347
|
backgroundOverlayGradientToStrength: 100,
|
|
@@ -1434,11 +1375,12 @@ var defaultNodeData = {
|
|
|
1434
1375
|
{ imageCornerStyle: "rounded", imageFit: "contain", imagePosition: "center", name: "Trusted Partner 2" },
|
|
1435
1376
|
{ imageCornerStyle: "rounded", imageFit: "contain", imagePosition: "center", name: "Trusted Partner 3" }
|
|
1436
1377
|
],
|
|
1437
|
-
subtitle: "
|
|
1438
|
-
title: "Trusted by
|
|
1378
|
+
subtitle: "Show logos from trusted associations, partners, or collaborators.",
|
|
1379
|
+
title: "Trusted by Great Partners"
|
|
1439
1380
|
}),
|
|
1440
1381
|
richText: {
|
|
1441
1382
|
...withSectionStyleDefaults({}),
|
|
1383
|
+
cards: [],
|
|
1442
1384
|
content: {
|
|
1443
1385
|
root: {
|
|
1444
1386
|
children: [
|
|
@@ -1468,6 +1410,7 @@ var defaultNodeData = {
|
|
|
1468
1410
|
version: 1
|
|
1469
1411
|
}
|
|
1470
1412
|
},
|
|
1413
|
+
statsItems: [],
|
|
1471
1414
|
title: "Section Heading",
|
|
1472
1415
|
width: "normal"
|
|
1473
1416
|
},
|
|
@@ -1481,9 +1424,9 @@ var defaultNodeData = {
|
|
|
1481
1424
|
},
|
|
1482
1425
|
stats: withSectionStyleDefaults({
|
|
1483
1426
|
items: [
|
|
1484
|
-
{ description: "Average response
|
|
1485
|
-
{ description: "
|
|
1486
|
-
{ description: "
|
|
1427
|
+
{ description: "Average first response", label: "Response Time", value: "24h" },
|
|
1428
|
+
{ description: "Client satisfaction score", label: "Satisfaction", value: "4.9/5" },
|
|
1429
|
+
{ description: "Recent projects or clients served", label: "Recent Work", value: "150+" }
|
|
1487
1430
|
],
|
|
1488
1431
|
subtitle: "Highlight measurable outcomes to build trust quickly.",
|
|
1489
1432
|
title: "Performance Highlights"
|
|
@@ -1532,31 +1475,6 @@ var pageInspectorPanels = pageInspectorPanelRegistry.map((entry) => ({
|
|
|
1532
1475
|
label: entry.panelLabel,
|
|
1533
1476
|
nodeType: entry.nodeType
|
|
1534
1477
|
}));
|
|
1535
|
-
var ensureNodeID = (inputID, index) => {
|
|
1536
|
-
if (typeof inputID === "string" && inputID.length > 0) {
|
|
1537
|
-
return inputID;
|
|
1538
|
-
}
|
|
1539
|
-
return `node-${index + 1}`;
|
|
1540
|
-
};
|
|
1541
|
-
var layoutToStudioDocument = (layout, title, metadata) => {
|
|
1542
|
-
const nodes = layout.filter((block) => typeof block.blockType === "string").map((rawBlock, index) => {
|
|
1543
|
-
const block = migrateBlockToSettingsV2(rawBlock);
|
|
1544
|
-
const blockType = String(block.blockType);
|
|
1545
|
-
const { id, blockType: _ignoredBlockType, ...data } = block;
|
|
1546
|
-
return {
|
|
1547
|
-
id: ensureNodeID(id, index),
|
|
1548
|
-
type: blockType,
|
|
1549
|
-
data
|
|
1550
|
-
};
|
|
1551
|
-
});
|
|
1552
|
-
return {
|
|
1553
|
-
metadata,
|
|
1554
|
-
schemaVersion: 1,
|
|
1555
|
-
title,
|
|
1556
|
-
nodes,
|
|
1557
|
-
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
1558
|
-
};
|
|
1559
|
-
};
|
|
1560
1478
|
|
|
1561
1479
|
// src/studio-pages/builder/hooks/usePersistentSidebarPanel.ts
|
|
1562
1480
|
import { useEffect as useEffect2, useState as useState3 } from "react";
|
|
@@ -1746,14 +1664,14 @@ var sectionPresets = [
|
|
|
1746
1664
|
title: "Performance Highlights",
|
|
1747
1665
|
subtitle: "Show measurable outcomes clients care about.",
|
|
1748
1666
|
items: [
|
|
1749
|
-
{ value: "24h", label: "
|
|
1750
|
-
{ value: "
|
|
1667
|
+
{ value: "24h", label: "Response Time", description: "Average first response" },
|
|
1668
|
+
{ value: "150+", label: "Recent Projects", description: "In the past 12 months" },
|
|
1751
1669
|
{ value: "4.9/5", label: "Satisfaction", description: "Average review score" }
|
|
1752
1670
|
]
|
|
1753
1671
|
},
|
|
1754
1672
|
{
|
|
1755
1673
|
blockType: "logoWall",
|
|
1756
|
-
title: "Trusted by
|
|
1674
|
+
title: "Trusted by Great Partners",
|
|
1757
1675
|
subtitle: "Show logos from associations, partners, or neighborhoods.",
|
|
1758
1676
|
items: [
|
|
1759
1677
|
{ name: "Partner One" },
|
|
@@ -1864,6 +1782,13 @@ function clonePresetBlocks(blocks) {
|
|
|
1864
1782
|
return JSON.parse(JSON.stringify(blocks));
|
|
1865
1783
|
}
|
|
1866
1784
|
|
|
1785
|
+
// src/studio-pages/builder/previewRegistry.ts
|
|
1786
|
+
var globalScope = globalThis;
|
|
1787
|
+
var registerBuilderBlockPreviewRenderer = (renderer) => {
|
|
1788
|
+
globalScope.__ORION_STUDIO_BUILDER_BLOCK_PREVIEW_RENDERER__ = renderer;
|
|
1789
|
+
};
|
|
1790
|
+
var getRegisteredBuilderBlockPreviewRenderer = () => globalScope.__ORION_STUDIO_BUILDER_BLOCK_PREVIEW_RENDERER__ ?? null;
|
|
1791
|
+
|
|
1867
1792
|
// src/studio-pages/builder/ui/InlineText.tsx
|
|
1868
1793
|
import { useEffect as useEffect3, useRef, useState as useState4 } from "react";
|
|
1869
1794
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
@@ -1931,10 +1856,10 @@ function InlineText({
|
|
|
1931
1856
|
style: {
|
|
1932
1857
|
background: "transparent",
|
|
1933
1858
|
borderRadius: 6,
|
|
1934
|
-
boxShadow: "0 0 0
|
|
1859
|
+
boxShadow: "0 0 0 1.5px rgba(255, 255, 255, 0.92), 0 0 0 5px var(--orion-studio-accent-soft-strong)",
|
|
1935
1860
|
cursor: "text",
|
|
1936
1861
|
minHeight: multiline ? "1.6em" : void 0,
|
|
1937
|
-
outline: "3px solid
|
|
1862
|
+
outline: "3px solid var(--orion-studio-selection-outline)",
|
|
1938
1863
|
outlineOffset: 2,
|
|
1939
1864
|
...style
|
|
1940
1865
|
},
|
|
@@ -1963,7 +1888,7 @@ function UploadOverlay({ label = "Uploading image..." }) {
|
|
|
1963
1888
|
}
|
|
1964
1889
|
|
|
1965
1890
|
// src/studio-pages/builder/ui/BlockFrame.tsx
|
|
1966
|
-
import { useEffect as useEffect4, useState as useState5 } from "react";
|
|
1891
|
+
import { useEffect as useEffect4, useRef as useRef2, useState as useState5 } from "react";
|
|
1967
1892
|
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1968
1893
|
function BlockFrame({
|
|
1969
1894
|
children,
|
|
@@ -1977,6 +1902,7 @@ function BlockFrame({
|
|
|
1977
1902
|
}) {
|
|
1978
1903
|
const [dropPosition, setDropPosition] = useState5(null);
|
|
1979
1904
|
const [dropHovered, setDropHovered] = useState5(false);
|
|
1905
|
+
const frameRef = useRef2(null);
|
|
1980
1906
|
const isDragging = dragIndex === index;
|
|
1981
1907
|
const isAnyDragging = dragIndex !== null;
|
|
1982
1908
|
const isDropTarget = dragIndex !== null && dragIndex !== index && dropPosition !== null;
|
|
@@ -1991,13 +1917,8 @@ function BlockFrame({
|
|
|
1991
1917
|
return /* @__PURE__ */ jsxs6(
|
|
1992
1918
|
"div",
|
|
1993
1919
|
{
|
|
1994
|
-
|
|
1920
|
+
ref: frameRef,
|
|
1995
1921
|
onClick: onSelect,
|
|
1996
|
-
onDragEnd: () => {
|
|
1997
|
-
setDragIndex(null);
|
|
1998
|
-
setDropPosition(null);
|
|
1999
|
-
setDropHovered(false);
|
|
2000
|
-
},
|
|
2001
1922
|
onDragEnter: (event) => {
|
|
2002
1923
|
if (dragIndex === null || dragIndex === index) {
|
|
2003
1924
|
return;
|
|
@@ -2029,7 +1950,6 @@ function BlockFrame({
|
|
|
2029
1950
|
setDropPosition(position);
|
|
2030
1951
|
}
|
|
2031
1952
|
},
|
|
2032
|
-
onDragStart: () => setDragIndex(index),
|
|
2033
1953
|
onDrop: (event) => {
|
|
2034
1954
|
event.preventDefault();
|
|
2035
1955
|
if (dragIndex === null) {
|
|
@@ -2042,12 +1962,12 @@ function BlockFrame({
|
|
|
2042
1962
|
setDropHovered(false);
|
|
2043
1963
|
},
|
|
2044
1964
|
style: {
|
|
2045
|
-
background: isDropTarget ? "
|
|
1965
|
+
background: isDropTarget ? "var(--orion-studio-accent-soft)" : "transparent",
|
|
2046
1966
|
borderRadius: 18,
|
|
2047
|
-
boxShadow: isDragging ? "0 24px 34px rgba(0, 0, 0, 0.2)" : isDropTarget ? "0 12px 26px
|
|
2048
|
-
cursor:
|
|
1967
|
+
boxShadow: isDragging ? "0 24px 34px rgba(0, 0, 0, 0.2)" : isDropTarget ? "0 12px 26px var(--orion-studio-accent-soft-strong)" : "none",
|
|
1968
|
+
cursor: "default",
|
|
2049
1969
|
opacity: isDragging ? 0.46 : isAnyDragging ? 0.98 : 1,
|
|
2050
|
-
outline: isDropTarget ? "3px solid
|
|
1970
|
+
outline: isDropTarget ? "3px solid var(--orion-studio-selection-outline)" : selected ? "2px solid var(--orion-studio-selection-outline)" : "2px dashed transparent",
|
|
2051
1971
|
outlineOffset: 4,
|
|
2052
1972
|
position: "relative",
|
|
2053
1973
|
transform: isDragging ? "scale(0.988)" : showDropBefore ? "translateY(5px) scale(1.003)" : showDropAfter ? "translateY(-5px) scale(1.003)" : isAnyDragging ? "scale(0.998)" : "none",
|
|
@@ -2059,9 +1979,9 @@ function BlockFrame({
|
|
|
2059
1979
|
"div",
|
|
2060
1980
|
{
|
|
2061
1981
|
style: {
|
|
2062
|
-
background: "
|
|
1982
|
+
background: "var(--orion-studio-accent)",
|
|
2063
1983
|
borderRadius: 999,
|
|
2064
|
-
boxShadow: "0 0 0 4px
|
|
1984
|
+
boxShadow: "0 0 0 4px var(--orion-studio-accent-soft-strong), 0 0 14px var(--orion-studio-accent-soft-strong)",
|
|
2065
1985
|
height: 5,
|
|
2066
1986
|
left: 20,
|
|
2067
1987
|
position: "absolute",
|
|
@@ -2075,9 +1995,9 @@ function BlockFrame({
|
|
|
2075
1995
|
"div",
|
|
2076
1996
|
{
|
|
2077
1997
|
style: {
|
|
2078
|
-
background: "
|
|
1998
|
+
background: "var(--orion-studio-accent)",
|
|
2079
1999
|
borderRadius: 999,
|
|
2080
|
-
boxShadow: "0 0 0 4px
|
|
2000
|
+
boxShadow: "0 0 0 4px var(--orion-studio-accent-soft-strong), 0 0 14px var(--orion-studio-accent-soft-strong)",
|
|
2081
2001
|
bottom: -10,
|
|
2082
2002
|
height: 5,
|
|
2083
2003
|
left: 20,
|
|
@@ -2091,8 +2011,8 @@ function BlockFrame({
|
|
|
2091
2011
|
"div",
|
|
2092
2012
|
{
|
|
2093
2013
|
style: {
|
|
2094
|
-
background: "
|
|
2095
|
-
border: "1px dashed
|
|
2014
|
+
background: "var(--orion-studio-accent-soft)",
|
|
2015
|
+
border: "1px dashed var(--orion-studio-accent-border)",
|
|
2096
2016
|
borderRadius: 14,
|
|
2097
2017
|
inset: 12,
|
|
2098
2018
|
pointerEvents: "none",
|
|
@@ -2127,11 +2047,38 @@ function BlockFrame({
|
|
|
2127
2047
|
"div",
|
|
2128
2048
|
{
|
|
2129
2049
|
"aria-hidden": true,
|
|
2050
|
+
draggable: true,
|
|
2051
|
+
onClick: (event) => {
|
|
2052
|
+
event.stopPropagation();
|
|
2053
|
+
onSelect();
|
|
2054
|
+
},
|
|
2055
|
+
onDragEnd: () => {
|
|
2056
|
+
setDragIndex(null);
|
|
2057
|
+
setDropPosition(null);
|
|
2058
|
+
setDropHovered(false);
|
|
2059
|
+
},
|
|
2060
|
+
onDragStart: (event) => {
|
|
2061
|
+
event.stopPropagation();
|
|
2062
|
+
if (event.dataTransfer && frameRef.current) {
|
|
2063
|
+
const rect = frameRef.current.getBoundingClientRect();
|
|
2064
|
+
const offsetX = Math.max(0, Math.min(rect.width, event.clientX - rect.left));
|
|
2065
|
+
const offsetY = Math.max(0, Math.min(rect.height, event.clientY - rect.top));
|
|
2066
|
+
event.dataTransfer.effectAllowed = "move";
|
|
2067
|
+
event.dataTransfer.setData("text/plain", label);
|
|
2068
|
+
event.dataTransfer.setDragImage(frameRef.current, offsetX, offsetY);
|
|
2069
|
+
}
|
|
2070
|
+
onSelect();
|
|
2071
|
+
setDragIndex(index);
|
|
2072
|
+
},
|
|
2073
|
+
onMouseDown: (event) => {
|
|
2074
|
+
event.stopPropagation();
|
|
2075
|
+
},
|
|
2130
2076
|
style: {
|
|
2131
2077
|
alignItems: "center",
|
|
2132
|
-
background: isDragging ? "
|
|
2078
|
+
background: isDragging ? "var(--orion-studio-accent)" : "var(--orion-studio-accent-ghost)",
|
|
2133
2079
|
borderRadius: 8,
|
|
2134
2080
|
color: "#fff",
|
|
2081
|
+
cursor: isDragging ? "grabbing" : "grab",
|
|
2135
2082
|
display: "inline-flex",
|
|
2136
2083
|
fontSize: 11,
|
|
2137
2084
|
fontWeight: 700,
|
|
@@ -2355,7 +2302,12 @@ function renderSimpleBlockPreview(args) {
|
|
|
2355
2302
|
);
|
|
2356
2303
|
}
|
|
2357
2304
|
if (type === "media") {
|
|
2358
|
-
const
|
|
2305
|
+
const imageRelation = resolveMedia2(block.image);
|
|
2306
|
+
const imageURL = normalizeText3(block?.imageURL);
|
|
2307
|
+
const image = imageRelation?.url || !imageURL ? imageRelation : {
|
|
2308
|
+
alt: normalizeText3(block.caption, "Media image"),
|
|
2309
|
+
url: imageURL
|
|
2310
|
+
};
|
|
2359
2311
|
const size = normalizeText3(block.size, "default");
|
|
2360
2312
|
const blockSettings = isRecord4(block.settings) ? block.settings : {};
|
|
2361
2313
|
const mediaSettings = isRecord4(blockSettings.media) ? blockSettings.media : {};
|
|
@@ -2561,10 +2513,10 @@ function AddSectionsPanel({
|
|
|
2561
2513
|
{
|
|
2562
2514
|
onClick: applyTemplateStarter,
|
|
2563
2515
|
style: {
|
|
2564
|
-
background: "
|
|
2516
|
+
background: "var(--orion-studio-accent)",
|
|
2565
2517
|
border: "none",
|
|
2566
2518
|
borderRadius: 999,
|
|
2567
|
-
color: "
|
|
2519
|
+
color: "var(--orion-studio-accent-contrast)",
|
|
2568
2520
|
cursor: "pointer",
|
|
2569
2521
|
fontSize: 12,
|
|
2570
2522
|
fontWeight: 700,
|
|
@@ -2594,7 +2546,7 @@ function AddSectionsPanel({
|
|
|
2594
2546
|
{
|
|
2595
2547
|
onClick: () => addSectionPreset(preset.blocks),
|
|
2596
2548
|
style: {
|
|
2597
|
-
border: "1px solid
|
|
2549
|
+
border: "1px solid var(--orion-studio-accent-border)",
|
|
2598
2550
|
borderRadius: 10,
|
|
2599
2551
|
cursor: "pointer",
|
|
2600
2552
|
display: "grid",
|
|
@@ -2612,14 +2564,14 @@ function AddSectionsPanel({
|
|
|
2612
2564
|
)),
|
|
2613
2565
|
filteredSectionPresets.length === 0 ? /* @__PURE__ */ jsx9("div", { style: { color: "var(--ink-700)", fontSize: 11 }, children: "No presets match this search." }) : null
|
|
2614
2566
|
] }),
|
|
2615
|
-
/* @__PURE__ */ jsxs8("div", { style: { borderTop: "1px solid
|
|
2567
|
+
/* @__PURE__ */ jsxs8("div", { style: { borderTop: "1px solid var(--orion-studio-accent-border-subtle)", marginTop: 2, paddingTop: 10 }, children: [
|
|
2616
2568
|
/* @__PURE__ */ jsx9("div", { style: { color: "var(--ink-700)", fontSize: 11, fontWeight: 800, textTransform: "uppercase" }, children: "Quick Add Blocks" }),
|
|
2617
2569
|
/* @__PURE__ */ jsx9("div", { style: { display: "grid", gap: 6, gridTemplateColumns: "1fr 1fr", marginTop: 8 }, children: quickAddBlockTypes2.map((type) => /* @__PURE__ */ jsxs8(
|
|
2618
2570
|
"button",
|
|
2619
2571
|
{
|
|
2620
2572
|
onClick: () => addBlockByType(type),
|
|
2621
2573
|
style: {
|
|
2622
|
-
border: "1px solid
|
|
2574
|
+
border: "1px solid var(--orion-studio-accent-border)",
|
|
2623
2575
|
borderRadius: 10,
|
|
2624
2576
|
cursor: "pointer",
|
|
2625
2577
|
fontSize: 12,
|
|
@@ -2697,7 +2649,7 @@ function PageDefaultsPanel({
|
|
|
2697
2649
|
"div",
|
|
2698
2650
|
{
|
|
2699
2651
|
style: {
|
|
2700
|
-
borderTop: "1px solid
|
|
2652
|
+
borderTop: "1px solid var(--orion-studio-accent-border-subtle)",
|
|
2701
2653
|
color: "var(--ink-700)",
|
|
2702
2654
|
fontSize: 11,
|
|
2703
2655
|
fontWeight: 800,
|
|
@@ -2725,7 +2677,7 @@ function PageDefaultsPanel({
|
|
|
2725
2677
|
type: "color",
|
|
2726
2678
|
value: normalizeText3(
|
|
2727
2679
|
pageDefaults.themePage.colors?.accent,
|
|
2728
|
-
"#
|
|
2680
|
+
"#334b63"
|
|
2729
2681
|
)
|
|
2730
2682
|
}
|
|
2731
2683
|
)
|
|
@@ -2747,7 +2699,7 @@ function PageDefaultsPanel({
|
|
|
2747
2699
|
type: "color",
|
|
2748
2700
|
value: normalizeText3(
|
|
2749
2701
|
pageDefaults.themePage.colors?.headingText,
|
|
2750
|
-
"#
|
|
2702
|
+
"#182332"
|
|
2751
2703
|
)
|
|
2752
2704
|
}
|
|
2753
2705
|
)
|
|
@@ -2769,7 +2721,7 @@ function PageDefaultsPanel({
|
|
|
2769
2721
|
type: "color",
|
|
2770
2722
|
value: normalizeText3(
|
|
2771
2723
|
pageDefaults.themePage.colors?.bodyText,
|
|
2772
|
-
"#
|
|
2724
|
+
"#425163"
|
|
2773
2725
|
)
|
|
2774
2726
|
}
|
|
2775
2727
|
)
|
|
@@ -2809,8 +2761,8 @@ var sidebarPanels = [
|
|
|
2809
2761
|
function SidebarPanelIconButtons({ activeSidebarPanel, onOpenPanel }) {
|
|
2810
2762
|
return /* @__PURE__ */ jsx11(Fragment3, { children: sidebarPanels.map((panel) => {
|
|
2811
2763
|
const isActive = activeSidebarPanel === panel.key;
|
|
2812
|
-
const iconFill = isActive ? "
|
|
2813
|
-
const iconButtonBg = isActive ? "
|
|
2764
|
+
const iconFill = isActive ? "var(--orion-studio-accent-contrast)" : "var(--orion-studio-accent)";
|
|
2765
|
+
const iconButtonBg = isActive ? "var(--orion-studio-accent)" : "var(--orion-studio-accent-soft)";
|
|
2814
2766
|
return /* @__PURE__ */ jsxs10(
|
|
2815
2767
|
"button",
|
|
2816
2768
|
{
|
|
@@ -2819,7 +2771,7 @@ function SidebarPanelIconButtons({ activeSidebarPanel, onOpenPanel }) {
|
|
|
2819
2771
|
style: {
|
|
2820
2772
|
alignItems: "center",
|
|
2821
2773
|
background: iconButtonBg,
|
|
2822
|
-
border: "1px solid
|
|
2774
|
+
border: "1px solid var(--orion-studio-accent-border-subtle)",
|
|
2823
2775
|
borderRadius: 14,
|
|
2824
2776
|
cursor: "pointer",
|
|
2825
2777
|
display: "grid",
|
|
@@ -2854,8 +2806,8 @@ function SidebarTabs({
|
|
|
2854
2806
|
{
|
|
2855
2807
|
style: {
|
|
2856
2808
|
alignItems: "center",
|
|
2857
|
-
background: "linear-gradient(180deg,
|
|
2858
|
-
borderBottom: "1px solid
|
|
2809
|
+
background: "linear-gradient(180deg, var(--orion-studio-accent-soft), transparent)",
|
|
2810
|
+
borderBottom: "1px solid var(--orion-studio-accent-border-subtle)",
|
|
2859
2811
|
display: "flex",
|
|
2860
2812
|
gap: 8,
|
|
2861
2813
|
padding: "10px 10px"
|
|
@@ -2932,6 +2884,13 @@ var getItemTypographyAlign = (item) => {
|
|
|
2932
2884
|
const value = typography.bodyAlign;
|
|
2933
2885
|
return value === "center" || value === "justify" || value === "right" ? value : "left";
|
|
2934
2886
|
};
|
|
2887
|
+
var bulletsToTextareaValue = (value) => {
|
|
2888
|
+
if (!Array.isArray(value)) {
|
|
2889
|
+
return "";
|
|
2890
|
+
}
|
|
2891
|
+
return value.map((item) => isRecord5(item) && typeof item.label === "string" ? item.label.trim() : "").filter(Boolean).join("\n");
|
|
2892
|
+
};
|
|
2893
|
+
var textareaValueToBullets = (value) => value.split("\n").map((line) => line.trim()).filter(Boolean).map((label) => ({ label }));
|
|
2935
2894
|
function ArrayItemsEditor({
|
|
2936
2895
|
blockType,
|
|
2937
2896
|
expandedItemIndex,
|
|
@@ -3030,6 +2989,69 @@ function ArrayItemsEditor({
|
|
|
3030
2989
|
}
|
|
3031
2990
|
)
|
|
3032
2991
|
] }),
|
|
2992
|
+
hasQueryMatch(normalizedQuery, "tone", "style", "color") ? /* @__PURE__ */ jsxs11("label", { className: "orion-builder-settings-label", children: [
|
|
2993
|
+
"Tone",
|
|
2994
|
+
/* @__PURE__ */ jsxs11(
|
|
2995
|
+
"select",
|
|
2996
|
+
{
|
|
2997
|
+
className: "orion-builder-settings-input",
|
|
2998
|
+
onChange: (event) => onUpdateItemField(itemIndex, "tone", event.target.value),
|
|
2999
|
+
value: normalizeText(item.tone, "warm"),
|
|
3000
|
+
children: [
|
|
3001
|
+
/* @__PURE__ */ jsx12("option", { value: "warm", children: "Warm" }),
|
|
3002
|
+
/* @__PURE__ */ jsx12("option", { value: "cool", children: "Cool" }),
|
|
3003
|
+
/* @__PURE__ */ jsx12("option", { value: "neutral", children: "Neutral" })
|
|
3004
|
+
]
|
|
3005
|
+
}
|
|
3006
|
+
)
|
|
3007
|
+
] }) : null,
|
|
3008
|
+
hasQueryMatch(normalizedQuery, "button", "cta", "link label") ? /* @__PURE__ */ jsxs11("label", { className: "orion-builder-settings-label", children: [
|
|
3009
|
+
"Button Label",
|
|
3010
|
+
/* @__PURE__ */ jsx12(
|
|
3011
|
+
"input",
|
|
3012
|
+
{
|
|
3013
|
+
className: "orion-builder-settings-input",
|
|
3014
|
+
onChange: (event) => onUpdateItemField(itemIndex, "buttonLabel", event.target.value),
|
|
3015
|
+
type: "text",
|
|
3016
|
+
value: normalizeText(item.buttonLabel)
|
|
3017
|
+
}
|
|
3018
|
+
)
|
|
3019
|
+
] }) : null,
|
|
3020
|
+
hasQueryMatch(normalizedQuery, "button", "url", "href", "link") ? /* @__PURE__ */ jsxs11("label", { className: "orion-builder-settings-label", children: [
|
|
3021
|
+
"Button URL",
|
|
3022
|
+
/* @__PURE__ */ jsx12(
|
|
3023
|
+
"input",
|
|
3024
|
+
{
|
|
3025
|
+
className: "orion-builder-settings-input",
|
|
3026
|
+
onChange: (event) => onUpdateItemField(itemIndex, "buttonHref", event.target.value),
|
|
3027
|
+
type: "text",
|
|
3028
|
+
value: normalizeText(item.buttonHref)
|
|
3029
|
+
}
|
|
3030
|
+
)
|
|
3031
|
+
] }) : null,
|
|
3032
|
+
hasQueryMatch(normalizedQuery, "embed", "map", "iframe", "url") ? /* @__PURE__ */ jsxs11("label", { className: "orion-builder-settings-label", children: [
|
|
3033
|
+
"Embed URL",
|
|
3034
|
+
/* @__PURE__ */ jsx12(
|
|
3035
|
+
"input",
|
|
3036
|
+
{
|
|
3037
|
+
className: "orion-builder-settings-input",
|
|
3038
|
+
onChange: (event) => onUpdateItemField(itemIndex, "embedURL", event.target.value),
|
|
3039
|
+
type: "text",
|
|
3040
|
+
value: normalizeText(item.embedURL)
|
|
3041
|
+
}
|
|
3042
|
+
)
|
|
3043
|
+
] }) : null,
|
|
3044
|
+
hasQueryMatch(normalizedQuery, "bullets", "list", "points") ? /* @__PURE__ */ jsxs11("label", { className: "orion-builder-settings-label", children: [
|
|
3045
|
+
"Bullet Points",
|
|
3046
|
+
/* @__PURE__ */ jsx12(
|
|
3047
|
+
"textarea",
|
|
3048
|
+
{
|
|
3049
|
+
className: "orion-builder-settings-input is-textarea",
|
|
3050
|
+
onChange: (event) => onUpdateItemField(itemIndex, "bullets", textareaValueToBullets(event.target.value)),
|
|
3051
|
+
value: bulletsToTextareaValue(item.bullets)
|
|
3052
|
+
}
|
|
3053
|
+
)
|
|
3054
|
+
] }) : null,
|
|
3033
3055
|
/* @__PURE__ */ jsxs11("div", { className: "orion-builder-settings-note", children: [
|
|
3034
3056
|
"Select this item and use the ",
|
|
3035
3057
|
/* @__PURE__ */ jsx12("strong", { children: "Media" }),
|
|
@@ -3262,6 +3284,19 @@ var resolveMedia = (value) => {
|
|
|
3262
3284
|
}
|
|
3263
3285
|
return null;
|
|
3264
3286
|
};
|
|
3287
|
+
var resolveMediaWithURL = (value, imageURL, alt) => {
|
|
3288
|
+
const resolved = resolveMedia(value);
|
|
3289
|
+
if (resolved?.url) {
|
|
3290
|
+
return resolved;
|
|
3291
|
+
}
|
|
3292
|
+
if (typeof imageURL === "string" && imageURL.trim().length > 0) {
|
|
3293
|
+
return {
|
|
3294
|
+
alt: typeof alt === "string" ? alt : void 0,
|
|
3295
|
+
url: imageURL.trim()
|
|
3296
|
+
};
|
|
3297
|
+
}
|
|
3298
|
+
return resolved;
|
|
3299
|
+
};
|
|
3265
3300
|
var normalizeHeroImageFit = (value) => {
|
|
3266
3301
|
if (value === "contain" || value === "contain-square") {
|
|
3267
3302
|
return "contain";
|
|
@@ -3384,6 +3419,22 @@ function createLexicalText(value) {
|
|
|
3384
3419
|
}
|
|
3385
3420
|
};
|
|
3386
3421
|
}
|
|
3422
|
+
function normalizePreviewText(value, fallback = "") {
|
|
3423
|
+
if (typeof value === "string") {
|
|
3424
|
+
return value;
|
|
3425
|
+
}
|
|
3426
|
+
const lexicalText = extractLexicalText(value);
|
|
3427
|
+
return lexicalText || fallback;
|
|
3428
|
+
}
|
|
3429
|
+
function coercePreviewTextFieldValue(currentValue, nextValue) {
|
|
3430
|
+
if (typeof currentValue === "string" || currentValue === null || typeof currentValue === "undefined") {
|
|
3431
|
+
return nextValue;
|
|
3432
|
+
}
|
|
3433
|
+
if (isRecord6(currentValue) && isRecord6(currentValue.root)) {
|
|
3434
|
+
return createLexicalText(nextValue);
|
|
3435
|
+
}
|
|
3436
|
+
return nextValue;
|
|
3437
|
+
}
|
|
3387
3438
|
var blockTypeLabels = {
|
|
3388
3439
|
beforeAfter: "Before / After",
|
|
3389
3440
|
bookingEmbed: "Booking Embed",
|
|
@@ -3408,7 +3459,7 @@ var defaultSectionStyle = {
|
|
|
3408
3459
|
contentGradientAngle: "135",
|
|
3409
3460
|
contentGradientFrom: "#ffffff",
|
|
3410
3461
|
contentGradientPreset: "none",
|
|
3411
|
-
contentGradientTo: "#
|
|
3462
|
+
contentGradientTo: "#f4f6f8",
|
|
3412
3463
|
contentWidth: "inherit",
|
|
3413
3464
|
linkHorizontalPadding: true,
|
|
3414
3465
|
linkVerticalPadding: true,
|
|
@@ -3420,13 +3471,14 @@ var defaultSectionStyle = {
|
|
|
3420
3471
|
sectionBackgroundColor: "#ffffff",
|
|
3421
3472
|
sectionBackgroundMode: "none",
|
|
3422
3473
|
sectionGradientAngle: "135",
|
|
3423
|
-
sectionGradientFrom: "#
|
|
3424
|
-
sectionGradientPreset: "
|
|
3425
|
-
sectionGradientTo: "#
|
|
3474
|
+
sectionGradientFrom: "#334b63",
|
|
3475
|
+
sectionGradientPreset: "slate",
|
|
3476
|
+
sectionGradientTo: "#496582",
|
|
3426
3477
|
sectionPaddingY: "md",
|
|
3427
3478
|
sectionWidth: "content"
|
|
3428
3479
|
};
|
|
3429
3480
|
var gradientPresetPairs = {
|
|
3481
|
+
brand: ["#334b63", "#496582"],
|
|
3430
3482
|
cloud: ["#ffffff", "#eef2ec"],
|
|
3431
3483
|
cream: ["#f7f3ea", "#eef3e9"],
|
|
3432
3484
|
forest: ["#124a37", "#1f684f"],
|
|
@@ -3482,7 +3534,7 @@ function getDefaultBlock(blockType) {
|
|
|
3482
3534
|
});
|
|
3483
3535
|
case "featureGrid":
|
|
3484
3536
|
return withSectionStyleDefaults2({
|
|
3485
|
-
backgroundColor: "
|
|
3537
|
+
backgroundColor: "",
|
|
3486
3538
|
blockType: "featureGrid",
|
|
3487
3539
|
items: [
|
|
3488
3540
|
{ description: "Explain this point.", icon: "01", imageCornerStyle: "rounded", imageFit: "cover", imagePosition: "center", title: "Feature One" },
|
|
@@ -3498,7 +3550,7 @@ function getDefaultBlock(blockType) {
|
|
|
3498
3550
|
items: [
|
|
3499
3551
|
{ description: "Average first response", label: "Response Time", value: "24h" },
|
|
3500
3552
|
{ description: "Recent client rating", label: "Satisfaction", value: "4.9/5" },
|
|
3501
|
-
{ description: "
|
|
3553
|
+
{ description: "Recent projects or clients served", label: "Recent Work", value: "150+" }
|
|
3502
3554
|
],
|
|
3503
3555
|
subtitle: "Use measurable outcomes to build trust.",
|
|
3504
3556
|
title: "Performance Highlights"
|
|
@@ -3551,7 +3603,7 @@ function getDefaultBlock(blockType) {
|
|
|
3551
3603
|
});
|
|
3552
3604
|
case "cta":
|
|
3553
3605
|
return withSectionStyleDefaults2({
|
|
3554
|
-
backgroundColor: "
|
|
3606
|
+
backgroundColor: "",
|
|
3555
3607
|
blockType: "cta",
|
|
3556
3608
|
buttonHref: "/contact",
|
|
3557
3609
|
buttonLabel: "Call To Action",
|
|
@@ -3672,6 +3724,25 @@ function rgbaFromHex(hex, alpha) {
|
|
|
3672
3724
|
}
|
|
3673
3725
|
return `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${clamped})`;
|
|
3674
3726
|
}
|
|
3727
|
+
function mixHexColors(primaryHex, secondaryHex, secondaryWeight) {
|
|
3728
|
+
const primary = hexToRgb(primaryHex);
|
|
3729
|
+
const secondary = hexToRgb(secondaryHex);
|
|
3730
|
+
if (!primary || !secondary) {
|
|
3731
|
+
return primaryHex;
|
|
3732
|
+
}
|
|
3733
|
+
const weight = Math.max(0, Math.min(1, secondaryWeight));
|
|
3734
|
+
const mixChannel = (from, to) => Math.round(from * (1 - weight) + to * weight);
|
|
3735
|
+
const toHex = (value) => value.toString(16).padStart(2, "0");
|
|
3736
|
+
return `#${toHex(mixChannel(primary.r, secondary.r))}${toHex(mixChannel(primary.g, secondary.g))}${toHex(mixChannel(primary.b, secondary.b))}`;
|
|
3737
|
+
}
|
|
3738
|
+
function getReadableTextColor(backgroundHex, darkHex, lightHex) {
|
|
3739
|
+
const rgb = hexToRgb(backgroundHex);
|
|
3740
|
+
if (!rgb) {
|
|
3741
|
+
return lightHex;
|
|
3742
|
+
}
|
|
3743
|
+
const luminance = (0.2126 * rgb.r + 0.7152 * rgb.g + 0.0722 * rgb.b) / 255;
|
|
3744
|
+
return luminance > 0.62 ? darkHex : lightHex;
|
|
3745
|
+
}
|
|
3675
3746
|
function getThemeColorOverride(tokens, colorKey) {
|
|
3676
3747
|
if (!tokens || typeof tokens !== "object") {
|
|
3677
3748
|
return null;
|
|
@@ -3731,11 +3802,11 @@ var sectionStyleFromBlock = (block, pageDefaults) => {
|
|
|
3731
3802
|
const sectionPreset = normalizeText2(block.sectionGradientPreset, defaultSectionStyle.sectionGradientPreset);
|
|
3732
3803
|
const sectionFrom = parseColor(
|
|
3733
3804
|
normalizeText2(block.sectionGradientFrom, ""),
|
|
3734
|
-
normalizeText2(defaultSectionStyle.sectionGradientFrom, "#
|
|
3805
|
+
normalizeText2(defaultSectionStyle.sectionGradientFrom, "#334b63")
|
|
3735
3806
|
);
|
|
3736
3807
|
const sectionTo = parseColor(
|
|
3737
3808
|
normalizeText2(block.sectionGradientTo, ""),
|
|
3738
|
-
normalizeText2(defaultSectionStyle.sectionGradientTo, "#
|
|
3809
|
+
normalizeText2(defaultSectionStyle.sectionGradientTo, "#496582")
|
|
3739
3810
|
);
|
|
3740
3811
|
const sectionAngle = parseAngle(block.sectionGradientAngle, defaultSectionStyle.sectionGradientAngle);
|
|
3741
3812
|
const contentMode = normalizeText2(block.contentBackgroundMode, defaultSectionStyle.contentBackgroundMode);
|
|
@@ -3750,7 +3821,7 @@ var sectionStyleFromBlock = (block, pageDefaults) => {
|
|
|
3750
3821
|
);
|
|
3751
3822
|
const contentTo = parseColor(
|
|
3752
3823
|
normalizeText2(block.contentGradientTo, ""),
|
|
3753
|
-
normalizeText2(defaultSectionStyle.contentGradientTo, "#
|
|
3824
|
+
normalizeText2(defaultSectionStyle.contentGradientTo, "#f4f6f8")
|
|
3754
3825
|
);
|
|
3755
3826
|
const contentAngle = parseAngle(block.contentGradientAngle, defaultSectionStyle.contentGradientAngle);
|
|
3756
3827
|
const sectionPresetPair = gradientPresetPairs[sectionPreset];
|
|
@@ -3762,12 +3833,12 @@ var sectionStyleFromBlock = (block, pageDefaults) => {
|
|
|
3762
3833
|
contentStyle: contentMode === "color" ? {
|
|
3763
3834
|
background: contentColor,
|
|
3764
3835
|
borderRadius: 20,
|
|
3765
|
-
boxShadow: "0 8px 20px
|
|
3836
|
+
boxShadow: "0 8px 20px var(--orion-studio-accent-soft)",
|
|
3766
3837
|
padding: "1rem"
|
|
3767
3838
|
} : contentMode === "gradient" ? {
|
|
3768
3839
|
background: contentGradient,
|
|
3769
3840
|
borderRadius: 20,
|
|
3770
|
-
boxShadow: "0 8px 20px
|
|
3841
|
+
boxShadow: "0 8px 20px var(--orion-studio-accent-soft)",
|
|
3771
3842
|
padding: "1rem"
|
|
3772
3843
|
} : {},
|
|
3773
3844
|
sectionClass: `orion-builder-shell is-${pageDefaults.pageWidthDefault} padx-${resolvedSectionPaddingX}`,
|
|
@@ -3900,8 +3971,14 @@ var cloneSnapshot = (value) => ({
|
|
|
3900
3971
|
layout: cloneBlockLayout(value.layout),
|
|
3901
3972
|
pageDefaults: clonePageDefaults(value.pageDefaults)
|
|
3902
3973
|
});
|
|
3903
|
-
function BuilderPageEditor({
|
|
3904
|
-
|
|
3974
|
+
function BuilderPageEditor({
|
|
3975
|
+
featureFlags: _featureFlags,
|
|
3976
|
+
initialDoc,
|
|
3977
|
+
pageID,
|
|
3978
|
+
renderBlockPreview,
|
|
3979
|
+
siteThemeTokens
|
|
3980
|
+
}) {
|
|
3981
|
+
const editorRootRef = useRef3(null);
|
|
3905
3982
|
const doc = initialDoc ?? {};
|
|
3906
3983
|
const sourceStudioDocument = doc.studioDocument && typeof doc.studioDocument === "object" ? doc.studioDocument : {};
|
|
3907
3984
|
const sourceMetadata = sourceStudioDocument.metadata && typeof sourceStudioDocument.metadata === "object" ? sourceStudioDocument.metadata : {};
|
|
@@ -3939,12 +4016,12 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
3939
4016
|
const [settingsPanelMode, setSettingsPanelMode] = useState6("basic");
|
|
3940
4017
|
const [settingsSearchQuery, setSettingsSearchQuery] = useState6("");
|
|
3941
4018
|
const { activeSidebarPanel, setActiveSidebarPanel } = usePersistentSidebarPanel(pageID);
|
|
3942
|
-
const historyBypassRef =
|
|
3943
|
-
const previousSnapshotRef =
|
|
4019
|
+
const historyBypassRef = useRef3(true);
|
|
4020
|
+
const previousSnapshotRef = useRef3({
|
|
3944
4021
|
layout: migrateLayoutToSettingsV2(cloneBlockLayout(initialLayout).map((block) => withSectionStyleDefaults2(block))),
|
|
3945
4022
|
pageDefaults: clonePageDefaults(initialPageDefaults)
|
|
3946
4023
|
});
|
|
3947
|
-
const lastSavedRef =
|
|
4024
|
+
const lastSavedRef = useRef3(cloneSnapshot(previousSnapshotRef.current));
|
|
3948
4025
|
const selectedBlock = useMemo2(
|
|
3949
4026
|
() => selectedIndex !== null ? layout[selectedIndex] : null,
|
|
3950
4027
|
[layout, selectedIndex]
|
|
@@ -4460,11 +4537,53 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
4460
4537
|
}),
|
|
4461
4538
|
[pageDefaults.themePage, siteThemeTokens]
|
|
4462
4539
|
);
|
|
4463
|
-
const
|
|
4540
|
+
const editorThemeStyles = useMemo2(() => {
|
|
4541
|
+
const accent = resolvedThemeTokens.colors.accent;
|
|
4542
|
+
const surface = resolvedThemeTokens.colors.surface;
|
|
4543
|
+
const headingText = resolvedThemeTokens.colors.headingText;
|
|
4544
|
+
const bodyText = resolvedThemeTokens.colors.bodyText;
|
|
4545
|
+
const accentGradientEnd = mixHexColors(accent, surface, 0.18);
|
|
4546
|
+
const subtleSurface = mixHexColors(surface, accent, 0.06);
|
|
4547
|
+
const accentContrast = getReadableTextColor(accent, headingText, "#ffffff");
|
|
4548
|
+
return {
|
|
4549
|
+
"--forest-900": headingText,
|
|
4550
|
+
"--ink-500": rgbaFromHex(bodyText, 0.72),
|
|
4551
|
+
"--ink-700": bodyText,
|
|
4552
|
+
"--orion-studio-accent": accent,
|
|
4553
|
+
"--orion-studio-accent-border": rgbaFromHex(accent, 0.18),
|
|
4554
|
+
"--orion-studio-accent-border-hairline": rgbaFromHex(accent, 0.08),
|
|
4555
|
+
"--orion-studio-accent-border-strong": rgbaFromHex(accent, 0.24),
|
|
4556
|
+
"--orion-studio-accent-border-subtle": rgbaFromHex(accent, 0.12),
|
|
4557
|
+
"--orion-studio-accent-contrast": accentContrast,
|
|
4558
|
+
"--orion-studio-accent-ghost": rgbaFromHex(accent, 0.82),
|
|
4559
|
+
"--orion-studio-accent-gradient-end": accentGradientEnd,
|
|
4560
|
+
"--orion-studio-accent-gradient-start": accent,
|
|
4561
|
+
"--orion-studio-accent-soft": rgbaFromHex(accent, 0.08),
|
|
4562
|
+
"--orion-studio-accent-soft-strong": rgbaFromHex(accent, 0.14),
|
|
4563
|
+
"--orion-studio-bg": mixHexColors(surface, accent, 0.03),
|
|
4564
|
+
"--orion-studio-body-text": bodyText,
|
|
4565
|
+
"--orion-studio-border": rgbaFromHex(headingText, 0.14),
|
|
4566
|
+
"--orion-studio-card": surface,
|
|
4567
|
+
"--orion-studio-ink": headingText,
|
|
4568
|
+
"--orion-studio-muted": rgbaFromHex(bodyText, 0.72),
|
|
4569
|
+
"--orion-studio-radius-lg": `${Math.max(resolvedThemeTokens.radii.card, resolvedThemeTokens.radii.panel + 6)}px`,
|
|
4570
|
+
"--orion-studio-radius-md": `${resolvedThemeTokens.radii.panel}px`,
|
|
4571
|
+
"--orion-studio-selection-outline": rgbaFromHex(accent, 0.55),
|
|
4572
|
+
"--orion-studio-shadow": `0 12px 26px ${rgbaFromHex(headingText, 0.12)}`,
|
|
4573
|
+
"--orion-studio-surface-subtle": subtleSurface
|
|
4574
|
+
};
|
|
4575
|
+
}, [resolvedThemeTokens]);
|
|
4576
|
+
const renderWithSectionShell = (block, className, content, options) => {
|
|
4577
|
+
const inheritProjectStyles = options?.inheritProjectStyles === true;
|
|
4464
4578
|
const shell = sectionStyleFromBlock(block, pageDefaults);
|
|
4465
4579
|
const blockSettings = isRecord6(block.settings) ? block.settings : {};
|
|
4466
4580
|
const blockTypography = isRecord6(blockSettings.typography) ? blockSettings.typography : {};
|
|
4467
4581
|
const blockTheme = isRecord6(blockSettings.theme) ? blockSettings.theme : {};
|
|
4582
|
+
const heroBackgroundColor = normalizeText2(block.backgroundColor).trim();
|
|
4583
|
+
const heroBackgroundImageURL = normalizeText2(block.backgroundImageURL).trim();
|
|
4584
|
+
const heroMedia = block.blockType === "hero" ? resolveMedia(block.media) : null;
|
|
4585
|
+
const heroHasImage = block.blockType === "hero" && Boolean(heroBackgroundImageURL || heroMedia?.url);
|
|
4586
|
+
const heroTextColor = block.blockType === "hero" ? heroHasImage ? "#ffffff" : heroBackgroundColor ? getReadableTextColor(heroBackgroundColor, resolvedThemeTokens.colors.headingText, "#ffffff") : resolvedThemeTokens.colors.headingText : null;
|
|
4468
4587
|
const typographyStyle = resolveTypographyStyleFromSettings({
|
|
4469
4588
|
bodyAlign: blockTypography.bodyAlign === "center" || blockTypography.bodyAlign === "justify" || blockTypography.bodyAlign === "right" ? blockTypography.bodyAlign : "left",
|
|
4470
4589
|
letterSpacingPreset: blockTypography.letterSpacingPreset === "tight" || blockTypography.letterSpacingPreset === "relaxed" ? blockTypography.letterSpacingPreset : "normal",
|
|
@@ -4472,25 +4591,27 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
4472
4591
|
maxTextWidth: blockTypography.maxTextWidth === "sm" || blockTypography.maxTextWidth === "md" || blockTypography.maxTextWidth === "lg" || blockTypography.maxTextWidth === "full" ? blockTypography.maxTextWidth : "auto"
|
|
4473
4592
|
});
|
|
4474
4593
|
const headingAlign = blockTypography.headingAlign === "center" || blockTypography.headingAlign === "justify" || blockTypography.headingAlign === "right" ? blockTypography.headingAlign : "left";
|
|
4475
|
-
const headingColor = getThemeColorOverride(blockTheme, "headingText") || getThemeColorOverride(pageDefaults.themePage, "headingText") || getThemeColorOverride(siteThemeTokens, "headingText") ||
|
|
4476
|
-
const bodyColor = getThemeColorOverride(blockTheme, "bodyText") || getThemeColorOverride(pageDefaults.themePage, "bodyText") || getThemeColorOverride(siteThemeTokens, "bodyText") ||
|
|
4594
|
+
const headingColor = getThemeColorOverride(blockTheme, "headingText") || getThemeColorOverride(pageDefaults.themePage, "headingText") || getThemeColorOverride(siteThemeTokens, "headingText") || heroTextColor || resolvedThemeTokens.colors.headingText;
|
|
4595
|
+
const bodyColor = getThemeColorOverride(blockTheme, "bodyText") || getThemeColorOverride(pageDefaults.themePage, "bodyText") || getThemeColorOverride(siteThemeTokens, "bodyText") || heroTextColor || resolvedThemeTokens.colors.bodyText;
|
|
4477
4596
|
return /* @__PURE__ */ jsx13("section", { className: `${className} ${shell.sectionClass}`, style: shell.sectionStyle, children: /* @__PURE__ */ jsx13("div", { style: shell.sectionInnerStyle, children: /* @__PURE__ */ jsx13(
|
|
4478
4597
|
"div",
|
|
4479
4598
|
{
|
|
4480
4599
|
className: shell.contentClass,
|
|
4481
4600
|
style: {
|
|
4482
4601
|
...shell.contentStyle,
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4602
|
+
...inheritProjectStyles ? {} : {
|
|
4603
|
+
"--orion-builder-heading-align": headingAlign,
|
|
4604
|
+
"--orion-builder-heading-color": headingColor,
|
|
4605
|
+
color: bodyColor,
|
|
4606
|
+
...typographyStyle
|
|
4607
|
+
}
|
|
4487
4608
|
},
|
|
4488
4609
|
children: content
|
|
4489
4610
|
}
|
|
4490
4611
|
) }) });
|
|
4491
4612
|
};
|
|
4492
4613
|
const sidebarSectionStyle = {
|
|
4493
|
-
border: "1px solid
|
|
4614
|
+
border: "1px solid var(--orion-studio-accent-border-subtle)",
|
|
4494
4615
|
borderRadius: 12,
|
|
4495
4616
|
padding: 12
|
|
4496
4617
|
};
|
|
@@ -4502,7 +4623,7 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
4502
4623
|
gap: 6
|
|
4503
4624
|
};
|
|
4504
4625
|
const sidebarInputStyle = {
|
|
4505
|
-
border: "1px solid
|
|
4626
|
+
border: "1px solid var(--orion-studio-accent-border)",
|
|
4506
4627
|
borderRadius: 10,
|
|
4507
4628
|
fontSize: 13,
|
|
4508
4629
|
padding: "7px 9px",
|
|
@@ -4649,6 +4770,35 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
4649
4770
|
return next;
|
|
4650
4771
|
});
|
|
4651
4772
|
};
|
|
4773
|
+
const updateBlockTextField = (blockIndex, fieldName, value) => {
|
|
4774
|
+
setLayout((current) => {
|
|
4775
|
+
const next = cloneBlockLayout(current);
|
|
4776
|
+
const currentBlock = isRecord6(next[blockIndex]) ? next[blockIndex] : {};
|
|
4777
|
+
next[blockIndex] = migrateBlockToSettingsV2({
|
|
4778
|
+
...currentBlock,
|
|
4779
|
+
[fieldName]: coercePreviewTextFieldValue(currentBlock[fieldName], value)
|
|
4780
|
+
});
|
|
4781
|
+
return next;
|
|
4782
|
+
});
|
|
4783
|
+
};
|
|
4784
|
+
const updateArrayItemTextField = (blockIndex, arrayField, itemIndex, fieldName, value) => {
|
|
4785
|
+
setLayout((current) => {
|
|
4786
|
+
const next = cloneBlockLayout(current);
|
|
4787
|
+
const block = next[blockIndex];
|
|
4788
|
+
const existingArray = Array.isArray(block[arrayField]) ? block[arrayField] : [];
|
|
4789
|
+
const nextArray = [...existingArray];
|
|
4790
|
+
const targetItem = nextArray[itemIndex] && typeof nextArray[itemIndex] === "object" ? nextArray[itemIndex] : {};
|
|
4791
|
+
nextArray[itemIndex] = {
|
|
4792
|
+
...targetItem,
|
|
4793
|
+
[fieldName]: coercePreviewTextFieldValue(targetItem[fieldName], value)
|
|
4794
|
+
};
|
|
4795
|
+
next[blockIndex] = migrateBlockToSettingsV2({
|
|
4796
|
+
...block,
|
|
4797
|
+
[arrayField]: nextArray
|
|
4798
|
+
});
|
|
4799
|
+
return next;
|
|
4800
|
+
});
|
|
4801
|
+
};
|
|
4652
4802
|
const updateArrayItemSettingField = (blockIndex, arrayField, itemIndex, path, value) => {
|
|
4653
4803
|
setLayout((current) => {
|
|
4654
4804
|
const next = cloneBlockLayout(current);
|
|
@@ -5089,6 +5239,7 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5089
5239
|
{
|
|
5090
5240
|
ref: editorRootRef,
|
|
5091
5241
|
style: {
|
|
5242
|
+
...editorThemeStyles,
|
|
5092
5243
|
display: "grid",
|
|
5093
5244
|
gap: 12,
|
|
5094
5245
|
gridTemplateColumns: sidebarOpen ? "minmax(0, 1fr) 340px" : "minmax(0, 1fr) 52px",
|
|
@@ -5131,9 +5282,9 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5131
5282
|
href: "/admin",
|
|
5132
5283
|
rel: "noopener noreferrer",
|
|
5133
5284
|
style: {
|
|
5134
|
-
background: "
|
|
5285
|
+
background: "var(--orion-studio-accent)",
|
|
5135
5286
|
borderRadius: 8,
|
|
5136
|
-
color: "
|
|
5287
|
+
color: "var(--orion-studio-accent-contrast)",
|
|
5137
5288
|
display: "inline-block",
|
|
5138
5289
|
fontSize: "0.9rem",
|
|
5139
5290
|
fontWeight: 600,
|
|
@@ -5178,8 +5329,42 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5178
5329
|
setDragIndex(null);
|
|
5179
5330
|
setSelectedIndex(dropIndex);
|
|
5180
5331
|
};
|
|
5332
|
+
const activeBlockPreviewRenderer = renderBlockPreview ?? getRegisteredBuilderBlockPreviewRenderer();
|
|
5333
|
+
const customPreviewEditingHelpers = {
|
|
5334
|
+
InlineText,
|
|
5335
|
+
readText: normalizePreviewText,
|
|
5336
|
+
updateArrayItemText: (arrayField, itemIndex, fieldName, value) => updateArrayItemTextField(index, arrayField, itemIndex, fieldName, value),
|
|
5337
|
+
updateBlockText: (fieldName, value) => updateBlockTextField(index, fieldName, value)
|
|
5338
|
+
};
|
|
5339
|
+
const customBlockPreview = activeBlockPreviewRenderer?.({
|
|
5340
|
+
block,
|
|
5341
|
+
editing: customPreviewEditingHelpers,
|
|
5342
|
+
index,
|
|
5343
|
+
renderWithSectionShell,
|
|
5344
|
+
resolvedThemeTokens
|
|
5345
|
+
});
|
|
5346
|
+
if (customBlockPreview) {
|
|
5347
|
+
return /* @__PURE__ */ jsx13(
|
|
5348
|
+
BlockFrame,
|
|
5349
|
+
{
|
|
5350
|
+
dragIndex,
|
|
5351
|
+
index,
|
|
5352
|
+
label: `Section ${index + 1}`,
|
|
5353
|
+
onDropAt,
|
|
5354
|
+
onSelect: selectBlock,
|
|
5355
|
+
selected: selectedIndex === index,
|
|
5356
|
+
setDragIndex,
|
|
5357
|
+
children: customBlockPreview
|
|
5358
|
+
},
|
|
5359
|
+
`custom-${index}`
|
|
5360
|
+
);
|
|
5361
|
+
}
|
|
5181
5362
|
if (type === "hero") {
|
|
5182
|
-
const media =
|
|
5363
|
+
const media = resolveMediaWithURL(
|
|
5364
|
+
block.media,
|
|
5365
|
+
block.backgroundImageURL,
|
|
5366
|
+
normalizeText2(block.headline, "Hero image")
|
|
5367
|
+
);
|
|
5183
5368
|
const blockSettings = isRecord6(block.settings) ? block.settings : {};
|
|
5184
5369
|
const mediaSettings = isRecord6(blockSettings.media) ? blockSettings.media : {};
|
|
5185
5370
|
const variant = normalizeText2(block.variant, "default");
|
|
@@ -5203,13 +5388,19 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5203
5388
|
const resolvedBackgroundPositionX = typeof backgroundImagePositionX === "number" ? backgroundImagePositionX : 50;
|
|
5204
5389
|
const resolvedBackgroundPositionY = typeof backgroundImagePositionY === "number" ? backgroundImagePositionY : 50;
|
|
5205
5390
|
const backgroundImageObjectPosition = `${resolvedBackgroundPositionX}% ${resolvedBackgroundPositionY}%`;
|
|
5206
|
-
const hasCustomHeroColor = backgroundColor.length > 0
|
|
5391
|
+
const hasCustomHeroColor = backgroundColor.length > 0;
|
|
5207
5392
|
const overlayModeRaw = normalizeText2(block?.backgroundOverlayMode, "none");
|
|
5208
5393
|
const overlayMode = overlayModeRaw === "solid" || overlayModeRaw === "gradient" ? overlayModeRaw : "none";
|
|
5209
5394
|
const overlayOpacity = parsePercentNumber(block?.backgroundOverlayOpacity, 45) / 100;
|
|
5210
5395
|
const overlayColor = parseColor(block?.backgroundOverlayColor, "#000000");
|
|
5211
|
-
const overlayFrom = parseColor(
|
|
5212
|
-
|
|
5396
|
+
const overlayFrom = parseColor(
|
|
5397
|
+
block?.backgroundOverlayGradientFrom,
|
|
5398
|
+
resolvedThemeTokens.colors.accent
|
|
5399
|
+
);
|
|
5400
|
+
const overlayTo = parseColor(
|
|
5401
|
+
block?.backgroundOverlayGradientTo,
|
|
5402
|
+
mixHexColors(resolvedThemeTokens.colors.accent, resolvedThemeTokens.colors.surface, 0.18)
|
|
5403
|
+
);
|
|
5213
5404
|
const overlayAngle = parseAngle(block?.backgroundOverlayGradientAngle, "135");
|
|
5214
5405
|
const overlayFromStrength = parsePercentNumber(block?.backgroundOverlayGradientFromStrength, 100) / 100;
|
|
5215
5406
|
const overlayToStrength = parsePercentNumber(block?.backgroundOverlayGradientToStrength, 100) / 100;
|
|
@@ -5478,7 +5669,11 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5478
5669
|
},
|
|
5479
5670
|
children: items.map((item, itemIndex) => {
|
|
5480
5671
|
const itemRecord = item;
|
|
5481
|
-
const itemMedia =
|
|
5672
|
+
const itemMedia = resolveMediaWithURL(
|
|
5673
|
+
itemRecord?.media,
|
|
5674
|
+
itemRecord?.imageURL,
|
|
5675
|
+
normalizeText2(itemRecord?.title, "Feature image")
|
|
5676
|
+
);
|
|
5482
5677
|
const itemImageHeight = parsePixelNumber(itemRecord?.imageHeight, 120);
|
|
5483
5678
|
const iconType = normalizeText2(itemRecord?.iconType, "badge");
|
|
5484
5679
|
const iconBadge = normalizeText2(itemRecord?.icon);
|
|
@@ -5500,7 +5695,7 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5500
5695
|
setSelectedIndex(index);
|
|
5501
5696
|
openSelectedItem(itemIndex);
|
|
5502
5697
|
},
|
|
5503
|
-
style: isItemSelected ? { outline: "2px solid
|
|
5698
|
+
style: isItemSelected ? { outline: "2px solid var(--orion-studio-selection-outline)", outlineOffset: 3 } : void 0,
|
|
5504
5699
|
children: /* @__PURE__ */ jsxs12("div", { className: "service-body", children: [
|
|
5505
5700
|
/* @__PURE__ */ jsxs12("div", { className: "orion-builder-upload-slot", children: [
|
|
5506
5701
|
itemMedia?.url ? (
|
|
@@ -5604,7 +5799,7 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5604
5799
|
setSelectedIndex(index);
|
|
5605
5800
|
openSelectedItem(itemIndex);
|
|
5606
5801
|
},
|
|
5607
|
-
style: isItemSelected ? { outline: "2px solid
|
|
5802
|
+
style: isItemSelected ? { outline: "2px solid var(--orion-studio-selection-outline)", outlineOffset: 3 } : void 0,
|
|
5608
5803
|
children: [
|
|
5609
5804
|
/* @__PURE__ */ jsx13(
|
|
5610
5805
|
InlineText,
|
|
@@ -5684,7 +5879,11 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5684
5879
|
] }) }),
|
|
5685
5880
|
/* @__PURE__ */ jsx13("div", { className: "orion-logo-wall", children: items.map((item, itemIndex) => {
|
|
5686
5881
|
const itemRecord = item;
|
|
5687
|
-
const media =
|
|
5882
|
+
const media = resolveMediaWithURL(
|
|
5883
|
+
itemRecord?.media,
|
|
5884
|
+
itemRecord?.imageURL,
|
|
5885
|
+
normalizeText2(itemRecord?.name, "Logo")
|
|
5886
|
+
);
|
|
5688
5887
|
const imageHeight = parsePixelNumber(itemRecord?.imageHeight, 54);
|
|
5689
5888
|
const itemPositionX = parseOptionalPercentNumber2(itemRecord?.imagePositionX);
|
|
5690
5889
|
const itemPositionY = parseOptionalPercentNumber2(itemRecord?.imagePositionY);
|
|
@@ -5704,7 +5903,7 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5704
5903
|
setSelectedIndex(index);
|
|
5705
5904
|
openSelectedItem(itemIndex);
|
|
5706
5905
|
},
|
|
5707
|
-
style: isItemSelected ? { outline: "2px solid
|
|
5906
|
+
style: isItemSelected ? { outline: "2px solid var(--orion-studio-selection-outline)", outlineOffset: 3 } : void 0,
|
|
5708
5907
|
children: /* @__PURE__ */ jsxs12("div", { className: "orion-builder-upload-slot", children: [
|
|
5709
5908
|
media?.url ? (
|
|
5710
5909
|
// eslint-disable-next-line @next/next/no-img-element
|
|
@@ -5789,8 +5988,16 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5789
5988
|
},
|
|
5790
5989
|
children: items.map((item, itemIndex) => {
|
|
5791
5990
|
const itemRecord = item;
|
|
5792
|
-
const beforeMedia =
|
|
5793
|
-
|
|
5991
|
+
const beforeMedia = resolveMediaWithURL(
|
|
5992
|
+
itemRecord?.beforeMedia,
|
|
5993
|
+
itemRecord?.beforeImageURL,
|
|
5994
|
+
`${normalizeText2(itemRecord?.label, "Project")} before`
|
|
5995
|
+
);
|
|
5996
|
+
const afterMedia = resolveMediaWithURL(
|
|
5997
|
+
itemRecord?.afterMedia,
|
|
5998
|
+
itemRecord?.afterImageURL,
|
|
5999
|
+
`${normalizeText2(itemRecord?.label, "Project")} after`
|
|
6000
|
+
);
|
|
5794
6001
|
const imageHeight = parsePixelNumber(itemRecord?.imageHeight, 160);
|
|
5795
6002
|
const itemPositionX = parseOptionalPercentNumber2(itemRecord?.imagePositionX);
|
|
5796
6003
|
const itemPositionY = parseOptionalPercentNumber2(itemRecord?.imagePositionY);
|
|
@@ -5809,7 +6016,7 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5809
6016
|
setSelectedIndex(index);
|
|
5810
6017
|
openSelectedItem(itemIndex);
|
|
5811
6018
|
},
|
|
5812
|
-
style: isItemSelected ? { outline: "2px solid
|
|
6019
|
+
style: isItemSelected ? { outline: "2px solid var(--orion-studio-selection-outline)", outlineOffset: 3 } : void 0,
|
|
5813
6020
|
children: [
|
|
5814
6021
|
/* @__PURE__ */ jsxs12("div", { className: "orion-before-after-media", children: [
|
|
5815
6022
|
/* @__PURE__ */ jsxs12("figure", { children: [
|
|
@@ -5944,7 +6151,7 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5944
6151
|
setSelectedIndex(index);
|
|
5945
6152
|
openSelectedItem(itemIndex);
|
|
5946
6153
|
},
|
|
5947
|
-
style: isItemSelected ? { outline: "2px solid
|
|
6154
|
+
style: isItemSelected ? { outline: "2px solid var(--orion-studio-selection-outline)", outlineOffset: 3 } : void 0,
|
|
5948
6155
|
children: [
|
|
5949
6156
|
/* @__PURE__ */ jsxs12("div", { className: "testimonial-quote-top", children: [
|
|
5950
6157
|
/* @__PURE__ */ jsx13("span", { className: "testimonial-quote-mark", "aria-hidden": "true", children: "\u201C" }),
|
|
@@ -6031,7 +6238,7 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
6031
6238
|
setSelectedIndex(index);
|
|
6032
6239
|
openSelectedItem(itemIndex);
|
|
6033
6240
|
},
|
|
6034
|
-
style: isItemSelected ? { outline: "2px solid
|
|
6241
|
+
style: isItemSelected ? { outline: "2px solid var(--orion-studio-selection-outline)", outlineOffset: 3 } : void 0,
|
|
6035
6242
|
children: [
|
|
6036
6243
|
/* @__PURE__ */ jsxs12("div", { className: "testimonial-quote-top", children: [
|
|
6037
6244
|
/* @__PURE__ */ jsx13("span", { className: "testimonial-quote-mark", "aria-hidden": "true", children: "\u201C" }),
|
|
@@ -6163,9 +6370,9 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
6163
6370
|
{
|
|
6164
6371
|
style: {
|
|
6165
6372
|
background: "#ffffff",
|
|
6166
|
-
border: "1px solid
|
|
6373
|
+
border: "1px solid var(--orion-studio-accent-border-subtle)",
|
|
6167
6374
|
borderRadius: 14,
|
|
6168
|
-
boxShadow: "0 14px 26px
|
|
6375
|
+
boxShadow: "0 14px 26px var(--orion-studio-accent-soft-strong)",
|
|
6169
6376
|
minHeight: 180,
|
|
6170
6377
|
overflow: "hidden",
|
|
6171
6378
|
width: sidebarOpen ? 340 : 52
|
|
@@ -6177,9 +6384,9 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
6177
6384
|
onClick: () => setSidebarOpen((open) => !open),
|
|
6178
6385
|
style: {
|
|
6179
6386
|
alignItems: "center",
|
|
6180
|
-
background: "
|
|
6387
|
+
background: "var(--orion-studio-accent)",
|
|
6181
6388
|
border: "none",
|
|
6182
|
-
color: "
|
|
6389
|
+
color: "var(--orion-studio-accent-contrast)",
|
|
6183
6390
|
cursor: "pointer",
|
|
6184
6391
|
display: "flex",
|
|
6185
6392
|
fontSize: 12,
|
|
@@ -6357,7 +6564,7 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
6357
6564
|
] }),
|
|
6358
6565
|
/* @__PURE__ */ jsx13("div", { style: { color: "var(--ink-700)", fontSize: 11 }, children: "Click section text directly on the page for copy edits. Use this panel for layout and style options." }),
|
|
6359
6566
|
uploadingTarget ? /* @__PURE__ */ jsx13("div", { style: { color: "var(--ink-700)", fontSize: 11 }, children: "Uploading image..." }) : null,
|
|
6360
|
-
uploadMessage ? /* @__PURE__ */ jsx13("div", { style: { color: "
|
|
6567
|
+
uploadMessage ? /* @__PURE__ */ jsx13("div", { style: { color: "var(--orion-studio-accent)", fontSize: 11, fontWeight: 700 }, children: uploadMessage }) : null,
|
|
6361
6568
|
uploadError ? /* @__PURE__ */ jsx13("div", { style: { color: "#8d1d1d", fontSize: 11, fontWeight: 700 }, children: uploadError }) : null
|
|
6362
6569
|
] }) : /* @__PURE__ */ jsx13("p", { style: { color: "var(--ink-700)", fontSize: 12, margin: 0 }, children: "Click a section on the page preview to edit its options here." }) })
|
|
6363
6570
|
] }) : null
|
|
@@ -6367,7 +6574,7 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
6367
6574
|
{
|
|
6368
6575
|
style: {
|
|
6369
6576
|
alignContent: "start",
|
|
6370
|
-
background: "linear-gradient(180deg,
|
|
6577
|
+
background: "linear-gradient(180deg, var(--orion-studio-accent-soft), transparent)",
|
|
6371
6578
|
display: "grid",
|
|
6372
6579
|
gap: 10,
|
|
6373
6580
|
justifyItems: "center",
|
|
@@ -6398,6 +6605,7 @@ export {
|
|
|
6398
6605
|
BuilderPageEditor,
|
|
6399
6606
|
clonePresetBlocks,
|
|
6400
6607
|
defaultBuilderThemeTokens,
|
|
6608
|
+
registerBuilderBlockPreviewRenderer,
|
|
6401
6609
|
resolveBuilderThemeTokens,
|
|
6402
6610
|
sectionPresets,
|
|
6403
6611
|
templateStarterPresets
|