@orion-studios/payload-studio 0.6.0-beta.40 → 0.6.0-beta.41
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-OL53KHTB.mjs} +22 -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 +38 -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 +76 -2
- package/dist/studio-pages/client.mjs +76 -2
- package/dist/studio-pages/index.d.mts +1 -1
- package/dist/studio-pages/index.d.ts +1 -1
- package/dist/studio-pages/index.js +38 -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",
|
|
@@ -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",
|
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-OL53KHTB.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",
|
|
@@ -975,6 +1014,17 @@ var sectionPaddingPointMap = {
|
|
|
975
1014
|
};
|
|
976
1015
|
var heroDefaultPaddingTopPt = 30;
|
|
977
1016
|
var heroDefaultPaddingBottomPt = 20;
|
|
1017
|
+
var defaultTextSizePointMap = {
|
|
1018
|
+
cta: { body: 14, heading: 36 },
|
|
1019
|
+
faq: { body: 12, heading: 18 },
|
|
1020
|
+
featureGrid: { body: 12, heading: 36 },
|
|
1021
|
+
formEmbed: { body: 12, heading: 36 },
|
|
1022
|
+
hero: { body: 14, heading: 48 },
|
|
1023
|
+
media: { body: 12, heading: 36 },
|
|
1024
|
+
richText: { body: 12, heading: 39 },
|
|
1025
|
+
stats: { body: 11, heading: 30 },
|
|
1026
|
+
testimonials: { body: 12, heading: 36 }
|
|
1027
|
+
};
|
|
978
1028
|
var normalizeSectionPaddingY = (value) => value === "none" || value === "sm" || value === "lg" ? value : "md";
|
|
979
1029
|
var normalizePaddingPointValue = (value) => {
|
|
980
1030
|
if (typeof value === "number" && Number.isFinite(value)) {
|
|
@@ -988,6 +1038,18 @@ var normalizePaddingPointValue = (value) => {
|
|
|
988
1038
|
}
|
|
989
1039
|
return null;
|
|
990
1040
|
};
|
|
1041
|
+
var normalizeTextSizePointValue = (value) => {
|
|
1042
|
+
if (typeof value === "number" && Number.isFinite(value)) {
|
|
1043
|
+
return Math.max(6, Math.min(120, Math.round(value)));
|
|
1044
|
+
}
|
|
1045
|
+
if (typeof value === "string" && value.trim().length > 0) {
|
|
1046
|
+
const parsed = Number(value);
|
|
1047
|
+
if (Number.isFinite(parsed)) {
|
|
1048
|
+
return Math.max(6, Math.min(120, Math.round(parsed)));
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
return null;
|
|
1052
|
+
};
|
|
991
1053
|
var getEffectiveVerticalPaddingValue = (block, key) => {
|
|
992
1054
|
const explicit = normalizePaddingPointValue(getByPath(block, key));
|
|
993
1055
|
if (explicit !== null) {
|
|
@@ -998,6 +1060,15 @@ var getEffectiveVerticalPaddingValue = (block, key) => {
|
|
|
998
1060
|
const inherited = block.blockType === "hero" ? key === "settings.layout.paddingBottomPt" ? heroDefaultPaddingBottomPt : heroDefaultPaddingTopPt : sectionPaddingPointMap[normalizeSectionPaddingY(layoutSectionPaddingY || legacySectionPaddingY)];
|
|
999
1061
|
return inherited;
|
|
1000
1062
|
};
|
|
1063
|
+
var getEffectiveTextSizeValue = (block, key) => {
|
|
1064
|
+
const explicit = normalizeTextSizePointValue(getByPath(block, key));
|
|
1065
|
+
if (explicit !== null) {
|
|
1066
|
+
return explicit;
|
|
1067
|
+
}
|
|
1068
|
+
const blockType = typeof block.blockType === "string" ? block.blockType : "";
|
|
1069
|
+
const defaults = defaultTextSizePointMap[blockType] || { body: 12, heading: 36 };
|
|
1070
|
+
return key === "settings.typography.headingSizePt" ? defaults.heading : defaults.body;
|
|
1071
|
+
};
|
|
1001
1072
|
var getRelationID = (value) => {
|
|
1002
1073
|
if (typeof value === "number" || typeof value === "string") {
|
|
1003
1074
|
return value;
|
|
@@ -1278,8 +1349,10 @@ function BlockInspectorRenderer({
|
|
|
1278
1349
|
] }, field.key);
|
|
1279
1350
|
}
|
|
1280
1351
|
if (field.type === "number") {
|
|
1281
|
-
const
|
|
1282
|
-
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) : "";
|
|
1283
1356
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { className: "orion-builder-settings-label", children: [
|
|
1284
1357
|
field.label,
|
|
1285
1358
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
@@ -5081,6 +5154,7 @@ function BuilderPageEditor({
|
|
|
5081
5154
|
bodyAlign,
|
|
5082
5155
|
letterSpacingPreset: blockTypography.letterSpacingPreset === "tight" || blockTypography.letterSpacingPreset === "relaxed" ? blockTypography.letterSpacingPreset : "normal",
|
|
5083
5156
|
lineHeightPreset: blockTypography.lineHeightPreset === "tight" || blockTypography.lineHeightPreset === "relaxed" ? blockTypography.lineHeightPreset : "normal",
|
|
5157
|
+
bodySizePt: typeof blockTypography.bodySizePt === "number" && Number.isFinite(blockTypography.bodySizePt) ? blockTypography.bodySizePt : null,
|
|
5084
5158
|
maxTextWidth: blockTypography.maxTextWidth === "sm" || blockTypography.maxTextWidth === "md" || blockTypography.maxTextWidth === "lg" || blockTypography.maxTextWidth === "full" ? blockTypography.maxTextWidth : "auto"
|
|
5085
5159
|
});
|
|
5086
5160
|
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",
|
|
@@ -948,6 +987,17 @@ var sectionPaddingPointMap = {
|
|
|
948
987
|
};
|
|
949
988
|
var heroDefaultPaddingTopPt = 30;
|
|
950
989
|
var heroDefaultPaddingBottomPt = 20;
|
|
990
|
+
var defaultTextSizePointMap = {
|
|
991
|
+
cta: { body: 14, heading: 36 },
|
|
992
|
+
faq: { body: 12, heading: 18 },
|
|
993
|
+
featureGrid: { body: 12, heading: 36 },
|
|
994
|
+
formEmbed: { body: 12, heading: 36 },
|
|
995
|
+
hero: { body: 14, heading: 48 },
|
|
996
|
+
media: { body: 12, heading: 36 },
|
|
997
|
+
richText: { body: 12, heading: 39 },
|
|
998
|
+
stats: { body: 11, heading: 30 },
|
|
999
|
+
testimonials: { body: 12, heading: 36 }
|
|
1000
|
+
};
|
|
951
1001
|
var normalizeSectionPaddingY = (value) => value === "none" || value === "sm" || value === "lg" ? value : "md";
|
|
952
1002
|
var normalizePaddingPointValue = (value) => {
|
|
953
1003
|
if (typeof value === "number" && Number.isFinite(value)) {
|
|
@@ -961,6 +1011,18 @@ var normalizePaddingPointValue = (value) => {
|
|
|
961
1011
|
}
|
|
962
1012
|
return null;
|
|
963
1013
|
};
|
|
1014
|
+
var normalizeTextSizePointValue = (value) => {
|
|
1015
|
+
if (typeof value === "number" && Number.isFinite(value)) {
|
|
1016
|
+
return Math.max(6, Math.min(120, Math.round(value)));
|
|
1017
|
+
}
|
|
1018
|
+
if (typeof value === "string" && value.trim().length > 0) {
|
|
1019
|
+
const parsed = Number(value);
|
|
1020
|
+
if (Number.isFinite(parsed)) {
|
|
1021
|
+
return Math.max(6, Math.min(120, Math.round(parsed)));
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
return null;
|
|
1025
|
+
};
|
|
964
1026
|
var getEffectiveVerticalPaddingValue = (block, key) => {
|
|
965
1027
|
const explicit = normalizePaddingPointValue(getByPath(block, key));
|
|
966
1028
|
if (explicit !== null) {
|
|
@@ -971,6 +1033,15 @@ var getEffectiveVerticalPaddingValue = (block, key) => {
|
|
|
971
1033
|
const inherited = block.blockType === "hero" ? key === "settings.layout.paddingBottomPt" ? heroDefaultPaddingBottomPt : heroDefaultPaddingTopPt : sectionPaddingPointMap[normalizeSectionPaddingY(layoutSectionPaddingY || legacySectionPaddingY)];
|
|
972
1034
|
return inherited;
|
|
973
1035
|
};
|
|
1036
|
+
var getEffectiveTextSizeValue = (block, key) => {
|
|
1037
|
+
const explicit = normalizeTextSizePointValue(getByPath(block, key));
|
|
1038
|
+
if (explicit !== null) {
|
|
1039
|
+
return explicit;
|
|
1040
|
+
}
|
|
1041
|
+
const blockType = typeof block.blockType === "string" ? block.blockType : "";
|
|
1042
|
+
const defaults = defaultTextSizePointMap[blockType] || { body: 12, heading: 36 };
|
|
1043
|
+
return key === "settings.typography.headingSizePt" ? defaults.heading : defaults.body;
|
|
1044
|
+
};
|
|
974
1045
|
var getRelationID = (value) => {
|
|
975
1046
|
if (typeof value === "number" || typeof value === "string") {
|
|
976
1047
|
return value;
|
|
@@ -1251,8 +1322,10 @@ function BlockInspectorRenderer({
|
|
|
1251
1322
|
] }, field.key);
|
|
1252
1323
|
}
|
|
1253
1324
|
if (field.type === "number") {
|
|
1254
|
-
const
|
|
1255
|
-
const
|
|
1325
|
+
const isPaddingPointField = field.key === "settings.layout.paddingTopPt" || field.key === "settings.layout.paddingBottomPt";
|
|
1326
|
+
const isTextSizePointField = field.key === "settings.typography.headingSizePt" || field.key === "settings.typography.bodySizePt";
|
|
1327
|
+
const numberValue = isTextSizePointField ? normalizeTextSizePointValue(fieldValue) : normalizePaddingPointValue(fieldValue);
|
|
1328
|
+
const resolvedValue = numberValue !== null ? numberValue : isPaddingPointField ? getEffectiveVerticalPaddingValue(block, field.key) : isTextSizePointField ? getEffectiveTextSizeValue(block, field.key) : "";
|
|
1256
1329
|
return /* @__PURE__ */ jsxs3("label", { className: "orion-builder-settings-label", children: [
|
|
1257
1330
|
field.label,
|
|
1258
1331
|
/* @__PURE__ */ jsx3(
|
|
@@ -4961,6 +5034,7 @@ function BuilderPageEditor({
|
|
|
4961
5034
|
bodyAlign,
|
|
4962
5035
|
letterSpacingPreset: blockTypography.letterSpacingPreset === "tight" || blockTypography.letterSpacingPreset === "relaxed" ? blockTypography.letterSpacingPreset : "normal",
|
|
4963
5036
|
lineHeightPreset: blockTypography.lineHeightPreset === "tight" || blockTypography.lineHeightPreset === "relaxed" ? blockTypography.lineHeightPreset : "normal",
|
|
5037
|
+
bodySizePt: typeof blockTypography.bodySizePt === "number" && Number.isFinite(blockTypography.bodySizePt) ? blockTypography.bodySizePt : null,
|
|
4964
5038
|
maxTextWidth: blockTypography.maxTextWidth === "sm" || blockTypography.maxTextWidth === "md" || blockTypography.maxTextWidth === "lg" || blockTypography.maxTextWidth === "full" ? blockTypography.maxTextWidth : "auto"
|
|
4965
5039
|
});
|
|
4966
5040
|
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",
|
|
@@ -7,15 +7,15 @@ import {
|
|
|
7
7
|
pageStudioModuleManifest,
|
|
8
8
|
resolveBuilderThemeTokens,
|
|
9
9
|
toEditorInitialDoc
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-OL53KHTB.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