@orion-studios/payload-studio 0.6.0-beta.13 → 0.6.0-beta.130
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin/client.js +2061 -538
- package/dist/admin/client.mjs +2078 -568
- package/dist/admin/index.js +124 -15
- package/dist/admin/index.mjs +1 -1
- package/dist/admin-app/client.js +14 -5
- package/dist/admin-app/client.mjs +1 -1
- package/dist/admin-app/styles.css +277 -1
- package/dist/admin.css +98 -2
- package/dist/builder-v2/client.d.mts +18 -0
- package/dist/builder-v2/client.d.ts +18 -0
- package/dist/builder-v2/client.js +3832 -0
- package/dist/builder-v2/client.mjs +3707 -0
- package/dist/builder-v2/index.d.mts +248 -0
- package/dist/builder-v2/index.d.ts +248 -0
- package/dist/builder-v2/index.js +805 -0
- package/dist/builder-v2/index.mjs +755 -0
- package/dist/builder-v2/styles.css +2514 -0
- package/dist/{chunk-PF3EBZXF.mjs → chunk-7ZMXZRBP.mjs} +39 -3
- package/dist/{chunk-XZQILJK3.mjs → chunk-JC3UV74N.mjs} +124 -15
- package/dist/{chunk-KPIX7OSV.mjs → chunk-NF37A575.mjs} +14 -5
- package/dist/{chunk-XKUTZ7IU.mjs → chunk-NGLIA2OE.mjs} +53 -2
- package/dist/{chunk-OTHERBGX.mjs → chunk-ZADL33R6.mjs} +1 -1
- package/dist/{index-Cv-6qnrw.d.mts → index-D5zrOdyv.d.mts} +3 -1
- package/dist/{index-Crx_MtPw.d.ts → index-Dv-Alx4h.d.ts} +3 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +215 -19
- package/dist/index.mjs +4 -4
- package/dist/nextjs/index.js +39 -3
- package/dist/nextjs/index.mjs +2 -2
- package/dist/studio-pages/builder.css +66 -5
- package/dist/studio-pages/client.js +618 -73
- package/dist/studio-pages/client.mjs +641 -96
- package/dist/studio-pages/index.d.mts +1 -1
- package/dist/studio-pages/index.d.ts +1 -1
- package/dist/studio-pages/index.js +91 -4
- package/dist/studio-pages/index.mjs +2 -2
- package/package.json +22 -3
|
@@ -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"
|
|
@@ -156,6 +160,7 @@ var defaultBuilderThemeTokens = {
|
|
|
156
160
|
|
|
157
161
|
// src/studio-pages/builder/adapters/settingsV2.ts
|
|
158
162
|
var isRecord = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
163
|
+
var isTextAlign = (value) => value === "left" || value === "center" || value === "right" || value === "justify";
|
|
159
164
|
var parsePercent = (value) => {
|
|
160
165
|
if (typeof value === "number" && Number.isFinite(value)) {
|
|
161
166
|
return Math.max(0, Math.min(100, value));
|
|
@@ -180,6 +185,18 @@ var parsePixel = (value) => {
|
|
|
180
185
|
}
|
|
181
186
|
return null;
|
|
182
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
|
+
};
|
|
183
200
|
var mergeSettings = (defaults, input) => {
|
|
184
201
|
if (!isRecord(input)) {
|
|
185
202
|
return structuredClone(defaults);
|
|
@@ -198,6 +215,10 @@ var mergeSettings = (defaults, input) => {
|
|
|
198
215
|
};
|
|
199
216
|
var legacyBlockToV2Settings = (block) => {
|
|
200
217
|
const current = structuredClone(defaultBuilderBlockSettingsV2);
|
|
218
|
+
if (block.blockType === "hero" && block.variant === "centered") {
|
|
219
|
+
current.typography.headingAlign = "center";
|
|
220
|
+
current.typography.bodyAlign = "center";
|
|
221
|
+
}
|
|
201
222
|
current.layout.contentWidth = block.contentWidth === "narrow" || block.contentWidth === "content" || block.contentWidth === "wide" || block.contentWidth === "full" || block.contentWidth === "inherit" ? block.contentWidth : current.layout.contentWidth;
|
|
202
223
|
current.layout.sectionPaddingX = block.sectionPaddingX === "none" || block.sectionPaddingX === "sm" || block.sectionPaddingX === "md" || block.sectionPaddingX === "lg" || block.sectionPaddingX === "inherit" ? block.sectionPaddingX : current.layout.sectionPaddingX;
|
|
203
224
|
current.layout.sectionPaddingY = block.sectionPaddingY === "none" || block.sectionPaddingY === "sm" || block.sectionPaddingY === "lg" ? block.sectionPaddingY : current.layout.sectionPaddingY;
|
|
@@ -234,15 +255,28 @@ var legacyBlockToV2Settings = (block) => {
|
|
|
234
255
|
current.media.positionX = parsePercent(block.imagePositionX ?? block.backgroundImagePositionX);
|
|
235
256
|
current.media.positionY = parsePercent(block.imagePositionY ?? block.backgroundImagePositionY);
|
|
236
257
|
current.media.height = parsePixel(block.imageHeight);
|
|
237
|
-
current.typography.headingAlign = block.textHeadingAlign
|
|
238
|
-
current.typography.bodyAlign = block.textBodyAlign
|
|
258
|
+
current.typography.headingAlign = isTextAlign(block.textHeadingAlign) ? block.textHeadingAlign : current.typography.headingAlign;
|
|
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);
|
|
239
262
|
current.typography.maxTextWidth = block.textMaxWidth === "auto" || block.textMaxWidth === "sm" || block.textMaxWidth === "md" || block.textMaxWidth === "lg" || block.textMaxWidth === "full" ? block.textMaxWidth : current.typography.maxTextWidth;
|
|
240
263
|
current.typography.lineHeightPreset = block.textLineHeightPreset === "tight" || block.textLineHeightPreset === "normal" || block.textLineHeightPreset === "relaxed" ? block.textLineHeightPreset : current.typography.lineHeightPreset;
|
|
241
264
|
current.typography.letterSpacingPreset = block.textLetterSpacingPreset === "tight" || block.textLetterSpacingPreset === "normal" || block.textLetterSpacingPreset === "relaxed" ? block.textLetterSpacingPreset : current.typography.letterSpacingPreset;
|
|
242
265
|
current.advanced.editCopyInPanel = Boolean(block.editCopyInPanel ?? current.advanced.editCopyInPanel);
|
|
243
266
|
current.advanced.customClassName = typeof block.customClassName === "string" ? block.customClassName : current.advanced.customClassName;
|
|
244
267
|
current.advanced.hideOnMobile = Boolean(block.hideOnMobile ?? current.advanced.hideOnMobile);
|
|
245
|
-
|
|
268
|
+
const settings = mergeSettings(current, block.settings);
|
|
269
|
+
if (block.blockType === "hero") {
|
|
270
|
+
const top = settings.layout.paddingTopPt;
|
|
271
|
+
const bottom = settings.layout.paddingBottomPt;
|
|
272
|
+
const hasLegacyLinkedHeroPadding = settings.layout.linkVerticalPadding !== false && (top === null || typeof top === "undefined" || top === 30) && (bottom === null || typeof bottom === "undefined" || bottom === 30 || bottom === 20);
|
|
273
|
+
if (hasLegacyLinkedHeroPadding) {
|
|
274
|
+
settings.layout.linkVerticalPadding = false;
|
|
275
|
+
settings.layout.paddingTopPt = 30;
|
|
276
|
+
settings.layout.paddingBottomPt = 20;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
return settings;
|
|
246
280
|
};
|
|
247
281
|
var v2SettingsToLegacyBlock = (blockWithSettings) => {
|
|
248
282
|
const settings = legacyBlockToV2Settings(blockWithSettings);
|
|
@@ -268,6 +302,8 @@ var v2SettingsToLegacyBlock = (blockWithSettings) => {
|
|
|
268
302
|
next.contentGradientAngle = settings.appearance.contentGradientAngle;
|
|
269
303
|
next.textHeadingAlign = settings.typography.headingAlign;
|
|
270
304
|
next.textBodyAlign = settings.typography.bodyAlign;
|
|
305
|
+
next.textHeadingSizePt = settings.typography.headingSizePt;
|
|
306
|
+
next.textBodySizePt = settings.typography.bodySizePt;
|
|
271
307
|
next.textMaxWidth = settings.typography.maxTextWidth;
|
|
272
308
|
next.textLineHeightPreset = settings.typography.lineHeightPreset;
|
|
273
309
|
next.textLetterSpacingPreset = settings.typography.letterSpacingPreset;
|
|
@@ -364,8 +400,52 @@ var alignOptions = [
|
|
|
364
400
|
{ label: "Right", value: "right" },
|
|
365
401
|
{ label: "Justify", value: "justify" }
|
|
366
402
|
];
|
|
367
|
-
var layoutFieldSet = [
|
|
403
|
+
var layoutFieldSet = [
|
|
404
|
+
{
|
|
405
|
+
group: "layout",
|
|
406
|
+
key: "settings.layout.linkVerticalPadding",
|
|
407
|
+
label: "Link Top/Bottom Padding",
|
|
408
|
+
tags: ["spacing", "padding", "vertical"],
|
|
409
|
+
type: "checkbox"
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
group: "layout",
|
|
413
|
+
key: "settings.layout.paddingTopPt",
|
|
414
|
+
label: "Top Padding (pt)",
|
|
415
|
+
max: 240,
|
|
416
|
+
min: 0,
|
|
417
|
+
tags: ["spacing", "padding", "top"],
|
|
418
|
+
type: "number"
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
group: "layout",
|
|
422
|
+
key: "settings.layout.paddingBottomPt",
|
|
423
|
+
label: "Bottom Padding (pt)",
|
|
424
|
+
max: 240,
|
|
425
|
+
min: 0,
|
|
426
|
+
tags: ["spacing", "padding", "bottom"],
|
|
427
|
+
type: "number"
|
|
428
|
+
}
|
|
429
|
+
];
|
|
368
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
|
+
},
|
|
369
449
|
{
|
|
370
450
|
group: "typography",
|
|
371
451
|
key: "settings.typography.headingAlign",
|
|
@@ -582,6 +662,13 @@ var inspectorDefinitionByBlockType = {
|
|
|
582
662
|
{ group: "basics", inlineEditable: true, key: "kicker", label: "Kicker", type: "text" },
|
|
583
663
|
{ group: "basics", inlineEditable: true, key: "headline", label: "Headline", type: "text" },
|
|
584
664
|
{ group: "basics", inlineEditable: true, key: "subheadline", label: "Subheadline", type: "textarea" },
|
|
665
|
+
{
|
|
666
|
+
group: "basics",
|
|
667
|
+
key: "settings.marquee.itemsText",
|
|
668
|
+
label: "Scrolling Bar Options",
|
|
669
|
+
tags: ["marquee", "scrolling", "bar", "categories"],
|
|
670
|
+
type: "textarea"
|
|
671
|
+
},
|
|
585
672
|
{
|
|
586
673
|
group: "basics",
|
|
587
674
|
key: "variant",
|
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
pageStudioModuleManifest,
|
|
8
8
|
resolveBuilderThemeTokens,
|
|
9
9
|
toEditorInitialDoc
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-NGLIA2OE.mjs";
|
|
11
11
|
import "../chunk-OQSEJXC4.mjs";
|
|
12
12
|
import {
|
|
13
13
|
createDefaultStudioDocument,
|
|
14
14
|
defaultBuilderThemeTokens,
|
|
15
15
|
layoutToStudioDocument,
|
|
16
16
|
studioDocumentToLayout
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-7ZMXZRBP.mjs";
|
|
18
18
|
import "../chunk-ADIIWIYL.mjs";
|
|
19
19
|
import "../chunk-6BWS3CLP.mjs";
|
|
20
20
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orion-studios/payload-studio",
|
|
3
|
-
"version": "0.6.0-beta.
|
|
3
|
+
"version": "0.6.0-beta.130",
|
|
4
4
|
"description": "Base CMS, builder, and custom admin toolkit for Orion Studios websites",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -44,6 +44,19 @@
|
|
|
44
44
|
"import": "./dist/blocks/index.mjs",
|
|
45
45
|
"default": "./dist/blocks/index.mjs"
|
|
46
46
|
},
|
|
47
|
+
"./builder-v2": {
|
|
48
|
+
"types": "./dist/builder-v2/index.d.ts",
|
|
49
|
+
"require": "./dist/builder-v2/index.js",
|
|
50
|
+
"import": "./dist/builder-v2/index.mjs",
|
|
51
|
+
"default": "./dist/builder-v2/index.mjs"
|
|
52
|
+
},
|
|
53
|
+
"./builder-v2/client": {
|
|
54
|
+
"types": "./dist/builder-v2/client.d.ts",
|
|
55
|
+
"require": "./dist/builder-v2/client.js",
|
|
56
|
+
"import": "./dist/builder-v2/client.mjs",
|
|
57
|
+
"default": "./dist/builder-v2/client.mjs"
|
|
58
|
+
},
|
|
59
|
+
"./builder-v2/styles.css": "./dist/builder-v2/styles.css",
|
|
47
60
|
"./nextjs": {
|
|
48
61
|
"types": "./dist/nextjs/index.d.ts",
|
|
49
62
|
"require": "./dist/nextjs/index.js",
|
|
@@ -77,7 +90,7 @@
|
|
|
77
90
|
"scripts": {
|
|
78
91
|
"build": "tsup && node scripts/copy-assets.mjs",
|
|
79
92
|
"dev": "tsup --watch",
|
|
80
|
-
"test": "tsx --test src/shared/__tests__/*.test.ts src/studio-pages/builder/settings-v2/__tests__/*.test.ts src/studio-pages/__tests__/*.test.ts",
|
|
93
|
+
"test": "tsx --test src/shared/__tests__/*.test.ts src/studio-pages/builder/settings-v2/__tests__/*.test.ts src/studio-pages/__tests__/*.test.ts src/builder-v2/__tests__/*.test.ts",
|
|
81
94
|
"typecheck": "tsc --noEmit"
|
|
82
95
|
},
|
|
83
96
|
"overrides": {
|
|
@@ -101,6 +114,7 @@
|
|
|
101
114
|
"sideEffects": [
|
|
102
115
|
"./dist/admin.css",
|
|
103
116
|
"./dist/admin-app/styles.css",
|
|
117
|
+
"./dist/builder-v2/styles.css",
|
|
104
118
|
"./dist/studio-pages/builder.css"
|
|
105
119
|
],
|
|
106
120
|
"peerDependencies": {
|
|
@@ -117,10 +131,15 @@
|
|
|
117
131
|
"@types/node": "^22.0.0",
|
|
118
132
|
"@types/react": "^19.0.0",
|
|
119
133
|
"@types/react-dom": "^19.0.0",
|
|
134
|
+
"@types/sanitize-html": "^2.16.1",
|
|
120
135
|
"next": "16.2.0",
|
|
121
136
|
"payload": "3.75.0",
|
|
122
|
-
"tsx": "^4.21.0",
|
|
123
137
|
"tsup": "^8.0.0",
|
|
138
|
+
"tsx": "^4.21.0",
|
|
124
139
|
"typescript": "^5.3.0"
|
|
140
|
+
},
|
|
141
|
+
"dependencies": {
|
|
142
|
+
"grapesjs": "^0.22.16",
|
|
143
|
+
"sanitize-html": "^2.17.3"
|
|
125
144
|
}
|
|
126
145
|
}
|