payload-canvas 0.6.3 → 0.6.5
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/LICENSE +21 -21
- package/README.md +3237 -3236
- package/dist/admin/aiKeyField.scss +58 -58
- package/dist/admin/diff/layoutDiff.scss +181 -181
- package/dist/admin/editor/assistant/assistant.scss +944 -944
- package/dist/admin/editor/classes/manager.scss +262 -262
- package/dist/admin/editor/comments/comments.scss +539 -539
- package/dist/admin/editor/dnd/dnd.scss +261 -261
- package/dist/admin/editor/editor.scss +2629 -2629
- package/dist/admin/editor/empty/empty.scss +92 -92
- package/dist/admin/editor/fields/fields.scss +778 -778
- package/dist/admin/editor/generate/generate.scss +276 -276
- package/dist/admin/editor/layout/layout.scss +240 -240
- package/dist/admin/editor/live/presence.scss +24 -24
- package/dist/admin/editor/locale/locale.scss +154 -154
- package/dist/admin/editor/media/media.scss +233 -233
- package/dist/admin/editor/menu/menu.scss +132 -132
- package/dist/admin/editor/motion/motion.scss +84 -84
- package/dist/admin/editor/sections/components.scss +238 -238
- package/dist/admin/editor/sections/variants.scss +90 -90
- package/dist/admin/editor/styles/ClassCss.js +3 -3
- package/dist/admin/editor/styles/classes.scss +381 -381
- package/dist/admin/editor/styles/styles.scss +1123 -1123
- package/dist/admin/editor/styles/tokens.js +2 -1
- package/dist/admin/editor/templates/templates.scss +654 -654
- package/dist/admin/editor/tooltip/tooltip.scss +39 -39
- package/dist/admin/editor/topbar/DocumentActions.js +1 -1
- package/dist/admin/editor/topbar/TopBar.js +2 -1
- package/dist/admin/editor/topbar/contentMode.scss +26 -26
- package/dist/admin/editor/topbar/screens/screens.scss +134 -134
- package/dist/admin/editor/topbar/settingsDrawer.scss +32 -32
- package/dist/admin/editor/topbar/tabTitle.d.ts +6 -0
- package/dist/admin/editor/topbar/tabTitle.js +9 -0
- package/dist/admin/editor/topbar/topbar.scss +645 -645
- package/dist/admin/editor/ui/controls.scss +320 -320
- package/dist/admin/forms/submissions.scss +197 -197
- package/dist/admin/layoutField.scss +69 -69
- package/dist/admin/templateConditions.scss +24 -24
- package/dist/ai/prompt.js +40 -40
- package/dist/blocks/client/marquee.js +14 -14
- package/dist/blocks/payload.js +13 -3
- package/dist/core/payloadBlocks.js +10 -1
- package/dist/core/responseError.d.ts +5 -0
- package/dist/core/responseError.js +8 -0
- package/dist/core/sections.d.ts +2 -0
- package/dist/core/sections.js +8 -0
- package/dist/css/index.d.ts +6 -0
- package/dist/css/index.js +40 -1
- package/dist/css/shared.js +2 -2
- package/dist/live/session.js +18 -0
- package/dist/live/storage.d.ts +5 -0
- package/dist/live/storage.js +20 -0
- package/dist/mcp/index.js +46 -19
- package/dist/mcp/shared.js +16 -16
- package/dist/plugin/index.d.ts +21 -1
- package/dist/plugin/index.js +46 -15
- package/dist/react/canvas/BuilderCanvas.js +76 -75
- package/dist/react/canvas/thumbnail/ThumbnailCanvas.js +8 -7
- package/dist/theme/admin/fields.scss +363 -363
- package/package.json +1 -1
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
// The editor tooltip (`Tooltips.tsx`). It lives in `<body>`, outside the editor root, so it uses
|
|
2
|
-
// Payload's theme variables only.
|
|
3
|
-
|
|
4
|
-
@layer payload-default {
|
|
5
|
-
@keyframes builder-tooltip-in {
|
|
6
|
-
from {
|
|
7
|
-
opacity: 0;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.builder-tooltip {
|
|
12
|
-
position: fixed;
|
|
13
|
-
inset: auto;
|
|
14
|
-
box-sizing: border-box;
|
|
15
|
-
width: max-content;
|
|
16
|
-
max-width: 320px;
|
|
17
|
-
margin: 0;
|
|
18
|
-
padding: 4px 8px;
|
|
19
|
-
overflow: visible;
|
|
20
|
-
border: 0;
|
|
21
|
-
border-radius: var(--style-radius-s, 4px);
|
|
22
|
-
background: var(--theme-elevation-900);
|
|
23
|
-
color: var(--theme-elevation-0);
|
|
24
|
-
font-family: var(--font-body);
|
|
25
|
-
font-size: var(--be-text-s);
|
|
26
|
-
font-weight: var(--be-weight-medium);
|
|
27
|
-
line-height: 16px;
|
|
28
|
-
white-space: pre-line;
|
|
29
|
-
overflow-wrap: anywhere;
|
|
30
|
-
box-shadow: var(--be-shadow);
|
|
31
|
-
pointer-events: none;
|
|
32
|
-
|
|
33
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
34
|
-
&:popover-open {
|
|
35
|
-
animation: builder-tooltip-in 100ms ease both;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
1
|
+
// The editor tooltip (`Tooltips.tsx`). It lives in `<body>`, outside the editor root, so it uses
|
|
2
|
+
// Payload's theme variables only.
|
|
3
|
+
|
|
4
|
+
@layer payload-default {
|
|
5
|
+
@keyframes builder-tooltip-in {
|
|
6
|
+
from {
|
|
7
|
+
opacity: 0;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.builder-tooltip {
|
|
12
|
+
position: fixed;
|
|
13
|
+
inset: auto;
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
width: max-content;
|
|
16
|
+
max-width: 320px;
|
|
17
|
+
margin: 0;
|
|
18
|
+
padding: 4px 8px;
|
|
19
|
+
overflow: visible;
|
|
20
|
+
border: 0;
|
|
21
|
+
border-radius: var(--style-radius-s, 4px);
|
|
22
|
+
background: var(--theme-elevation-900);
|
|
23
|
+
color: var(--theme-elevation-0);
|
|
24
|
+
font-family: var(--font-body);
|
|
25
|
+
font-size: var(--be-text-s);
|
|
26
|
+
font-weight: var(--be-weight-medium);
|
|
27
|
+
line-height: 16px;
|
|
28
|
+
white-space: pre-line;
|
|
29
|
+
overflow-wrap: anywhere;
|
|
30
|
+
box-shadow: var(--be-shadow);
|
|
31
|
+
pointer-events: none;
|
|
32
|
+
|
|
33
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
34
|
+
&:popover-open {
|
|
35
|
+
animation: builder-tooltip-in 100ms ease both;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -61,7 +61,7 @@ export function SaveState() {
|
|
|
61
61
|
connecting: 'Connecting to the live session',
|
|
62
62
|
offline: 'Offline. Your changes are kept in this tab and sent when the connection is back. Do not close the tab.',
|
|
63
63
|
reconnecting: 'The live connection dropped. Reconnecting.',
|
|
64
|
-
failed: `The server could not save ${drafts ? 'the draft' : 'your changes'}: ${saveError?.message ?? 'unknown error'}
|
|
64
|
+
failed: `The server could not save ${drafts ? 'the draft' : 'your changes'}: ${saveError?.message ?? 'unknown error'}
|
|
65
65
|
${saveError?.retrying ? 'It tries again automatically. ' : ''}Your changes are kept on the server.`,
|
|
66
66
|
saving: `Your changes are being saved${asWhat}`,
|
|
67
67
|
saved: `All changes are saved${asWhat}`,
|
|
@@ -22,6 +22,7 @@ import { DocumentTitle, documentTitle, SectionNote, StatusChip } from './Documen
|
|
|
22
22
|
import { PageSettings, PreviewButton, PublishButton, SaveState } from './DocumentActions.js';
|
|
23
23
|
import { ContentModeLabel, PreviewAsClientToggle } from './ContentModeToggle.js';
|
|
24
24
|
import { ScreenDrawer } from './screens/ScreenDrawer.js';
|
|
25
|
+
import { tabTitle } from './tabTitle.js';
|
|
25
26
|
import { useDismiss } from './useDismiss.js';
|
|
26
27
|
import { editViewPath, listViewPath } from '../../../plugin/links.js';
|
|
27
28
|
import { forgetForm } from '../../formChoice.js';
|
|
@@ -71,7 +72,7 @@ export function TopBar({ icon }) {
|
|
|
71
72
|
// refreshes, so the title is applied again whenever the head changes.
|
|
72
73
|
const isSection = doc.section !== null;
|
|
73
74
|
useEffect(() => {
|
|
74
|
-
const wanted =
|
|
75
|
+
const wanted = tabTitle(title, isSection);
|
|
75
76
|
const apply = () => {
|
|
76
77
|
if (document.title !== wanted)
|
|
77
78
|
document.title = wanted;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
// Content mode in the top bar (ContentModeToggle.tsx). Payload CSS variables only, no Tailwind.
|
|
2
|
-
|
|
3
|
-
@layer payload-default {
|
|
4
|
-
// A quiet pill next to the status: it says what this editor can change, not a warning.
|
|
5
|
-
.builder-bar__content-mode {
|
|
6
|
-
display: inline-flex;
|
|
7
|
-
flex: none;
|
|
8
|
-
align-items: center;
|
|
9
|
-
gap: 5px;
|
|
10
|
-
height: 24px;
|
|
11
|
-
margin-left: 4px;
|
|
12
|
-
padding: 0 9px 0 8px;
|
|
13
|
-
border: 1px solid var(--be-border);
|
|
14
|
-
border-radius: 12px;
|
|
15
|
-
color: var(--theme-elevation-800);
|
|
16
|
-
font-size: var(--be-text-s);
|
|
17
|
-
font-weight: var(--be-weight-strong);
|
|
18
|
-
white-space: nowrap;
|
|
19
|
-
cursor: default;
|
|
20
|
-
|
|
21
|
-
svg {
|
|
22
|
-
flex: none;
|
|
23
|
-
color: var(--theme-elevation-600);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
1
|
+
// Content mode in the top bar (ContentModeToggle.tsx). Payload CSS variables only, no Tailwind.
|
|
2
|
+
|
|
3
|
+
@layer payload-default {
|
|
4
|
+
// A quiet pill next to the status: it says what this editor can change, not a warning.
|
|
5
|
+
.builder-bar__content-mode {
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
flex: none;
|
|
8
|
+
align-items: center;
|
|
9
|
+
gap: 5px;
|
|
10
|
+
height: 24px;
|
|
11
|
+
margin-left: 4px;
|
|
12
|
+
padding: 0 9px 0 8px;
|
|
13
|
+
border: 1px solid var(--be-border);
|
|
14
|
+
border-radius: 12px;
|
|
15
|
+
color: var(--theme-elevation-800);
|
|
16
|
+
font-size: var(--be-text-s);
|
|
17
|
+
font-weight: var(--be-weight-strong);
|
|
18
|
+
white-space: nowrap;
|
|
19
|
+
cursor: default;
|
|
20
|
+
|
|
21
|
+
svg {
|
|
22
|
+
flex: none;
|
|
23
|
+
color: var(--theme-elevation-600);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -1,134 +1,134 @@
|
|
|
1
|
-
// Drawers over the builder: Payload's Versions and API screens, and the page settings drawer.
|
|
2
|
-
// They render in Payload's modal container, outside `.builder-editor`, so they use Payload's CSS
|
|
3
|
-
// variables only. No Tailwind.
|
|
4
|
-
|
|
5
|
-
@layer payload-default {
|
|
6
|
-
// The width applies from the first frame. Payload animates every drawer property, so a width
|
|
7
|
-
// that changes after the drawer opened would animate too.
|
|
8
|
-
.builder-screen-drawer > .drawer__content {
|
|
9
|
-
width: min(1280px, calc(100% - var(--gutter-h))) !important;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.builder-screen-drawer__header {
|
|
13
|
-
position: sticky;
|
|
14
|
-
z-index: 3;
|
|
15
|
-
top: 0;
|
|
16
|
-
border-bottom: 1px solid var(--theme-elevation-100);
|
|
17
|
-
background: var(--theme-bg);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.builder-screen-drawer__bar {
|
|
21
|
-
display: flex;
|
|
22
|
-
align-items: center;
|
|
23
|
-
gap: calc(var(--base) * 0.5);
|
|
24
|
-
min-height: calc(var(--base) * 2.5);
|
|
25
|
-
padding: calc(var(--base) * 1.5) 0 var(--base);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.builder-screen-drawer__title {
|
|
29
|
-
flex: 1;
|
|
30
|
-
min-width: 0;
|
|
31
|
-
margin: 0;
|
|
32
|
-
overflow: hidden;
|
|
33
|
-
text-overflow: ellipsis;
|
|
34
|
-
white-space: nowrap;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.builder-screen-drawer__icon-button {
|
|
38
|
-
display: inline-grid;
|
|
39
|
-
flex: none;
|
|
40
|
-
place-items: center;
|
|
41
|
-
width: 32px;
|
|
42
|
-
height: 32px;
|
|
43
|
-
padding: 0;
|
|
44
|
-
border: 0;
|
|
45
|
-
border-radius: var(--style-radius-s, 4px);
|
|
46
|
-
background: transparent;
|
|
47
|
-
color: var(--theme-elevation-800);
|
|
48
|
-
cursor: pointer;
|
|
49
|
-
|
|
50
|
-
&:hover {
|
|
51
|
-
background: var(--theme-elevation-100);
|
|
52
|
-
color: var(--theme-text);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
&:focus-visible {
|
|
56
|
-
outline: 2px solid var(--theme-success-500);
|
|
57
|
-
outline-offset: 0;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.builder-screen-drawer__restore {
|
|
62
|
-
display: inline-flex;
|
|
63
|
-
flex: none;
|
|
64
|
-
align-items: center;
|
|
65
|
-
gap: 6px;
|
|
66
|
-
height: 32px;
|
|
67
|
-
padding: 0 12px;
|
|
68
|
-
border: 0;
|
|
69
|
-
border-radius: var(--style-radius-s, 4px);
|
|
70
|
-
background: var(--theme-elevation-800);
|
|
71
|
-
color: var(--theme-elevation-0);
|
|
72
|
-
font: inherit;
|
|
73
|
-
font-size: var(--be-text-m);
|
|
74
|
-
font-weight: var(--be-weight-medium);
|
|
75
|
-
cursor: pointer;
|
|
76
|
-
|
|
77
|
-
&:hover:not(:disabled) {
|
|
78
|
-
background: var(--theme-elevation-1000);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
&:disabled {
|
|
82
|
-
opacity: 0.5;
|
|
83
|
-
cursor: default;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
&:focus-visible {
|
|
87
|
-
outline: 2px solid var(--theme-success-500);
|
|
88
|
-
outline-offset: 2px;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.builder-screen-drawer__body {
|
|
93
|
-
transition: opacity 150ms ease;
|
|
94
|
-
|
|
95
|
-
// Loading the next screen: the current one stays, dimmed.
|
|
96
|
-
&[aria-busy='true'] {
|
|
97
|
-
opacity: 0.55;
|
|
98
|
-
pointer-events: none;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
// Wraps the screen only to catch its link clicks: no box of its own.
|
|
103
|
-
.builder-screen-drawer__screen {
|
|
104
|
-
display: contents;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.builder-screen-drawer__loading {
|
|
108
|
-
display: flex;
|
|
109
|
-
flex-direction: column;
|
|
110
|
-
gap: var(--base);
|
|
111
|
-
padding-top: var(--base);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.builder-screen-drawer__error {
|
|
115
|
-
margin: var(--base) 0;
|
|
116
|
-
color: var(--theme-elevation-800);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.builder-screen-drawer__link {
|
|
120
|
-
padding: 0;
|
|
121
|
-
border: 0;
|
|
122
|
-
background: none;
|
|
123
|
-
color: var(--theme-text);
|
|
124
|
-
font: inherit;
|
|
125
|
-
text-decoration: underline;
|
|
126
|
-
cursor: pointer;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// Restore runs through the builder (the header button): Payload's own would leave the live
|
|
130
|
-
// session out.
|
|
131
|
-
.builder-screen-drawer .restore-version {
|
|
132
|
-
display: none;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
1
|
+
// Drawers over the builder: Payload's Versions and API screens, and the page settings drawer.
|
|
2
|
+
// They render in Payload's modal container, outside `.builder-editor`, so they use Payload's CSS
|
|
3
|
+
// variables only. No Tailwind.
|
|
4
|
+
|
|
5
|
+
@layer payload-default {
|
|
6
|
+
// The width applies from the first frame. Payload animates every drawer property, so a width
|
|
7
|
+
// that changes after the drawer opened would animate too.
|
|
8
|
+
.builder-screen-drawer > .drawer__content {
|
|
9
|
+
width: min(1280px, calc(100% - var(--gutter-h))) !important;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.builder-screen-drawer__header {
|
|
13
|
+
position: sticky;
|
|
14
|
+
z-index: 3;
|
|
15
|
+
top: 0;
|
|
16
|
+
border-bottom: 1px solid var(--theme-elevation-100);
|
|
17
|
+
background: var(--theme-bg);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.builder-screen-drawer__bar {
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
gap: calc(var(--base) * 0.5);
|
|
24
|
+
min-height: calc(var(--base) * 2.5);
|
|
25
|
+
padding: calc(var(--base) * 1.5) 0 var(--base);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.builder-screen-drawer__title {
|
|
29
|
+
flex: 1;
|
|
30
|
+
min-width: 0;
|
|
31
|
+
margin: 0;
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
text-overflow: ellipsis;
|
|
34
|
+
white-space: nowrap;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.builder-screen-drawer__icon-button {
|
|
38
|
+
display: inline-grid;
|
|
39
|
+
flex: none;
|
|
40
|
+
place-items: center;
|
|
41
|
+
width: 32px;
|
|
42
|
+
height: 32px;
|
|
43
|
+
padding: 0;
|
|
44
|
+
border: 0;
|
|
45
|
+
border-radius: var(--style-radius-s, 4px);
|
|
46
|
+
background: transparent;
|
|
47
|
+
color: var(--theme-elevation-800);
|
|
48
|
+
cursor: pointer;
|
|
49
|
+
|
|
50
|
+
&:hover {
|
|
51
|
+
background: var(--theme-elevation-100);
|
|
52
|
+
color: var(--theme-text);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&:focus-visible {
|
|
56
|
+
outline: 2px solid var(--theme-success-500);
|
|
57
|
+
outline-offset: 0;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.builder-screen-drawer__restore {
|
|
62
|
+
display: inline-flex;
|
|
63
|
+
flex: none;
|
|
64
|
+
align-items: center;
|
|
65
|
+
gap: 6px;
|
|
66
|
+
height: 32px;
|
|
67
|
+
padding: 0 12px;
|
|
68
|
+
border: 0;
|
|
69
|
+
border-radius: var(--style-radius-s, 4px);
|
|
70
|
+
background: var(--theme-elevation-800);
|
|
71
|
+
color: var(--theme-elevation-0);
|
|
72
|
+
font: inherit;
|
|
73
|
+
font-size: var(--be-text-m);
|
|
74
|
+
font-weight: var(--be-weight-medium);
|
|
75
|
+
cursor: pointer;
|
|
76
|
+
|
|
77
|
+
&:hover:not(:disabled) {
|
|
78
|
+
background: var(--theme-elevation-1000);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&:disabled {
|
|
82
|
+
opacity: 0.5;
|
|
83
|
+
cursor: default;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&:focus-visible {
|
|
87
|
+
outline: 2px solid var(--theme-success-500);
|
|
88
|
+
outline-offset: 2px;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.builder-screen-drawer__body {
|
|
93
|
+
transition: opacity 150ms ease;
|
|
94
|
+
|
|
95
|
+
// Loading the next screen: the current one stays, dimmed.
|
|
96
|
+
&[aria-busy='true'] {
|
|
97
|
+
opacity: 0.55;
|
|
98
|
+
pointer-events: none;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Wraps the screen only to catch its link clicks: no box of its own.
|
|
103
|
+
.builder-screen-drawer__screen {
|
|
104
|
+
display: contents;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.builder-screen-drawer__loading {
|
|
108
|
+
display: flex;
|
|
109
|
+
flex-direction: column;
|
|
110
|
+
gap: var(--base);
|
|
111
|
+
padding-top: var(--base);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.builder-screen-drawer__error {
|
|
115
|
+
margin: var(--base) 0;
|
|
116
|
+
color: var(--theme-elevation-800);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.builder-screen-drawer__link {
|
|
120
|
+
padding: 0;
|
|
121
|
+
border: 0;
|
|
122
|
+
background: none;
|
|
123
|
+
color: var(--theme-text);
|
|
124
|
+
font: inherit;
|
|
125
|
+
text-decoration: underline;
|
|
126
|
+
cursor: pointer;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Restore runs through the builder (the header button): Payload's own would leave the live
|
|
130
|
+
// session out.
|
|
131
|
+
.builder-screen-drawer .restore-version {
|
|
132
|
+
display: none;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
// The "Not saved" banner in the settings drawer (settingsDrawer.tsx). It renders inside Payload's
|
|
2
|
-
// document controls, outside `.builder-editor`, so it uses Payload's CSS variables only.
|
|
3
|
-
|
|
4
|
-
@layer payload-default {
|
|
5
|
-
// Above the form's fields (the banner moves there from the controls row).
|
|
6
|
-
.builder-stale-save__slot {
|
|
7
|
-
padding: var(--base) var(--gutter-h) 0;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.builder-stale-save {
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-wrap: wrap;
|
|
13
|
-
align-items: center;
|
|
14
|
-
gap: calc(var(--base) * 0.5) var(--base);
|
|
15
|
-
width: 100%;
|
|
16
|
-
padding: calc(var(--base) * 0.5) calc(var(--base) * 0.75);
|
|
17
|
-
border: 1px solid var(--theme-error-300);
|
|
18
|
-
border-radius: var(--style-radius-m);
|
|
19
|
-
background: var(--theme-error-50);
|
|
20
|
-
color: var(--theme-error-800);
|
|
21
|
-
line-height: 1.4;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.builder-stale-save__text {
|
|
25
|
-
flex: 1 1 280px;
|
|
26
|
-
margin: 0;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.builder-stale-save__reload {
|
|
30
|
-
flex: none;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
1
|
+
// The "Not saved" banner in the settings drawer (settingsDrawer.tsx). It renders inside Payload's
|
|
2
|
+
// document controls, outside `.builder-editor`, so it uses Payload's CSS variables only.
|
|
3
|
+
|
|
4
|
+
@layer payload-default {
|
|
5
|
+
// Above the form's fields (the banner moves there from the controls row).
|
|
6
|
+
.builder-stale-save__slot {
|
|
7
|
+
padding: var(--base) var(--gutter-h) 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.builder-stale-save {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-wrap: wrap;
|
|
13
|
+
align-items: center;
|
|
14
|
+
gap: calc(var(--base) * 0.5) var(--base);
|
|
15
|
+
width: 100%;
|
|
16
|
+
padding: calc(var(--base) * 0.5) calc(var(--base) * 0.75);
|
|
17
|
+
border: 1px solid var(--theme-error-300);
|
|
18
|
+
border-radius: var(--style-radius-m);
|
|
19
|
+
background: var(--theme-error-50);
|
|
20
|
+
color: var(--theme-error-800);
|
|
21
|
+
line-height: 1.4;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.builder-stale-save__text {
|
|
25
|
+
flex: 1 1 280px;
|
|
26
|
+
margin: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.builder-stale-save__reload {
|
|
30
|
+
flex: none;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The browser tab title for the builder. Whitespace is collapsed and trimmed the way
|
|
3
|
+
* `document.title` reads it back: the top bar compares the two on every head change, and a title
|
|
4
|
+
* with extra spaces ("Home ") would never match, so it would set the title again forever.
|
|
5
|
+
*/
|
|
6
|
+
export declare function tabTitle(title: string, isSection: boolean): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The browser tab title for the builder. Whitespace is collapsed and trimmed the way
|
|
3
|
+
* `document.title` reads it back: the top bar compares the two on every head change, and a title
|
|
4
|
+
* with extra spaces ("Home ") would never match, so it would set the title again forever.
|
|
5
|
+
*/
|
|
6
|
+
export function tabTitle(title, isSection) {
|
|
7
|
+
const name = title.replace(/\s+/g, ' ').trim();
|
|
8
|
+
return isSection ? `Section: ${name} · Builder` : `${name} · Builder`;
|
|
9
|
+
}
|