@delmaredigital/payload-puck 0.6.19 → 0.6.20

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.
@@ -155,7 +155,9 @@ import { mapRootPropsToPayloadFields, deepMerge } from './utils/mapRootProps.js'
155
155
  }
156
156
  // Parse request body
157
157
  const body = await request.json();
158
- const { puckData, title, slug, status, draft, isHomepage, swapHomepage, folder, pageSegment } = body;
158
+ const { puckData, title, slug, status: statusField, _status, draft, isHomepage, swapHomepage, folder, pageSegment } = body;
159
+ // Accept both `status` and `_status` (editor sends `_status` per Payload convention)
160
+ const status = statusField || _status;
159
161
  // Check publish permission only if explicitly publishing
160
162
  if (status === 'published') {
161
163
  const canPublish = auth.canPublish || auth.canEdit;
@@ -242,6 +242,8 @@ export interface UpdatePageBody {
242
242
  title?: string;
243
243
  slug?: string;
244
244
  status?: 'draft' | 'published';
245
+ /** Alias for status — the editor sends `_status` (Payload convention) */
246
+ _status?: 'draft' | 'published';
245
247
  /**
246
248
  * When true, save as draft without publishing.
247
249
  * Used by Payload's versions.drafts system.
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "0.6.19";
1
+ export declare const VERSION = "0.6.20";
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // Auto-generated by scripts/generate-version.js - do not edit manually
2
- export const VERSION = '0.6.19';
2
+ export const VERSION = '0.6.20';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@delmaredigital/payload-puck",
3
- "version": "0.6.19",
3
+ "version": "0.6.20",
4
4
  "description": "Puck visual page builder plugin for Payload CMS",
5
5
  "type": "module",
6
6
  "license": "MIT",