payload-canvas 0.6.0 → 0.6.1

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 CHANGED
@@ -707,7 +707,7 @@ Every entry point is ESM with `.d.ts` types. Client components keep their `'use
707
707
  | `context` | `{ collection, doc }` | The document a template renders. See [Templates](#templates-and-binding). |
708
708
  | `pageData` | `Record<string, unknown>` | Data the page loads once for its blocks. See [Page data](#page-data-and--block-context--components). |
709
709
  | `linkComponent` | client component | Renders the links of the button, link and menu blocks on the site. Default: a plain `<a>`. Pass `next/link` for client-side navigation and prefetching. It must be a client component (the menu is one and gets it as a prop). Your own components get it as `linkComponent` when you mark them with `withLinkComponent(Component)`. The canvas keeps plain links. |
710
- | `priorityImages` | `number` | How many images of the first section load first (`fetchpriority="high"`, not lazy), in page order. Default `1`, usually the hero image. An image whose **Load first** is switched off keeps lazy loading. Give layouts further down the page (a footer) `0`. |
710
+ | `priorityImages` | `number` | How many images of the first section load first (`fetchpriority="high"`, not lazy), in page order. Default `1`, usually the hero image. An image whose **Load first** is switched off keeps lazy loading. Videos do not count: their **Load first** is only what the editor sets. Give layouts further down the page (a footer) `0`. |
711
711
 
712
712
  ```tsx
713
713
  import Link from 'next/link'
