@orion-studios/payload-studio 0.6.0-beta.9 → 0.7.0
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 +6 -1
- package/bin/init.js +329 -0
- package/dist/admin/client.js +2106 -585
- package/dist/admin/client.mjs +2161 -653
- package/dist/admin/index.d.mts +2 -2
- package/dist/admin/index.d.ts +2 -2
- package/dist/admin/index.js +190 -36
- package/dist/admin/index.mjs +2 -2
- package/dist/admin-app/client.js +14 -5
- package/dist/admin-app/client.mjs +1 -1
- package/dist/admin-app/index.d.mts +2 -2
- package/dist/admin-app/index.d.ts +2 -2
- package/dist/admin-app/styles.css +361 -41
- package/dist/admin.css +98 -2
- package/dist/blocks/index.mjs +1 -2
- package/dist/builder-v2/client.d.mts +18 -0
- package/dist/builder-v2/client.d.ts +18 -0
- package/dist/builder-v2/client.js +4287 -0
- package/dist/builder-v2/client.mjs +4162 -0
- package/dist/builder-v2/index.d.mts +249 -0
- package/dist/builder-v2/index.d.ts +249 -0
- package/dist/builder-v2/index.js +836 -0
- package/dist/builder-v2/index.mjs +786 -0
- package/dist/builder-v2/styles.css +2705 -0
- package/dist/{chunk-PF3EBZXF.mjs → chunk-7ZMXZRBP.mjs} +39 -3
- package/dist/{chunk-XKUTZ7IU.mjs → chunk-DTHBPJXU.mjs} +246 -25
- package/dist/{chunk-JQAHXYAM.mjs → chunk-KMYMSR7W.mjs} +163 -3
- package/dist/{chunk-WLOPFFN2.mjs → chunk-MMJNHBOF.mjs} +193 -39
- package/dist/{chunk-KPIX7OSV.mjs → chunk-NF37A575.mjs} +14 -5
- package/dist/{chunk-OTHERBGX.mjs → chunk-OF6BATTO.mjs} +57 -112
- package/dist/chunk-VA545CHJ.mjs +202 -0
- package/dist/forms/index.d.mts +25 -0
- package/dist/forms/index.d.ts +25 -0
- package/dist/forms/index.js +237 -0
- package/dist/forms/index.mjs +25 -0
- package/dist/forms/server.d.mts +35 -0
- package/dist/forms/server.d.ts +35 -0
- package/dist/forms/server.js +442 -0
- package/dist/forms/server.mjs +228 -0
- package/dist/{index-Crx_MtPw.d.ts → index-0xXWuOuz.d.ts} +38 -6
- package/dist/{index-Cv-6qnrw.d.mts → index-BU82akSL.d.mts} +38 -6
- package/dist/{index-Bm2SaC3r.d.mts → index-BbTcimgH.d.mts} +4 -2
- package/dist/{index-D8BNfUJb.d.mts → index-Cen-9wcc.d.mts} +17 -5
- package/dist/{index-52HdVLQq.d.ts → index-DAdN56fM.d.ts} +1 -1
- package/dist/{index-CkT_eyhK.d.ts → index-DV-nW43e.d.ts} +4 -2
- package/dist/{index-DEQC3Dwj.d.mts → index-G_uTNffQ.d.mts} +1 -1
- package/dist/{index-DD_E2UfJ.d.ts → index-gxcMPpm-.d.ts} +17 -5
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +522 -171
- package/dist/index.mjs +10 -11
- package/dist/nextjs/index.d.mts +1 -1
- package/dist/nextjs/index.d.ts +1 -1
- package/dist/nextjs/index.js +95 -114
- package/dist/nextjs/index.mjs +2 -2
- package/dist/{sitePreviewTypes-BkHCWxNW.d.mts → sitePreviewTypes-BrJwGzJj.d.mts} +1 -1
- package/dist/{sitePreviewTypes-BkHCWxNW.d.ts → sitePreviewTypes-BrJwGzJj.d.ts} +1 -1
- package/dist/studio-pages/builder.css +66 -5
- package/dist/studio-pages/client.js +618 -73
- package/dist/studio-pages/client.mjs +641 -96
- package/dist/studio-pages/index.d.mts +1 -1
- package/dist/studio-pages/index.d.ts +1 -1
- package/dist/studio-pages/index.js +1893 -24
- package/dist/studio-pages/index.mjs +11 -3
- package/package.json +38 -3
- package/dist/chunk-OQSEJXC4.mjs +0 -166
package/dist/index.mjs
CHANGED
|
@@ -1,25 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
nextjs_exports
|
|
3
|
+
} from "./chunk-OF6BATTO.mjs";
|
|
1
4
|
import {
|
|
2
5
|
admin_exports
|
|
3
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MMJNHBOF.mjs";
|
|
7
|
+
import "./chunk-ZTXJG4K5.mjs";
|
|
4
8
|
import {
|
|
5
9
|
admin_app_exports
|
|
6
10
|
} from "./chunk-RKTIFEUY.mjs";
|
|
7
11
|
import "./chunk-W2UOCJDX.mjs";
|
|
8
|
-
import {
|
|
9
|
-
blocks_exports
|
|
10
|
-
} from "./chunk-JQAHXYAM.mjs";
|
|
11
|
-
import {
|
|
12
|
-
nextjs_exports
|
|
13
|
-
} from "./chunk-OTHERBGX.mjs";
|
|
14
|
-
import "./chunk-ZTXJG4K5.mjs";
|
|
15
12
|
import {
|
|
16
13
|
studio_pages_exports
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-PF3EBZXF.mjs";
|
|
14
|
+
} from "./chunk-DTHBPJXU.mjs";
|
|
15
|
+
import "./chunk-7ZMXZRBP.mjs";
|
|
20
16
|
import {
|
|
21
17
|
studio_exports
|
|
22
18
|
} from "./chunk-ADIIWIYL.mjs";
|
|
19
|
+
import {
|
|
20
|
+
blocks_exports
|
|
21
|
+
} from "./chunk-KMYMSR7W.mjs";
|
|
23
22
|
import "./chunk-6BWS3CLP.mjs";
|
|
24
23
|
export {
|
|
25
24
|
admin_exports as admin,
|
package/dist/nextjs/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { F as FooterData, H as HeaderData, R as ResolvedSocialMediaLink, S as SiteNavItem, a as SiteSettingsData, W as WEBSITE_CONTENT_TAG, c as createPageQueries, b as createPayloadClient, d as createSiteQueries, r as resolveMedia, e as resolveSocialMediaLinks } from '../index-
|
|
1
|
+
export { F as FooterData, H as HeaderData, R as ResolvedSocialMediaLink, S as SiteNavItem, a as SiteSettingsData, W as WEBSITE_CONTENT_TAG, c as createPageQueries, b as createPayloadClient, d as createSiteQueries, r as resolveMedia, e as resolveSocialMediaLinks } from '../index-Cen-9wcc.mjs';
|
|
2
2
|
export { S as SocialMediaGlobalData } from '../socialMedia-C05Iy-SV.mjs';
|
|
3
3
|
import 'payload';
|
package/dist/nextjs/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { F as FooterData, H as HeaderData, R as ResolvedSocialMediaLink, S as SiteNavItem, a as SiteSettingsData, W as WEBSITE_CONTENT_TAG, c as createPageQueries, b as createPayloadClient, d as createSiteQueries, r as resolveMedia, e as resolveSocialMediaLinks } from '../index-
|
|
1
|
+
export { F as FooterData, H as HeaderData, R as ResolvedSocialMediaLink, S as SiteNavItem, a as SiteSettingsData, W as WEBSITE_CONTENT_TAG, c as createPageQueries, b as createPayloadClient, d as createSiteQueries, r as resolveMedia, e as resolveSocialMediaLinks } from '../index-gxcMPpm-.js';
|
|
2
2
|
export { S as SocialMediaGlobalData } from '../socialMedia-C05Iy-SV.js';
|
|
3
3
|
import 'payload';
|
package/dist/nextjs/index.js
CHANGED
|
@@ -31,12 +31,15 @@ module.exports = __toCommonJS(nextjs_exports);
|
|
|
31
31
|
|
|
32
32
|
// src/nextjs/client/payload.ts
|
|
33
33
|
var import_payload = require("payload");
|
|
34
|
-
var payloadPromise = null;
|
|
35
34
|
var WEBSITE_CONTENT_TAG = "website-content";
|
|
36
35
|
function createPayloadClient(config) {
|
|
36
|
+
let payloadPromise = null;
|
|
37
37
|
return function getPayloadClient() {
|
|
38
38
|
if (!payloadPromise) {
|
|
39
|
-
payloadPromise = (0, import_payload.getPayload)({ config })
|
|
39
|
+
payloadPromise = Promise.resolve(config).then((resolvedConfig) => (0, import_payload.getPayload)({ config: resolvedConfig })).catch((error) => {
|
|
40
|
+
payloadPromise = null;
|
|
41
|
+
throw error;
|
|
42
|
+
});
|
|
40
43
|
}
|
|
41
44
|
return payloadPromise;
|
|
42
45
|
};
|
|
@@ -127,7 +130,9 @@ var defaultBuilderBlockSettingsV2 = {
|
|
|
127
130
|
},
|
|
128
131
|
typography: {
|
|
129
132
|
bodyAlign: "left",
|
|
133
|
+
bodySizePt: null,
|
|
130
134
|
headingAlign: "left",
|
|
135
|
+
headingSizePt: null,
|
|
131
136
|
letterSpacingPreset: "normal",
|
|
132
137
|
lineHeightPreset: "normal",
|
|
133
138
|
maxTextWidth: "auto"
|
|
@@ -156,7 +161,9 @@ var defaultBuilderItemSettingsV2 = {
|
|
|
156
161
|
},
|
|
157
162
|
typography: {
|
|
158
163
|
bodyAlign: "left",
|
|
164
|
+
bodySizePt: null,
|
|
159
165
|
headingAlign: "left",
|
|
166
|
+
headingSizePt: null,
|
|
160
167
|
letterSpacingPreset: "normal",
|
|
161
168
|
lineHeightPreset: "normal",
|
|
162
169
|
maxTextWidth: "auto"
|
|
@@ -166,6 +173,7 @@ var defaultBuilderItemSettingsV2 = {
|
|
|
166
173
|
|
|
167
174
|
// src/studio-pages/builder/adapters/settingsV2.ts
|
|
168
175
|
var isRecord2 = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
176
|
+
var isTextAlign = (value) => value === "left" || value === "center" || value === "right" || value === "justify";
|
|
169
177
|
var parsePercent = (value) => {
|
|
170
178
|
if (typeof value === "number" && Number.isFinite(value)) {
|
|
171
179
|
return Math.max(0, Math.min(100, value));
|
|
@@ -190,6 +198,18 @@ var parsePixel = (value) => {
|
|
|
190
198
|
}
|
|
191
199
|
return null;
|
|
192
200
|
};
|
|
201
|
+
var parsePoint = (value) => {
|
|
202
|
+
if (typeof value === "number" && Number.isFinite(value)) {
|
|
203
|
+
return Math.max(6, Math.min(120, Math.round(value)));
|
|
204
|
+
}
|
|
205
|
+
if (typeof value === "string" && value.trim().length > 0) {
|
|
206
|
+
const parsed = Number(value);
|
|
207
|
+
if (Number.isFinite(parsed)) {
|
|
208
|
+
return Math.max(6, Math.min(120, Math.round(parsed)));
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
return null;
|
|
212
|
+
};
|
|
193
213
|
var mergeSettings = (defaults, input) => {
|
|
194
214
|
if (!isRecord2(input)) {
|
|
195
215
|
return structuredClone(defaults);
|
|
@@ -208,6 +228,10 @@ var mergeSettings = (defaults, input) => {
|
|
|
208
228
|
};
|
|
209
229
|
var legacyBlockToV2Settings = (block) => {
|
|
210
230
|
const current = structuredClone(defaultBuilderBlockSettingsV2);
|
|
231
|
+
if (block.blockType === "hero" && block.variant === "centered") {
|
|
232
|
+
current.typography.headingAlign = "center";
|
|
233
|
+
current.typography.bodyAlign = "center";
|
|
234
|
+
}
|
|
211
235
|
current.layout.contentWidth = block.contentWidth === "narrow" || block.contentWidth === "content" || block.contentWidth === "wide" || block.contentWidth === "full" || block.contentWidth === "inherit" ? block.contentWidth : current.layout.contentWidth;
|
|
212
236
|
current.layout.sectionPaddingX = block.sectionPaddingX === "none" || block.sectionPaddingX === "sm" || block.sectionPaddingX === "md" || block.sectionPaddingX === "lg" || block.sectionPaddingX === "inherit" ? block.sectionPaddingX : current.layout.sectionPaddingX;
|
|
213
237
|
current.layout.sectionPaddingY = block.sectionPaddingY === "none" || block.sectionPaddingY === "sm" || block.sectionPaddingY === "lg" ? block.sectionPaddingY : current.layout.sectionPaddingY;
|
|
@@ -244,15 +268,28 @@ var legacyBlockToV2Settings = (block) => {
|
|
|
244
268
|
current.media.positionX = parsePercent(block.imagePositionX ?? block.backgroundImagePositionX);
|
|
245
269
|
current.media.positionY = parsePercent(block.imagePositionY ?? block.backgroundImagePositionY);
|
|
246
270
|
current.media.height = parsePixel(block.imageHeight);
|
|
247
|
-
current.typography.headingAlign = block.textHeadingAlign
|
|
248
|
-
current.typography.bodyAlign = block.textBodyAlign
|
|
271
|
+
current.typography.headingAlign = isTextAlign(block.textHeadingAlign) ? block.textHeadingAlign : current.typography.headingAlign;
|
|
272
|
+
current.typography.bodyAlign = isTextAlign(block.textBodyAlign) ? block.textBodyAlign : current.typography.bodyAlign;
|
|
273
|
+
current.typography.headingSizePt = parsePoint(block.textHeadingSizePt);
|
|
274
|
+
current.typography.bodySizePt = parsePoint(block.textBodySizePt);
|
|
249
275
|
current.typography.maxTextWidth = block.textMaxWidth === "auto" || block.textMaxWidth === "sm" || block.textMaxWidth === "md" || block.textMaxWidth === "lg" || block.textMaxWidth === "full" ? block.textMaxWidth : current.typography.maxTextWidth;
|
|
250
276
|
current.typography.lineHeightPreset = block.textLineHeightPreset === "tight" || block.textLineHeightPreset === "normal" || block.textLineHeightPreset === "relaxed" ? block.textLineHeightPreset : current.typography.lineHeightPreset;
|
|
251
277
|
current.typography.letterSpacingPreset = block.textLetterSpacingPreset === "tight" || block.textLetterSpacingPreset === "normal" || block.textLetterSpacingPreset === "relaxed" ? block.textLetterSpacingPreset : current.typography.letterSpacingPreset;
|
|
252
278
|
current.advanced.editCopyInPanel = Boolean(block.editCopyInPanel ?? current.advanced.editCopyInPanel);
|
|
253
279
|
current.advanced.customClassName = typeof block.customClassName === "string" ? block.customClassName : current.advanced.customClassName;
|
|
254
280
|
current.advanced.hideOnMobile = Boolean(block.hideOnMobile ?? current.advanced.hideOnMobile);
|
|
255
|
-
|
|
281
|
+
const settings = mergeSettings(current, block.settings);
|
|
282
|
+
if (block.blockType === "hero") {
|
|
283
|
+
const top = settings.layout.paddingTopPt;
|
|
284
|
+
const bottom = settings.layout.paddingBottomPt;
|
|
285
|
+
const hasLegacyLinkedHeroPadding = settings.layout.linkVerticalPadding !== false && (top === null || typeof top === "undefined" || top === 30) && (bottom === null || typeof bottom === "undefined" || bottom === 30 || bottom === 20);
|
|
286
|
+
if (hasLegacyLinkedHeroPadding) {
|
|
287
|
+
settings.layout.linkVerticalPadding = false;
|
|
288
|
+
settings.layout.paddingTopPt = 30;
|
|
289
|
+
settings.layout.paddingBottomPt = 20;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
return settings;
|
|
256
293
|
};
|
|
257
294
|
var v2SettingsToLegacyBlock = (blockWithSettings) => {
|
|
258
295
|
const settings = legacyBlockToV2Settings(blockWithSettings);
|
|
@@ -278,6 +315,8 @@ var v2SettingsToLegacyBlock = (blockWithSettings) => {
|
|
|
278
315
|
next.contentGradientAngle = settings.appearance.contentGradientAngle;
|
|
279
316
|
next.textHeadingAlign = settings.typography.headingAlign;
|
|
280
317
|
next.textBodyAlign = settings.typography.bodyAlign;
|
|
318
|
+
next.textHeadingSizePt = settings.typography.headingSizePt;
|
|
319
|
+
next.textBodySizePt = settings.typography.bodySizePt;
|
|
281
320
|
next.textMaxWidth = settings.typography.maxTextWidth;
|
|
282
321
|
next.textLineHeightPreset = settings.typography.lineHeightPreset;
|
|
283
322
|
next.textLetterSpacingPreset = settings.typography.letterSpacingPreset;
|
|
@@ -378,7 +417,7 @@ function normalizePath(segments) {
|
|
|
378
417
|
const cleaned = segments.map((segment) => segment.trim()).filter(Boolean).join("/");
|
|
379
418
|
return cleaned.length > 0 ? `/${cleaned}` : "/";
|
|
380
419
|
}
|
|
381
|
-
async function queryPageByPath(payload, path, draft) {
|
|
420
|
+
async function queryPageByPath(payload, path, draft, collectionSlug, homeSlug) {
|
|
382
421
|
const pathWhere = {
|
|
383
422
|
path: {
|
|
384
423
|
equals: path
|
|
@@ -390,7 +429,7 @@ async function queryPageByPath(payload, path, draft) {
|
|
|
390
429
|
}
|
|
391
430
|
};
|
|
392
431
|
const result = await payload.find({
|
|
393
|
-
collection:
|
|
432
|
+
collection: collectionSlug,
|
|
394
433
|
depth: 2,
|
|
395
434
|
draft,
|
|
396
435
|
limit: 1,
|
|
@@ -403,11 +442,11 @@ async function queryPageByPath(payload, path, draft) {
|
|
|
403
442
|
if (path === "/") {
|
|
404
443
|
const homeWhere = {
|
|
405
444
|
slug: {
|
|
406
|
-
equals:
|
|
445
|
+
equals: homeSlug
|
|
407
446
|
}
|
|
408
447
|
};
|
|
409
448
|
const homeResult = await payload.find({
|
|
410
|
-
collection:
|
|
449
|
+
collection: collectionSlug,
|
|
411
450
|
depth: 2,
|
|
412
451
|
draft,
|
|
413
452
|
limit: 1,
|
|
@@ -418,27 +457,31 @@ async function queryPageByPath(payload, path, draft) {
|
|
|
418
457
|
}
|
|
419
458
|
return null;
|
|
420
459
|
}
|
|
421
|
-
function createPageQueries(getPayloadClient,
|
|
460
|
+
function createPageQueries(getPayloadClient, contentTagOrOptions = "website-content") {
|
|
461
|
+
const options = typeof contentTagOrOptions === "string" ? { contentTag: contentTagOrOptions } : contentTagOrOptions;
|
|
462
|
+
const contentTag = options.contentTag || "website-content";
|
|
463
|
+
const pagesCollectionSlug = options.pagesCollectionSlug || "pages";
|
|
464
|
+
const homeSlug = options.homeSlug || "home";
|
|
422
465
|
const getPublishedPageByPathCached = (0, import_cache.unstable_cache)(
|
|
423
466
|
async (path) => {
|
|
424
467
|
const payload = await getPayloadClient();
|
|
425
|
-
return queryPageByPath(payload, path, false);
|
|
468
|
+
return queryPageByPath(payload, path, false, pagesCollectionSlug, homeSlug);
|
|
426
469
|
},
|
|
427
|
-
["page-by-path", PAGE_QUERY_CACHE_VERSION],
|
|
470
|
+
["page-by-path", PAGE_QUERY_CACHE_VERSION, pagesCollectionSlug, homeSlug, contentTag],
|
|
428
471
|
{ tags: [contentTag] }
|
|
429
472
|
);
|
|
430
473
|
async function getPageBySegments(segments, draft = false) {
|
|
431
474
|
const path = normalizePath(segments);
|
|
432
475
|
const payload = await getPayloadClient();
|
|
433
476
|
if (draft) {
|
|
434
|
-
return queryPageByPath(payload, path, true);
|
|
477
|
+
return queryPageByPath(payload, path, true, pagesCollectionSlug, homeSlug);
|
|
435
478
|
}
|
|
436
479
|
return getPublishedPageByPathCached(path);
|
|
437
480
|
}
|
|
438
481
|
async function listPublishedPagePaths() {
|
|
439
482
|
const payload = await getPayloadClient();
|
|
440
483
|
const pages = await payload.find({
|
|
441
|
-
collection:
|
|
484
|
+
collection: pagesCollectionSlug,
|
|
442
485
|
depth: 0,
|
|
443
486
|
draft: false,
|
|
444
487
|
limit: 1e3,
|
|
@@ -467,108 +510,46 @@ function createPageQueries(getPayloadClient, contentTag = "website-content") {
|
|
|
467
510
|
|
|
468
511
|
// src/nextjs/queries/site.ts
|
|
469
512
|
var import_cache2 = require("next/cache");
|
|
470
|
-
function createSiteQueries(getPayloadClient,
|
|
471
|
-
const
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
}
|
|
502
|
-
return
|
|
503
|
-
}
|
|
504
|
-
["footer-global"],
|
|
505
|
-
{ tags: [contentTag] }
|
|
506
|
-
);
|
|
507
|
-
const getSocialMediaCached = (0, import_cache2.unstable_cache)(
|
|
508
|
-
async () => {
|
|
509
|
-
const payload = await getPayloadClient();
|
|
510
|
-
const socialMedia = await payload.findGlobal({
|
|
511
|
-
slug: "social-media",
|
|
512
|
-
depth: 1
|
|
513
|
-
});
|
|
514
|
-
return socialMedia;
|
|
515
|
-
},
|
|
516
|
-
["social-media-global"],
|
|
517
|
-
{ tags: [contentTag] }
|
|
518
|
-
);
|
|
519
|
-
async function getSiteSettings(draft = false) {
|
|
520
|
-
if (draft) {
|
|
521
|
-
const payload = await getPayloadClient();
|
|
522
|
-
const settings = await payload.findGlobal({
|
|
523
|
-
slug: "site-settings",
|
|
524
|
-
depth: 1,
|
|
525
|
-
draft: true
|
|
526
|
-
});
|
|
527
|
-
return settings;
|
|
528
|
-
}
|
|
529
|
-
return getSiteSettingsCached();
|
|
530
|
-
}
|
|
531
|
-
async function getHeader(draft = false) {
|
|
532
|
-
if (draft) {
|
|
533
|
-
const payload = await getPayloadClient();
|
|
534
|
-
const header = await payload.findGlobal({
|
|
535
|
-
slug: "header",
|
|
536
|
-
depth: 1,
|
|
537
|
-
draft: true
|
|
538
|
-
});
|
|
539
|
-
return header;
|
|
540
|
-
}
|
|
541
|
-
return getHeaderCached();
|
|
542
|
-
}
|
|
543
|
-
async function getFooter(draft = false) {
|
|
544
|
-
if (draft) {
|
|
545
|
-
const payload = await getPayloadClient();
|
|
546
|
-
const footer = await payload.findGlobal({
|
|
547
|
-
slug: "footer",
|
|
548
|
-
depth: 1,
|
|
549
|
-
draft: true
|
|
550
|
-
});
|
|
551
|
-
return footer;
|
|
552
|
-
}
|
|
553
|
-
return getFooterCached();
|
|
554
|
-
}
|
|
555
|
-
async function getSocialMedia(draft = false) {
|
|
556
|
-
if (draft) {
|
|
557
|
-
const payload = await getPayloadClient();
|
|
558
|
-
const socialMedia = await payload.findGlobal({
|
|
559
|
-
slug: "social-media",
|
|
560
|
-
depth: 1,
|
|
561
|
-
draft: true
|
|
562
|
-
});
|
|
563
|
-
return socialMedia;
|
|
564
|
-
}
|
|
565
|
-
return getSocialMediaCached();
|
|
513
|
+
function createSiteQueries(getPayloadClient, contentTagOrOptions = "website-content") {
|
|
514
|
+
const options = typeof contentTagOrOptions === "string" ? { contentTag: contentTagOrOptions } : contentTagOrOptions;
|
|
515
|
+
const contentTag = options.contentTag || "website-content";
|
|
516
|
+
const siteSettingsSlug = options.siteSettingsSlug || "site-settings";
|
|
517
|
+
const headerSlug = options.headerSlug || "header";
|
|
518
|
+
const footerSlug = options.footerSlug || "footer";
|
|
519
|
+
const socialMediaSlug = options.socialMediaSlug || "social-media";
|
|
520
|
+
function createGlobalQuery(slug, cacheKey) {
|
|
521
|
+
const getCached = (0, import_cache2.unstable_cache)(
|
|
522
|
+
async () => {
|
|
523
|
+
const payload = await getPayloadClient();
|
|
524
|
+
const data = await payload.findGlobal({
|
|
525
|
+
slug,
|
|
526
|
+
depth: 1,
|
|
527
|
+
overrideAccess: false
|
|
528
|
+
});
|
|
529
|
+
return data;
|
|
530
|
+
},
|
|
531
|
+
[cacheKey, slug, contentTag],
|
|
532
|
+
{ tags: [contentTag] }
|
|
533
|
+
);
|
|
534
|
+
return async function getGlobal(draft = false) {
|
|
535
|
+
if (draft) {
|
|
536
|
+
const payload = await getPayloadClient();
|
|
537
|
+
const data = await payload.findGlobal({
|
|
538
|
+
slug,
|
|
539
|
+
depth: 1,
|
|
540
|
+
draft: true,
|
|
541
|
+
overrideAccess: false
|
|
542
|
+
});
|
|
543
|
+
return data;
|
|
544
|
+
}
|
|
545
|
+
return getCached();
|
|
546
|
+
};
|
|
566
547
|
}
|
|
567
548
|
return {
|
|
568
|
-
getSiteSettings,
|
|
569
|
-
getHeader,
|
|
570
|
-
getFooter,
|
|
571
|
-
getSocialMedia
|
|
549
|
+
getSiteSettings: createGlobalQuery(siteSettingsSlug, "site-settings-global"),
|
|
550
|
+
getHeader: createGlobalQuery(headerSlug, "header-global"),
|
|
551
|
+
getFooter: createGlobalQuery(footerSlug, "footer-global"),
|
|
552
|
+
getSocialMedia: createGlobalQuery(socialMediaSlug, "social-media-global")
|
|
572
553
|
};
|
|
573
554
|
}
|
|
574
555
|
|
package/dist/nextjs/index.mjs
CHANGED
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
createSiteQueries,
|
|
6
6
|
resolveMedia,
|
|
7
7
|
resolveSocialMediaLinks
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-OF6BATTO.mjs";
|
|
9
9
|
import "../chunk-ZTXJG4K5.mjs";
|
|
10
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-7ZMXZRBP.mjs";
|
|
11
11
|
import "../chunk-ADIIWIYL.mjs";
|
|
12
12
|
import "../chunk-6BWS3CLP.mjs";
|
|
13
13
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type AdminRole = 'admin' | 'editor' | 'client';
|
|
1
|
+
type AdminRole = 'admin' | 'developer' | 'editor' | 'client';
|
|
2
2
|
declare const adminNavIcons: readonly ["dashboard", "pages", "forms", "globals", "media", "tools", "account", "analytics"];
|
|
3
3
|
type AdminNavIcon = (typeof adminNavIcons)[number];
|
|
4
4
|
type AdminNavItem = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type AdminRole = 'admin' | 'editor' | 'client';
|
|
1
|
+
type AdminRole = 'admin' | 'developer' | 'editor' | 'client';
|
|
2
2
|
declare const adminNavIcons: readonly ["dashboard", "pages", "forms", "globals", "media", "tools", "account", "analytics"];
|
|
3
3
|
type AdminNavIcon = (typeof adminNavIcons)[number];
|
|
4
4
|
type AdminNavItem = {
|
|
@@ -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;
|
|
@@ -256,36 +262,44 @@ h4 {
|
|
|
256
262
|
}
|
|
257
263
|
|
|
258
264
|
.hero-content {
|
|
259
|
-
position: absolute;
|
|
260
|
-
inset: 0;
|
|
261
265
|
display: flex;
|
|
262
266
|
flex-direction: column;
|
|
263
267
|
justify-content: center;
|
|
264
|
-
|
|
268
|
+
inset: 0;
|
|
265
269
|
max-width: 610px;
|
|
270
|
+
padding: 2rem;
|
|
271
|
+
position: absolute;
|
|
272
|
+
text-align: var(--orion-builder-body-align, left);
|
|
266
273
|
}
|
|
267
274
|
|
|
268
275
|
.hero h1 {
|
|
269
276
|
font-size: clamp(2rem, 4vw, 3.1rem);
|
|
270
277
|
letter-spacing: -0.02em;
|
|
271
278
|
margin: 0;
|
|
279
|
+
text-align: var(--orion-builder-heading-align, var(--orion-builder-body-align, left));
|
|
272
280
|
}
|
|
273
281
|
|
|
274
282
|
.hero p {
|
|
283
|
+
color: color-mix(in srgb, var(--orion-studio-accent-contrast) 90%, transparent);
|
|
275
284
|
margin-top: 0.75rem;
|
|
276
285
|
max-width: 48ch;
|
|
277
|
-
|
|
286
|
+
text-align: var(--orion-builder-body-align, left);
|
|
278
287
|
}
|
|
279
288
|
|
|
280
289
|
.hero-actions {
|
|
281
290
|
display: flex;
|
|
282
291
|
flex-wrap: wrap;
|
|
283
292
|
gap: 0.75rem;
|
|
293
|
+
justify-content: var(--orion-builder-actions-align, flex-start);
|
|
284
294
|
margin-top: 1.1rem;
|
|
285
295
|
}
|
|
286
296
|
|
|
287
297
|
.hero-centered .hero-content {
|
|
288
|
-
text-align: center;
|
|
298
|
+
text-align: var(--orion-builder-body-align, center);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.hero .kicker {
|
|
302
|
+
text-align: var(--orion-builder-heading-align, var(--orion-builder-body-align, left));
|
|
289
303
|
}
|
|
290
304
|
|
|
291
305
|
.features {
|
|
@@ -877,6 +891,48 @@ h4 {
|
|
|
877
891
|
padding: 0.2rem;
|
|
878
892
|
}
|
|
879
893
|
|
|
894
|
+
.orion-builder-settings-color-control {
|
|
895
|
+
display: grid;
|
|
896
|
+
grid-template-columns: minmax(0, 1fr) 36px;
|
|
897
|
+
width: 100%;
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
.orion-builder-settings-color-control .orion-builder-settings-input.is-color {
|
|
901
|
+
border-bottom-right-radius: 0;
|
|
902
|
+
border-top-right-radius: 0;
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
.orion-builder-settings-eyedropper {
|
|
906
|
+
align-items: center;
|
|
907
|
+
appearance: none;
|
|
908
|
+
background: #fffaf4;
|
|
909
|
+
border: 1px solid var(--orion-studio-accent-border);
|
|
910
|
+
border-left: 0;
|
|
911
|
+
border-radius: 0 10px 10px 0;
|
|
912
|
+
color: var(--orion-studio-ink);
|
|
913
|
+
cursor: pointer;
|
|
914
|
+
display: flex;
|
|
915
|
+
height: 35px;
|
|
916
|
+
justify-content: center;
|
|
917
|
+
padding: 0;
|
|
918
|
+
transition:
|
|
919
|
+
background 160ms ease,
|
|
920
|
+
color 160ms ease;
|
|
921
|
+
width: 36px;
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
.orion-builder-settings-eyedropper:hover,
|
|
925
|
+
.orion-builder-settings-eyedropper:focus-visible {
|
|
926
|
+
background: var(--orion-studio-accent);
|
|
927
|
+
color: #fffaf4;
|
|
928
|
+
outline: none;
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
.orion-builder-settings-eyedropper svg {
|
|
932
|
+
height: 16px;
|
|
933
|
+
width: 16px;
|
|
934
|
+
}
|
|
935
|
+
|
|
880
936
|
.orion-builder-settings-input-split {
|
|
881
937
|
align-items: center;
|
|
882
938
|
display: grid;
|
|
@@ -984,6 +1040,11 @@ h4 {
|
|
|
984
1040
|
text-align: var(--orion-builder-heading-align, inherit);
|
|
985
1041
|
}
|
|
986
1042
|
|
|
1043
|
+
.orion-builder-content p,
|
|
1044
|
+
.orion-builder-content li {
|
|
1045
|
+
text-align: var(--orion-builder-body-align, inherit);
|
|
1046
|
+
}
|
|
1047
|
+
|
|
987
1048
|
/* Builder-only override: show full testimonial copy even if host app globals clamp it. */
|
|
988
1049
|
.orion-builder-shell .orion-builder-content .testimonial-quote {
|
|
989
1050
|
-webkit-box-orient: initial;
|