@orion-studios/payload-studio 0.5.0-beta.3 → 0.5.0-beta.30
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 +68 -7
- package/dist/admin/client.mjs +68 -7
- package/dist/admin/index.d.mts +1 -1
- package/dist/admin/index.d.ts +1 -1
- package/dist/admin/index.js +37 -0
- package/dist/admin/index.mjs +3 -1
- package/dist/admin-app/client.d.mts +4 -0
- package/dist/admin-app/client.d.ts +4 -0
- package/dist/admin-app/client.js +705 -2
- package/dist/admin-app/client.mjs +701 -1
- package/dist/admin-app/index.d.mts +1 -1
- package/dist/admin-app/index.d.ts +1 -1
- package/dist/admin-app/index.js +167 -0
- package/dist/admin-app/index.mjs +13 -1
- package/dist/admin-app/styles.css +127 -0
- package/dist/blocks/index.js +193 -3
- package/dist/blocks/index.mjs +2 -2
- package/dist/{chunk-J7W5EE3B.mjs → chunk-7IGLXLUB.mjs} +37 -0
- package/dist/{chunk-ZLLNO5FM.mjs → chunk-GPQPDEB5.mjs} +44 -13
- package/dist/{chunk-PC5622T7.mjs → chunk-H7DSTEVT.mjs} +180 -4
- package/dist/{chunk-UJFU323N.mjs → chunk-QW24Y4UH.mjs} +18 -8
- package/dist/{chunk-ETRRXURT.mjs → chunk-SIL2J5MF.mjs} +14 -0
- package/dist/chunk-XVH5SCBD.mjs +234 -0
- package/dist/index-BBvk9b9i.d.mts +97 -0
- package/dist/index-BBvk9b9i.d.ts +97 -0
- package/dist/{index-DbH0Ljwp.d.mts → index-CpG3UHcS.d.mts} +1 -0
- package/dist/{index-DbH0Ljwp.d.ts → index-CpG3UHcS.d.ts} +1 -0
- package/dist/{index-DJFhANvJ.d.ts → index-Dj21uD_B.d.mts} +5 -2
- package/dist/{index-DJFhANvJ.d.mts → index-Dj21uD_B.d.ts} +5 -2
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +674 -250
- package/dist/index.mjs +11 -11
- package/dist/nextjs/index.d.mts +1 -1
- package/dist/nextjs/index.d.ts +1 -1
- package/dist/nextjs/index.js +276 -13
- package/dist/nextjs/index.mjs +4 -1
- package/dist/studio-pages/builder.css +25 -1
- package/dist/studio-pages/client.js +2063 -1118
- package/dist/studio-pages/client.mjs +2063 -1118
- package/dist/studio-pages/index.js +18 -7
- package/dist/studio-pages/index.mjs +2 -2
- package/package.json +2 -2
- package/dist/chunk-AAOHJDNS.mjs +0 -67
- package/dist/index-BallJs-K.d.mts +0 -43
- package/dist/index-BallJs-K.d.ts +0 -43
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { A as AdminBreadcrumbItem, a as AdminBreadcrumbs, b as
|
|
1
|
+
export { A as AdminBreadcrumbItem, a as AdminBreadcrumbs, b as AdminNavInput, c as AdminNavItem, d as AdminNavLinkItem, e as AdminPage, f as AdminPageLinkOption, g as AdminPageRecord, h as AdminRole, N as NestedNavItem, j as NestedNavItemInput, k as NestedNavTree, l as buildAdminPageLinkOptions, m as buildNestedNavTree, n as getAdminNavRows, o as navItemIsActive, p as normalizeAdminNavInputs, q as normalizeNestedNavItems, r as parseAdminHeaderNavFromForm, s as roleCanAccessNav } from '../index-BBvk9b9i.mjs';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { A as AdminBreadcrumbItem, a as AdminBreadcrumbs, b as
|
|
1
|
+
export { A as AdminBreadcrumbItem, a as AdminBreadcrumbs, b as AdminNavInput, c as AdminNavItem, d as AdminNavLinkItem, e as AdminPage, f as AdminPageLinkOption, g as AdminPageRecord, h as AdminRole, N as NestedNavItem, j as NestedNavItemInput, k as NestedNavTree, l as buildAdminPageLinkOptions, m as buildNestedNavTree, n as getAdminNavRows, o as navItemIsActive, p as normalizeAdminNavInputs, q as normalizeNestedNavItems, r as parseAdminHeaderNavFromForm, s as roleCanAccessNav } from '../index-BBvk9b9i.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
package/dist/admin-app/index.js
CHANGED
|
@@ -22,7 +22,13 @@ var admin_app_exports = {};
|
|
|
22
22
|
__export(admin_app_exports, {
|
|
23
23
|
AdminBreadcrumbs: () => AdminBreadcrumbs,
|
|
24
24
|
AdminPage: () => AdminPage,
|
|
25
|
+
buildAdminPageLinkOptions: () => buildAdminPageLinkOptions,
|
|
26
|
+
buildNestedNavTree: () => buildNestedNavTree,
|
|
27
|
+
getAdminNavRows: () => getAdminNavRows,
|
|
25
28
|
navItemIsActive: () => navItemIsActive,
|
|
29
|
+
normalizeAdminNavInputs: () => normalizeAdminNavInputs,
|
|
30
|
+
normalizeNestedNavItems: () => normalizeNestedNavItems,
|
|
31
|
+
parseAdminHeaderNavFromForm: () => parseAdminHeaderNavFromForm,
|
|
26
32
|
roleCanAccessNav: () => roleCanAccessNav
|
|
27
33
|
});
|
|
28
34
|
module.exports = __toCommonJS(admin_app_exports);
|
|
@@ -57,6 +63,161 @@ function AdminPage({ title, description, breadcrumbs, actions, children }) {
|
|
|
57
63
|
] });
|
|
58
64
|
}
|
|
59
65
|
|
|
66
|
+
// src/admin-app/nestedNavigation.ts
|
|
67
|
+
var normalizeNestedNavItems = (items) => {
|
|
68
|
+
const deduped = [];
|
|
69
|
+
const seen = /* @__PURE__ */ new Set();
|
|
70
|
+
for (const item of items) {
|
|
71
|
+
const href = typeof item.href === "string" ? item.href.trim() : "";
|
|
72
|
+
const label = typeof item.label === "string" ? item.label.trim() : "";
|
|
73
|
+
const parentHref = typeof item.parentHref === "string" ? item.parentHref.trim() : "";
|
|
74
|
+
if (!href || !label || seen.has(href)) {
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
seen.add(href);
|
|
78
|
+
deduped.push({
|
|
79
|
+
href,
|
|
80
|
+
label,
|
|
81
|
+
...parentHref ? { parentHref } : {}
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
const hrefs = new Set(deduped.map((item) => item.href));
|
|
85
|
+
return deduped.map((item) => ({
|
|
86
|
+
href: item.href,
|
|
87
|
+
label: item.label,
|
|
88
|
+
...item.parentHref && item.parentHref !== item.href && hrefs.has(item.parentHref) ? { parentHref: item.parentHref } : {}
|
|
89
|
+
}));
|
|
90
|
+
};
|
|
91
|
+
var buildNestedNavTree = (items) => {
|
|
92
|
+
const childrenByParent = /* @__PURE__ */ new Map();
|
|
93
|
+
const topLevel = [];
|
|
94
|
+
for (const item of items) {
|
|
95
|
+
if (!item.parentHref) {
|
|
96
|
+
topLevel.push(item);
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
const children = childrenByParent.get(item.parentHref) || [];
|
|
100
|
+
children.push(item);
|
|
101
|
+
childrenByParent.set(item.parentHref, children);
|
|
102
|
+
}
|
|
103
|
+
if (topLevel.length === 0 && items.length > 0) {
|
|
104
|
+
return {
|
|
105
|
+
topLevel: items.map((item) => ({ href: item.href, label: item.label })),
|
|
106
|
+
childrenByParent: /* @__PURE__ */ new Map()
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
return { childrenByParent, topLevel };
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
// src/admin-app/navigationLinks.ts
|
|
113
|
+
var fallbackHomeOption = {
|
|
114
|
+
href: "/",
|
|
115
|
+
label: "Home",
|
|
116
|
+
title: "Home"
|
|
117
|
+
};
|
|
118
|
+
var buildAdminPageLinkOptions = (pages) => {
|
|
119
|
+
const options = pages.map((page) => {
|
|
120
|
+
const href = typeof page.path === "string" ? page.path.trim() : "";
|
|
121
|
+
const title = typeof page.title === "string" && page.title.trim().length > 0 ? page.title.trim() : "Untitled Page";
|
|
122
|
+
if (!href) {
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
const depth = href === "/" ? 0 : href.split("/").filter(Boolean).length;
|
|
126
|
+
const indentLevel = Math.max(depth - 1, 0);
|
|
127
|
+
const indent = indentLevel > 0 ? `${"\u21B3 ".repeat(indentLevel)}` : "";
|
|
128
|
+
return {
|
|
129
|
+
href,
|
|
130
|
+
label: `${indent}${title}`,
|
|
131
|
+
title
|
|
132
|
+
};
|
|
133
|
+
}).filter((option) => option !== null).sort((a, b) => {
|
|
134
|
+
if (a.href === "/" && b.href !== "/") return -1;
|
|
135
|
+
if (b.href === "/" && a.href !== "/") return 1;
|
|
136
|
+
return a.href.localeCompare(b.href);
|
|
137
|
+
});
|
|
138
|
+
if (options.length === 0) {
|
|
139
|
+
return [fallbackHomeOption];
|
|
140
|
+
}
|
|
141
|
+
return options;
|
|
142
|
+
};
|
|
143
|
+
var getAdminNavRows = (navItems, pageOptions, minRows = 6, maxRows = 20) => {
|
|
144
|
+
const preferredRows = Math.max(navItems.length + 2, Math.min(8, pageOptions.length));
|
|
145
|
+
return Math.min(Math.max(minRows, preferredRows), maxRows);
|
|
146
|
+
};
|
|
147
|
+
var normalizeAdminNavInputs = (rows, pageOptions) => {
|
|
148
|
+
const allowedLinks = new Map(pageOptions.map((option) => [option.href, option.title]));
|
|
149
|
+
const deduped = [];
|
|
150
|
+
const seen = /* @__PURE__ */ new Set();
|
|
151
|
+
for (const row of rows) {
|
|
152
|
+
const href = typeof row.href === "string" ? row.href.trim() : "";
|
|
153
|
+
const defaultLabel = allowedLinks.get(href);
|
|
154
|
+
const explicitLabel = typeof row.label === "string" ? row.label.trim() : "";
|
|
155
|
+
const parentHref = typeof row.parentHref === "string" ? row.parentHref.trim() : "";
|
|
156
|
+
if (!href || !defaultLabel || seen.has(href)) {
|
|
157
|
+
continue;
|
|
158
|
+
}
|
|
159
|
+
seen.add(href);
|
|
160
|
+
deduped.push({
|
|
161
|
+
href,
|
|
162
|
+
label: explicitLabel.length > 0 ? explicitLabel : defaultLabel,
|
|
163
|
+
...parentHref.length > 0 ? { parentHref } : {}
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
const hrefs = new Set(deduped.map((item) => item.href));
|
|
167
|
+
const parentByHref = new Map(deduped.map((item) => [item.href, item.parentHref || ""]));
|
|
168
|
+
const createsCycle = (href, parentHref) => {
|
|
169
|
+
const visited = /* @__PURE__ */ new Set([href]);
|
|
170
|
+
let current = parentHref;
|
|
171
|
+
while (current) {
|
|
172
|
+
if (visited.has(current)) {
|
|
173
|
+
return true;
|
|
174
|
+
}
|
|
175
|
+
visited.add(current);
|
|
176
|
+
current = parentByHref.get(current) || "";
|
|
177
|
+
}
|
|
178
|
+
return false;
|
|
179
|
+
};
|
|
180
|
+
return deduped.map((item) => {
|
|
181
|
+
const parentHref = item.parentHref;
|
|
182
|
+
if (!parentHref || parentHref === item.href || !hrefs.has(parentHref) || createsCycle(item.href, parentHref)) {
|
|
183
|
+
return {
|
|
184
|
+
href: item.href,
|
|
185
|
+
label: item.label
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
return item;
|
|
189
|
+
});
|
|
190
|
+
};
|
|
191
|
+
var parseAdminHeaderNavFromForm = (formData, pageOptions, maxRows = 24) => {
|
|
192
|
+
const serialized = String(formData.get("navItemsState") || "").trim();
|
|
193
|
+
if (serialized.length > 0) {
|
|
194
|
+
try {
|
|
195
|
+
const parsed = JSON.parse(serialized);
|
|
196
|
+
if (Array.isArray(parsed)) {
|
|
197
|
+
return normalizeAdminNavInputs(parsed.slice(0, maxRows), pageOptions);
|
|
198
|
+
}
|
|
199
|
+
} catch {
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
const rawCount = Number(String(formData.get("navCount") || "0"));
|
|
203
|
+
const navCount = Number.isFinite(rawCount) ? Math.max(0, Math.min(rawCount, maxRows)) : 0;
|
|
204
|
+
const navRows = [];
|
|
205
|
+
for (let index = 0; index < navCount; index += 1) {
|
|
206
|
+
const href = String(formData.get(`navPage_${index}`) || "").trim();
|
|
207
|
+
const label = String(formData.get(`navLabel_${index}`) || "").trim();
|
|
208
|
+
const parentHref = String(formData.get(`navParentHref_${index}`) || "").trim();
|
|
209
|
+
navRows.push({
|
|
210
|
+
href,
|
|
211
|
+
label,
|
|
212
|
+
parentHref
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
if (navRows.length > 0) {
|
|
216
|
+
return normalizeAdminNavInputs(navRows, pageOptions);
|
|
217
|
+
}
|
|
218
|
+
return [];
|
|
219
|
+
};
|
|
220
|
+
|
|
60
221
|
// src/admin-app/routeRegistry.ts
|
|
61
222
|
var roleCanAccessNav = (role, item) => {
|
|
62
223
|
if (!item.roles || item.roles.length === 0) {
|
|
@@ -77,6 +238,12 @@ var navItemIsActive = (pathname, item) => {
|
|
|
77
238
|
0 && (module.exports = {
|
|
78
239
|
AdminBreadcrumbs,
|
|
79
240
|
AdminPage,
|
|
241
|
+
buildAdminPageLinkOptions,
|
|
242
|
+
buildNestedNavTree,
|
|
243
|
+
getAdminNavRows,
|
|
80
244
|
navItemIsActive,
|
|
245
|
+
normalizeAdminNavInputs,
|
|
246
|
+
normalizeNestedNavItems,
|
|
247
|
+
parseAdminHeaderNavFromForm,
|
|
81
248
|
roleCanAccessNav
|
|
82
249
|
});
|
package/dist/admin-app/index.mjs
CHANGED
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AdminBreadcrumbs,
|
|
3
3
|
AdminPage,
|
|
4
|
+
buildAdminPageLinkOptions,
|
|
5
|
+
buildNestedNavTree,
|
|
6
|
+
getAdminNavRows,
|
|
4
7
|
navItemIsActive,
|
|
8
|
+
normalizeAdminNavInputs,
|
|
9
|
+
normalizeNestedNavItems,
|
|
10
|
+
parseAdminHeaderNavFromForm,
|
|
5
11
|
roleCanAccessNav
|
|
6
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-XVH5SCBD.mjs";
|
|
7
13
|
import "../chunk-6BWS3CLP.mjs";
|
|
8
14
|
export {
|
|
9
15
|
AdminBreadcrumbs,
|
|
10
16
|
AdminPage,
|
|
17
|
+
buildAdminPageLinkOptions,
|
|
18
|
+
buildNestedNavTree,
|
|
19
|
+
getAdminNavRows,
|
|
11
20
|
navItemIsActive,
|
|
21
|
+
normalizeAdminNavInputs,
|
|
22
|
+
normalizeNestedNavItems,
|
|
23
|
+
parseAdminHeaderNavFromForm,
|
|
12
24
|
roleCanAccessNav
|
|
13
25
|
};
|
|
@@ -120,3 +120,130 @@
|
|
|
120
120
|
max-width: none;
|
|
121
121
|
width: 100%;
|
|
122
122
|
}
|
|
123
|
+
|
|
124
|
+
.orion-admin-nav-editor {
|
|
125
|
+
border: 1px solid var(--orion-admin-card-border);
|
|
126
|
+
border-radius: 12px;
|
|
127
|
+
display: grid;
|
|
128
|
+
gap: 0.65rem;
|
|
129
|
+
padding: 0.75rem;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.orion-admin-nav-editor-head {
|
|
133
|
+
align-items: center;
|
|
134
|
+
display: flex;
|
|
135
|
+
justify-content: space-between;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.orion-admin-nav-editor-title {
|
|
139
|
+
font-weight: 800;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.orion-admin-nav-editor-add {
|
|
143
|
+
background: #111;
|
|
144
|
+
border: 0;
|
|
145
|
+
border-radius: 999px;
|
|
146
|
+
color: #fff;
|
|
147
|
+
cursor: pointer;
|
|
148
|
+
font-size: 0.86rem;
|
|
149
|
+
font-weight: 800;
|
|
150
|
+
padding: 0.35rem 0.7rem;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.orion-admin-action-button {
|
|
154
|
+
background: #111;
|
|
155
|
+
border: 0;
|
|
156
|
+
border-radius: 10px;
|
|
157
|
+
color: #fff;
|
|
158
|
+
cursor: pointer;
|
|
159
|
+
font-weight: 800;
|
|
160
|
+
padding: 0.55rem 0.8rem;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.orion-admin-nav-editor-help {
|
|
164
|
+
color: var(--orion-admin-muted);
|
|
165
|
+
font-size: 0.84rem;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.orion-admin-nav-editor-empty {
|
|
169
|
+
background: #f2f5f3;
|
|
170
|
+
border: 1px dashed var(--orion-admin-border);
|
|
171
|
+
border-radius: 10px;
|
|
172
|
+
color: var(--orion-admin-muted);
|
|
173
|
+
font-size: 0.9rem;
|
|
174
|
+
padding: 0.7rem;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.orion-admin-nav-editor-list {
|
|
178
|
+
display: grid;
|
|
179
|
+
gap: 0.55rem;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.orion-admin-nav-editor-row {
|
|
183
|
+
background: #fff;
|
|
184
|
+
border: 1px solid var(--orion-admin-border);
|
|
185
|
+
border-radius: 10px;
|
|
186
|
+
display: grid;
|
|
187
|
+
gap: 0.5rem;
|
|
188
|
+
padding: 0.65rem;
|
|
189
|
+
transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.orion-admin-nav-editor-row.is-dragging {
|
|
193
|
+
border-color: rgba(24, 95, 69, 0.55);
|
|
194
|
+
box-shadow: 0 10px 24px rgba(15, 42, 33, 0.16);
|
|
195
|
+
transform: scale(0.996);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.orion-admin-nav-editor-row.is-drop-target {
|
|
199
|
+
border-color: rgba(24, 95, 69, 0.7);
|
|
200
|
+
box-shadow: inset 0 0 0 2px rgba(24, 95, 69, 0.12);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.orion-admin-nav-editor-row-head {
|
|
204
|
+
align-items: center;
|
|
205
|
+
display: flex;
|
|
206
|
+
gap: 0.6rem;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.orion-admin-nav-editor-drag {
|
|
210
|
+
background: #e8efeb;
|
|
211
|
+
border-radius: 999px;
|
|
212
|
+
color: #255543;
|
|
213
|
+
cursor: grab;
|
|
214
|
+
font-size: 0.75rem;
|
|
215
|
+
font-weight: 800;
|
|
216
|
+
padding: 0.2rem 0.5rem;
|
|
217
|
+
text-transform: uppercase;
|
|
218
|
+
user-select: none;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.orion-admin-nav-editor-row-index {
|
|
222
|
+
color: var(--orion-admin-muted);
|
|
223
|
+
font-size: 0.82rem;
|
|
224
|
+
font-weight: 700;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.orion-admin-nav-editor-remove {
|
|
228
|
+
background: #8c1f1f;
|
|
229
|
+
border: 0;
|
|
230
|
+
border-radius: 999px;
|
|
231
|
+
color: #fff;
|
|
232
|
+
cursor: pointer;
|
|
233
|
+
font-size: 0.8rem;
|
|
234
|
+
font-weight: 700;
|
|
235
|
+
margin-left: auto;
|
|
236
|
+
padding: 0.25rem 0.6rem;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.orion-admin-nav-editor-row-grid {
|
|
240
|
+
display: grid;
|
|
241
|
+
gap: 0.5rem;
|
|
242
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
@media (max-width: 1024px) {
|
|
246
|
+
.orion-admin-nav-editor-row-grid {
|
|
247
|
+
grid-template-columns: 1fr;
|
|
248
|
+
}
|
|
249
|
+
}
|
package/dist/blocks/index.js
CHANGED
|
@@ -56,6 +56,7 @@ var sectionStyleDefaults = {
|
|
|
56
56
|
contentGradientPreset: "none",
|
|
57
57
|
contentGradientTo: "#f4f6f2",
|
|
58
58
|
contentWidth: "inherit",
|
|
59
|
+
sectionPaddingX: "inherit",
|
|
59
60
|
sectionBackgroundColor: "#ffffff",
|
|
60
61
|
sectionBackgroundMode: "none",
|
|
61
62
|
sectionGradientAngle: "135",
|
|
@@ -93,6 +94,19 @@ var sectionStyleFields = () => [
|
|
|
93
94
|
type: "select",
|
|
94
95
|
defaultValue: sectionStyleDefaults.sectionPaddingY,
|
|
95
96
|
options: [
|
|
97
|
+
{ label: "None", value: "none" },
|
|
98
|
+
{ label: "Small", value: "sm" },
|
|
99
|
+
{ label: "Medium", value: "md" },
|
|
100
|
+
{ label: "Large", value: "lg" }
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: "sectionPaddingX",
|
|
105
|
+
type: "select",
|
|
106
|
+
defaultValue: sectionStyleDefaults.sectionPaddingX,
|
|
107
|
+
options: [
|
|
108
|
+
{ label: "Inherit", value: "inherit" },
|
|
109
|
+
{ label: "None", value: "none" },
|
|
96
110
|
{ label: "Small", value: "sm" },
|
|
97
111
|
{ label: "Medium", value: "md" },
|
|
98
112
|
{ label: "Large", value: "lg" }
|
|
@@ -231,6 +245,36 @@ var BeforeAfterBlock = {
|
|
|
231
245
|
relationTo: "media",
|
|
232
246
|
required: false
|
|
233
247
|
},
|
|
248
|
+
{
|
|
249
|
+
name: "imageFit",
|
|
250
|
+
type: "select",
|
|
251
|
+
defaultValue: "cover",
|
|
252
|
+
options: [
|
|
253
|
+
{ label: "Cover", value: "cover" },
|
|
254
|
+
{ label: "Contain", value: "contain" }
|
|
255
|
+
]
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
name: "imageCornerStyle",
|
|
259
|
+
type: "select",
|
|
260
|
+
defaultValue: "rounded",
|
|
261
|
+
options: [
|
|
262
|
+
{ label: "Rounded", value: "rounded" },
|
|
263
|
+
{ label: "Square", value: "square" }
|
|
264
|
+
]
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
name: "imagePosition",
|
|
268
|
+
type: "select",
|
|
269
|
+
defaultValue: "center",
|
|
270
|
+
options: [
|
|
271
|
+
{ label: "Center", value: "center" },
|
|
272
|
+
{ label: "Top", value: "top" },
|
|
273
|
+
{ label: "Bottom", value: "bottom" },
|
|
274
|
+
{ label: "Left", value: "left" },
|
|
275
|
+
{ label: "Right", value: "right" }
|
|
276
|
+
]
|
|
277
|
+
},
|
|
234
278
|
{
|
|
235
279
|
name: "description",
|
|
236
280
|
type: "textarea"
|
|
@@ -428,6 +472,36 @@ var FeatureGridBlock = {
|
|
|
428
472
|
type: "upload",
|
|
429
473
|
relationTo: "media",
|
|
430
474
|
required: false
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
name: "imageFit",
|
|
478
|
+
type: "select",
|
|
479
|
+
defaultValue: "cover",
|
|
480
|
+
options: [
|
|
481
|
+
{ label: "Cover", value: "cover" },
|
|
482
|
+
{ label: "Contain", value: "contain" }
|
|
483
|
+
]
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
name: "imageCornerStyle",
|
|
487
|
+
type: "select",
|
|
488
|
+
defaultValue: "rounded",
|
|
489
|
+
options: [
|
|
490
|
+
{ label: "Rounded", value: "rounded" },
|
|
491
|
+
{ label: "Square", value: "square" }
|
|
492
|
+
]
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
name: "imagePosition",
|
|
496
|
+
type: "select",
|
|
497
|
+
defaultValue: "center",
|
|
498
|
+
options: [
|
|
499
|
+
{ label: "Center", value: "center" },
|
|
500
|
+
{ label: "Top", value: "top" },
|
|
501
|
+
{ label: "Bottom", value: "bottom" },
|
|
502
|
+
{ label: "Left", value: "left" },
|
|
503
|
+
{ label: "Right", value: "right" }
|
|
504
|
+
]
|
|
431
505
|
}
|
|
432
506
|
]
|
|
433
507
|
},
|
|
@@ -554,10 +628,44 @@ var HeroBlock = {
|
|
|
554
628
|
relationTo: "media"
|
|
555
629
|
},
|
|
556
630
|
{
|
|
557
|
-
name: "
|
|
558
|
-
type: "
|
|
631
|
+
name: "backgroundImageFit",
|
|
632
|
+
type: "select",
|
|
633
|
+
defaultValue: "cover",
|
|
634
|
+
options: [
|
|
635
|
+
{ label: "Cover", value: "cover" },
|
|
636
|
+
{ label: "Cover (Square)", value: "cover-square" },
|
|
637
|
+
{ label: "Contain", value: "contain" },
|
|
638
|
+
{ label: "Contain (Square)", value: "contain-square" }
|
|
639
|
+
],
|
|
640
|
+
admin: {
|
|
641
|
+
description: "How the hero image should be sized within the section."
|
|
642
|
+
}
|
|
643
|
+
},
|
|
644
|
+
{
|
|
645
|
+
name: "backgroundImageCornerStyle",
|
|
646
|
+
type: "select",
|
|
647
|
+
defaultValue: "rounded",
|
|
648
|
+
options: [
|
|
649
|
+
{ label: "Rounded", value: "rounded" },
|
|
650
|
+
{ label: "Square", value: "square" }
|
|
651
|
+
],
|
|
559
652
|
admin: {
|
|
560
|
-
description: "
|
|
653
|
+
description: "How the hero image corners should appear."
|
|
654
|
+
}
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
name: "backgroundImagePosition",
|
|
658
|
+
type: "select",
|
|
659
|
+
defaultValue: "center",
|
|
660
|
+
options: [
|
|
661
|
+
{ label: "Center", value: "center" },
|
|
662
|
+
{ label: "Top", value: "top" },
|
|
663
|
+
{ label: "Bottom", value: "bottom" },
|
|
664
|
+
{ label: "Left", value: "left" },
|
|
665
|
+
{ label: "Right", value: "right" }
|
|
666
|
+
],
|
|
667
|
+
admin: {
|
|
668
|
+
description: "Where the hero image should anchor inside the section."
|
|
561
669
|
}
|
|
562
670
|
},
|
|
563
671
|
{
|
|
@@ -582,6 +690,28 @@ var HeroBlock = {
|
|
|
582
690
|
}
|
|
583
691
|
]
|
|
584
692
|
},
|
|
693
|
+
{
|
|
694
|
+
name: "heroHeight",
|
|
695
|
+
type: "select",
|
|
696
|
+
defaultValue: "sm",
|
|
697
|
+
options: [
|
|
698
|
+
{
|
|
699
|
+
label: "Small",
|
|
700
|
+
value: "sm"
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
label: "Medium (Half Screen)",
|
|
704
|
+
value: "md"
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
label: "Full Screen",
|
|
708
|
+
value: "full"
|
|
709
|
+
}
|
|
710
|
+
],
|
|
711
|
+
admin: {
|
|
712
|
+
description: "Controls the vertical height of the hero section."
|
|
713
|
+
}
|
|
714
|
+
},
|
|
585
715
|
...sectionStyleFields()
|
|
586
716
|
]
|
|
587
717
|
};
|
|
@@ -627,6 +757,36 @@ var LogoWallBlock = {
|
|
|
627
757
|
relationTo: "media",
|
|
628
758
|
required: false
|
|
629
759
|
},
|
|
760
|
+
{
|
|
761
|
+
name: "imageFit",
|
|
762
|
+
type: "select",
|
|
763
|
+
defaultValue: "contain",
|
|
764
|
+
options: [
|
|
765
|
+
{ label: "Cover", value: "cover" },
|
|
766
|
+
{ label: "Contain", value: "contain" }
|
|
767
|
+
]
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
name: "imageCornerStyle",
|
|
771
|
+
type: "select",
|
|
772
|
+
defaultValue: "rounded",
|
|
773
|
+
options: [
|
|
774
|
+
{ label: "Rounded", value: "rounded" },
|
|
775
|
+
{ label: "Square", value: "square" }
|
|
776
|
+
]
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
name: "imagePosition",
|
|
780
|
+
type: "select",
|
|
781
|
+
defaultValue: "center",
|
|
782
|
+
options: [
|
|
783
|
+
{ label: "Center", value: "center" },
|
|
784
|
+
{ label: "Top", value: "top" },
|
|
785
|
+
{ label: "Bottom", value: "bottom" },
|
|
786
|
+
{ label: "Left", value: "left" },
|
|
787
|
+
{ label: "Right", value: "right" }
|
|
788
|
+
]
|
|
789
|
+
},
|
|
630
790
|
{
|
|
631
791
|
name: "href",
|
|
632
792
|
type: "text"
|
|
@@ -677,6 +837,36 @@ var MediaBlock = {
|
|
|
677
837
|
}
|
|
678
838
|
]
|
|
679
839
|
},
|
|
840
|
+
{
|
|
841
|
+
name: "imageFit",
|
|
842
|
+
type: "select",
|
|
843
|
+
defaultValue: "cover",
|
|
844
|
+
options: [
|
|
845
|
+
{ label: "Cover", value: "cover" },
|
|
846
|
+
{ label: "Contain", value: "contain" }
|
|
847
|
+
]
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
name: "imageCornerStyle",
|
|
851
|
+
type: "select",
|
|
852
|
+
defaultValue: "rounded",
|
|
853
|
+
options: [
|
|
854
|
+
{ label: "Rounded", value: "rounded" },
|
|
855
|
+
{ label: "Square", value: "square" }
|
|
856
|
+
]
|
|
857
|
+
},
|
|
858
|
+
{
|
|
859
|
+
name: "imagePosition",
|
|
860
|
+
type: "select",
|
|
861
|
+
defaultValue: "center",
|
|
862
|
+
options: [
|
|
863
|
+
{ label: "Center", value: "center" },
|
|
864
|
+
{ label: "Top", value: "top" },
|
|
865
|
+
{ label: "Bottom", value: "bottom" },
|
|
866
|
+
{ label: "Left", value: "left" },
|
|
867
|
+
{ label: "Right", value: "right" }
|
|
868
|
+
]
|
|
869
|
+
},
|
|
680
870
|
...sectionStyleFields()
|
|
681
871
|
]
|
|
682
872
|
};
|
package/dist/blocks/index.mjs
CHANGED
|
@@ -17,8 +17,8 @@ import {
|
|
|
17
17
|
defaultPageLayoutBlocks,
|
|
18
18
|
sectionPresets,
|
|
19
19
|
templateStarterPresets
|
|
20
|
-
} from "../chunk-
|
|
21
|
-
import "../chunk-
|
|
20
|
+
} from "../chunk-H7DSTEVT.mjs";
|
|
21
|
+
import "../chunk-SIL2J5MF.mjs";
|
|
22
22
|
import "../chunk-6BWS3CLP.mjs";
|
|
23
23
|
export {
|
|
24
24
|
BeforeAfterBlock,
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
var admin_exports = {};
|
|
8
8
|
__export(admin_exports, {
|
|
9
9
|
configureAdmin: () => configureAdmin,
|
|
10
|
+
createHeaderNavItemsField: () => createHeaderNavItemsField,
|
|
10
11
|
createThemePreferenceField: () => createThemePreferenceField,
|
|
11
12
|
themePreferenceField: () => themePreferenceField,
|
|
12
13
|
withTooltips: () => withTooltips
|
|
@@ -269,10 +270,46 @@ function addTooltipToField(field, tooltips) {
|
|
|
269
270
|
return field;
|
|
270
271
|
}
|
|
271
272
|
|
|
273
|
+
// src/admin/fields/headerNav.ts
|
|
274
|
+
var createHeaderNavItemsField = () => ({
|
|
275
|
+
name: "navItems",
|
|
276
|
+
type: "array",
|
|
277
|
+
labels: { singular: "Navigation Link", plural: "Navigation Links" },
|
|
278
|
+
admin: {
|
|
279
|
+
description: "The links displayed in your website's main navigation menu."
|
|
280
|
+
},
|
|
281
|
+
fields: [
|
|
282
|
+
{
|
|
283
|
+
name: "label",
|
|
284
|
+
type: "text",
|
|
285
|
+
required: true,
|
|
286
|
+
admin: {
|
|
287
|
+
description: "The text shown for this navigation link."
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
name: "href",
|
|
292
|
+
type: "text",
|
|
293
|
+
required: true,
|
|
294
|
+
admin: {
|
|
295
|
+
description: 'The URL this link points to (e.g., "/about" or "https://example.com").'
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
name: "parentHref",
|
|
300
|
+
type: "text",
|
|
301
|
+
admin: {
|
|
302
|
+
description: "Optional parent link URL. If set to another nav item href, this item appears in that dropdown."
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
]
|
|
306
|
+
});
|
|
307
|
+
|
|
272
308
|
export {
|
|
273
309
|
createThemePreferenceField,
|
|
274
310
|
themePreferenceField,
|
|
275
311
|
configureAdmin,
|
|
276
312
|
withTooltips,
|
|
313
|
+
createHeaderNavItemsField,
|
|
277
314
|
admin_exports
|
|
278
315
|
};
|