@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
|
@@ -25,6 +25,7 @@ __export(client_exports, {
|
|
|
25
25
|
BuilderPageEditor: () => BuilderPageEditor,
|
|
26
26
|
clonePresetBlocks: () => clonePresetBlocks,
|
|
27
27
|
defaultBuilderThemeTokens: () => defaultBuilderThemeTokens,
|
|
28
|
+
registerBuilderBlockPreviewRenderer: () => registerBuilderBlockPreviewRenderer,
|
|
28
29
|
resolveBuilderThemeTokens: () => resolveBuilderThemeTokens,
|
|
29
30
|
sectionPresets: () => sectionPresets,
|
|
30
31
|
templateStarterPresets: () => templateStarterPresets
|
|
@@ -41,15 +42,15 @@ var sectionStyleDefaults = {
|
|
|
41
42
|
contentGradientAngle: "135",
|
|
42
43
|
contentGradientFrom: "#ffffff",
|
|
43
44
|
contentGradientPreset: "none",
|
|
44
|
-
contentGradientTo: "#
|
|
45
|
+
contentGradientTo: "#f4f6f8",
|
|
45
46
|
contentWidth: "inherit",
|
|
46
47
|
sectionPaddingX: "inherit",
|
|
47
48
|
sectionBackgroundColor: "#ffffff",
|
|
48
49
|
sectionBackgroundMode: "none",
|
|
49
50
|
sectionGradientAngle: "135",
|
|
50
|
-
sectionGradientFrom: "#
|
|
51
|
-
sectionGradientPreset: "
|
|
52
|
-
sectionGradientTo: "#
|
|
51
|
+
sectionGradientFrom: "#334b63",
|
|
52
|
+
sectionGradientPreset: "slate",
|
|
53
|
+
sectionGradientTo: "#496582",
|
|
53
54
|
sectionPaddingY: "md",
|
|
54
55
|
sectionWidth: "content"
|
|
55
56
|
};
|
|
@@ -67,13 +68,13 @@ var defaultBuilderBlockSettingsV2 = {
|
|
|
67
68
|
contentGradientAngle: "135",
|
|
68
69
|
contentGradientFrom: "#ffffff",
|
|
69
70
|
contentGradientPreset: "none",
|
|
70
|
-
contentGradientTo: "#
|
|
71
|
+
contentGradientTo: "#f4f6f8",
|
|
71
72
|
sectionBackgroundColor: "#ffffff",
|
|
72
73
|
sectionBackgroundMode: "none",
|
|
73
74
|
sectionGradientAngle: "135",
|
|
74
|
-
sectionGradientFrom: "#
|
|
75
|
-
sectionGradientPreset: "
|
|
76
|
-
sectionGradientTo: "#
|
|
75
|
+
sectionGradientFrom: "#334b63",
|
|
76
|
+
sectionGradientPreset: "slate",
|
|
77
|
+
sectionGradientTo: "#496582"
|
|
77
78
|
},
|
|
78
79
|
layout: {
|
|
79
80
|
contentWidth: "inherit",
|
|
@@ -134,9 +135,9 @@ var defaultBuilderItemSettingsV2 = {
|
|
|
134
135
|
};
|
|
135
136
|
var defaultBuilderThemeTokens = {
|
|
136
137
|
colors: {
|
|
137
|
-
accent: "#
|
|
138
|
-
bodyText: "#
|
|
139
|
-
headingText: "#
|
|
138
|
+
accent: "#334b63",
|
|
139
|
+
bodyText: "#425163",
|
|
140
|
+
headingText: "#182332",
|
|
140
141
|
surface: "#ffffff"
|
|
141
142
|
},
|
|
142
143
|
radii: {
|
|
@@ -530,72 +531,7 @@ var alignOptions = [
|
|
|
530
531
|
{ label: "Right", value: "right" },
|
|
531
532
|
{ label: "Justify", value: "justify" }
|
|
532
533
|
];
|
|
533
|
-
var layoutFieldSet = [
|
|
534
|
-
{
|
|
535
|
-
group: "layout",
|
|
536
|
-
key: "settings.layout.contentWidth",
|
|
537
|
-
label: "Content Width",
|
|
538
|
-
options: [
|
|
539
|
-
{ label: "Inherit Page Default", value: "inherit" },
|
|
540
|
-
{ label: "Narrow", value: "narrow" },
|
|
541
|
-
{ label: "Content", value: "content" },
|
|
542
|
-
{ label: "Wide", value: "wide" },
|
|
543
|
-
{ label: "Full", value: "full" }
|
|
544
|
-
],
|
|
545
|
-
tags: ["width", "container"],
|
|
546
|
-
type: "select"
|
|
547
|
-
},
|
|
548
|
-
{
|
|
549
|
-
group: "layout",
|
|
550
|
-
key: "settings.layout.linkVerticalPadding",
|
|
551
|
-
label: "Keep Top and Bottom Equal",
|
|
552
|
-
tags: ["spacing", "padding", "equal", "lock", "vertical"],
|
|
553
|
-
type: "checkbox"
|
|
554
|
-
},
|
|
555
|
-
{
|
|
556
|
-
group: "layout",
|
|
557
|
-
key: "settings.layout.paddingTopPt",
|
|
558
|
-
label: "Top Padding (pt)",
|
|
559
|
-
max: 240,
|
|
560
|
-
min: 0,
|
|
561
|
-
tags: ["spacing", "padding", "top", "vertical"],
|
|
562
|
-
type: "number"
|
|
563
|
-
},
|
|
564
|
-
{
|
|
565
|
-
group: "layout",
|
|
566
|
-
key: "settings.layout.paddingBottomPt",
|
|
567
|
-
label: "Bottom Padding (pt)",
|
|
568
|
-
max: 240,
|
|
569
|
-
min: 0,
|
|
570
|
-
tags: ["spacing", "padding", "bottom", "vertical"],
|
|
571
|
-
type: "number"
|
|
572
|
-
},
|
|
573
|
-
{
|
|
574
|
-
group: "layout",
|
|
575
|
-
key: "settings.layout.linkHorizontalPadding",
|
|
576
|
-
label: "Keep Left and Right Equal",
|
|
577
|
-
tags: ["spacing", "padding", "equal", "lock", "horizontal"],
|
|
578
|
-
type: "checkbox"
|
|
579
|
-
},
|
|
580
|
-
{
|
|
581
|
-
group: "layout",
|
|
582
|
-
key: "settings.layout.paddingLeftPt",
|
|
583
|
-
label: "Left Padding (pt)",
|
|
584
|
-
max: 240,
|
|
585
|
-
min: 0,
|
|
586
|
-
tags: ["spacing", "padding", "left", "horizontal"],
|
|
587
|
-
type: "number"
|
|
588
|
-
},
|
|
589
|
-
{
|
|
590
|
-
group: "layout",
|
|
591
|
-
key: "settings.layout.paddingRightPt",
|
|
592
|
-
label: "Right Padding (pt)",
|
|
593
|
-
max: 240,
|
|
594
|
-
min: 0,
|
|
595
|
-
tags: ["spacing", "padding", "right", "horizontal"],
|
|
596
|
-
type: "number"
|
|
597
|
-
}
|
|
598
|
-
];
|
|
534
|
+
var layoutFieldSet = [];
|
|
599
535
|
var typographyFieldSet = [
|
|
600
536
|
{
|
|
601
537
|
group: "typography",
|
|
@@ -652,44 +588,7 @@ var typographyFieldSet = [
|
|
|
652
588
|
type: "select"
|
|
653
589
|
}
|
|
654
590
|
];
|
|
655
|
-
var styleFieldSet = [
|
|
656
|
-
{
|
|
657
|
-
group: "style",
|
|
658
|
-
key: "settings.appearance.sectionBackgroundMode",
|
|
659
|
-
label: "Section Background",
|
|
660
|
-
options: [
|
|
661
|
-
{ label: "None", value: "none" },
|
|
662
|
-
{ label: "Color", value: "color" },
|
|
663
|
-
{ label: "Gradient", value: "gradient" }
|
|
664
|
-
],
|
|
665
|
-
tags: ["background", "section"],
|
|
666
|
-
type: "select"
|
|
667
|
-
},
|
|
668
|
-
{
|
|
669
|
-
group: "style",
|
|
670
|
-
key: "settings.appearance.sectionBackgroundColor",
|
|
671
|
-
label: "Section Background Color",
|
|
672
|
-
type: "color"
|
|
673
|
-
},
|
|
674
|
-
{
|
|
675
|
-
group: "style",
|
|
676
|
-
key: "settings.appearance.contentBackgroundMode",
|
|
677
|
-
label: "Content Background",
|
|
678
|
-
options: [
|
|
679
|
-
{ label: "None", value: "none" },
|
|
680
|
-
{ label: "Color", value: "color" },
|
|
681
|
-
{ label: "Gradient", value: "gradient" }
|
|
682
|
-
],
|
|
683
|
-
tags: ["background", "content"],
|
|
684
|
-
type: "select"
|
|
685
|
-
},
|
|
686
|
-
{
|
|
687
|
-
group: "style",
|
|
688
|
-
key: "settings.appearance.contentBackgroundColor",
|
|
689
|
-
label: "Content Background Color",
|
|
690
|
-
type: "color"
|
|
691
|
-
}
|
|
692
|
-
];
|
|
591
|
+
var styleFieldSet = [];
|
|
693
592
|
var commonAdvanced = [
|
|
694
593
|
{
|
|
695
594
|
group: "advanced",
|
|
@@ -740,10 +639,8 @@ var mediaFieldSet = [
|
|
|
740
639
|
];
|
|
741
640
|
var commonInspectorGroups = [
|
|
742
641
|
{ key: "basics", label: "Basics" },
|
|
743
|
-
{ key: "layout", label: "Layout" },
|
|
744
642
|
{ key: "typography", label: "Typography" },
|
|
745
643
|
{ key: "media", label: "Media" },
|
|
746
|
-
{ key: "style", label: "Style" },
|
|
747
644
|
{ key: "advanced", label: "Advanced" }
|
|
748
645
|
];
|
|
749
646
|
var inspectorDefinitionByBlockType = {
|
|
@@ -798,6 +695,7 @@ var inspectorDefinitionByBlockType = {
|
|
|
798
695
|
faq: {
|
|
799
696
|
blockType: "faq",
|
|
800
697
|
fields: [
|
|
698
|
+
{ group: "basics", inlineEditable: true, key: "eyebrow", label: "Eyebrow", type: "text" },
|
|
801
699
|
{ group: "basics", inlineEditable: true, key: "title", label: "Title", type: "text" },
|
|
802
700
|
...layoutFieldSet,
|
|
803
701
|
...typographyFieldSet,
|
|
@@ -808,6 +706,7 @@ var inspectorDefinitionByBlockType = {
|
|
|
808
706
|
featureGrid: {
|
|
809
707
|
blockType: "featureGrid",
|
|
810
708
|
fields: [
|
|
709
|
+
{ group: "basics", inlineEditable: true, key: "eyebrow", label: "Eyebrow", type: "text" },
|
|
811
710
|
{ group: "basics", inlineEditable: true, key: "title", label: "Title", type: "text" },
|
|
812
711
|
{
|
|
813
712
|
group: "basics",
|
|
@@ -815,7 +714,11 @@ var inspectorDefinitionByBlockType = {
|
|
|
815
714
|
label: "Variant",
|
|
816
715
|
options: [
|
|
817
716
|
{ label: "Cards", value: "cards" },
|
|
818
|
-
{ label: "Highlight", value: "highlight" }
|
|
717
|
+
{ label: "Highlight", value: "highlight" },
|
|
718
|
+
{ label: "Split List", value: "splitList" },
|
|
719
|
+
{ label: "Panels", value: "panels" },
|
|
720
|
+
{ label: "Catalog", value: "catalog" },
|
|
721
|
+
{ label: "Contact Split", value: "contact" }
|
|
819
722
|
],
|
|
820
723
|
type: "select"
|
|
821
724
|
},
|
|
@@ -830,6 +733,7 @@ var inspectorDefinitionByBlockType = {
|
|
|
830
733
|
formEmbed: {
|
|
831
734
|
blockType: "formEmbed",
|
|
832
735
|
fields: [
|
|
736
|
+
{ group: "basics", inlineEditable: true, key: "eyebrow", label: "Eyebrow", type: "text" },
|
|
833
737
|
{ group: "basics", inlineEditable: true, key: "title", label: "Title", type: "text" },
|
|
834
738
|
{ group: "basics", inlineEditable: true, key: "description", label: "Description", type: "textarea" },
|
|
835
739
|
{
|
|
@@ -862,7 +766,7 @@ var inspectorDefinitionByBlockType = {
|
|
|
862
766
|
type: "select"
|
|
863
767
|
},
|
|
864
768
|
{
|
|
865
|
-
group: "
|
|
769
|
+
group: "basics",
|
|
866
770
|
key: "heroHeight",
|
|
867
771
|
label: "Hero Height",
|
|
868
772
|
options: [
|
|
@@ -915,6 +819,16 @@ var inspectorDefinitionByBlockType = {
|
|
|
915
819
|
richText: {
|
|
916
820
|
blockType: "richText",
|
|
917
821
|
fields: [
|
|
822
|
+
{
|
|
823
|
+
group: "basics",
|
|
824
|
+
key: "variant",
|
|
825
|
+
label: "Variant",
|
|
826
|
+
options: [
|
|
827
|
+
{ label: "Default", value: "default" },
|
|
828
|
+
{ label: "Quote Banner", value: "quoteBanner" }
|
|
829
|
+
],
|
|
830
|
+
type: "select"
|
|
831
|
+
},
|
|
918
832
|
{ group: "basics", inlineEditable: true, key: "title", label: "Title", type: "text" },
|
|
919
833
|
{
|
|
920
834
|
group: "basics",
|
|
@@ -1055,9 +969,7 @@ function BlockInspectorRenderer({
|
|
|
1055
969
|
const [expandedGroups, setExpandedGroups] = (0, import_react2.useState)({
|
|
1056
970
|
advanced: false,
|
|
1057
971
|
basics: false,
|
|
1058
|
-
layout: false,
|
|
1059
972
|
media: false,
|
|
1060
|
-
style: false,
|
|
1061
973
|
typography: false
|
|
1062
974
|
});
|
|
1063
975
|
const definition = inspectorDefinitionByBlockType[blockType];
|
|
@@ -1100,10 +1012,7 @@ function BlockInspectorRenderer({
|
|
|
1100
1012
|
};
|
|
1101
1013
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "orion-builder-settings-root", children: [
|
|
1102
1014
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "orion-builder-settings-summary-row", children: [
|
|
1103
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.
|
|
1104
|
-
groupLabel("basics"),
|
|
1105
|
-
" and Styling"
|
|
1106
|
-
] }),
|
|
1015
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "orion-builder-settings-summary-title", children: "Content Settings" }),
|
|
1107
1016
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "orion-builder-settings-summary-actions", children: [
|
|
1108
1017
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1109
1018
|
"button",
|
|
@@ -1132,7 +1041,7 @@ function BlockInspectorRenderer({
|
|
|
1132
1041
|
{
|
|
1133
1042
|
className: "orion-builder-settings-input",
|
|
1134
1043
|
onChange: (event) => onSearchQueryChange(event.target.value),
|
|
1135
|
-
placeholder: "Search
|
|
1044
|
+
placeholder: "Search content, text, media...",
|
|
1136
1045
|
type: "search",
|
|
1137
1046
|
value: searchQuery
|
|
1138
1047
|
}
|
|
@@ -1361,6 +1270,33 @@ function BlockInspectorRenderer({
|
|
|
1361
1270
|
] });
|
|
1362
1271
|
}
|
|
1363
1272
|
|
|
1273
|
+
// src/studio-pages/document.ts
|
|
1274
|
+
var ensureNodeID = (value, index) => {
|
|
1275
|
+
if (typeof value === "string" && value.trim().length > 0) {
|
|
1276
|
+
return value.trim();
|
|
1277
|
+
}
|
|
1278
|
+
return `node-${index + 1}`;
|
|
1279
|
+
};
|
|
1280
|
+
var layoutToStudioDocument = (layout, title, metadata) => {
|
|
1281
|
+
const nodes = layout.filter((block) => typeof block.blockType === "string").map((rawBlock, index) => {
|
|
1282
|
+
const block = migrateBlockToSettingsV2(rawBlock);
|
|
1283
|
+
const blockType = String(block.blockType);
|
|
1284
|
+
const { id, blockType: _ignoredBlockType, ...data } = block;
|
|
1285
|
+
return {
|
|
1286
|
+
id: ensureNodeID(id, index),
|
|
1287
|
+
type: blockType,
|
|
1288
|
+
data
|
|
1289
|
+
};
|
|
1290
|
+
});
|
|
1291
|
+
return {
|
|
1292
|
+
metadata,
|
|
1293
|
+
schemaVersion: 1,
|
|
1294
|
+
title,
|
|
1295
|
+
nodes,
|
|
1296
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
1297
|
+
};
|
|
1298
|
+
};
|
|
1299
|
+
|
|
1364
1300
|
// src/studio-pages/index.ts
|
|
1365
1301
|
var withSectionStyleDefaults = (value) => ({
|
|
1366
1302
|
...sectionStyleDefaults,
|
|
@@ -1390,11 +1326,14 @@ var defaultNodeData = {
|
|
|
1390
1326
|
}),
|
|
1391
1327
|
cta: {
|
|
1392
1328
|
...withSectionStyleDefaults({}),
|
|
1393
|
-
backgroundColor: "
|
|
1329
|
+
backgroundColor: "",
|
|
1330
|
+
bullets: [],
|
|
1394
1331
|
buttonHref: "/contact",
|
|
1395
1332
|
buttonLabel: "Contact Us",
|
|
1396
1333
|
description: "Optional supporting copy.",
|
|
1334
|
+
eyebrow: "",
|
|
1397
1335
|
headline: "Ready to get started?",
|
|
1336
|
+
imageURL: "",
|
|
1398
1337
|
style: "light"
|
|
1399
1338
|
},
|
|
1400
1339
|
faq: {
|
|
@@ -1410,6 +1349,7 @@ var defaultNodeData = {
|
|
|
1410
1349
|
{ description: "Explain this point.", iconType: "badge", icon: "02", imageCornerStyle: "rounded", imageFit: "cover", imagePosition: "center", title: "Feature Two" },
|
|
1411
1350
|
{ description: "Explain this point.", iconType: "badge", icon: "03", imageCornerStyle: "rounded", imageFit: "cover", imagePosition: "center", title: "Feature Three" }
|
|
1412
1351
|
],
|
|
1352
|
+
subtitle: "",
|
|
1413
1353
|
title: "Section Title",
|
|
1414
1354
|
variant: "cards"
|
|
1415
1355
|
},
|
|
@@ -1417,16 +1357,18 @@ var defaultNodeData = {
|
|
|
1417
1357
|
...withSectionStyleDefaults({}),
|
|
1418
1358
|
description: "Collect lead details from visitors.",
|
|
1419
1359
|
formType: "quote",
|
|
1360
|
+
submitLabel: "Submit",
|
|
1420
1361
|
title: "Request a Quote"
|
|
1421
1362
|
},
|
|
1422
1363
|
hero: {
|
|
1423
1364
|
...withSectionStyleDefaults({}),
|
|
1424
1365
|
backgroundColor: "",
|
|
1366
|
+
backgroundImageURL: "",
|
|
1425
1367
|
backgroundOverlayMode: "none",
|
|
1426
1368
|
backgroundOverlayOpacity: 45,
|
|
1427
1369
|
backgroundOverlayColor: "#000000",
|
|
1428
|
-
backgroundOverlayGradientFrom: "#
|
|
1429
|
-
backgroundOverlayGradientTo: "#
|
|
1370
|
+
backgroundOverlayGradientFrom: "#334b63",
|
|
1371
|
+
backgroundOverlayGradientTo: "#496582",
|
|
1430
1372
|
backgroundOverlayGradientAngle: "135",
|
|
1431
1373
|
backgroundOverlayGradientFromStrength: 100,
|
|
1432
1374
|
backgroundOverlayGradientToStrength: 100,
|
|
@@ -1460,11 +1402,12 @@ var defaultNodeData = {
|
|
|
1460
1402
|
{ imageCornerStyle: "rounded", imageFit: "contain", imagePosition: "center", name: "Trusted Partner 2" },
|
|
1461
1403
|
{ imageCornerStyle: "rounded", imageFit: "contain", imagePosition: "center", name: "Trusted Partner 3" }
|
|
1462
1404
|
],
|
|
1463
|
-
subtitle: "
|
|
1464
|
-
title: "Trusted by
|
|
1405
|
+
subtitle: "Show logos from trusted associations, partners, or collaborators.",
|
|
1406
|
+
title: "Trusted by Great Partners"
|
|
1465
1407
|
}),
|
|
1466
1408
|
richText: {
|
|
1467
1409
|
...withSectionStyleDefaults({}),
|
|
1410
|
+
cards: [],
|
|
1468
1411
|
content: {
|
|
1469
1412
|
root: {
|
|
1470
1413
|
children: [
|
|
@@ -1494,6 +1437,7 @@ var defaultNodeData = {
|
|
|
1494
1437
|
version: 1
|
|
1495
1438
|
}
|
|
1496
1439
|
},
|
|
1440
|
+
statsItems: [],
|
|
1497
1441
|
title: "Section Heading",
|
|
1498
1442
|
width: "normal"
|
|
1499
1443
|
},
|
|
@@ -1507,9 +1451,9 @@ var defaultNodeData = {
|
|
|
1507
1451
|
},
|
|
1508
1452
|
stats: withSectionStyleDefaults({
|
|
1509
1453
|
items: [
|
|
1510
|
-
{ description: "Average response
|
|
1511
|
-
{ description: "
|
|
1512
|
-
{ description: "
|
|
1454
|
+
{ description: "Average first response", label: "Response Time", value: "24h" },
|
|
1455
|
+
{ description: "Client satisfaction score", label: "Satisfaction", value: "4.9/5" },
|
|
1456
|
+
{ description: "Recent projects or clients served", label: "Recent Work", value: "150+" }
|
|
1513
1457
|
],
|
|
1514
1458
|
subtitle: "Highlight measurable outcomes to build trust quickly.",
|
|
1515
1459
|
title: "Performance Highlights"
|
|
@@ -1558,31 +1502,6 @@ var pageInspectorPanels = pageInspectorPanelRegistry.map((entry) => ({
|
|
|
1558
1502
|
label: entry.panelLabel,
|
|
1559
1503
|
nodeType: entry.nodeType
|
|
1560
1504
|
}));
|
|
1561
|
-
var ensureNodeID = (inputID, index) => {
|
|
1562
|
-
if (typeof inputID === "string" && inputID.length > 0) {
|
|
1563
|
-
return inputID;
|
|
1564
|
-
}
|
|
1565
|
-
return `node-${index + 1}`;
|
|
1566
|
-
};
|
|
1567
|
-
var layoutToStudioDocument = (layout, title, metadata) => {
|
|
1568
|
-
const nodes = layout.filter((block) => typeof block.blockType === "string").map((rawBlock, index) => {
|
|
1569
|
-
const block = migrateBlockToSettingsV2(rawBlock);
|
|
1570
|
-
const blockType = String(block.blockType);
|
|
1571
|
-
const { id, blockType: _ignoredBlockType, ...data } = block;
|
|
1572
|
-
return {
|
|
1573
|
-
id: ensureNodeID(id, index),
|
|
1574
|
-
type: blockType,
|
|
1575
|
-
data
|
|
1576
|
-
};
|
|
1577
|
-
});
|
|
1578
|
-
return {
|
|
1579
|
-
metadata,
|
|
1580
|
-
schemaVersion: 1,
|
|
1581
|
-
title,
|
|
1582
|
-
nodes,
|
|
1583
|
-
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
1584
|
-
};
|
|
1585
|
-
};
|
|
1586
1505
|
|
|
1587
1506
|
// src/shared/clientImageUploadOptimization.ts
|
|
1588
1507
|
var MAX_DIRECT_UPLOAD_BYTES = 4e6;
|
|
@@ -1865,14 +1784,14 @@ var sectionPresets = [
|
|
|
1865
1784
|
title: "Performance Highlights",
|
|
1866
1785
|
subtitle: "Show measurable outcomes clients care about.",
|
|
1867
1786
|
items: [
|
|
1868
|
-
{ value: "24h", label: "
|
|
1869
|
-
{ value: "
|
|
1787
|
+
{ value: "24h", label: "Response Time", description: "Average first response" },
|
|
1788
|
+
{ value: "150+", label: "Recent Projects", description: "In the past 12 months" },
|
|
1870
1789
|
{ value: "4.9/5", label: "Satisfaction", description: "Average review score" }
|
|
1871
1790
|
]
|
|
1872
1791
|
},
|
|
1873
1792
|
{
|
|
1874
1793
|
blockType: "logoWall",
|
|
1875
|
-
title: "Trusted by
|
|
1794
|
+
title: "Trusted by Great Partners",
|
|
1876
1795
|
subtitle: "Show logos from associations, partners, or neighborhoods.",
|
|
1877
1796
|
items: [
|
|
1878
1797
|
{ name: "Partner One" },
|
|
@@ -1983,6 +1902,13 @@ function clonePresetBlocks(blocks) {
|
|
|
1983
1902
|
return JSON.parse(JSON.stringify(blocks));
|
|
1984
1903
|
}
|
|
1985
1904
|
|
|
1905
|
+
// src/studio-pages/builder/previewRegistry.ts
|
|
1906
|
+
var globalScope = globalThis;
|
|
1907
|
+
var registerBuilderBlockPreviewRenderer = (renderer) => {
|
|
1908
|
+
globalScope.__ORION_STUDIO_BUILDER_BLOCK_PREVIEW_RENDERER__ = renderer;
|
|
1909
|
+
};
|
|
1910
|
+
var getRegisteredBuilderBlockPreviewRenderer = () => globalScope.__ORION_STUDIO_BUILDER_BLOCK_PREVIEW_RENDERER__ ?? null;
|
|
1911
|
+
|
|
1986
1912
|
// src/studio-pages/builder/ui/InlineText.tsx
|
|
1987
1913
|
var import_react4 = require("react");
|
|
1988
1914
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
@@ -2050,10 +1976,10 @@ function InlineText({
|
|
|
2050
1976
|
style: {
|
|
2051
1977
|
background: "transparent",
|
|
2052
1978
|
borderRadius: 6,
|
|
2053
|
-
boxShadow: "0 0 0
|
|
1979
|
+
boxShadow: "0 0 0 1.5px rgba(255, 255, 255, 0.92), 0 0 0 5px var(--orion-studio-accent-soft-strong)",
|
|
2054
1980
|
cursor: "text",
|
|
2055
1981
|
minHeight: multiline ? "1.6em" : void 0,
|
|
2056
|
-
outline: "3px solid
|
|
1982
|
+
outline: "3px solid var(--orion-studio-selection-outline)",
|
|
2057
1983
|
outlineOffset: 2,
|
|
2058
1984
|
...style
|
|
2059
1985
|
},
|
|
@@ -2096,6 +2022,7 @@ function BlockFrame({
|
|
|
2096
2022
|
}) {
|
|
2097
2023
|
const [dropPosition, setDropPosition] = (0, import_react5.useState)(null);
|
|
2098
2024
|
const [dropHovered, setDropHovered] = (0, import_react5.useState)(false);
|
|
2025
|
+
const frameRef = (0, import_react5.useRef)(null);
|
|
2099
2026
|
const isDragging = dragIndex === index;
|
|
2100
2027
|
const isAnyDragging = dragIndex !== null;
|
|
2101
2028
|
const isDropTarget = dragIndex !== null && dragIndex !== index && dropPosition !== null;
|
|
@@ -2110,13 +2037,8 @@ function BlockFrame({
|
|
|
2110
2037
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
2111
2038
|
"div",
|
|
2112
2039
|
{
|
|
2113
|
-
|
|
2040
|
+
ref: frameRef,
|
|
2114
2041
|
onClick: onSelect,
|
|
2115
|
-
onDragEnd: () => {
|
|
2116
|
-
setDragIndex(null);
|
|
2117
|
-
setDropPosition(null);
|
|
2118
|
-
setDropHovered(false);
|
|
2119
|
-
},
|
|
2120
2042
|
onDragEnter: (event) => {
|
|
2121
2043
|
if (dragIndex === null || dragIndex === index) {
|
|
2122
2044
|
return;
|
|
@@ -2148,7 +2070,6 @@ function BlockFrame({
|
|
|
2148
2070
|
setDropPosition(position);
|
|
2149
2071
|
}
|
|
2150
2072
|
},
|
|
2151
|
-
onDragStart: () => setDragIndex(index),
|
|
2152
2073
|
onDrop: (event) => {
|
|
2153
2074
|
event.preventDefault();
|
|
2154
2075
|
if (dragIndex === null) {
|
|
@@ -2161,12 +2082,12 @@ function BlockFrame({
|
|
|
2161
2082
|
setDropHovered(false);
|
|
2162
2083
|
},
|
|
2163
2084
|
style: {
|
|
2164
|
-
background: isDropTarget ? "
|
|
2085
|
+
background: isDropTarget ? "var(--orion-studio-accent-soft)" : "transparent",
|
|
2165
2086
|
borderRadius: 18,
|
|
2166
|
-
boxShadow: isDragging ? "0 24px 34px rgba(0, 0, 0, 0.2)" : isDropTarget ? "0 12px 26px
|
|
2167
|
-
cursor:
|
|
2087
|
+
boxShadow: isDragging ? "0 24px 34px rgba(0, 0, 0, 0.2)" : isDropTarget ? "0 12px 26px var(--orion-studio-accent-soft-strong)" : "none",
|
|
2088
|
+
cursor: "default",
|
|
2168
2089
|
opacity: isDragging ? 0.46 : isAnyDragging ? 0.98 : 1,
|
|
2169
|
-
outline: isDropTarget ? "3px solid
|
|
2090
|
+
outline: isDropTarget ? "3px solid var(--orion-studio-selection-outline)" : selected ? "2px solid var(--orion-studio-selection-outline)" : "2px dashed transparent",
|
|
2170
2091
|
outlineOffset: 4,
|
|
2171
2092
|
position: "relative",
|
|
2172
2093
|
transform: isDragging ? "scale(0.988)" : showDropBefore ? "translateY(5px) scale(1.003)" : showDropAfter ? "translateY(-5px) scale(1.003)" : isAnyDragging ? "scale(0.998)" : "none",
|
|
@@ -2178,9 +2099,9 @@ function BlockFrame({
|
|
|
2178
2099
|
"div",
|
|
2179
2100
|
{
|
|
2180
2101
|
style: {
|
|
2181
|
-
background: "
|
|
2102
|
+
background: "var(--orion-studio-accent)",
|
|
2182
2103
|
borderRadius: 999,
|
|
2183
|
-
boxShadow: "0 0 0 4px
|
|
2104
|
+
boxShadow: "0 0 0 4px var(--orion-studio-accent-soft-strong), 0 0 14px var(--orion-studio-accent-soft-strong)",
|
|
2184
2105
|
height: 5,
|
|
2185
2106
|
left: 20,
|
|
2186
2107
|
position: "absolute",
|
|
@@ -2194,9 +2115,9 @@ function BlockFrame({
|
|
|
2194
2115
|
"div",
|
|
2195
2116
|
{
|
|
2196
2117
|
style: {
|
|
2197
|
-
background: "
|
|
2118
|
+
background: "var(--orion-studio-accent)",
|
|
2198
2119
|
borderRadius: 999,
|
|
2199
|
-
boxShadow: "0 0 0 4px
|
|
2120
|
+
boxShadow: "0 0 0 4px var(--orion-studio-accent-soft-strong), 0 0 14px var(--orion-studio-accent-soft-strong)",
|
|
2200
2121
|
bottom: -10,
|
|
2201
2122
|
height: 5,
|
|
2202
2123
|
left: 20,
|
|
@@ -2210,8 +2131,8 @@ function BlockFrame({
|
|
|
2210
2131
|
"div",
|
|
2211
2132
|
{
|
|
2212
2133
|
style: {
|
|
2213
|
-
background: "
|
|
2214
|
-
border: "1px dashed
|
|
2134
|
+
background: "var(--orion-studio-accent-soft)",
|
|
2135
|
+
border: "1px dashed var(--orion-studio-accent-border)",
|
|
2215
2136
|
borderRadius: 14,
|
|
2216
2137
|
inset: 12,
|
|
2217
2138
|
pointerEvents: "none",
|
|
@@ -2246,11 +2167,38 @@ function BlockFrame({
|
|
|
2246
2167
|
"div",
|
|
2247
2168
|
{
|
|
2248
2169
|
"aria-hidden": true,
|
|
2170
|
+
draggable: true,
|
|
2171
|
+
onClick: (event) => {
|
|
2172
|
+
event.stopPropagation();
|
|
2173
|
+
onSelect();
|
|
2174
|
+
},
|
|
2175
|
+
onDragEnd: () => {
|
|
2176
|
+
setDragIndex(null);
|
|
2177
|
+
setDropPosition(null);
|
|
2178
|
+
setDropHovered(false);
|
|
2179
|
+
},
|
|
2180
|
+
onDragStart: (event) => {
|
|
2181
|
+
event.stopPropagation();
|
|
2182
|
+
if (event.dataTransfer && frameRef.current) {
|
|
2183
|
+
const rect = frameRef.current.getBoundingClientRect();
|
|
2184
|
+
const offsetX = Math.max(0, Math.min(rect.width, event.clientX - rect.left));
|
|
2185
|
+
const offsetY = Math.max(0, Math.min(rect.height, event.clientY - rect.top));
|
|
2186
|
+
event.dataTransfer.effectAllowed = "move";
|
|
2187
|
+
event.dataTransfer.setData("text/plain", label);
|
|
2188
|
+
event.dataTransfer.setDragImage(frameRef.current, offsetX, offsetY);
|
|
2189
|
+
}
|
|
2190
|
+
onSelect();
|
|
2191
|
+
setDragIndex(index);
|
|
2192
|
+
},
|
|
2193
|
+
onMouseDown: (event) => {
|
|
2194
|
+
event.stopPropagation();
|
|
2195
|
+
},
|
|
2249
2196
|
style: {
|
|
2250
2197
|
alignItems: "center",
|
|
2251
|
-
background: isDragging ? "
|
|
2198
|
+
background: isDragging ? "var(--orion-studio-accent)" : "var(--orion-studio-accent-ghost)",
|
|
2252
2199
|
borderRadius: 8,
|
|
2253
2200
|
color: "#fff",
|
|
2201
|
+
cursor: isDragging ? "grabbing" : "grab",
|
|
2254
2202
|
display: "inline-flex",
|
|
2255
2203
|
fontSize: 11,
|
|
2256
2204
|
fontWeight: 700,
|
|
@@ -2474,7 +2422,12 @@ function renderSimpleBlockPreview(args) {
|
|
|
2474
2422
|
);
|
|
2475
2423
|
}
|
|
2476
2424
|
if (type === "media") {
|
|
2477
|
-
const
|
|
2425
|
+
const imageRelation = resolveMedia2(block.image);
|
|
2426
|
+
const imageURL = normalizeText3(block?.imageURL);
|
|
2427
|
+
const image = imageRelation?.url || !imageURL ? imageRelation : {
|
|
2428
|
+
alt: normalizeText3(block.caption, "Media image"),
|
|
2429
|
+
url: imageURL
|
|
2430
|
+
};
|
|
2478
2431
|
const size = normalizeText3(block.size, "default");
|
|
2479
2432
|
const blockSettings = isRecord4(block.settings) ? block.settings : {};
|
|
2480
2433
|
const mediaSettings = isRecord4(blockSettings.media) ? blockSettings.media : {};
|
|
@@ -2680,10 +2633,10 @@ function AddSectionsPanel({
|
|
|
2680
2633
|
{
|
|
2681
2634
|
onClick: applyTemplateStarter,
|
|
2682
2635
|
style: {
|
|
2683
|
-
background: "
|
|
2636
|
+
background: "var(--orion-studio-accent)",
|
|
2684
2637
|
border: "none",
|
|
2685
2638
|
borderRadius: 999,
|
|
2686
|
-
color: "
|
|
2639
|
+
color: "var(--orion-studio-accent-contrast)",
|
|
2687
2640
|
cursor: "pointer",
|
|
2688
2641
|
fontSize: 12,
|
|
2689
2642
|
fontWeight: 700,
|
|
@@ -2713,7 +2666,7 @@ function AddSectionsPanel({
|
|
|
2713
2666
|
{
|
|
2714
2667
|
onClick: () => addSectionPreset(preset.blocks),
|
|
2715
2668
|
style: {
|
|
2716
|
-
border: "1px solid
|
|
2669
|
+
border: "1px solid var(--orion-studio-accent-border)",
|
|
2717
2670
|
borderRadius: 10,
|
|
2718
2671
|
cursor: "pointer",
|
|
2719
2672
|
display: "grid",
|
|
@@ -2731,14 +2684,14 @@ function AddSectionsPanel({
|
|
|
2731
2684
|
)),
|
|
2732
2685
|
filteredSectionPresets.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { style: { color: "var(--ink-700)", fontSize: 11 }, children: "No presets match this search." }) : null
|
|
2733
2686
|
] }),
|
|
2734
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: { borderTop: "1px solid
|
|
2687
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: { borderTop: "1px solid var(--orion-studio-accent-border-subtle)", marginTop: 2, paddingTop: 10 }, children: [
|
|
2735
2688
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { style: { color: "var(--ink-700)", fontSize: 11, fontWeight: 800, textTransform: "uppercase" }, children: "Quick Add Blocks" }),
|
|
2736
2689
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { style: { display: "grid", gap: 6, gridTemplateColumns: "1fr 1fr", marginTop: 8 }, children: quickAddBlockTypes2.map((type) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
2737
2690
|
"button",
|
|
2738
2691
|
{
|
|
2739
2692
|
onClick: () => addBlockByType(type),
|
|
2740
2693
|
style: {
|
|
2741
|
-
border: "1px solid
|
|
2694
|
+
border: "1px solid var(--orion-studio-accent-border)",
|
|
2742
2695
|
borderRadius: 10,
|
|
2743
2696
|
cursor: "pointer",
|
|
2744
2697
|
fontSize: 12,
|
|
@@ -2816,7 +2769,7 @@ function PageDefaultsPanel({
|
|
|
2816
2769
|
"div",
|
|
2817
2770
|
{
|
|
2818
2771
|
style: {
|
|
2819
|
-
borderTop: "1px solid
|
|
2772
|
+
borderTop: "1px solid var(--orion-studio-accent-border-subtle)",
|
|
2820
2773
|
color: "var(--ink-700)",
|
|
2821
2774
|
fontSize: 11,
|
|
2822
2775
|
fontWeight: 800,
|
|
@@ -2844,7 +2797,7 @@ function PageDefaultsPanel({
|
|
|
2844
2797
|
type: "color",
|
|
2845
2798
|
value: normalizeText3(
|
|
2846
2799
|
pageDefaults.themePage.colors?.accent,
|
|
2847
|
-
"#
|
|
2800
|
+
"#334b63"
|
|
2848
2801
|
)
|
|
2849
2802
|
}
|
|
2850
2803
|
)
|
|
@@ -2866,7 +2819,7 @@ function PageDefaultsPanel({
|
|
|
2866
2819
|
type: "color",
|
|
2867
2820
|
value: normalizeText3(
|
|
2868
2821
|
pageDefaults.themePage.colors?.headingText,
|
|
2869
|
-
"#
|
|
2822
|
+
"#182332"
|
|
2870
2823
|
)
|
|
2871
2824
|
}
|
|
2872
2825
|
)
|
|
@@ -2888,7 +2841,7 @@ function PageDefaultsPanel({
|
|
|
2888
2841
|
type: "color",
|
|
2889
2842
|
value: normalizeText3(
|
|
2890
2843
|
pageDefaults.themePage.colors?.bodyText,
|
|
2891
|
-
"#
|
|
2844
|
+
"#425163"
|
|
2892
2845
|
)
|
|
2893
2846
|
}
|
|
2894
2847
|
)
|
|
@@ -2928,8 +2881,8 @@ var sidebarPanels = [
|
|
|
2928
2881
|
function SidebarPanelIconButtons({ activeSidebarPanel, onOpenPanel }) {
|
|
2929
2882
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_jsx_runtime11.Fragment, { children: sidebarPanels.map((panel) => {
|
|
2930
2883
|
const isActive = activeSidebarPanel === panel.key;
|
|
2931
|
-
const iconFill = isActive ? "
|
|
2932
|
-
const iconButtonBg = isActive ? "
|
|
2884
|
+
const iconFill = isActive ? "var(--orion-studio-accent-contrast)" : "var(--orion-studio-accent)";
|
|
2885
|
+
const iconButtonBg = isActive ? "var(--orion-studio-accent)" : "var(--orion-studio-accent-soft)";
|
|
2933
2886
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
2934
2887
|
"button",
|
|
2935
2888
|
{
|
|
@@ -2938,7 +2891,7 @@ function SidebarPanelIconButtons({ activeSidebarPanel, onOpenPanel }) {
|
|
|
2938
2891
|
style: {
|
|
2939
2892
|
alignItems: "center",
|
|
2940
2893
|
background: iconButtonBg,
|
|
2941
|
-
border: "1px solid
|
|
2894
|
+
border: "1px solid var(--orion-studio-accent-border-subtle)",
|
|
2942
2895
|
borderRadius: 14,
|
|
2943
2896
|
cursor: "pointer",
|
|
2944
2897
|
display: "grid",
|
|
@@ -2973,8 +2926,8 @@ function SidebarTabs({
|
|
|
2973
2926
|
{
|
|
2974
2927
|
style: {
|
|
2975
2928
|
alignItems: "center",
|
|
2976
|
-
background: "linear-gradient(180deg,
|
|
2977
|
-
borderBottom: "1px solid
|
|
2929
|
+
background: "linear-gradient(180deg, var(--orion-studio-accent-soft), transparent)",
|
|
2930
|
+
borderBottom: "1px solid var(--orion-studio-accent-border-subtle)",
|
|
2978
2931
|
display: "flex",
|
|
2979
2932
|
gap: 8,
|
|
2980
2933
|
padding: "10px 10px"
|
|
@@ -3051,6 +3004,13 @@ var getItemTypographyAlign = (item) => {
|
|
|
3051
3004
|
const value = typography.bodyAlign;
|
|
3052
3005
|
return value === "center" || value === "justify" || value === "right" ? value : "left";
|
|
3053
3006
|
};
|
|
3007
|
+
var bulletsToTextareaValue = (value) => {
|
|
3008
|
+
if (!Array.isArray(value)) {
|
|
3009
|
+
return "";
|
|
3010
|
+
}
|
|
3011
|
+
return value.map((item) => isRecord5(item) && typeof item.label === "string" ? item.label.trim() : "").filter(Boolean).join("\n");
|
|
3012
|
+
};
|
|
3013
|
+
var textareaValueToBullets = (value) => value.split("\n").map((line) => line.trim()).filter(Boolean).map((label) => ({ label }));
|
|
3054
3014
|
function ArrayItemsEditor({
|
|
3055
3015
|
blockType,
|
|
3056
3016
|
expandedItemIndex,
|
|
@@ -3149,6 +3109,69 @@ function ArrayItemsEditor({
|
|
|
3149
3109
|
}
|
|
3150
3110
|
)
|
|
3151
3111
|
] }),
|
|
3112
|
+
hasQueryMatch(normalizedQuery, "tone", "style", "color") ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "orion-builder-settings-label", children: [
|
|
3113
|
+
"Tone",
|
|
3114
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
3115
|
+
"select",
|
|
3116
|
+
{
|
|
3117
|
+
className: "orion-builder-settings-input",
|
|
3118
|
+
onChange: (event) => onUpdateItemField(itemIndex, "tone", event.target.value),
|
|
3119
|
+
value: normalizeText(item.tone, "warm"),
|
|
3120
|
+
children: [
|
|
3121
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "warm", children: "Warm" }),
|
|
3122
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "cool", children: "Cool" }),
|
|
3123
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "neutral", children: "Neutral" })
|
|
3124
|
+
]
|
|
3125
|
+
}
|
|
3126
|
+
)
|
|
3127
|
+
] }) : null,
|
|
3128
|
+
hasQueryMatch(normalizedQuery, "button", "cta", "link label") ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "orion-builder-settings-label", children: [
|
|
3129
|
+
"Button Label",
|
|
3130
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3131
|
+
"input",
|
|
3132
|
+
{
|
|
3133
|
+
className: "orion-builder-settings-input",
|
|
3134
|
+
onChange: (event) => onUpdateItemField(itemIndex, "buttonLabel", event.target.value),
|
|
3135
|
+
type: "text",
|
|
3136
|
+
value: normalizeText(item.buttonLabel)
|
|
3137
|
+
}
|
|
3138
|
+
)
|
|
3139
|
+
] }) : null,
|
|
3140
|
+
hasQueryMatch(normalizedQuery, "button", "url", "href", "link") ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "orion-builder-settings-label", children: [
|
|
3141
|
+
"Button URL",
|
|
3142
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3143
|
+
"input",
|
|
3144
|
+
{
|
|
3145
|
+
className: "orion-builder-settings-input",
|
|
3146
|
+
onChange: (event) => onUpdateItemField(itemIndex, "buttonHref", event.target.value),
|
|
3147
|
+
type: "text",
|
|
3148
|
+
value: normalizeText(item.buttonHref)
|
|
3149
|
+
}
|
|
3150
|
+
)
|
|
3151
|
+
] }) : null,
|
|
3152
|
+
hasQueryMatch(normalizedQuery, "embed", "map", "iframe", "url") ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "orion-builder-settings-label", children: [
|
|
3153
|
+
"Embed URL",
|
|
3154
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3155
|
+
"input",
|
|
3156
|
+
{
|
|
3157
|
+
className: "orion-builder-settings-input",
|
|
3158
|
+
onChange: (event) => onUpdateItemField(itemIndex, "embedURL", event.target.value),
|
|
3159
|
+
type: "text",
|
|
3160
|
+
value: normalizeText(item.embedURL)
|
|
3161
|
+
}
|
|
3162
|
+
)
|
|
3163
|
+
] }) : null,
|
|
3164
|
+
hasQueryMatch(normalizedQuery, "bullets", "list", "points") ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "orion-builder-settings-label", children: [
|
|
3165
|
+
"Bullet Points",
|
|
3166
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3167
|
+
"textarea",
|
|
3168
|
+
{
|
|
3169
|
+
className: "orion-builder-settings-input is-textarea",
|
|
3170
|
+
onChange: (event) => onUpdateItemField(itemIndex, "bullets", textareaValueToBullets(event.target.value)),
|
|
3171
|
+
value: bulletsToTextareaValue(item.bullets)
|
|
3172
|
+
}
|
|
3173
|
+
)
|
|
3174
|
+
] }) : null,
|
|
3152
3175
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "orion-builder-settings-note", children: [
|
|
3153
3176
|
"Select this item and use the ",
|
|
3154
3177
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: "Media" }),
|
|
@@ -3381,6 +3404,19 @@ var resolveMedia = (value) => {
|
|
|
3381
3404
|
}
|
|
3382
3405
|
return null;
|
|
3383
3406
|
};
|
|
3407
|
+
var resolveMediaWithURL = (value, imageURL, alt) => {
|
|
3408
|
+
const resolved = resolveMedia(value);
|
|
3409
|
+
if (resolved?.url) {
|
|
3410
|
+
return resolved;
|
|
3411
|
+
}
|
|
3412
|
+
if (typeof imageURL === "string" && imageURL.trim().length > 0) {
|
|
3413
|
+
return {
|
|
3414
|
+
alt: typeof alt === "string" ? alt : void 0,
|
|
3415
|
+
url: imageURL.trim()
|
|
3416
|
+
};
|
|
3417
|
+
}
|
|
3418
|
+
return resolved;
|
|
3419
|
+
};
|
|
3384
3420
|
var normalizeHeroImageFit = (value) => {
|
|
3385
3421
|
if (value === "contain" || value === "contain-square") {
|
|
3386
3422
|
return "contain";
|
|
@@ -3503,6 +3539,22 @@ function createLexicalText(value) {
|
|
|
3503
3539
|
}
|
|
3504
3540
|
};
|
|
3505
3541
|
}
|
|
3542
|
+
function normalizePreviewText(value, fallback = "") {
|
|
3543
|
+
if (typeof value === "string") {
|
|
3544
|
+
return value;
|
|
3545
|
+
}
|
|
3546
|
+
const lexicalText = extractLexicalText(value);
|
|
3547
|
+
return lexicalText || fallback;
|
|
3548
|
+
}
|
|
3549
|
+
function coercePreviewTextFieldValue(currentValue, nextValue) {
|
|
3550
|
+
if (typeof currentValue === "string" || currentValue === null || typeof currentValue === "undefined") {
|
|
3551
|
+
return nextValue;
|
|
3552
|
+
}
|
|
3553
|
+
if (isRecord6(currentValue) && isRecord6(currentValue.root)) {
|
|
3554
|
+
return createLexicalText(nextValue);
|
|
3555
|
+
}
|
|
3556
|
+
return nextValue;
|
|
3557
|
+
}
|
|
3506
3558
|
var blockTypeLabels = {
|
|
3507
3559
|
beforeAfter: "Before / After",
|
|
3508
3560
|
bookingEmbed: "Booking Embed",
|
|
@@ -3527,7 +3579,7 @@ var defaultSectionStyle = {
|
|
|
3527
3579
|
contentGradientAngle: "135",
|
|
3528
3580
|
contentGradientFrom: "#ffffff",
|
|
3529
3581
|
contentGradientPreset: "none",
|
|
3530
|
-
contentGradientTo: "#
|
|
3582
|
+
contentGradientTo: "#f4f6f8",
|
|
3531
3583
|
contentWidth: "inherit",
|
|
3532
3584
|
linkHorizontalPadding: true,
|
|
3533
3585
|
linkVerticalPadding: true,
|
|
@@ -3539,13 +3591,14 @@ var defaultSectionStyle = {
|
|
|
3539
3591
|
sectionBackgroundColor: "#ffffff",
|
|
3540
3592
|
sectionBackgroundMode: "none",
|
|
3541
3593
|
sectionGradientAngle: "135",
|
|
3542
|
-
sectionGradientFrom: "#
|
|
3543
|
-
sectionGradientPreset: "
|
|
3544
|
-
sectionGradientTo: "#
|
|
3594
|
+
sectionGradientFrom: "#334b63",
|
|
3595
|
+
sectionGradientPreset: "slate",
|
|
3596
|
+
sectionGradientTo: "#496582",
|
|
3545
3597
|
sectionPaddingY: "md",
|
|
3546
3598
|
sectionWidth: "content"
|
|
3547
3599
|
};
|
|
3548
3600
|
var gradientPresetPairs = {
|
|
3601
|
+
brand: ["#334b63", "#496582"],
|
|
3549
3602
|
cloud: ["#ffffff", "#eef2ec"],
|
|
3550
3603
|
cream: ["#f7f3ea", "#eef3e9"],
|
|
3551
3604
|
forest: ["#124a37", "#1f684f"],
|
|
@@ -3601,7 +3654,7 @@ function getDefaultBlock(blockType) {
|
|
|
3601
3654
|
});
|
|
3602
3655
|
case "featureGrid":
|
|
3603
3656
|
return withSectionStyleDefaults2({
|
|
3604
|
-
backgroundColor: "
|
|
3657
|
+
backgroundColor: "",
|
|
3605
3658
|
blockType: "featureGrid",
|
|
3606
3659
|
items: [
|
|
3607
3660
|
{ description: "Explain this point.", icon: "01", imageCornerStyle: "rounded", imageFit: "cover", imagePosition: "center", title: "Feature One" },
|
|
@@ -3617,7 +3670,7 @@ function getDefaultBlock(blockType) {
|
|
|
3617
3670
|
items: [
|
|
3618
3671
|
{ description: "Average first response", label: "Response Time", value: "24h" },
|
|
3619
3672
|
{ description: "Recent client rating", label: "Satisfaction", value: "4.9/5" },
|
|
3620
|
-
{ description: "
|
|
3673
|
+
{ description: "Recent projects or clients served", label: "Recent Work", value: "150+" }
|
|
3621
3674
|
],
|
|
3622
3675
|
subtitle: "Use measurable outcomes to build trust.",
|
|
3623
3676
|
title: "Performance Highlights"
|
|
@@ -3670,7 +3723,7 @@ function getDefaultBlock(blockType) {
|
|
|
3670
3723
|
});
|
|
3671
3724
|
case "cta":
|
|
3672
3725
|
return withSectionStyleDefaults2({
|
|
3673
|
-
backgroundColor: "
|
|
3726
|
+
backgroundColor: "",
|
|
3674
3727
|
blockType: "cta",
|
|
3675
3728
|
buttonHref: "/contact",
|
|
3676
3729
|
buttonLabel: "Call To Action",
|
|
@@ -3791,6 +3844,25 @@ function rgbaFromHex(hex, alpha) {
|
|
|
3791
3844
|
}
|
|
3792
3845
|
return `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${clamped})`;
|
|
3793
3846
|
}
|
|
3847
|
+
function mixHexColors(primaryHex, secondaryHex, secondaryWeight) {
|
|
3848
|
+
const primary = hexToRgb(primaryHex);
|
|
3849
|
+
const secondary = hexToRgb(secondaryHex);
|
|
3850
|
+
if (!primary || !secondary) {
|
|
3851
|
+
return primaryHex;
|
|
3852
|
+
}
|
|
3853
|
+
const weight = Math.max(0, Math.min(1, secondaryWeight));
|
|
3854
|
+
const mixChannel = (from, to) => Math.round(from * (1 - weight) + to * weight);
|
|
3855
|
+
const toHex = (value) => value.toString(16).padStart(2, "0");
|
|
3856
|
+
return `#${toHex(mixChannel(primary.r, secondary.r))}${toHex(mixChannel(primary.g, secondary.g))}${toHex(mixChannel(primary.b, secondary.b))}`;
|
|
3857
|
+
}
|
|
3858
|
+
function getReadableTextColor(backgroundHex, darkHex, lightHex) {
|
|
3859
|
+
const rgb = hexToRgb(backgroundHex);
|
|
3860
|
+
if (!rgb) {
|
|
3861
|
+
return lightHex;
|
|
3862
|
+
}
|
|
3863
|
+
const luminance = (0.2126 * rgb.r + 0.7152 * rgb.g + 0.0722 * rgb.b) / 255;
|
|
3864
|
+
return luminance > 0.62 ? darkHex : lightHex;
|
|
3865
|
+
}
|
|
3794
3866
|
function getThemeColorOverride(tokens, colorKey) {
|
|
3795
3867
|
if (!tokens || typeof tokens !== "object") {
|
|
3796
3868
|
return null;
|
|
@@ -3850,11 +3922,11 @@ var sectionStyleFromBlock = (block, pageDefaults) => {
|
|
|
3850
3922
|
const sectionPreset = normalizeText2(block.sectionGradientPreset, defaultSectionStyle.sectionGradientPreset);
|
|
3851
3923
|
const sectionFrom = parseColor(
|
|
3852
3924
|
normalizeText2(block.sectionGradientFrom, ""),
|
|
3853
|
-
normalizeText2(defaultSectionStyle.sectionGradientFrom, "#
|
|
3925
|
+
normalizeText2(defaultSectionStyle.sectionGradientFrom, "#334b63")
|
|
3854
3926
|
);
|
|
3855
3927
|
const sectionTo = parseColor(
|
|
3856
3928
|
normalizeText2(block.sectionGradientTo, ""),
|
|
3857
|
-
normalizeText2(defaultSectionStyle.sectionGradientTo, "#
|
|
3929
|
+
normalizeText2(defaultSectionStyle.sectionGradientTo, "#496582")
|
|
3858
3930
|
);
|
|
3859
3931
|
const sectionAngle = parseAngle(block.sectionGradientAngle, defaultSectionStyle.sectionGradientAngle);
|
|
3860
3932
|
const contentMode = normalizeText2(block.contentBackgroundMode, defaultSectionStyle.contentBackgroundMode);
|
|
@@ -3869,7 +3941,7 @@ var sectionStyleFromBlock = (block, pageDefaults) => {
|
|
|
3869
3941
|
);
|
|
3870
3942
|
const contentTo = parseColor(
|
|
3871
3943
|
normalizeText2(block.contentGradientTo, ""),
|
|
3872
|
-
normalizeText2(defaultSectionStyle.contentGradientTo, "#
|
|
3944
|
+
normalizeText2(defaultSectionStyle.contentGradientTo, "#f4f6f8")
|
|
3873
3945
|
);
|
|
3874
3946
|
const contentAngle = parseAngle(block.contentGradientAngle, defaultSectionStyle.contentGradientAngle);
|
|
3875
3947
|
const sectionPresetPair = gradientPresetPairs[sectionPreset];
|
|
@@ -3881,12 +3953,12 @@ var sectionStyleFromBlock = (block, pageDefaults) => {
|
|
|
3881
3953
|
contentStyle: contentMode === "color" ? {
|
|
3882
3954
|
background: contentColor,
|
|
3883
3955
|
borderRadius: 20,
|
|
3884
|
-
boxShadow: "0 8px 20px
|
|
3956
|
+
boxShadow: "0 8px 20px var(--orion-studio-accent-soft)",
|
|
3885
3957
|
padding: "1rem"
|
|
3886
3958
|
} : contentMode === "gradient" ? {
|
|
3887
3959
|
background: contentGradient,
|
|
3888
3960
|
borderRadius: 20,
|
|
3889
|
-
boxShadow: "0 8px 20px
|
|
3961
|
+
boxShadow: "0 8px 20px var(--orion-studio-accent-soft)",
|
|
3890
3962
|
padding: "1rem"
|
|
3891
3963
|
} : {},
|
|
3892
3964
|
sectionClass: `orion-builder-shell is-${pageDefaults.pageWidthDefault} padx-${resolvedSectionPaddingX}`,
|
|
@@ -4019,7 +4091,13 @@ var cloneSnapshot = (value) => ({
|
|
|
4019
4091
|
layout: cloneBlockLayout(value.layout),
|
|
4020
4092
|
pageDefaults: clonePageDefaults(value.pageDefaults)
|
|
4021
4093
|
});
|
|
4022
|
-
function BuilderPageEditor({
|
|
4094
|
+
function BuilderPageEditor({
|
|
4095
|
+
featureFlags: _featureFlags,
|
|
4096
|
+
initialDoc,
|
|
4097
|
+
pageID,
|
|
4098
|
+
renderBlockPreview,
|
|
4099
|
+
siteThemeTokens
|
|
4100
|
+
}) {
|
|
4023
4101
|
const editorRootRef = (0, import_react6.useRef)(null);
|
|
4024
4102
|
const doc = initialDoc ?? {};
|
|
4025
4103
|
const sourceStudioDocument = doc.studioDocument && typeof doc.studioDocument === "object" ? doc.studioDocument : {};
|
|
@@ -4579,11 +4657,53 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
4579
4657
|
}),
|
|
4580
4658
|
[pageDefaults.themePage, siteThemeTokens]
|
|
4581
4659
|
);
|
|
4582
|
-
const
|
|
4660
|
+
const editorThemeStyles = (0, import_react6.useMemo)(() => {
|
|
4661
|
+
const accent = resolvedThemeTokens.colors.accent;
|
|
4662
|
+
const surface = resolvedThemeTokens.colors.surface;
|
|
4663
|
+
const headingText = resolvedThemeTokens.colors.headingText;
|
|
4664
|
+
const bodyText = resolvedThemeTokens.colors.bodyText;
|
|
4665
|
+
const accentGradientEnd = mixHexColors(accent, surface, 0.18);
|
|
4666
|
+
const subtleSurface = mixHexColors(surface, accent, 0.06);
|
|
4667
|
+
const accentContrast = getReadableTextColor(accent, headingText, "#ffffff");
|
|
4668
|
+
return {
|
|
4669
|
+
"--forest-900": headingText,
|
|
4670
|
+
"--ink-500": rgbaFromHex(bodyText, 0.72),
|
|
4671
|
+
"--ink-700": bodyText,
|
|
4672
|
+
"--orion-studio-accent": accent,
|
|
4673
|
+
"--orion-studio-accent-border": rgbaFromHex(accent, 0.18),
|
|
4674
|
+
"--orion-studio-accent-border-hairline": rgbaFromHex(accent, 0.08),
|
|
4675
|
+
"--orion-studio-accent-border-strong": rgbaFromHex(accent, 0.24),
|
|
4676
|
+
"--orion-studio-accent-border-subtle": rgbaFromHex(accent, 0.12),
|
|
4677
|
+
"--orion-studio-accent-contrast": accentContrast,
|
|
4678
|
+
"--orion-studio-accent-ghost": rgbaFromHex(accent, 0.82),
|
|
4679
|
+
"--orion-studio-accent-gradient-end": accentGradientEnd,
|
|
4680
|
+
"--orion-studio-accent-gradient-start": accent,
|
|
4681
|
+
"--orion-studio-accent-soft": rgbaFromHex(accent, 0.08),
|
|
4682
|
+
"--orion-studio-accent-soft-strong": rgbaFromHex(accent, 0.14),
|
|
4683
|
+
"--orion-studio-bg": mixHexColors(surface, accent, 0.03),
|
|
4684
|
+
"--orion-studio-body-text": bodyText,
|
|
4685
|
+
"--orion-studio-border": rgbaFromHex(headingText, 0.14),
|
|
4686
|
+
"--orion-studio-card": surface,
|
|
4687
|
+
"--orion-studio-ink": headingText,
|
|
4688
|
+
"--orion-studio-muted": rgbaFromHex(bodyText, 0.72),
|
|
4689
|
+
"--orion-studio-radius-lg": `${Math.max(resolvedThemeTokens.radii.card, resolvedThemeTokens.radii.panel + 6)}px`,
|
|
4690
|
+
"--orion-studio-radius-md": `${resolvedThemeTokens.radii.panel}px`,
|
|
4691
|
+
"--orion-studio-selection-outline": rgbaFromHex(accent, 0.55),
|
|
4692
|
+
"--orion-studio-shadow": `0 12px 26px ${rgbaFromHex(headingText, 0.12)}`,
|
|
4693
|
+
"--orion-studio-surface-subtle": subtleSurface
|
|
4694
|
+
};
|
|
4695
|
+
}, [resolvedThemeTokens]);
|
|
4696
|
+
const renderWithSectionShell = (block, className, content, options) => {
|
|
4697
|
+
const inheritProjectStyles = options?.inheritProjectStyles === true;
|
|
4583
4698
|
const shell = sectionStyleFromBlock(block, pageDefaults);
|
|
4584
4699
|
const blockSettings = isRecord6(block.settings) ? block.settings : {};
|
|
4585
4700
|
const blockTypography = isRecord6(blockSettings.typography) ? blockSettings.typography : {};
|
|
4586
4701
|
const blockTheme = isRecord6(blockSettings.theme) ? blockSettings.theme : {};
|
|
4702
|
+
const heroBackgroundColor = normalizeText2(block.backgroundColor).trim();
|
|
4703
|
+
const heroBackgroundImageURL = normalizeText2(block.backgroundImageURL).trim();
|
|
4704
|
+
const heroMedia = block.blockType === "hero" ? resolveMedia(block.media) : null;
|
|
4705
|
+
const heroHasImage = block.blockType === "hero" && Boolean(heroBackgroundImageURL || heroMedia?.url);
|
|
4706
|
+
const heroTextColor = block.blockType === "hero" ? heroHasImage ? "#ffffff" : heroBackgroundColor ? getReadableTextColor(heroBackgroundColor, resolvedThemeTokens.colors.headingText, "#ffffff") : resolvedThemeTokens.colors.headingText : null;
|
|
4587
4707
|
const typographyStyle = resolveTypographyStyleFromSettings({
|
|
4588
4708
|
bodyAlign: blockTypography.bodyAlign === "center" || blockTypography.bodyAlign === "justify" || blockTypography.bodyAlign === "right" ? blockTypography.bodyAlign : "left",
|
|
4589
4709
|
letterSpacingPreset: blockTypography.letterSpacingPreset === "tight" || blockTypography.letterSpacingPreset === "relaxed" ? blockTypography.letterSpacingPreset : "normal",
|
|
@@ -4591,25 +4711,27 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
4591
4711
|
maxTextWidth: blockTypography.maxTextWidth === "sm" || blockTypography.maxTextWidth === "md" || blockTypography.maxTextWidth === "lg" || blockTypography.maxTextWidth === "full" ? blockTypography.maxTextWidth : "auto"
|
|
4592
4712
|
});
|
|
4593
4713
|
const headingAlign = blockTypography.headingAlign === "center" || blockTypography.headingAlign === "justify" || blockTypography.headingAlign === "right" ? blockTypography.headingAlign : "left";
|
|
4594
|
-
const headingColor = getThemeColorOverride(blockTheme, "headingText") || getThemeColorOverride(pageDefaults.themePage, "headingText") || getThemeColorOverride(siteThemeTokens, "headingText") ||
|
|
4595
|
-
const bodyColor = getThemeColorOverride(blockTheme, "bodyText") || getThemeColorOverride(pageDefaults.themePage, "bodyText") || getThemeColorOverride(siteThemeTokens, "bodyText") ||
|
|
4714
|
+
const headingColor = getThemeColorOverride(blockTheme, "headingText") || getThemeColorOverride(pageDefaults.themePage, "headingText") || getThemeColorOverride(siteThemeTokens, "headingText") || heroTextColor || resolvedThemeTokens.colors.headingText;
|
|
4715
|
+
const bodyColor = getThemeColorOverride(blockTheme, "bodyText") || getThemeColorOverride(pageDefaults.themePage, "bodyText") || getThemeColorOverride(siteThemeTokens, "bodyText") || heroTextColor || resolvedThemeTokens.colors.bodyText;
|
|
4596
4716
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("section", { className: `${className} ${shell.sectionClass}`, style: shell.sectionStyle, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { style: shell.sectionInnerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
4597
4717
|
"div",
|
|
4598
4718
|
{
|
|
4599
4719
|
className: shell.contentClass,
|
|
4600
4720
|
style: {
|
|
4601
4721
|
...shell.contentStyle,
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4722
|
+
...inheritProjectStyles ? {} : {
|
|
4723
|
+
"--orion-builder-heading-align": headingAlign,
|
|
4724
|
+
"--orion-builder-heading-color": headingColor,
|
|
4725
|
+
color: bodyColor,
|
|
4726
|
+
...typographyStyle
|
|
4727
|
+
}
|
|
4606
4728
|
},
|
|
4607
4729
|
children: content
|
|
4608
4730
|
}
|
|
4609
4731
|
) }) });
|
|
4610
4732
|
};
|
|
4611
4733
|
const sidebarSectionStyle = {
|
|
4612
|
-
border: "1px solid
|
|
4734
|
+
border: "1px solid var(--orion-studio-accent-border-subtle)",
|
|
4613
4735
|
borderRadius: 12,
|
|
4614
4736
|
padding: 12
|
|
4615
4737
|
};
|
|
@@ -4621,7 +4743,7 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
4621
4743
|
gap: 6
|
|
4622
4744
|
};
|
|
4623
4745
|
const sidebarInputStyle = {
|
|
4624
|
-
border: "1px solid
|
|
4746
|
+
border: "1px solid var(--orion-studio-accent-border)",
|
|
4625
4747
|
borderRadius: 10,
|
|
4626
4748
|
fontSize: 13,
|
|
4627
4749
|
padding: "7px 9px",
|
|
@@ -4768,6 +4890,35 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
4768
4890
|
return next;
|
|
4769
4891
|
});
|
|
4770
4892
|
};
|
|
4893
|
+
const updateBlockTextField = (blockIndex, fieldName, value) => {
|
|
4894
|
+
setLayout((current) => {
|
|
4895
|
+
const next = cloneBlockLayout(current);
|
|
4896
|
+
const currentBlock = isRecord6(next[blockIndex]) ? next[blockIndex] : {};
|
|
4897
|
+
next[blockIndex] = migrateBlockToSettingsV2({
|
|
4898
|
+
...currentBlock,
|
|
4899
|
+
[fieldName]: coercePreviewTextFieldValue(currentBlock[fieldName], value)
|
|
4900
|
+
});
|
|
4901
|
+
return next;
|
|
4902
|
+
});
|
|
4903
|
+
};
|
|
4904
|
+
const updateArrayItemTextField = (blockIndex, arrayField, itemIndex, fieldName, value) => {
|
|
4905
|
+
setLayout((current) => {
|
|
4906
|
+
const next = cloneBlockLayout(current);
|
|
4907
|
+
const block = next[blockIndex];
|
|
4908
|
+
const existingArray = Array.isArray(block[arrayField]) ? block[arrayField] : [];
|
|
4909
|
+
const nextArray = [...existingArray];
|
|
4910
|
+
const targetItem = nextArray[itemIndex] && typeof nextArray[itemIndex] === "object" ? nextArray[itemIndex] : {};
|
|
4911
|
+
nextArray[itemIndex] = {
|
|
4912
|
+
...targetItem,
|
|
4913
|
+
[fieldName]: coercePreviewTextFieldValue(targetItem[fieldName], value)
|
|
4914
|
+
};
|
|
4915
|
+
next[blockIndex] = migrateBlockToSettingsV2({
|
|
4916
|
+
...block,
|
|
4917
|
+
[arrayField]: nextArray
|
|
4918
|
+
});
|
|
4919
|
+
return next;
|
|
4920
|
+
});
|
|
4921
|
+
};
|
|
4771
4922
|
const updateArrayItemSettingField = (blockIndex, arrayField, itemIndex, path, value) => {
|
|
4772
4923
|
setLayout((current) => {
|
|
4773
4924
|
const next = cloneBlockLayout(current);
|
|
@@ -5208,6 +5359,7 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5208
5359
|
{
|
|
5209
5360
|
ref: editorRootRef,
|
|
5210
5361
|
style: {
|
|
5362
|
+
...editorThemeStyles,
|
|
5211
5363
|
display: "grid",
|
|
5212
5364
|
gap: 12,
|
|
5213
5365
|
gridTemplateColumns: sidebarOpen ? "minmax(0, 1fr) 340px" : "minmax(0, 1fr) 52px",
|
|
@@ -5250,9 +5402,9 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5250
5402
|
href: "/admin",
|
|
5251
5403
|
rel: "noopener noreferrer",
|
|
5252
5404
|
style: {
|
|
5253
|
-
background: "
|
|
5405
|
+
background: "var(--orion-studio-accent)",
|
|
5254
5406
|
borderRadius: 8,
|
|
5255
|
-
color: "
|
|
5407
|
+
color: "var(--orion-studio-accent-contrast)",
|
|
5256
5408
|
display: "inline-block",
|
|
5257
5409
|
fontSize: "0.9rem",
|
|
5258
5410
|
fontWeight: 600,
|
|
@@ -5297,8 +5449,42 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5297
5449
|
setDragIndex(null);
|
|
5298
5450
|
setSelectedIndex(dropIndex);
|
|
5299
5451
|
};
|
|
5452
|
+
const activeBlockPreviewRenderer = renderBlockPreview ?? getRegisteredBuilderBlockPreviewRenderer();
|
|
5453
|
+
const customPreviewEditingHelpers = {
|
|
5454
|
+
InlineText,
|
|
5455
|
+
readText: normalizePreviewText,
|
|
5456
|
+
updateArrayItemText: (arrayField, itemIndex, fieldName, value) => updateArrayItemTextField(index, arrayField, itemIndex, fieldName, value),
|
|
5457
|
+
updateBlockText: (fieldName, value) => updateBlockTextField(index, fieldName, value)
|
|
5458
|
+
};
|
|
5459
|
+
const customBlockPreview = activeBlockPreviewRenderer?.({
|
|
5460
|
+
block,
|
|
5461
|
+
editing: customPreviewEditingHelpers,
|
|
5462
|
+
index,
|
|
5463
|
+
renderWithSectionShell,
|
|
5464
|
+
resolvedThemeTokens
|
|
5465
|
+
});
|
|
5466
|
+
if (customBlockPreview) {
|
|
5467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
5468
|
+
BlockFrame,
|
|
5469
|
+
{
|
|
5470
|
+
dragIndex,
|
|
5471
|
+
index,
|
|
5472
|
+
label: `Section ${index + 1}`,
|
|
5473
|
+
onDropAt,
|
|
5474
|
+
onSelect: selectBlock,
|
|
5475
|
+
selected: selectedIndex === index,
|
|
5476
|
+
setDragIndex,
|
|
5477
|
+
children: customBlockPreview
|
|
5478
|
+
},
|
|
5479
|
+
`custom-${index}`
|
|
5480
|
+
);
|
|
5481
|
+
}
|
|
5300
5482
|
if (type === "hero") {
|
|
5301
|
-
const media =
|
|
5483
|
+
const media = resolveMediaWithURL(
|
|
5484
|
+
block.media,
|
|
5485
|
+
block.backgroundImageURL,
|
|
5486
|
+
normalizeText2(block.headline, "Hero image")
|
|
5487
|
+
);
|
|
5302
5488
|
const blockSettings = isRecord6(block.settings) ? block.settings : {};
|
|
5303
5489
|
const mediaSettings = isRecord6(blockSettings.media) ? blockSettings.media : {};
|
|
5304
5490
|
const variant = normalizeText2(block.variant, "default");
|
|
@@ -5322,13 +5508,19 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5322
5508
|
const resolvedBackgroundPositionX = typeof backgroundImagePositionX === "number" ? backgroundImagePositionX : 50;
|
|
5323
5509
|
const resolvedBackgroundPositionY = typeof backgroundImagePositionY === "number" ? backgroundImagePositionY : 50;
|
|
5324
5510
|
const backgroundImageObjectPosition = `${resolvedBackgroundPositionX}% ${resolvedBackgroundPositionY}%`;
|
|
5325
|
-
const hasCustomHeroColor = backgroundColor.length > 0
|
|
5511
|
+
const hasCustomHeroColor = backgroundColor.length > 0;
|
|
5326
5512
|
const overlayModeRaw = normalizeText2(block?.backgroundOverlayMode, "none");
|
|
5327
5513
|
const overlayMode = overlayModeRaw === "solid" || overlayModeRaw === "gradient" ? overlayModeRaw : "none";
|
|
5328
5514
|
const overlayOpacity = parsePercentNumber(block?.backgroundOverlayOpacity, 45) / 100;
|
|
5329
5515
|
const overlayColor = parseColor(block?.backgroundOverlayColor, "#000000");
|
|
5330
|
-
const overlayFrom = parseColor(
|
|
5331
|
-
|
|
5516
|
+
const overlayFrom = parseColor(
|
|
5517
|
+
block?.backgroundOverlayGradientFrom,
|
|
5518
|
+
resolvedThemeTokens.colors.accent
|
|
5519
|
+
);
|
|
5520
|
+
const overlayTo = parseColor(
|
|
5521
|
+
block?.backgroundOverlayGradientTo,
|
|
5522
|
+
mixHexColors(resolvedThemeTokens.colors.accent, resolvedThemeTokens.colors.surface, 0.18)
|
|
5523
|
+
);
|
|
5332
5524
|
const overlayAngle = parseAngle(block?.backgroundOverlayGradientAngle, "135");
|
|
5333
5525
|
const overlayFromStrength = parsePercentNumber(block?.backgroundOverlayGradientFromStrength, 100) / 100;
|
|
5334
5526
|
const overlayToStrength = parsePercentNumber(block?.backgroundOverlayGradientToStrength, 100) / 100;
|
|
@@ -5597,7 +5789,11 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5597
5789
|
},
|
|
5598
5790
|
children: items.map((item, itemIndex) => {
|
|
5599
5791
|
const itemRecord = item;
|
|
5600
|
-
const itemMedia =
|
|
5792
|
+
const itemMedia = resolveMediaWithURL(
|
|
5793
|
+
itemRecord?.media,
|
|
5794
|
+
itemRecord?.imageURL,
|
|
5795
|
+
normalizeText2(itemRecord?.title, "Feature image")
|
|
5796
|
+
);
|
|
5601
5797
|
const itemImageHeight = parsePixelNumber(itemRecord?.imageHeight, 120);
|
|
5602
5798
|
const iconType = normalizeText2(itemRecord?.iconType, "badge");
|
|
5603
5799
|
const iconBadge = normalizeText2(itemRecord?.icon);
|
|
@@ -5619,7 +5815,7 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5619
5815
|
setSelectedIndex(index);
|
|
5620
5816
|
openSelectedItem(itemIndex);
|
|
5621
5817
|
},
|
|
5622
|
-
style: isItemSelected ? { outline: "2px solid
|
|
5818
|
+
style: isItemSelected ? { outline: "2px solid var(--orion-studio-selection-outline)", outlineOffset: 3 } : void 0,
|
|
5623
5819
|
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "service-body", children: [
|
|
5624
5820
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "orion-builder-upload-slot", children: [
|
|
5625
5821
|
itemMedia?.url ? (
|
|
@@ -5723,7 +5919,7 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5723
5919
|
setSelectedIndex(index);
|
|
5724
5920
|
openSelectedItem(itemIndex);
|
|
5725
5921
|
},
|
|
5726
|
-
style: isItemSelected ? { outline: "2px solid
|
|
5922
|
+
style: isItemSelected ? { outline: "2px solid var(--orion-studio-selection-outline)", outlineOffset: 3 } : void 0,
|
|
5727
5923
|
children: [
|
|
5728
5924
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
5729
5925
|
InlineText,
|
|
@@ -5803,7 +5999,11 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5803
5999
|
] }) }),
|
|
5804
6000
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "orion-logo-wall", children: items.map((item, itemIndex) => {
|
|
5805
6001
|
const itemRecord = item;
|
|
5806
|
-
const media =
|
|
6002
|
+
const media = resolveMediaWithURL(
|
|
6003
|
+
itemRecord?.media,
|
|
6004
|
+
itemRecord?.imageURL,
|
|
6005
|
+
normalizeText2(itemRecord?.name, "Logo")
|
|
6006
|
+
);
|
|
5807
6007
|
const imageHeight = parsePixelNumber(itemRecord?.imageHeight, 54);
|
|
5808
6008
|
const itemPositionX = parseOptionalPercentNumber2(itemRecord?.imagePositionX);
|
|
5809
6009
|
const itemPositionY = parseOptionalPercentNumber2(itemRecord?.imagePositionY);
|
|
@@ -5823,7 +6023,7 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5823
6023
|
setSelectedIndex(index);
|
|
5824
6024
|
openSelectedItem(itemIndex);
|
|
5825
6025
|
},
|
|
5826
|
-
style: isItemSelected ? { outline: "2px solid
|
|
6026
|
+
style: isItemSelected ? { outline: "2px solid var(--orion-studio-selection-outline)", outlineOffset: 3 } : void 0,
|
|
5827
6027
|
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "orion-builder-upload-slot", children: [
|
|
5828
6028
|
media?.url ? (
|
|
5829
6029
|
// eslint-disable-next-line @next/next/no-img-element
|
|
@@ -5908,8 +6108,16 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5908
6108
|
},
|
|
5909
6109
|
children: items.map((item, itemIndex) => {
|
|
5910
6110
|
const itemRecord = item;
|
|
5911
|
-
const beforeMedia =
|
|
5912
|
-
|
|
6111
|
+
const beforeMedia = resolveMediaWithURL(
|
|
6112
|
+
itemRecord?.beforeMedia,
|
|
6113
|
+
itemRecord?.beforeImageURL,
|
|
6114
|
+
`${normalizeText2(itemRecord?.label, "Project")} before`
|
|
6115
|
+
);
|
|
6116
|
+
const afterMedia = resolveMediaWithURL(
|
|
6117
|
+
itemRecord?.afterMedia,
|
|
6118
|
+
itemRecord?.afterImageURL,
|
|
6119
|
+
`${normalizeText2(itemRecord?.label, "Project")} after`
|
|
6120
|
+
);
|
|
5913
6121
|
const imageHeight = parsePixelNumber(itemRecord?.imageHeight, 160);
|
|
5914
6122
|
const itemPositionX = parseOptionalPercentNumber2(itemRecord?.imagePositionX);
|
|
5915
6123
|
const itemPositionY = parseOptionalPercentNumber2(itemRecord?.imagePositionY);
|
|
@@ -5928,7 +6136,7 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5928
6136
|
setSelectedIndex(index);
|
|
5929
6137
|
openSelectedItem(itemIndex);
|
|
5930
6138
|
},
|
|
5931
|
-
style: isItemSelected ? { outline: "2px solid
|
|
6139
|
+
style: isItemSelected ? { outline: "2px solid var(--orion-studio-selection-outline)", outlineOffset: 3 } : void 0,
|
|
5932
6140
|
children: [
|
|
5933
6141
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "orion-before-after-media", children: [
|
|
5934
6142
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("figure", { children: [
|
|
@@ -6063,7 +6271,7 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
6063
6271
|
setSelectedIndex(index);
|
|
6064
6272
|
openSelectedItem(itemIndex);
|
|
6065
6273
|
},
|
|
6066
|
-
style: isItemSelected ? { outline: "2px solid
|
|
6274
|
+
style: isItemSelected ? { outline: "2px solid var(--orion-studio-selection-outline)", outlineOffset: 3 } : void 0,
|
|
6067
6275
|
children: [
|
|
6068
6276
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "testimonial-quote-top", children: [
|
|
6069
6277
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "testimonial-quote-mark", "aria-hidden": "true", children: "\u201C" }),
|
|
@@ -6150,7 +6358,7 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
6150
6358
|
setSelectedIndex(index);
|
|
6151
6359
|
openSelectedItem(itemIndex);
|
|
6152
6360
|
},
|
|
6153
|
-
style: isItemSelected ? { outline: "2px solid
|
|
6361
|
+
style: isItemSelected ? { outline: "2px solid var(--orion-studio-selection-outline)", outlineOffset: 3 } : void 0,
|
|
6154
6362
|
children: [
|
|
6155
6363
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "testimonial-quote-top", children: [
|
|
6156
6364
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "testimonial-quote-mark", "aria-hidden": "true", children: "\u201C" }),
|
|
@@ -6282,9 +6490,9 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
6282
6490
|
{
|
|
6283
6491
|
style: {
|
|
6284
6492
|
background: "#ffffff",
|
|
6285
|
-
border: "1px solid
|
|
6493
|
+
border: "1px solid var(--orion-studio-accent-border-subtle)",
|
|
6286
6494
|
borderRadius: 14,
|
|
6287
|
-
boxShadow: "0 14px 26px
|
|
6495
|
+
boxShadow: "0 14px 26px var(--orion-studio-accent-soft-strong)",
|
|
6288
6496
|
minHeight: 180,
|
|
6289
6497
|
overflow: "hidden",
|
|
6290
6498
|
width: sidebarOpen ? 340 : 52
|
|
@@ -6296,9 +6504,9 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
6296
6504
|
onClick: () => setSidebarOpen((open) => !open),
|
|
6297
6505
|
style: {
|
|
6298
6506
|
alignItems: "center",
|
|
6299
|
-
background: "
|
|
6507
|
+
background: "var(--orion-studio-accent)",
|
|
6300
6508
|
border: "none",
|
|
6301
|
-
color: "
|
|
6509
|
+
color: "var(--orion-studio-accent-contrast)",
|
|
6302
6510
|
cursor: "pointer",
|
|
6303
6511
|
display: "flex",
|
|
6304
6512
|
fontSize: 12,
|
|
@@ -6476,7 +6684,7 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
6476
6684
|
] }),
|
|
6477
6685
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("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." }),
|
|
6478
6686
|
uploadingTarget ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { style: { color: "var(--ink-700)", fontSize: 11 }, children: "Uploading image..." }) : null,
|
|
6479
|
-
uploadMessage ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { style: { color: "
|
|
6687
|
+
uploadMessage ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { style: { color: "var(--orion-studio-accent)", fontSize: 11, fontWeight: 700 }, children: uploadMessage }) : null,
|
|
6480
6688
|
uploadError ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { style: { color: "#8d1d1d", fontSize: 11, fontWeight: 700 }, children: uploadError }) : null
|
|
6481
6689
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { style: { color: "var(--ink-700)", fontSize: 12, margin: 0 }, children: "Click a section on the page preview to edit its options here." }) })
|
|
6482
6690
|
] }) : null
|
|
@@ -6486,7 +6694,7 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
6486
6694
|
{
|
|
6487
6695
|
style: {
|
|
6488
6696
|
alignContent: "start",
|
|
6489
|
-
background: "linear-gradient(180deg,
|
|
6697
|
+
background: "linear-gradient(180deg, var(--orion-studio-accent-soft), transparent)",
|
|
6490
6698
|
display: "grid",
|
|
6491
6699
|
gap: 10,
|
|
6492
6700
|
justifyItems: "center",
|
|
@@ -6518,6 +6726,7 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
6518
6726
|
BuilderPageEditor,
|
|
6519
6727
|
clonePresetBlocks,
|
|
6520
6728
|
defaultBuilderThemeTokens,
|
|
6729
|
+
registerBuilderBlockPreviewRenderer,
|
|
6521
6730
|
resolveBuilderThemeTokens,
|
|
6522
6731
|
sectionPresets,
|
|
6523
6732
|
templateStarterPresets
|