payload-live-preview 2.2.1 → 2.2.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.
Files changed (55) hide show
  1. package/README.md +3 -3
  2. package/dist/adapters/astro/index.d.ts +2 -2
  3. package/dist/adapters/astro/index.js +1 -1
  4. package/dist/adapters/astro/index.js.map +1 -1
  5. package/dist/adapters/astro/middleware-entry.js +1 -1
  6. package/dist/adapters/astro/middleware-entry.js.map +1 -1
  7. package/dist/adapters/nextjs/index.d.ts +1 -1
  8. package/dist/adapters/nextjs/index.js +1 -1
  9. package/dist/adapters/nextjs/index.js.map +1 -1
  10. package/dist/adapters/nuxt/index.d.ts +2 -2
  11. package/dist/adapters/nuxt/index.js +1 -1
  12. package/dist/adapters/nuxt/index.js.map +1 -1
  13. package/dist/adapters/sveltekit/index.d.ts +2 -2
  14. package/dist/adapters/sveltekit/index.js +1 -1
  15. package/dist/adapters/sveltekit/index.js.map +1 -1
  16. package/dist/client.cjs +1 -1
  17. package/dist/client.cjs.map +1 -1
  18. package/dist/client.js +1 -1
  19. package/dist/client.js.map +1 -1
  20. package/dist/core.cjs +1 -1
  21. package/dist/core.cjs.map +1 -1
  22. package/dist/core.d.cts +2 -2
  23. package/dist/core.d.ts +2 -2
  24. package/dist/core.js +1 -1
  25. package/dist/core.js.map +1 -1
  26. package/dist/{fragment-endpoint-DGGLIijM.d.ts → fragment-endpoint-CLRpNQ3n.d.ts} +4 -2
  27. package/dist/index.cjs +1 -1
  28. package/dist/index.cjs.map +1 -1
  29. package/dist/index.d.cts +6 -4
  30. package/dist/index.d.ts +6 -4
  31. package/dist/index.js +1 -1
  32. package/dist/index.js.map +1 -1
  33. package/dist/lean.cjs +1 -1
  34. package/dist/lean.cjs.map +1 -1
  35. package/dist/lean.js +1 -1
  36. package/dist/lean.js.map +1 -1
  37. package/dist/lexical.cjs +1 -1
  38. package/dist/lexical.cjs.map +1 -1
  39. package/dist/lexical.js +1 -1
  40. package/dist/lexical.js.map +1 -1
  41. package/dist/plugins.cjs +1 -1
  42. package/dist/plugins.cjs.map +1 -1
  43. package/dist/plugins.js +1 -1
  44. package/dist/plugins.js.map +1 -1
  45. package/dist/server.cjs +1 -1
  46. package/dist/server.cjs.map +1 -1
  47. package/dist/server.d.cts +4 -2
  48. package/dist/server.d.ts +4 -2
  49. package/dist/server.js +1 -1
  50. package/dist/server.js.map +1 -1
  51. package/dist/structural.cjs +2 -2
  52. package/dist/structural.cjs.map +1 -1
  53. package/dist/structural.js +1 -1
  54. package/dist/structural.js.map +1 -1
  55. package/package.json +6 -4
package/dist/index.d.cts CHANGED
@@ -209,8 +209,8 @@ interface SanitizeOptions {
209
209
  /** Extra tags to allow. Lower-case, untrimmed. */
210
210
  readonly additionalAllowedTags?: readonly string[];
211
211
  /**
212
- * Extra per-tag attributes, lower-case. Cannot re-admit handlers, `style`,
213
- * or — under `'strict'` — `id`, `name` and `data-payload-*`.
212
+ * Extra per-tag attributes, lower-case. Cannot re-admit handlers, `style`, or —
213
+ * under `'strict'` — `id`, `name` and `data-payload-*`; their URLs are checked.
214
214
  */
215
215
  readonly additionalAllowedAttributes?: Readonly<Record<string, readonly string[]>>;
216
216
  /**
@@ -1538,7 +1538,8 @@ interface PreviewAuthorizationRequest {
1538
1538
  * The `payload-session` strategy: forward exactly one named cookie to
1539
1539
  * `GET <serverURL>/api/<usersSlug>/me` and authorize when a user comes back.
1540
1540
  * A cookie-only request preserves working Payload 2 sessions. When `/me`
1541
- * reports no user, one retry adds an `Origin` for Payload 3's CSRF check.
1541
+ * reports no user, one retry adds an `Origin` for Payload 3's CSRF check, and
1542
+ * an endpoint that needed it gets it on the first request from then on.
1542
1543
  */
1543
1544
 
1544
1545
  /** A `fetch`-compatible function, injectable for tests. */
@@ -1561,7 +1562,8 @@ interface PayloadSessionStrategy {
1561
1562
  /**
1562
1563
  * Send this listed origin with the cookie from the first request. Without
1563
1564
  * it, try the existing cookie-only request, then the origin of `serverURL`
1564
- * once when `/me` reports a null user. Draft reads keep the accepted headers.
1565
+ * once when `/me` reports a null user; an endpoint that needed the origin
1566
+ * gets it first from then on. Draft reads keep the accepted headers.
1565
1567
  */
1566
1568
  readonly origin?: string;
1567
1569
  /** Upper bound for the `/me` round trip. Below 250 ms is raised to 250 ms; default 3000. */
package/dist/index.d.ts CHANGED
@@ -209,8 +209,8 @@ interface SanitizeOptions {
209
209
  /** Extra tags to allow. Lower-case, untrimmed. */
210
210
  readonly additionalAllowedTags?: readonly string[];
211
211
  /**
212
- * Extra per-tag attributes, lower-case. Cannot re-admit handlers, `style`,
213
- * or — under `'strict'` — `id`, `name` and `data-payload-*`.
212
+ * Extra per-tag attributes, lower-case. Cannot re-admit handlers, `style`, or —
213
+ * under `'strict'` — `id`, `name` and `data-payload-*`; their URLs are checked.
214
214
  */
215
215
  readonly additionalAllowedAttributes?: Readonly<Record<string, readonly string[]>>;
216
216
  /**
@@ -1538,7 +1538,8 @@ interface PreviewAuthorizationRequest {
1538
1538
  * The `payload-session` strategy: forward exactly one named cookie to
1539
1539
  * `GET <serverURL>/api/<usersSlug>/me` and authorize when a user comes back.
1540
1540
  * A cookie-only request preserves working Payload 2 sessions. When `/me`
1541
- * reports no user, one retry adds an `Origin` for Payload 3's CSRF check.
1541
+ * reports no user, one retry adds an `Origin` for Payload 3's CSRF check, and
1542
+ * an endpoint that needed it gets it on the first request from then on.
1542
1543
  */
1543
1544
 
1544
1545
  /** A `fetch`-compatible function, injectable for tests. */
@@ -1561,7 +1562,8 @@ interface PayloadSessionStrategy {
1561
1562
  /**
1562
1563
  * Send this listed origin with the cookie from the first request. Without
1563
1564
  * it, try the existing cookie-only request, then the origin of `serverURL`
1564
- * once when `/me` reports a null user. Draft reads keep the accepted headers.
1565
+ * once when `/me` reports a null user; an endpoint that needed the origin
1566
+ * gets it first from then on. Draft reads keep the accepted headers.
1565
1567
  */
1566
1568
  readonly origin?: string;
1567
1569
  /** Upper bound for the `/me` round trip. Below 250 ms is raised to 250 ms; default 3000. */