@orion-studios/payload-studio 0.6.0-beta.20 → 0.6.0-beta.22
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 +193 -170
- package/dist/admin/client.mjs +198 -175
- package/dist/admin/index.js +37 -25
- package/dist/admin/index.mjs +1 -1
- package/dist/{chunk-3AHBR7RI.mjs → chunk-JC3UV74N.mjs} +37 -25
- package/dist/index.js +37 -25
- package/dist/index.mjs +1 -1
- package/dist/studio-pages/builder.css +6 -0
- package/dist/studio-pages/client.js +19 -4
- package/dist/studio-pages/client.mjs +19 -4
- package/package.json +1 -1
|
@@ -378,6 +378,7 @@ function configureAdmin(config) {
|
|
|
378
378
|
},
|
|
379
379
|
...studioEnabled ? {
|
|
380
380
|
studioGlobals: {
|
|
381
|
+
exact: true,
|
|
381
382
|
path: globalsBasePath,
|
|
382
383
|
Component: {
|
|
383
384
|
exportName: "AdminStudioGlobalsView",
|
|
@@ -389,10 +390,11 @@ function configureAdmin(config) {
|
|
|
389
390
|
}
|
|
390
391
|
}
|
|
391
392
|
},
|
|
392
|
-
|
|
393
|
-
|
|
393
|
+
studioPageNew: {
|
|
394
|
+
exact: true,
|
|
395
|
+
path: `${pagesBasePath}/new`,
|
|
394
396
|
Component: {
|
|
395
|
-
exportName: "
|
|
397
|
+
exportName: "AdminStudioNewPageView",
|
|
396
398
|
path: clientPath,
|
|
397
399
|
clientProps: {
|
|
398
400
|
...studioNavClientProps,
|
|
@@ -401,6 +403,7 @@ function configureAdmin(config) {
|
|
|
401
403
|
}
|
|
402
404
|
},
|
|
403
405
|
studioPageEditor: {
|
|
406
|
+
exact: true,
|
|
404
407
|
path: `${pagesBasePath}/:id`,
|
|
405
408
|
Component: {
|
|
406
409
|
exportName: "AdminStudioPageEditView",
|
|
@@ -411,10 +414,11 @@ function configureAdmin(config) {
|
|
|
411
414
|
}
|
|
412
415
|
}
|
|
413
416
|
},
|
|
414
|
-
|
|
415
|
-
|
|
417
|
+
studioPages: {
|
|
418
|
+
exact: true,
|
|
419
|
+
path: pagesBasePath,
|
|
416
420
|
Component: {
|
|
417
|
-
exportName: "
|
|
421
|
+
exportName: "AdminStudioPagesListView",
|
|
418
422
|
path: clientPath,
|
|
419
423
|
clientProps: {
|
|
420
424
|
...studioNavClientProps,
|
|
@@ -423,6 +427,7 @@ function configureAdmin(config) {
|
|
|
423
427
|
}
|
|
424
428
|
},
|
|
425
429
|
studioContactForm: {
|
|
430
|
+
exact: true,
|
|
426
431
|
path: contactFormStudioPath,
|
|
427
432
|
Component: {
|
|
428
433
|
exportName: "AdminStudioContactFormView",
|
|
@@ -435,20 +440,8 @@ function configureAdmin(config) {
|
|
|
435
440
|
}
|
|
436
441
|
},
|
|
437
442
|
...formsEnabled ? {
|
|
438
|
-
studioForms: {
|
|
439
|
-
path: formsBasePath,
|
|
440
|
-
Component: {
|
|
441
|
-
exportName: "AdminStudioFormsView",
|
|
442
|
-
path: clientPath,
|
|
443
|
-
clientProps: {
|
|
444
|
-
...studioNavClientProps,
|
|
445
|
-
formsCollectionSlug,
|
|
446
|
-
formSubmissionsCollectionSlug,
|
|
447
|
-
formUploadsCollectionSlug
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
},
|
|
451
443
|
studioFormSubmission: {
|
|
444
|
+
exact: true,
|
|
452
445
|
path: `${formsBasePath}/submissions/:id`,
|
|
453
446
|
Component: {
|
|
454
447
|
exportName: "AdminStudioFormSubmissionView",
|
|
@@ -462,6 +455,7 @@ function configureAdmin(config) {
|
|
|
462
455
|
}
|
|
463
456
|
},
|
|
464
457
|
studioFormUpload: {
|
|
458
|
+
exact: true,
|
|
465
459
|
path: `${formsBasePath}/uploads/:id`,
|
|
466
460
|
Component: {
|
|
467
461
|
exportName: "AdminStudioFormUploadView",
|
|
@@ -473,6 +467,7 @@ function configureAdmin(config) {
|
|
|
473
467
|
}
|
|
474
468
|
},
|
|
475
469
|
studioFormDetail: {
|
|
470
|
+
exact: true,
|
|
476
471
|
path: `${formsBasePath}/:id`,
|
|
477
472
|
Component: {
|
|
478
473
|
exportName: "AdminStudioFormDetailView",
|
|
@@ -483,12 +478,27 @@ function configureAdmin(config) {
|
|
|
483
478
|
formSubmissionsCollectionSlug
|
|
484
479
|
}
|
|
485
480
|
}
|
|
481
|
+
},
|
|
482
|
+
studioForms: {
|
|
483
|
+
exact: true,
|
|
484
|
+
path: formsBasePath,
|
|
485
|
+
Component: {
|
|
486
|
+
exportName: "AdminStudioFormsView",
|
|
487
|
+
path: clientPath,
|
|
488
|
+
clientProps: {
|
|
489
|
+
...studioNavClientProps,
|
|
490
|
+
formsCollectionSlug,
|
|
491
|
+
formSubmissionsCollectionSlug,
|
|
492
|
+
formUploadsCollectionSlug
|
|
493
|
+
}
|
|
494
|
+
}
|
|
486
495
|
}
|
|
487
496
|
} : {},
|
|
488
|
-
|
|
489
|
-
|
|
497
|
+
studioMediaItem: {
|
|
498
|
+
exact: true,
|
|
499
|
+
path: `${mediaBasePath}/:id`,
|
|
490
500
|
Component: {
|
|
491
|
-
exportName: "
|
|
501
|
+
exportName: "AdminStudioMediaItemView",
|
|
492
502
|
path: clientPath,
|
|
493
503
|
clientProps: {
|
|
494
504
|
...studioNavClientProps,
|
|
@@ -496,10 +506,11 @@ function configureAdmin(config) {
|
|
|
496
506
|
}
|
|
497
507
|
}
|
|
498
508
|
},
|
|
499
|
-
|
|
500
|
-
|
|
509
|
+
studioMedia: {
|
|
510
|
+
exact: true,
|
|
511
|
+
path: mediaBasePath,
|
|
501
512
|
Component: {
|
|
502
|
-
exportName: "
|
|
513
|
+
exportName: "AdminStudioMediaView",
|
|
503
514
|
path: clientPath,
|
|
504
515
|
clientProps: {
|
|
505
516
|
...studioNavClientProps,
|
|
@@ -508,6 +519,7 @@ function configureAdmin(config) {
|
|
|
508
519
|
}
|
|
509
520
|
},
|
|
510
521
|
studioTools: {
|
|
522
|
+
exact: true,
|
|
511
523
|
path: toolsBasePath,
|
|
512
524
|
Component: {
|
|
513
525
|
exportName: "AdminStudioToolsView",
|
package/dist/index.js
CHANGED
|
@@ -433,6 +433,7 @@ function configureAdmin(config) {
|
|
|
433
433
|
},
|
|
434
434
|
...studioEnabled ? {
|
|
435
435
|
studioGlobals: {
|
|
436
|
+
exact: true,
|
|
436
437
|
path: globalsBasePath,
|
|
437
438
|
Component: {
|
|
438
439
|
exportName: "AdminStudioGlobalsView",
|
|
@@ -444,10 +445,11 @@ function configureAdmin(config) {
|
|
|
444
445
|
}
|
|
445
446
|
}
|
|
446
447
|
},
|
|
447
|
-
|
|
448
|
-
|
|
448
|
+
studioPageNew: {
|
|
449
|
+
exact: true,
|
|
450
|
+
path: `${pagesBasePath}/new`,
|
|
449
451
|
Component: {
|
|
450
|
-
exportName: "
|
|
452
|
+
exportName: "AdminStudioNewPageView",
|
|
451
453
|
path: clientPath,
|
|
452
454
|
clientProps: {
|
|
453
455
|
...studioNavClientProps,
|
|
@@ -456,6 +458,7 @@ function configureAdmin(config) {
|
|
|
456
458
|
}
|
|
457
459
|
},
|
|
458
460
|
studioPageEditor: {
|
|
461
|
+
exact: true,
|
|
459
462
|
path: `${pagesBasePath}/:id`,
|
|
460
463
|
Component: {
|
|
461
464
|
exportName: "AdminStudioPageEditView",
|
|
@@ -466,10 +469,11 @@ function configureAdmin(config) {
|
|
|
466
469
|
}
|
|
467
470
|
}
|
|
468
471
|
},
|
|
469
|
-
|
|
470
|
-
|
|
472
|
+
studioPages: {
|
|
473
|
+
exact: true,
|
|
474
|
+
path: pagesBasePath,
|
|
471
475
|
Component: {
|
|
472
|
-
exportName: "
|
|
476
|
+
exportName: "AdminStudioPagesListView",
|
|
473
477
|
path: clientPath,
|
|
474
478
|
clientProps: {
|
|
475
479
|
...studioNavClientProps,
|
|
@@ -478,6 +482,7 @@ function configureAdmin(config) {
|
|
|
478
482
|
}
|
|
479
483
|
},
|
|
480
484
|
studioContactForm: {
|
|
485
|
+
exact: true,
|
|
481
486
|
path: contactFormStudioPath,
|
|
482
487
|
Component: {
|
|
483
488
|
exportName: "AdminStudioContactFormView",
|
|
@@ -490,20 +495,8 @@ function configureAdmin(config) {
|
|
|
490
495
|
}
|
|
491
496
|
},
|
|
492
497
|
...formsEnabled ? {
|
|
493
|
-
studioForms: {
|
|
494
|
-
path: formsBasePath,
|
|
495
|
-
Component: {
|
|
496
|
-
exportName: "AdminStudioFormsView",
|
|
497
|
-
path: clientPath,
|
|
498
|
-
clientProps: {
|
|
499
|
-
...studioNavClientProps,
|
|
500
|
-
formsCollectionSlug,
|
|
501
|
-
formSubmissionsCollectionSlug,
|
|
502
|
-
formUploadsCollectionSlug
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
},
|
|
506
498
|
studioFormSubmission: {
|
|
499
|
+
exact: true,
|
|
507
500
|
path: `${formsBasePath}/submissions/:id`,
|
|
508
501
|
Component: {
|
|
509
502
|
exportName: "AdminStudioFormSubmissionView",
|
|
@@ -517,6 +510,7 @@ function configureAdmin(config) {
|
|
|
517
510
|
}
|
|
518
511
|
},
|
|
519
512
|
studioFormUpload: {
|
|
513
|
+
exact: true,
|
|
520
514
|
path: `${formsBasePath}/uploads/:id`,
|
|
521
515
|
Component: {
|
|
522
516
|
exportName: "AdminStudioFormUploadView",
|
|
@@ -528,6 +522,7 @@ function configureAdmin(config) {
|
|
|
528
522
|
}
|
|
529
523
|
},
|
|
530
524
|
studioFormDetail: {
|
|
525
|
+
exact: true,
|
|
531
526
|
path: `${formsBasePath}/:id`,
|
|
532
527
|
Component: {
|
|
533
528
|
exportName: "AdminStudioFormDetailView",
|
|
@@ -538,12 +533,27 @@ function configureAdmin(config) {
|
|
|
538
533
|
formSubmissionsCollectionSlug
|
|
539
534
|
}
|
|
540
535
|
}
|
|
536
|
+
},
|
|
537
|
+
studioForms: {
|
|
538
|
+
exact: true,
|
|
539
|
+
path: formsBasePath,
|
|
540
|
+
Component: {
|
|
541
|
+
exportName: "AdminStudioFormsView",
|
|
542
|
+
path: clientPath,
|
|
543
|
+
clientProps: {
|
|
544
|
+
...studioNavClientProps,
|
|
545
|
+
formsCollectionSlug,
|
|
546
|
+
formSubmissionsCollectionSlug,
|
|
547
|
+
formUploadsCollectionSlug
|
|
548
|
+
}
|
|
549
|
+
}
|
|
541
550
|
}
|
|
542
551
|
} : {},
|
|
543
|
-
|
|
544
|
-
|
|
552
|
+
studioMediaItem: {
|
|
553
|
+
exact: true,
|
|
554
|
+
path: `${mediaBasePath}/:id`,
|
|
545
555
|
Component: {
|
|
546
|
-
exportName: "
|
|
556
|
+
exportName: "AdminStudioMediaItemView",
|
|
547
557
|
path: clientPath,
|
|
548
558
|
clientProps: {
|
|
549
559
|
...studioNavClientProps,
|
|
@@ -551,10 +561,11 @@ function configureAdmin(config) {
|
|
|
551
561
|
}
|
|
552
562
|
}
|
|
553
563
|
},
|
|
554
|
-
|
|
555
|
-
|
|
564
|
+
studioMedia: {
|
|
565
|
+
exact: true,
|
|
566
|
+
path: mediaBasePath,
|
|
556
567
|
Component: {
|
|
557
|
-
exportName: "
|
|
568
|
+
exportName: "AdminStudioMediaView",
|
|
558
569
|
path: clientPath,
|
|
559
570
|
clientProps: {
|
|
560
571
|
...studioNavClientProps,
|
|
@@ -563,6 +574,7 @@ function configureAdmin(config) {
|
|
|
563
574
|
}
|
|
564
575
|
},
|
|
565
576
|
studioTools: {
|
|
577
|
+
exact: true,
|
|
566
578
|
path: toolsBasePath,
|
|
567
579
|
Component: {
|
|
568
580
|
exportName: "AdminStudioToolsView",
|
package/dist/index.mjs
CHANGED
|
@@ -116,6 +116,12 @@ h4 {
|
|
|
116
116
|
--orion-shell-max: 100%;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
+
@media (max-width: 767px) {
|
|
120
|
+
.orion-builder-hide-mobile {
|
|
121
|
+
display: none !important;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
119
125
|
.orion-builder-content {
|
|
120
126
|
width: min(var(--orion-shell-max), calc(100% - (var(--orion-shell-inline) * 2)));
|
|
121
127
|
margin-inline: auto;
|
|
@@ -3883,6 +3883,12 @@ function getThemeColorOverride(tokens, colorKey) {
|
|
|
3883
3883
|
const normalized = value.trim();
|
|
3884
3884
|
return normalized.length > 0 ? normalized : null;
|
|
3885
3885
|
}
|
|
3886
|
+
function normalizeCustomClassName(value) {
|
|
3887
|
+
if (typeof value !== "string") {
|
|
3888
|
+
return "";
|
|
3889
|
+
}
|
|
3890
|
+
return value.split(/\s+/).map((className) => className.trim()).filter(Boolean).join(" ");
|
|
3891
|
+
}
|
|
3886
3892
|
var sectionStyleFromBlock = (block, pageDefaults) => {
|
|
3887
3893
|
const settings = isRecord6(block.settings) ? block.settings : {};
|
|
3888
3894
|
const layoutSettings = isRecord6(settings.layout) ? settings.layout : {};
|
|
@@ -4702,6 +4708,7 @@ function BuilderPageEditor({
|
|
|
4702
4708
|
const inheritProjectStyles = options?.inheritProjectStyles === true;
|
|
4703
4709
|
const shell = sectionStyleFromBlock(block, pageDefaults);
|
|
4704
4710
|
const blockSettings = isRecord6(block.settings) ? block.settings : {};
|
|
4711
|
+
const blockAdvanced = isRecord6(blockSettings.advanced) ? blockSettings.advanced : {};
|
|
4705
4712
|
const blockTypography = isRecord6(blockSettings.typography) ? blockSettings.typography : {};
|
|
4706
4713
|
const blockTheme = isRecord6(blockSettings.theme) ? blockSettings.theme : {};
|
|
4707
4714
|
const heroBackgroundColor = normalizeText2(block.backgroundColor).trim();
|
|
@@ -4719,16 +4726,24 @@ function BuilderPageEditor({
|
|
|
4719
4726
|
const headingAlign = blockTypography.headingAlign === "center" || blockTypography.headingAlign === "justify" || blockTypography.headingAlign === "right" ? blockTypography.headingAlign : "left";
|
|
4720
4727
|
const headingColor = getThemeColorOverride(blockTheme, "headingText") || getThemeColorOverride(pageDefaults.themePage, "headingText") || getThemeColorOverride(siteThemeTokens, "headingText") || heroTextColor || resolvedThemeTokens.colors.headingText;
|
|
4721
4728
|
const bodyColor = getThemeColorOverride(blockTheme, "bodyText") || getThemeColorOverride(pageDefaults.themePage, "bodyText") || getThemeColorOverride(siteThemeTokens, "bodyText") || heroTextColor || resolvedThemeTokens.colors.bodyText;
|
|
4722
|
-
|
|
4729
|
+
const customClassName = normalizeCustomClassName(blockAdvanced.customClassName ?? block.customClassName);
|
|
4730
|
+
const hideOnMobile = Boolean(blockAdvanced.hideOnMobile ?? block.hideOnMobile);
|
|
4731
|
+
const sectionClassName = [
|
|
4732
|
+
className,
|
|
4733
|
+
shell.sectionClass,
|
|
4734
|
+
customClassName,
|
|
4735
|
+
hideOnMobile ? "orion-builder-hide-mobile" : ""
|
|
4736
|
+
].filter(Boolean).join(" ");
|
|
4737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("section", { className: sectionClassName, style: shell.sectionStyle, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { style: shell.sectionInnerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
4723
4738
|
"div",
|
|
4724
4739
|
{
|
|
4725
4740
|
className: shell.contentClass,
|
|
4726
4741
|
style: {
|
|
4727
4742
|
...shell.contentStyle,
|
|
4743
|
+
"--orion-builder-heading-align": headingAlign,
|
|
4744
|
+
"--orion-builder-body-align": bodyAlign,
|
|
4745
|
+
"--orion-builder-actions-align": bodyAlign === "center" ? "center" : bodyAlign === "right" ? "flex-end" : "flex-start",
|
|
4728
4746
|
...inheritProjectStyles ? {} : {
|
|
4729
|
-
"--orion-builder-heading-align": headingAlign,
|
|
4730
|
-
"--orion-builder-body-align": bodyAlign,
|
|
4731
|
-
"--orion-builder-actions-align": bodyAlign === "center" ? "center" : bodyAlign === "right" ? "flex-end" : "flex-start",
|
|
4732
4747
|
"--orion-builder-heading-color": headingColor,
|
|
4733
4748
|
color: bodyColor,
|
|
4734
4749
|
...typographyStyle
|
|
@@ -3763,6 +3763,12 @@ function getThemeColorOverride(tokens, colorKey) {
|
|
|
3763
3763
|
const normalized = value.trim();
|
|
3764
3764
|
return normalized.length > 0 ? normalized : null;
|
|
3765
3765
|
}
|
|
3766
|
+
function normalizeCustomClassName(value) {
|
|
3767
|
+
if (typeof value !== "string") {
|
|
3768
|
+
return "";
|
|
3769
|
+
}
|
|
3770
|
+
return value.split(/\s+/).map((className) => className.trim()).filter(Boolean).join(" ");
|
|
3771
|
+
}
|
|
3766
3772
|
var sectionStyleFromBlock = (block, pageDefaults) => {
|
|
3767
3773
|
const settings = isRecord6(block.settings) ? block.settings : {};
|
|
3768
3774
|
const layoutSettings = isRecord6(settings.layout) ? settings.layout : {};
|
|
@@ -4582,6 +4588,7 @@ function BuilderPageEditor({
|
|
|
4582
4588
|
const inheritProjectStyles = options?.inheritProjectStyles === true;
|
|
4583
4589
|
const shell = sectionStyleFromBlock(block, pageDefaults);
|
|
4584
4590
|
const blockSettings = isRecord6(block.settings) ? block.settings : {};
|
|
4591
|
+
const blockAdvanced = isRecord6(blockSettings.advanced) ? blockSettings.advanced : {};
|
|
4585
4592
|
const blockTypography = isRecord6(blockSettings.typography) ? blockSettings.typography : {};
|
|
4586
4593
|
const blockTheme = isRecord6(blockSettings.theme) ? blockSettings.theme : {};
|
|
4587
4594
|
const heroBackgroundColor = normalizeText2(block.backgroundColor).trim();
|
|
@@ -4599,16 +4606,24 @@ function BuilderPageEditor({
|
|
|
4599
4606
|
const headingAlign = blockTypography.headingAlign === "center" || blockTypography.headingAlign === "justify" || blockTypography.headingAlign === "right" ? blockTypography.headingAlign : "left";
|
|
4600
4607
|
const headingColor = getThemeColorOverride(blockTheme, "headingText") || getThemeColorOverride(pageDefaults.themePage, "headingText") || getThemeColorOverride(siteThemeTokens, "headingText") || heroTextColor || resolvedThemeTokens.colors.headingText;
|
|
4601
4608
|
const bodyColor = getThemeColorOverride(blockTheme, "bodyText") || getThemeColorOverride(pageDefaults.themePage, "bodyText") || getThemeColorOverride(siteThemeTokens, "bodyText") || heroTextColor || resolvedThemeTokens.colors.bodyText;
|
|
4602
|
-
|
|
4609
|
+
const customClassName = normalizeCustomClassName(blockAdvanced.customClassName ?? block.customClassName);
|
|
4610
|
+
const hideOnMobile = Boolean(blockAdvanced.hideOnMobile ?? block.hideOnMobile);
|
|
4611
|
+
const sectionClassName = [
|
|
4612
|
+
className,
|
|
4613
|
+
shell.sectionClass,
|
|
4614
|
+
customClassName,
|
|
4615
|
+
hideOnMobile ? "orion-builder-hide-mobile" : ""
|
|
4616
|
+
].filter(Boolean).join(" ");
|
|
4617
|
+
return /* @__PURE__ */ jsx13("section", { className: sectionClassName, style: shell.sectionStyle, children: /* @__PURE__ */ jsx13("div", { style: shell.sectionInnerStyle, children: /* @__PURE__ */ jsx13(
|
|
4603
4618
|
"div",
|
|
4604
4619
|
{
|
|
4605
4620
|
className: shell.contentClass,
|
|
4606
4621
|
style: {
|
|
4607
4622
|
...shell.contentStyle,
|
|
4623
|
+
"--orion-builder-heading-align": headingAlign,
|
|
4624
|
+
"--orion-builder-body-align": bodyAlign,
|
|
4625
|
+
"--orion-builder-actions-align": bodyAlign === "center" ? "center" : bodyAlign === "right" ? "flex-end" : "flex-start",
|
|
4608
4626
|
...inheritProjectStyles ? {} : {
|
|
4609
|
-
"--orion-builder-heading-align": headingAlign,
|
|
4610
|
-
"--orion-builder-body-align": bodyAlign,
|
|
4611
|
-
"--orion-builder-actions-align": bodyAlign === "center" ? "center" : bodyAlign === "right" ? "flex-end" : "flex-start",
|
|
4612
4627
|
"--orion-builder-heading-color": headingColor,
|
|
4613
4628
|
color: bodyColor,
|
|
4614
4629
|
...typographyStyle
|
package/package.json
CHANGED