@orion-studios/payload-studio 0.5.0-beta.7 → 0.5.0-beta.70
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/README.md +20 -0
- package/dist/admin/client.d.mts +2 -0
- package/dist/admin/client.d.ts +2 -0
- package/dist/admin/client.js +779 -137
- package/dist/admin/client.mjs +769 -129
- package/dist/admin/index.d.mts +1 -1
- package/dist/admin/index.d.ts +1 -1
- package/dist/admin/index.js +100 -8
- package/dist/admin/index.mjs +3 -1
- package/dist/admin-app/client.d.mts +7 -0
- package/dist/admin-app/client.d.ts +7 -0
- package/dist/admin-app/client.js +1262 -3
- package/dist/admin-app/client.mjs +1164 -2
- 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 +229 -0
- package/dist/blocks/index.js +633 -8
- package/dist/blocks/index.mjs +2 -2
- package/dist/{chunk-ZLLNO5FM.mjs → chunk-CKX5Y2HU.mjs} +44 -13
- package/dist/{chunk-J7W5EE3B.mjs → chunk-HCEPGEAI.mjs} +100 -8
- package/dist/chunk-HXGAG6I7.mjs +325 -0
- package/dist/chunk-ROTPP5CU.mjs +99 -0
- package/dist/{chunk-ETRRXURT.mjs → chunk-SIL2J5MF.mjs} +14 -0
- package/dist/chunk-VDGSMD6H.mjs +1072 -0
- package/dist/{chunk-PC5622T7.mjs → chunk-XK3K5GRP.mjs} +620 -9
- package/dist/chunk-XVH5SCBD.mjs +234 -0
- package/dist/{index-CmR6NInu.d.ts → index-BIwu3qIH.d.mts} +29 -3
- package/dist/{index-CmR6NInu.d.mts → index-BIwu3qIH.d.ts} +29 -3
- package/dist/index-CdnUNrvX.d.mts +134 -0
- package/dist/{index-DbH0Ljwp.d.ts → index-CpG3UHcS.d.mts} +1 -0
- package/dist/{index-DbH0Ljwp.d.mts → index-CpG3UHcS.d.ts} +1 -0
- package/dist/index-DyHbWliW.d.ts +134 -0
- package/dist/index-ZbOx4OCF.d.mts +128 -0
- package/dist/index-ZbOx4OCF.d.ts +128 -0
- package/dist/{index-DJFhANvJ.d.mts → index-cDYkEj29.d.mts} +20 -2
- package/dist/{index-DJFhANvJ.d.ts → index-cDYkEj29.d.ts} +20 -2
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +2145 -305
- package/dist/index.mjs +9 -9
- package/dist/nextjs/index.d.mts +1 -1
- package/dist/nextjs/index.d.ts +1 -1
- package/dist/nextjs/index.js +996 -13
- package/dist/nextjs/index.mjs +4 -1
- package/dist/studio/index.d.mts +2 -1
- package/dist/studio/index.d.ts +2 -1
- package/dist/studio/index.js +171 -2
- package/dist/studio/index.mjs +7 -3
- package/dist/studio-pages/builder.css +358 -8
- package/dist/studio-pages/client.d.mts +17 -0
- package/dist/studio-pages/client.d.ts +17 -0
- package/dist/studio-pages/client.js +5657 -1478
- package/dist/studio-pages/client.mjs +5549 -1461
- package/dist/studio-pages/index.d.mts +3 -2
- package/dist/studio-pages/index.d.ts +3 -2
- package/dist/studio-pages/index.js +799 -29
- package/dist/studio-pages/index.mjs +6 -2
- package/package.json +26 -12
- package/dist/chunk-AAOHJDNS.mjs +0 -67
- package/dist/chunk-N67KVM2S.mjs +0 -156
- package/dist/chunk-UJFU323N.mjs +0 -301
- package/dist/index-B9N5MyjF.d.mts +0 -39
- package/dist/index-BallJs-K.d.mts +0 -43
- package/dist/index-BallJs-K.d.ts +0 -43
- package/dist/index-g8tBHLKD.d.ts +0 -39
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__export
|
|
3
|
+
} from "./chunk-6BWS3CLP.mjs";
|
|
4
|
+
|
|
5
|
+
// src/admin-app/index.ts
|
|
6
|
+
var admin_app_exports = {};
|
|
7
|
+
__export(admin_app_exports, {
|
|
8
|
+
AdminBreadcrumbs: () => AdminBreadcrumbs,
|
|
9
|
+
AdminPage: () => AdminPage,
|
|
10
|
+
buildAdminPageLinkOptions: () => buildAdminPageLinkOptions,
|
|
11
|
+
buildNestedNavTree: () => buildNestedNavTree,
|
|
12
|
+
getAdminNavRows: () => getAdminNavRows,
|
|
13
|
+
navItemIsActive: () => navItemIsActive,
|
|
14
|
+
normalizeAdminNavInputs: () => normalizeAdminNavInputs,
|
|
15
|
+
normalizeNestedNavItems: () => normalizeNestedNavItems,
|
|
16
|
+
parseAdminHeaderNavFromForm: () => parseAdminHeaderNavFromForm,
|
|
17
|
+
roleCanAccessNav: () => roleCanAccessNav
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
// src/admin-app/components/AdminBreadcrumbs.tsx
|
|
21
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
22
|
+
function AdminBreadcrumbs({ items }) {
|
|
23
|
+
return /* @__PURE__ */ jsx("nav", { "aria-label": "Breadcrumb", className: "orion-admin-breadcrumbs", children: items.map((item, index) => {
|
|
24
|
+
const isLast = index === items.length - 1;
|
|
25
|
+
return /* @__PURE__ */ jsxs("span", { children: [
|
|
26
|
+
item.href && !isLast ? /* @__PURE__ */ jsx("a", { href: item.href, children: item.label }) : /* @__PURE__ */ jsx("span", { children: item.label }),
|
|
27
|
+
!isLast ? /* @__PURE__ */ jsx("span", { className: "orion-admin-breadcrumb-sep", children: "/" }) : null
|
|
28
|
+
] }, `${item.label}-${index}`);
|
|
29
|
+
}) });
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// src/admin-app/components/AdminPage.tsx
|
|
33
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
34
|
+
function AdminPage({ title, description, breadcrumbs, actions, children }) {
|
|
35
|
+
return /* @__PURE__ */ jsxs2("div", { className: "orion-admin-page", children: [
|
|
36
|
+
/* @__PURE__ */ jsxs2("div", { className: "orion-admin-page-header", children: [
|
|
37
|
+
/* @__PURE__ */ jsx2(AdminBreadcrumbs, { items: breadcrumbs }),
|
|
38
|
+
/* @__PURE__ */ jsxs2("div", { className: "orion-admin-page-title-row", children: [
|
|
39
|
+
/* @__PURE__ */ jsxs2("div", { children: [
|
|
40
|
+
/* @__PURE__ */ jsx2("h1", { children: title }),
|
|
41
|
+
description ? /* @__PURE__ */ jsx2("p", { children: description }) : null
|
|
42
|
+
] }),
|
|
43
|
+
actions ? /* @__PURE__ */ jsx2("div", { className: "orion-admin-page-actions", children: actions }) : null
|
|
44
|
+
] })
|
|
45
|
+
] }),
|
|
46
|
+
/* @__PURE__ */ jsx2("div", { className: "orion-admin-page-content", children })
|
|
47
|
+
] });
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// src/admin-app/nestedNavigation.ts
|
|
51
|
+
var normalizeNestedNavItems = (items) => {
|
|
52
|
+
const deduped = [];
|
|
53
|
+
const seen = /* @__PURE__ */ new Set();
|
|
54
|
+
for (const item of items) {
|
|
55
|
+
const href = typeof item.href === "string" ? item.href.trim() : "";
|
|
56
|
+
const label = typeof item.label === "string" ? item.label.trim() : "";
|
|
57
|
+
const parentHref = typeof item.parentHref === "string" ? item.parentHref.trim() : "";
|
|
58
|
+
if (!href || !label || seen.has(href)) {
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
seen.add(href);
|
|
62
|
+
deduped.push({
|
|
63
|
+
href,
|
|
64
|
+
label,
|
|
65
|
+
...parentHref ? { parentHref } : {}
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
const hrefs = new Set(deduped.map((item) => item.href));
|
|
69
|
+
return deduped.map((item) => ({
|
|
70
|
+
href: item.href,
|
|
71
|
+
label: item.label,
|
|
72
|
+
...item.parentHref && item.parentHref !== item.href && hrefs.has(item.parentHref) ? { parentHref: item.parentHref } : {}
|
|
73
|
+
}));
|
|
74
|
+
};
|
|
75
|
+
var buildNestedNavTree = (items) => {
|
|
76
|
+
const childrenByParent = /* @__PURE__ */ new Map();
|
|
77
|
+
const topLevel = [];
|
|
78
|
+
for (const item of items) {
|
|
79
|
+
if (!item.parentHref) {
|
|
80
|
+
topLevel.push(item);
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
const children = childrenByParent.get(item.parentHref) || [];
|
|
84
|
+
children.push(item);
|
|
85
|
+
childrenByParent.set(item.parentHref, children);
|
|
86
|
+
}
|
|
87
|
+
if (topLevel.length === 0 && items.length > 0) {
|
|
88
|
+
return {
|
|
89
|
+
topLevel: items.map((item) => ({ href: item.href, label: item.label })),
|
|
90
|
+
childrenByParent: /* @__PURE__ */ new Map()
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
return { childrenByParent, topLevel };
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
// src/admin-app/navigationLinks.ts
|
|
97
|
+
var fallbackHomeOption = {
|
|
98
|
+
href: "/",
|
|
99
|
+
label: "Home",
|
|
100
|
+
title: "Home"
|
|
101
|
+
};
|
|
102
|
+
var buildAdminPageLinkOptions = (pages) => {
|
|
103
|
+
const options = pages.map((page) => {
|
|
104
|
+
const href = typeof page.path === "string" ? page.path.trim() : "";
|
|
105
|
+
const title = typeof page.title === "string" && page.title.trim().length > 0 ? page.title.trim() : "Untitled Page";
|
|
106
|
+
if (!href) {
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
const depth = href === "/" ? 0 : href.split("/").filter(Boolean).length;
|
|
110
|
+
const indentLevel = Math.max(depth - 1, 0);
|
|
111
|
+
const indent = indentLevel > 0 ? `${"\u21B3 ".repeat(indentLevel)}` : "";
|
|
112
|
+
return {
|
|
113
|
+
href,
|
|
114
|
+
label: `${indent}${title}`,
|
|
115
|
+
title
|
|
116
|
+
};
|
|
117
|
+
}).filter((option) => option !== null).sort((a, b) => {
|
|
118
|
+
if (a.href === "/" && b.href !== "/") return -1;
|
|
119
|
+
if (b.href === "/" && a.href !== "/") return 1;
|
|
120
|
+
return a.href.localeCompare(b.href);
|
|
121
|
+
});
|
|
122
|
+
if (options.length === 0) {
|
|
123
|
+
return [fallbackHomeOption];
|
|
124
|
+
}
|
|
125
|
+
return options;
|
|
126
|
+
};
|
|
127
|
+
var getAdminNavRows = (navItems, pageOptions, minRows = 6, maxRows = 20) => {
|
|
128
|
+
const preferredRows = Math.max(navItems.length + 2, Math.min(8, pageOptions.length));
|
|
129
|
+
return Math.min(Math.max(minRows, preferredRows), maxRows);
|
|
130
|
+
};
|
|
131
|
+
var normalizeAdminNavInputs = (rows, pageOptions) => {
|
|
132
|
+
const allowedLinks = new Map(pageOptions.map((option) => [option.href, option.title]));
|
|
133
|
+
const deduped = [];
|
|
134
|
+
const seen = /* @__PURE__ */ new Set();
|
|
135
|
+
for (const row of rows) {
|
|
136
|
+
const href = typeof row.href === "string" ? row.href.trim() : "";
|
|
137
|
+
const defaultLabel = allowedLinks.get(href);
|
|
138
|
+
const explicitLabel = typeof row.label === "string" ? row.label.trim() : "";
|
|
139
|
+
const parentHref = typeof row.parentHref === "string" ? row.parentHref.trim() : "";
|
|
140
|
+
if (!href || !defaultLabel || seen.has(href)) {
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
seen.add(href);
|
|
144
|
+
deduped.push({
|
|
145
|
+
href,
|
|
146
|
+
label: explicitLabel.length > 0 ? explicitLabel : defaultLabel,
|
|
147
|
+
...parentHref.length > 0 ? { parentHref } : {}
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
const hrefs = new Set(deduped.map((item) => item.href));
|
|
151
|
+
const parentByHref = new Map(deduped.map((item) => [item.href, item.parentHref || ""]));
|
|
152
|
+
const createsCycle = (href, parentHref) => {
|
|
153
|
+
const visited = /* @__PURE__ */ new Set([href]);
|
|
154
|
+
let current = parentHref;
|
|
155
|
+
while (current) {
|
|
156
|
+
if (visited.has(current)) {
|
|
157
|
+
return true;
|
|
158
|
+
}
|
|
159
|
+
visited.add(current);
|
|
160
|
+
current = parentByHref.get(current) || "";
|
|
161
|
+
}
|
|
162
|
+
return false;
|
|
163
|
+
};
|
|
164
|
+
return deduped.map((item) => {
|
|
165
|
+
const parentHref = item.parentHref;
|
|
166
|
+
if (!parentHref || parentHref === item.href || !hrefs.has(parentHref) || createsCycle(item.href, parentHref)) {
|
|
167
|
+
return {
|
|
168
|
+
href: item.href,
|
|
169
|
+
label: item.label
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
return item;
|
|
173
|
+
});
|
|
174
|
+
};
|
|
175
|
+
var parseAdminHeaderNavFromForm = (formData, pageOptions, maxRows = 24) => {
|
|
176
|
+
const serialized = String(formData.get("navItemsState") || "").trim();
|
|
177
|
+
if (serialized.length > 0) {
|
|
178
|
+
try {
|
|
179
|
+
const parsed = JSON.parse(serialized);
|
|
180
|
+
if (Array.isArray(parsed)) {
|
|
181
|
+
return normalizeAdminNavInputs(parsed.slice(0, maxRows), pageOptions);
|
|
182
|
+
}
|
|
183
|
+
} catch {
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
const rawCount = Number(String(formData.get("navCount") || "0"));
|
|
187
|
+
const navCount = Number.isFinite(rawCount) ? Math.max(0, Math.min(rawCount, maxRows)) : 0;
|
|
188
|
+
const navRows = [];
|
|
189
|
+
for (let index = 0; index < navCount; index += 1) {
|
|
190
|
+
const href = String(formData.get(`navPage_${index}`) || "").trim();
|
|
191
|
+
const label = String(formData.get(`navLabel_${index}`) || "").trim();
|
|
192
|
+
const parentHref = String(formData.get(`navParentHref_${index}`) || "").trim();
|
|
193
|
+
navRows.push({
|
|
194
|
+
href,
|
|
195
|
+
label,
|
|
196
|
+
parentHref
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
if (navRows.length > 0) {
|
|
200
|
+
return normalizeAdminNavInputs(navRows, pageOptions);
|
|
201
|
+
}
|
|
202
|
+
return [];
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
// src/admin-app/routeRegistry.ts
|
|
206
|
+
var roleCanAccessNav = (role, item) => {
|
|
207
|
+
if (!item.roles || item.roles.length === 0) {
|
|
208
|
+
return true;
|
|
209
|
+
}
|
|
210
|
+
if (!role) {
|
|
211
|
+
return false;
|
|
212
|
+
}
|
|
213
|
+
return item.roles.includes(role);
|
|
214
|
+
};
|
|
215
|
+
var navItemIsActive = (pathname, item) => {
|
|
216
|
+
if (item.href === "/admin") {
|
|
217
|
+
return pathname === "/admin";
|
|
218
|
+
}
|
|
219
|
+
return item.matchPrefixes.some((prefix) => pathname.startsWith(prefix));
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
export {
|
|
223
|
+
AdminBreadcrumbs,
|
|
224
|
+
AdminPage,
|
|
225
|
+
normalizeNestedNavItems,
|
|
226
|
+
buildNestedNavTree,
|
|
227
|
+
buildAdminPageLinkOptions,
|
|
228
|
+
getAdminNavRows,
|
|
229
|
+
normalizeAdminNavInputs,
|
|
230
|
+
parseAdminHeaderNavFromForm,
|
|
231
|
+
roleCanAccessNav,
|
|
232
|
+
navItemIsActive,
|
|
233
|
+
admin_app_exports
|
|
234
|
+
};
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
import { CollectionBeforeOperationHook, CollectionConfig } from 'payload';
|
|
2
|
+
|
|
3
|
+
type SupportedImageMimeType = 'image/avif' | 'image/jpeg' | 'image/jpg' | 'image/png' | 'image/tiff' | 'image/webp';
|
|
4
|
+
type ImageUploadOptimizationOptions = {
|
|
5
|
+
avifQuality?: number;
|
|
6
|
+
enforceSmallerForLossy?: boolean;
|
|
7
|
+
jpegQuality?: number;
|
|
8
|
+
minQualityFloor?: number;
|
|
9
|
+
pngCompressionLevel?: number;
|
|
10
|
+
skipAnimated?: boolean;
|
|
11
|
+
supportedMimeTypes?: SupportedImageMimeType[];
|
|
12
|
+
tiffQuality?: number;
|
|
13
|
+
webpQuality?: number;
|
|
14
|
+
minBytes?: number;
|
|
15
|
+
onlyIfSmaller?: boolean;
|
|
16
|
+
};
|
|
17
|
+
declare const createImageUploadOptimizationHook: (options?: ImageUploadOptimizationOptions) => CollectionBeforeOperationHook;
|
|
18
|
+
declare const withImageUploadOptimization: <T extends CollectionConfig>(collection: T, options?: ImageUploadOptimizationOptions) => T;
|
|
19
|
+
|
|
1
20
|
type StudioNodeData = Record<string, unknown>;
|
|
2
21
|
type StudioNode = {
|
|
3
22
|
id: string;
|
|
@@ -41,9 +60,12 @@ type StudioPaletteGroup = {
|
|
|
41
60
|
label: string;
|
|
42
61
|
};
|
|
43
62
|
type StudioInspectorField = {
|
|
63
|
+
advanced?: boolean;
|
|
64
|
+
group?: 'advanced' | 'basics' | 'layout' | 'media' | 'style' | 'typography' | string;
|
|
65
|
+
inlineEditable?: boolean;
|
|
44
66
|
key: string;
|
|
45
67
|
label: string;
|
|
46
|
-
type: 'array' | 'checkbox' | 'number' | 'select' | 'text' | 'textarea';
|
|
68
|
+
type: 'array' | 'checkbox' | 'color' | 'number' | 'search' | 'select' | 'text' | 'textarea';
|
|
47
69
|
};
|
|
48
70
|
type StudioInspectorPanel = {
|
|
49
71
|
fields: StudioInspectorField[];
|
|
@@ -102,6 +124,7 @@ declare function validateStudioDocument(document: StudioDocumentV1, modules: Stu
|
|
|
102
124
|
declare function compileStudioDocument(document: StudioDocumentV1, modules: StudioModuleManifest[]): StudioCompileResult;
|
|
103
125
|
declare function migrateStudioDocument(value: unknown, migrations: StudioMigration[]): StudioDocumentV1;
|
|
104
126
|
|
|
127
|
+
type index_ImageUploadOptimizationOptions = ImageUploadOptimizationOptions;
|
|
105
128
|
type index_StudioCompileResult = StudioCompileResult;
|
|
106
129
|
type index_StudioDocumentV1 = StudioDocumentV1;
|
|
107
130
|
type index_StudioInspectorField = StudioInspectorField;
|
|
@@ -117,14 +140,17 @@ type index_StudioPaletteItem = StudioPaletteItem;
|
|
|
117
140
|
type index_StudioPermission = StudioPermission;
|
|
118
141
|
type index_StudioRegistry = StudioRegistry;
|
|
119
142
|
type index_StudioValidationIssue = StudioValidationIssue;
|
|
143
|
+
type index_SupportedImageMimeType = SupportedImageMimeType;
|
|
120
144
|
declare const index_assertStudioDocumentV1: typeof assertStudioDocumentV1;
|
|
121
145
|
declare const index_compileStudioDocument: typeof compileStudioDocument;
|
|
122
146
|
declare const index_createEmptyStudioDocument: typeof createEmptyStudioDocument;
|
|
147
|
+
declare const index_createImageUploadOptimizationHook: typeof createImageUploadOptimizationHook;
|
|
123
148
|
declare const index_createStudioRegistry: typeof createStudioRegistry;
|
|
124
149
|
declare const index_migrateStudioDocument: typeof migrateStudioDocument;
|
|
125
150
|
declare const index_validateStudioDocument: typeof validateStudioDocument;
|
|
151
|
+
declare const index_withImageUploadOptimization: typeof withImageUploadOptimization;
|
|
126
152
|
declare namespace index {
|
|
127
|
-
export { type index_StudioCompileResult as StudioCompileResult, type index_StudioDocumentV1 as StudioDocumentV1, type index_StudioInspectorField as StudioInspectorField, type index_StudioInspectorPanel as StudioInspectorPanel, type index_StudioMigration as StudioMigration, type index_StudioModuleManifest as StudioModuleManifest, type index_StudioNode as StudioNode, type index_StudioNodeData as StudioNodeData, type index_StudioNodeTypeDefinition as StudioNodeTypeDefinition, type index_StudioPageService as StudioPageService, type index_StudioPaletteGroup as StudioPaletteGroup, type index_StudioPaletteItem as StudioPaletteItem, type index_StudioPermission as StudioPermission, type index_StudioRegistry as StudioRegistry, type index_StudioValidationIssue as StudioValidationIssue, index_assertStudioDocumentV1 as assertStudioDocumentV1, index_compileStudioDocument as compileStudioDocument, index_createEmptyStudioDocument as createEmptyStudioDocument, index_createStudioRegistry as createStudioRegistry, index_migrateStudioDocument as migrateStudioDocument, index_validateStudioDocument as validateStudioDocument };
|
|
153
|
+
export { type index_ImageUploadOptimizationOptions as ImageUploadOptimizationOptions, type index_StudioCompileResult as StudioCompileResult, type index_StudioDocumentV1 as StudioDocumentV1, type index_StudioInspectorField as StudioInspectorField, type index_StudioInspectorPanel as StudioInspectorPanel, type index_StudioMigration as StudioMigration, type index_StudioModuleManifest as StudioModuleManifest, type index_StudioNode as StudioNode, type index_StudioNodeData as StudioNodeData, type index_StudioNodeTypeDefinition as StudioNodeTypeDefinition, type index_StudioPageService as StudioPageService, type index_StudioPaletteGroup as StudioPaletteGroup, type index_StudioPaletteItem as StudioPaletteItem, type index_StudioPermission as StudioPermission, type index_StudioRegistry as StudioRegistry, type index_StudioValidationIssue as StudioValidationIssue, type index_SupportedImageMimeType as SupportedImageMimeType, index_assertStudioDocumentV1 as assertStudioDocumentV1, index_compileStudioDocument as compileStudioDocument, index_createEmptyStudioDocument as createEmptyStudioDocument, index_createImageUploadOptimizationHook as createImageUploadOptimizationHook, index_createStudioRegistry as createStudioRegistry, index_migrateStudioDocument as migrateStudioDocument, index_validateStudioDocument as validateStudioDocument, index_withImageUploadOptimization as withImageUploadOptimization };
|
|
128
154
|
}
|
|
129
155
|
|
|
130
|
-
export { type StudioDocumentV1 as S, type StudioNodeTypeDefinition as a, type StudioModuleManifest as b, type StudioCompileResult as c, type StudioInspectorField as d, type StudioInspectorPanel as e, type StudioMigration as f, type StudioNode as g, type StudioNodeData as h, index as i, type StudioPageService as j, type StudioPaletteGroup as k, type StudioPaletteItem as l, type StudioPermission as m, type StudioRegistry as n, type StudioValidationIssue as o,
|
|
156
|
+
export { type ImageUploadOptimizationOptions as I, type StudioDocumentV1 as S, type StudioNodeTypeDefinition as a, type StudioModuleManifest as b, type StudioCompileResult as c, type StudioInspectorField as d, type StudioInspectorPanel as e, type StudioMigration as f, type StudioNode as g, type StudioNodeData as h, index as i, type StudioPageService as j, type StudioPaletteGroup as k, type StudioPaletteItem as l, type StudioPermission as m, type StudioRegistry as n, type StudioValidationIssue as o, type SupportedImageMimeType as p, assertStudioDocumentV1 as q, compileStudioDocument as r, createEmptyStudioDocument as s, createImageUploadOptimizationHook as t, createStudioRegistry as u, migrateStudioDocument as v, validateStudioDocument as w, withImageUploadOptimization as x };
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
import { CollectionBeforeOperationHook, CollectionConfig } from 'payload';
|
|
2
|
+
|
|
3
|
+
type SupportedImageMimeType = 'image/avif' | 'image/jpeg' | 'image/jpg' | 'image/png' | 'image/tiff' | 'image/webp';
|
|
4
|
+
type ImageUploadOptimizationOptions = {
|
|
5
|
+
avifQuality?: number;
|
|
6
|
+
enforceSmallerForLossy?: boolean;
|
|
7
|
+
jpegQuality?: number;
|
|
8
|
+
minQualityFloor?: number;
|
|
9
|
+
pngCompressionLevel?: number;
|
|
10
|
+
skipAnimated?: boolean;
|
|
11
|
+
supportedMimeTypes?: SupportedImageMimeType[];
|
|
12
|
+
tiffQuality?: number;
|
|
13
|
+
webpQuality?: number;
|
|
14
|
+
minBytes?: number;
|
|
15
|
+
onlyIfSmaller?: boolean;
|
|
16
|
+
};
|
|
17
|
+
declare const createImageUploadOptimizationHook: (options?: ImageUploadOptimizationOptions) => CollectionBeforeOperationHook;
|
|
18
|
+
declare const withImageUploadOptimization: <T extends CollectionConfig>(collection: T, options?: ImageUploadOptimizationOptions) => T;
|
|
19
|
+
|
|
1
20
|
type StudioNodeData = Record<string, unknown>;
|
|
2
21
|
type StudioNode = {
|
|
3
22
|
id: string;
|
|
@@ -41,9 +60,12 @@ type StudioPaletteGroup = {
|
|
|
41
60
|
label: string;
|
|
42
61
|
};
|
|
43
62
|
type StudioInspectorField = {
|
|
63
|
+
advanced?: boolean;
|
|
64
|
+
group?: 'advanced' | 'basics' | 'layout' | 'media' | 'style' | 'typography' | string;
|
|
65
|
+
inlineEditable?: boolean;
|
|
44
66
|
key: string;
|
|
45
67
|
label: string;
|
|
46
|
-
type: 'array' | 'checkbox' | 'number' | 'select' | 'text' | 'textarea';
|
|
68
|
+
type: 'array' | 'checkbox' | 'color' | 'number' | 'search' | 'select' | 'text' | 'textarea';
|
|
47
69
|
};
|
|
48
70
|
type StudioInspectorPanel = {
|
|
49
71
|
fields: StudioInspectorField[];
|
|
@@ -102,6 +124,7 @@ declare function validateStudioDocument(document: StudioDocumentV1, modules: Stu
|
|
|
102
124
|
declare function compileStudioDocument(document: StudioDocumentV1, modules: StudioModuleManifest[]): StudioCompileResult;
|
|
103
125
|
declare function migrateStudioDocument(value: unknown, migrations: StudioMigration[]): StudioDocumentV1;
|
|
104
126
|
|
|
127
|
+
type index_ImageUploadOptimizationOptions = ImageUploadOptimizationOptions;
|
|
105
128
|
type index_StudioCompileResult = StudioCompileResult;
|
|
106
129
|
type index_StudioDocumentV1 = StudioDocumentV1;
|
|
107
130
|
type index_StudioInspectorField = StudioInspectorField;
|
|
@@ -117,14 +140,17 @@ type index_StudioPaletteItem = StudioPaletteItem;
|
|
|
117
140
|
type index_StudioPermission = StudioPermission;
|
|
118
141
|
type index_StudioRegistry = StudioRegistry;
|
|
119
142
|
type index_StudioValidationIssue = StudioValidationIssue;
|
|
143
|
+
type index_SupportedImageMimeType = SupportedImageMimeType;
|
|
120
144
|
declare const index_assertStudioDocumentV1: typeof assertStudioDocumentV1;
|
|
121
145
|
declare const index_compileStudioDocument: typeof compileStudioDocument;
|
|
122
146
|
declare const index_createEmptyStudioDocument: typeof createEmptyStudioDocument;
|
|
147
|
+
declare const index_createImageUploadOptimizationHook: typeof createImageUploadOptimizationHook;
|
|
123
148
|
declare const index_createStudioRegistry: typeof createStudioRegistry;
|
|
124
149
|
declare const index_migrateStudioDocument: typeof migrateStudioDocument;
|
|
125
150
|
declare const index_validateStudioDocument: typeof validateStudioDocument;
|
|
151
|
+
declare const index_withImageUploadOptimization: typeof withImageUploadOptimization;
|
|
126
152
|
declare namespace index {
|
|
127
|
-
export { type index_StudioCompileResult as StudioCompileResult, type index_StudioDocumentV1 as StudioDocumentV1, type index_StudioInspectorField as StudioInspectorField, type index_StudioInspectorPanel as StudioInspectorPanel, type index_StudioMigration as StudioMigration, type index_StudioModuleManifest as StudioModuleManifest, type index_StudioNode as StudioNode, type index_StudioNodeData as StudioNodeData, type index_StudioNodeTypeDefinition as StudioNodeTypeDefinition, type index_StudioPageService as StudioPageService, type index_StudioPaletteGroup as StudioPaletteGroup, type index_StudioPaletteItem as StudioPaletteItem, type index_StudioPermission as StudioPermission, type index_StudioRegistry as StudioRegistry, type index_StudioValidationIssue as StudioValidationIssue, index_assertStudioDocumentV1 as assertStudioDocumentV1, index_compileStudioDocument as compileStudioDocument, index_createEmptyStudioDocument as createEmptyStudioDocument, index_createStudioRegistry as createStudioRegistry, index_migrateStudioDocument as migrateStudioDocument, index_validateStudioDocument as validateStudioDocument };
|
|
153
|
+
export { type index_ImageUploadOptimizationOptions as ImageUploadOptimizationOptions, type index_StudioCompileResult as StudioCompileResult, type index_StudioDocumentV1 as StudioDocumentV1, type index_StudioInspectorField as StudioInspectorField, type index_StudioInspectorPanel as StudioInspectorPanel, type index_StudioMigration as StudioMigration, type index_StudioModuleManifest as StudioModuleManifest, type index_StudioNode as StudioNode, type index_StudioNodeData as StudioNodeData, type index_StudioNodeTypeDefinition as StudioNodeTypeDefinition, type index_StudioPageService as StudioPageService, type index_StudioPaletteGroup as StudioPaletteGroup, type index_StudioPaletteItem as StudioPaletteItem, type index_StudioPermission as StudioPermission, type index_StudioRegistry as StudioRegistry, type index_StudioValidationIssue as StudioValidationIssue, type index_SupportedImageMimeType as SupportedImageMimeType, index_assertStudioDocumentV1 as assertStudioDocumentV1, index_compileStudioDocument as compileStudioDocument, index_createEmptyStudioDocument as createEmptyStudioDocument, index_createImageUploadOptimizationHook as createImageUploadOptimizationHook, index_createStudioRegistry as createStudioRegistry, index_migrateStudioDocument as migrateStudioDocument, index_validateStudioDocument as validateStudioDocument, index_withImageUploadOptimization as withImageUploadOptimization };
|
|
128
154
|
}
|
|
129
155
|
|
|
130
|
-
export { type StudioDocumentV1 as S, type StudioNodeTypeDefinition as a, type StudioModuleManifest as b, type StudioCompileResult as c, type StudioInspectorField as d, type StudioInspectorPanel as e, type StudioMigration as f, type StudioNode as g, type StudioNodeData as h, index as i, type StudioPageService as j, type StudioPaletteGroup as k, type StudioPaletteItem as l, type StudioPermission as m, type StudioRegistry as n, type StudioValidationIssue as o,
|
|
156
|
+
export { type ImageUploadOptimizationOptions as I, type StudioDocumentV1 as S, type StudioNodeTypeDefinition as a, type StudioModuleManifest as b, type StudioCompileResult as c, type StudioInspectorField as d, type StudioInspectorPanel as e, type StudioMigration as f, type StudioNode as g, type StudioNodeData as h, index as i, type StudioPageService as j, type StudioPaletteGroup as k, type StudioPaletteItem as l, type StudioPermission as m, type StudioRegistry as n, type StudioValidationIssue as o, type SupportedImageMimeType as p, assertStudioDocumentV1 as q, compileStudioDocument as r, createEmptyStudioDocument as s, createImageUploadOptimizationHook as t, createStudioRegistry as u, migrateStudioDocument as v, validateStudioDocument as w, withImageUploadOptimization as x };
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { S as StudioDocumentV1, a as StudioNodeTypeDefinition, b as StudioModuleManifest } from './index-BIwu3qIH.mjs';
|
|
2
|
+
|
|
3
|
+
type InspectorGroupKey = 'advanced' | 'basics' | 'layout' | 'media' | 'style' | 'typography';
|
|
4
|
+
type InspectorFieldType = 'checkbox' | 'color' | 'number' | 'search' | 'select' | 'text' | 'textarea';
|
|
5
|
+
|
|
6
|
+
type BuilderSettingsPanelMode = 'advanced' | 'basic';
|
|
7
|
+
type BuilderTextAlign = 'center' | 'justify' | 'left' | 'right';
|
|
8
|
+
type BuilderTypographySpacingPreset = 'normal' | 'relaxed' | 'tight';
|
|
9
|
+
type BuilderLayoutSettingsV2 = {
|
|
10
|
+
contentWidth?: 'content' | 'full' | 'inherit' | 'narrow' | 'wide';
|
|
11
|
+
sectionPaddingX?: 'inherit' | 'lg' | 'md' | 'none' | 'sm';
|
|
12
|
+
sectionPaddingY?: 'lg' | 'md' | 'none' | 'sm';
|
|
13
|
+
};
|
|
14
|
+
type BuilderTypographySettingsV2 = {
|
|
15
|
+
bodyAlign?: BuilderTextAlign;
|
|
16
|
+
headingAlign?: BuilderTextAlign;
|
|
17
|
+
letterSpacingPreset?: BuilderTypographySpacingPreset;
|
|
18
|
+
lineHeightPreset?: BuilderTypographySpacingPreset;
|
|
19
|
+
maxTextWidth?: 'auto' | 'full' | 'lg' | 'md' | 'sm';
|
|
20
|
+
};
|
|
21
|
+
type BuilderMediaSettingsV2 = {
|
|
22
|
+
cornerStyle?: 'rounded' | 'square';
|
|
23
|
+
fit?: 'contain' | 'cover';
|
|
24
|
+
height?: number | null;
|
|
25
|
+
position?: 'bottom' | 'center' | 'left' | 'right' | 'top';
|
|
26
|
+
positionX?: number | null;
|
|
27
|
+
positionY?: number | null;
|
|
28
|
+
};
|
|
29
|
+
type BuilderAppearanceSettingsV2 = {
|
|
30
|
+
contentBackgroundColor?: string;
|
|
31
|
+
contentBackgroundMode?: 'color' | 'gradient' | 'none';
|
|
32
|
+
contentGradientAngle?: string;
|
|
33
|
+
contentGradientFrom?: string;
|
|
34
|
+
contentGradientPreset?: string;
|
|
35
|
+
contentGradientTo?: string;
|
|
36
|
+
sectionBackgroundColor?: string;
|
|
37
|
+
sectionBackgroundMode?: 'color' | 'gradient' | 'none';
|
|
38
|
+
sectionGradientAngle?: string;
|
|
39
|
+
sectionGradientFrom?: string;
|
|
40
|
+
sectionGradientPreset?: string;
|
|
41
|
+
sectionGradientTo?: string;
|
|
42
|
+
};
|
|
43
|
+
type BuilderAdvancedSettingsV2 = {
|
|
44
|
+
customClassName?: string;
|
|
45
|
+
editCopyInPanel?: boolean;
|
|
46
|
+
hideOnMobile?: boolean;
|
|
47
|
+
};
|
|
48
|
+
type BuilderBlockSettingsV2 = {
|
|
49
|
+
advanced: BuilderAdvancedSettingsV2;
|
|
50
|
+
appearance: BuilderAppearanceSettingsV2;
|
|
51
|
+
layout: BuilderLayoutSettingsV2;
|
|
52
|
+
media: BuilderMediaSettingsV2;
|
|
53
|
+
typography: BuilderTypographySettingsV2;
|
|
54
|
+
version: 2;
|
|
55
|
+
};
|
|
56
|
+
type BuilderThemeScale = 'lg' | 'md' | 'sm' | 'xl';
|
|
57
|
+
type BuilderThemeTokens = {
|
|
58
|
+
colors: {
|
|
59
|
+
accent: string;
|
|
60
|
+
bodyText: string;
|
|
61
|
+
headingText: string;
|
|
62
|
+
surface: string;
|
|
63
|
+
};
|
|
64
|
+
radii: {
|
|
65
|
+
card: number;
|
|
66
|
+
panel: number;
|
|
67
|
+
};
|
|
68
|
+
spacing: {
|
|
69
|
+
sectionGap: BuilderThemeScale;
|
|
70
|
+
sectionPadding: BuilderThemeScale;
|
|
71
|
+
};
|
|
72
|
+
typography: {
|
|
73
|
+
bodySize: BuilderThemeScale;
|
|
74
|
+
headingSize: BuilderThemeScale;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
type BuilderThemeTokenOverrides = {
|
|
78
|
+
[K in keyof BuilderThemeTokens]?: BuilderThemeTokens[K] extends Record<string, unknown> ? Partial<BuilderThemeTokens[K]> : BuilderThemeTokens[K];
|
|
79
|
+
};
|
|
80
|
+
type BuilderThemeTokenLayers = {
|
|
81
|
+
block?: BuilderThemeTokenOverrides;
|
|
82
|
+
page?: BuilderThemeTokenOverrides;
|
|
83
|
+
site?: BuilderThemeTokenOverrides;
|
|
84
|
+
};
|
|
85
|
+
declare const defaultBuilderThemeTokens: BuilderThemeTokens;
|
|
86
|
+
|
|
87
|
+
declare const resolveBuilderThemeTokens: (layers: BuilderThemeTokenLayers) => BuilderThemeTokens;
|
|
88
|
+
|
|
89
|
+
declare const pageNodeTypes: StudioNodeTypeDefinition[];
|
|
90
|
+
declare const pagePaletteGroups: {
|
|
91
|
+
id: string;
|
|
92
|
+
label: string;
|
|
93
|
+
items: {
|
|
94
|
+
nodeType: string;
|
|
95
|
+
title: string;
|
|
96
|
+
description: string;
|
|
97
|
+
}[];
|
|
98
|
+
}[];
|
|
99
|
+
declare const pageInspectorPanels: {
|
|
100
|
+
id: string;
|
|
101
|
+
label: string;
|
|
102
|
+
nodeType: string;
|
|
103
|
+
fields: {
|
|
104
|
+
advanced: boolean | undefined;
|
|
105
|
+
group: InspectorGroupKey;
|
|
106
|
+
inlineEditable: boolean | undefined;
|
|
107
|
+
key: string;
|
|
108
|
+
label: string;
|
|
109
|
+
type: InspectorFieldType;
|
|
110
|
+
}[];
|
|
111
|
+
}[];
|
|
112
|
+
declare const pageStudioModuleManifest: StudioModuleManifest;
|
|
113
|
+
declare const layoutToStudioDocument: (layout: Array<Record<string, unknown>>, title?: string, metadata?: Record<string, unknown>) => StudioDocumentV1;
|
|
114
|
+
declare const studioDocumentToLayout: (document: StudioDocumentV1) => Array<Record<string, unknown>>;
|
|
115
|
+
declare const createDefaultStudioDocument: (title?: string) => StudioDocumentV1;
|
|
116
|
+
|
|
117
|
+
type index_BuilderBlockSettingsV2 = BuilderBlockSettingsV2;
|
|
118
|
+
type index_BuilderSettingsPanelMode = BuilderSettingsPanelMode;
|
|
119
|
+
type index_BuilderThemeTokenOverrides = BuilderThemeTokenOverrides;
|
|
120
|
+
type index_BuilderThemeTokens = BuilderThemeTokens;
|
|
121
|
+
declare const index_createDefaultStudioDocument: typeof createDefaultStudioDocument;
|
|
122
|
+
declare const index_defaultBuilderThemeTokens: typeof defaultBuilderThemeTokens;
|
|
123
|
+
declare const index_layoutToStudioDocument: typeof layoutToStudioDocument;
|
|
124
|
+
declare const index_pageInspectorPanels: typeof pageInspectorPanels;
|
|
125
|
+
declare const index_pageNodeTypes: typeof pageNodeTypes;
|
|
126
|
+
declare const index_pagePaletteGroups: typeof pagePaletteGroups;
|
|
127
|
+
declare const index_pageStudioModuleManifest: typeof pageStudioModuleManifest;
|
|
128
|
+
declare const index_resolveBuilderThemeTokens: typeof resolveBuilderThemeTokens;
|
|
129
|
+
declare const index_studioDocumentToLayout: typeof studioDocumentToLayout;
|
|
130
|
+
declare namespace index {
|
|
131
|
+
export { type index_BuilderBlockSettingsV2 as BuilderBlockSettingsV2, type index_BuilderSettingsPanelMode as BuilderSettingsPanelMode, type index_BuilderThemeTokenOverrides as BuilderThemeTokenOverrides, type index_BuilderThemeTokens as BuilderThemeTokens, index_createDefaultStudioDocument as createDefaultStudioDocument, index_defaultBuilderThemeTokens as defaultBuilderThemeTokens, index_layoutToStudioDocument as layoutToStudioDocument, index_pageInspectorPanels as pageInspectorPanels, index_pageNodeTypes as pageNodeTypes, index_pagePaletteGroups as pagePaletteGroups, index_pageStudioModuleManifest as pageStudioModuleManifest, index_resolveBuilderThemeTokens as resolveBuilderThemeTokens, index_studioDocumentToLayout as studioDocumentToLayout };
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export { type BuilderBlockSettingsV2 as B, type BuilderSettingsPanelMode as a, type BuilderThemeTokenOverrides as b, type BuilderThemeTokens as c, createDefaultStudioDocument as d, defaultBuilderThemeTokens as e, pageNodeTypes as f, pagePaletteGroups as g, pageStudioModuleManifest as h, index as i, layoutToStudioDocument as l, pageInspectorPanels as p, resolveBuilderThemeTokens as r, studioDocumentToLayout as s };
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { S as StudioDocumentV1, a as StudioNodeTypeDefinition, b as StudioModuleManifest } from './index-BIwu3qIH.js';
|
|
2
|
+
|
|
3
|
+
type InspectorGroupKey = 'advanced' | 'basics' | 'layout' | 'media' | 'style' | 'typography';
|
|
4
|
+
type InspectorFieldType = 'checkbox' | 'color' | 'number' | 'search' | 'select' | 'text' | 'textarea';
|
|
5
|
+
|
|
6
|
+
type BuilderSettingsPanelMode = 'advanced' | 'basic';
|
|
7
|
+
type BuilderTextAlign = 'center' | 'justify' | 'left' | 'right';
|
|
8
|
+
type BuilderTypographySpacingPreset = 'normal' | 'relaxed' | 'tight';
|
|
9
|
+
type BuilderLayoutSettingsV2 = {
|
|
10
|
+
contentWidth?: 'content' | 'full' | 'inherit' | 'narrow' | 'wide';
|
|
11
|
+
sectionPaddingX?: 'inherit' | 'lg' | 'md' | 'none' | 'sm';
|
|
12
|
+
sectionPaddingY?: 'lg' | 'md' | 'none' | 'sm';
|
|
13
|
+
};
|
|
14
|
+
type BuilderTypographySettingsV2 = {
|
|
15
|
+
bodyAlign?: BuilderTextAlign;
|
|
16
|
+
headingAlign?: BuilderTextAlign;
|
|
17
|
+
letterSpacingPreset?: BuilderTypographySpacingPreset;
|
|
18
|
+
lineHeightPreset?: BuilderTypographySpacingPreset;
|
|
19
|
+
maxTextWidth?: 'auto' | 'full' | 'lg' | 'md' | 'sm';
|
|
20
|
+
};
|
|
21
|
+
type BuilderMediaSettingsV2 = {
|
|
22
|
+
cornerStyle?: 'rounded' | 'square';
|
|
23
|
+
fit?: 'contain' | 'cover';
|
|
24
|
+
height?: number | null;
|
|
25
|
+
position?: 'bottom' | 'center' | 'left' | 'right' | 'top';
|
|
26
|
+
positionX?: number | null;
|
|
27
|
+
positionY?: number | null;
|
|
28
|
+
};
|
|
29
|
+
type BuilderAppearanceSettingsV2 = {
|
|
30
|
+
contentBackgroundColor?: string;
|
|
31
|
+
contentBackgroundMode?: 'color' | 'gradient' | 'none';
|
|
32
|
+
contentGradientAngle?: string;
|
|
33
|
+
contentGradientFrom?: string;
|
|
34
|
+
contentGradientPreset?: string;
|
|
35
|
+
contentGradientTo?: string;
|
|
36
|
+
sectionBackgroundColor?: string;
|
|
37
|
+
sectionBackgroundMode?: 'color' | 'gradient' | 'none';
|
|
38
|
+
sectionGradientAngle?: string;
|
|
39
|
+
sectionGradientFrom?: string;
|
|
40
|
+
sectionGradientPreset?: string;
|
|
41
|
+
sectionGradientTo?: string;
|
|
42
|
+
};
|
|
43
|
+
type BuilderAdvancedSettingsV2 = {
|
|
44
|
+
customClassName?: string;
|
|
45
|
+
editCopyInPanel?: boolean;
|
|
46
|
+
hideOnMobile?: boolean;
|
|
47
|
+
};
|
|
48
|
+
type BuilderBlockSettingsV2 = {
|
|
49
|
+
advanced: BuilderAdvancedSettingsV2;
|
|
50
|
+
appearance: BuilderAppearanceSettingsV2;
|
|
51
|
+
layout: BuilderLayoutSettingsV2;
|
|
52
|
+
media: BuilderMediaSettingsV2;
|
|
53
|
+
typography: BuilderTypographySettingsV2;
|
|
54
|
+
version: 2;
|
|
55
|
+
};
|
|
56
|
+
type BuilderThemeScale = 'lg' | 'md' | 'sm' | 'xl';
|
|
57
|
+
type BuilderThemeTokens = {
|
|
58
|
+
colors: {
|
|
59
|
+
accent: string;
|
|
60
|
+
bodyText: string;
|
|
61
|
+
headingText: string;
|
|
62
|
+
surface: string;
|
|
63
|
+
};
|
|
64
|
+
radii: {
|
|
65
|
+
card: number;
|
|
66
|
+
panel: number;
|
|
67
|
+
};
|
|
68
|
+
spacing: {
|
|
69
|
+
sectionGap: BuilderThemeScale;
|
|
70
|
+
sectionPadding: BuilderThemeScale;
|
|
71
|
+
};
|
|
72
|
+
typography: {
|
|
73
|
+
bodySize: BuilderThemeScale;
|
|
74
|
+
headingSize: BuilderThemeScale;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
type BuilderThemeTokenOverrides = {
|
|
78
|
+
[K in keyof BuilderThemeTokens]?: BuilderThemeTokens[K] extends Record<string, unknown> ? Partial<BuilderThemeTokens[K]> : BuilderThemeTokens[K];
|
|
79
|
+
};
|
|
80
|
+
type BuilderThemeTokenLayers = {
|
|
81
|
+
block?: BuilderThemeTokenOverrides;
|
|
82
|
+
page?: BuilderThemeTokenOverrides;
|
|
83
|
+
site?: BuilderThemeTokenOverrides;
|
|
84
|
+
};
|
|
85
|
+
declare const defaultBuilderThemeTokens: BuilderThemeTokens;
|
|
86
|
+
|
|
87
|
+
declare const resolveBuilderThemeTokens: (layers: BuilderThemeTokenLayers) => BuilderThemeTokens;
|
|
88
|
+
|
|
89
|
+
declare const pageNodeTypes: StudioNodeTypeDefinition[];
|
|
90
|
+
declare const pagePaletteGroups: {
|
|
91
|
+
id: string;
|
|
92
|
+
label: string;
|
|
93
|
+
items: {
|
|
94
|
+
nodeType: string;
|
|
95
|
+
title: string;
|
|
96
|
+
description: string;
|
|
97
|
+
}[];
|
|
98
|
+
}[];
|
|
99
|
+
declare const pageInspectorPanels: {
|
|
100
|
+
id: string;
|
|
101
|
+
label: string;
|
|
102
|
+
nodeType: string;
|
|
103
|
+
fields: {
|
|
104
|
+
advanced: boolean | undefined;
|
|
105
|
+
group: InspectorGroupKey;
|
|
106
|
+
inlineEditable: boolean | undefined;
|
|
107
|
+
key: string;
|
|
108
|
+
label: string;
|
|
109
|
+
type: InspectorFieldType;
|
|
110
|
+
}[];
|
|
111
|
+
}[];
|
|
112
|
+
declare const pageStudioModuleManifest: StudioModuleManifest;
|
|
113
|
+
declare const layoutToStudioDocument: (layout: Array<Record<string, unknown>>, title?: string, metadata?: Record<string, unknown>) => StudioDocumentV1;
|
|
114
|
+
declare const studioDocumentToLayout: (document: StudioDocumentV1) => Array<Record<string, unknown>>;
|
|
115
|
+
declare const createDefaultStudioDocument: (title?: string) => StudioDocumentV1;
|
|
116
|
+
|
|
117
|
+
type index_BuilderBlockSettingsV2 = BuilderBlockSettingsV2;
|
|
118
|
+
type index_BuilderSettingsPanelMode = BuilderSettingsPanelMode;
|
|
119
|
+
type index_BuilderThemeTokenOverrides = BuilderThemeTokenOverrides;
|
|
120
|
+
type index_BuilderThemeTokens = BuilderThemeTokens;
|
|
121
|
+
declare const index_createDefaultStudioDocument: typeof createDefaultStudioDocument;
|
|
122
|
+
declare const index_defaultBuilderThemeTokens: typeof defaultBuilderThemeTokens;
|
|
123
|
+
declare const index_layoutToStudioDocument: typeof layoutToStudioDocument;
|
|
124
|
+
declare const index_pageInspectorPanels: typeof pageInspectorPanels;
|
|
125
|
+
declare const index_pageNodeTypes: typeof pageNodeTypes;
|
|
126
|
+
declare const index_pagePaletteGroups: typeof pagePaletteGroups;
|
|
127
|
+
declare const index_pageStudioModuleManifest: typeof pageStudioModuleManifest;
|
|
128
|
+
declare const index_resolveBuilderThemeTokens: typeof resolveBuilderThemeTokens;
|
|
129
|
+
declare const index_studioDocumentToLayout: typeof studioDocumentToLayout;
|
|
130
|
+
declare namespace index {
|
|
131
|
+
export { type index_BuilderBlockSettingsV2 as BuilderBlockSettingsV2, type index_BuilderSettingsPanelMode as BuilderSettingsPanelMode, type index_BuilderThemeTokenOverrides as BuilderThemeTokenOverrides, type index_BuilderThemeTokens as BuilderThemeTokens, index_createDefaultStudioDocument as createDefaultStudioDocument, index_defaultBuilderThemeTokens as defaultBuilderThemeTokens, index_layoutToStudioDocument as layoutToStudioDocument, index_pageInspectorPanels as pageInspectorPanels, index_pageNodeTypes as pageNodeTypes, index_pagePaletteGroups as pagePaletteGroups, index_pageStudioModuleManifest as pageStudioModuleManifest, index_resolveBuilderThemeTokens as resolveBuilderThemeTokens, index_studioDocumentToLayout as studioDocumentToLayout };
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export { type BuilderBlockSettingsV2 as B, type BuilderSettingsPanelMode as a, type BuilderThemeTokenOverrides as b, type BuilderThemeTokens as c, createDefaultStudioDocument as d, defaultBuilderThemeTokens as e, pageNodeTypes as f, pagePaletteGroups as g, pageStudioModuleManifest as h, index as i, layoutToStudioDocument as l, pageInspectorPanels as p, resolveBuilderThemeTokens as r, studioDocumentToLayout as s };
|