diff --git a/bin/api-docs/gen-block-lib-list.js b/bin/api-docs/gen-block-lib-list.js index 309a3931b12189..04894db280abea 100644 --- a/bin/api-docs/gen-block-lib-list.js +++ b/bin/api-docs/gen-block-lib-list.js @@ -10,6 +10,8 @@ const path = require( 'path' ); const glob = require( 'fast-glob' ); const fs = require( 'fs' ); +const { parse: commentParser } = require( 'comment-parser' ); + /** * Path to root project directory. * @@ -76,6 +78,49 @@ function getTruthyKeys( obj ) { .map( ( key ) => ( obj[ key ] ? key : `~~${ key }~~` ) ); } +/** + * Extracts JSDoc comments from edit.js file. + * + * @param {string} filePath - Path to edit.js file + * @return {Object} - Object with attribute docs + */ +function extractEditJSDoc( filePath ) { + try { + const content = fs.readFileSync( filePath, 'utf8' ); + const docRegex = /\/\*\*\s*((?:[^*]|\*(?!\/))*)\*\/\s*export\s+default/; + const match = content.match( docRegex ); + + if ( ! match ) { + return null; + } + + const [ parsedComment ] = commentParser( `/**${ match[ 0 ] }*/` ); + if ( ! parsedComment ) { + return null; + } + + // Extract params that are attributes + const attributeDocs = {}; + parsedComment.tags.forEach( ( tag ) => { + if ( tag.tag === 'param' && tag.name.includes( 'attributes.' ) ) { + const attrName = tag.name.split( 'attributes.' )[ 1 ]; + attributeDocs[ attrName ] = { + description: tag.description, + type: tag.type, + }; + } + } ); + + return attributeDocs; + } catch ( error ) { + console.warn( + `Warning: Could not process edit.js for ${ filePath }:`, + error.message + ); + return null; + } +} + /** * Process list of object that may contain inner keys. * For example: spacing( margin, padding ). @@ -158,6 +203,11 @@ function readBlockJSON( filename ) { __experimental, allowedBlocks, } = blockjson; + + const editJsPath = path.join( path.dirname( filename ), 'edit.js' ); + const attributeDocs = fs.existsSync( editJsPath ) + ? extractEditJSDoc( editJsPath ) + : null; const sourcefile = getSourceFromFile( filename ); const blockInfoList = [ `- **Name:** ${ name }` ]; @@ -187,11 +237,25 @@ function readBlockJSON( filename ) { .join( ', ' ) }` ); } - const truthyAttributes = getTruthyKeys( attributes ); - if ( truthyAttributes.length ) { - blockInfoList.push( - `- **Attributes:** ${ truthyAttributes.sort().join( ', ' ) }` - ); + + // Combine truthy keys with documentation + if ( attributes ) { + const truthyAttributes = getTruthyKeys( attributes ); + const attributesList = truthyAttributes.map( ( attr ) => { + const cleanAttr = attr.replace( /~~/g, '' ); + const doc = attributeDocs?.[ cleanAttr ]; + if ( doc ) { + return `${ attr } (${ doc.type }): ${ doc.description }`; + } + return attr; + } ); + + if ( attributesList.length ) { + blockInfoList.push( `- **Attributes:**` ); + attributesList.sort().forEach( ( attr ) => { + blockInfoList.push( ` - ${ attr }` ); + } ); + } } return ` diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index 3b251813e41c0a..fa35aed016b9b7 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -15,7 +15,11 @@ Display a date archive of your posts. ([Source](https://github.com/WordPress/gut - **Name:** core/archives - **Category:** widgets - **Supports:** align, interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** displayAsDropdown, showLabel, showPostCounts, type +- **Attributes:** + - displayAsDropdown (boolean): Whether to display the archive as a dropdown menu. + - showLabel (boolean): Whether to show the archive label. + - showPostCounts (boolean): Whether to show post counts next to archive links. + - type (string): Archive type (e.g., "monthly"). ## Audio @@ -24,7 +28,14 @@ Embed a simple audio player. ([Source](https://github.com/WordPress/gutenberg/tr - **Name:** core/audio - **Category:** media - **Supports:** align, anchor, interactivity (clientNavigation), spacing (margin, padding) -- **Attributes:** autoplay, blob, caption, id, loop, preload, src +- **Attributes:** + - autoplay + - blob + - caption + - id + - loop + - preload + - src ## Avatar @@ -33,7 +44,11 @@ Add a user’s avatar. ([Source](https://github.com/WordPress/gutenberg/tree/tru - **Name:** core/avatar - **Category:** theme - **Supports:** align, color (~~background~~, ~~text~~), interactivity (clientNavigation), spacing (margin, padding), ~~alignWide~~, ~~html~~ -- **Attributes:** isLink, linkTarget, size, userId +- **Attributes:** + - isLink + - linkTarget + - size + - userId ## Pattern @@ -42,7 +57,9 @@ Reuse this design across your site. ([Source](https://github.com/WordPress/guten - **Name:** core/block - **Category:** reusable - **Supports:** interactivity (clientNavigation), ~~customClassName~~, ~~html~~, ~~inserter~~, ~~renaming~~ -- **Attributes:** content, ref +- **Attributes:** + - content + - ref ## Button @@ -52,7 +69,20 @@ Prompt visitors to take action with a button-style link. ([Source](https://githu - **Category:** design - **Parent:** core/buttons - **Supports:** anchor, color (background, gradients, text), interactivity (clientNavigation), shadow (), spacing (padding), splitting, typography (fontSize, lineHeight), ~~alignWide~~, ~~align~~, ~~reusable~~ -- **Attributes:** backgroundColor, gradient, linkTarget, placeholder, rel, tagName, text, textAlign, textColor, title, type, url, width +- **Attributes:** + - backgroundColor + - gradient + - linkTarget + - placeholder + - rel + - tagName + - text + - textAlign + - textColor + - title + - type + - url + - width ## Buttons @@ -70,7 +100,9 @@ A calendar of your site’s posts. ([Source](https://github.com/WordPress/gutenb - **Name:** core/calendar - **Category:** widgets - **Supports:** align, color (background, link, text), interactivity (clientNavigation), typography (fontSize, lineHeight) -- **Attributes:** month, year +- **Attributes:** + - month + - year ## Terms List @@ -79,7 +111,15 @@ Display a list of all terms of a given taxonomy. ([Source](https://github.com/Wo - **Name:** core/categories - **Category:** widgets - **Supports:** align, interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** displayAsDropdown, label, showEmpty, showHierarchy, showLabel, showOnlyTopLevel, showPostCounts, taxonomy +- **Attributes:** + - displayAsDropdown + - label + - showEmpty + - showHierarchy + - showLabel + - showOnlyTopLevel + - showPostCounts + - taxonomy ## Code @@ -88,7 +128,8 @@ Display code snippets that respect your spacing and tabs. ([Source](https://gith - **Name:** core/code - **Category:** text - **Supports:** align (wide), anchor, color (background, gradients, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight) -- **Attributes:** content +- **Attributes:** + - content ## Column @@ -98,7 +139,11 @@ A single column within a columns block. ([Source](https://github.com/WordPress/g - **Category:** design - **Parent:** core/columns - **Supports:** anchor, color (background, button, gradients, heading, link, text), interactivity (clientNavigation), layout, shadow, spacing (blockGap, padding), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ -- **Attributes:** allowedBlocks, templateLock, verticalAlignment, width +- **Attributes:** + - allowedBlocks + - templateLock + - verticalAlignment + - width ## Columns @@ -108,7 +153,10 @@ Display content in multiple columns, with blocks added to each column. ([Source] - **Category:** design - **Allowed Blocks:** core/column - **Supports:** align (full, wide), anchor, color (background, button, gradients, heading, link, text), interactivity (clientNavigation), layout (default, ~~allowEditing~~, ~~allowInheriting~~, ~~allowSwitching~~), shadow, spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** isStackedOnMobile, templateLock, verticalAlignment +- **Attributes:** + - isStackedOnMobile + - templateLock + - verticalAlignment ## Comment Author Avatar (deprecated) @@ -119,7 +167,9 @@ This block is deprecated. Please use the Avatar block instead. ([Source](https:/ - **Category:** theme - **Ancestor:** core/comment-template - **Supports:** color (background, ~~text~~), interactivity (clientNavigation), spacing (margin, padding), ~~html~~, ~~inserter~~ -- **Attributes:** height, width +- **Attributes:** + - height + - width ## Comment Author Name @@ -129,7 +179,10 @@ Displays the name of the author of the comment. ([Source](https://github.com/Wor - **Category:** theme - **Ancestor:** core/comment-template - **Supports:** color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** isLink, linkTarget, textAlign +- **Attributes:** + - isLink (string): Whether the author name should be linked. + - linkTarget (string): Target of the link. + - textAlign (string): Text alignment. ## Comment Content @@ -139,7 +192,8 @@ Displays the contents of a comment. ([Source](https://github.com/WordPress/guten - **Category:** theme - **Ancestor:** core/comment-template - **Supports:** color (background, gradients, link, text), spacing (padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** textAlign +- **Attributes:** + - textAlign (string): The `textAlign` attribute. ## Comment Date @@ -149,7 +203,9 @@ Displays the date on which the comment was posted. ([Source](https://github.com/ - **Category:** theme - **Ancestor:** core/comment-template - **Supports:** color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** format, isLink +- **Attributes:** + - format (string): Format of the date. + - isLink (string): Whether the author name should be linked. ## Comment Edit Link @@ -159,7 +215,9 @@ Displays a link to edit the comment in the WordPress Dashboard. This link is onl - **Category:** theme - **Ancestor:** core/comment-template - **Supports:** color (background, gradients, link, ~~text~~), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** linkTarget, textAlign +- **Attributes:** + - linkTarget + - textAlign ## Comment Reply Link @@ -169,7 +227,8 @@ Displays a link to reply to a comment. ([Source](https://github.com/WordPress/gu - **Category:** theme - **Ancestor:** core/comment-template - **Supports:** color (background, gradients, link, ~~text~~), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** textAlign +- **Attributes:** + - textAlign ## Comment Template @@ -187,7 +246,9 @@ An advanced block that allows displaying post comments using different visual co - **Name:** core/comments - **Category:** theme - **Supports:** align (full, wide), color (background, gradients, heading, link, text), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** legacy, tagName +- **Attributes:** + - legacy + - tagName ## Comments Pagination @@ -198,7 +259,8 @@ Displays a paginated navigation to next/previous set of comments, when applicabl - **Parent:** core/comments - **Allowed Blocks:** core/comments-pagination-previous, core/comments-pagination-numbers, core/comments-pagination-next - **Supports:** align, color (background, gradients, link, text), interactivity (clientNavigation), layout (default, ~~allowInheriting~~, ~~allowSwitching~~), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ -- **Attributes:** paginationArrow +- **Attributes:** + - paginationArrow ## Comments Next Page @@ -208,7 +270,8 @@ Displays the next comment's page link. ([Source](https://github.com/WordPress/gu - **Category:** theme - **Parent:** core/comments-pagination - **Supports:** color (background, gradients, ~~text~~), interactivity (clientNavigation), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ -- **Attributes:** label +- **Attributes:** + - label ## Comments Page Numbers @@ -227,7 +290,8 @@ Displays the previous comment's page link. ([Source](https://github.com/WordPres - **Category:** theme - **Parent:** core/comments-pagination - **Supports:** color (background, gradients, ~~text~~), interactivity (clientNavigation), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ -- **Attributes:** label +- **Attributes:** + - label ## Comments Title @@ -237,7 +301,12 @@ Displays a title with the number of comments. ([Source](https://github.com/WordP - **Category:** theme - **Ancestor:** core/comments - **Supports:** align, color (background, gradients, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~anchor~~, ~~html~~ -- **Attributes:** level, levelOptions, showCommentsCount, showPostTitle, textAlign +- **Attributes:** + - level + - levelOptions + - showCommentsCount + - showPostTitle + - textAlign ## Cover @@ -246,7 +315,29 @@ Add an image or video with a text overlay. ([Source](https://github.com/WordPres - **Name:** core/cover - **Category:** media - **Supports:** align, anchor, color (heading, text, ~~background~~, ~~enableContrastChecker~~), dimensions (aspectRatio), interactivity (clientNavigation), layout (~~allowJustification~~), shadow, spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** allowedBlocks, alt, backgroundType, contentPosition, customGradient, customOverlayColor, dimRatio, focalPoint, gradient, hasParallax, id, isDark, isRepeated, isUserOverlayColor, minHeight, minHeightUnit, overlayColor, sizeSlug, tagName, templateLock, url, useFeaturedImage +- **Attributes:** + - allowedBlocks + - alt + - backgroundType + - contentPosition + - customGradient + - customOverlayColor + - dimRatio + - focalPoint + - gradient + - hasParallax + - id + - isDark + - isRepeated + - isUserOverlayColor + - minHeight + - minHeightUnit + - overlayColor + - sizeSlug + - tagName + - templateLock + - url + - useFeaturedImage ## Details @@ -255,7 +346,10 @@ Hide and show additional content. ([Source](https://github.com/WordPress/gutenbe - **Name:** core/details - **Category:** text - **Supports:** align (full, wide), anchor, color (background, gradients, link, text), interactivity (clientNavigation), layout (~~allowEditing~~), spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** allowedBlocks, showContent, summary +- **Attributes:** + - allowedBlocks + - showContent + - summary ## Embed @@ -264,7 +358,14 @@ Add a block that displays content pulled from other sites, like Twitter or YouTu - **Name:** core/embed - **Category:** embed - **Supports:** align, interactivity (clientNavigation), spacing (margin) -- **Attributes:** allowResponsive, caption, previewable, providerNameSlug, responsive, type, url +- **Attributes:** + - allowResponsive + - caption + - previewable + - providerNameSlug + - responsive + - type + - url ## File @@ -273,7 +374,18 @@ Add a link to a downloadable file. ([Source](https://github.com/WordPress/gutenb - **Name:** core/file - **Category:** media - **Supports:** align, anchor, color (background, gradients, link, ~~text~~), interactivity, spacing (margin, padding) -- **Attributes:** blob, displayPreview, downloadButtonText, fileId, fileName, href, id, previewHeight, showDownloadButton, textLinkHref, textLinkTarget +- **Attributes:** + - blob + - displayPreview + - downloadButtonText + - fileId + - fileName + - href + - id + - previewHeight + - showDownloadButton + - textLinkHref + - textLinkTarget ## Footnotes @@ -292,7 +404,11 @@ A form. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/blo - **Category:** common - **Allowed Blocks:** core/paragraph, core/heading, core/form-input, core/form-submit-button, core/form-submission-notification, core/group, core/columns - **Supports:** anchor, color (background, gradients, link, text), spacing (margin, padding), typography (fontSize, lineHeight), ~~className~~ -- **Attributes:** action, email, method, submissionMethod +- **Attributes:** + - action + - email + - method + - submissionMethod ## Input Field @@ -303,7 +419,15 @@ The basic building block for forms. ([Source](https://github.com/WordPress/guten - **Category:** common - **Ancestor:** core/form - **Supports:** anchor, spacing (margin), ~~reusable~~ -- **Attributes:** inlineLabel, label, name, placeholder, required, type, value, visibilityPermissions +- **Attributes:** + - inlineLabel + - label + - name + - placeholder + - required + - type + - value + - visibilityPermissions ## Form Submission Notification @@ -313,7 +437,8 @@ Provide a notification message after the form has been submitted. ([Source](http - **Experimental:** true - **Category:** common - **Ancestor:** core/form -- **Attributes:** type +- **Attributes:** + - type ## Form Submit Button @@ -332,7 +457,8 @@ Use the classic WordPress editor. ([Source](https://github.com/WordPress/gutenbe - **Name:** core/freeform - **Category:** text - **Supports:** ~~className~~, ~~customClassName~~, ~~reusable~~ -- **Attributes:** content +- **Attributes:** + - content ## Gallery @@ -342,7 +468,19 @@ Display multiple images in a rich gallery. ([Source](https://github.com/WordPres - **Category:** media - **Allowed Blocks:** core/image - **Supports:** align, anchor, color (background, gradients, ~~text~~), interactivity (clientNavigation), layout (default, ~~allowEditing~~, ~~allowInheriting~~, ~~allowSwitching~~), spacing (blockGap, margin, padding), units (em, px, rem, vh, vw), ~~html~~ -- **Attributes:** allowResize, caption, columns, fixedHeight, ids, imageCrop, images, linkTarget, linkTo, randomOrder, shortCodeTransforms, sizeSlug +- **Attributes:** + - allowResize + - caption + - columns + - fixedHeight + - ids + - imageCrop + - images + - linkTarget + - linkTo + - randomOrder + - shortCodeTransforms + - sizeSlug ## Group @@ -351,7 +489,10 @@ Gather blocks in a layout container. ([Source](https://github.com/WordPress/gute - **Name:** core/group - **Category:** design - **Supports:** align (full, wide), anchor, ariaLabel, background (backgroundImage, backgroundSize), color (background, button, gradients, heading, link, text), dimensions (minHeight), interactivity (clientNavigation), layout (allowSizingOnChildren), position (sticky), shadow, spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** allowedBlocks, tagName, templateLock +- **Attributes:** + - allowedBlocks + - tagName + - templateLock ## Heading @@ -360,7 +501,12 @@ Introduce new sections and organize content to help visitors (and search engines - **Name:** core/heading - **Category:** text - **Supports:** __unstablePasteTextInline, align (full, wide), anchor, className, color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), splitting, typography (fontSize, lineHeight) -- **Attributes:** content, level, levelOptions, placeholder, textAlign +- **Attributes:** + - content + - level + - levelOptions + - placeholder + - textAlign ## Home Link @@ -370,7 +516,8 @@ Create a link that always points to the homepage of the site. Usually not necess - **Category:** design - **Parent:** core/navigation - **Supports:** interactivity (clientNavigation), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ -- **Attributes:** label +- **Attributes:** + - label ## Custom HTML @@ -379,7 +526,8 @@ Add custom HTML code and preview it as you edit. ([Source](https://github.com/Wo - **Name:** core/html - **Category:** widgets - **Supports:** interactivity (clientNavigation), ~~className~~, ~~customClassName~~, ~~html~~ -- **Attributes:** content +- **Attributes:** + - content ## Image @@ -388,7 +536,24 @@ Insert an image to make a visual statement. ([Source](https://github.com/WordPre - **Name:** core/image - **Category:** media - **Supports:** align (center, full, left, right, wide), anchor, color (~~background~~, ~~text~~), filter (duotone), interactivity, shadow (), spacing (margin) -- **Attributes:** alt, aspectRatio, blob, caption, height, href, id, lightbox, linkClass, linkDestination, linkTarget, rel, scale, sizeSlug, title, url, width +- **Attributes:** + - alt + - aspectRatio + - blob + - caption + - height + - href + - id + - lightbox + - linkClass + - linkDestination + - linkTarget + - rel + - scale + - sizeSlug + - title + - url + - width ## Latest Comments @@ -397,7 +562,11 @@ Display a list of your most recent comments. ([Source](https://github.com/WordPr - **Name:** core/latest-comments - **Category:** widgets - **Supports:** align, color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** commentsToShow, displayAvatar, displayDate, displayExcerpt +- **Attributes:** + - commentsToShow + - displayAvatar + - displayDate + - displayExcerpt ## Latest Posts @@ -406,7 +575,25 @@ Display a list of your most recent posts. ([Source](https://github.com/WordPress - **Name:** core/latest-posts - **Category:** widgets - **Supports:** align, color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** addLinkToFeaturedImage, categories, columns, displayAuthor, displayFeaturedImage, displayPostContent, displayPostContentRadio, displayPostDate, excerptLength, featuredImageAlign, featuredImageSizeHeight, featuredImageSizeSlug, featuredImageSizeWidth, order, orderBy, postLayout, postsToShow, selectedAuthor +- **Attributes:** + - addLinkToFeaturedImage + - categories + - columns + - displayAuthor + - displayFeaturedImage + - displayPostContent + - displayPostContentRadio + - displayPostDate + - excerptLength + - featuredImageAlign + - featuredImageSizeHeight + - featuredImageSizeSlug + - featuredImageSizeWidth + - order + - orderBy + - postLayout + - postsToShow + - selectedAuthor ## List @@ -416,7 +603,13 @@ An organized collection of items displayed in a specific order. ([Source](https: - **Category:** text - **Allowed Blocks:** core/list-item - **Supports:** __unstablePasteTextInline, anchor, color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** ordered, placeholder, reversed, start, type, values +- **Attributes:** + - ordered + - placeholder + - reversed + - start + - type + - values ## List item @@ -427,7 +620,9 @@ An individual item within a list. ([Source](https://github.com/WordPress/gutenbe - **Parent:** core/list - **Allowed Blocks:** core/list - **Supports:** anchor, color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), splitting, typography (fontSize, lineHeight), ~~className~~ -- **Attributes:** content, placeholder +- **Attributes:** + - content + - placeholder ## Login/out @@ -436,7 +631,9 @@ Show login & logout links. ([Source](https://github.com/WordPress/gutenberg/tree - **Name:** core/loginout - **Category:** theme - **Supports:** className, color (background, gradients, link, ~~text~~), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight) -- **Attributes:** displayLoginAsForm, redirectToCurrent +- **Attributes:** + - displayLoginAsForm + - redirectToCurrent ## Media & Text @@ -445,7 +642,27 @@ Set media and words side-by-side for a richer layout. ([Source](https://github.c - **Name:** core/media-text - **Category:** media - **Supports:** align (full, wide), anchor, color (background, gradients, heading, link, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** align, allowedBlocks, focalPoint, href, imageFill, isStackedOnMobile, linkClass, linkDestination, linkTarget, mediaAlt, mediaId, mediaLink, mediaPosition, mediaSizeSlug, mediaType, mediaUrl, mediaWidth, rel, useFeaturedImage, verticalAlignment +- **Attributes:** + - align + - allowedBlocks + - focalPoint + - href + - imageFill + - isStackedOnMobile + - linkClass + - linkDestination + - linkTarget + - mediaAlt + - mediaId + - mediaLink + - mediaPosition + - mediaSizeSlug + - mediaType + - mediaUrl + - mediaWidth + - rel + - useFeaturedImage + - verticalAlignment ## Unsupported @@ -454,7 +671,10 @@ Your site doesn’t include support for this block. ([Source](https://github.com - **Name:** core/missing - **Category:** text - **Supports:** interactivity (clientNavigation), ~~className~~, ~~customClassName~~, ~~html~~, ~~inserter~~, ~~reusable~~ -- **Attributes:** originalContent, originalName, originalUndelimitedContent +- **Attributes:** + - originalContent + - originalName + - originalUndelimitedContent ## More @@ -463,7 +683,9 @@ Content before this block will be shown in the excerpt on your archives page. ([ - **Name:** core/more - **Category:** design - **Supports:** interactivity (clientNavigation), ~~className~~, ~~customClassName~~, ~~html~~, ~~multiple~~ -- **Attributes:** customText, noTeaser +- **Attributes:** + - customText + - noTeaser ## Navigation @@ -473,7 +695,26 @@ A collection of blocks that allow visitors to get around your site. ([Source](ht - **Category:** theme - **Allowed Blocks:** core/navigation-link, core/search, core/social-links, core/page-list, core/spacer, core/home-link, core/site-title, core/site-logo, core/navigation-submenu, core/loginout, core/buttons - **Supports:** align (full, wide), ariaLabel, inserter, interactivity, layout (allowSizingOnChildren, default, ~~allowInheriting~~, ~~allowSwitching~~, ~~allowVerticalAlignment~~), spacing (blockGap, units), typography (fontSize, lineHeight), ~~html~~, ~~renaming~~ -- **Attributes:** __unstableLocation, backgroundColor, customBackgroundColor, customOverlayBackgroundColor, customOverlayTextColor, customTextColor, hasIcon, icon, maxNestingLevel, openSubmenusOnClick, overlayBackgroundColor, overlayMenu, overlayTextColor, ref, rgbBackgroundColor, rgbTextColor, showSubmenuIcon, templateLock, textColor +- **Attributes:** + - __unstableLocation + - backgroundColor + - customBackgroundColor + - customOverlayBackgroundColor + - customOverlayTextColor + - customTextColor + - hasIcon + - icon + - maxNestingLevel + - openSubmenusOnClick + - overlayBackgroundColor + - overlayMenu + - overlayTextColor + - ref + - rgbBackgroundColor + - rgbTextColor + - showSubmenuIcon + - templateLock + - textColor ## Custom Link @@ -484,7 +725,17 @@ Add a page, link, or another item to your navigation. ([Source](https://github.c - **Parent:** core/navigation - **Allowed Blocks:** core/navigation-link, core/navigation-submenu, core/page-list - **Supports:** interactivity (clientNavigation), typography (fontSize, lineHeight), ~~html~~, ~~renaming~~, ~~reusable~~ -- **Attributes:** description, id, isTopLevelLink, kind, label, opensInNewTab, rel, title, type, url +- **Attributes:** + - description + - id + - isTopLevelLink + - kind + - label + - opensInNewTab + - rel + - title + - type + - url ## Submenu @@ -494,7 +745,17 @@ Add a submenu to your navigation. ([Source](https://github.com/WordPress/gutenbe - **Category:** design - **Parent:** core/navigation - **Supports:** interactivity (clientNavigation), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ -- **Attributes:** description, id, isTopLevelItem, kind, label, opensInNewTab, rel, title, type, url +- **Attributes:** + - description + - id + - isTopLevelItem + - kind + - label + - opensInNewTab + - rel + - title + - type + - url ## Page Break @@ -513,7 +774,9 @@ Display a list of all pages. ([Source](https://github.com/WordPress/gutenberg/tr - **Category:** widgets - **Allowed Blocks:** core/page-list-item - **Supports:** color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ -- **Attributes:** isNested, parentPageID +- **Attributes:** + - isNested + - parentPageID ## Page List Item @@ -523,7 +786,12 @@ Displays a page inside a list of all pages. ([Source](https://github.com/WordPre - **Category:** widgets - **Parent:** core/page-list - **Supports:** interactivity (clientNavigation), ~~html~~, ~~inserter~~, ~~lock~~, ~~reusable~~ -- **Attributes:** hasChildren, id, label, link, title +- **Attributes:** + - hasChildren + - id + - label + - link + - title ## Paragraph @@ -532,7 +800,12 @@ Start with the basic building block of all narrative. ([Source](https://github.c - **Name:** core/paragraph - **Category:** text - **Supports:** __unstablePasteTextInline, anchor, color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), splitting, typography (fontSize, lineHeight), ~~className~~ -- **Attributes:** align, content, direction, dropCap, placeholder +- **Attributes:** + - align + - content + - direction + - dropCap + - placeholder ## Pattern placeholder @@ -541,7 +814,8 @@ Show a block pattern. ([Source](https://github.com/WordPress/gutenberg/tree/trun - **Name:** core/pattern - **Category:** theme - **Supports:** interactivity (clientNavigation), ~~html~~, ~~inserter~~, ~~renaming~~ -- **Attributes:** slug +- **Attributes:** + - slug ## Author @@ -550,7 +824,14 @@ Display post author details such as name, avatar, and bio. ([Source](https://git - **Name:** core/post-author - **Category:** theme - **Supports:** color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** avatarSize, byline, isLink, linkTarget, showAvatar, showBio, textAlign +- **Attributes:** + - avatarSize + - byline + - isLink + - linkTarget + - showAvatar + - showBio + - textAlign ## Author Biography @@ -559,7 +840,8 @@ The author biography. ([Source](https://github.com/WordPress/gutenberg/tree/trun - **Name:** core/post-author-biography - **Category:** theme - **Supports:** color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight) -- **Attributes:** textAlign +- **Attributes:** + - textAlign ## Author Name @@ -568,7 +850,10 @@ The author name. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/pac - **Name:** core/post-author-name - **Category:** theme - **Supports:** color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** isLink, linkTarget, textAlign +- **Attributes:** + - isLink + - linkTarget + - textAlign ## Comment (deprecated) @@ -579,7 +864,8 @@ This block is deprecated. Please use the Comments block instead. ([Source](https - **Category:** theme - **Allowed Blocks:** core/avatar, core/comment-author-name, core/comment-content, core/comment-date, core/comment-edit-link, core/comment-reply-link - **Supports:** interactivity (clientNavigation), ~~html~~, ~~inserter~~ -- **Attributes:** commentId +- **Attributes:** + - commentId ## Comments Count @@ -589,7 +875,8 @@ Display a post's comments count. ([Source](https://github.com/WordPress/gutenber - **Experimental:** fse - **Category:** theme - **Supports:** color (background, gradients, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** textAlign +- **Attributes:** + - textAlign ## Comments Form @@ -598,7 +885,8 @@ Display a post's comments form. ([Source](https://github.com/WordPress/gutenberg - **Name:** core/post-comments-form - **Category:** theme - **Supports:** color (background, gradients, heading, link, text), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** textAlign +- **Attributes:** + - textAlign ## Comments Link @@ -608,7 +896,8 @@ Displays the link to the current post comments. ([Source](https://github.com/Wor - **Experimental:** fse - **Category:** theme - **Supports:** color (background, link, ~~text~~), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** textAlign +- **Attributes:** + - textAlign ## Content @@ -625,7 +914,11 @@ Display the publish date for an entry such as a post or page. ([Source](https:// - **Name:** core/post-date - **Category:** theme - **Supports:** color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** displayType, format, isLink, textAlign +- **Attributes:** + - displayType + - format + - isLink + - textAlign ## Excerpt @@ -634,7 +927,11 @@ Display the excerpt. ([Source](https://github.com/WordPress/gutenberg/tree/trunk - **Name:** core/post-excerpt - **Category:** theme - **Supports:** color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** excerptLength, moreText, showMoreOnNewLine, textAlign +- **Attributes:** + - excerptLength + - moreText + - showMoreOnNewLine + - textAlign ## Featured Image @@ -643,7 +940,21 @@ Display a post's featured image. ([Source](https://github.com/WordPress/gutenber - **Name:** core/post-featured-image - **Category:** theme - **Supports:** align (center, full, left, right, wide), color (~~background~~, ~~text~~), filter (duotone), interactivity (clientNavigation), shadow (), spacing (margin, padding), ~~html~~ -- **Attributes:** aspectRatio, customGradient, customOverlayColor, dimRatio, gradient, height, isLink, linkTarget, overlayColor, rel, scale, sizeSlug, useFirstImageFromPost, width +- **Attributes:** + - aspectRatio + - customGradient + - customOverlayColor + - dimRatio + - gradient + - height + - isLink + - linkTarget + - overlayColor + - rel + - scale + - sizeSlug + - useFirstImageFromPost + - width ## Post Navigation Link @@ -652,7 +963,14 @@ Displays the next or previous post link that is adjacent to the current post. ([ - **Name:** core/post-navigation-link - **Category:** theme - **Supports:** color (background, link, text), interactivity (clientNavigation), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ -- **Attributes:** arrow, label, linkLabel, showTitle, taxonomy, textAlign, type +- **Attributes:** + - arrow + - label + - linkLabel + - showTitle + - taxonomy + - textAlign + - type ## Post Template @@ -670,7 +988,12 @@ Post terms. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages - **Name:** core/post-terms - **Category:** theme - **Supports:** color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** prefix, separator, suffix, term, textAlign +- **Attributes:** + - prefix + - separator + - suffix + - term + - textAlign ## Time To Read @@ -680,7 +1003,8 @@ Show minutes required to finish reading the post. ([Source](https://github.com/W - **Experimental:** true - **Category:** theme - **Supports:** color (background, gradients, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** textAlign +- **Attributes:** + - textAlign ## Title @@ -689,7 +1013,13 @@ Displays the title of a post, page, or any other content-type. ([Source](https:/ - **Name:** core/post-title - **Category:** theme - **Supports:** align (full, wide), color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** isLink, level, levelOptions, linkTarget, rel, textAlign +- **Attributes:** + - isLink + - level + - levelOptions + - linkTarget + - rel + - textAlign ## Preformatted @@ -698,7 +1028,8 @@ Add text that respects your spacing and tabs, and also allows styling. ([Source] - **Name:** core/preformatted - **Category:** text - **Supports:** anchor, color (background, gradients, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight) -- **Attributes:** content +- **Attributes:** + - content ## Pullquote @@ -707,7 +1038,10 @@ Give special visual emphasis to a quote from your text. ([Source](https://github - **Name:** core/pullquote - **Category:** text - **Supports:** align (full, left, right, wide), anchor, background (backgroundImage, backgroundSize), color (background, gradients, link, text), dimensions (minHeight), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight) -- **Attributes:** citation, textAlign, value +- **Attributes:** + - citation + - textAlign + - value ## Query Loop @@ -716,7 +1050,12 @@ An advanced block that allows displaying post types based on different query par - **Name:** core/query - **Category:** theme - **Supports:** align (full, wide), interactivity, layout, ~~html~~ -- **Attributes:** enhancedPagination, namespace, query, queryId, tagName +- **Attributes:** + - enhancedPagination + - namespace + - query + - queryId + - tagName ## No results @@ -736,7 +1075,9 @@ Displays a paginated navigation to next/previous set of posts, when applicable. - **Ancestor:** core/query - **Allowed Blocks:** core/query-pagination-previous, core/query-pagination-numbers, core/query-pagination-next - **Supports:** align, color (background, gradients, link, text), interactivity (clientNavigation), layout (default, ~~allowInheriting~~, ~~allowSwitching~~), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ -- **Attributes:** paginationArrow, showLabel +- **Attributes:** + - paginationArrow + - showLabel ## Next Page @@ -746,7 +1087,8 @@ Displays the next posts page link. ([Source](https://github.com/WordPress/gutenb - **Category:** theme - **Parent:** core/query-pagination - **Supports:** color (background, gradients, ~~text~~), interactivity (clientNavigation), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ -- **Attributes:** label +- **Attributes:** + - label ## Page Numbers @@ -756,7 +1098,8 @@ Displays a list of page numbers for pagination. ([Source](https://github.com/Wor - **Category:** theme - **Parent:** core/query-pagination - **Supports:** color (background, gradients, ~~text~~), interactivity (clientNavigation), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ -- **Attributes:** midSize +- **Attributes:** + - midSize ## Previous Page @@ -766,7 +1109,8 @@ Displays the previous posts page link. ([Source](https://github.com/WordPress/gu - **Category:** theme - **Parent:** core/query-pagination - **Supports:** color (background, gradients, ~~text~~), interactivity (clientNavigation), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ -- **Attributes:** label +- **Attributes:** + - label ## Query Title @@ -775,7 +1119,13 @@ Display the query title. ([Source](https://github.com/WordPress/gutenberg/tree/t - **Name:** core/query-title - **Category:** theme - **Supports:** align (full, wide), color (background, gradients, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** level, levelOptions, showPrefix, showSearchTerm, textAlign, type +- **Attributes:** + - level + - levelOptions + - showPrefix + - showSearchTerm + - textAlign + - type ## Query Total @@ -785,7 +1135,8 @@ Display the total number of results in a query. ([Source](https://github.com/Wor - **Category:** theme - **Ancestor:** core/query - **Supports:** align (full, wide), color (background, gradients, text), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** displayType +- **Attributes:** + - displayType ## Quote @@ -794,7 +1145,10 @@ Give quoted text visual emphasis. "In quoting others, we cite ourselves." — Ju - **Name:** core/quote - **Category:** text - **Supports:** align (full, left, right, wide), anchor, background (backgroundImage, backgroundSize), color (background, gradients, heading, link, text), dimensions (minHeight), interactivity (clientNavigation), layout (~~allowEditing~~), spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** citation, textAlign, value +- **Attributes:** + - citation + - textAlign + - value ## Read More @@ -803,7 +1157,9 @@ Displays the link of a post, page, or any other content-type. ([Source](https:// - **Name:** core/read-more - **Category:** theme - **Supports:** color (background, gradients, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** content, linkTarget +- **Attributes:** + - content + - linkTarget ## RSS @@ -812,7 +1168,15 @@ Display entries from any RSS or Atom feed. ([Source](https://github.com/WordPres - **Name:** core/rss - **Category:** widgets - **Supports:** align, color (background, gradients, link, text), interactivity (clientNavigation), ~~html~~ -- **Attributes:** blockLayout, columns, displayAuthor, displayDate, displayExcerpt, excerptLength, feedURL, itemsToShow +- **Attributes:** + - blockLayout + - columns + - displayAuthor + - displayDate + - displayExcerpt + - excerptLength + - feedURL + - itemsToShow ## Search @@ -821,7 +1185,17 @@ Help visitors find your content. ([Source](https://github.com/WordPress/gutenber - **Name:** core/search - **Category:** widgets - **Supports:** align (center, left, right), color (background, gradients, text), interactivity, spacing (margin), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** buttonPosition, buttonText, buttonUseIcon, isSearchFieldHidden, label, placeholder, query, showLabel, width, widthUnit +- **Attributes:** + - buttonPosition + - buttonText + - buttonUseIcon + - isSearchFieldHidden + - label + - placeholder + - query + - showLabel + - width + - widthUnit ## Separator @@ -830,7 +1204,9 @@ Create a break between ideas or sections with a horizontal separator. ([Source]( - **Name:** core/separator - **Category:** design - **Supports:** align (center, full, wide), anchor, color (background, gradients, ~~enableContrastChecker~~, ~~text~~), interactivity (clientNavigation), spacing (margin) -- **Attributes:** opacity, tagName +- **Attributes:** + - opacity + - tagName ## Shortcode @@ -839,7 +1215,8 @@ Insert additional custom elements with a WordPress shortcode. ([Source](https:// - **Name:** core/shortcode - **Category:** widgets - **Supports:** ~~className~~, ~~customClassName~~, ~~html~~ -- **Attributes:** text +- **Attributes:** + - text ## Site Logo @@ -848,7 +1225,11 @@ Display an image to represent this site. Update this block and the changes apply - **Name:** core/site-logo - **Category:** theme - **Supports:** align, color (~~background~~, ~~text~~), interactivity (clientNavigation), spacing (margin, padding), ~~alignWide~~, ~~html~~ -- **Attributes:** isLink, linkTarget, shouldSyncIcon, width +- **Attributes:** + - isLink + - linkTarget + - shouldSyncIcon + - width ## Site Tagline @@ -857,7 +1238,10 @@ Describe in a few words what the site is about. The tagline can be used in searc - **Name:** core/site-tagline - **Category:** theme - **Supports:** align (full, wide), color (background, gradients, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** level, levelOptions, textAlign +- **Attributes:** + - level + - levelOptions + - textAlign ## Site Title @@ -866,7 +1250,12 @@ Displays the name of this site. Update the block, and the changes apply everywhe - **Name:** core/site-title - **Category:** theme - **Supports:** align (full, wide), color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** isLink, level, levelOptions, linkTarget, textAlign +- **Attributes:** + - isLink + - level + - levelOptions + - linkTarget + - textAlign ## Social Icon @@ -876,7 +1265,11 @@ Display an icon linking to a social profile or site. ([Source](https://github.co - **Category:** widgets - **Parent:** core/social-links - **Supports:** interactivity (clientNavigation), ~~html~~, ~~reusable~~ -- **Attributes:** label, rel, service, url +- **Attributes:** + - label + - rel + - service + - url ## Social Icons @@ -886,7 +1279,16 @@ Display icons linking to your social profiles or sites. ([Source](https://github - **Category:** widgets - **Allowed Blocks:** core/social-link - **Supports:** align (center, left, right), anchor, color (background, gradients, ~~enableContrastChecker~~, ~~text~~), interactivity (clientNavigation), layout (default, ~~allowInheriting~~, ~~allowSwitching~~, ~~allowVerticalAlignment~~), spacing (blockGap, margin, padding, units) -- **Attributes:** customIconBackgroundColor, customIconColor, iconBackgroundColor, iconBackgroundColorValue, iconColor, iconColorValue, openInNewTab, showLabels, size +- **Attributes:** + - customIconBackgroundColor + - customIconColor + - iconBackgroundColor + - iconBackgroundColorValue + - iconColor + - iconColorValue + - openInNewTab + - showLabels + - size ## Spacer @@ -895,7 +1297,9 @@ Add white space between blocks and customize its height. ([Source](https://githu - **Name:** core/spacer - **Category:** design - **Supports:** anchor, interactivity (clientNavigation), spacing (margin) -- **Attributes:** height, width +- **Attributes:** + - height + - width ## Table @@ -904,7 +1308,12 @@ Create structured content in rows and columns to display information. ([Source]( - **Name:** core/table - **Category:** text - **Supports:** align, anchor, color (background, gradients, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight) -- **Attributes:** body, caption, foot, hasFixedLayout, head +- **Attributes:** + - body + - caption + - foot + - hasFixedLayout + - head ## Table of Contents @@ -914,7 +1323,9 @@ Summarize your post with a list of headings. Add HTML anchors to Heading blocks - **Experimental:** true - **Category:** design - **Supports:** color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** headings, onlyIncludeCurrentPage +- **Attributes:** + - headings (HeadingData[]): A list of data for each heading in the post. + - onlyIncludeCurrentPage (boolean): Whether to only include headings from the current page (if the post is paginated). ## Tag Cloud @@ -923,7 +1334,12 @@ A cloud of popular keywords, each sized by how often it appears. ([Source](https - **Name:** core/tag-cloud - **Category:** widgets - **Supports:** align, interactivity (clientNavigation), spacing (margin, padding), typography (lineHeight), ~~html~~ -- **Attributes:** largestFontSize, numberOfTags, showTagCounts, smallestFontSize, taxonomy +- **Attributes:** + - largestFontSize + - numberOfTags + - showTagCounts + - smallestFontSize + - taxonomy ## Template Part @@ -932,7 +1348,11 @@ Edit the different global regions of your site, like the header, footer, sidebar - **Name:** core/template-part - **Category:** theme - **Supports:** align, interactivity (clientNavigation), ~~html~~, ~~renaming~~, ~~reusable~~ -- **Attributes:** area, slug, tagName, theme +- **Attributes:** + - area + - slug + - tagName + - theme ## Term Description @@ -941,7 +1361,8 @@ Display the description of categories, tags and custom taxonomies when viewing a - **Name:** core/term-description - **Category:** theme - **Supports:** align (full, wide), color (background, link, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** textAlign +- **Attributes:** + - textAlign ## Text Columns (deprecated) @@ -950,7 +1371,10 @@ This block is deprecated. Please use the Columns block instead. ([Source](https: - **Name:** core/text-columns - **Category:** design - **Supports:** interactivity (clientNavigation), ~~inserter~~ -- **Attributes:** columns, content, width +- **Attributes:** + - columns + - content + - width ## Verse @@ -959,7 +1383,9 @@ Insert poetry. Use special spacing formats. Or quote song lyrics. ([Source](http - **Name:** core/verse - **Category:** text - **Supports:** anchor, background (backgroundImage, backgroundSize), color (background, gradients, link, text), dimensions (minHeight), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight) -- **Attributes:** content, textAlign +- **Attributes:** + - content + - textAlign ## Video @@ -968,6 +1394,18 @@ Embed a video from your media library or upload a new one. ([Source](https://git - **Name:** core/video - **Category:** media - **Supports:** align, anchor, interactivity (clientNavigation), spacing (margin, padding) -- **Attributes:** autoplay, blob, caption, controls, id, loop, muted, playsInline, poster, preload, src, tracks +- **Attributes:** + - autoplay + - blob + - caption + - controls + - id + - loop + - muted + - playsInline + - poster + - preload + - src + - tracks diff --git a/package-lock.json b/package-lock.json index 66e468a5bbf2ab..6f63c4b8afec53 100644 --- a/package-lock.json +++ b/package-lock.json @@ -82,6 +82,7 @@ "change-case": "4.1.2", "client-zip": "^2.4.5", "commander": "9.2.0", + "comment-parser": "1.4.0", "concurrently": "3.5.0", "copy-webpack-plugin": "10.2.0", "core-js-builder": "3.39.0", diff --git a/package.json b/package.json index ba2ef003b0dd1d..6cf91236679e47 100644 --- a/package.json +++ b/package.json @@ -91,6 +91,7 @@ "change-case": "4.1.2", "client-zip": "^2.4.5", "commander": "9.2.0", + "comment-parser": "1.4.0", "concurrently": "3.5.0", "copy-webpack-plugin": "10.2.0", "core-js-builder": "3.39.0", diff --git a/packages/block-library/src/archives/edit.js b/packages/block-library/src/archives/edit.js index d4f25da8507f3e..a7c475a181f1bb 100644 --- a/packages/block-library/src/archives/edit.js +++ b/packages/block-library/src/archives/edit.js @@ -17,6 +17,22 @@ import ServerSideRender from '@wordpress/server-side-render'; */ import { useToolsPanelDropdownMenuProps } from '../utils/hooks'; +// TODO: Fix the following ESLint error: +/* eslint-disable jsdoc/check-param-names */ +/** + * The edit function for the Archives block. + * + * Display a date archive of your posts. + * + * @param {Object} props Component props. + * @param {Object} props.attributes Block attributes. + * @param {boolean} props.attributes.displayAsDropdown Whether to display the archive as a dropdown menu. + * @param {boolean} props.attributes.showLabel Whether to show the archive label. + * @param {boolean} props.attributes.showPostCounts Whether to show post counts next to archive links. + * @param {string} props.attributes.type Archive type (e.g., "monthly"). + * @param {Function} props.setAttributes Function to update block attributes. + * @return {Element} The edit interface for the Archives block. + */ export default function ArchivesEdit( { attributes, setAttributes } ) { const { showLabel, showPostCounts, displayAsDropdown, type } = attributes; @@ -137,3 +153,4 @@ export default function ArchivesEdit( { attributes, setAttributes } ) { ); } +/* eslint-enable jsdoc/check-param-names */