@delmaredigital/payload-experiments 0.5.3 → 0.20.0-next.2
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 +15 -4
- package/dist/admin/blocks/formApi.js +17 -15
- package/dist/admin/blocks/model.js +1 -1
- package/dist/admin/theme.css +43 -47
- package/dist/admin/views/renderCollectionList.js +1 -1
- package/dist/blocks/formState.d.ts +1 -1
- package/dist/blocks/formState.js +2 -5
- package/dist/blocks/placementLocale.js +10 -13
- package/dist/blocks/placementPublication.d.ts +1 -1
- package/dist/blocks/placementPublication.js +6 -5
- package/dist/collections/access.d.ts +2 -0
- package/dist/collections/access.js +2 -0
- package/dist/collections/cohortMembers.js +1 -0
- package/dist/collections/events.js +1 -0
- package/dist/collections/experiments/config.js +2 -1
- package/dist/collections/experiments/createDefaults.js +4 -3
- package/dist/collections/experiments/flagControlParams.js +2 -1
- package/dist/collections/experiments/lockHook.js +6 -4
- package/dist/collections/identities.js +1 -0
- package/dist/collections/layers.js +1 -0
- package/dist/collections/metrics.js +1 -0
- package/dist/collections/phases.js +1 -0
- package/dist/collections/snapshots.js +1 -0
- package/dist/db/appends.d.ts +4 -7
- package/dist/db/appends.js +5 -12
- package/dist/db/clickGoals.js +5 -2
- package/dist/db/executor.d.ts +1 -5
- package/dist/db/names.d.ts +1 -1
- package/dist/db/names.js +1 -1
- package/dist/db/pageContent.d.ts +1 -1
- package/dist/db/pageContent.js +1 -1
- package/dist/endpoints/pages.js +12 -7
- package/dist/globals/state.js +2 -0
- package/dist/goals/fairness.js +4 -1
- package/dist/hooks/pageGuard.d.ts +0 -3
- package/dist/hooks/pageGuard.js +14 -12
- package/dist/payloadCompat.d.ts +8 -0
- package/dist/payloadCompat.js +16 -0
- package/dist/puck/editor/editor.css +103 -103
- package/dist/server/previewDraft.js +0 -1
- package/dist/server/recordContentChange.d.ts +1 -1
- package/dist/server/recordContentChange.js +11 -15
- package/dist/server/runResults.d.ts +1 -1
- package/dist/server/runResults.js +1 -1
- package/dist/server/startExperiment.d.ts +1 -1
- package/dist/server/startExperiment.js +1 -1
- package/dist/transitions/contentFields.d.ts +3 -6
- package/dist/transitions/contentFields.js +3 -9
- package/dist/transitions/makeContent.js +34 -16
- package/dist/transitions/pageAddress.d.ts +3 -1
- package/dist/transitions/pageAddress.js +33 -3
- package/dist/ui/accent.d.ts +5 -1
- package/dist/ui/accent.js +6 -5
- package/package.json +11 -11
package/dist/db/executor.d.ts
CHANGED
|
@@ -5,11 +5,7 @@ export { pgPoolExecutor, ownConnection, withStatementTimeout, raceDeadline, Resu
|
|
|
5
5
|
/** Bound statements in an owned results transition without racing a write or commit. */
|
|
6
6
|
export declare function setTransitionTimeout(exec: Executor, deadline: number): Promise<void>;
|
|
7
7
|
type TransactionRequest = Pick<PayloadRequest, 'payload' | 'transactionID'>;
|
|
8
|
-
export declare function transactionSession(req: TransactionRequest): Promise<
|
|
9
|
-
db: unknown;
|
|
10
|
-
reject: () => Promise<void>;
|
|
11
|
-
resolve: () => Promise<void>;
|
|
12
|
-
}>;
|
|
8
|
+
export declare function transactionSession(req: TransactionRequest): Promise<NonNullable<Payload['db']['sessions']>[string]>;
|
|
13
9
|
export declare function txExecutor(req: TransactionRequest): Executor & {
|
|
14
10
|
schemaName?: string;
|
|
15
11
|
};
|
package/dist/db/names.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** SQL identifiers from the Payload
|
|
1
|
+
/** SQL identifiers from the Payload 4.0.0-beta.6 generated-schema fixture (2026-12-04).
|
|
2
2
|
* All main, array, relationship and version tables are included. Access through
|
|
3
3
|
* these literal keys is checked by TypeScript; names.test.ts checks fixture parity.
|
|
4
4
|
*/
|
package/dist/db/names.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** SQL identifiers from the Payload
|
|
1
|
+
/** SQL identifiers from the Payload 4.0.0-beta.6 generated-schema fixture (2026-12-04).
|
|
2
2
|
* All main, array, relationship and version tables are included. Access through
|
|
3
3
|
* these literal keys is checked by TypeScript; names.test.ts checks fixture parity.
|
|
4
4
|
*/ export const TABLES = {
|
package/dist/db/pageContent.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { DocId } from '../types/contracts.js';
|
|
|
4
4
|
export declare function pageVersionContent(req: PayloadRequest, collection: string, id: DocId): Promise<(Record<string, unknown> & {
|
|
5
5
|
id: DocId;
|
|
6
6
|
}) | null>;
|
|
7
|
-
/** Path selection only, after checking access to the page.
|
|
7
|
+
/** Path selection only, after checking access to the page. Payload scopes the version status filter to the given locale. */
|
|
8
8
|
export declare function hasPublishedPageVersion(req: PayloadRequest, collection: string, id: DocId, locale?: string): Promise<boolean>;
|
|
9
9
|
/** §7.8: status computes a page's published (or never-published draft) path. */
|
|
10
10
|
export declare function statusPageContent(req: PayloadRequest, collection: string, id: DocId): Promise<(Record<string, unknown> & {
|
package/dist/db/pageContent.js
CHANGED
|
@@ -12,7 +12,7 @@ import { pagePublicationStatus, publicationLocale, usesLocalizedPublication } fr
|
|
|
12
12
|
overrideAccess: true
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
|
-
/** Path selection only, after checking access to the page.
|
|
15
|
+
/** Path selection only, after checking access to the page. Payload scopes the version status filter to the given locale. */ export async function hasPublishedPageVersion(req, collection, id, locale) {
|
|
16
16
|
const published = await req.payload.db.findVersions({
|
|
17
17
|
collection,
|
|
18
18
|
req,
|
package/dist/endpoints/pages.js
CHANGED
|
@@ -2,7 +2,7 @@ import { flattenTopLevelFields, formatAdminURL } from 'payload/shared';
|
|
|
2
2
|
import { placementReader } from '../blocks/placementLocale.js';
|
|
3
3
|
import { pagePublicationStatus, publicationLocale, usesLocalizedPublication } from '../blocks/placementPublication.js';
|
|
4
4
|
import { hasPublishedPageVersion } from '../db/pageContent.js';
|
|
5
|
-
import { findDraftPageByPath, PAGE_ADDRESS_FIELDS } from '../transitions/pageAddress.js';
|
|
5
|
+
import { findDraftPageByPath, findPublishedPageIds, PAGE_ADDRESS_FIELDS } from '../transitions/pageAddress.js';
|
|
6
6
|
import { normalisePath } from '../runtime/normalisePath.js';
|
|
7
7
|
import { blockPageSlugs, hasPuckEditor } from '../options.js';
|
|
8
8
|
import { XpRefusal } from '../errors.js';
|
|
@@ -58,7 +58,9 @@ export async function handlePages(req, { options }) {
|
|
|
58
58
|
docs: [],
|
|
59
59
|
hasNextPage: false
|
|
60
60
|
});
|
|
61
|
-
const published = !drafts ||
|
|
61
|
+
const published = !drafts || (locale ? Boolean(found && (await findPublishedPageIds(req, slug, [
|
|
62
|
+
main.id
|
|
63
|
+
], locale)).has(String(main.id))) : pagePublicationStatus(main) === 'published');
|
|
62
64
|
const useMain = published || Boolean(locale && (!found || await hasPublishedPageVersion(req, slug, main.id, locale)));
|
|
63
65
|
const row = useMain ? main : await req.payload.findByID({
|
|
64
66
|
collection: slug,
|
|
@@ -101,8 +103,9 @@ export async function handlePages(req, { options }) {
|
|
|
101
103
|
]);
|
|
102
104
|
const searchable = q ? await Promise.all(fields.map(async (field)=>{
|
|
103
105
|
if (field.type !== 'text' && field.type !== 'textarea' || field.hidden || field.virtual || !searchFields.has(field.name)) return;
|
|
104
|
-
if (field.access?.read && !await field.access.read({
|
|
105
|
-
req
|
|
106
|
+
if (config && field.access?.read && !await field.access.read({
|
|
107
|
+
req,
|
|
108
|
+
collection: config
|
|
106
109
|
})) return;
|
|
107
110
|
return field.name;
|
|
108
111
|
})) : [];
|
|
@@ -138,7 +141,8 @@ export async function handlePages(req, { options }) {
|
|
|
138
141
|
// Payload applies the read constraint to the latest version when draft is
|
|
139
142
|
// true. A manager scoped to published content needs to browse the live rows.
|
|
140
143
|
const readScope = drafts ? await config?.access?.read?.({
|
|
141
|
-
req
|
|
144
|
+
req,
|
|
145
|
+
slug
|
|
142
146
|
}) : undefined;
|
|
143
147
|
const readDrafts = drafts && !(readScope && typeof readScope === 'object' && requiresPublished(readScope));
|
|
144
148
|
let searchTruncated = false;
|
|
@@ -210,6 +214,7 @@ export async function handlePages(req, { options }) {
|
|
|
210
214
|
});
|
|
211
215
|
const localizedPaths = Boolean(locale && collection && !blockMode);
|
|
212
216
|
const draftIds = readDrafts ? result.docs.filter((doc)=>localizedPaths || pagePublicationStatus(doc, locale) === 'draft').map((doc)=>doc.id) : [];
|
|
217
|
+
const publishedIds = locale ? await findPublishedPageIds(req, slug, result.docs.map((doc)=>doc.id), locale) : undefined;
|
|
213
218
|
const mainById = new Map();
|
|
214
219
|
if (draftIds.length) {
|
|
215
220
|
// Read the matching main rows in one bounded query. Localized drafts can
|
|
@@ -236,7 +241,7 @@ export async function handlePages(req, { options }) {
|
|
|
236
241
|
}
|
|
237
242
|
});
|
|
238
243
|
await Promise.all(live.docs.map(async (doc)=>{
|
|
239
|
-
const published = pagePublicationStatus(doc
|
|
244
|
+
const published = publishedIds?.has(String(doc.id)) ?? pagePublicationStatus(doc) === 'published';
|
|
240
245
|
if (!published && !localizedPaths) return;
|
|
241
246
|
const usePath = published || await hasPublishedPageVersion(req, slug, doc.id, locale);
|
|
242
247
|
mainById.set(String(doc.id), {
|
|
@@ -251,7 +256,7 @@ export async function handlePages(req, { options }) {
|
|
|
251
256
|
const doc = placement.doc;
|
|
252
257
|
const main = mainById.get(String(row.id));
|
|
253
258
|
const versionPublished = pagePublicationStatus(row, locale) === 'published';
|
|
254
|
-
const published = !drafts || (main?.published ?? versionPublished);
|
|
259
|
+
const published = !drafts || (publishedIds?.has(String(row.id)) ?? main?.published ?? versionPublished);
|
|
255
260
|
const pathDoc = !blockMode && main?.usePath ? reader.read(main.doc, input).doc : doc;
|
|
256
261
|
const rawPath = collection?.pathOf(pathDoc) ?? null;
|
|
257
262
|
const storedAddress = blockMode ? addressFields.reduce((value, field)=>value ?? textValue(pathDoc[field]), undefined) : undefined;
|
package/dist/globals/state.js
CHANGED
|
@@ -5,6 +5,7 @@ export function stateGlobal(options) {
|
|
|
5
5
|
slug: 'xp-state',
|
|
6
6
|
dbName: 'xp_state',
|
|
7
7
|
graphQL: false,
|
|
8
|
+
authorship: false,
|
|
8
9
|
versions: false,
|
|
9
10
|
admin: {
|
|
10
11
|
hidden: true
|
|
@@ -12,6 +13,7 @@ export function stateGlobal(options) {
|
|
|
12
13
|
access: {
|
|
13
14
|
read: isTrue(options.access.manage),
|
|
14
15
|
update: deny,
|
|
16
|
+
validate: deny,
|
|
15
17
|
readVersions: deny
|
|
16
18
|
},
|
|
17
19
|
hooks: {
|
package/dist/goals/fairness.js
CHANGED
|
@@ -95,7 +95,9 @@ function blockLabels(req) {
|
|
|
95
95
|
continue;
|
|
96
96
|
}
|
|
97
97
|
const reader = placementReader(req, collection.slug, options);
|
|
98
|
-
for (const view of reader.documentViews)
|
|
98
|
+
for (const view of reader.documentViews){
|
|
99
|
+
if (reader.isPublished(doc, view)) collect(collection.contentOf(reader.read(doc, 'all-locales', view).doc), byArm.get(arm.key), '', labels);
|
|
100
|
+
}
|
|
99
101
|
readArms.add(arm.key);
|
|
100
102
|
} catch (error) {
|
|
101
103
|
failed(error, placement);
|
|
@@ -126,6 +128,7 @@ function blockLabels(req) {
|
|
|
126
128
|
const raw = await clickGoalContent(req, placement.collection, placement.id);
|
|
127
129
|
const reader = placementReader(req, placement.collection, options);
|
|
128
130
|
for (const view of reader.views){
|
|
131
|
+
if (!reader.isPublished(raw, view)) continue;
|
|
129
132
|
const localized = reader.read(raw, 'all-locales', view);
|
|
130
133
|
const doc = localized.doc;
|
|
131
134
|
if (!doc) continue;
|
|
@@ -11,7 +11,6 @@ type OperationFrame = PublicationFlags & {
|
|
|
11
11
|
restore: boolean;
|
|
12
12
|
versionId?: DocId;
|
|
13
13
|
isBulk?: boolean;
|
|
14
|
-
publishSpecificLocale?: string;
|
|
15
14
|
pending?: boolean;
|
|
16
15
|
scoped?: boolean;
|
|
17
16
|
complete?: boolean;
|
|
@@ -23,8 +22,6 @@ type OperationFrame = PublicationFlags & {
|
|
|
23
22
|
publicationWrites?: Map<string, Set<string>>;
|
|
24
23
|
};
|
|
25
24
|
export declare const pageGuardOperationScope: AsyncLocalStorage<OperationFrame | undefined>;
|
|
26
|
-
/** Both Publish All and Restore can return a locale-projected document. */
|
|
27
|
-
export declare function writesAllPublicationLocales(req: PayloadRequest, collection: string): boolean;
|
|
28
25
|
/** Must be first: buildBeforeOperation invokes its first hook synchronously,
|
|
29
26
|
* before the operation registers its await continuation. Later host hooks may
|
|
30
27
|
* await nested operations; those keep separate async contexts. No IO here.
|
package/dist/hooks/pageGuard.js
CHANGED
|
@@ -10,7 +10,7 @@ import { normalisePath } from '../runtime/normalisePath.js';
|
|
|
10
10
|
import { XpNoTransactionError, XpRefusal } from '../errors.js';
|
|
11
11
|
import { placementGuardCopy, pageGuardCopy, READINESS_COPY } from '../testSurface/copy/readiness.js';
|
|
12
12
|
import { allPlacementSlugs, localizedPlacementAfter, mergedPlacementLocales, placementDocumentPaths, placementReader, selectPlacementLocales } from '../blocks/placementLocale.js';
|
|
13
|
-
import { allLocalesStatus, usesLocalizedPublication } from '../blocks/placementPublication.js';
|
|
13
|
+
import { allLocalesStatus, hasPublishedLocale, usesLocalizedPublication } from '../blocks/placementPublication.js';
|
|
14
14
|
import { isObject } from '../blocks/model.js';
|
|
15
15
|
import { placementTests, removableBlockTests, appendPlacementDoc } from '../db/placements.js';
|
|
16
16
|
import { isPageBusy } from '../db/pageBusy.js';
|
|
@@ -46,10 +46,6 @@ const operationFrame = (req, slug)=>{
|
|
|
46
46
|
}
|
|
47
47
|
return frame?.scoped && frame.collection === slug && (frame.restore || frame.request === req) ? frame : undefined;
|
|
48
48
|
};
|
|
49
|
-
/** Both Publish All and Restore can return a locale-projected document. */ export function writesAllPublicationLocales(req, collection) {
|
|
50
|
-
const call = operationFrame(req, collection);
|
|
51
|
-
return Boolean(call && !call.draft && (call.publishAllLocales || call.restore));
|
|
52
|
-
}
|
|
53
49
|
/** Must be first: buildBeforeOperation invokes its first hook synchronously,
|
|
54
50
|
* before the operation registers its await continuation. Later host hooks may
|
|
55
51
|
* await nested operations; those keep separate async contexts. No IO here.
|
|
@@ -97,7 +93,6 @@ export const pageGuardBeforeOperation = ({ args, operation })=>{
|
|
|
97
93
|
restore: operation === 'restoreVersion',
|
|
98
94
|
versionId: operation === 'restoreVersion' ? call.id : undefined,
|
|
99
95
|
isBulk,
|
|
100
|
-
publishSpecificLocale: call.publishSpecificLocale,
|
|
101
96
|
publishAllLocales: call.publishAllLocales,
|
|
102
97
|
unpublishAllLocales: call.unpublishAllLocales,
|
|
103
98
|
duplicateFromID: call.duplicateFromID,
|
|
@@ -245,7 +240,7 @@ export const pageGuardBeforeDelete = async ({ req, id, collection })=>{
|
|
|
245
240
|
const localized = usesLocalizedPublication(req, collection.slug, collection);
|
|
246
241
|
const published = page && !localized ? await previousPublishedContent(req, collection.slug, id) : await storedContent(req, collection.slug, id);
|
|
247
242
|
if (!published || published._status === 'draft') return;
|
|
248
|
-
if (localized &&
|
|
243
|
+
if (localized && !hasPublishedLocale(published)) return;
|
|
249
244
|
const paths = sortLockKeys(documentPathsOf(req, collection.slug, [
|
|
250
245
|
published
|
|
251
246
|
]).map(normalisePath));
|
|
@@ -274,6 +269,7 @@ export const pageGuardBeforeDelete = async ({ req, id, collection })=>{
|
|
|
274
269
|
}
|
|
275
270
|
};
|
|
276
271
|
export const pageGuardBeforeChange = async ({ req, collection, originalDoc, operation, data })=>{
|
|
272
|
+
// Payload 4 runs beforeChange for read-only validation. Guard actual writes only.
|
|
277
273
|
if (operation !== 'create' && operation !== 'update') return data;
|
|
278
274
|
const drafts = Boolean(collection.versions && collection.versions.drafts);
|
|
279
275
|
const call = operationFrame(req, collection.slug);
|
|
@@ -297,7 +293,6 @@ export const pageGuardBeforeChange = async ({ req, collection, originalDoc, oper
|
|
|
297
293
|
versionId: call?.versionId,
|
|
298
294
|
bulk: call?.isBulk,
|
|
299
295
|
draft: call?.draft,
|
|
300
|
-
publishSpecificLocale: call?.publishSpecificLocale,
|
|
301
296
|
trashing: Boolean(collection.trash && data.deletedAt != null)
|
|
302
297
|
});
|
|
303
298
|
const before = published?._status === 'draft' ? undefined : published;
|
|
@@ -381,10 +376,17 @@ async function guardLocalizedSave(req, collection, originalDoc, operation, data,
|
|
|
381
376
|
if (!localization) return data;
|
|
382
377
|
try {
|
|
383
378
|
const status = allLocalesStatus(req, call, data._status, operation);
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
379
|
+
let locales = localization.localeCodes;
|
|
380
|
+
if (status && localization.filterAvailableLocales) {
|
|
381
|
+
const available = await localization.filterAvailableLocales({
|
|
382
|
+
locales: localization.locales,
|
|
383
|
+
req
|
|
384
|
+
});
|
|
385
|
+
locales = available.map((entry)=>typeof entry === 'string' ? entry : entry.code);
|
|
386
|
+
// Payload writes the request locale before applying the all-locales flag
|
|
387
|
+
// to the available list.
|
|
388
|
+
if (req.locale && localization.localeCodes.includes(req.locale) && !locales.includes(req.locale)) locales.push(req.locale);
|
|
389
|
+
}
|
|
388
390
|
const all = status ? {
|
|
389
391
|
status,
|
|
390
392
|
locales
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createPayloadRequest, type Block, type Field, type Payload } from 'payload';
|
|
2
|
+
/** Payload 3 createLocalReq(options, payload) -> Payload 4 createPayloadRequest({ ...options, payload }).
|
|
3
|
+
* Differs from 3.90 for `user: null` with a user on `options.req`: 4.0 runs anonymous, 3.90 kept the req's user. */
|
|
4
|
+
export declare function createLocalReq(options: Omit<Parameters<typeof createPayloadRequest>[0], 'payload'>, payload: Payload): Promise<import("payload").PayloadRequest>;
|
|
5
|
+
/** Payload 3 blockReferences + inline blocks -> Payload 4 blocks with inline definitions or slug references. */
|
|
6
|
+
export declare function resolveContentBlocks(field: Extract<Field, {
|
|
7
|
+
type: 'blocks';
|
|
8
|
+
}>, blocks?: Block[]): Block[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createPayloadRequest } from 'payload';
|
|
2
|
+
/** Payload 3 createLocalReq(options, payload) -> Payload 4 createPayloadRequest({ ...options, payload }).
|
|
3
|
+
* Differs from 3.90 for `user: null` with a user on `options.req`: 4.0 runs anonymous, 3.90 kept the req's user. */ export function createLocalReq(options, payload) {
|
|
4
|
+
return createPayloadRequest({
|
|
5
|
+
...options,
|
|
6
|
+
payload
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
/** Payload 3 blockReferences + inline blocks -> Payload 4 blocks with inline definitions or slug references. */ export function resolveContentBlocks(field, blocks = []) {
|
|
10
|
+
return field.blocks.map((reference)=>{
|
|
11
|
+
if (typeof reference !== 'string') return reference;
|
|
12
|
+
const block = blocks.find((block)=>block.slug === reference);
|
|
13
|
+
if (!block) throw new Error('This page has an unavailable block; update it by hand.');
|
|
14
|
+
return block;
|
|
15
|
+
});
|
|
16
|
+
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
/* generated — do not edit. Run pnpm generate:editor-css. Reference: Payload
|
|
1
|
+
/* generated — do not edit. Run pnpm generate:editor-css. Reference: Payload 4.0.0-beta.6. */
|
|
2
2
|
.xp-slot-root {
|
|
3
|
-
--xp-bg:
|
|
4
|
-
--xp-surface:
|
|
5
|
-
--xp-surface-2:
|
|
6
|
-
--xp-surface-3:
|
|
7
|
-
--xp-border:
|
|
8
|
-
--xp-border-strong: rgb(
|
|
9
|
-
--xp-text: rgb(
|
|
10
|
-
--xp-text-2:
|
|
11
|
-
--xp-text-3: rgb(
|
|
12
|
-
--xp-accent:
|
|
13
|
-
--xp-accent-hover:
|
|
14
|
-
--xp-accent-active:
|
|
15
|
-
--xp-accent-subtle:
|
|
16
|
-
--xp-accent-fg: rgb(
|
|
17
|
-
--xp-accent-text: rgb(
|
|
3
|
+
--xp-bg: #f5f5f5;
|
|
4
|
+
--xp-surface: #ffffff;
|
|
5
|
+
--xp-surface-2: #e6e6e6;
|
|
6
|
+
--xp-surface-3: #d9d9d9;
|
|
7
|
+
--xp-border: #e6e6e6;
|
|
8
|
+
--xp-border-strong: rgb(204, 204, 204);
|
|
9
|
+
--xp-text: rgb(26, 26, 26);
|
|
10
|
+
--xp-text-2: #595959;
|
|
11
|
+
--xp-text-3: rgb(128, 128, 128);
|
|
12
|
+
--xp-accent: #2c2c2c;
|
|
13
|
+
--xp-accent-hover: #383838;
|
|
14
|
+
--xp-accent-active: #444444;
|
|
15
|
+
--xp-accent-subtle: #d0d0d0;
|
|
16
|
+
--xp-accent-fg: rgb(234, 234, 234);
|
|
17
|
+
--xp-accent-text: rgb(26, 26, 26);
|
|
18
18
|
--xp-accent-text-decoration: none;
|
|
19
|
-
--xp-focus:
|
|
20
|
-
--xp-series-muted: rgb(
|
|
19
|
+
--xp-focus: #2c2c2c;
|
|
20
|
+
--xp-series-muted: rgb(179, 179, 179);
|
|
21
21
|
--xp-success: #1a6a3a;
|
|
22
22
|
--xp-success-bg: #e8f4ec;
|
|
23
23
|
--xp-success-border: #bddfc9;
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
--xp-radius-control: 8px;
|
|
34
34
|
--xp-radius-card: 12px;
|
|
35
35
|
--xp-radius-chip: 6px;
|
|
36
|
-
--xp-font:
|
|
37
|
-
--xp-mono: 'SF Mono', Menlo, Consolas, Monaco, monospace;
|
|
38
|
-
--xp-text-display: 600 28px/32px
|
|
39
|
-
--xp-text-title: 600 20px/28px
|
|
40
|
-
--xp-text-body: 400 15px/22px
|
|
41
|
-
--xp-text-small: 400 13px/18px
|
|
36
|
+
--xp-font: 'Inter', sans-serif;
|
|
37
|
+
--xp-mono: 'Roboto Mono', 'SF Mono', Menlo, Consolas, Monaco, monospace;
|
|
38
|
+
--xp-text-display: 600 28px/32px 'Inter', sans-serif;
|
|
39
|
+
--xp-text-title: 600 20px/28px 'Inter', sans-serif;
|
|
40
|
+
--xp-text-body: 400 15px/22px 'Inter', sans-serif;
|
|
41
|
+
--xp-text-small: 400 13px/18px 'Inter', sans-serif;
|
|
42
42
|
--xp-motion: 120ms;
|
|
43
43
|
--xp-space-half: 2px;
|
|
44
44
|
--xp-space-one-half: 6px;
|
|
@@ -55,19 +55,19 @@
|
|
|
55
55
|
--xp-space-3: 12px;
|
|
56
56
|
--xp-space-4: 16px;
|
|
57
57
|
--xp-space-5: 20px;
|
|
58
|
-
--xp-field-gap:
|
|
58
|
+
--xp-field-gap: 1.5rem;
|
|
59
59
|
--xp-space-6: 24px;
|
|
60
60
|
--xp-space-7: 28px;
|
|
61
61
|
--xp-space-8: 32px;
|
|
62
|
-
--xp-surface-raised:
|
|
63
|
-
--xp-border-control: rgb(
|
|
64
|
-
--xp-input-border: rgb(
|
|
65
|
-
--xp-border-accent: rgb(
|
|
66
|
-
--xp-text-muted:
|
|
67
|
-
--xp-text-strong: rgb(
|
|
68
|
-
--xp-text-emphasis: rgb(
|
|
69
|
-
--xp-input-bg:
|
|
70
|
-
--xp-overlay: rgba(
|
|
62
|
+
--xp-surface-raised: #e6e6e6;
|
|
63
|
+
--xp-border-control: rgb(204, 204, 204);
|
|
64
|
+
--xp-input-border: rgb(179, 179, 179);
|
|
65
|
+
--xp-border-accent: rgb(128, 128, 128);
|
|
66
|
+
--xp-text-muted: #595959;
|
|
67
|
+
--xp-text-strong: rgb(26, 26, 26);
|
|
68
|
+
--xp-text-emphasis: rgb(26, 26, 26);
|
|
69
|
+
--xp-input-bg: #ffffff;
|
|
70
|
+
--xp-overlay: rgba(0, 0, 0, 0.5);
|
|
71
71
|
--xp-success-surface: #e8f4ec;
|
|
72
72
|
--xp-success-text: #1a6a3a;
|
|
73
73
|
--xp-success-text-strong: #1a6a3a;
|
|
@@ -78,31 +78,31 @@
|
|
|
78
78
|
--xp-error-text: #a63030;
|
|
79
79
|
--xp-radius: 8px;
|
|
80
80
|
--xp-radius-large: 12px;
|
|
81
|
-
--xp-font-body:
|
|
81
|
+
--xp-font-body: 'Inter', sans-serif;
|
|
82
82
|
--xp-font-size-small: 13px;
|
|
83
83
|
--xp-font-size-body: 15px;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
[data-theme='dark'] .xp-slot-root,
|
|
87
87
|
.dark .xp-slot-root {
|
|
88
|
-
--xp-bg:
|
|
89
|
-
--xp-surface:
|
|
90
|
-
--xp-surface-2:
|
|
91
|
-
--xp-surface-3:
|
|
92
|
-
--xp-border:
|
|
93
|
-
--xp-border-strong: rgb(
|
|
94
|
-
--xp-text:
|
|
95
|
-
--xp-text-2: rgb(
|
|
96
|
-
--xp-text-3: rgb(
|
|
97
|
-
--xp-accent:
|
|
98
|
-
--xp-accent-hover:
|
|
99
|
-
--xp-accent-active:
|
|
100
|
-
--xp-accent-subtle:
|
|
101
|
-
--xp-accent-fg: rgb(
|
|
102
|
-
--xp-accent-text:
|
|
88
|
+
--xp-bg: #1e1e1e;
|
|
89
|
+
--xp-surface: #2c2c2c;
|
|
90
|
+
--xp-surface-2: #383838;
|
|
91
|
+
--xp-surface-3: #444444;
|
|
92
|
+
--xp-border: #444444;
|
|
93
|
+
--xp-border-strong: rgb(86, 86, 86);
|
|
94
|
+
--xp-text: #ffffff;
|
|
95
|
+
--xp-text-2: rgb(192, 192, 192);
|
|
96
|
+
--xp-text-3: rgb(128, 128, 128);
|
|
97
|
+
--xp-accent: #ffffff;
|
|
98
|
+
--xp-accent-hover: #f5f5f5;
|
|
99
|
+
--xp-accent-active: #e6e6e6;
|
|
100
|
+
--xp-accent-subtle: #4f4f4f;
|
|
101
|
+
--xp-accent-fg: rgb(26, 26, 26);
|
|
102
|
+
--xp-accent-text: #ffffff;
|
|
103
103
|
--xp-accent-text-decoration: none;
|
|
104
|
-
--xp-focus:
|
|
105
|
-
--xp-series-muted: rgb(
|
|
104
|
+
--xp-focus: #ffffff;
|
|
105
|
+
--xp-series-muted: rgb(86, 86, 86);
|
|
106
106
|
--xp-success: #7fd49c;
|
|
107
107
|
--xp-success-bg: #142b1d;
|
|
108
108
|
--xp-success-border: #23492f;
|
|
@@ -118,12 +118,12 @@
|
|
|
118
118
|
--xp-radius-control: 8px;
|
|
119
119
|
--xp-radius-card: 12px;
|
|
120
120
|
--xp-radius-chip: 6px;
|
|
121
|
-
--xp-font:
|
|
122
|
-
--xp-mono: 'SF Mono', Menlo, Consolas, Monaco, monospace;
|
|
123
|
-
--xp-text-display: 600 28px/32px
|
|
124
|
-
--xp-text-title: 600 20px/28px
|
|
125
|
-
--xp-text-body: 400 15px/22px
|
|
126
|
-
--xp-text-small: 400 13px/18px
|
|
121
|
+
--xp-font: 'Inter', sans-serif;
|
|
122
|
+
--xp-mono: 'Roboto Mono', 'SF Mono', Menlo, Consolas, Monaco, monospace;
|
|
123
|
+
--xp-text-display: 600 28px/32px 'Inter', sans-serif;
|
|
124
|
+
--xp-text-title: 600 20px/28px 'Inter', sans-serif;
|
|
125
|
+
--xp-text-body: 400 15px/22px 'Inter', sans-serif;
|
|
126
|
+
--xp-text-small: 400 13px/18px 'Inter', sans-serif;
|
|
127
127
|
--xp-motion: 120ms;
|
|
128
128
|
--xp-space-half: 2px;
|
|
129
129
|
--xp-space-one-half: 6px;
|
|
@@ -140,19 +140,19 @@
|
|
|
140
140
|
--xp-space-3: 12px;
|
|
141
141
|
--xp-space-4: 16px;
|
|
142
142
|
--xp-space-5: 20px;
|
|
143
|
-
--xp-field-gap:
|
|
143
|
+
--xp-field-gap: 1.5rem;
|
|
144
144
|
--xp-space-6: 24px;
|
|
145
145
|
--xp-space-7: 28px;
|
|
146
146
|
--xp-space-8: 32px;
|
|
147
|
-
--xp-surface-raised:
|
|
148
|
-
--xp-border-control: rgb(
|
|
149
|
-
--xp-input-border: rgb(
|
|
150
|
-
--xp-border-accent: rgb(
|
|
151
|
-
--xp-text-muted: rgb(
|
|
152
|
-
--xp-text-strong:
|
|
153
|
-
--xp-text-emphasis:
|
|
154
|
-
--xp-input-bg:
|
|
155
|
-
--xp-overlay: rgba(
|
|
147
|
+
--xp-surface-raised: #383838;
|
|
148
|
+
--xp-border-control: rgb(86, 86, 86);
|
|
149
|
+
--xp-input-border: rgb(86, 86, 86);
|
|
150
|
+
--xp-border-accent: rgb(128, 128, 128);
|
|
151
|
+
--xp-text-muted: rgb(192, 192, 192);
|
|
152
|
+
--xp-text-strong: #ffffff;
|
|
153
|
+
--xp-text-emphasis: #ffffff;
|
|
154
|
+
--xp-input-bg: #2c2c2c;
|
|
155
|
+
--xp-overlay: rgba(0, 0, 0, 0.5);
|
|
156
156
|
--xp-success-surface: #142b1d;
|
|
157
157
|
--xp-success-text: #7fd49c;
|
|
158
158
|
--xp-success-text-strong: #7fd49c;
|
|
@@ -163,30 +163,30 @@
|
|
|
163
163
|
--xp-error-text: #f09494;
|
|
164
164
|
--xp-radius: 8px;
|
|
165
165
|
--xp-radius-large: 12px;
|
|
166
|
-
--xp-font-body:
|
|
166
|
+
--xp-font-body: 'Inter', sans-serif;
|
|
167
167
|
--xp-font-size-small: 13px;
|
|
168
168
|
--xp-font-size-body: 15px;
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
[class*="_PuckFields"] .xp-slot-root {
|
|
172
|
-
--xp-bg:
|
|
173
|
-
--xp-surface:
|
|
174
|
-
--xp-surface-2:
|
|
175
|
-
--xp-surface-3:
|
|
176
|
-
--xp-border:
|
|
177
|
-
--xp-border-strong: rgb(
|
|
178
|
-
--xp-text: rgb(
|
|
179
|
-
--xp-text-2:
|
|
180
|
-
--xp-text-3: rgb(
|
|
181
|
-
--xp-accent:
|
|
182
|
-
--xp-accent-hover:
|
|
183
|
-
--xp-accent-active:
|
|
184
|
-
--xp-accent-subtle:
|
|
185
|
-
--xp-accent-fg: rgb(
|
|
186
|
-
--xp-accent-text: rgb(
|
|
172
|
+
--xp-bg: #f5f5f5;
|
|
173
|
+
--xp-surface: #ffffff;
|
|
174
|
+
--xp-surface-2: #e6e6e6;
|
|
175
|
+
--xp-surface-3: #d9d9d9;
|
|
176
|
+
--xp-border: #e6e6e6;
|
|
177
|
+
--xp-border-strong: rgb(204, 204, 204);
|
|
178
|
+
--xp-text: rgb(26, 26, 26);
|
|
179
|
+
--xp-text-2: #595959;
|
|
180
|
+
--xp-text-3: rgb(128, 128, 128);
|
|
181
|
+
--xp-accent: #2c2c2c;
|
|
182
|
+
--xp-accent-hover: #383838;
|
|
183
|
+
--xp-accent-active: #444444;
|
|
184
|
+
--xp-accent-subtle: #d0d0d0;
|
|
185
|
+
--xp-accent-fg: rgb(234, 234, 234);
|
|
186
|
+
--xp-accent-text: rgb(26, 26, 26);
|
|
187
187
|
--xp-accent-text-decoration: none;
|
|
188
|
-
--xp-focus:
|
|
189
|
-
--xp-series-muted: rgb(
|
|
188
|
+
--xp-focus: #2c2c2c;
|
|
189
|
+
--xp-series-muted: rgb(179, 179, 179);
|
|
190
190
|
--xp-success: #1a6a3a;
|
|
191
191
|
--xp-success-bg: #e8f4ec;
|
|
192
192
|
--xp-success-border: #bddfc9;
|
|
@@ -202,12 +202,12 @@
|
|
|
202
202
|
--xp-radius-control: 8px;
|
|
203
203
|
--xp-radius-card: 12px;
|
|
204
204
|
--xp-radius-chip: 6px;
|
|
205
|
-
--xp-font:
|
|
206
|
-
--xp-mono: 'SF Mono', Menlo, Consolas, Monaco, monospace;
|
|
207
|
-
--xp-text-display: 600 28px/32px
|
|
208
|
-
--xp-text-title: 600 20px/28px
|
|
209
|
-
--xp-text-body: 400 15px/22px
|
|
210
|
-
--xp-text-small: 400 13px/18px
|
|
205
|
+
--xp-font: 'Inter', sans-serif;
|
|
206
|
+
--xp-mono: 'Roboto Mono', 'SF Mono', Menlo, Consolas, Monaco, monospace;
|
|
207
|
+
--xp-text-display: 600 28px/32px 'Inter', sans-serif;
|
|
208
|
+
--xp-text-title: 600 20px/28px 'Inter', sans-serif;
|
|
209
|
+
--xp-text-body: 400 15px/22px 'Inter', sans-serif;
|
|
210
|
+
--xp-text-small: 400 13px/18px 'Inter', sans-serif;
|
|
211
211
|
--xp-motion: 120ms;
|
|
212
212
|
--xp-space-half: 2px;
|
|
213
213
|
--xp-space-one-half: 6px;
|
|
@@ -224,19 +224,19 @@
|
|
|
224
224
|
--xp-space-3: 12px;
|
|
225
225
|
--xp-space-4: 16px;
|
|
226
226
|
--xp-space-5: 20px;
|
|
227
|
-
--xp-field-gap:
|
|
227
|
+
--xp-field-gap: 1.5rem;
|
|
228
228
|
--xp-space-6: 24px;
|
|
229
229
|
--xp-space-7: 28px;
|
|
230
230
|
--xp-space-8: 32px;
|
|
231
|
-
--xp-surface-raised:
|
|
232
|
-
--xp-border-control: rgb(
|
|
233
|
-
--xp-input-border: rgb(
|
|
234
|
-
--xp-border-accent: rgb(
|
|
235
|
-
--xp-text-muted:
|
|
236
|
-
--xp-text-strong: rgb(
|
|
237
|
-
--xp-text-emphasis: rgb(
|
|
238
|
-
--xp-input-bg:
|
|
239
|
-
--xp-overlay: rgba(
|
|
231
|
+
--xp-surface-raised: #e6e6e6;
|
|
232
|
+
--xp-border-control: rgb(204, 204, 204);
|
|
233
|
+
--xp-input-border: rgb(179, 179, 179);
|
|
234
|
+
--xp-border-accent: rgb(128, 128, 128);
|
|
235
|
+
--xp-text-muted: #595959;
|
|
236
|
+
--xp-text-strong: rgb(26, 26, 26);
|
|
237
|
+
--xp-text-emphasis: rgb(26, 26, 26);
|
|
238
|
+
--xp-input-bg: #ffffff;
|
|
239
|
+
--xp-overlay: rgba(0, 0, 0, 0.5);
|
|
240
240
|
--xp-success-surface: #e8f4ec;
|
|
241
241
|
--xp-success-text: #1a6a3a;
|
|
242
242
|
--xp-success-text-strong: #1a6a3a;
|
|
@@ -247,7 +247,7 @@
|
|
|
247
247
|
--xp-error-text: #a63030;
|
|
248
248
|
--xp-radius: 8px;
|
|
249
249
|
--xp-radius-large: 12px;
|
|
250
|
-
--xp-font-body:
|
|
250
|
+
--xp-font-body: 'Inter', sans-serif;
|
|
251
251
|
--xp-font-size-small: 13px;
|
|
252
252
|
--xp-font-size-body: 15px;
|
|
253
253
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CollectionAfterChangeHook, CollectionBeforeChangeHook } from 'payload';
|
|
2
2
|
/** Paired raw beforeChange capture: previousDoc may be an autosaved draft. */
|
|
3
|
-
export declare function capturePublishedContent({ req, collection, originalDoc, operation
|
|
3
|
+
export declare function capturePublishedContent({ req, collection, originalDoc, operation }: Parameters<CollectionBeforeChangeHook>[0]): Promise<void>;
|
|
4
4
|
type ContentChangeArgs = Pick<Parameters<CollectionAfterChangeHook>[0], 'doc' | 'previousDoc' | 'req' | 'collection'>;
|
|
5
5
|
/** Publish-only host helper. Audit failures are logged after savepoint recovery. */
|
|
6
6
|
export declare function recordContentChange(args: ContentChangeArgs): Promise<void>;
|