@orion-studios/payload-studio 0.6.0-beta.40 → 0.6.0-beta.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-CUPMTHGX.mjs → chunk-7ZMXZRBP.mjs} +20 -0
- package/dist/{chunk-LUF62ZWF.mjs → chunk-SXPIWE74.mjs} +29 -4
- package/dist/{chunk-AWL7TIEI.mjs → chunk-ZADL33R6.mjs} +1 -1
- package/dist/{index-DRu4fKxf.d.mts → index-D5zrOdyv.d.mts} +2 -0
- package/dist/{index-vkEwwsoC.d.ts → index-Dv-Alx4h.d.ts} +2 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +45 -0
- package/dist/index.mjs +7 -7
- package/dist/nextjs/index.js +20 -0
- package/dist/nextjs/index.mjs +2 -2
- package/dist/studio-pages/client.js +139 -21
- package/dist/studio-pages/client.mjs +139 -21
- package/dist/studio-pages/index.d.mts +1 -1
- package/dist/studio-pages/index.d.ts +1 -1
- package/dist/studio-pages/index.js +45 -0
- package/dist/studio-pages/index.mjs +3 -3
- package/package.json +1 -1
|
@@ -40,7 +40,9 @@ var defaultBuilderBlockSettingsV2 = {
|
|
|
40
40
|
},
|
|
41
41
|
typography: {
|
|
42
42
|
bodyAlign: "left",
|
|
43
|
+
bodySizePt: null,
|
|
43
44
|
headingAlign: "left",
|
|
45
|
+
headingSizePt: null,
|
|
44
46
|
letterSpacingPreset: "normal",
|
|
45
47
|
lineHeightPreset: "normal",
|
|
46
48
|
maxTextWidth: "auto"
|
|
@@ -69,7 +71,9 @@ var defaultBuilderItemSettingsV2 = {
|
|
|
69
71
|
},
|
|
70
72
|
typography: {
|
|
71
73
|
bodyAlign: "left",
|
|
74
|
+
bodySizePt: null,
|
|
72
75
|
headingAlign: "left",
|
|
76
|
+
headingSizePt: null,
|
|
73
77
|
letterSpacingPreset: "normal",
|
|
74
78
|
lineHeightPreset: "normal",
|
|
75
79
|
maxTextWidth: "auto"
|
|
@@ -124,6 +128,18 @@ var parsePixel = (value) => {
|
|
|
124
128
|
}
|
|
125
129
|
return null;
|
|
126
130
|
};
|
|
131
|
+
var parsePoint = (value) => {
|
|
132
|
+
if (typeof value === "number" && Number.isFinite(value)) {
|
|
133
|
+
return Math.max(6, Math.min(120, Math.round(value)));
|
|
134
|
+
}
|
|
135
|
+
if (typeof value === "string" && value.trim().length > 0) {
|
|
136
|
+
const parsed = Number(value);
|
|
137
|
+
if (Number.isFinite(parsed)) {
|
|
138
|
+
return Math.max(6, Math.min(120, Math.round(parsed)));
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return null;
|
|
142
|
+
};
|
|
127
143
|
var mergeSettings = (defaults, input) => {
|
|
128
144
|
if (!isRecord(input)) {
|
|
129
145
|
return structuredClone(defaults);
|
|
@@ -184,6 +200,8 @@ var legacyBlockToV2Settings = (block) => {
|
|
|
184
200
|
current.media.height = parsePixel(block.imageHeight);
|
|
185
201
|
current.typography.headingAlign = isTextAlign(block.textHeadingAlign) ? block.textHeadingAlign : current.typography.headingAlign;
|
|
186
202
|
current.typography.bodyAlign = isTextAlign(block.textBodyAlign) ? block.textBodyAlign : current.typography.bodyAlign;
|
|
203
|
+
current.typography.headingSizePt = parsePoint(block.textHeadingSizePt);
|
|
204
|
+
current.typography.bodySizePt = parsePoint(block.textBodySizePt);
|
|
187
205
|
current.typography.maxTextWidth = block.textMaxWidth === "auto" || block.textMaxWidth === "sm" || block.textMaxWidth === "md" || block.textMaxWidth === "lg" || block.textMaxWidth === "full" ? block.textMaxWidth : current.typography.maxTextWidth;
|
|
188
206
|
current.typography.lineHeightPreset = block.textLineHeightPreset === "tight" || block.textLineHeightPreset === "normal" || block.textLineHeightPreset === "relaxed" ? block.textLineHeightPreset : current.typography.lineHeightPreset;
|
|
189
207
|
current.typography.letterSpacingPreset = block.textLetterSpacingPreset === "tight" || block.textLetterSpacingPreset === "normal" || block.textLetterSpacingPreset === "relaxed" ? block.textLetterSpacingPreset : current.typography.letterSpacingPreset;
|
|
@@ -227,6 +245,8 @@ var v2SettingsToLegacyBlock = (blockWithSettings) => {
|
|
|
227
245
|
next.contentGradientAngle = settings.appearance.contentGradientAngle;
|
|
228
246
|
next.textHeadingAlign = settings.typography.headingAlign;
|
|
229
247
|
next.textBodyAlign = settings.typography.bodyAlign;
|
|
248
|
+
next.textHeadingSizePt = settings.typography.headingSizePt;
|
|
249
|
+
next.textBodySizePt = settings.typography.bodySizePt;
|
|
230
250
|
next.textMaxWidth = settings.typography.maxTextWidth;
|
|
231
251
|
next.textLineHeightPreset = settings.typography.lineHeightPreset;
|
|
232
252
|
next.textLetterSpacingPreset = settings.typography.letterSpacingPreset;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
sectionStyleDefaults
|
|
3
|
+
} from "./chunk-OQSEJXC4.mjs";
|
|
1
4
|
import {
|
|
2
5
|
createDefaultStudioDocument,
|
|
3
6
|
defaultBuilderThemeTokens,
|
|
4
7
|
layoutToStudioDocument,
|
|
5
8
|
migrateBlockToSettingsV2,
|
|
6
9
|
studioDocumentToLayout
|
|
7
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-7ZMXZRBP.mjs";
|
|
8
11
|
import {
|
|
9
12
|
assertStudioDocumentV1,
|
|
10
13
|
compileStudioDocument,
|
|
11
14
|
createEmptyStudioDocument,
|
|
12
15
|
validateStudioDocument
|
|
13
16
|
} from "./chunk-ADIIWIYL.mjs";
|
|
14
|
-
import {
|
|
15
|
-
sectionStyleDefaults
|
|
16
|
-
} from "./chunk-OQSEJXC4.mjs";
|
|
17
17
|
import {
|
|
18
18
|
__export
|
|
19
19
|
} from "./chunk-6BWS3CLP.mjs";
|
|
@@ -94,6 +94,24 @@ var layoutFieldSet = [
|
|
|
94
94
|
}
|
|
95
95
|
];
|
|
96
96
|
var typographyFieldSet = [
|
|
97
|
+
{
|
|
98
|
+
group: "typography",
|
|
99
|
+
key: "settings.typography.headingSizePt",
|
|
100
|
+
label: "Heading Text Size (pt)",
|
|
101
|
+
max: 120,
|
|
102
|
+
min: 6,
|
|
103
|
+
tags: ["text", "size", "heading", "font"],
|
|
104
|
+
type: "number"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
group: "typography",
|
|
108
|
+
key: "settings.typography.bodySizePt",
|
|
109
|
+
label: "Body Text Size (pt)",
|
|
110
|
+
max: 72,
|
|
111
|
+
min: 6,
|
|
112
|
+
tags: ["text", "size", "body", "paragraph", "font"],
|
|
113
|
+
type: "number"
|
|
114
|
+
},
|
|
97
115
|
{
|
|
98
116
|
group: "typography",
|
|
99
117
|
key: "settings.typography.headingAlign",
|
|
@@ -310,6 +328,13 @@ var inspectorDefinitionByBlockType = {
|
|
|
310
328
|
{ group: "basics", inlineEditable: true, key: "kicker", label: "Kicker", type: "text" },
|
|
311
329
|
{ group: "basics", inlineEditable: true, key: "headline", label: "Headline", type: "text" },
|
|
312
330
|
{ group: "basics", inlineEditable: true, key: "subheadline", label: "Subheadline", type: "textarea" },
|
|
331
|
+
{
|
|
332
|
+
group: "basics",
|
|
333
|
+
key: "marqueeItemsText",
|
|
334
|
+
label: "Scrolling Bar Options",
|
|
335
|
+
tags: ["marquee", "scrolling", "bar", "categories"],
|
|
336
|
+
type: "textarea"
|
|
337
|
+
},
|
|
313
338
|
{
|
|
314
339
|
group: "basics",
|
|
315
340
|
key: "variant",
|
|
@@ -21,7 +21,9 @@ type BuilderLayoutSettingsV2 = {
|
|
|
21
21
|
};
|
|
22
22
|
type BuilderTypographySettingsV2 = {
|
|
23
23
|
bodyAlign?: BuilderTextAlign;
|
|
24
|
+
bodySizePt?: number | null;
|
|
24
25
|
headingAlign?: BuilderTextAlign;
|
|
26
|
+
headingSizePt?: number | null;
|
|
25
27
|
letterSpacingPreset?: BuilderTypographySpacingPreset;
|
|
26
28
|
lineHeightPreset?: BuilderTypographySpacingPreset;
|
|
27
29
|
maxTextWidth?: 'auto' | 'full' | 'lg' | 'md' | 'sm';
|
|
@@ -21,7 +21,9 @@ type BuilderLayoutSettingsV2 = {
|
|
|
21
21
|
};
|
|
22
22
|
type BuilderTypographySettingsV2 = {
|
|
23
23
|
bodyAlign?: BuilderTextAlign;
|
|
24
|
+
bodySizePt?: number | null;
|
|
24
25
|
headingAlign?: BuilderTextAlign;
|
|
26
|
+
headingSizePt?: number | null;
|
|
25
27
|
letterSpacingPreset?: BuilderTypographySpacingPreset;
|
|
26
28
|
lineHeightPreset?: BuilderTypographySpacingPreset;
|
|
27
29
|
maxTextWidth?: 'auto' | 'full' | 'lg' | 'md' | 'sm';
|
package/dist/index.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ export { i as adminApp } from './index-G_uTNffQ.mjs';
|
|
|
3
3
|
export { i as blocks } from './index-CluwY0ZQ.mjs';
|
|
4
4
|
export { i as nextjs } from './index-D8BNfUJb.mjs';
|
|
5
5
|
export { i as studio } from './index-DWmudwDm.mjs';
|
|
6
|
-
export { i as studioPages } from './index-
|
|
6
|
+
export { i as studioPages } from './index-D5zrOdyv.mjs';
|
|
7
7
|
import 'payload';
|
|
8
8
|
import './sitePreviewTypes-BrJwGzJj.mjs';
|
|
9
9
|
import './socialMedia-C05Iy-SV.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { i as adminApp } from './index-DAdN56fM.js';
|
|
|
3
3
|
export { i as blocks } from './index-CluwY0ZQ.js';
|
|
4
4
|
export { i as nextjs } from './index-DD_E2UfJ.js';
|
|
5
5
|
export { i as studio } from './index-DWmudwDm.js';
|
|
6
|
-
export { i as studioPages } from './index-
|
|
6
|
+
export { i as studioPages } from './index-Dv-Alx4h.js';
|
|
7
7
|
import 'payload';
|
|
8
8
|
import './sitePreviewTypes-BrJwGzJj.js';
|
|
9
9
|
import './socialMedia-C05Iy-SV.js';
|
package/dist/index.js
CHANGED
|
@@ -3693,7 +3693,9 @@ var defaultBuilderBlockSettingsV2 = {
|
|
|
3693
3693
|
},
|
|
3694
3694
|
typography: {
|
|
3695
3695
|
bodyAlign: "left",
|
|
3696
|
+
bodySizePt: null,
|
|
3696
3697
|
headingAlign: "left",
|
|
3698
|
+
headingSizePt: null,
|
|
3697
3699
|
letterSpacingPreset: "normal",
|
|
3698
3700
|
lineHeightPreset: "normal",
|
|
3699
3701
|
maxTextWidth: "auto"
|
|
@@ -3722,7 +3724,9 @@ var defaultBuilderItemSettingsV2 = {
|
|
|
3722
3724
|
},
|
|
3723
3725
|
typography: {
|
|
3724
3726
|
bodyAlign: "left",
|
|
3727
|
+
bodySizePt: null,
|
|
3725
3728
|
headingAlign: "left",
|
|
3729
|
+
headingSizePt: null,
|
|
3726
3730
|
letterSpacingPreset: "normal",
|
|
3727
3731
|
lineHeightPreset: "normal",
|
|
3728
3732
|
maxTextWidth: "auto"
|
|
@@ -3777,6 +3781,18 @@ var parsePixel = (value) => {
|
|
|
3777
3781
|
}
|
|
3778
3782
|
return null;
|
|
3779
3783
|
};
|
|
3784
|
+
var parsePoint = (value) => {
|
|
3785
|
+
if (typeof value === "number" && Number.isFinite(value)) {
|
|
3786
|
+
return Math.max(6, Math.min(120, Math.round(value)));
|
|
3787
|
+
}
|
|
3788
|
+
if (typeof value === "string" && value.trim().length > 0) {
|
|
3789
|
+
const parsed = Number(value);
|
|
3790
|
+
if (Number.isFinite(parsed)) {
|
|
3791
|
+
return Math.max(6, Math.min(120, Math.round(parsed)));
|
|
3792
|
+
}
|
|
3793
|
+
}
|
|
3794
|
+
return null;
|
|
3795
|
+
};
|
|
3780
3796
|
var mergeSettings = (defaults, input) => {
|
|
3781
3797
|
if (!isRecord3(input)) {
|
|
3782
3798
|
return structuredClone(defaults);
|
|
@@ -3837,6 +3853,8 @@ var legacyBlockToV2Settings = (block) => {
|
|
|
3837
3853
|
current.media.height = parsePixel(block.imageHeight);
|
|
3838
3854
|
current.typography.headingAlign = isTextAlign(block.textHeadingAlign) ? block.textHeadingAlign : current.typography.headingAlign;
|
|
3839
3855
|
current.typography.bodyAlign = isTextAlign(block.textBodyAlign) ? block.textBodyAlign : current.typography.bodyAlign;
|
|
3856
|
+
current.typography.headingSizePt = parsePoint(block.textHeadingSizePt);
|
|
3857
|
+
current.typography.bodySizePt = parsePoint(block.textBodySizePt);
|
|
3840
3858
|
current.typography.maxTextWidth = block.textMaxWidth === "auto" || block.textMaxWidth === "sm" || block.textMaxWidth === "md" || block.textMaxWidth === "lg" || block.textMaxWidth === "full" ? block.textMaxWidth : current.typography.maxTextWidth;
|
|
3841
3859
|
current.typography.lineHeightPreset = block.textLineHeightPreset === "tight" || block.textLineHeightPreset === "normal" || block.textLineHeightPreset === "relaxed" ? block.textLineHeightPreset : current.typography.lineHeightPreset;
|
|
3842
3860
|
current.typography.letterSpacingPreset = block.textLetterSpacingPreset === "tight" || block.textLetterSpacingPreset === "normal" || block.textLetterSpacingPreset === "relaxed" ? block.textLetterSpacingPreset : current.typography.letterSpacingPreset;
|
|
@@ -3880,6 +3898,8 @@ var v2SettingsToLegacyBlock = (blockWithSettings) => {
|
|
|
3880
3898
|
next.contentGradientAngle = settings.appearance.contentGradientAngle;
|
|
3881
3899
|
next.textHeadingAlign = settings.typography.headingAlign;
|
|
3882
3900
|
next.textBodyAlign = settings.typography.bodyAlign;
|
|
3901
|
+
next.textHeadingSizePt = settings.typography.headingSizePt;
|
|
3902
|
+
next.textBodySizePt = settings.typography.bodySizePt;
|
|
3883
3903
|
next.textMaxWidth = settings.typography.maxTextWidth;
|
|
3884
3904
|
next.textLineHeightPreset = settings.typography.lineHeightPreset;
|
|
3885
3905
|
next.textLetterSpacingPreset = settings.typography.letterSpacingPreset;
|
|
@@ -4331,6 +4351,24 @@ var layoutFieldSet = [
|
|
|
4331
4351
|
}
|
|
4332
4352
|
];
|
|
4333
4353
|
var typographyFieldSet = [
|
|
4354
|
+
{
|
|
4355
|
+
group: "typography",
|
|
4356
|
+
key: "settings.typography.headingSizePt",
|
|
4357
|
+
label: "Heading Text Size (pt)",
|
|
4358
|
+
max: 120,
|
|
4359
|
+
min: 6,
|
|
4360
|
+
tags: ["text", "size", "heading", "font"],
|
|
4361
|
+
type: "number"
|
|
4362
|
+
},
|
|
4363
|
+
{
|
|
4364
|
+
group: "typography",
|
|
4365
|
+
key: "settings.typography.bodySizePt",
|
|
4366
|
+
label: "Body Text Size (pt)",
|
|
4367
|
+
max: 72,
|
|
4368
|
+
min: 6,
|
|
4369
|
+
tags: ["text", "size", "body", "paragraph", "font"],
|
|
4370
|
+
type: "number"
|
|
4371
|
+
},
|
|
4334
4372
|
{
|
|
4335
4373
|
group: "typography",
|
|
4336
4374
|
key: "settings.typography.headingAlign",
|
|
@@ -4547,6 +4585,13 @@ var inspectorDefinitionByBlockType = {
|
|
|
4547
4585
|
{ group: "basics", inlineEditable: true, key: "kicker", label: "Kicker", type: "text" },
|
|
4548
4586
|
{ group: "basics", inlineEditable: true, key: "headline", label: "Headline", type: "text" },
|
|
4549
4587
|
{ group: "basics", inlineEditable: true, key: "subheadline", label: "Subheadline", type: "textarea" },
|
|
4588
|
+
{
|
|
4589
|
+
group: "basics",
|
|
4590
|
+
key: "marqueeItemsText",
|
|
4591
|
+
label: "Scrolling Bar Options",
|
|
4592
|
+
tags: ["marquee", "scrolling", "bar", "categories"],
|
|
4593
|
+
type: "textarea"
|
|
4594
|
+
},
|
|
4550
4595
|
{
|
|
4551
4596
|
group: "basics",
|
|
4552
4597
|
key: "variant",
|
package/dist/index.mjs
CHANGED
|
@@ -5,21 +5,21 @@ import {
|
|
|
5
5
|
admin_app_exports
|
|
6
6
|
} from "./chunk-RKTIFEUY.mjs";
|
|
7
7
|
import "./chunk-W2UOCJDX.mjs";
|
|
8
|
+
import {
|
|
9
|
+
blocks_exports
|
|
10
|
+
} from "./chunk-JQAHXYAM.mjs";
|
|
8
11
|
import {
|
|
9
12
|
nextjs_exports
|
|
10
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ZADL33R6.mjs";
|
|
11
14
|
import "./chunk-ZTXJG4K5.mjs";
|
|
12
15
|
import {
|
|
13
16
|
studio_pages_exports
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-SXPIWE74.mjs";
|
|
18
|
+
import "./chunk-OQSEJXC4.mjs";
|
|
19
|
+
import "./chunk-7ZMXZRBP.mjs";
|
|
16
20
|
import {
|
|
17
21
|
studio_exports
|
|
18
22
|
} from "./chunk-ADIIWIYL.mjs";
|
|
19
|
-
import {
|
|
20
|
-
blocks_exports
|
|
21
|
-
} from "./chunk-JQAHXYAM.mjs";
|
|
22
|
-
import "./chunk-OQSEJXC4.mjs";
|
|
23
23
|
import "./chunk-6BWS3CLP.mjs";
|
|
24
24
|
export {
|
|
25
25
|
admin_exports as admin,
|
package/dist/nextjs/index.js
CHANGED
|
@@ -127,7 +127,9 @@ var defaultBuilderBlockSettingsV2 = {
|
|
|
127
127
|
},
|
|
128
128
|
typography: {
|
|
129
129
|
bodyAlign: "left",
|
|
130
|
+
bodySizePt: null,
|
|
130
131
|
headingAlign: "left",
|
|
132
|
+
headingSizePt: null,
|
|
131
133
|
letterSpacingPreset: "normal",
|
|
132
134
|
lineHeightPreset: "normal",
|
|
133
135
|
maxTextWidth: "auto"
|
|
@@ -156,7 +158,9 @@ var defaultBuilderItemSettingsV2 = {
|
|
|
156
158
|
},
|
|
157
159
|
typography: {
|
|
158
160
|
bodyAlign: "left",
|
|
161
|
+
bodySizePt: null,
|
|
159
162
|
headingAlign: "left",
|
|
163
|
+
headingSizePt: null,
|
|
160
164
|
letterSpacingPreset: "normal",
|
|
161
165
|
lineHeightPreset: "normal",
|
|
162
166
|
maxTextWidth: "auto"
|
|
@@ -191,6 +195,18 @@ var parsePixel = (value) => {
|
|
|
191
195
|
}
|
|
192
196
|
return null;
|
|
193
197
|
};
|
|
198
|
+
var parsePoint = (value) => {
|
|
199
|
+
if (typeof value === "number" && Number.isFinite(value)) {
|
|
200
|
+
return Math.max(6, Math.min(120, Math.round(value)));
|
|
201
|
+
}
|
|
202
|
+
if (typeof value === "string" && value.trim().length > 0) {
|
|
203
|
+
const parsed = Number(value);
|
|
204
|
+
if (Number.isFinite(parsed)) {
|
|
205
|
+
return Math.max(6, Math.min(120, Math.round(parsed)));
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
return null;
|
|
209
|
+
};
|
|
194
210
|
var mergeSettings = (defaults, input) => {
|
|
195
211
|
if (!isRecord2(input)) {
|
|
196
212
|
return structuredClone(defaults);
|
|
@@ -251,6 +267,8 @@ var legacyBlockToV2Settings = (block) => {
|
|
|
251
267
|
current.media.height = parsePixel(block.imageHeight);
|
|
252
268
|
current.typography.headingAlign = isTextAlign(block.textHeadingAlign) ? block.textHeadingAlign : current.typography.headingAlign;
|
|
253
269
|
current.typography.bodyAlign = isTextAlign(block.textBodyAlign) ? block.textBodyAlign : current.typography.bodyAlign;
|
|
270
|
+
current.typography.headingSizePt = parsePoint(block.textHeadingSizePt);
|
|
271
|
+
current.typography.bodySizePt = parsePoint(block.textBodySizePt);
|
|
254
272
|
current.typography.maxTextWidth = block.textMaxWidth === "auto" || block.textMaxWidth === "sm" || block.textMaxWidth === "md" || block.textMaxWidth === "lg" || block.textMaxWidth === "full" ? block.textMaxWidth : current.typography.maxTextWidth;
|
|
255
273
|
current.typography.lineHeightPreset = block.textLineHeightPreset === "tight" || block.textLineHeightPreset === "normal" || block.textLineHeightPreset === "relaxed" ? block.textLineHeightPreset : current.typography.lineHeightPreset;
|
|
256
274
|
current.typography.letterSpacingPreset = block.textLetterSpacingPreset === "tight" || block.textLetterSpacingPreset === "normal" || block.textLetterSpacingPreset === "relaxed" ? block.textLetterSpacingPreset : current.typography.letterSpacingPreset;
|
|
@@ -294,6 +312,8 @@ var v2SettingsToLegacyBlock = (blockWithSettings) => {
|
|
|
294
312
|
next.contentGradientAngle = settings.appearance.contentGradientAngle;
|
|
295
313
|
next.textHeadingAlign = settings.typography.headingAlign;
|
|
296
314
|
next.textBodyAlign = settings.typography.bodyAlign;
|
|
315
|
+
next.textHeadingSizePt = settings.typography.headingSizePt;
|
|
316
|
+
next.textBodySizePt = settings.typography.bodySizePt;
|
|
297
317
|
next.textMaxWidth = settings.typography.maxTextWidth;
|
|
298
318
|
next.textLineHeightPreset = settings.typography.lineHeightPreset;
|
|
299
319
|
next.textLetterSpacingPreset = settings.typography.letterSpacingPreset;
|
package/dist/nextjs/index.mjs
CHANGED
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
createSiteQueries,
|
|
6
6
|
resolveMedia,
|
|
7
7
|
resolveSocialMediaLinks
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-ZADL33R6.mjs";
|
|
9
9
|
import "../chunk-ZTXJG4K5.mjs";
|
|
10
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-7ZMXZRBP.mjs";
|
|
11
11
|
import "../chunk-ADIIWIYL.mjs";
|
|
12
12
|
import "../chunk-6BWS3CLP.mjs";
|
|
13
13
|
export {
|
|
@@ -97,7 +97,9 @@ var defaultBuilderBlockSettingsV2 = {
|
|
|
97
97
|
},
|
|
98
98
|
typography: {
|
|
99
99
|
bodyAlign: "left",
|
|
100
|
+
bodySizePt: null,
|
|
100
101
|
headingAlign: "left",
|
|
102
|
+
headingSizePt: null,
|
|
101
103
|
letterSpacingPreset: "normal",
|
|
102
104
|
lineHeightPreset: "normal",
|
|
103
105
|
maxTextWidth: "auto"
|
|
@@ -126,7 +128,9 @@ var defaultBuilderItemSettingsV2 = {
|
|
|
126
128
|
},
|
|
127
129
|
typography: {
|
|
128
130
|
bodyAlign: "left",
|
|
131
|
+
bodySizePt: null,
|
|
129
132
|
headingAlign: "left",
|
|
133
|
+
headingSizePt: null,
|
|
130
134
|
letterSpacingPreset: "normal",
|
|
131
135
|
lineHeightPreset: "normal",
|
|
132
136
|
maxTextWidth: "auto"
|
|
@@ -181,6 +185,18 @@ var parsePixel = (value) => {
|
|
|
181
185
|
}
|
|
182
186
|
return null;
|
|
183
187
|
};
|
|
188
|
+
var parsePoint = (value) => {
|
|
189
|
+
if (typeof value === "number" && Number.isFinite(value)) {
|
|
190
|
+
return Math.max(6, Math.min(120, Math.round(value)));
|
|
191
|
+
}
|
|
192
|
+
if (typeof value === "string" && value.trim().length > 0) {
|
|
193
|
+
const parsed = Number(value);
|
|
194
|
+
if (Number.isFinite(parsed)) {
|
|
195
|
+
return Math.max(6, Math.min(120, Math.round(parsed)));
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
return null;
|
|
199
|
+
};
|
|
184
200
|
var mergeSettings = (defaults, input) => {
|
|
185
201
|
if (!isRecord(input)) {
|
|
186
202
|
return structuredClone(defaults);
|
|
@@ -241,6 +257,8 @@ var legacyBlockToV2Settings = (block) => {
|
|
|
241
257
|
current.media.height = parsePixel(block.imageHeight);
|
|
242
258
|
current.typography.headingAlign = isTextAlign(block.textHeadingAlign) ? block.textHeadingAlign : current.typography.headingAlign;
|
|
243
259
|
current.typography.bodyAlign = isTextAlign(block.textBodyAlign) ? block.textBodyAlign : current.typography.bodyAlign;
|
|
260
|
+
current.typography.headingSizePt = parsePoint(block.textHeadingSizePt);
|
|
261
|
+
current.typography.bodySizePt = parsePoint(block.textBodySizePt);
|
|
244
262
|
current.typography.maxTextWidth = block.textMaxWidth === "auto" || block.textMaxWidth === "sm" || block.textMaxWidth === "md" || block.textMaxWidth === "lg" || block.textMaxWidth === "full" ? block.textMaxWidth : current.typography.maxTextWidth;
|
|
245
263
|
current.typography.lineHeightPreset = block.textLineHeightPreset === "tight" || block.textLineHeightPreset === "normal" || block.textLineHeightPreset === "relaxed" ? block.textLineHeightPreset : current.typography.lineHeightPreset;
|
|
246
264
|
current.typography.letterSpacingPreset = block.textLetterSpacingPreset === "tight" || block.textLetterSpacingPreset === "normal" || block.textLetterSpacingPreset === "relaxed" ? block.textLetterSpacingPreset : current.typography.letterSpacingPreset;
|
|
@@ -284,6 +302,8 @@ var v2SettingsToLegacyBlock = (blockWithSettings) => {
|
|
|
284
302
|
next.contentGradientAngle = settings.appearance.contentGradientAngle;
|
|
285
303
|
next.textHeadingAlign = settings.typography.headingAlign;
|
|
286
304
|
next.textBodyAlign = settings.typography.bodyAlign;
|
|
305
|
+
next.textHeadingSizePt = settings.typography.headingSizePt;
|
|
306
|
+
next.textBodySizePt = settings.typography.bodySizePt;
|
|
287
307
|
next.textMaxWidth = settings.typography.maxTextWidth;
|
|
288
308
|
next.textLineHeightPreset = settings.typography.lineHeightPreset;
|
|
289
309
|
next.textLetterSpacingPreset = settings.typography.letterSpacingPreset;
|
|
@@ -378,6 +398,7 @@ var resolveTypographyStyleFromSettings = (settings) => {
|
|
|
378
398
|
const letterSpacing = settings.letterSpacingPreset === "tight" ? "-0.01em" : settings.letterSpacingPreset === "relaxed" ? "0.02em" : "0.01em";
|
|
379
399
|
const maxWidth = settings.maxTextWidth === "sm" ? "36ch" : settings.maxTextWidth === "md" ? "52ch" : settings.maxTextWidth === "lg" ? "72ch" : settings.maxTextWidth === "full" ? "100%" : void 0;
|
|
380
400
|
return {
|
|
401
|
+
...typeof settings.bodySizePt === "number" && Number.isFinite(settings.bodySizePt) ? { fontSize: `${settings.bodySizePt}pt` } : {},
|
|
381
402
|
letterSpacing,
|
|
382
403
|
lineHeight,
|
|
383
404
|
maxWidth,
|
|
@@ -575,6 +596,24 @@ var layoutFieldSet = [
|
|
|
575
596
|
}
|
|
576
597
|
];
|
|
577
598
|
var typographyFieldSet = [
|
|
599
|
+
{
|
|
600
|
+
group: "typography",
|
|
601
|
+
key: "settings.typography.headingSizePt",
|
|
602
|
+
label: "Heading Text Size (pt)",
|
|
603
|
+
max: 120,
|
|
604
|
+
min: 6,
|
|
605
|
+
tags: ["text", "size", "heading", "font"],
|
|
606
|
+
type: "number"
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
group: "typography",
|
|
610
|
+
key: "settings.typography.bodySizePt",
|
|
611
|
+
label: "Body Text Size (pt)",
|
|
612
|
+
max: 72,
|
|
613
|
+
min: 6,
|
|
614
|
+
tags: ["text", "size", "body", "paragraph", "font"],
|
|
615
|
+
type: "number"
|
|
616
|
+
},
|
|
578
617
|
{
|
|
579
618
|
group: "typography",
|
|
580
619
|
key: "settings.typography.headingAlign",
|
|
@@ -798,6 +837,13 @@ var inspectorDefinitionByBlockType = {
|
|
|
798
837
|
{ group: "basics", inlineEditable: true, key: "kicker", label: "Kicker", type: "text" },
|
|
799
838
|
{ group: "basics", inlineEditable: true, key: "headline", label: "Headline", type: "text" },
|
|
800
839
|
{ group: "basics", inlineEditable: true, key: "subheadline", label: "Subheadline", type: "textarea" },
|
|
840
|
+
{
|
|
841
|
+
group: "basics",
|
|
842
|
+
key: "marqueeItemsText",
|
|
843
|
+
label: "Scrolling Bar Options",
|
|
844
|
+
tags: ["marquee", "scrolling", "bar", "categories"],
|
|
845
|
+
type: "textarea"
|
|
846
|
+
},
|
|
801
847
|
{
|
|
802
848
|
group: "basics",
|
|
803
849
|
key: "variant",
|
|
@@ -975,6 +1021,17 @@ var sectionPaddingPointMap = {
|
|
|
975
1021
|
};
|
|
976
1022
|
var heroDefaultPaddingTopPt = 30;
|
|
977
1023
|
var heroDefaultPaddingBottomPt = 20;
|
|
1024
|
+
var defaultTextSizePointMap = {
|
|
1025
|
+
cta: { body: 14, heading: 36 },
|
|
1026
|
+
faq: { body: 12, heading: 18 },
|
|
1027
|
+
featureGrid: { body: 12, heading: 36 },
|
|
1028
|
+
formEmbed: { body: 12, heading: 36 },
|
|
1029
|
+
hero: { body: 14, heading: 48 },
|
|
1030
|
+
media: { body: 12, heading: 36 },
|
|
1031
|
+
richText: { body: 12, heading: 39 },
|
|
1032
|
+
stats: { body: 11, heading: 30 },
|
|
1033
|
+
testimonials: { body: 12, heading: 36 }
|
|
1034
|
+
};
|
|
978
1035
|
var normalizeSectionPaddingY = (value) => value === "none" || value === "sm" || value === "lg" ? value : "md";
|
|
979
1036
|
var normalizePaddingPointValue = (value) => {
|
|
980
1037
|
if (typeof value === "number" && Number.isFinite(value)) {
|
|
@@ -988,6 +1045,18 @@ var normalizePaddingPointValue = (value) => {
|
|
|
988
1045
|
}
|
|
989
1046
|
return null;
|
|
990
1047
|
};
|
|
1048
|
+
var normalizeTextSizePointValue = (value) => {
|
|
1049
|
+
if (typeof value === "number" && Number.isFinite(value)) {
|
|
1050
|
+
return Math.max(6, Math.min(120, Math.round(value)));
|
|
1051
|
+
}
|
|
1052
|
+
if (typeof value === "string" && value.trim().length > 0) {
|
|
1053
|
+
const parsed = Number(value);
|
|
1054
|
+
if (Number.isFinite(parsed)) {
|
|
1055
|
+
return Math.max(6, Math.min(120, Math.round(parsed)));
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
return null;
|
|
1059
|
+
};
|
|
991
1060
|
var getEffectiveVerticalPaddingValue = (block, key) => {
|
|
992
1061
|
const explicit = normalizePaddingPointValue(getByPath(block, key));
|
|
993
1062
|
if (explicit !== null) {
|
|
@@ -998,6 +1067,15 @@ var getEffectiveVerticalPaddingValue = (block, key) => {
|
|
|
998
1067
|
const inherited = block.blockType === "hero" ? key === "settings.layout.paddingBottomPt" ? heroDefaultPaddingBottomPt : heroDefaultPaddingTopPt : sectionPaddingPointMap[normalizeSectionPaddingY(layoutSectionPaddingY || legacySectionPaddingY)];
|
|
999
1068
|
return inherited;
|
|
1000
1069
|
};
|
|
1070
|
+
var getEffectiveTextSizeValue = (block, key) => {
|
|
1071
|
+
const explicit = normalizeTextSizePointValue(getByPath(block, key));
|
|
1072
|
+
if (explicit !== null) {
|
|
1073
|
+
return explicit;
|
|
1074
|
+
}
|
|
1075
|
+
const blockType = typeof block.blockType === "string" ? block.blockType : "";
|
|
1076
|
+
const defaults = defaultTextSizePointMap[blockType] || { body: 12, heading: 36 };
|
|
1077
|
+
return key === "settings.typography.headingSizePt" ? defaults.heading : defaults.body;
|
|
1078
|
+
};
|
|
1001
1079
|
var getRelationID = (value) => {
|
|
1002
1080
|
if (typeof value === "number" || typeof value === "string") {
|
|
1003
1081
|
return value;
|
|
@@ -1167,6 +1245,26 @@ function BlockInspectorRenderer({
|
|
|
1167
1245
|
children: [
|
|
1168
1246
|
source.loading ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "orion-builder-settings-note", children: "Loading media library..." }) : null,
|
|
1169
1247
|
source.error ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "orion-builder-settings-error", children: source.error }) : null,
|
|
1248
|
+
selectedSourceMedia?.url ? (
|
|
1249
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
1250
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1251
|
+
"img",
|
|
1252
|
+
{
|
|
1253
|
+
alt: selectedSourceMedia.alt || source.label,
|
|
1254
|
+
src: selectedSourceMedia.url,
|
|
1255
|
+
style: {
|
|
1256
|
+
aspectRatio: "16 / 9",
|
|
1257
|
+
border: "1px solid rgba(35, 51, 82, 0.14)",
|
|
1258
|
+
borderRadius: 10,
|
|
1259
|
+
display: "block",
|
|
1260
|
+
marginBottom: "0.7rem",
|
|
1261
|
+
objectFit: effectiveMedia.fit,
|
|
1262
|
+
objectPosition: `${effectiveMedia.positionX}% ${effectiveMedia.positionY}%`,
|
|
1263
|
+
width: "100%"
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1266
|
+
)
|
|
1267
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "orion-builder-settings-empty", children: "No image selected." }),
|
|
1170
1268
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { className: "orion-builder-settings-label", children: [
|
|
1171
1269
|
source.label,
|
|
1172
1270
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
@@ -1278,8 +1376,10 @@ function BlockInspectorRenderer({
|
|
|
1278
1376
|
] }, field.key);
|
|
1279
1377
|
}
|
|
1280
1378
|
if (field.type === "number") {
|
|
1281
|
-
const
|
|
1282
|
-
const
|
|
1379
|
+
const isPaddingPointField = field.key === "settings.layout.paddingTopPt" || field.key === "settings.layout.paddingBottomPt";
|
|
1380
|
+
const isTextSizePointField = field.key === "settings.typography.headingSizePt" || field.key === "settings.typography.bodySizePt";
|
|
1381
|
+
const numberValue = isTextSizePointField ? normalizeTextSizePointValue(fieldValue) : normalizePaddingPointValue(fieldValue);
|
|
1382
|
+
const resolvedValue = numberValue !== null ? numberValue : isPaddingPointField ? getEffectiveVerticalPaddingValue(block, field.key) : isTextSizePointField ? getEffectiveTextSizeValue(block, field.key) : "";
|
|
1283
1383
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { className: "orion-builder-settings-label", children: [
|
|
1284
1384
|
field.label,
|
|
1285
1385
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
@@ -3078,6 +3178,19 @@ var toMediaLibraryItem2 = (value) => {
|
|
|
3078
3178
|
url
|
|
3079
3179
|
};
|
|
3080
3180
|
};
|
|
3181
|
+
var mediaFromImageURL = (url, fallbackLabel) => {
|
|
3182
|
+
if (typeof url !== "string" || url.trim().length === 0) {
|
|
3183
|
+
return null;
|
|
3184
|
+
}
|
|
3185
|
+
const normalizedURL = url.trim();
|
|
3186
|
+
const filename = normalizedURL.split("/").filter(Boolean).pop() || fallbackLabel;
|
|
3187
|
+
return {
|
|
3188
|
+
alt: fallbackLabel,
|
|
3189
|
+
filename,
|
|
3190
|
+
id: `url:${normalizedURL}`,
|
|
3191
|
+
url: normalizedURL
|
|
3192
|
+
};
|
|
3193
|
+
};
|
|
3081
3194
|
var mediaLabel2 = (item) => item.filename || item.alt || `Media #${item.id}`;
|
|
3082
3195
|
var findMediaLibraryItem2 = (library, id) => {
|
|
3083
3196
|
if (id === null) {
|
|
@@ -3175,10 +3288,10 @@ function ItemMediaControl({
|
|
|
3175
3288
|
uploadLabel,
|
|
3176
3289
|
uploading
|
|
3177
3290
|
}) {
|
|
3178
|
-
const selectedMediaID = getRelationID2(item[fieldName]);
|
|
3179
|
-
const selectedRelationMedia = toMediaLibraryItem2(item[fieldName]);
|
|
3180
|
-
const selectedMedia = selectedRelationMedia ?? findMediaLibraryItem2(mediaLibrary, selectedMediaID);
|
|
3181
3291
|
const directImageURL = normalizeText(item[imageURLFieldName]);
|
|
3292
|
+
const selectedRelationMedia = toMediaLibraryItem2(item[fieldName]) ?? mediaFromImageURL(directImageURL, label);
|
|
3293
|
+
const selectedMediaID = getRelationID2(item[fieldName]) ?? selectedRelationMedia?.id ?? null;
|
|
3294
|
+
const selectedMedia = selectedRelationMedia ?? findMediaLibraryItem2(mediaLibrary, selectedMediaID);
|
|
3182
3295
|
const previewURL = selectedMedia?.url || directImageURL;
|
|
3183
3296
|
const mediaSettings = getItemMediaSettings(item);
|
|
3184
3297
|
const sourceOptions = selectedMedia && !mediaLibrary.some((libraryItem) => String(libraryItem.id) === String(selectedMedia.id)) ? [selectedMedia, ...mediaLibrary] : mediaLibrary;
|
|
@@ -3217,7 +3330,7 @@ function ItemMediaControl({
|
|
|
3217
3330
|
onChange: (event) => onSelectItemMedia?.(itemIndex, fieldName, event.target.value),
|
|
3218
3331
|
value: selectedMediaID !== null ? String(selectedMediaID) : "",
|
|
3219
3332
|
children: [
|
|
3220
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "", children: "No
|
|
3333
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "", children: "No image" }),
|
|
3221
3334
|
sourceOptions.map((libraryItem) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: String(libraryItem.id), children: mediaLabel2(libraryItem) }, String(libraryItem.id)))
|
|
3222
3335
|
]
|
|
3223
3336
|
}
|
|
@@ -3232,23 +3345,14 @@ function ItemMediaControl({
|
|
|
3232
3345
|
{
|
|
3233
3346
|
className: "orion-builder-settings-inline-btn",
|
|
3234
3347
|
disabled: selectedMediaID === null,
|
|
3235
|
-
onClick: () =>
|
|
3348
|
+
onClick: () => {
|
|
3349
|
+
onRemoveItemMedia?.(itemIndex, fieldName);
|
|
3350
|
+
onUpdateItemField(itemIndex, imageURLFieldName, "");
|
|
3351
|
+
},
|
|
3236
3352
|
type: "button",
|
|
3237
|
-
children: "Remove
|
|
3353
|
+
children: "Remove Image"
|
|
3238
3354
|
}
|
|
3239
3355
|
),
|
|
3240
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "orion-builder-settings-label", children: [
|
|
3241
|
-
"Direct Image URL",
|
|
3242
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3243
|
-
"input",
|
|
3244
|
-
{
|
|
3245
|
-
className: "orion-builder-settings-input",
|
|
3246
|
-
onChange: (event) => onUpdateItemField(itemIndex, imageURLFieldName, event.target.value),
|
|
3247
|
-
type: "text",
|
|
3248
|
-
value: directImageURL
|
|
3249
|
-
}
|
|
3250
|
-
)
|
|
3251
|
-
] }),
|
|
3252
3356
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "orion-builder-settings-label", children: [
|
|
3253
3357
|
uploadLabel,
|
|
3254
3358
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
@@ -3767,6 +3871,19 @@ var resolveMedia = (value) => {
|
|
|
3767
3871
|
}
|
|
3768
3872
|
return null;
|
|
3769
3873
|
};
|
|
3874
|
+
var mediaFromImageURL2 = (url, fallbackLabel = "Current image") => {
|
|
3875
|
+
if (typeof url !== "string" || url.trim().length === 0) {
|
|
3876
|
+
return null;
|
|
3877
|
+
}
|
|
3878
|
+
const normalizedURL = url.trim();
|
|
3879
|
+
const filename = normalizedURL.split("/").filter(Boolean).pop() || fallbackLabel;
|
|
3880
|
+
return {
|
|
3881
|
+
alt: fallbackLabel,
|
|
3882
|
+
filename,
|
|
3883
|
+
id: `url:${normalizedURL}`,
|
|
3884
|
+
url: normalizedURL
|
|
3885
|
+
};
|
|
3886
|
+
};
|
|
3770
3887
|
var resolveMediaWithURL = (value, imageURL, alt) => {
|
|
3771
3888
|
const resolved = resolveMedia(value);
|
|
3772
3889
|
if (resolved?.url) {
|
|
@@ -4523,7 +4640,7 @@ function BuilderPageEditor({
|
|
|
4523
4640
|
const selectedBlockAdvancedSettings = isRecord6(selectedBlockSettings.advanced) ? selectedBlockSettings.advanced : {};
|
|
4524
4641
|
const isArrayItemBlockSelected = selectedType === "featureGrid" || selectedType === "logoWall" || selectedType === "beforeAfter" || selectedType === "stats" || selectedType === "faq" || selectedType === "testimonials";
|
|
4525
4642
|
const selectedBlockHasMediaSource = selectedType === "hero" || selectedType === "media";
|
|
4526
|
-
const selectedBlockMediaValue = selectedType === "hero" ? selectedBlock?.media : selectedType === "media" ? selectedBlock?.image : null;
|
|
4643
|
+
const selectedBlockMediaValue = selectedType === "hero" ? selectedBlock?.media ?? mediaFromImageURL2(selectedBlock?.backgroundImageURL, "Hero image") : selectedType === "media" ? selectedBlock?.image ?? mediaFromImageURL2(selectedBlock?.imageURL, "Section image") : null;
|
|
4527
4644
|
const selectedItemRecord = typeof selectedItemIndex === "number" && selectedItemIndex >= 0 && selectedItemIndex < selectedItems.length && isRecord6(selectedItems[selectedItemIndex]) ? selectedItems[selectedItemIndex] : null;
|
|
4528
4645
|
const editCopyInPanelEnabled = Boolean(selectedBlockAdvancedSettings.editCopyInPanel);
|
|
4529
4646
|
const isBlockUploadTarget = (blockIndex, kind) => selectedIndex === blockIndex && uploadingTarget?.kind === kind;
|
|
@@ -5081,6 +5198,7 @@ function BuilderPageEditor({
|
|
|
5081
5198
|
bodyAlign,
|
|
5082
5199
|
letterSpacingPreset: blockTypography.letterSpacingPreset === "tight" || blockTypography.letterSpacingPreset === "relaxed" ? blockTypography.letterSpacingPreset : "normal",
|
|
5083
5200
|
lineHeightPreset: blockTypography.lineHeightPreset === "tight" || blockTypography.lineHeightPreset === "relaxed" ? blockTypography.lineHeightPreset : "normal",
|
|
5201
|
+
bodySizePt: typeof blockTypography.bodySizePt === "number" && Number.isFinite(blockTypography.bodySizePt) ? blockTypography.bodySizePt : null,
|
|
5084
5202
|
maxTextWidth: blockTypography.maxTextWidth === "sm" || blockTypography.maxTextWidth === "md" || blockTypography.maxTextWidth === "lg" || blockTypography.maxTextWidth === "full" ? blockTypography.maxTextWidth : "auto"
|
|
5085
5203
|
});
|
|
5086
5204
|
const headingAlign = blockTypography.headingAlign === "center" || blockTypography.headingAlign === "justify" || blockTypography.headingAlign === "right" ? blockTypography.headingAlign : "left";
|
|
@@ -70,7 +70,9 @@ var defaultBuilderBlockSettingsV2 = {
|
|
|
70
70
|
},
|
|
71
71
|
typography: {
|
|
72
72
|
bodyAlign: "left",
|
|
73
|
+
bodySizePt: null,
|
|
73
74
|
headingAlign: "left",
|
|
75
|
+
headingSizePt: null,
|
|
74
76
|
letterSpacingPreset: "normal",
|
|
75
77
|
lineHeightPreset: "normal",
|
|
76
78
|
maxTextWidth: "auto"
|
|
@@ -99,7 +101,9 @@ var defaultBuilderItemSettingsV2 = {
|
|
|
99
101
|
},
|
|
100
102
|
typography: {
|
|
101
103
|
bodyAlign: "left",
|
|
104
|
+
bodySizePt: null,
|
|
102
105
|
headingAlign: "left",
|
|
106
|
+
headingSizePt: null,
|
|
103
107
|
letterSpacingPreset: "normal",
|
|
104
108
|
lineHeightPreset: "normal",
|
|
105
109
|
maxTextWidth: "auto"
|
|
@@ -154,6 +158,18 @@ var parsePixel = (value) => {
|
|
|
154
158
|
}
|
|
155
159
|
return null;
|
|
156
160
|
};
|
|
161
|
+
var parsePoint = (value) => {
|
|
162
|
+
if (typeof value === "number" && Number.isFinite(value)) {
|
|
163
|
+
return Math.max(6, Math.min(120, Math.round(value)));
|
|
164
|
+
}
|
|
165
|
+
if (typeof value === "string" && value.trim().length > 0) {
|
|
166
|
+
const parsed = Number(value);
|
|
167
|
+
if (Number.isFinite(parsed)) {
|
|
168
|
+
return Math.max(6, Math.min(120, Math.round(parsed)));
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
return null;
|
|
172
|
+
};
|
|
157
173
|
var mergeSettings = (defaults, input) => {
|
|
158
174
|
if (!isRecord(input)) {
|
|
159
175
|
return structuredClone(defaults);
|
|
@@ -214,6 +230,8 @@ var legacyBlockToV2Settings = (block) => {
|
|
|
214
230
|
current.media.height = parsePixel(block.imageHeight);
|
|
215
231
|
current.typography.headingAlign = isTextAlign(block.textHeadingAlign) ? block.textHeadingAlign : current.typography.headingAlign;
|
|
216
232
|
current.typography.bodyAlign = isTextAlign(block.textBodyAlign) ? block.textBodyAlign : current.typography.bodyAlign;
|
|
233
|
+
current.typography.headingSizePt = parsePoint(block.textHeadingSizePt);
|
|
234
|
+
current.typography.bodySizePt = parsePoint(block.textBodySizePt);
|
|
217
235
|
current.typography.maxTextWidth = block.textMaxWidth === "auto" || block.textMaxWidth === "sm" || block.textMaxWidth === "md" || block.textMaxWidth === "lg" || block.textMaxWidth === "full" ? block.textMaxWidth : current.typography.maxTextWidth;
|
|
218
236
|
current.typography.lineHeightPreset = block.textLineHeightPreset === "tight" || block.textLineHeightPreset === "normal" || block.textLineHeightPreset === "relaxed" ? block.textLineHeightPreset : current.typography.lineHeightPreset;
|
|
219
237
|
current.typography.letterSpacingPreset = block.textLetterSpacingPreset === "tight" || block.textLetterSpacingPreset === "normal" || block.textLetterSpacingPreset === "relaxed" ? block.textLetterSpacingPreset : current.typography.letterSpacingPreset;
|
|
@@ -257,6 +275,8 @@ var v2SettingsToLegacyBlock = (blockWithSettings) => {
|
|
|
257
275
|
next.contentGradientAngle = settings.appearance.contentGradientAngle;
|
|
258
276
|
next.textHeadingAlign = settings.typography.headingAlign;
|
|
259
277
|
next.textBodyAlign = settings.typography.bodyAlign;
|
|
278
|
+
next.textHeadingSizePt = settings.typography.headingSizePt;
|
|
279
|
+
next.textBodySizePt = settings.typography.bodySizePt;
|
|
260
280
|
next.textMaxWidth = settings.typography.maxTextWidth;
|
|
261
281
|
next.textLineHeightPreset = settings.typography.lineHeightPreset;
|
|
262
282
|
next.textLetterSpacingPreset = settings.typography.letterSpacingPreset;
|
|
@@ -351,6 +371,7 @@ var resolveTypographyStyleFromSettings = (settings) => {
|
|
|
351
371
|
const letterSpacing = settings.letterSpacingPreset === "tight" ? "-0.01em" : settings.letterSpacingPreset === "relaxed" ? "0.02em" : "0.01em";
|
|
352
372
|
const maxWidth = settings.maxTextWidth === "sm" ? "36ch" : settings.maxTextWidth === "md" ? "52ch" : settings.maxTextWidth === "lg" ? "72ch" : settings.maxTextWidth === "full" ? "100%" : void 0;
|
|
353
373
|
return {
|
|
374
|
+
...typeof settings.bodySizePt === "number" && Number.isFinite(settings.bodySizePt) ? { fontSize: `${settings.bodySizePt}pt` } : {},
|
|
354
375
|
letterSpacing,
|
|
355
376
|
lineHeight,
|
|
356
377
|
maxWidth,
|
|
@@ -548,6 +569,24 @@ var layoutFieldSet = [
|
|
|
548
569
|
}
|
|
549
570
|
];
|
|
550
571
|
var typographyFieldSet = [
|
|
572
|
+
{
|
|
573
|
+
group: "typography",
|
|
574
|
+
key: "settings.typography.headingSizePt",
|
|
575
|
+
label: "Heading Text Size (pt)",
|
|
576
|
+
max: 120,
|
|
577
|
+
min: 6,
|
|
578
|
+
tags: ["text", "size", "heading", "font"],
|
|
579
|
+
type: "number"
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
group: "typography",
|
|
583
|
+
key: "settings.typography.bodySizePt",
|
|
584
|
+
label: "Body Text Size (pt)",
|
|
585
|
+
max: 72,
|
|
586
|
+
min: 6,
|
|
587
|
+
tags: ["text", "size", "body", "paragraph", "font"],
|
|
588
|
+
type: "number"
|
|
589
|
+
},
|
|
551
590
|
{
|
|
552
591
|
group: "typography",
|
|
553
592
|
key: "settings.typography.headingAlign",
|
|
@@ -771,6 +810,13 @@ var inspectorDefinitionByBlockType = {
|
|
|
771
810
|
{ group: "basics", inlineEditable: true, key: "kicker", label: "Kicker", type: "text" },
|
|
772
811
|
{ group: "basics", inlineEditable: true, key: "headline", label: "Headline", type: "text" },
|
|
773
812
|
{ group: "basics", inlineEditable: true, key: "subheadline", label: "Subheadline", type: "textarea" },
|
|
813
|
+
{
|
|
814
|
+
group: "basics",
|
|
815
|
+
key: "marqueeItemsText",
|
|
816
|
+
label: "Scrolling Bar Options",
|
|
817
|
+
tags: ["marquee", "scrolling", "bar", "categories"],
|
|
818
|
+
type: "textarea"
|
|
819
|
+
},
|
|
774
820
|
{
|
|
775
821
|
group: "basics",
|
|
776
822
|
key: "variant",
|
|
@@ -948,6 +994,17 @@ var sectionPaddingPointMap = {
|
|
|
948
994
|
};
|
|
949
995
|
var heroDefaultPaddingTopPt = 30;
|
|
950
996
|
var heroDefaultPaddingBottomPt = 20;
|
|
997
|
+
var defaultTextSizePointMap = {
|
|
998
|
+
cta: { body: 14, heading: 36 },
|
|
999
|
+
faq: { body: 12, heading: 18 },
|
|
1000
|
+
featureGrid: { body: 12, heading: 36 },
|
|
1001
|
+
formEmbed: { body: 12, heading: 36 },
|
|
1002
|
+
hero: { body: 14, heading: 48 },
|
|
1003
|
+
media: { body: 12, heading: 36 },
|
|
1004
|
+
richText: { body: 12, heading: 39 },
|
|
1005
|
+
stats: { body: 11, heading: 30 },
|
|
1006
|
+
testimonials: { body: 12, heading: 36 }
|
|
1007
|
+
};
|
|
951
1008
|
var normalizeSectionPaddingY = (value) => value === "none" || value === "sm" || value === "lg" ? value : "md";
|
|
952
1009
|
var normalizePaddingPointValue = (value) => {
|
|
953
1010
|
if (typeof value === "number" && Number.isFinite(value)) {
|
|
@@ -961,6 +1018,18 @@ var normalizePaddingPointValue = (value) => {
|
|
|
961
1018
|
}
|
|
962
1019
|
return null;
|
|
963
1020
|
};
|
|
1021
|
+
var normalizeTextSizePointValue = (value) => {
|
|
1022
|
+
if (typeof value === "number" && Number.isFinite(value)) {
|
|
1023
|
+
return Math.max(6, Math.min(120, Math.round(value)));
|
|
1024
|
+
}
|
|
1025
|
+
if (typeof value === "string" && value.trim().length > 0) {
|
|
1026
|
+
const parsed = Number(value);
|
|
1027
|
+
if (Number.isFinite(parsed)) {
|
|
1028
|
+
return Math.max(6, Math.min(120, Math.round(parsed)));
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
return null;
|
|
1032
|
+
};
|
|
964
1033
|
var getEffectiveVerticalPaddingValue = (block, key) => {
|
|
965
1034
|
const explicit = normalizePaddingPointValue(getByPath(block, key));
|
|
966
1035
|
if (explicit !== null) {
|
|
@@ -971,6 +1040,15 @@ var getEffectiveVerticalPaddingValue = (block, key) => {
|
|
|
971
1040
|
const inherited = block.blockType === "hero" ? key === "settings.layout.paddingBottomPt" ? heroDefaultPaddingBottomPt : heroDefaultPaddingTopPt : sectionPaddingPointMap[normalizeSectionPaddingY(layoutSectionPaddingY || legacySectionPaddingY)];
|
|
972
1041
|
return inherited;
|
|
973
1042
|
};
|
|
1043
|
+
var getEffectiveTextSizeValue = (block, key) => {
|
|
1044
|
+
const explicit = normalizeTextSizePointValue(getByPath(block, key));
|
|
1045
|
+
if (explicit !== null) {
|
|
1046
|
+
return explicit;
|
|
1047
|
+
}
|
|
1048
|
+
const blockType = typeof block.blockType === "string" ? block.blockType : "";
|
|
1049
|
+
const defaults = defaultTextSizePointMap[blockType] || { body: 12, heading: 36 };
|
|
1050
|
+
return key === "settings.typography.headingSizePt" ? defaults.heading : defaults.body;
|
|
1051
|
+
};
|
|
974
1052
|
var getRelationID = (value) => {
|
|
975
1053
|
if (typeof value === "number" || typeof value === "string") {
|
|
976
1054
|
return value;
|
|
@@ -1140,6 +1218,26 @@ function BlockInspectorRenderer({
|
|
|
1140
1218
|
children: [
|
|
1141
1219
|
source.loading ? /* @__PURE__ */ jsx3("div", { className: "orion-builder-settings-note", children: "Loading media library..." }) : null,
|
|
1142
1220
|
source.error ? /* @__PURE__ */ jsx3("div", { className: "orion-builder-settings-error", children: source.error }) : null,
|
|
1221
|
+
selectedSourceMedia?.url ? (
|
|
1222
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
1223
|
+
/* @__PURE__ */ jsx3(
|
|
1224
|
+
"img",
|
|
1225
|
+
{
|
|
1226
|
+
alt: selectedSourceMedia.alt || source.label,
|
|
1227
|
+
src: selectedSourceMedia.url,
|
|
1228
|
+
style: {
|
|
1229
|
+
aspectRatio: "16 / 9",
|
|
1230
|
+
border: "1px solid rgba(35, 51, 82, 0.14)",
|
|
1231
|
+
borderRadius: 10,
|
|
1232
|
+
display: "block",
|
|
1233
|
+
marginBottom: "0.7rem",
|
|
1234
|
+
objectFit: effectiveMedia.fit,
|
|
1235
|
+
objectPosition: `${effectiveMedia.positionX}% ${effectiveMedia.positionY}%`,
|
|
1236
|
+
width: "100%"
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
)
|
|
1240
|
+
) : /* @__PURE__ */ jsx3("div", { className: "orion-builder-settings-empty", children: "No image selected." }),
|
|
1143
1241
|
/* @__PURE__ */ jsxs3("label", { className: "orion-builder-settings-label", children: [
|
|
1144
1242
|
source.label,
|
|
1145
1243
|
/* @__PURE__ */ jsxs3(
|
|
@@ -1251,8 +1349,10 @@ function BlockInspectorRenderer({
|
|
|
1251
1349
|
] }, field.key);
|
|
1252
1350
|
}
|
|
1253
1351
|
if (field.type === "number") {
|
|
1254
|
-
const
|
|
1255
|
-
const
|
|
1352
|
+
const isPaddingPointField = field.key === "settings.layout.paddingTopPt" || field.key === "settings.layout.paddingBottomPt";
|
|
1353
|
+
const isTextSizePointField = field.key === "settings.typography.headingSizePt" || field.key === "settings.typography.bodySizePt";
|
|
1354
|
+
const numberValue = isTextSizePointField ? normalizeTextSizePointValue(fieldValue) : normalizePaddingPointValue(fieldValue);
|
|
1355
|
+
const resolvedValue = numberValue !== null ? numberValue : isPaddingPointField ? getEffectiveVerticalPaddingValue(block, field.key) : isTextSizePointField ? getEffectiveTextSizeValue(block, field.key) : "";
|
|
1256
1356
|
return /* @__PURE__ */ jsxs3("label", { className: "orion-builder-settings-label", children: [
|
|
1257
1357
|
field.label,
|
|
1258
1358
|
/* @__PURE__ */ jsx3(
|
|
@@ -2958,6 +3058,19 @@ var toMediaLibraryItem2 = (value) => {
|
|
|
2958
3058
|
url
|
|
2959
3059
|
};
|
|
2960
3060
|
};
|
|
3061
|
+
var mediaFromImageURL = (url, fallbackLabel) => {
|
|
3062
|
+
if (typeof url !== "string" || url.trim().length === 0) {
|
|
3063
|
+
return null;
|
|
3064
|
+
}
|
|
3065
|
+
const normalizedURL = url.trim();
|
|
3066
|
+
const filename = normalizedURL.split("/").filter(Boolean).pop() || fallbackLabel;
|
|
3067
|
+
return {
|
|
3068
|
+
alt: fallbackLabel,
|
|
3069
|
+
filename,
|
|
3070
|
+
id: `url:${normalizedURL}`,
|
|
3071
|
+
url: normalizedURL
|
|
3072
|
+
};
|
|
3073
|
+
};
|
|
2961
3074
|
var mediaLabel2 = (item) => item.filename || item.alt || `Media #${item.id}`;
|
|
2962
3075
|
var findMediaLibraryItem2 = (library, id) => {
|
|
2963
3076
|
if (id === null) {
|
|
@@ -3055,10 +3168,10 @@ function ItemMediaControl({
|
|
|
3055
3168
|
uploadLabel,
|
|
3056
3169
|
uploading
|
|
3057
3170
|
}) {
|
|
3058
|
-
const selectedMediaID = getRelationID2(item[fieldName]);
|
|
3059
|
-
const selectedRelationMedia = toMediaLibraryItem2(item[fieldName]);
|
|
3060
|
-
const selectedMedia = selectedRelationMedia ?? findMediaLibraryItem2(mediaLibrary, selectedMediaID);
|
|
3061
3171
|
const directImageURL = normalizeText(item[imageURLFieldName]);
|
|
3172
|
+
const selectedRelationMedia = toMediaLibraryItem2(item[fieldName]) ?? mediaFromImageURL(directImageURL, label);
|
|
3173
|
+
const selectedMediaID = getRelationID2(item[fieldName]) ?? selectedRelationMedia?.id ?? null;
|
|
3174
|
+
const selectedMedia = selectedRelationMedia ?? findMediaLibraryItem2(mediaLibrary, selectedMediaID);
|
|
3062
3175
|
const previewURL = selectedMedia?.url || directImageURL;
|
|
3063
3176
|
const mediaSettings = getItemMediaSettings(item);
|
|
3064
3177
|
const sourceOptions = selectedMedia && !mediaLibrary.some((libraryItem) => String(libraryItem.id) === String(selectedMedia.id)) ? [selectedMedia, ...mediaLibrary] : mediaLibrary;
|
|
@@ -3097,7 +3210,7 @@ function ItemMediaControl({
|
|
|
3097
3210
|
onChange: (event) => onSelectItemMedia?.(itemIndex, fieldName, event.target.value),
|
|
3098
3211
|
value: selectedMediaID !== null ? String(selectedMediaID) : "",
|
|
3099
3212
|
children: [
|
|
3100
|
-
/* @__PURE__ */ jsx12("option", { value: "", children: "No
|
|
3213
|
+
/* @__PURE__ */ jsx12("option", { value: "", children: "No image" }),
|
|
3101
3214
|
sourceOptions.map((libraryItem) => /* @__PURE__ */ jsx12("option", { value: String(libraryItem.id), children: mediaLabel2(libraryItem) }, String(libraryItem.id)))
|
|
3102
3215
|
]
|
|
3103
3216
|
}
|
|
@@ -3112,23 +3225,14 @@ function ItemMediaControl({
|
|
|
3112
3225
|
{
|
|
3113
3226
|
className: "orion-builder-settings-inline-btn",
|
|
3114
3227
|
disabled: selectedMediaID === null,
|
|
3115
|
-
onClick: () =>
|
|
3228
|
+
onClick: () => {
|
|
3229
|
+
onRemoveItemMedia?.(itemIndex, fieldName);
|
|
3230
|
+
onUpdateItemField(itemIndex, imageURLFieldName, "");
|
|
3231
|
+
},
|
|
3116
3232
|
type: "button",
|
|
3117
|
-
children: "Remove
|
|
3233
|
+
children: "Remove Image"
|
|
3118
3234
|
}
|
|
3119
3235
|
),
|
|
3120
|
-
/* @__PURE__ */ jsxs11("label", { className: "orion-builder-settings-label", children: [
|
|
3121
|
-
"Direct Image URL",
|
|
3122
|
-
/* @__PURE__ */ jsx12(
|
|
3123
|
-
"input",
|
|
3124
|
-
{
|
|
3125
|
-
className: "orion-builder-settings-input",
|
|
3126
|
-
onChange: (event) => onUpdateItemField(itemIndex, imageURLFieldName, event.target.value),
|
|
3127
|
-
type: "text",
|
|
3128
|
-
value: directImageURL
|
|
3129
|
-
}
|
|
3130
|
-
)
|
|
3131
|
-
] }),
|
|
3132
3236
|
/* @__PURE__ */ jsxs11("label", { className: "orion-builder-settings-label", children: [
|
|
3133
3237
|
uploadLabel,
|
|
3134
3238
|
/* @__PURE__ */ jsx12(
|
|
@@ -3647,6 +3751,19 @@ var resolveMedia = (value) => {
|
|
|
3647
3751
|
}
|
|
3648
3752
|
return null;
|
|
3649
3753
|
};
|
|
3754
|
+
var mediaFromImageURL2 = (url, fallbackLabel = "Current image") => {
|
|
3755
|
+
if (typeof url !== "string" || url.trim().length === 0) {
|
|
3756
|
+
return null;
|
|
3757
|
+
}
|
|
3758
|
+
const normalizedURL = url.trim();
|
|
3759
|
+
const filename = normalizedURL.split("/").filter(Boolean).pop() || fallbackLabel;
|
|
3760
|
+
return {
|
|
3761
|
+
alt: fallbackLabel,
|
|
3762
|
+
filename,
|
|
3763
|
+
id: `url:${normalizedURL}`,
|
|
3764
|
+
url: normalizedURL
|
|
3765
|
+
};
|
|
3766
|
+
};
|
|
3650
3767
|
var resolveMediaWithURL = (value, imageURL, alt) => {
|
|
3651
3768
|
const resolved = resolveMedia(value);
|
|
3652
3769
|
if (resolved?.url) {
|
|
@@ -4403,7 +4520,7 @@ function BuilderPageEditor({
|
|
|
4403
4520
|
const selectedBlockAdvancedSettings = isRecord6(selectedBlockSettings.advanced) ? selectedBlockSettings.advanced : {};
|
|
4404
4521
|
const isArrayItemBlockSelected = selectedType === "featureGrid" || selectedType === "logoWall" || selectedType === "beforeAfter" || selectedType === "stats" || selectedType === "faq" || selectedType === "testimonials";
|
|
4405
4522
|
const selectedBlockHasMediaSource = selectedType === "hero" || selectedType === "media";
|
|
4406
|
-
const selectedBlockMediaValue = selectedType === "hero" ? selectedBlock?.media : selectedType === "media" ? selectedBlock?.image : null;
|
|
4523
|
+
const selectedBlockMediaValue = selectedType === "hero" ? selectedBlock?.media ?? mediaFromImageURL2(selectedBlock?.backgroundImageURL, "Hero image") : selectedType === "media" ? selectedBlock?.image ?? mediaFromImageURL2(selectedBlock?.imageURL, "Section image") : null;
|
|
4407
4524
|
const selectedItemRecord = typeof selectedItemIndex === "number" && selectedItemIndex >= 0 && selectedItemIndex < selectedItems.length && isRecord6(selectedItems[selectedItemIndex]) ? selectedItems[selectedItemIndex] : null;
|
|
4408
4525
|
const editCopyInPanelEnabled = Boolean(selectedBlockAdvancedSettings.editCopyInPanel);
|
|
4409
4526
|
const isBlockUploadTarget = (blockIndex, kind) => selectedIndex === blockIndex && uploadingTarget?.kind === kind;
|
|
@@ -4961,6 +5078,7 @@ function BuilderPageEditor({
|
|
|
4961
5078
|
bodyAlign,
|
|
4962
5079
|
letterSpacingPreset: blockTypography.letterSpacingPreset === "tight" || blockTypography.letterSpacingPreset === "relaxed" ? blockTypography.letterSpacingPreset : "normal",
|
|
4963
5080
|
lineHeightPreset: blockTypography.lineHeightPreset === "tight" || blockTypography.lineHeightPreset === "relaxed" ? blockTypography.lineHeightPreset : "normal",
|
|
5081
|
+
bodySizePt: typeof blockTypography.bodySizePt === "number" && Number.isFinite(blockTypography.bodySizePt) ? blockTypography.bodySizePt : null,
|
|
4964
5082
|
maxTextWidth: blockTypography.maxTextWidth === "sm" || blockTypography.maxTextWidth === "md" || blockTypography.maxTextWidth === "lg" || blockTypography.maxTextWidth === "full" ? blockTypography.maxTextWidth : "auto"
|
|
4965
5083
|
});
|
|
4966
5084
|
const headingAlign = blockTypography.headingAlign === "center" || blockTypography.headingAlign === "justify" || blockTypography.headingAlign === "right" ? blockTypography.headingAlign : "left";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { B as BuilderBlock, a as BuilderBlockPreviewRenderArgs, b as BuilderBlockPreviewRenderer, c as BuilderBlockSettingsV2, d as BuilderInlineTextComponentProps, e as BuilderPreviewEditingHelpers, f as BuilderPreviewTextFieldOptions, g as BuilderRenderWithSectionShell, h as BuilderSettingsPanelMode, j as BuilderThemeTokenOverrides, k as BuilderThemeTokens, S as SectionPreset, l as createDefaultStudioDocument, m as createStudioPageService, n as defaultBuilderThemeTokens, o as getStudioDocumentFromPage, p as layoutToStudioDocument, q as pageInspectorPanels, r as pageNodeTypes, s as pagePaletteGroups, t as pageStudioModuleManifest, u as resolveBuilderThemeTokens, v as studioDocumentToLayout, w as toEditorInitialDoc } from '../index-
|
|
1
|
+
export { B as BuilderBlock, a as BuilderBlockPreviewRenderArgs, b as BuilderBlockPreviewRenderer, c as BuilderBlockSettingsV2, d as BuilderInlineTextComponentProps, e as BuilderPreviewEditingHelpers, f as BuilderPreviewTextFieldOptions, g as BuilderRenderWithSectionShell, h as BuilderSettingsPanelMode, j as BuilderThemeTokenOverrides, k as BuilderThemeTokens, S as SectionPreset, l as createDefaultStudioDocument, m as createStudioPageService, n as defaultBuilderThemeTokens, o as getStudioDocumentFromPage, p as layoutToStudioDocument, q as pageInspectorPanels, r as pageNodeTypes, s as pagePaletteGroups, t as pageStudioModuleManifest, u as resolveBuilderThemeTokens, v as studioDocumentToLayout, w as toEditorInitialDoc } from '../index-D5zrOdyv.mjs';
|
|
2
2
|
import '../index-DWmudwDm.mjs';
|
|
3
3
|
import 'payload';
|
|
4
4
|
import 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { B as BuilderBlock, a as BuilderBlockPreviewRenderArgs, b as BuilderBlockPreviewRenderer, c as BuilderBlockSettingsV2, d as BuilderInlineTextComponentProps, e as BuilderPreviewEditingHelpers, f as BuilderPreviewTextFieldOptions, g as BuilderRenderWithSectionShell, h as BuilderSettingsPanelMode, j as BuilderThemeTokenOverrides, k as BuilderThemeTokens, S as SectionPreset, l as createDefaultStudioDocument, m as createStudioPageService, n as defaultBuilderThemeTokens, o as getStudioDocumentFromPage, p as layoutToStudioDocument, q as pageInspectorPanels, r as pageNodeTypes, s as pagePaletteGroups, t as pageStudioModuleManifest, u as resolveBuilderThemeTokens, v as studioDocumentToLayout, w as toEditorInitialDoc } from '../index-
|
|
1
|
+
export { B as BuilderBlock, a as BuilderBlockPreviewRenderArgs, b as BuilderBlockPreviewRenderer, c as BuilderBlockSettingsV2, d as BuilderInlineTextComponentProps, e as BuilderPreviewEditingHelpers, f as BuilderPreviewTextFieldOptions, g as BuilderRenderWithSectionShell, h as BuilderSettingsPanelMode, j as BuilderThemeTokenOverrides, k as BuilderThemeTokens, S as SectionPreset, l as createDefaultStudioDocument, m as createStudioPageService, n as defaultBuilderThemeTokens, o as getStudioDocumentFromPage, p as layoutToStudioDocument, q as pageInspectorPanels, r as pageNodeTypes, s as pagePaletteGroups, t as pageStudioModuleManifest, u as resolveBuilderThemeTokens, v as studioDocumentToLayout, w as toEditorInitialDoc } from '../index-Dv-Alx4h.js';
|
|
2
2
|
import '../index-DWmudwDm.js';
|
|
3
3
|
import 'payload';
|
|
4
4
|
import 'react';
|
|
@@ -97,7 +97,9 @@ var defaultBuilderBlockSettingsV2 = {
|
|
|
97
97
|
},
|
|
98
98
|
typography: {
|
|
99
99
|
bodyAlign: "left",
|
|
100
|
+
bodySizePt: null,
|
|
100
101
|
headingAlign: "left",
|
|
102
|
+
headingSizePt: null,
|
|
101
103
|
letterSpacingPreset: "normal",
|
|
102
104
|
lineHeightPreset: "normal",
|
|
103
105
|
maxTextWidth: "auto"
|
|
@@ -126,7 +128,9 @@ var defaultBuilderItemSettingsV2 = {
|
|
|
126
128
|
},
|
|
127
129
|
typography: {
|
|
128
130
|
bodyAlign: "left",
|
|
131
|
+
bodySizePt: null,
|
|
129
132
|
headingAlign: "left",
|
|
133
|
+
headingSizePt: null,
|
|
130
134
|
letterSpacingPreset: "normal",
|
|
131
135
|
lineHeightPreset: "normal",
|
|
132
136
|
maxTextWidth: "auto"
|
|
@@ -181,6 +185,18 @@ var parsePixel = (value) => {
|
|
|
181
185
|
}
|
|
182
186
|
return null;
|
|
183
187
|
};
|
|
188
|
+
var parsePoint = (value) => {
|
|
189
|
+
if (typeof value === "number" && Number.isFinite(value)) {
|
|
190
|
+
return Math.max(6, Math.min(120, Math.round(value)));
|
|
191
|
+
}
|
|
192
|
+
if (typeof value === "string" && value.trim().length > 0) {
|
|
193
|
+
const parsed = Number(value);
|
|
194
|
+
if (Number.isFinite(parsed)) {
|
|
195
|
+
return Math.max(6, Math.min(120, Math.round(parsed)));
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
return null;
|
|
199
|
+
};
|
|
184
200
|
var mergeSettings = (defaults, input) => {
|
|
185
201
|
if (!isRecord(input)) {
|
|
186
202
|
return structuredClone(defaults);
|
|
@@ -241,6 +257,8 @@ var legacyBlockToV2Settings = (block) => {
|
|
|
241
257
|
current.media.height = parsePixel(block.imageHeight);
|
|
242
258
|
current.typography.headingAlign = isTextAlign(block.textHeadingAlign) ? block.textHeadingAlign : current.typography.headingAlign;
|
|
243
259
|
current.typography.bodyAlign = isTextAlign(block.textBodyAlign) ? block.textBodyAlign : current.typography.bodyAlign;
|
|
260
|
+
current.typography.headingSizePt = parsePoint(block.textHeadingSizePt);
|
|
261
|
+
current.typography.bodySizePt = parsePoint(block.textBodySizePt);
|
|
244
262
|
current.typography.maxTextWidth = block.textMaxWidth === "auto" || block.textMaxWidth === "sm" || block.textMaxWidth === "md" || block.textMaxWidth === "lg" || block.textMaxWidth === "full" ? block.textMaxWidth : current.typography.maxTextWidth;
|
|
245
263
|
current.typography.lineHeightPreset = block.textLineHeightPreset === "tight" || block.textLineHeightPreset === "normal" || block.textLineHeightPreset === "relaxed" ? block.textLineHeightPreset : current.typography.lineHeightPreset;
|
|
246
264
|
current.typography.letterSpacingPreset = block.textLetterSpacingPreset === "tight" || block.textLetterSpacingPreset === "normal" || block.textLetterSpacingPreset === "relaxed" ? block.textLetterSpacingPreset : current.typography.letterSpacingPreset;
|
|
@@ -284,6 +302,8 @@ var v2SettingsToLegacyBlock = (blockWithSettings) => {
|
|
|
284
302
|
next.contentGradientAngle = settings.appearance.contentGradientAngle;
|
|
285
303
|
next.textHeadingAlign = settings.typography.headingAlign;
|
|
286
304
|
next.textBodyAlign = settings.typography.bodyAlign;
|
|
305
|
+
next.textHeadingSizePt = settings.typography.headingSizePt;
|
|
306
|
+
next.textBodySizePt = settings.typography.bodySizePt;
|
|
287
307
|
next.textMaxWidth = settings.typography.maxTextWidth;
|
|
288
308
|
next.textLineHeightPreset = settings.typography.lineHeightPreset;
|
|
289
309
|
next.textLetterSpacingPreset = settings.typography.letterSpacingPreset;
|
|
@@ -408,6 +428,24 @@ var layoutFieldSet = [
|
|
|
408
428
|
}
|
|
409
429
|
];
|
|
410
430
|
var typographyFieldSet = [
|
|
431
|
+
{
|
|
432
|
+
group: "typography",
|
|
433
|
+
key: "settings.typography.headingSizePt",
|
|
434
|
+
label: "Heading Text Size (pt)",
|
|
435
|
+
max: 120,
|
|
436
|
+
min: 6,
|
|
437
|
+
tags: ["text", "size", "heading", "font"],
|
|
438
|
+
type: "number"
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
group: "typography",
|
|
442
|
+
key: "settings.typography.bodySizePt",
|
|
443
|
+
label: "Body Text Size (pt)",
|
|
444
|
+
max: 72,
|
|
445
|
+
min: 6,
|
|
446
|
+
tags: ["text", "size", "body", "paragraph", "font"],
|
|
447
|
+
type: "number"
|
|
448
|
+
},
|
|
411
449
|
{
|
|
412
450
|
group: "typography",
|
|
413
451
|
key: "settings.typography.headingAlign",
|
|
@@ -624,6 +662,13 @@ var inspectorDefinitionByBlockType = {
|
|
|
624
662
|
{ group: "basics", inlineEditable: true, key: "kicker", label: "Kicker", type: "text" },
|
|
625
663
|
{ group: "basics", inlineEditable: true, key: "headline", label: "Headline", type: "text" },
|
|
626
664
|
{ group: "basics", inlineEditable: true, key: "subheadline", label: "Subheadline", type: "textarea" },
|
|
665
|
+
{
|
|
666
|
+
group: "basics",
|
|
667
|
+
key: "marqueeItemsText",
|
|
668
|
+
label: "Scrolling Bar Options",
|
|
669
|
+
tags: ["marquee", "scrolling", "bar", "categories"],
|
|
670
|
+
type: "textarea"
|
|
671
|
+
},
|
|
627
672
|
{
|
|
628
673
|
group: "basics",
|
|
629
674
|
key: "variant",
|
|
@@ -7,15 +7,15 @@ import {
|
|
|
7
7
|
pageStudioModuleManifest,
|
|
8
8
|
resolveBuilderThemeTokens,
|
|
9
9
|
toEditorInitialDoc
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-SXPIWE74.mjs";
|
|
11
|
+
import "../chunk-OQSEJXC4.mjs";
|
|
11
12
|
import {
|
|
12
13
|
createDefaultStudioDocument,
|
|
13
14
|
defaultBuilderThemeTokens,
|
|
14
15
|
layoutToStudioDocument,
|
|
15
16
|
studioDocumentToLayout
|
|
16
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-7ZMXZRBP.mjs";
|
|
17
18
|
import "../chunk-ADIIWIYL.mjs";
|
|
18
|
-
import "../chunk-OQSEJXC4.mjs";
|
|
19
19
|
import "../chunk-6BWS3CLP.mjs";
|
|
20
20
|
export {
|
|
21
21
|
createDefaultStudioDocument,
|
package/package.json
CHANGED