payload-live-preview 1.5.0 → 1.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 +25 -1
- package/dist/adapters/astro/index.d.ts +32 -4
- package/dist/adapters/astro/index.js +1 -1
- package/dist/adapters/astro/index.js.map +1 -1
- package/dist/adapters/astro/middleware-entry.d.ts +1 -1
- package/dist/adapters/astro/middleware-entry.js +1 -1
- package/dist/adapters/astro/middleware-entry.js.map +1 -1
- package/dist/adapters/nextjs/index.js +1 -1
- package/dist/adapters/nextjs/index.js.map +1 -1
- package/dist/adapters/nuxt/index.js +1 -1
- package/dist/adapters/nuxt/index.js.map +1 -1
- package/dist/adapters/sveltekit/index.js +1 -1
- package/dist/adapters/sveltekit/index.js.map +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.cts +11 -0
- package/dist/core.d.ts +11 -0
- package/dist/core.js +1 -1
- package/dist/core.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/{middleware-CkSeLZ-9.d.ts → middleware-DD4Hwomt.d.ts} +6 -1
- package/package.json +1 -1
|
@@ -9,6 +9,11 @@ interface LivePreviewAstroOptions {
|
|
|
9
9
|
*
|
|
10
10
|
* - `'inline'` (default) — bake the runtime into every page at
|
|
11
11
|
* build time. For `output: 'static'` projects.
|
|
12
|
+
* - `'loader'` — inject a few hundred bytes that check the preview
|
|
13
|
+
* context and fetch the runtime as a hashed, SRI-verified asset only
|
|
14
|
+
* when it is one. Also for `output: 'static'`, and the better choice
|
|
15
|
+
* there: `'inline'` charges every ordinary visitor ~21 KB gzip for a
|
|
16
|
+
* feature only an editor uses.
|
|
12
17
|
* - `'middleware'` — auto-register the preview middleware:
|
|
13
18
|
* request-time injection into requests with preview intent,
|
|
14
19
|
* plus `frame-ancestors` CSP management. For `output: 'server'`.
|
|
@@ -19,7 +24,7 @@ interface LivePreviewAstroOptions {
|
|
|
19
24
|
* must be access-controlled, compose `createLivePreviewMiddleware()`
|
|
20
25
|
* manually after an application-owned server-side authorization.
|
|
21
26
|
*/
|
|
22
|
-
readonly mode?: 'inline' | 'middleware';
|
|
27
|
+
readonly mode?: 'inline' | 'loader' | 'middleware';
|
|
23
28
|
/**
|
|
24
29
|
* Allowed Payload admin origin(s) for inbound browser messages and
|
|
25
30
|
* the optional Referer intent signal. This does not authenticate the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "payload-live-preview",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "Live preview for Payload CMS in Astro and any SSR/static frontend (SvelteKit, Nuxt, Next.js, plain HTML). Patches the DOM live, no rebuild.",
|
|
5
5
|
"author": "relative23",
|
|
6
6
|
"license": "MIT",
|