payload-live-preview 2.0.0 → 2.0.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 +41 -34
- package/dist/adapters/astro/RichText.astro +1 -1
- package/dist/adapters/astro/index.d.ts +8 -8
- 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 +3 -3
- package/dist/adapters/astro/middleware-entry.js +1 -1
- package/dist/adapters/astro/middleware-entry.js.map +1 -1
- package/dist/adapters/nextjs/index.d.ts +2 -2
- package/dist/adapters/nextjs/index.js +1 -1
- package/dist/adapters/nextjs/index.js.map +1 -1
- package/dist/adapters/nuxt/index.d.ts +4 -4
- package/dist/adapters/nuxt/index.js +1 -1
- package/dist/adapters/nuxt/index.js.map +1 -1
- package/dist/adapters/nuxt/module.d.ts +13 -5
- package/dist/adapters/nuxt/module.js.map +1 -1
- package/dist/adapters/react/index.d.ts +8 -6
- package/dist/adapters/react/index.js.map +1 -1
- package/dist/adapters/sveltekit/index.d.ts +5 -5
- package/dist/adapters/sveltekit/index.js +1 -1
- package/dist/adapters/sveltekit/index.js.map +1 -1
- package/dist/adapters/vue/index.d.ts +3 -3
- package/dist/adapters/vue/index.js.map +1 -1
- package/dist/annotate.js +1 -1
- package/dist/annotate.js.map +1 -1
- package/dist/client.cjs +1 -1
- package/dist/client.cjs.map +1 -1
- package/dist/client.js +1 -1
- package/dist/client.js.map +1 -1
- package/dist/codegen-astro.d.ts +4 -1
- package/dist/codegen-astro.js.map +1 -1
- package/dist/codegen-cli.js +1 -1
- package/dist/codegen-cli.js.map +1 -1
- package/dist/codegen.cjs +1 -1
- package/dist/codegen.cjs.map +1 -1
- package/dist/codegen.js +1 -1
- package/dist/codegen.js.map +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.cts +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +1 -1
- package/dist/core.js.map +1 -1
- package/dist/doctor-cli.d.ts +1 -1
- package/dist/doctor-cli.js +1 -1
- package/dist/doctor-cli.js.map +1 -1
- package/dist/doctor.d.ts +4 -2
- package/dist/doctor.js +1 -1
- package/dist/doctor.js.map +1 -1
- package/dist/{fragment-endpoint-3Mlz7GDz.d.ts → fragment-endpoint-DATKU183.d.ts} +2 -2
- package/dist/fragment.cjs.map +1 -1
- package/dist/fragment.d.cts +6 -3
- package/dist/fragment.d.ts +6 -3
- package/dist/fragment.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lean.cjs +1 -1
- package/dist/lean.cjs.map +1 -1
- package/dist/lean.d.cts +3 -3
- package/dist/lean.d.ts +3 -3
- package/dist/lean.js +1 -1
- package/dist/lean.js.map +1 -1
- package/dist/lexical.cjs +1 -1
- package/dist/lexical.cjs.map +1 -1
- package/dist/lexical.d.cts +11 -1
- package/dist/lexical.d.ts +11 -1
- package/dist/lexical.js +1 -1
- package/dist/lexical.js.map +1 -1
- package/dist/{locals-DBXDMxOA.d.ts → locals-CNUGYbA_.d.ts} +1 -1
- package/dist/{middleware-Bx9I7PXW.d.ts → middleware-CWObDO37.d.ts} +2 -2
- package/dist/migrate.d.ts +6 -0
- package/dist/migrate.js +1 -1
- package/dist/migrate.js.map +1 -1
- package/dist/{options-BW1eqXvc.d.ts → options-uHKrDM2U.d.ts} +2 -1
- package/dist/plugins.cjs +1 -1
- package/dist/plugins.cjs.map +1 -1
- package/dist/plugins.js +1 -1
- package/dist/plugins.js.map +1 -1
- package/dist/{probe-CELeUciC.d.ts → probe-DqaItcwX.d.ts} +15 -0
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js.map +1 -1
- package/dist/structural.cjs +2 -2
- package/dist/structural.cjs.map +1 -1
- package/dist/structural.js +2 -2
- package/dist/structural.js.map +1 -1
- package/package.json +6 -4
package/dist/index.d.cts
CHANGED
|
@@ -625,8 +625,8 @@ interface SanitizeOptions {
|
|
|
625
625
|
readonly templateMode?: boolean;
|
|
626
626
|
}
|
|
627
627
|
/**
|
|
628
|
-
* The
|
|
629
|
-
*
|
|
628
|
+
* The default for calls without an explicit `policy`, per package entry. A
|
|
629
|
+
* runtime carries its own `sanitizerPolicy` and never writes here (ADR 0002).
|
|
630
630
|
*/
|
|
631
631
|
declare function setSanitizerPolicy(mode: SanitizerPolicyMode): void;
|
|
632
632
|
/** The `Document` surface the sanitizer needs; jsdom, linkedom and happy-dom all provide it. */
|
|
@@ -636,7 +636,7 @@ interface SanitizerDocument {
|
|
|
636
636
|
readonly content: ParentNode;
|
|
637
637
|
};
|
|
638
638
|
}
|
|
639
|
-
/** Supply a `Document` for SSR, e.g. linkedom's `parseHTML(...).document`; `null` clears it. */
|
|
639
|
+
/** Supply a `Document` for SSR, e.g. linkedom's `parseHTML(...).document`; `null` clears it, for every entry. */
|
|
640
640
|
declare function setSanitizerDocument(doc: SanitizerDocument | null): void;
|
|
641
641
|
/**
|
|
642
642
|
* Sanitize `html`; malformed input is recovered by the parser first.
|
|
@@ -1116,14 +1116,14 @@ interface InlineScriptConfig {
|
|
|
1116
1116
|
/**
|
|
1117
1117
|
* A runtime artifact to embed instead of the full one — today only
|
|
1118
1118
|
* `LEAN_RUNTIME` from `payload-live-preview/lean`, which leaves out the
|
|
1119
|
-
* strategies, the keyed morph, the structural arrays, the item templates
|
|
1120
|
-
*
|
|
1121
|
-
* a page needs one of them.
|
|
1119
|
+
* strategies, the keyed morph, the structural arrays, the item templates, the
|
|
1120
|
+
* announcer and auto-binding (about 7 KB gzip less on the page) and reports
|
|
1121
|
+
* LP0104 when a page needs one of them.
|
|
1122
1122
|
*
|
|
1123
1123
|
* It is an imported value rather than a `profile: 'lean'` string on purpose:
|
|
1124
1124
|
* a second artifact behind a string option would sit in every build that can
|
|
1125
|
-
* reach the generator
|
|
1126
|
-
* way the bytes follow the import.
|
|
1125
|
+
* reach the generator; measured, it grew each adapter entry by the artifact's
|
|
1126
|
+
* whole size. This way the bytes follow the import.
|
|
1127
1127
|
*
|
|
1128
1128
|
* Not serialized: it decides which bytes are emitted, not how they behave.
|
|
1129
1129
|
*/
|
|
@@ -1317,7 +1317,7 @@ interface PayloadSessionStrategy {
|
|
|
1317
1317
|
readonly cookieName?: string;
|
|
1318
1318
|
/** Upper bound for the `/me` round trip. Below 250 ms is raised to 250 ms; default 3000. */
|
|
1319
1319
|
readonly timeoutMs?: number;
|
|
1320
|
-
/** Longest cookie value accepted; longer ones are refused as `
|
|
1320
|
+
/** Longest cookie value accepted; longer ones are refused as `missing-credential`. Default 4096. */
|
|
1321
1321
|
readonly maxCookieLength?: number;
|
|
1322
1322
|
readonly fetch?: FetchLike;
|
|
1323
1323
|
/** Clock, Unix milliseconds. Injectable for tests. */
|
|
@@ -1489,7 +1489,7 @@ declare function hasPreviewIntent(request: PreviewRequestLike, options?: Preview
|
|
|
1489
1489
|
*
|
|
1490
1490
|
* Measured against the published 1.8.1 declarations, entry by entry, not
|
|
1491
1491
|
* guessed: `isPreviewRequest` was exported from the root **and** from
|
|
1492
|
-
* `./astro`, so it is re-exported from both. The
|
|
1492
|
+
* `./astro`, so it is re-exported from both. The six names 2.0 dropped
|
|
1493
1493
|
* moved behind `definePreview()` or changed shape, where an alias would restore
|
|
1494
1494
|
* the very defaults the move removed (ADR 0007, ledger rows 1 and 9).
|
|
1495
1495
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -625,8 +625,8 @@ interface SanitizeOptions {
|
|
|
625
625
|
readonly templateMode?: boolean;
|
|
626
626
|
}
|
|
627
627
|
/**
|
|
628
|
-
* The
|
|
629
|
-
*
|
|
628
|
+
* The default for calls without an explicit `policy`, per package entry. A
|
|
629
|
+
* runtime carries its own `sanitizerPolicy` and never writes here (ADR 0002).
|
|
630
630
|
*/
|
|
631
631
|
declare function setSanitizerPolicy(mode: SanitizerPolicyMode): void;
|
|
632
632
|
/** The `Document` surface the sanitizer needs; jsdom, linkedom and happy-dom all provide it. */
|
|
@@ -636,7 +636,7 @@ interface SanitizerDocument {
|
|
|
636
636
|
readonly content: ParentNode;
|
|
637
637
|
};
|
|
638
638
|
}
|
|
639
|
-
/** Supply a `Document` for SSR, e.g. linkedom's `parseHTML(...).document`; `null` clears it. */
|
|
639
|
+
/** Supply a `Document` for SSR, e.g. linkedom's `parseHTML(...).document`; `null` clears it, for every entry. */
|
|
640
640
|
declare function setSanitizerDocument(doc: SanitizerDocument | null): void;
|
|
641
641
|
/**
|
|
642
642
|
* Sanitize `html`; malformed input is recovered by the parser first.
|
|
@@ -1116,14 +1116,14 @@ interface InlineScriptConfig {
|
|
|
1116
1116
|
/**
|
|
1117
1117
|
* A runtime artifact to embed instead of the full one — today only
|
|
1118
1118
|
* `LEAN_RUNTIME` from `payload-live-preview/lean`, which leaves out the
|
|
1119
|
-
* strategies, the keyed morph, the structural arrays, the item templates
|
|
1120
|
-
*
|
|
1121
|
-
* a page needs one of them.
|
|
1119
|
+
* strategies, the keyed morph, the structural arrays, the item templates, the
|
|
1120
|
+
* announcer and auto-binding (about 7 KB gzip less on the page) and reports
|
|
1121
|
+
* LP0104 when a page needs one of them.
|
|
1122
1122
|
*
|
|
1123
1123
|
* It is an imported value rather than a `profile: 'lean'` string on purpose:
|
|
1124
1124
|
* a second artifact behind a string option would sit in every build that can
|
|
1125
|
-
* reach the generator
|
|
1126
|
-
* way the bytes follow the import.
|
|
1125
|
+
* reach the generator; measured, it grew each adapter entry by the artifact's
|
|
1126
|
+
* whole size. This way the bytes follow the import.
|
|
1127
1127
|
*
|
|
1128
1128
|
* Not serialized: it decides which bytes are emitted, not how they behave.
|
|
1129
1129
|
*/
|
|
@@ -1317,7 +1317,7 @@ interface PayloadSessionStrategy {
|
|
|
1317
1317
|
readonly cookieName?: string;
|
|
1318
1318
|
/** Upper bound for the `/me` round trip. Below 250 ms is raised to 250 ms; default 3000. */
|
|
1319
1319
|
readonly timeoutMs?: number;
|
|
1320
|
-
/** Longest cookie value accepted; longer ones are refused as `
|
|
1320
|
+
/** Longest cookie value accepted; longer ones are refused as `missing-credential`. Default 4096. */
|
|
1321
1321
|
readonly maxCookieLength?: number;
|
|
1322
1322
|
readonly fetch?: FetchLike;
|
|
1323
1323
|
/** Clock, Unix milliseconds. Injectable for tests. */
|
|
@@ -1489,7 +1489,7 @@ declare function hasPreviewIntent(request: PreviewRequestLike, options?: Preview
|
|
|
1489
1489
|
*
|
|
1490
1490
|
* Measured against the published 1.8.1 declarations, entry by entry, not
|
|
1491
1491
|
* guessed: `isPreviewRequest` was exported from the root **and** from
|
|
1492
|
-
* `./astro`, so it is re-exported from both. The
|
|
1492
|
+
* `./astro`, so it is re-exported from both. The six names 2.0 dropped
|
|
1493
1493
|
* moved behind `definePreview()` or changed shape, where an alias would restore
|
|
1494
1494
|
* the very defaults the move removed (ADR 0007, ledger rows 1 and 9).
|
|
1495
1495
|
*/
|