@@ -1064,6 +1064,13 @@ export const blocks = [...defaultBlocks({ linkCollections: ['pages'] }), pricing
1064
1064
  - Field help in the inspector stays short. Put syntax and examples for agents in the field's `custom.ai.description`, and a hint inside an empty input in `admin.placeholder` (the inspector shows it).
1065
1065
  - Props worth knowing on the default blocks:
1066
1066
  - `image`: `priority` (load first: `loading="eager"` and `fetchpriority="high"`, for the hero image; the first image of the first section gets it unless switched off, see `priorityImages`) and `sizes` (the HTML `sizes` attribute, for example `(min-width: 768px) 50vw, 100vw`). The media's focal point (`focalX`, `focalY`) sets `object-position`, so a cropped image keeps its subject. Payload's default 50/50 counts as unset, so an `object-position` class (`object-top`) sets the crop of a photo whose focal point nobody moved. Limit: a focal point set to exactly 50/50 loses to such a class.
1067
+ - `video`: an upload or a link (YouTube, Vimeo or a video file), with `poster`, `autoplay`, `loop`, `muted` and `controls` (default on). New in 0.6.1, all off by default:
1068
+ - `decorative` (**Decorative**): for a background video. It sets `aria-hidden="true"` and `tabindex="-1"` and turns the controls off, also for YouTube and Vimeo.
1069
+ - `priority` (**Load first**): for the main video at the top. The video gets `preload="auto"` (else `preload="metadata"`), and the poster preloads with `fetchpriority="high"` (React `preload()`, a `<link rel="preload" as="image">`). An embed loads eagerly. Unlike an image, a video never gets it from `priorityImages`, because that would load the whole file: switch it on yourself.
1070
+ - Autoplay respects reduced motion. A `<video>` never gets the `autoplay` attribute. On the site a small client component starts it after mount, and only when the visitor does not ask for less motion (`prefers-reduced-motion: reduce`). Otherwise the video shows its poster and stays paused. A change of that setting plays or pauses it. Its JavaScript loads only on pages with an autoplaying video. Without JavaScript the video stays on its poster. A YouTube or Vimeo embed cannot check the setting: the player decides.
1071
+ - On the canvas and in section thumbnails an autoplaying video stays paused on its poster, and an embed does not autoplay, so editing stays calm.
1072
+ - The poster's focal point (`focalX`, `focalY`) sets `object-position` on the video, with the image block's rule: Payload's default 50/50 leaves the crop to the classes (`object-top`).
1073
+ - A hero background video: in a stack with `relative isolate`, a `video` first with `autoplay`, `muted`, `loop`, `decorative`, `priority` and a `poster`, and the classes `absolute inset-0 -z-10 size-full object-cover`.
1067
1074
  - `heading`: `accent`, words of the text to highlight. They render as `<em>`. Style them with classes on the heading, for example `[&_em]:text-primary [&_em]:not-italic`.
1068
1075
  - `stack`: `as` (the inspector's **Tag**) also takes `ol`, `ul`, `li`, `dl`, `dt`, `dd`, `figure` and `figcaption`, for lists, term lists and captions. It takes no `p` or `span`: those cannot hold block children such as a heading.
1069
1076
  - The `menu` block folds its links into a "Menu" button and a panel on small screens. Set `ctaLabel` and `cta` (a link) to add a button as the last row of that panel, for example the header's call to action, which a header hides on phones. The inline links, and so the wide-screen header, do not change. `toggleLabel` is the text of the menu button (default "Menu"). The menu's labels (`label`, `toggleLabel`, `submenuLabel`) store nothing until someone types one: empty, they use the site's labels (`builtinComponents({ labels: { menu } })`, see [Labels](#labels)) or English. The panel and dropdown colours read the theme's CSS variables (`--color-background`, `--color-foreground`, `--color-border`, `--color-primary`) with the system colours as the fallback, so the menu needs no particular design system.
@@ -1224,7 +1231,7 @@ export const components: BlockComponents = { ...builtinComponents({ icons, label
1224
1231
  - Every built-in takes its look from `className`. The definitions have plain `defaultClassName`s without colours. Inner elements that have their own entry in the **Style target** select are parts (see [Classes on inner elements](#classes-on-inner-elements)). The other inner elements have `data-*` attributes, so you style them from the block's `className` with variants such as `[&_[data-page-gap]]:opacity-50`.
1225
1232
  - **Replace a built-in** with your own block of the same type: leave it out of `include` and add your block. Block types must be unique, so the plugin refuses both at once. In the components map, a key of yours with the same type wins over `builtinComponents()`.
1226
1233
  - `builtinComponents()` returns every built-in component. The interactive ones (carousel, popup, tabs, accordion, filter link) load their JavaScript only on pages that render them, so blocks you do not use cost nothing on the page. The marquee and previous / next are server components with no JavaScript.
1227
- - For a photo that opens large, use a popup with a small image in its trigger and the large image in its content. For a background, put an `image` or `video` block first in a stack with `relative isolate`, and give the media `absolute inset-0 -z-10 size-full object-cover`.
1234
+ - For a photo that opens large, use a popup with a small image in its trigger and the large image in its content. For a background, put an `image` or `video` block first in a stack with `relative isolate`, and give the media `absolute inset-0 -z-10 size-full object-cover`. Mark a background video **Decorative**, and switch on **Load first** when it is the first thing on the page.
1228
1235
 
1229
1236
  #### Labels
1230
1237
 
@@ -451,15 +451,40 @@ export function defaultBlocks(options) {
451
451
  custom: { ai: { description: 'A YouTube or Vimeo link, or a direct link to a video file.' } },
452
452
  },
453
453
  { name: 'poster', type: 'upload', label: 'Poster image', relationTo: mediaCollection },
454
- { name: 'autoplay', type: 'checkbox', label: 'Autoplay', admin: { description: 'Works only when muted.' } },
454
+ {
455
+ name: 'autoplay',
456
+ type: 'checkbox',
457
+ label: 'Autoplay',
458
+ admin: { description: 'Works only when muted. Stays paused for visitors who ask for less motion.' },
459
+ },
455
460
  { name: 'loop', type: 'checkbox', label: 'Loop' },
456
461
  { name: 'muted', type: 'checkbox', label: 'Muted' },
457
462
  { name: 'controls', type: 'checkbox', label: 'Show controls', defaultValue: true },
463
+ {
464
+ name: 'decorative',
465
+ type: 'checkbox',
466
+ label: 'Decorative',
467
+ admin: { description: 'For a background video: hidden from screen readers, no controls.' },
468
+ },
469
+ {
470
+ name: 'priority',
471
+ type: 'checkbox',
472
+ label: 'Load first',
473
+ admin: { description: 'For the main video at the top.' },
474
+ // Unlike images, a video never gets this from `priorityImages`: it would load the whole file.
475
+ custom: { builderAutoPriority: false },
476
+ },
458
477
  ],
459
478
  defaultClassName: 'w-full',
460
479
  ai: {
461
480
  description: `A video: an upload from the "${mediaCollection}" collection (source "upload", set "video") or a ` +
462
- 'YouTube, Vimeo or video file URL (source "url", set "url").',
481
+ 'YouTube, Vimeo or video file URL (source "url", set "url"). "poster" is an image upload shown before ' +
482
+ 'the video plays; its focal point (focalX, focalY) sets object-position. "autoplay" starts the video ' +
483
+ 'from script on the site, never on the editor canvas and never for visitors with reduced motion (they ' +
484
+ 'see the poster). For a background video behind a hero: put the video first in a stack with "relative isolate", ' +
485
+ 'set "autoplay", "muted", "loop" and "decorative": true (aria-hidden, no controls, no tab stop), "priority": ' +
486
+ 'true when it is the first thing on the page (preload="auto", the poster preloads with high fetch priority), ' +
487
+ 'a "poster", and className "absolute inset-0 -z-10 size-full object-cover".',
463
488
  example: {
464
489
  type: 'video',
465
490
  props: { source: 'url', url: 'https://www.youtube.com/watch?v=aqz-KE-bpKQ', controls: true },
@@ -0,0 +1,20 @@
1
+ import { type CSSProperties } from 'react';
2
+ /** Plain data only: the server component `Video` renders this one. */
3
+ export type AutoplayVideoProps = {
4
+ attributes: Record<string, string | number>;
5
+ className?: string;
6
+ src: string;
7
+ poster?: string;
8
+ loop: boolean;
9
+ muted: boolean;
10
+ controls: boolean;
11
+ preload: 'auto' | 'metadata';
12
+ style?: CSSProperties;
13
+ };
14
+ /**
15
+ * An autoplaying `<video>` that starts from script after mount, not with the `autoplay` attribute,
16
+ * so it can ask first: it plays only when the visitor does not ask for less motion. Otherwise it
17
+ * shows the poster and stays paused. A change of that setting plays or pauses it. A browser that
18
+ * refuses to play (an unmuted video) keeps the poster too.
19
+ */
20
+ export declare function AutoplayVideo({ attributes, className, src, poster, loop, muted, controls, preload, style }: AutoplayVideoProps): import("react").JSX.Element;
@@ -0,0 +1,34 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useEffect, useRef } from 'react';
4
+ import { useCanvasMode } from '../render/canvasMode.js';
5
+ import { REDUCED_MOTION, startsPlaying } from './videoPlayback.js';
6
+ /**
7
+ * An autoplaying `<video>` that starts from script after mount, not with the `autoplay` attribute,
8
+ * so it can ask first: it plays only when the visitor does not ask for less motion. Otherwise it
9
+ * shows the poster and stays paused. A change of that setting plays or pauses it. A browser that
10
+ * refuses to play (an unmuted video) keeps the poster too.
11
+ */
12
+ export function AutoplayVideo({ attributes, className, src, poster, loop, muted, controls, preload, style }) {
13
+ const ref = useRef(null);
14
+ const canvas = useCanvasMode() !== 'site';
15
+ useEffect(() => {
16
+ const video = ref.current;
17
+ if (!video)
18
+ return;
19
+ const query = window.matchMedia(REDUCED_MOTION);
20
+ const sync = () => {
21
+ if (!startsPlaying({ autoplay: true, canvas, reducedMotion: query.matches })) {
22
+ video.pause();
23
+ return;
24
+ }
25
+ // Hydration does not set the property; browsers allow autoplay only for muted videos.
26
+ video.muted = muted;
27
+ video.play().catch(() => { });
28
+ };
29
+ sync();
30
+ query.addEventListener('change', sync);
31
+ return () => query.removeEventListener('change', sync);
32
+ }, [canvas, muted]);
33
+ return (_jsx("video", { ref: ref, ...attributes, className: className, src: src, poster: poster, loop: loop, muted: muted, controls: controls, playsInline: true, preload: preload, style: style }));
34
+ }
@@ -2,5 +2,13 @@ import type { BlockComponentProps } from '../render/types.js';
2
2
  /**
3
3
  * An uploaded video or a URL. YouTube and Vimeo URLs become an `<iframe>`; other URLs play in
4
4
  * `<video>`. In the canvas the iframe ignores the pointer, so clicks select the block.
5
+ *
6
+ * - Autoplay: a `<video>` never gets the `autoplay` attribute. On the site a small client
7
+ * component (`AutoplayVideo`) starts it after mount, unless the visitor asks for less motion.
8
+ * On the canvas (and in section thumbnails) an autoplay video stays paused on its poster, and an
9
+ * embed gets no autoplay.
10
+ * - `priority` (Load first): `preload="auto"`, and the poster preloads with high fetch priority.
11
+ * - The poster's focal point sets `object-position`, with the image block's rule (`focalStyle`).
12
+ * - `decorative`: `aria-hidden="true"`, no controls, no tab stop. For a background video.
5
13
  */
6
- export declare function Video({ props, className, attributes, mode }: BlockComponentProps): import("react").JSX.Element | null;
14
+ export declare function Video({ props, className, attributes, mode, canvasMode }: BlockComponentProps): import("react").JSX.Element | null;
@@ -1,6 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { isDoc } from './Image.js';
2
+ import { preload } from 'react-dom';
3
+ import { focalStyle, isDoc } from './Image.js';
4
+ // The script that starts an autoplaying video loads only on pages that render one.
5
+ import { AutoplayVideo } from './lazy.js';
3
6
  import { PlaceholderBox } from './placeholder.js';
7
+ import { decorativeAttributes, videoPreload, videoSettingsOf } from './videoPlayback.js';
4
8
  import { isPlayableVideoUrl, parseVideoUrl } from './videoUrl.js';
5
9
  /** Classes that already give the element a height. Without one, an embed gets a 16:9 ratio. */
6
10
  const SIZE_CLASS = /(^|\s|:)(aspect-|h-|size-|min-h-)/;
@@ -27,15 +31,23 @@ function InvalidUrl({ attributes, className }) {
27
31
  /**
28
32
  * An uploaded video or a URL. YouTube and Vimeo URLs become an `<iframe>`; other URLs play in
29
33
  * `<video>`. In the canvas the iframe ignores the pointer, so clicks select the block.
34
+ *
35
+ * - Autoplay: a `<video>` never gets the `autoplay` attribute. On the site a small client
36
+ * component (`AutoplayVideo`) starts it after mount, unless the visitor asks for less motion.
37
+ * On the canvas (and in section thumbnails) an autoplay video stays paused on its poster, and an
38
+ * embed gets no autoplay.
39
+ * - `priority` (Load first): `preload="auto"`, and the poster preloads with high fetch priority.
40
+ * - The poster's focal point sets `object-position`, with the image block's rule (`focalStyle`).
41
+ * - `decorative`: `aria-hidden="true"`, no controls, no tab stop. For a background video.
30
42
  */
31
- export function Video({ props, className, attributes, mode }) {
32
- const options = {
33
- autoplay: props.autoplay === true,
34
- loop: props.loop === true,
35
- muted: props.muted === true,
36
- controls: props.controls !== false,
37
- };
38
- const poster = isDoc(props.poster) ? props.poster.url : undefined;
43
+ export function Video({ props, className, attributes, mode, canvasMode }) {
44
+ const canvas = mode === 'canvas' || canvasMode !== undefined;
45
+ const settings = videoSettingsOf(props);
46
+ // The canvas never autoplays: editing stays calm.
47
+ const options = { autoplay: settings.autoplay && !canvas, loop: settings.loop, muted: settings.muted, controls: settings.controls };
48
+ const hidden = decorativeAttributes(settings.decorative);
49
+ const posterDoc = isDoc(props.poster) ? props.poster : undefined;
50
+ const poster = posterDoc ? posterDoc.url : undefined;
39
51
  // A missing source means the default ("upload"), unless only a URL is set.
40
52
  const fromUrl = props.source === 'url' || (props.source == null && props.video == null && typeof props.url === 'string');
41
53
  let src = null;
@@ -52,7 +64,7 @@ export function Video({ props, className, attributes, mode }) {
52
64
  Object.assign(style, { aspectRatio: '16 / 9', height: 'auto' });
53
65
  if (mode === 'canvas')
54
66
  style.pointerEvents = 'none';
55
- return (_jsx("iframe", { ...attributes, className: className, src: embed.embedUrl, title: embed.kind === 'youtube' ? 'YouTube video' : 'Vimeo video', allow: "accelerometer; autoplay; clipboard-write; encrypted-media; fullscreen; gyroscope; picture-in-picture; web-share", allowFullScreen: true, loading: "lazy", referrerPolicy: "strict-origin-when-cross-origin", style: style }));
67
+ return (_jsx("iframe", { ...attributes, ...hidden, className: className, src: embed.embedUrl, title: embed.kind === 'youtube' ? 'YouTube video' : 'Vimeo video', allow: "accelerometer; autoplay; clipboard-write; encrypted-media; fullscreen; gyroscope; picture-in-picture; web-share", allowFullScreen: true, loading: settings.priority ? 'eager' : 'lazy', referrerPolicy: "strict-origin-when-cross-origin", style: style }));
56
68
  }
57
69
  src = embed?.src ?? null;
58
70
  }
@@ -64,5 +76,21 @@ export function Video({ props, className, attributes, mode }) {
64
76
  return null;
65
77
  return _jsx(PlaceholderBox, { attributes: attributes, className: className, label: "Video", style: { aspectRatio: '16 / 9' } });
66
78
  }
67
- return (_jsx("video", { ...attributes, className: className, src: src, poster: poster, autoPlay: options.autoplay, loop: options.loop, muted: options.muted, controls: options.controls, playsInline: true, preload: "metadata" }));
79
+ // The poster is what a visitor sees first, so it loads like a priority image.
80
+ if (settings.priority && poster && !canvas)
81
+ preload(poster, { as: 'image', fetchPriority: 'high' });
82
+ const video = {
83
+ attributes: { ...attributes, ...hidden },
84
+ className,
85
+ src,
86
+ poster,
87
+ loop: options.loop,
88
+ muted: options.muted,
89
+ controls: options.controls,
90
+ preload: videoPreload(settings.priority),
91
+ style: focalStyle(posterDoc),
92
+ };
93
+ if (options.autoplay)
94
+ return _jsx(AutoplayVideo, { ...video });
95
+ return (_jsx("video", { ...video.attributes, className: className, src: src, poster: poster, loop: video.loop, muted: video.muted, controls: video.controls, playsInline: true, preload: video.preload, style: video.style }));
68
96
  }
@@ -1,4 +1,5 @@
1
1
  import type { BlockComponentProps } from '../render/types.js';
2
+ import type { AutoplayVideoProps } from './AutoplayVideo.js';
2
3
  import type { CarouselLabels } from './builtins/Carousel.js';
3
4
  import type { PopupLabels } from './builtins/Popup.js';
4
5
  import type { TabsLabels } from './builtins/Tabs.js';
@@ -29,4 +30,5 @@ export declare const EmbedPreview: import("react").ComponentType<{
29
30
  className?: string;
30
31
  attributes: Record<string, string>;
31
32
  }>;
33
+ export declare const AutoplayVideo: import("react").ComponentType<AutoplayVideoProps>;
32
34
  export declare const Tab: import("react").ComponentType<BlockComponentProps>;
@@ -17,4 +17,6 @@ export const Tabs = lazyBlock(dynamic(() => import('./builtins/Tabs.js').then((m
17
17
  // Not blocks: the parts of the embed block that need JavaScript (`./builtins/Embed`).
18
18
  export const EmbedHtml = dynamic(() => import('./builtins/EmbedHtml.js').then((module) => module.EmbedHtml));
19
19
  export const EmbedPreview = dynamic(() => import('./builtins/EmbedPreview.js').then((module) => module.EmbedPreview));
20
+ // Not a block: the part of the video block that starts an autoplaying video (`./AutoplayVideo`).
21
+ export const AutoplayVideo = dynamic(() => import('./AutoplayVideo.js').then((module) => module.AutoplayVideo));
20
22
  export const Tab = lazyBlock(dynamic(() => import('./builtins/Tab.js').then((module) => module.Tab)));
@@ -0,0 +1,30 @@
1
+ /** The media query of a visitor who asks for less motion. */
2
+ export declare const REDUCED_MOTION = "(prefers-reduced-motion: reduce)";
3
+ export type VideoSettings = {
4
+ autoplay: boolean;
5
+ loop: boolean;
6
+ muted: boolean;
7
+ controls: boolean;
8
+ /** Decoration only (a background): hidden from screen readers, no controls, no tab stop. */
9
+ decorative: boolean;
10
+ /** Load first: `preload="auto"` and the poster preloaded with high fetch priority. */
11
+ priority: boolean;
12
+ };
13
+ /** The block's props as settings. Defaults: everything off but `controls`. */
14
+ export declare function videoSettingsOf(props: Record<string, unknown>): VideoSettings;
15
+ /**
16
+ * True when an autoplaying video may play now: never on the editor's canvas (editing stays calm),
17
+ * and never for a visitor who asks for less motion (the video shows its poster and stays paused).
18
+ */
19
+ export declare function startsPlaying(args: {
20
+ autoplay: boolean;
21
+ canvas: boolean;
22
+ reducedMotion: boolean;
23
+ }): boolean;
24
+ /** The `preload` attribute: the whole video for a video that loads first, else only its metadata. */
25
+ export declare function videoPreload(priority: boolean): 'auto' | 'metadata';
26
+ /** The attributes that take a decorative video out of the accessibility tree and the tab order. */
27
+ export declare function decorativeAttributes(decorative: boolean): {
28
+ 'aria-hidden'?: 'true';
29
+ tabIndex?: -1;
30
+ };
@@ -0,0 +1,33 @@
1
+ // Pure rules of the video block, shared by the server component (`./Video`) and the small client
2
+ // component that starts an autoplaying video (`./AutoplayVideo`). No imports: a client module
3
+ // reaches this file.
4
+ /** The media query of a visitor who asks for less motion. */
5
+ export const REDUCED_MOTION = '(prefers-reduced-motion: reduce)';
6
+ /** The block's props as settings. Defaults: everything off but `controls`. */
7
+ export function videoSettingsOf(props) {
8
+ const decorative = props.decorative === true;
9
+ return {
10
+ autoplay: props.autoplay === true,
11
+ loop: props.loop === true,
12
+ muted: props.muted === true,
13
+ // A decorative video has no controls, whatever "Show controls" says.
14
+ controls: props.controls !== false && !decorative,
15
+ decorative,
16
+ priority: props.priority === true,
17
+ };
18
+ }
19
+ /**
20
+ * True when an autoplaying video may play now: never on the editor's canvas (editing stays calm),
21
+ * and never for a visitor who asks for less motion (the video shows its poster and stays paused).
22
+ */
23
+ export function startsPlaying(args) {
24
+ return args.autoplay && !args.canvas && !args.reducedMotion;
25
+ }
26
+ /** The `preload` attribute: the whole video for a video that loads first, else only its metadata. */
27
+ export function videoPreload(priority) {
28
+ return priority ? 'auto' : 'metadata';
29
+ }
30
+ /** The attributes that take a decorative video out of the accessibility tree and the tab order. */
31
+ export function decorativeAttributes(decorative) {
32
+ return decorative ? { 'aria-hidden': 'true', tabIndex: -1 } : {};
33
+ }
@@ -110,14 +110,17 @@ function componentPropsOf(block, ctx) {
110
110
  }
111
111
  /**
112
112
  * True when the block's image loads first: its `priority` prop is on, or not set while the
113
- * first section still has images to give priority to (`priorityImages`). Each one counts.
113
+ * first section still has images to give priority to (`priorityImages`). Each one counts. A
114
+ * `priority` field with `custom.builderAutoPriority: false` (the video block's) is never set this way.
114
115
  */
115
116
  function takesPriority(block, ctx) {
116
117
  const own = block.props?.priority;
117
118
  if (!ctx.priority || ctx.priority.left <= 0 || own === false)
118
119
  return own === true;
119
120
  const definition = ctx.definitions.get(block.type);
120
- const hasPriority = definition?.fields?.some((field) => 'name' in field && field.name === 'priority');
121
+ const hasPriority = definition?.fields?.some((field) => 'name' in field &&
122
+ field.name === 'priority' &&
123
+ field.custom?.builderAutoPriority !== false);
121
124
  if (!hasPriority)
122
125
  return own === true;
123
126
  ctx.priority.left -= 1;
@@ -149,7 +149,7 @@ export type RenderLayoutProps = {
149
149
  /**
150
150
  * How many images of the layout's first section load first (`fetchpriority="high"`, not lazy):
151
151
  * image blocks (and other blocks with a `priority` prop), in page order, unless their **Load first** prop
152
- * is off. Default `1`: the first image of the first section, often the largest thing on screen.
152
+ * is off. A `priority` field with `custom.builderAutoPriority: false` (the video block's) never counts. Default `1`: the first image of the first section, often the largest thing on screen.
153
153
  * Give a layout further down the page (a footer) `0`. Site only.
154
154
  */
155
155
  priorityImages?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payload-canvas",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Payload Canvas: a visual drag-and-drop website builder for Payload CMS 3. Nested layout blocks, Tailwind styling, sections, templates, live AI editing over MCP, and the React renderer for your site.",
5
5
  "keywords": [
6
6
  "payload",