Gutenberg - Version v11.7.1

Version Description

Download this release

Release Info

Developer gutenbergplugin
Plugin Icon 128x128 Gutenberg
Version v11.7.1
Comparing to
See all releases

Code changes from version 11.7.0 to v11.7.1

build/format-library/index.js CHANGED
@@ -1306,6 +1306,26 @@ const text_color_textColor = {
1306
  style: 'style',
1307
  class: 'class'
1308
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1309
  edit: TextColorEdit
1310
  };
1311
  //# sourceMappingURL=index.js.map
1306
  style: 'style',
1307
  class: 'class'
1308
  },
1309
+
1310
+ /*
1311
+ * Since this format relies on the <mark> tag, it's important to
1312
+ * prevent the default yellow background color applied by most
1313
+ * browsers. The solution is to detect when this format is used with a
1314
+ * text color but no background color, and in such cases to override
1315
+ * the default styling with a transparent background.
1316
+ *
1317
+ * @see https://github.com/WordPress/gutenberg/pull/35516
1318
+ */
1319
+ __unstableFilterAttributeValue(key, value) {
1320
+ if (key !== 'style') return value; // We should not add a background-color if it's already set
1321
+
1322
+ if (value && value.includes('background-color')) return value;
1323
+ const addedCSS = ['background-color', 'rgba(0, 0, 0, 0)'].join(':'); // Prepend `addedCSS` to avoid a double `;;` as any the existing CSS
1324
+ // rules will already include a `;`.
1325
+
1326
+ return value ? [addedCSS, value].join(';') : addedCSS;
1327
+ },
1328
+
1329
  edit: TextColorEdit
1330
  };
1331
  //# sourceMappingURL=index.js.map
build/format-library/index.min.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => 'd49d69277d18d7ed5bcf54db0518c89a');
1
+ <?php return array('dependencies' => array('lodash', 'wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => '22e38e557a8721f4e2f72abd7c08e946');
build/format-library/index.min.js CHANGED
@@ -1,3 +1,3 @@
1
- !function(){"use strict";var e={};(function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(e);var t=window.wp.richText,n=window.wp.element,o=window.wp.i18n,r=window.wp.blockEditor,a=window.wp.primitives,c=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M14.7 11.3c1-.6 1.5-1.6 1.5-3 0-2.3-1.3-3.4-4-3.4H7v14h5.8c1.4 0 2.5-.3 3.3-1 .8-.7 1.2-1.7 1.2-2.9.1-1.9-.8-3.1-2.6-3.7zm-5.1-4h2.3c.6 0 1.1.1 1.4.4.3.3.5.7.5 1.2s-.2 1-.5 1.2c-.3.3-.8.4-1.4.4H9.6V7.3zm4.6 9c-.4.3-1 .4-1.7.4H9.6v-3.9h2.9c.7 0 1.3.2 1.7.5.4.3.6.8.6 1.5s-.2 1.2-.6 1.5z"}));const l="core/bold",i=(0,o.__)("Bold"),s={name:l,title:i,tagName:"strong",className:null,edit({isActive:e,value:o,onChange:a,onFocus:s}){function u(){a((0,t.toggleFormat)(o,{type:l}))}return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(r.RichTextShortcut,{type:"primary",character:"b",onUse:u}),(0,n.createElement)(r.RichTextToolbarButton,{name:"bold",icon:c,title:i,onClick:function(){u(),s()},isActive:e,shortcutType:"primary",shortcutCharacter:"b"}),(0,n.createElement)(r.__unstableRichTextInputEvent,{inputType:"formatBold",onInput:u}))}};var u=(0,n.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(a.Path,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"}));const m="core/code",h=(0,o.__)("Inline code"),p={name:m,title:h,tagName:"code",className:null,__unstableInputRule(e){const{start:n,text:o}=e;if("`"!==o.slice(n-1,n))return e;const r=o.slice(0,n-1).lastIndexOf("`");if(-1===r)return e;const a=r,c=n-2;return a===c?e:(e=(0,t.remove)(e,a,a+1),e=(0,t.remove)(e,c,c+1),e=(0,t.applyFormat)(e,{type:m},a,c))},edit:({value:e,onChange:o,onFocus:a,isActive:c})=>(0,n.createElement)(r.RichTextToolbarButton,{icon:u,title:h,onClick:function(){o((0,t.toggleFormat)(e,{type:m})),a()},isActive:c})};var g=window.wp.components,v=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,n.createElement)(a.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"}));const d=["image"],w="core/image",b=(0,o.__)("Inline image"),f={name:w,title:b,keywords:[(0,o.__)("photo"),(0,o.__)("media")],object:!0,tagName:"img",className:null,attributes:{className:"class",style:"style",url:"src",alt:"alt"},edit:function({value:e,onChange:o,onFocus:a,isObjectActive:c,activeObjectAttributes:l,contentRef:i}){const[s,u]=(0,n.useState)(!1);function m(){u(!1)}return(0,n.createElement)(r.MediaUploadCheck,null,(0,n.createElement)(r.RichTextToolbarButton,{icon:(0,n.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(g.Path,{d:"M4 18.5h16V17H4v1.5zM16 13v1.5h4V13h-4zM5.1 15h7.8c.6 0 1.1-.5 1.1-1.1V6.1c0-.6-.5-1.1-1.1-1.1H5.1C4.5 5 4 5.5 4 6.1v7.8c0 .6.5 1.1 1.1 1.1zm.4-8.5h7V10l-1-1c-.3-.3-.8-.3-1 0l-1.6 1.5-1.2-.7c-.3-.2-.6-.2-.9 0l-1.3 1V6.5zm0 6.1l1.8-1.3 1.3.8c.3.2.7.2.9-.1l1.5-1.4 1.5 1.4v1.5h-7v-.9z"})),title:b,onClick:function(){u(!0)},isActive:c}),s&&(0,n.createElement)(r.MediaUpload,{allowedTypes:d,onSelect:({id:n,url:r,alt:c,width:l})=>{m(),o((0,t.insertObject)(e,{type:w,attributes:{className:`wp-image-${n}`,style:`width: ${Math.min(l,150)}px;`,url:r,alt:c}})),a()},onClose:m,render:({open:e})=>(e(),null)}),c&&(0,n.createElement)(y,{value:e,onChange:o,activeObjectAttributes:l,contentRef:i}))}};function y({value:e,onChange:r,activeObjectAttributes:a,contentRef:c}){const{style:l}=a,[i,s]=(0,n.useState)(null==l?void 0:l.replace(/\D/g,"")),u=(0,t.useAnchorRef)({ref:c,value:e,settings:f});return(0,n.createElement)(g.Popover,{position:"bottom center",focusOnMount:!1,anchorRef:u,className:"block-editor-format-toolbar__image-popover"},(0,n.createElement)("form",{className:"block-editor-format-toolbar__image-container-content",onSubmit:t=>{const n=e.replacements.slice();n[e.start]={type:w,attributes:{...a,style:i?`width: ${i}px;`:""}},r({...e,replacements:n}),t.preventDefault()}},(0,n.createElement)(g.TextControl,{className:"block-editor-format-toolbar__image-container-value",type:"number",label:(0,o.__)("Width"),value:i,min:1,onChange:e=>s(e)}),(0,n.createElement)(g.Button,{icon:v,label:(0,o.__)("Apply"),type:"submit"})))}var E=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M12.5 5L10 19h1.9l2.5-14z"}));const C="core/italic",_=(0,o.__)("Italic"),k={name:C,title:_,tagName:"em",className:null,edit({isActive:e,value:o,onChange:a,onFocus:c}){function l(){a((0,t.toggleFormat)(o,{type:C}))}return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(r.RichTextShortcut,{type:"primary",character:"i",onUse:l}),(0,n.createElement)(r.RichTextToolbarButton,{name:"italic",icon:E,title:_,onClick:function(){l(),c()},isActive:e,shortcutType:"primary",shortcutCharacter:"i"}),(0,n.createElement)(r.__unstableRichTextInputEvent,{inputType:"formatItalic",onInput:l}))}};var x=window.wp.url,T=window.wp.htmlEntities,S=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"})),A=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"})),R=window.wp.a11y,F=window.wp.data,N=window.lodash;function P(e){if(!e)return!1;const t=e.trim();if(!t)return!1;if(/^\S+:/.test(t)){const e=(0,x.getProtocol)(t);if(!(0,x.isValidProtocol)(e))return!1;if((0,N.startsWith)(e,"http")&&!/^https?:\/\/[^\/\s]/i.test(t))return!1;const n=(0,x.getAuthority)(t);if(!(0,x.isValidAuthority)(n))return!1;const o=(0,x.getPath)(t);if(o&&!(0,x.isValidPath)(o))return!1;const r=(0,x.getQueryString)(t);if(r&&!(0,x.isValidQueryString)(r))return!1;const a=(0,x.getFragment)(t);if(a&&!(0,x.isValidFragment)(a))return!1}return!((0,N.startsWith)(t,"#")&&!(0,x.isValidFragment)(t))}var V=(0,g.withSpokenMessages)((function({isActive:e,activeAttributes:a,addingLink:c,value:l,onChange:i,speak:s,stopAddingLink:u,contentRef:m}){const[h,p]=(0,n.useState)(),{createPageEntity:v,userCanCreatePages:d}=(0,F.useSelect)((e=>{const{getSettings:t}=e(r.store),n=t();return{createPageEntity:n.__experimentalCreatePageEntity,userCanCreatePages:n.__experimentalUserCanCreatePages}}),[]),w={url:a.url,type:a.type,id:a.id,opensInNewTab:"_blank"===a.target,...h},b=(0,t.useAnchorRef)({ref:m,value:l,settings:z}),f=(0,n.useRef)(!!c&&"firstElement");return(0,n.createElement)(g.Popover,{anchorRef:b,focusOnMount:f.current,onClose:u,position:"bottom center"},(0,n.createElement)(r.__experimentalLinkControl,{value:w,onChange:function(n){n={...h,...n};const r=w.opensInNewTab!==n.opensInNewTab&&w.url===n.url,a=r&&void 0===n.url;if(p(a?n:void 0),a)return;const c=(0,x.prependHTTP)(n.url),m=function({url:e,type:t,id:n,opensInNewWindow:o}){const r={type:"core/link",attributes:{url:e}};return t&&(r.attributes.type=t),n&&(r.attributes.id=n),o&&(r.attributes.target="_blank",r.attributes.rel="noreferrer noopener"),r}({url:c,type:n.type,id:void 0!==n.id&&null!==n.id?String(n.id):void 0,opensInNewWindow:n.opensInNewTab});if((0,t.isCollapsed)(l)&&!e){const e=n.title||c,o=(0,t.applyFormat)((0,t.create)({text:e}),m,0,e.length);i((0,t.insert)(l,o))}else{const e=(0,t.applyFormat)(l,m);e.start=e.end,e.activeFormats=[],i(e)}r||u(),P(c)?s(e?(0,o.__)("Link edited."):(0,o.__)("Link inserted."),"assertive"):s((0,o.__)("Warning: the link has been inserted but may have errors. Please test it."),"assertive")},onRemove:function(){const e=(0,t.removeFormat)(l,"core/link");i(e),u(),s((0,o.__)("Link removed."),"assertive")},forceIsEditingLink:c,hasRichPreviews:!0,createSuggestion:v&&async function(e){const t=await v({title:e,status:"draft"});return{id:t.id,type:t.type,title:t.title.rendered,url:t.link,kind:"post-type"}},withCreateSuggestion:d,createSuggestionButtonText:function(e){return(0,n.createInterpolateElement)((0,o.sprintf)(
2
  /* translators: %s: search term. */
3
- (0,o.__)("Create Page: <mark>%s</mark>"),e),{mark:(0,n.createElement)("mark",null)})}}))}));const B="core/link",M=(0,o.__)("Link"),z={name:B,title:M,tagName:"a",className:null,attributes:{url:"href",type:"data-type",id:"data-id",target:"target"},__unstablePasteRule(e,{html:n,plainText:o}){if((0,t.isCollapsed)(e))return e;const r=(n||o).replace(/<[^>]+>/g,"").trim();return(0,x.isURL)(r)?(window.console.log("Created link:\n\n",r),(0,t.applyFormat)(e,{type:B,attributes:{url:(0,T.decodeEntities)(r)}})):e},edit:function({isActive:e,activeAttributes:a,value:c,onChange:l,onFocus:i,contentRef:s}){const[u,m]=(0,n.useState)(!1);function h(){const e=(0,t.getTextContent)((0,t.slice)(c));e&&(0,x.isURL)(e)&&P(e)?l((0,t.applyFormat)(c,{type:B,attributes:{url:e}})):e&&(0,x.isEmail)(e)?l((0,t.applyFormat)(c,{type:B,attributes:{url:`mailto:${e}`}})):m(!0)}function p(){l((0,t.removeFormat)(c,B)),(0,R.speak)((0,o.__)("Link removed."),"assertive")}return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(r.RichTextShortcut,{type:"primary",character:"k",onUse:h}),(0,n.createElement)(r.RichTextShortcut,{type:"primaryShift",character:"k",onUse:p}),e&&(0,n.createElement)(r.RichTextToolbarButton,{name:"link",icon:S,title:(0,o.__)("Unlink"),onClick:p,isActive:e,shortcutType:"primaryShift",shortcutCharacter:"k"}),!e&&(0,n.createElement)(r.RichTextToolbarButton,{name:"link",icon:A,title:M,onClick:h,isActive:e,shortcutType:"primary",shortcutCharacter:"k"}),(u||e)&&(0,n.createElement)(V,{addingLink:u,stopAddingLink:function(){m(!1),i()},isActive:e,activeAttributes:a,value:c,onChange:l,contentRef:s}))}};var H=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"}));const L="core/strikethrough",I=(0,o.__)("Strikethrough"),j={name:L,title:I,tagName:"s",className:null,edit:({isActive:e,value:o,onChange:a,onFocus:c})=>(0,n.createElement)(r.RichTextToolbarButton,{icon:H,title:I,onClick:function(){a((0,t.toggleFormat)(o,{type:L})),c()},isActive:e})},U="core/underline",G={name:U,title:(0,o.__)("Underline"),tagName:"span",className:null,attributes:{style:"style"},edit({value:e,onChange:o}){const a=()=>{o((0,t.toggleFormat)(e,{type:U,attributes:{style:"text-decoration: underline;"}}))};return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(r.RichTextShortcut,{type:"primary",character:"u",onUse:a}),(0,n.createElement)(r.__unstableRichTextInputEvent,{inputType:"formatUnderline",onInput:a}))}};var O=function({icon:e,size:t=24,...o}){return(0,n.cloneElement)(e,{width:t,height:t,...o})},W=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M12.9 6h-2l-4 11h1.9l1.1-3h4.2l1.1 3h1.9L12.9 6zm-2.5 6.5l1.5-4.9 1.7 4.9h-3.2z"}));function $(e=""){return e.split(";").reduce(((e,t)=>{if(t){const[n,o]=t.split(":");"color"===n&&(e.color=o),"background-color"===n&&(e.backgroundColor=o)}return e}),{})}function D(e="",t){return e.split(" ").reduce(((e,n)=>{if(n.match(/^has-([^-]+)-color$/)){const[,o]=n.match(/^has-([^-]+)-color$/),a=(0,r.getColorObjectByAttributeValues)(t,o);e.color=a.color}return e}),{})}function Q(e,n,o){const r=(0,t.getActiveFormat)(e,n);return r?{...$(r.attributes.style),...D(r.attributes.class,o)}:{}}function K({name:e,property:o,value:a,onChange:c}){const l=(0,F.useSelect)((e=>{const{getSettings:t}=e(r.store);return(0,N.get)(t(),["colors"],[])}),[]),i=(0,n.useCallback)((n=>{c(function(e,n,o,a){const{color:c,backgroundColor:l}={...Q(e,n,o),...a};if(!c&&!l)return(0,t.removeFormat)(e,n);const i=[],s=[],u={};if(l?i.push(["background-color",l].join(":")):i.push(["background-color","rgba(0, 0, 0, 0)"].join(":")),c){const e=(0,r.getColorObjectByColorValue)(o,c);e?s.push((0,r.getColorClassName)("color",e.slug)):i.push(["color",c].join(":"))}return i.length&&(u.style=i.join(";")),s.length&&(u.class=s.join(" ")),(0,t.applyFormat)(e,{type:n,attributes:u})}(a,e,l,{[o]:n}))}),[l,c,o]),s=(0,n.useMemo)((()=>Q(a,e,l)),[e,a,l]);return(0,n.createElement)(r.ColorPalette,{value:s[o],onChange:i})}function q({name:e,value:r,onChange:a,onClose:c,contentRef:l}){const i=(0,t.useAnchorRef)({ref:l,value:r,settings:ee});return(0,n.createElement)(g.Popover,{onClose:c,className:"components-inline-color-popover",anchorRef:i},(0,n.createElement)(g.TabPanel,{tabs:[{name:"color",title:(0,o.__)("Text")},{name:"backgroundColor",title:(0,o.__)("Background")}]},(t=>(0,n.createElement)(K,{name:e,property:t.name,value:r,onChange:a}))))}const J="core/text-color",X=(0,o.__)("Highlight"),Y=[];function Z(e,t){const{ownerDocument:n}=e,{defaultView:o}=n,r=o.getComputedStyle(e).getPropertyValue(t);return"background-color"===t&&"rgba(0, 0, 0, 0)"===r&&e.parentElement?Z(e.parentElement,t):r}const ee={name:J,title:X,tagName:"mark",className:"has-inline-color",attributes:{style:"style",class:"class"},edit:function({value:e,onChange:o,isActive:a,activeAttributes:c,contentRef:l}){const i=(0,r.useSetting)("color.custom"),s=(0,r.useSetting)("color.palette")||Y,[u,m]=(0,n.useState)(!1),h=(0,n.useCallback)((()=>m(!0)),[m]),p=(0,n.useCallback)((()=>m(!1)),[m]),g=(0,n.useMemo)((()=>function(e,{color:t,backgroundColor:n}){if(t||n)return{color:t||Z(e,"color"),backgroundColor:"rgba(0, 0, 0, 0)"===n?Z(e,"background-color"):n}}(l.current,Q(e,J,s))),[e,s]),v=!(0,N.isEmpty)(s)||!i;return v||a?(0,n.createElement)(n.Fragment,null,(0,n.createElement)(r.RichTextToolbarButton,{className:"format-library-text-color-button",isActive:a,icon:(0,n.createElement)(O,{icon:W,style:g}),title:X,onClick:v?h:()=>o((0,t.removeFormat)(e,J))}),u&&(0,n.createElement)(q,{name:J,onClose:p,activeAttributes:c,value:e,onChange:o,contentRef:l})):null}};var te=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M16.9 18.3l.8-1.2c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.1-.3-.4-.5-.6-.7-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.2 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3L15 19.4h4.3v-1.2h-2.4zM14.1 7.2h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z"}));const ne="core/subscript",oe=(0,o.__)("Subscript"),re={name:ne,title:oe,tagName:"sub",className:null,edit:({isActive:e,value:o,onChange:a,onFocus:c})=>(0,n.createElement)(r.RichTextToolbarButton,{icon:te,title:oe,onClick:function(){a((0,t.toggleFormat)(o,{type:ne})),c()},isActive:e})};var ae=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M16.9 10.3l.8-1.3c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.2-.2-.4-.4-.7-.6-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.1 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3l-1.8 2.8h4.3v-1.2h-2.2zm-2.8-3.1h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z"}));const ce="core/superscript",le=(0,o.__)("Superscript"),ie={name:ce,title:le,tagName:"sup",className:null,edit:({isActive:e,value:o,onChange:a,onFocus:c})=>(0,n.createElement)(r.RichTextToolbarButton,{icon:ae,title:le,onClick:function(){a((0,t.toggleFormat)(o,{type:ce})),c()},isActive:e})};var se=(0,n.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(a.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 12.8h8v-1.5H8v1.5z"}));const ue="core/keyboard",me=(0,o.__)("Keyboard input");[s,p,f,k,z,j,G,ee,re,ie,{name:ue,title:me,tagName:"kbd",className:null,edit:({isActive:e,value:o,onChange:a,onFocus:c})=>(0,n.createElement)(r.RichTextToolbarButton,{icon:se,title:me,onClick:function(){a((0,t.toggleFormat)(o,{type:ue})),c()},isActive:e})}].forEach((({name:e,...n})=>(0,t.registerFormatType)(e,n))),(window.wp=window.wp||{}).formatLibrary=e}();
1
+ !function(){"use strict";var e={};(function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(e);var t=window.wp.richText,n=window.wp.element,o=window.wp.i18n,r=window.wp.blockEditor,a=window.wp.primitives,c=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M14.7 11.3c1-.6 1.5-1.6 1.5-3 0-2.3-1.3-3.4-4-3.4H7v14h5.8c1.4 0 2.5-.3 3.3-1 .8-.7 1.2-1.7 1.2-2.9.1-1.9-.8-3.1-2.6-3.7zm-5.1-4h2.3c.6 0 1.1.1 1.4.4.3.3.5.7.5 1.2s-.2 1-.5 1.2c-.3.3-.8.4-1.4.4H9.6V7.3zm4.6 9c-.4.3-1 .4-1.7.4H9.6v-3.9h2.9c.7 0 1.3.2 1.7.5.4.3.6.8.6 1.5s-.2 1.2-.6 1.5z"}));const l="core/bold",i=(0,o.__)("Bold"),s={name:l,title:i,tagName:"strong",className:null,edit({isActive:e,value:o,onChange:a,onFocus:s}){function u(){a((0,t.toggleFormat)(o,{type:l}))}return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(r.RichTextShortcut,{type:"primary",character:"b",onUse:u}),(0,n.createElement)(r.RichTextToolbarButton,{name:"bold",icon:c,title:i,onClick:function(){u(),s()},isActive:e,shortcutType:"primary",shortcutCharacter:"b"}),(0,n.createElement)(r.__unstableRichTextInputEvent,{inputType:"formatBold",onInput:u}))}};var u=(0,n.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(a.Path,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"}));const m="core/code",h=(0,o.__)("Inline code"),p={name:m,title:h,tagName:"code",className:null,__unstableInputRule(e){const{start:n,text:o}=e;if("`"!==o.slice(n-1,n))return e;const r=o.slice(0,n-1).lastIndexOf("`");if(-1===r)return e;const a=r,c=n-2;return a===c?e:(e=(0,t.remove)(e,a,a+1),e=(0,t.remove)(e,c,c+1),e=(0,t.applyFormat)(e,{type:m},a,c))},edit:({value:e,onChange:o,onFocus:a,isActive:c})=>(0,n.createElement)(r.RichTextToolbarButton,{icon:u,title:h,onClick:function(){o((0,t.toggleFormat)(e,{type:m})),a()},isActive:c})};var g=window.wp.components,v=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,n.createElement)(a.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"}));const d=["image"],w="core/image",b=(0,o.__)("Inline image"),f={name:w,title:b,keywords:[(0,o.__)("photo"),(0,o.__)("media")],object:!0,tagName:"img",className:null,attributes:{className:"class",style:"style",url:"src",alt:"alt"},edit:function({value:e,onChange:o,onFocus:a,isObjectActive:c,activeObjectAttributes:l,contentRef:i}){const[s,u]=(0,n.useState)(!1);function m(){u(!1)}return(0,n.createElement)(r.MediaUploadCheck,null,(0,n.createElement)(r.RichTextToolbarButton,{icon:(0,n.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(g.Path,{d:"M4 18.5h16V17H4v1.5zM16 13v1.5h4V13h-4zM5.1 15h7.8c.6 0 1.1-.5 1.1-1.1V6.1c0-.6-.5-1.1-1.1-1.1H5.1C4.5 5 4 5.5 4 6.1v7.8c0 .6.5 1.1 1.1 1.1zm.4-8.5h7V10l-1-1c-.3-.3-.8-.3-1 0l-1.6 1.5-1.2-.7c-.3-.2-.6-.2-.9 0l-1.3 1V6.5zm0 6.1l1.8-1.3 1.3.8c.3.2.7.2.9-.1l1.5-1.4 1.5 1.4v1.5h-7v-.9z"})),title:b,onClick:function(){u(!0)},isActive:c}),s&&(0,n.createElement)(r.MediaUpload,{allowedTypes:d,onSelect:({id:n,url:r,alt:c,width:l})=>{m(),o((0,t.insertObject)(e,{type:w,attributes:{className:`wp-image-${n}`,style:`width: ${Math.min(l,150)}px;`,url:r,alt:c}})),a()},onClose:m,render:({open:e})=>(e(),null)}),c&&(0,n.createElement)(y,{value:e,onChange:o,activeObjectAttributes:l,contentRef:i}))}};function y({value:e,onChange:r,activeObjectAttributes:a,contentRef:c}){const{style:l}=a,[i,s]=(0,n.useState)(null==l?void 0:l.replace(/\D/g,"")),u=(0,t.useAnchorRef)({ref:c,value:e,settings:f});return(0,n.createElement)(g.Popover,{position:"bottom center",focusOnMount:!1,anchorRef:u,className:"block-editor-format-toolbar__image-popover"},(0,n.createElement)("form",{className:"block-editor-format-toolbar__image-container-content",onSubmit:t=>{const n=e.replacements.slice();n[e.start]={type:w,attributes:{...a,style:i?`width: ${i}px;`:""}},r({...e,replacements:n}),t.preventDefault()}},(0,n.createElement)(g.TextControl,{className:"block-editor-format-toolbar__image-container-value",type:"number",label:(0,o.__)("Width"),value:i,min:1,onChange:e=>s(e)}),(0,n.createElement)(g.Button,{icon:v,label:(0,o.__)("Apply"),type:"submit"})))}var E=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M12.5 5L10 19h1.9l2.5-14z"}));const _="core/italic",C=(0,o.__)("Italic"),k={name:_,title:C,tagName:"em",className:null,edit({isActive:e,value:o,onChange:a,onFocus:c}){function l(){a((0,t.toggleFormat)(o,{type:_}))}return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(r.RichTextShortcut,{type:"primary",character:"i",onUse:l}),(0,n.createElement)(r.RichTextToolbarButton,{name:"italic",icon:E,title:C,onClick:function(){l(),c()},isActive:e,shortcutType:"primary",shortcutCharacter:"i"}),(0,n.createElement)(r.__unstableRichTextInputEvent,{inputType:"formatItalic",onInput:l}))}};var x=window.wp.url,T=window.wp.htmlEntities,S=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"})),A=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"})),R=window.wp.a11y,F=window.wp.data,N=window.lodash;function P(e){if(!e)return!1;const t=e.trim();if(!t)return!1;if(/^\S+:/.test(t)){const e=(0,x.getProtocol)(t);if(!(0,x.isValidProtocol)(e))return!1;if((0,N.startsWith)(e,"http")&&!/^https?:\/\/[^\/\s]/i.test(t))return!1;const n=(0,x.getAuthority)(t);if(!(0,x.isValidAuthority)(n))return!1;const o=(0,x.getPath)(t);if(o&&!(0,x.isValidPath)(o))return!1;const r=(0,x.getQueryString)(t);if(r&&!(0,x.isValidQueryString)(r))return!1;const a=(0,x.getFragment)(t);if(a&&!(0,x.isValidFragment)(a))return!1}return!((0,N.startsWith)(t,"#")&&!(0,x.isValidFragment)(t))}var V=(0,g.withSpokenMessages)((function({isActive:e,activeAttributes:a,addingLink:c,value:l,onChange:i,speak:s,stopAddingLink:u,contentRef:m}){const[h,p]=(0,n.useState)(),{createPageEntity:v,userCanCreatePages:d}=(0,F.useSelect)((e=>{const{getSettings:t}=e(r.store),n=t();return{createPageEntity:n.__experimentalCreatePageEntity,userCanCreatePages:n.__experimentalUserCanCreatePages}}),[]),w={url:a.url,type:a.type,id:a.id,opensInNewTab:"_blank"===a.target,...h},b=(0,t.useAnchorRef)({ref:m,value:l,settings:z}),f=(0,n.useRef)(!!c&&"firstElement");return(0,n.createElement)(g.Popover,{anchorRef:b,focusOnMount:f.current,onClose:u,position:"bottom center"},(0,n.createElement)(r.__experimentalLinkControl,{value:w,onChange:function(n){n={...h,...n};const r=w.opensInNewTab!==n.opensInNewTab&&w.url===n.url,a=r&&void 0===n.url;if(p(a?n:void 0),a)return;const c=(0,x.prependHTTP)(n.url),m=function({url:e,type:t,id:n,opensInNewWindow:o}){const r={type:"core/link",attributes:{url:e}};return t&&(r.attributes.type=t),n&&(r.attributes.id=n),o&&(r.attributes.target="_blank",r.attributes.rel="noreferrer noopener"),r}({url:c,type:n.type,id:void 0!==n.id&&null!==n.id?String(n.id):void 0,opensInNewWindow:n.opensInNewTab});if((0,t.isCollapsed)(l)&&!e){const e=n.title||c,o=(0,t.applyFormat)((0,t.create)({text:e}),m,0,e.length);i((0,t.insert)(l,o))}else{const e=(0,t.applyFormat)(l,m);e.start=e.end,e.activeFormats=[],i(e)}r||u(),P(c)?s(e?(0,o.__)("Link edited."):(0,o.__)("Link inserted."),"assertive"):s((0,o.__)("Warning: the link has been inserted but may have errors. Please test it."),"assertive")},onRemove:function(){const e=(0,t.removeFormat)(l,"core/link");i(e),u(),s((0,o.__)("Link removed."),"assertive")},forceIsEditingLink:c,hasRichPreviews:!0,createSuggestion:v&&async function(e){const t=await v({title:e,status:"draft"});return{id:t.id,type:t.type,title:t.title.rendered,url:t.link,kind:"post-type"}},withCreateSuggestion:d,createSuggestionButtonText:function(e){return(0,n.createInterpolateElement)((0,o.sprintf)(
2
  /* translators: %s: search term. */
3
+ (0,o.__)("Create Page: <mark>%s</mark>"),e),{mark:(0,n.createElement)("mark",null)})}}))}));const B="core/link",M=(0,o.__)("Link"),z={name:B,title:M,tagName:"a",className:null,attributes:{url:"href",type:"data-type",id:"data-id",target:"target"},__unstablePasteRule(e,{html:n,plainText:o}){if((0,t.isCollapsed)(e))return e;const r=(n||o).replace(/<[^>]+>/g,"").trim();return(0,x.isURL)(r)?(window.console.log("Created link:\n\n",r),(0,t.applyFormat)(e,{type:B,attributes:{url:(0,T.decodeEntities)(r)}})):e},edit:function({isActive:e,activeAttributes:a,value:c,onChange:l,onFocus:i,contentRef:s}){const[u,m]=(0,n.useState)(!1);function h(){const e=(0,t.getTextContent)((0,t.slice)(c));e&&(0,x.isURL)(e)&&P(e)?l((0,t.applyFormat)(c,{type:B,attributes:{url:e}})):e&&(0,x.isEmail)(e)?l((0,t.applyFormat)(c,{type:B,attributes:{url:`mailto:${e}`}})):m(!0)}function p(){l((0,t.removeFormat)(c,B)),(0,R.speak)((0,o.__)("Link removed."),"assertive")}return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(r.RichTextShortcut,{type:"primary",character:"k",onUse:h}),(0,n.createElement)(r.RichTextShortcut,{type:"primaryShift",character:"k",onUse:p}),e&&(0,n.createElement)(r.RichTextToolbarButton,{name:"link",icon:S,title:(0,o.__)("Unlink"),onClick:p,isActive:e,shortcutType:"primaryShift",shortcutCharacter:"k"}),!e&&(0,n.createElement)(r.RichTextToolbarButton,{name:"link",icon:A,title:M,onClick:h,isActive:e,shortcutType:"primary",shortcutCharacter:"k"}),(u||e)&&(0,n.createElement)(V,{addingLink:u,stopAddingLink:function(){m(!1),i()},isActive:e,activeAttributes:a,value:c,onChange:l,contentRef:s}))}};var H=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"}));const L="core/strikethrough",I=(0,o.__)("Strikethrough"),j={name:L,title:I,tagName:"s",className:null,edit:({isActive:e,value:o,onChange:a,onFocus:c})=>(0,n.createElement)(r.RichTextToolbarButton,{icon:H,title:I,onClick:function(){a((0,t.toggleFormat)(o,{type:L})),c()},isActive:e})},U="core/underline",G={name:U,title:(0,o.__)("Underline"),tagName:"span",className:null,attributes:{style:"style"},edit({value:e,onChange:o}){const a=()=>{o((0,t.toggleFormat)(e,{type:U,attributes:{style:"text-decoration: underline;"}}))};return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(r.RichTextShortcut,{type:"primary",character:"u",onUse:a}),(0,n.createElement)(r.__unstableRichTextInputEvent,{inputType:"formatUnderline",onInput:a}))}};var O=function({icon:e,size:t=24,...o}){return(0,n.cloneElement)(e,{width:t,height:t,...o})},W=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M12.9 6h-2l-4 11h1.9l1.1-3h4.2l1.1 3h1.9L12.9 6zm-2.5 6.5l1.5-4.9 1.7 4.9h-3.2z"}));function $(e=""){return e.split(";").reduce(((e,t)=>{if(t){const[n,o]=t.split(":");"color"===n&&(e.color=o),"background-color"===n&&(e.backgroundColor=o)}return e}),{})}function D(e="",t){return e.split(" ").reduce(((e,n)=>{if(n.match(/^has-([^-]+)-color$/)){const[,o]=n.match(/^has-([^-]+)-color$/),a=(0,r.getColorObjectByAttributeValues)(t,o);e.color=a.color}return e}),{})}function Q(e,n,o){const r=(0,t.getActiveFormat)(e,n);return r?{...$(r.attributes.style),...D(r.attributes.class,o)}:{}}function K({name:e,property:o,value:a,onChange:c}){const l=(0,F.useSelect)((e=>{const{getSettings:t}=e(r.store);return(0,N.get)(t(),["colors"],[])}),[]),i=(0,n.useCallback)((n=>{c(function(e,n,o,a){const{color:c,backgroundColor:l}={...Q(e,n,o),...a};if(!c&&!l)return(0,t.removeFormat)(e,n);const i=[],s=[],u={};if(l?i.push(["background-color",l].join(":")):i.push(["background-color","rgba(0, 0, 0, 0)"].join(":")),c){const e=(0,r.getColorObjectByColorValue)(o,c);e?s.push((0,r.getColorClassName)("color",e.slug)):i.push(["color",c].join(":"))}return i.length&&(u.style=i.join(";")),s.length&&(u.class=s.join(" ")),(0,t.applyFormat)(e,{type:n,attributes:u})}(a,e,l,{[o]:n}))}),[l,c,o]),s=(0,n.useMemo)((()=>Q(a,e,l)),[e,a,l]);return(0,n.createElement)(r.ColorPalette,{value:s[o],onChange:i})}function q({name:e,value:r,onChange:a,onClose:c,contentRef:l}){const i=(0,t.useAnchorRef)({ref:l,value:r,settings:ee});return(0,n.createElement)(g.Popover,{onClose:c,className:"components-inline-color-popover",anchorRef:i},(0,n.createElement)(g.TabPanel,{tabs:[{name:"color",title:(0,o.__)("Text")},{name:"backgroundColor",title:(0,o.__)("Background")}]},(t=>(0,n.createElement)(K,{name:e,property:t.name,value:r,onChange:a}))))}const J="core/text-color",X=(0,o.__)("Highlight"),Y=[];function Z(e,t){const{ownerDocument:n}=e,{defaultView:o}=n,r=o.getComputedStyle(e).getPropertyValue(t);return"background-color"===t&&"rgba(0, 0, 0, 0)"===r&&e.parentElement?Z(e.parentElement,t):r}const ee={name:J,title:X,tagName:"mark",className:"has-inline-color",attributes:{style:"style",class:"class"},__unstableFilterAttributeValue(e,t){if("style"!==e)return t;if(t&&t.includes("background-color"))return t;const n=["background-color","rgba(0, 0, 0, 0)"].join(":");return t?[n,t].join(";"):n},edit:function({value:e,onChange:o,isActive:a,activeAttributes:c,contentRef:l}){const i=(0,r.useSetting)("color.custom"),s=(0,r.useSetting)("color.palette")||Y,[u,m]=(0,n.useState)(!1),h=(0,n.useCallback)((()=>m(!0)),[m]),p=(0,n.useCallback)((()=>m(!1)),[m]),g=(0,n.useMemo)((()=>function(e,{color:t,backgroundColor:n}){if(t||n)return{color:t||Z(e,"color"),backgroundColor:"rgba(0, 0, 0, 0)"===n?Z(e,"background-color"):n}}(l.current,Q(e,J,s))),[e,s]),v=!(0,N.isEmpty)(s)||!i;return v||a?(0,n.createElement)(n.Fragment,null,(0,n.createElement)(r.RichTextToolbarButton,{className:"format-library-text-color-button",isActive:a,icon:(0,n.createElement)(O,{icon:W,style:g}),title:X,onClick:v?h:()=>o((0,t.removeFormat)(e,J))}),u&&(0,n.createElement)(q,{name:J,onClose:p,activeAttributes:c,value:e,onChange:o,contentRef:l})):null}};var te=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M16.9 18.3l.8-1.2c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.1-.3-.4-.5-.6-.7-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.2 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3L15 19.4h4.3v-1.2h-2.4zM14.1 7.2h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z"}));const ne="core/subscript",oe=(0,o.__)("Subscript"),re={name:ne,title:oe,tagName:"sub",className:null,edit:({isActive:e,value:o,onChange:a,onFocus:c})=>(0,n.createElement)(r.RichTextToolbarButton,{icon:te,title:oe,onClick:function(){a((0,t.toggleFormat)(o,{type:ne})),c()},isActive:e})};var ae=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M16.9 10.3l.8-1.3c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.2-.2-.4-.4-.7-.6-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.1 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3l-1.8 2.8h4.3v-1.2h-2.2zm-2.8-3.1h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z"}));const ce="core/superscript",le=(0,o.__)("Superscript"),ie={name:ce,title:le,tagName:"sup",className:null,edit:({isActive:e,value:o,onChange:a,onFocus:c})=>(0,n.createElement)(r.RichTextToolbarButton,{icon:ae,title:le,onClick:function(){a((0,t.toggleFormat)(o,{type:ce})),c()},isActive:e})};var se=(0,n.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(a.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 12.8h8v-1.5H8v1.5z"}));const ue="core/keyboard",me=(0,o.__)("Keyboard input");[s,p,f,k,z,j,G,ee,re,ie,{name:ue,title:me,tagName:"kbd",className:null,edit:({isActive:e,value:o,onChange:a,onFocus:c})=>(0,n.createElement)(r.RichTextToolbarButton,{icon:se,title:me,onClick:function(){a((0,t.toggleFormat)(o,{type:ue})),c()},isActive:e})}].forEach((({name:e,...n})=>(0,t.registerFormatType)(e,n))),(window.wp=window.wp||{}).formatLibrary=e}();
build/rich-text/index.js CHANGED
@@ -821,14 +821,6 @@ function createEmptyValue() {
821
  };
822
  }
823
 
824
- function simpleFindKey(object, value) {
825
- for (const key in object) {
826
- if (object[key] === value) {
827
- return key;
828
- }
829
- }
830
- }
831
-
832
  function toFormat({
833
  type,
834
  attributes
@@ -873,17 +865,30 @@ function toFormat({
873
 
874
  const registeredAttributes = {};
875
  const unregisteredAttributes = {};
 
 
876
 
877
- for (const name in attributes) {
878
- const key = simpleFindKey(formatType.attributes, name);
 
879
 
880
- if (key) {
881
- registeredAttributes[key] = attributes[name];
882
- } else {
883
- unregisteredAttributes[name] = attributes[name];
 
 
 
 
 
 
884
  }
885
  }
886
 
 
 
 
 
887
  return {
888
  type: formatType.name,
889
  attributes: registeredAttributes,
@@ -4558,7 +4563,22 @@ function useRichText({
4558
  const hadSelectionUpdate = (0,external_wp_element_namespaceObject.useRef)(false);
4559
 
4560
  if (!record.current) {
4561
- setRecordFromProps();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4562
  } else if (selectionStart !== record.current.start || selectionEnd !== record.current.end) {
4563
  hadSelectionUpdate.current = isSelected;
4564
  record.current = { ...record.current,
@@ -4609,6 +4629,28 @@ function useRichText({
4609
  forceRender();
4610
  }
4611
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4612
  function applyFromProps() {
4613
  setRecordFromProps();
4614
  applyRecord(record.current);
821
  };
822
  }
823
 
 
 
 
 
 
 
 
 
824
  function toFormat({
825
  type,
826
  attributes
865
 
866
  const registeredAttributes = {};
867
  const unregisteredAttributes = {};
868
+ const _attributes = { ...attributes
869
+ };
870
 
871
+ for (const key in formatType.attributes) {
872
+ const name = formatType.attributes[key];
873
+ registeredAttributes[key] = _attributes[name];
874
 
875
+ if (formatType.__unstableFilterAttributeValue) {
876
+ registeredAttributes[key] = formatType.__unstableFilterAttributeValue(key, registeredAttributes[key]);
877
+ } // delete the attribute and what's left is considered
878
+ // to be unregistered.
879
+
880
+
881
+ delete _attributes[name];
882
+
883
+ if (typeof registeredAttributes[key] === 'undefined') {
884
+ delete registeredAttributes[key];
885
  }
886
  }
887
 
888
+ for (const name in _attributes) {
889
+ unregisteredAttributes[name] = attributes[name];
890
+ }
891
+
892
  return {
893
  type: formatType.name,
894
  attributes: registeredAttributes,
4563
  const hadSelectionUpdate = (0,external_wp_element_namespaceObject.useRef)(false);
4564
 
4565
  if (!record.current) {
4566
+ var _record$current, _record$current$forma, _record$current$forma2;
4567
+
4568
+ setRecordFromProps(); // Sometimes formats are added programmatically and we need to make
4569
+ // sure it's persisted to the block store / markup. If these formats
4570
+ // are not applied, they could cause inconsistencies between the data
4571
+ // in the visual editor and the frontend. Right now, it's only relevant
4572
+ // to the `core/text-color` format, which is applied at runtime in
4573
+ // certain circunstances. See the `__unstableFilterAttributeValue`
4574
+ // function in `packages/format-library/src/text-color/index.js`.
4575
+ // @todo find a less-hacky way of solving this.
4576
+
4577
+ const hasRelevantInitFormat = ((_record$current = record.current) === null || _record$current === void 0 ? void 0 : (_record$current$forma = _record$current.formats[0]) === null || _record$current$forma === void 0 ? void 0 : (_record$current$forma2 = _record$current$forma[0]) === null || _record$current$forma2 === void 0 ? void 0 : _record$current$forma2.type) === 'core/text-color';
4578
+
4579
+ if (hasRelevantInitFormat) {
4580
+ handleChangesUponInit(record.current);
4581
+ }
4582
  } else if (selectionStart !== record.current.start || selectionEnd !== record.current.end) {
4583
  hadSelectionUpdate.current = isSelected;
4584
  record.current = { ...record.current,
4629
  forceRender();
4630
  }
4631
 
4632
+ function handleChangesUponInit(newRecord) {
4633
+ record.current = newRecord;
4634
+ _value.current = toHTMLString({
4635
+ value: __unstableBeforeSerialize ? { ...newRecord,
4636
+ formats: __unstableBeforeSerialize(newRecord)
4637
+ } : newRecord,
4638
+ multilineTag,
4639
+ preserveWhiteSpace
4640
+ });
4641
+ const {
4642
+ formats,
4643
+ text
4644
+ } = newRecord;
4645
+ registry.batch(() => {
4646
+ onChange(_value.current, {
4647
+ __unstableFormats: formats,
4648
+ __unstableText: text
4649
+ });
4650
+ });
4651
+ forceRender();
4652
+ }
4653
+
4654
  function applyFromProps() {
4655
  setRecordFromProps();
4656
  applyRecord(record.current);
build/rich-text/index.min.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'wp-compose', 'wp-data', 'wp-element', 'wp-escape-html', 'wp-keycodes', 'wp-polyfill'), 'version' => '96c47c84d797d2e29ba19b11fd7d17b3');
1
+ <?php return array('dependencies' => array('lodash', 'wp-compose', 'wp-data', 'wp-element', 'wp-escape-html', 'wp-keycodes', 'wp-polyfill'), 'version' => '20da878f5991b7a46557680eaebb4416');
build/rich-text/index.min.js CHANGED
@@ -1 +1 @@
1
- !function(){"use strict";var e={d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{__UNSTABLE_LINE_SEPARATOR:function(){return _},__experimentalRichText:function(){return nt},__unstableCanIndentListItems:function(){return Me},__unstableCanOutdentListItems:function(){return $e},__unstableChangeListType:function(){return Ve},__unstableCreateElement:function(){return w},__unstableFormatEdit:function(){return rt},__unstableIndentListItems:function(){return je},__unstableInsertLineSeparator:function(){return te},__unstableIsActiveListType:function(){return B},__unstableIsEmptyLine:function(){return q},__unstableIsListRootSelected:function(){return H},__unstableOutdentListItems:function(){return Pe},__unstableRemoveLineSeparator:function(){return ne},__unstableToDom:function(){return Te},__unstableUseRichText:function(){return tt},applyFormat:function(){return x},concat:function(){return $},create:function(){return R},getActiveFormat:function(){return I},getActiveObject:function(){return P},getTextContent:function(){return V},insert:function(){return J},insertObject:function(){return re},isCollapsed:function(){return z},isEmpty:function(){return U},join:function(){return X},registerFormatType:function(){return Y},remove:function(){return Q},removeFormat:function(){return G},replace:function(){return ee},slice:function(){return ae},split:function(){return oe},store:function(){return y},toHTMLString:function(){return _e},toggleFormat:function(){return We},unregisterFormatType:function(){return ke},useAnchorRef:function(){return He}});var n={};e.r(n),e.d(n,{getFormatType:function(){return m},getFormatTypeForBareElement:function(){return p},getFormatTypeForClassName:function(){return g},getFormatTypes:function(){return d}});var r={};e.r(r),e.d(r,{addFormatTypes:function(){return h},removeFormatTypes:function(){return v}});var a,o,i=window.wp.data,s=window.lodash,c=(0,i.combineReducers)({formatTypes:function(e={},t){switch(t.type){case"ADD_FORMAT_TYPES":return{...e,...(0,s.keyBy)(t.formatTypes,"name")};case"REMOVE_FORMAT_TYPES":return(0,s.omit)(e,t.names)}return e}});function l(e){return[e]}function u(){var e={clear:function(){e.head=null}};return e}function f(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}a={},o="undefined"!=typeof WeakMap;const d=function(e,t){var n,r;function i(){n=o?new WeakMap:u()}function s(){var n,a,o,i,s,c=arguments.length;for(i=new Array(c),o=0;o<c;o++)i[o]=arguments[o];for(s=t.apply(null,i),(n=r(s)).isUniqueByDependants||(n.lastDependants&&!f(s,n.lastDependants,0)&&n.clear(),n.lastDependants=s),a=n.head;a;){if(f(a.args,i,1))return a!==n.head&&(a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=n.head,a.prev=null,n.head.prev=a,n.head=a),a.val;a=a.next}return a={val:e.apply(null,i)},i[0]=null,a.args=i,n.head&&(n.head.prev=a,a.next=n.head),n.head=a,a.val}return t||(t=l),r=o?function(e){var t,r,o,i,s,c=n,l=!0;for(t=0;t<e.length;t++){if(!(s=r=e[t])||"object"!=typeof s){l=!1;break}c.has(r)?c=c.get(r):(o=new WeakMap,c.set(r,o),c=o)}return c.has(a)||((i=u()).isUniqueByDependants=l,c.set(a,i)),c.get(a)}:function(){return n},s.getDependants=t,s.clear=i,i(),s}((e=>Object.values(e.formatTypes)),(e=>[e.formatTypes]));function m(e,t){return e.formatTypes[t]}function p(e,t){return(0,s.find)(d(e),(({className:e,tagName:n})=>null===e&&t===n))}function g(e,t){return(0,s.find)(d(e),(({className:e})=>null!==e&&` ${t} `.indexOf(` ${e} `)>=0))}function h(e){return{type:"ADD_FORMAT_TYPES",formatTypes:(0,s.castArray)(e)}}function v(e){return{type:"REMOVE_FORMAT_TYPES",names:(0,s.castArray)(e)}}const y=(0,i.createReduxStore)("core/rich-text",{reducer:c,selectors:n,actions:r});function b(e,t){if(e===t)return!0;if(!e||!t)return!1;if(e.type!==t.type)return!1;const n=e.attributes,r=t.attributes;if(n===r)return!0;if(!n||!r)return!1;const a=Object.keys(n),o=Object.keys(r);if(a.length!==o.length)return!1;const i=a.length;for(let e=0;e<i;e++){const t=a[e];if(n[t]!==r[t])return!1}return!0}function T(e){const t=e.formats.slice();return t.forEach(((e,n)=>{const r=t[n-1];if(r){const a=e.slice();a.forEach(((e,t)=>{const n=r[t];b(e,n)&&(a[t]=n)})),t[n]=a}})),{...e,formats:t}}function E(e,t,n){return(e=e.slice())[t]=n,e}function x(e,t,n=e.start,r=e.end){const{formats:a,activeFormats:o}=e,i=a.slice();if(n===r){const e=(0,s.find)(i[n],{type:t.type});if(e){const a=i[n].indexOf(e);for(;i[n]&&i[n][a]===e;)i[n]=E(i[n],a,t),n--;for(r++;i[r]&&i[r][a]===e;)i[r]=E(i[r],a,t),r++}}else{let e=1/0;for(let a=n;a<r;a++)if(i[a]){i[a]=i[a].filter((({type:e})=>e!==t.type));const n=i[a].length;n<e&&(e=n)}else i[a]=[],e=0;for(let a=n;a<r;a++)i[a].splice(e,0,t)}return T({...e,formats:i,activeFormats:[...(0,s.reject)(o,{type:t.type}),t]})}function w({implementation:e},t){return w.body||(w.body=e.createHTMLDocument("").body),w.body.innerHTML=t,w.body}(0,i.register)(y);const _="\u2028",C="";function F(e,t){for(const n in e)if(e[n]===t)return n}function L({type:e,attributes:t}){let n;if(t&&t.class&&(n=(0,i.select)(y).getFormatTypeForClassName(t.class),n&&(t.class=` ${t.class} `.replace(` ${n.className} `," ").trim(),t.class||delete t.class)),n||(n=(0,i.select)(y).getFormatTypeForBareElement(e)),!n)return t?{type:e,attributes:t}:{type:e};if(n.__experimentalCreatePrepareEditableTree&&!n.__experimentalCreateOnChangeEditableValue)return null;if(!t)return{type:n.name};const r={},a={};for(const e in t){const o=F(n.attributes,e);o?r[o]=t[e]:a[e]=t[e]}return{type:n.name,attributes:r,unregisteredAttributes:a}}function R({element:e,text:t,html:n,range:r,multilineTag:a,multilineWrapperTags:o,__unstableIsEditableTree:i,preserveWhiteSpace:s}={}){return"string"==typeof t&&t.length>0?{formats:Array(t.length),replacements:Array(t.length),text:t}:("string"==typeof n&&n.length>0&&(e=w(document,n)),"object"!=typeof e?{formats:[],replacements:[],text:""}:a?W({element:e,range:r,multilineTag:a,multilineWrapperTags:o,isEditableTree:i,preserveWhiteSpace:s}):D({element:e,range:r,isEditableTree:i,preserveWhiteSpace:s}))}function N(e,t,n,r){if(!n)return;const{parentNode:a}=t,{startContainer:o,startOffset:i,endContainer:s,endOffset:c}=n,l=e.text.length;void 0!==r.start?e.start=l+r.start:t===o&&t.nodeType===t.TEXT_NODE?e.start=l+i:a===o&&t===o.childNodes[i]?e.start=l:a===o&&t===o.childNodes[i-1]?e.start=l+r.text.length:t===o&&(e.start=l),void 0!==r.end?e.end=l+r.end:t===s&&t.nodeType===t.TEXT_NODE?e.end=l+c:a===s&&t===s.childNodes[c-1]?e.end=l+r.text.length:a===s&&t===s.childNodes[c]?e.end=l:t===s&&(e.end=l+c)}function A(e,t,n){if(!t)return;const{startContainer:r,endContainer:a}=t;let{startOffset:o,endOffset:i}=t;return e===r&&(o=n(e.nodeValue.slice(0,o)).length),e===a&&(i=n(e.nodeValue.slice(0,i)).length),{startContainer:r,startOffset:o,endContainer:a,endOffset:i}}function S(e){return e.replace(/[\n\r\t]+/g," ")}function O(e){return e.replace(new RegExp("[\ufeff]","gu"),"")}function D({element:e,range:t,multilineTag:n,multilineWrapperTags:r,currentWrapperTags:a=[],isEditableTree:o,preserveWhiteSpace:i}){const s={formats:[],replacements:[],text:""};if(!e)return s;if(!e.hasChildNodes())return N(s,e,t,{formats:[],replacements:[],text:""}),s;const c=e.childNodes.length;for(let l=0;l<c;l++){const c=e.childNodes[l],u=c.nodeName.toLowerCase();if(c.nodeType===c.TEXT_NODE){let e=O;i||(e=e=>O(S(e)));const n=e(c.nodeValue);N(s,c,t=A(c,t,e),{text:n}),s.formats.length+=n.length,s.replacements.length+=n.length,s.text+=n;continue}if(c.nodeType!==c.ELEMENT_NODE)continue;if(o&&(c.getAttribute("data-rich-text-placeholder")||"br"===u&&!c.getAttribute("data-rich-text-line-break"))){N(s,c,t,{formats:[],replacements:[],text:""});continue}if("script"===u){const e={formats:[,],replacements:[{type:u,attributes:{"data-rich-text-script":c.getAttribute("data-rich-text-script")||encodeURIComponent(c.innerHTML)}}],text:C};N(s,c,t,e),M(s,e);continue}if("br"===u){N(s,c,t,{formats:[],replacements:[],text:""}),M(s,R({text:"\n"}));continue}const f=L({type:u,attributes:k({element:c})});if(r&&-1!==r.indexOf(u)){const e=W({element:c,range:t,multilineTag:n,multilineWrapperTags:r,currentWrapperTags:[...a,f],isEditableTree:o,preserveWhiteSpace:i});N(s,c,t,e),M(s,e);continue}const d=D({element:c,range:t,multilineTag:n,multilineWrapperTags:r,isEditableTree:o,preserveWhiteSpace:i});if(N(s,c,t,d),f)if(0===d.text.length)f.attributes&&M(s,{formats:[,],replacements:[f],text:C});else{function e(t){if(e.formats===t)return e.newFormats;const n=t?[f,...t]:[f];return e.formats=t,e.newFormats=n,n}e.newFormats=[f],M(s,{...d,formats:Array.from(d.formats,e)})}else M(s,d)}return s}function W({element:e,range:t,multilineTag:n,multilineWrapperTags:r,currentWrapperTags:a=[],isEditableTree:o,preserveWhiteSpace:i}){const s={formats:[],replacements:[],text:""};if(!e||!e.hasChildNodes())return s;const c=e.children.length;for(let l=0;l<c;l++){const c=e.children[l];if(c.nodeName.toLowerCase()!==n)continue;const u=D({element:c,range:t,multilineTag:n,multilineWrapperTags:r,currentWrapperTags:a,isEditableTree:o,preserveWhiteSpace:i});(0!==l||a.length>0)&&M(s,{formats:[,],replacements:a.length>0?[a]:[,],text:_}),N(s,c,t,u),M(s,u)}return s}function k({element:e}){if(!e.hasAttributes())return;const t=e.attributes.length;let n;for(let r=0;r<t;r++){const{name:t,value:a}=e.attributes[r];0!==t.indexOf("data-rich-text-")&&(n=n||{},n[/^on/i.test(t)?"data-disable-rich-text-"+t:t]=a)}return n}function M(e,t){return e.formats=e.formats.concat(t.formats),e.replacements=e.replacements.concat(t.replacements),e.text+=t.text,e}function $(...e){return T(e.reduce(M,R()))}function j({formats:e,start:t,end:n,activeFormats:r},a=[]){if(void 0===t)return a;if(t===n){if(r)return r;const n=e[t-1]||a,o=e[t]||a;return n.length<o.length?n:o}return e[t]||a}function I(e,t){return(0,s.find)(j(e),{type:t})}function P({start:e,end:t,replacements:n,text:r}){if(e+1===t&&r[e]===C)return n[e]}function V({text:e}){return e.replace(new RegExp(C,"g"),"").replace(new RegExp(_,"g"),"\n")}function K({start:e,text:t},n=e){let r=n;for(;r--;)if(t[r]===_)return r}function H(e){const{replacements:t,start:n}=e,r=t[K(e,n)];return!r||r.length<1}function B(e,t,n){const{replacements:r,start:a}=e,o=r[K(e,a)];return o&&0!==o.length?o[o.length-1].type===t:t===n}function z({start:e,end:t}){if(void 0!==e&&void 0!==t)return e===t}function U({text:e}){return 0===e.length}function q({text:e,start:t,end:n}){return t===n&&(0===e.length||0===t&&e.slice(0,1)===_||t===e.length&&e.slice(-1)===_||e.slice(t-1,n+1)===`${_}${_}`)}function X(e,t=""){return"string"==typeof t&&(t=R({text:t})),T(e.reduce(((e,{formats:n,replacements:r,text:a})=>({formats:e.formats.concat(t.formats,n),replacements:e.replacements.concat(t.replacements,r),text:e.text+t.text+a}))))}function Y(e,t){if("string"==typeof(t={name:e,...t}).name)if(/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(t.name))if((0,i.select)(y).getFormatType(t.name))window.console.error('Format "'+t.name+'" is already registered.');else if("string"==typeof t.tagName&&""!==t.tagName)if("string"==typeof t.className&&""!==t.className||null===t.className)if(/^[_a-zA-Z]+[a-zA-Z0-9-]*$/.test(t.className)){if(null===t.className){const e=(0,i.select)(y).getFormatTypeForBareElement(t.tagName);if(e)return void window.console.error(`Format "${e.name}" is already registered to handle bare tag name "${t.tagName}".`)}else{const e=(0,i.select)(y).getFormatTypeForClassName(t.className);if(e)return void window.console.error(`Format "${e.name}" is already registered to handle class name "${t.className}".`)}if("title"in t&&""!==t.title)if("keywords"in t&&t.keywords.length>3)window.console.error('The format "'+t.name+'" can have a maximum of 3 keywords.');else{if("string"==typeof t.title)return(0,i.dispatch)(y).addFormatTypes(t),t;window.console.error("Format titles must be strings.")}else window.console.error('The format "'+t.name+'" must have a title.')}else window.console.error("A class name must begin with a letter, followed by any number of hyphens, letters, or numbers.");else window.console.error("Format class names must be a string, or null to handle bare elements.");else window.console.error("Format tag names must be a string.");else window.console.error("Format names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-format");else window.console.error("Format names must be strings.")}function G(e,t,n=e.start,r=e.end){const{formats:a,activeFormats:o}=e,i=a.slice();if(n===r){const e=(0,s.find)(i[n],{type:t});if(e){for(;(0,s.find)(i[n],e);)Z(i,n,t),n--;for(r++;(0,s.find)(i[r],e);)Z(i,r,t),r++}}else for(let e=n;e<r;e++)i[e]&&Z(i,e,t);return T({...e,formats:i,activeFormats:(0,s.reject)(o,{type:t})})}function Z(e,t,n){const r=e[t].filter((({type:e})=>e!==n));r.length?e[t]=r:delete e[t]}function J(e,t,n=e.start,r=e.end){const{formats:a,replacements:o,text:i}=e;"string"==typeof t&&(t=R({text:t}));const s=n+t.text.length;return T({formats:a.slice(0,n).concat(t.formats,a.slice(r)),replacements:o.slice(0,n).concat(t.replacements,o.slice(r)),text:i.slice(0,n)+t.text+i.slice(r),start:s,end:s})}function Q(e,t,n){return J(e,R(),t,n)}function ee({formats:e,replacements:t,text:n,start:r,end:a},o,i){return n=n.replace(o,((n,...o)=>{const s=o[o.length-2];let c,l,u=i;return"function"==typeof u&&(u=i(n,...o)),"object"==typeof u?(c=u.formats,l=u.replacements,u=u.text):(c=Array(u.length),l=Array(u.length),e[s]&&(c=c.fill(e[s]))),e=e.slice(0,s).concat(c,e.slice(s+n.length)),t=t.slice(0,s).concat(l,t.slice(s+n.length)),r&&(r=a=s+u.length),u})),T({formats:e,replacements:t,text:n,start:r,end:a})}function te(e,t=e.start,n=e.end){const r=e.text.slice(0,t).lastIndexOf(_),a=e.replacements[r];let o=[,];return a&&(o=[a]),J(e,{formats:[,],replacements:o,text:_},t,n)}function ne(e,t=!0){const{replacements:n,text:r,start:a,end:o}=e,i=z(e);let s,c=a-1,l=i?a-1:a,u=o;if(t||(c=o,l=a,u=i?o+1:o),r[c]===_){if(i&&n[c]&&n[c].length){const t=n.slice();t[c]=n[c].slice(0,-1),s={...e,replacements:t}}else s=Q(e,l,u);return s}}function re(e,t,n,r){return J(e,{formats:[,],replacements:[t],text:C},n,r)}function ae(e,t=e.start,n=e.end){const{formats:r,replacements:a,text:o}=e;return void 0===t||void 0===n?{...e}:{formats:r.slice(t,n),replacements:a.slice(t,n),text:o.slice(t,n)}}function oe({formats:e,replacements:t,text:n,start:r,end:a},o){if("string"!=typeof o)return ie(...arguments);let i=0;return n.split(o).map((n=>{const s=i,c={formats:e.slice(s,s+n.length),replacements:t.slice(s,s+n.length),text:n};return i+=o.length+n.length,void 0!==r&&void 0!==a&&(r>=s&&r<i?c.start=r-s:r<s&&a>s&&(c.start=0),a>=s&&a<i?c.end=a-s:r<i&&a>i&&(c.end=n.length)),c}))}function ie({formats:e,replacements:t,text:n,start:r,end:a},o=r,i=a){if(void 0===r||void 0===a)return;const s={formats:e.slice(0,o),replacements:t.slice(0,o),text:n.slice(0,o)},c={formats:e.slice(i),replacements:t.slice(i),text:n.slice(i),start:0,end:0};return[ee(s,/\u2028+$/,""),ee(c,/^\u2028+/,"")]}function se(e,t){if(t)return e;const n={};for(const t in e){let r=t;t.startsWith("data-disable-rich-text-")&&(r=t.slice("data-disable-rich-text-".length)),n[r]=e[t]}return n}function ce({type:e,attributes:t,unregisteredAttributes:n,object:r,boundaryClass:a,isEditableTree:o}){const s=(c=e,(0,i.select)(y).getFormatType(c));var c;let l={};if(a&&(l["data-rich-text-format-boundary"]="true"),!s)return t&&(l={...t,...l}),{type:e,attributes:se(l,o),object:r};l={...n,...l};for(const e in t){const n=!!s.attributes&&s.attributes[e];n?l[n]=t[e]:l[e]=t[e]}return s.className&&(l.class?l.class=`${s.className} ${l.class}`:l.class=s.className),{type:s.tagName,object:s.object,attributes:se(l,o)}}function le(e,t,n){do{if(e[n]!==t[n])return!1}while(n--);return!0}function ue({value:e,multilineTag:t,preserveWhiteSpace:n,createEmpty:r,append:a,getLastChild:o,getParent:i,isText:s,getText:c,remove:l,appendText:u,onStartIndex:f,onEndIndex:d,isEditableTree:m,placeholder:p}){const{formats:g,replacements:h,text:v,start:y,end:b}=e,T=g.length+1,E=r(),x={type:t},w=j(e),F=w[w.length-1];let L,R,N;t?(a(a(E,{type:t}),""),R=L=[x]):a(E,"");for(let e=0;e<T;e++){const r=v.charAt(e),T=m&&(!N||N===_||"\n"===N);let w=g[e];t&&(w=r===_?L=(h[e]||[]).reduce(((e,t)=>(e.push(t,x),e)),[x]):[...L,...w||[]]);let S=o(E);if(T&&r===_){let e=S;for(;!s(e);)e=o(e);a(i(e),"\ufeff")}if(N===_){let t=S;for(;!s(t);)t=o(t);f&&y===e&&f(E,t),d&&b===e&&d(E,t)}var A;if(w&&w.forEach(((e,t)=>{if(S&&R&&le(w,R,t)&&(r!==_||w.length-1!==t))return void(S=o(S));const{type:n,attributes:u,unregisteredAttributes:f}=e,d=m&&r!==_&&e===F,p=i(S),g=a(p,ce({type:n,attributes:u,unregisteredAttributes:f,boundaryClass:d,isEditableTree:m}));s(S)&&0===c(S).length&&l(S),S=a(g,"")})),r!==_)0===e&&(f&&0===y&&f(E,S),d&&0===b&&d(E,S)),r===C?(m||"script"!==(null===(A=h[e])||void 0===A?void 0:A.type)?S=a(i(S),ce({...h[e],object:!0,isEditableTree:m})):(S=a(i(S),ce({type:"script",isEditableTree:m})),a(S,{html:decodeURIComponent(h[e].attributes["data-rich-text-script"])})),S=a(i(S),"")):n||"\n"!==r?s(S)?u(S,r):S=a(i(S),r):(S=a(i(S),{type:"br",attributes:m?{"data-rich-text-line-break":"true"}:void 0,object:!0}),S=a(i(S),"")),f&&y===e+1&&f(E,S),d&&b===e+1&&d(E,S),T&&e===v.length&&(a(i(S),"\ufeff"),p&&0===v.length&&a(i(S),{type:"span",attributes:{"data-rich-text-placeholder":p,contenteditable:"false",style:"pointer-events:none;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;"}})),R=w,N=r;else R=w,N=r}return E}function fe(e,t,n){const r=e.parentNode;let a=0;for(;e=e.previousSibling;)a++;return n=[a,...n],r!==t&&(n=fe(r,t,n)),n}function de(e,t){for(t=[...t];e&&t.length>1;)e=e.childNodes[t.shift()];return{node:e,offset:t[0]}}function me(e,t){"string"==typeof t&&(t=e.ownerDocument.createTextNode(t));const{type:n,attributes:r}=t;if(n){t=e.ownerDocument.createElement(n);for(const e in r)t.setAttribute(e,r[e])}return e.appendChild(t)}function pe(e,t){e.appendData(t)}function ge({lastChild:e}){return e}function he({parentNode:e}){return e}function ve(e){return e.nodeType===e.TEXT_NODE}function ye({nodeValue:e}){return e}function be(e){return e.parentNode.removeChild(e)}function Te({value:e,multilineTag:t,prepareEditableTree:n,isEditableTree:r=!0,placeholder:a,doc:o=document}){let i=[],s=[];return n&&(e={...e,formats:n(e)}),{body:ue({value:e,multilineTag:t,createEmpty:()=>w(o,""),append:me,getLastChild:ge,getParent:he,isText:ve,getText:ye,remove:be,appendText:pe,onStartIndex(e,t){i=fe(t,e,[t.nodeValue.length])},onEndIndex(e,t){s=fe(t,e,[t.nodeValue.length])},isEditableTree:r,placeholder:a}),selection:{startPath:i,endPath:s}}}function Ee({value:e,current:t,multilineTag:n,prepareEditableTree:r,__unstableDomOnly:a,placeholder:o}){const{body:i,selection:s}=Te({value:e,multilineTag:n,prepareEditableTree:r,placeholder:o,doc:t.ownerDocument});xe(i,t),void 0===e.start||a||function({startPath:e,endPath:t},n){const{node:r,offset:a}=de(n,e),{node:o,offset:i}=de(n,t),{ownerDocument:s}=n,{defaultView:c}=s,l=c.getSelection(),u=s.createRange();u.setStart(r,a),u.setEnd(o,i);const{activeElement:f}=s;if(l.rangeCount>0){if(d=u,m=l.getRangeAt(0),d.startContainer===m.startContainer&&d.startOffset===m.startOffset&&d.endContainer===m.endContainer&&d.endOffset===m.endOffset)return;l.removeAllRanges()}var d,m;l.addRange(u),f!==s.activeElement&&f instanceof c.HTMLElement&&f.focus()}(s,t)}function xe(e,t){let n,r=0;for(;n=e.firstChild;){const a=t.childNodes[r];if(a)if(a.isEqualNode(n))e.removeChild(n);else if(a.nodeName!==n.nodeName||a.nodeType===a.TEXT_NODE&&a.data!==n.data)t.replaceChild(n,a);else{const t=a.attributes,r=n.attributes;if(t){let e=t.length;for(;e--;){const{name:r}=t[e];n.getAttribute(r)||a.removeAttribute(r)}}if(r)for(let e=0;e<r.length;e++){const{name:t,value:n}=r[e];a.getAttribute(t)!==n&&a.setAttribute(t,n)}xe(n,a),e.removeChild(n)}else t.appendChild(n);r++}for(;t.childNodes[r];)t.removeChild(t.childNodes[r])}var we=window.wp.escapeHtml;function _e({value:e,multilineTag:t,preserveWhiteSpace:n}){return De(ue({value:e,multilineTag:t,preserveWhiteSpace:n,createEmpty:Ce,append:Le,getLastChild:Fe,getParent:Ne,isText:Ae,getText:Se,remove:Oe,appendText:Re}).children)}function Ce(){return{}}function Fe({children:e}){return e&&e[e.length-1]}function Le(e,t){return"string"==typeof t&&(t={text:t}),t.parent=e,e.children=e.children||[],e.children.push(t),t}function Re(e,t){e.text+=t}function Ne({parent:e}){return e}function Ae({text:e}){return"string"==typeof e}function Se({text:e}){return e}function Oe(e){const t=e.parent.children.indexOf(e);return-1!==t&&e.parent.children.splice(t,1),e}function De(e=[]){return e.map((e=>void 0!==e.html?e.html:void 0===e.text?function({type:e,attributes:t,object:n,children:r}){let a="";for(const e in t)(0,we.isValidAttributeName)(e)&&(a+=` ${e}="${(0,we.escapeAttribute)(t[e])}"`);return n?`<${e}${a}>`:`<${e}${a}>${De(r)}</${e}>`}(e):(0,we.escapeEditableHTML)(e.text))).join("")}function We(e,t){return I(e,t.type)?G(e,t.type):x(e,t)}function ke(e){const t=(0,i.select)(y).getFormatType(e);if(t)return(0,i.dispatch)(y).removeFormatTypes(e),t;window.console.error(`Format ${e} is not registered.`)}function Me(e){const t=K(e);if(void 0===t)return!1;const{replacements:n}=e,r=K(e,t),a=n[t]||[],o=n[r]||[];return a.length<=o.length}function $e(e){const{replacements:t,start:n}=e;return void 0!==t[K(e,n)]}function je(e,t){if(!Me(e))return e;const n=K(e),r=K(e,n),{text:a,replacements:o,end:i}=e,s=o.slice(),c=function({text:e,replacements:t},n){const r=t[n]||[];let a=n;for(;a-- >=0;){if(e[a]!==_)continue;const n=t[a]||[];if(n.length===r.length+1)return a;if(n.length<=r.length)return}}(e,n);for(let e=n;e<i;e++)if(a[e]===_)if(c){const t=o[c]||[];s[e]=t.concat((s[e]||[]).slice(t.length-1))}else{const n=o[r]||[],a=n[n.length-1]||t;s[e]=n.concat([a],(s[e]||[]).slice(n.length))}return{...e,replacements:s}}function Ie({text:e,replacements:t},n){const r=t[n]||[];let a=n;for(;a-- >=0;)if(e[a]===_&&(t[a]||[]).length===r.length-1)return a}function Pe(e){if(!$e(e))return e;const{text:t,replacements:n,start:r,end:a}=e,o=K(e,r),i=n.slice(0),s=n[Ie(e,o)]||[],c=function({text:e,replacements:t},n){const r=t[n]||[];let a=n;for(let o=n||0;o<e.length;o++)if(e[o]===_){if(!((t[o]||[]).length>=r.length))return a;a=o}return a}(e,K(e,a));for(let e=o;e<=c;e++){if(t[e]!==_)continue;const n=i[e]||[];i[e]=s.concat(n.slice(s.length+1)),0===i[e].length&&delete i[e]}return{...e,replacements:i}}function Ve(e,t){const{text:n,replacements:r,start:a,end:o}=e,i=K(e,a),s=r[i]||[],c=r[K(e,o)]||[],l=Ie(e,i),u=r.slice(),f=s.length-1,d=c.length-1;let m;for(let e=l+1||0;e<n.length;e++)if(n[e]===_){if((u[e]||[]).length<=f)break;u[e]&&(m=!0,u[e]=u[e].map(((e,n)=>n<f||n>d?e:t)))}return m?{...e,replacements:u}:e}var Ke=window.wp.element;function He({ref:e,value:t,settings:n={}}){const{tagName:r,className:a,name:o}=n,i=o?I(t,o):void 0;return(0,Ke.useMemo)((()=>{if(!e.current)return;const{ownerDocument:{defaultView:t}}=e.current,n=t.getSelection();if(!n.rangeCount)return;const o=n.getRangeAt(0);if(!i)return o;let s=o.startContainer;for(s=s.nextElementSibling||s;s.nodeType!==s.ELEMENT_NODE;)s=s.parentNode;return s.closest(r+(a?"."+a:""))}),[i,t.start,t.end,r,a])}var Be=window.wp.compose;function ze({record:e}){const t=(0,Ke.useRef)(),{activeFormats:n=[]}=e.current;return(0,Ke.useEffect)((()=>{if(!n||!n.length)return;const e="*[data-rich-text-format-boundary]",r=t.current.querySelector(e);if(!r)return;const{ownerDocument:a}=r,{defaultView:o}=a,i=`.rich-text:focus ${e} {background-color: ${o.getComputedStyle(r).color.replace(")",", 0.2)").replace("rgb","rgba")}}`,s="rich-text-boundary-style";let c=a.getElementById(s);c||(c=a.createElement("style"),c.id=s,a.head.appendChild(c)),c.innerHTML!==i&&(c.innerHTML=i)}),[n]),t}function Ue(e){const t=(0,Ke.useRef)(e);return t.current=e,(0,Be.useRefEffect)((e=>{function n(n){const{record:r,multilineTag:a,preserveWhiteSpace:o}=t.current;if(z(r.current)||!e.contains(e.ownerDocument.activeElement))return;const i=ae(r.current),s=V(i),c=_e({value:i,multilineTag:a,preserveWhiteSpace:o});n.clipboardData.setData("text/plain",s),n.clipboardData.setData("text/html",c),n.clipboardData.setData("rich-text","true"),n.clipboardData.setData("rich-text-multi-line-tag",a||""),n.preventDefault()}return e.addEventListener("copy",n),()=>{e.removeEventListener("copy",n)}}),[])}var qe=window.wp.keycodes;const Xe=[];function Ye(e){const[,t]=(0,Ke.useReducer)((()=>({}))),n=(0,Ke.useRef)(e);return n.current=e,(0,Be.useRefEffect)((e=>{function r(r){const{keyCode:a,shiftKey:o,altKey:i,metaKey:s,ctrlKey:c}=r;if(o||i||s||c||a!==qe.LEFT&&a!==qe.RIGHT)return;const{record:l,applyRecord:u}=n.current,{text:f,formats:d,start:m,end:p,activeFormats:g=[]}=l.current,h=z(l.current),{ownerDocument:v}=e,{defaultView:y}=v,{direction:b}=y.getComputedStyle(e),T="rtl"===b?qe.RIGHT:qe.LEFT,E=r.keyCode===T;if(h&&0===g.length){if(0===m&&E)return;if(p===f.length&&!E)return}if(!h)return;const x=d[m-1]||Xe,w=d[m]||Xe,_=E?x:w,C=g.every(((e,t)=>e===_[t]));let F=g.length;if(C?F<_.length&&F++:F--,F===g.length)return void(l.current._newActiveFormats=_);r.preventDefault();const L=(C?_:E?w:x).slice(0,F),R={...l.current,activeFormats:L};l.current=R,u(R),t()}return e.addEventListener("keydown",r),()=>{e.removeEventListener("keydown",r)}}),[])}function Ge(e){const t=(0,Ke.useRef)(e);return t.current=e,(0,Be.useRefEffect)((e=>{function n(n){const{keyCode:r,shiftKey:a,altKey:o,metaKey:i,ctrlKey:s}=n,{multilineTag:c,createRecord:l,handleChange:u}=t.current;if(a||o||i||s||r!==qe.SPACE||"li"!==c)return;const f=l();if(!z(f))return;const{text:d,start:m}=f,p=d[m-1];p&&p!==_||(u(je(f,{type:e.tagName.toLowerCase()})),n.preventDefault())}return e.addEventListener("keydown",n),()=>{e.removeEventListener("keydown",n)}}),[])}const Ze=new Set(["insertParagraph","insertOrderedList","insertUnorderedList","insertHorizontalRule","insertLink"]),Je=[];function Qe(e){const t=(0,Ke.useRef)(e);return t.current=e,(0,Be.useRefEffect)((e=>{const{ownerDocument:n}=e,{defaultView:r}=n;let a,o=!1;function i(e){if(o)return;let n;e&&(n=e.inputType);const{record:r,applyRecord:a,createRecord:i,handleChange:s}=t.current;if(n&&(0===n.indexOf("format")||Ze.has(n)))return void a(r.current);const c=i(),{start:l,activeFormats:u=[]}=r.current;s(function({value:e,start:t,end:n,formats:r}){const a=Math.min(t,n),o=Math.max(t,n),i=e.formats[a-1]||[],s=e.formats[o]||[];for(e.activeFormats=r.map(((e,t)=>{if(i[t]){if(b(e,i[t]))return i[t]}else if(s[t]&&b(e,s[t]))return s[t];return e}));--n>=t;)e.activeFormats.length>0?e.formats[n]=e.activeFormats:delete e.formats[n];return e}({value:c,start:l,end:c.start,formats:u}))}function s(a){if(n.activeElement!==e)return;const{record:s,applyRecord:c,createRecord:l,isSelected:u,onSelectionChange:f}=t.current;if("selectionchange"!==a.type&&!u)return;if("true"!==e.contentEditable)return;if(o)return;const{start:d,end:m,text:p}=l(),g=s.current;if(p!==g.text)return void i();if(d===g.start&&m===g.end)return void(0===g.text.length&&0===d&&function(e){const t=e.getSelection(),{anchorNode:n,anchorOffset:r}=t;if(n.nodeType!==n.ELEMENT_NODE)return;const a=n.childNodes[r];a&&a.nodeType===a.ELEMENT_NODE&&a.getAttribute("data-rich-text-placeholder")&&t.collapseToStart()}(r));const h={...g,start:d,end:m,activeFormats:g._newActiveFormats,_newActiveFormats:void 0},v=j(h,Je);h.activeFormats=v,s.current=h,c(h,{domOnly:!0}),f(d,m)}function c(){o=!0,n.removeEventListener("selectionchange",s)}function l(){o=!1,i({inputType:"insertText"}),n.addEventListener("selectionchange",s)}function u(){const{record:e,isSelected:o,onSelectionChange:i,applyRecord:c}=t.current;if(o)c(e.current),i(e.current.start,e.current.end);else{const t=void 0;e.current={...e.current,start:t,end:t,activeFormats:Je},i(t,t)}a=r.requestAnimationFrame(s),n.addEventListener("selectionchange",s)}function f(){n.removeEventListener("selectionchange",s)}return e.addEventListener("input",i),e.addEventListener("compositionstart",c),e.addEventListener("compositionend",l),e.addEventListener("focus",u),e.addEventListener("blur",f),e.addEventListener("keyup",s),e.addEventListener("mouseup",s),e.addEventListener("touchend",s),()=>{e.removeEventListener("input",i),e.removeEventListener("compositionstart",c),e.removeEventListener("compositionend",l),e.removeEventListener("focus",u),e.removeEventListener("blur",f),e.removeEventListener("keyup",s),e.removeEventListener("mouseup",s),e.removeEventListener("touchend",s),n.removeEventListener("selectionchange",s),r.cancelAnimationFrame(a)}}),[])}function et(e){const t=(0,Ke.useRef)(e);return t.current=e,(0,Be.useRefEffect)((e=>{function n(e){const{keyCode:n}=e,{createRecord:r,handleChange:a,multilineTag:o}=t.current;if(e.defaultPrevented)return;if(n!==qe.DELETE&&n!==qe.BACKSPACE)return;const i=r(),{start:s,end:c,text:l}=i,u=n===qe.BACKSPACE;if(0===s&&0!==c&&c===l.length)return a(Q(i)),void e.preventDefault();if(o){let t;t=u&&0===i.start&&0===i.end&&q(i)?ne(i,!u):ne(i,u),t&&(a(t),e.preventDefault())}}return e.addEventListener("keydown",n),()=>{e.removeEventListener("keydown",n)}}),[])}function tt({value:e="",selectionStart:t,selectionEnd:n,placeholder:r,preserveWhiteSpace:a,onSelectionChange:o,onChange:s,__unstableMultilineTag:c,__unstableDisableFormats:l,__unstableIsSelected:u,__unstableDependencies:f=[],__unstableAfterParse:d,__unstableBeforeSerialize:m,__unstableAddInvisibleFormats:p}){const g=(0,i.useRegistry)(),[,h]=(0,Ke.useReducer)((()=>({}))),v=(0,Ke.useRef)();function y(){const{ownerDocument:{defaultView:e}}=v.current,t=e.getSelection(),n=t.rangeCount>0?t.getRangeAt(0):null;return R({element:v.current,range:n,multilineTag:c,multilineWrapperTags:"li"===c?["ul","ol"]:void 0,__unstableIsEditableTree:!0,preserveWhiteSpace:a})}function b(e,{domOnly:t}={}){Ee({value:e,current:v.current,multilineTag:c,multilineWrapperTags:"li"===c?["ul","ol"]:void 0,prepareEditableTree:p,__unstableDomOnly:t,placeholder:r})}const T=(0,Ke.useRef)(e),E=(0,Ke.useRef)();function x(){T.current=e,E.current=R({html:e,multilineTag:c,multilineWrapperTags:"li"===c?["ul","ol"]:void 0,preserveWhiteSpace:a}),l&&(E.current.formats=Array(e.length),E.current.replacements=Array(e.length)),d&&(E.current.formats=d(E.current)),E.current.start=t,E.current.end=n}const w=(0,Ke.useRef)(!1);function _(e){E.current=e,b(e),T.current=l?e.text:_e({value:m?{...e,formats:m(e)}:e,multilineTag:c,preserveWhiteSpace:a});const{start:t,end:n,formats:r,text:i}=e;g.batch((()=>{o(t,n),s(T.current,{__unstableFormats:r,__unstableText:i})})),h()}function C(){x(),b(E.current)}E.current?t===E.current.start&&n===E.current.end||(w.current=u,E.current={...E.current,start:t,end:n}):x();const F=(0,Ke.useRef)(!1);(0,Ke.useLayoutEffect)((()=>{F.current&&e!==T.current&&C()}),[e]),(0,Ke.useLayoutEffect)((()=>{w.current&&(C(),w.current=!1)}),[w.current]);const L=(0,Be.useMergeRefs)([v,(0,Ke.useCallback)((e=>{e&&(e.style.whiteSpace="pre-wrap",e.style.minWidth="1px")}),[]),ze({record:E}),Ue({record:E,multilineTag:c,preserveWhiteSpace:a}),(0,Be.useRefEffect)((e=>{function t(t){const{target:n}=t;if(n===e||n.textContent)return;const{ownerDocument:r}=n,{defaultView:a}=r,o=r.createRange(),i=a.getSelection();o.selectNode(n),i.removeAllRanges(),i.addRange(o)}return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}),[]),Ye({record:E,applyRecord:b}),et({createRecord:y,handleChange:_,multilineTag:c}),Ge({multilineTag:c,createRecord:y,handleChange:_}),Qe({record:E,applyRecord:b,createRecord:y,handleChange:_,isSelected:u,onSelectionChange:o}),(0,Be.useRefEffect)((e=>{function t(e){if(e.defaultPrevented)return;const{keyCode:t,altKey:n,metaKey:r,ctrlKey:a}=e;t!==qe.SPACE||n||r||a||(e.target.ownerDocument.execCommand("insertText",!1," "),e.preventDefault())}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}),[]),(0,Be.useRefEffect)((()=>{C(),F.current=!0}),[r,...f])]);return{value:E.current,onChange:_,ref:L}}function nt(){}function rt({formatTypes:e,onChange:t,onFocus:n,value:r,forwardedRef:a}){return e.map((e=>{const{name:o,edit:i}=e;if(!i)return null;const s=I(r,o),c=void 0!==s,l=P(r),u=void 0!==l&&l.type===o;return(0,Ke.createElement)(i,{key:o,isActive:c,activeAttributes:c&&s.attributes||{},isObjectActive:u,activeObjectAttributes:u&&l.attributes||{},value:r,onChange:t,onFocus:n,contentRef:a})}))}(window.wp=window.wp||{}).richText=t}();
1
+ !function(){"use strict";var e={d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{__UNSTABLE_LINE_SEPARATOR:function(){return _},__experimentalRichText:function(){return tt},__unstableCanIndentListItems:function(){return ke},__unstableCanOutdentListItems:function(){return Me},__unstableChangeListType:function(){return Pe},__unstableCreateElement:function(){return w},__unstableFormatEdit:function(){return nt},__unstableIndentListItems:function(){return $e},__unstableInsertLineSeparator:function(){return ee},__unstableIsActiveListType:function(){return H},__unstableIsEmptyLine:function(){return U},__unstableIsListRootSelected:function(){return K},__unstableOutdentListItems:function(){return Ie},__unstableRemoveLineSeparator:function(){return te},__unstableToDom:function(){return be},__unstableUseRichText:function(){return et},applyFormat:function(){return x},concat:function(){return M},create:function(){return L},getActiveFormat:function(){return j},getActiveObject:function(){return I},getTextContent:function(){return P},insert:function(){return Z},insertObject:function(){return ne},isCollapsed:function(){return B},isEmpty:function(){return z},join:function(){return q},registerFormatType:function(){return X},remove:function(){return J},removeFormat:function(){return Y},replace:function(){return Q},slice:function(){return re},split:function(){return ae},store:function(){return y},toHTMLString:function(){return we},toggleFormat:function(){return De},unregisterFormatType:function(){return We},useAnchorRef:function(){return Ke}});var n={};e.r(n),e.d(n,{getFormatType:function(){return m},getFormatTypeForBareElement:function(){return p},getFormatTypeForClassName:function(){return g},getFormatTypes:function(){return d}});var r={};e.r(r),e.d(r,{addFormatTypes:function(){return h},removeFormatTypes:function(){return v}});var a,o,i=window.wp.data,s=window.lodash,c=(0,i.combineReducers)({formatTypes:function(e={},t){switch(t.type){case"ADD_FORMAT_TYPES":return{...e,...(0,s.keyBy)(t.formatTypes,"name")};case"REMOVE_FORMAT_TYPES":return(0,s.omit)(e,t.names)}return e}});function l(e){return[e]}function u(){var e={clear:function(){e.head=null}};return e}function f(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}a={},o="undefined"!=typeof WeakMap;const d=function(e,t){var n,r;function i(){n=o?new WeakMap:u()}function s(){var n,a,o,i,s,c=arguments.length;for(i=new Array(c),o=0;o<c;o++)i[o]=arguments[o];for(s=t.apply(null,i),(n=r(s)).isUniqueByDependants||(n.lastDependants&&!f(s,n.lastDependants,0)&&n.clear(),n.lastDependants=s),a=n.head;a;){if(f(a.args,i,1))return a!==n.head&&(a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=n.head,a.prev=null,n.head.prev=a,n.head=a),a.val;a=a.next}return a={val:e.apply(null,i)},i[0]=null,a.args=i,n.head&&(n.head.prev=a,a.next=n.head),n.head=a,a.val}return t||(t=l),r=o?function(e){var t,r,o,i,s,c=n,l=!0;for(t=0;t<e.length;t++){if(!(s=r=e[t])||"object"!=typeof s){l=!1;break}c.has(r)?c=c.get(r):(o=new WeakMap,c.set(r,o),c=o)}return c.has(a)||((i=u()).isUniqueByDependants=l,c.set(a,i)),c.get(a)}:function(){return n},s.getDependants=t,s.clear=i,i(),s}((e=>Object.values(e.formatTypes)),(e=>[e.formatTypes]));function m(e,t){return e.formatTypes[t]}function p(e,t){return(0,s.find)(d(e),(({className:e,tagName:n})=>null===e&&t===n))}function g(e,t){return(0,s.find)(d(e),(({className:e})=>null!==e&&` ${t} `.indexOf(` ${e} `)>=0))}function h(e){return{type:"ADD_FORMAT_TYPES",formatTypes:(0,s.castArray)(e)}}function v(e){return{type:"REMOVE_FORMAT_TYPES",names:(0,s.castArray)(e)}}const y=(0,i.createReduxStore)("core/rich-text",{reducer:c,selectors:n,actions:r});function b(e,t){if(e===t)return!0;if(!e||!t)return!1;if(e.type!==t.type)return!1;const n=e.attributes,r=t.attributes;if(n===r)return!0;if(!n||!r)return!1;const a=Object.keys(n),o=Object.keys(r);if(a.length!==o.length)return!1;const i=a.length;for(let e=0;e<i;e++){const t=a[e];if(n[t]!==r[t])return!1}return!0}function T(e){const t=e.formats.slice();return t.forEach(((e,n)=>{const r=t[n-1];if(r){const a=e.slice();a.forEach(((e,t)=>{const n=r[t];b(e,n)&&(a[t]=n)})),t[n]=a}})),{...e,formats:t}}function E(e,t,n){return(e=e.slice())[t]=n,e}function x(e,t,n=e.start,r=e.end){const{formats:a,activeFormats:o}=e,i=a.slice();if(n===r){const e=(0,s.find)(i[n],{type:t.type});if(e){const a=i[n].indexOf(e);for(;i[n]&&i[n][a]===e;)i[n]=E(i[n],a,t),n--;for(r++;i[r]&&i[r][a]===e;)i[r]=E(i[r],a,t),r++}}else{let e=1/0;for(let a=n;a<r;a++)if(i[a]){i[a]=i[a].filter((({type:e})=>e!==t.type));const n=i[a].length;n<e&&(e=n)}else i[a]=[],e=0;for(let a=n;a<r;a++)i[a].splice(e,0,t)}return T({...e,formats:i,activeFormats:[...(0,s.reject)(o,{type:t.type}),t]})}function w({implementation:e},t){return w.body||(w.body=e.createHTMLDocument("").body),w.body.innerHTML=t,w.body}(0,i.register)(y);const _="\u2028",C="";function F({type:e,attributes:t}){let n;if(t&&t.class&&(n=(0,i.select)(y).getFormatTypeForClassName(t.class),n&&(t.class=` ${t.class} `.replace(` ${n.className} `," ").trim(),t.class||delete t.class)),n||(n=(0,i.select)(y).getFormatTypeForBareElement(e)),!n)return t?{type:e,attributes:t}:{type:e};if(n.__experimentalCreatePrepareEditableTree&&!n.__experimentalCreateOnChangeEditableValue)return null;if(!t)return{type:n.name};const r={},a={},o={...t};for(const e in n.attributes){const t=n.attributes[e];r[e]=o[t],n.__unstableFilterAttributeValue&&(r[e]=n.__unstableFilterAttributeValue(e,r[e])),delete o[t],void 0===r[e]&&delete r[e]}for(const e in o)a[e]=t[e];return{type:n.name,attributes:r,unregisteredAttributes:a}}function L({element:e,text:t,html:n,range:r,multilineTag:a,multilineWrapperTags:o,__unstableIsEditableTree:i,preserveWhiteSpace:s}={}){return"string"==typeof t&&t.length>0?{formats:Array(t.length),replacements:Array(t.length),text:t}:("string"==typeof n&&n.length>0&&(e=w(document,n)),"object"!=typeof e?{formats:[],replacements:[],text:""}:a?D({element:e,range:r,multilineTag:a,multilineWrapperTags:o,isEditableTree:i,preserveWhiteSpace:s}):O({element:e,range:r,isEditableTree:i,preserveWhiteSpace:s}))}function R(e,t,n,r){if(!n)return;const{parentNode:a}=t,{startContainer:o,startOffset:i,endContainer:s,endOffset:c}=n,l=e.text.length;void 0!==r.start?e.start=l+r.start:t===o&&t.nodeType===t.TEXT_NODE?e.start=l+i:a===o&&t===o.childNodes[i]?e.start=l:a===o&&t===o.childNodes[i-1]?e.start=l+r.text.length:t===o&&(e.start=l),void 0!==r.end?e.end=l+r.end:t===s&&t.nodeType===t.TEXT_NODE?e.end=l+c:a===s&&t===s.childNodes[c-1]?e.end=l+r.text.length:a===s&&t===s.childNodes[c]?e.end=l:t===s&&(e.end=l+c)}function A(e,t,n){if(!t)return;const{startContainer:r,endContainer:a}=t;let{startOffset:o,endOffset:i}=t;return e===r&&(o=n(e.nodeValue.slice(0,o)).length),e===a&&(i=n(e.nodeValue.slice(0,i)).length),{startContainer:r,startOffset:o,endContainer:a,endOffset:i}}function N(e){return e.replace(/[\n\r\t]+/g," ")}function S(e){return e.replace(new RegExp("[\ufeff]","gu"),"")}function O({element:e,range:t,multilineTag:n,multilineWrapperTags:r,currentWrapperTags:a=[],isEditableTree:o,preserveWhiteSpace:i}){const s={formats:[],replacements:[],text:""};if(!e)return s;if(!e.hasChildNodes())return R(s,e,t,{formats:[],replacements:[],text:""}),s;const c=e.childNodes.length;for(let l=0;l<c;l++){const c=e.childNodes[l],u=c.nodeName.toLowerCase();if(c.nodeType===c.TEXT_NODE){let e=S;i||(e=e=>S(N(e)));const n=e(c.nodeValue);R(s,c,t=A(c,t,e),{text:n}),s.formats.length+=n.length,s.replacements.length+=n.length,s.text+=n;continue}if(c.nodeType!==c.ELEMENT_NODE)continue;if(o&&(c.getAttribute("data-rich-text-placeholder")||"br"===u&&!c.getAttribute("data-rich-text-line-break"))){R(s,c,t,{formats:[],replacements:[],text:""});continue}if("script"===u){const e={formats:[,],replacements:[{type:u,attributes:{"data-rich-text-script":c.getAttribute("data-rich-text-script")||encodeURIComponent(c.innerHTML)}}],text:C};R(s,c,t,e),k(s,e);continue}if("br"===u){R(s,c,t,{formats:[],replacements:[],text:""}),k(s,L({text:"\n"}));continue}const f=F({type:u,attributes:W({element:c})});if(r&&-1!==r.indexOf(u)){const e=D({element:c,range:t,multilineTag:n,multilineWrapperTags:r,currentWrapperTags:[...a,f],isEditableTree:o,preserveWhiteSpace:i});R(s,c,t,e),k(s,e);continue}const d=O({element:c,range:t,multilineTag:n,multilineWrapperTags:r,isEditableTree:o,preserveWhiteSpace:i});if(R(s,c,t,d),f)if(0===d.text.length)f.attributes&&k(s,{formats:[,],replacements:[f],text:C});else{function e(t){if(e.formats===t)return e.newFormats;const n=t?[f,...t]:[f];return e.formats=t,e.newFormats=n,n}e.newFormats=[f],k(s,{...d,formats:Array.from(d.formats,e)})}else k(s,d)}return s}function D({element:e,range:t,multilineTag:n,multilineWrapperTags:r,currentWrapperTags:a=[],isEditableTree:o,preserveWhiteSpace:i}){const s={formats:[],replacements:[],text:""};if(!e||!e.hasChildNodes())return s;const c=e.children.length;for(let l=0;l<c;l++){const c=e.children[l];if(c.nodeName.toLowerCase()!==n)continue;const u=O({element:c,range:t,multilineTag:n,multilineWrapperTags:r,currentWrapperTags:a,isEditableTree:o,preserveWhiteSpace:i});(0!==l||a.length>0)&&k(s,{formats:[,],replacements:a.length>0?[a]:[,],text:_}),R(s,c,t,u),k(s,u)}return s}function W({element:e}){if(!e.hasAttributes())return;const t=e.attributes.length;let n;for(let r=0;r<t;r++){const{name:t,value:a}=e.attributes[r];0!==t.indexOf("data-rich-text-")&&(n=n||{},n[/^on/i.test(t)?"data-disable-rich-text-"+t:t]=a)}return n}function k(e,t){return e.formats=e.formats.concat(t.formats),e.replacements=e.replacements.concat(t.replacements),e.text+=t.text,e}function M(...e){return T(e.reduce(k,L()))}function $({formats:e,start:t,end:n,activeFormats:r},a=[]){if(void 0===t)return a;if(t===n){if(r)return r;const n=e[t-1]||a,o=e[t]||a;return n.length<o.length?n:o}return e[t]||a}function j(e,t){return(0,s.find)($(e),{type:t})}function I({start:e,end:t,replacements:n,text:r}){if(e+1===t&&r[e]===C)return n[e]}function P({text:e}){return e.replace(new RegExp(C,"g"),"").replace(new RegExp(_,"g"),"\n")}function V({start:e,text:t},n=e){let r=n;for(;r--;)if(t[r]===_)return r}function K(e){const{replacements:t,start:n}=e,r=t[V(e,n)];return!r||r.length<1}function H(e,t,n){const{replacements:r,start:a}=e,o=r[V(e,a)];return o&&0!==o.length?o[o.length-1].type===t:t===n}function B({start:e,end:t}){if(void 0!==e&&void 0!==t)return e===t}function z({text:e}){return 0===e.length}function U({text:e,start:t,end:n}){return t===n&&(0===e.length||0===t&&e.slice(0,1)===_||t===e.length&&e.slice(-1)===_||e.slice(t-1,n+1)===`${_}${_}`)}function q(e,t=""){return"string"==typeof t&&(t=L({text:t})),T(e.reduce(((e,{formats:n,replacements:r,text:a})=>({formats:e.formats.concat(t.formats,n),replacements:e.replacements.concat(t.replacements,r),text:e.text+t.text+a}))))}function X(e,t){if("string"==typeof(t={name:e,...t}).name)if(/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(t.name))if((0,i.select)(y).getFormatType(t.name))window.console.error('Format "'+t.name+'" is already registered.');else if("string"==typeof t.tagName&&""!==t.tagName)if("string"==typeof t.className&&""!==t.className||null===t.className)if(/^[_a-zA-Z]+[a-zA-Z0-9-]*$/.test(t.className)){if(null===t.className){const e=(0,i.select)(y).getFormatTypeForBareElement(t.tagName);if(e)return void window.console.error(`Format "${e.name}" is already registered to handle bare tag name "${t.tagName}".`)}else{const e=(0,i.select)(y).getFormatTypeForClassName(t.className);if(e)return void window.console.error(`Format "${e.name}" is already registered to handle class name "${t.className}".`)}if("title"in t&&""!==t.title)if("keywords"in t&&t.keywords.length>3)window.console.error('The format "'+t.name+'" can have a maximum of 3 keywords.');else{if("string"==typeof t.title)return(0,i.dispatch)(y).addFormatTypes(t),t;window.console.error("Format titles must be strings.")}else window.console.error('The format "'+t.name+'" must have a title.')}else window.console.error("A class name must begin with a letter, followed by any number of hyphens, letters, or numbers.");else window.console.error("Format class names must be a string, or null to handle bare elements.");else window.console.error("Format tag names must be a string.");else window.console.error("Format names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-format");else window.console.error("Format names must be strings.")}function Y(e,t,n=e.start,r=e.end){const{formats:a,activeFormats:o}=e,i=a.slice();if(n===r){const e=(0,s.find)(i[n],{type:t});if(e){for(;(0,s.find)(i[n],e);)G(i,n,t),n--;for(r++;(0,s.find)(i[r],e);)G(i,r,t),r++}}else for(let e=n;e<r;e++)i[e]&&G(i,e,t);return T({...e,formats:i,activeFormats:(0,s.reject)(o,{type:t})})}function G(e,t,n){const r=e[t].filter((({type:e})=>e!==n));r.length?e[t]=r:delete e[t]}function Z(e,t,n=e.start,r=e.end){const{formats:a,replacements:o,text:i}=e;"string"==typeof t&&(t=L({text:t}));const s=n+t.text.length;return T({formats:a.slice(0,n).concat(t.formats,a.slice(r)),replacements:o.slice(0,n).concat(t.replacements,o.slice(r)),text:i.slice(0,n)+t.text+i.slice(r),start:s,end:s})}function J(e,t,n){return Z(e,L(),t,n)}function Q({formats:e,replacements:t,text:n,start:r,end:a},o,i){return n=n.replace(o,((n,...o)=>{const s=o[o.length-2];let c,l,u=i;return"function"==typeof u&&(u=i(n,...o)),"object"==typeof u?(c=u.formats,l=u.replacements,u=u.text):(c=Array(u.length),l=Array(u.length),e[s]&&(c=c.fill(e[s]))),e=e.slice(0,s).concat(c,e.slice(s+n.length)),t=t.slice(0,s).concat(l,t.slice(s+n.length)),r&&(r=a=s+u.length),u})),T({formats:e,replacements:t,text:n,start:r,end:a})}function ee(e,t=e.start,n=e.end){const r=e.text.slice(0,t).lastIndexOf(_),a=e.replacements[r];let o=[,];return a&&(o=[a]),Z(e,{formats:[,],replacements:o,text:_},t,n)}function te(e,t=!0){const{replacements:n,text:r,start:a,end:o}=e,i=B(e);let s,c=a-1,l=i?a-1:a,u=o;if(t||(c=o,l=a,u=i?o+1:o),r[c]===_){if(i&&n[c]&&n[c].length){const t=n.slice();t[c]=n[c].slice(0,-1),s={...e,replacements:t}}else s=J(e,l,u);return s}}function ne(e,t,n,r){return Z(e,{formats:[,],replacements:[t],text:C},n,r)}function re(e,t=e.start,n=e.end){const{formats:r,replacements:a,text:o}=e;return void 0===t||void 0===n?{...e}:{formats:r.slice(t,n),replacements:a.slice(t,n),text:o.slice(t,n)}}function ae({formats:e,replacements:t,text:n,start:r,end:a},o){if("string"!=typeof o)return oe(...arguments);let i=0;return n.split(o).map((n=>{const s=i,c={formats:e.slice(s,s+n.length),replacements:t.slice(s,s+n.length),text:n};return i+=o.length+n.length,void 0!==r&&void 0!==a&&(r>=s&&r<i?c.start=r-s:r<s&&a>s&&(c.start=0),a>=s&&a<i?c.end=a-s:r<i&&a>i&&(c.end=n.length)),c}))}function oe({formats:e,replacements:t,text:n,start:r,end:a},o=r,i=a){if(void 0===r||void 0===a)return;const s={formats:e.slice(0,o),replacements:t.slice(0,o),text:n.slice(0,o)},c={formats:e.slice(i),replacements:t.slice(i),text:n.slice(i),start:0,end:0};return[Q(s,/\u2028+$/,""),Q(c,/^\u2028+/,"")]}function ie(e,t){if(t)return e;const n={};for(const t in e){let r=t;t.startsWith("data-disable-rich-text-")&&(r=t.slice("data-disable-rich-text-".length)),n[r]=e[t]}return n}function se({type:e,attributes:t,unregisteredAttributes:n,object:r,boundaryClass:a,isEditableTree:o}){const s=(c=e,(0,i.select)(y).getFormatType(c));var c;let l={};if(a&&(l["data-rich-text-format-boundary"]="true"),!s)return t&&(l={...t,...l}),{type:e,attributes:ie(l,o),object:r};l={...n,...l};for(const e in t){const n=!!s.attributes&&s.attributes[e];n?l[n]=t[e]:l[e]=t[e]}return s.className&&(l.class?l.class=`${s.className} ${l.class}`:l.class=s.className),{type:s.tagName,object:s.object,attributes:ie(l,o)}}function ce(e,t,n){do{if(e[n]!==t[n])return!1}while(n--);return!0}function le({value:e,multilineTag:t,preserveWhiteSpace:n,createEmpty:r,append:a,getLastChild:o,getParent:i,isText:s,getText:c,remove:l,appendText:u,onStartIndex:f,onEndIndex:d,isEditableTree:m,placeholder:p}){const{formats:g,replacements:h,text:v,start:y,end:b}=e,T=g.length+1,E=r(),x={type:t},w=$(e),F=w[w.length-1];let L,R,A;t?(a(a(E,{type:t}),""),R=L=[x]):a(E,"");for(let e=0;e<T;e++){const r=v.charAt(e),T=m&&(!A||A===_||"\n"===A);let w=g[e];t&&(w=r===_?L=(h[e]||[]).reduce(((e,t)=>(e.push(t,x),e)),[x]):[...L,...w||[]]);let S=o(E);if(T&&r===_){let e=S;for(;!s(e);)e=o(e);a(i(e),"\ufeff")}if(A===_){let t=S;for(;!s(t);)t=o(t);f&&y===e&&f(E,t),d&&b===e&&d(E,t)}var N;if(w&&w.forEach(((e,t)=>{if(S&&R&&ce(w,R,t)&&(r!==_||w.length-1!==t))return void(S=o(S));const{type:n,attributes:u,unregisteredAttributes:f}=e,d=m&&r!==_&&e===F,p=i(S),g=a(p,se({type:n,attributes:u,unregisteredAttributes:f,boundaryClass:d,isEditableTree:m}));s(S)&&0===c(S).length&&l(S),S=a(g,"")})),r!==_)0===e&&(f&&0===y&&f(E,S),d&&0===b&&d(E,S)),r===C?(m||"script"!==(null===(N=h[e])||void 0===N?void 0:N.type)?S=a(i(S),se({...h[e],object:!0,isEditableTree:m})):(S=a(i(S),se({type:"script",isEditableTree:m})),a(S,{html:decodeURIComponent(h[e].attributes["data-rich-text-script"])})),S=a(i(S),"")):n||"\n"!==r?s(S)?u(S,r):S=a(i(S),r):(S=a(i(S),{type:"br",attributes:m?{"data-rich-text-line-break":"true"}:void 0,object:!0}),S=a(i(S),"")),f&&y===e+1&&f(E,S),d&&b===e+1&&d(E,S),T&&e===v.length&&(a(i(S),"\ufeff"),p&&0===v.length&&a(i(S),{type:"span",attributes:{"data-rich-text-placeholder":p,contenteditable:"false",style:"pointer-events:none;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;"}})),R=w,A=r;else R=w,A=r}return E}function ue(e,t,n){const r=e.parentNode;let a=0;for(;e=e.previousSibling;)a++;return n=[a,...n],r!==t&&(n=ue(r,t,n)),n}function fe(e,t){for(t=[...t];e&&t.length>1;)e=e.childNodes[t.shift()];return{node:e,offset:t[0]}}function de(e,t){"string"==typeof t&&(t=e.ownerDocument.createTextNode(t));const{type:n,attributes:r}=t;if(n){t=e.ownerDocument.createElement(n);for(const e in r)t.setAttribute(e,r[e])}return e.appendChild(t)}function me(e,t){e.appendData(t)}function pe({lastChild:e}){return e}function ge({parentNode:e}){return e}function he(e){return e.nodeType===e.TEXT_NODE}function ve({nodeValue:e}){return e}function ye(e){return e.parentNode.removeChild(e)}function be({value:e,multilineTag:t,prepareEditableTree:n,isEditableTree:r=!0,placeholder:a,doc:o=document}){let i=[],s=[];return n&&(e={...e,formats:n(e)}),{body:le({value:e,multilineTag:t,createEmpty:()=>w(o,""),append:de,getLastChild:pe,getParent:ge,isText:he,getText:ve,remove:ye,appendText:me,onStartIndex(e,t){i=ue(t,e,[t.nodeValue.length])},onEndIndex(e,t){s=ue(t,e,[t.nodeValue.length])},isEditableTree:r,placeholder:a}),selection:{startPath:i,endPath:s}}}function Te({value:e,current:t,multilineTag:n,prepareEditableTree:r,__unstableDomOnly:a,placeholder:o}){const{body:i,selection:s}=be({value:e,multilineTag:n,prepareEditableTree:r,placeholder:o,doc:t.ownerDocument});Ee(i,t),void 0===e.start||a||function({startPath:e,endPath:t},n){const{node:r,offset:a}=fe(n,e),{node:o,offset:i}=fe(n,t),{ownerDocument:s}=n,{defaultView:c}=s,l=c.getSelection(),u=s.createRange();u.setStart(r,a),u.setEnd(o,i);const{activeElement:f}=s;if(l.rangeCount>0){if(d=u,m=l.getRangeAt(0),d.startContainer===m.startContainer&&d.startOffset===m.startOffset&&d.endContainer===m.endContainer&&d.endOffset===m.endOffset)return;l.removeAllRanges()}var d,m;l.addRange(u),f!==s.activeElement&&f instanceof c.HTMLElement&&f.focus()}(s,t)}function Ee(e,t){let n,r=0;for(;n=e.firstChild;){const a=t.childNodes[r];if(a)if(a.isEqualNode(n))e.removeChild(n);else if(a.nodeName!==n.nodeName||a.nodeType===a.TEXT_NODE&&a.data!==n.data)t.replaceChild(n,a);else{const t=a.attributes,r=n.attributes;if(t){let e=t.length;for(;e--;){const{name:r}=t[e];n.getAttribute(r)||a.removeAttribute(r)}}if(r)for(let e=0;e<r.length;e++){const{name:t,value:n}=r[e];a.getAttribute(t)!==n&&a.setAttribute(t,n)}Ee(n,a),e.removeChild(n)}else t.appendChild(n);r++}for(;t.childNodes[r];)t.removeChild(t.childNodes[r])}var xe=window.wp.escapeHtml;function we({value:e,multilineTag:t,preserveWhiteSpace:n}){return Oe(le({value:e,multilineTag:t,preserveWhiteSpace:n,createEmpty:_e,append:Fe,getLastChild:Ce,getParent:Re,isText:Ae,getText:Ne,remove:Se,appendText:Le}).children)}function _e(){return{}}function Ce({children:e}){return e&&e[e.length-1]}function Fe(e,t){return"string"==typeof t&&(t={text:t}),t.parent=e,e.children=e.children||[],e.children.push(t),t}function Le(e,t){e.text+=t}function Re({parent:e}){return e}function Ae({text:e}){return"string"==typeof e}function Ne({text:e}){return e}function Se(e){const t=e.parent.children.indexOf(e);return-1!==t&&e.parent.children.splice(t,1),e}function Oe(e=[]){return e.map((e=>void 0!==e.html?e.html:void 0===e.text?function({type:e,attributes:t,object:n,children:r}){let a="";for(const e in t)(0,xe.isValidAttributeName)(e)&&(a+=` ${e}="${(0,xe.escapeAttribute)(t[e])}"`);return n?`<${e}${a}>`:`<${e}${a}>${Oe(r)}</${e}>`}(e):(0,xe.escapeEditableHTML)(e.text))).join("")}function De(e,t){return j(e,t.type)?Y(e,t.type):x(e,t)}function We(e){const t=(0,i.select)(y).getFormatType(e);if(t)return(0,i.dispatch)(y).removeFormatTypes(e),t;window.console.error(`Format ${e} is not registered.`)}function ke(e){const t=V(e);if(void 0===t)return!1;const{replacements:n}=e,r=V(e,t),a=n[t]||[],o=n[r]||[];return a.length<=o.length}function Me(e){const{replacements:t,start:n}=e;return void 0!==t[V(e,n)]}function $e(e,t){if(!ke(e))return e;const n=V(e),r=V(e,n),{text:a,replacements:o,end:i}=e,s=o.slice(),c=function({text:e,replacements:t},n){const r=t[n]||[];let a=n;for(;a-- >=0;){if(e[a]!==_)continue;const n=t[a]||[];if(n.length===r.length+1)return a;if(n.length<=r.length)return}}(e,n);for(let e=n;e<i;e++)if(a[e]===_)if(c){const t=o[c]||[];s[e]=t.concat((s[e]||[]).slice(t.length-1))}else{const n=o[r]||[],a=n[n.length-1]||t;s[e]=n.concat([a],(s[e]||[]).slice(n.length))}return{...e,replacements:s}}function je({text:e,replacements:t},n){const r=t[n]||[];let a=n;for(;a-- >=0;)if(e[a]===_&&(t[a]||[]).length===r.length-1)return a}function Ie(e){if(!Me(e))return e;const{text:t,replacements:n,start:r,end:a}=e,o=V(e,r),i=n.slice(0),s=n[je(e,o)]||[],c=function({text:e,replacements:t},n){const r=t[n]||[];let a=n;for(let o=n||0;o<e.length;o++)if(e[o]===_){if(!((t[o]||[]).length>=r.length))return a;a=o}return a}(e,V(e,a));for(let e=o;e<=c;e++){if(t[e]!==_)continue;const n=i[e]||[];i[e]=s.concat(n.slice(s.length+1)),0===i[e].length&&delete i[e]}return{...e,replacements:i}}function Pe(e,t){const{text:n,replacements:r,start:a,end:o}=e,i=V(e,a),s=r[i]||[],c=r[V(e,o)]||[],l=je(e,i),u=r.slice(),f=s.length-1,d=c.length-1;let m;for(let e=l+1||0;e<n.length;e++)if(n[e]===_){if((u[e]||[]).length<=f)break;u[e]&&(m=!0,u[e]=u[e].map(((e,n)=>n<f||n>d?e:t)))}return m?{...e,replacements:u}:e}var Ve=window.wp.element;function Ke({ref:e,value:t,settings:n={}}){const{tagName:r,className:a,name:o}=n,i=o?j(t,o):void 0;return(0,Ve.useMemo)((()=>{if(!e.current)return;const{ownerDocument:{defaultView:t}}=e.current,n=t.getSelection();if(!n.rangeCount)return;const o=n.getRangeAt(0);if(!i)return o;let s=o.startContainer;for(s=s.nextElementSibling||s;s.nodeType!==s.ELEMENT_NODE;)s=s.parentNode;return s.closest(r+(a?"."+a:""))}),[i,t.start,t.end,r,a])}var He=window.wp.compose;function Be({record:e}){const t=(0,Ve.useRef)(),{activeFormats:n=[]}=e.current;return(0,Ve.useEffect)((()=>{if(!n||!n.length)return;const e="*[data-rich-text-format-boundary]",r=t.current.querySelector(e);if(!r)return;const{ownerDocument:a}=r,{defaultView:o}=a,i=`.rich-text:focus ${e} {background-color: ${o.getComputedStyle(r).color.replace(")",", 0.2)").replace("rgb","rgba")}}`,s="rich-text-boundary-style";let c=a.getElementById(s);c||(c=a.createElement("style"),c.id=s,a.head.appendChild(c)),c.innerHTML!==i&&(c.innerHTML=i)}),[n]),t}function ze(e){const t=(0,Ve.useRef)(e);return t.current=e,(0,He.useRefEffect)((e=>{function n(n){const{record:r,multilineTag:a,preserveWhiteSpace:o}=t.current;if(B(r.current)||!e.contains(e.ownerDocument.activeElement))return;const i=re(r.current),s=P(i),c=we({value:i,multilineTag:a,preserveWhiteSpace:o});n.clipboardData.setData("text/plain",s),n.clipboardData.setData("text/html",c),n.clipboardData.setData("rich-text","true"),n.clipboardData.setData("rich-text-multi-line-tag",a||""),n.preventDefault()}return e.addEventListener("copy",n),()=>{e.removeEventListener("copy",n)}}),[])}var Ue=window.wp.keycodes;const qe=[];function Xe(e){const[,t]=(0,Ve.useReducer)((()=>({}))),n=(0,Ve.useRef)(e);return n.current=e,(0,He.useRefEffect)((e=>{function r(r){const{keyCode:a,shiftKey:o,altKey:i,metaKey:s,ctrlKey:c}=r;if(o||i||s||c||a!==Ue.LEFT&&a!==Ue.RIGHT)return;const{record:l,applyRecord:u}=n.current,{text:f,formats:d,start:m,end:p,activeFormats:g=[]}=l.current,h=B(l.current),{ownerDocument:v}=e,{defaultView:y}=v,{direction:b}=y.getComputedStyle(e),T="rtl"===b?Ue.RIGHT:Ue.LEFT,E=r.keyCode===T;if(h&&0===g.length){if(0===m&&E)return;if(p===f.length&&!E)return}if(!h)return;const x=d[m-1]||qe,w=d[m]||qe,_=E?x:w,C=g.every(((e,t)=>e===_[t]));let F=g.length;if(C?F<_.length&&F++:F--,F===g.length)return void(l.current._newActiveFormats=_);r.preventDefault();const L=(C?_:E?w:x).slice(0,F),R={...l.current,activeFormats:L};l.current=R,u(R),t()}return e.addEventListener("keydown",r),()=>{e.removeEventListener("keydown",r)}}),[])}function Ye(e){const t=(0,Ve.useRef)(e);return t.current=e,(0,He.useRefEffect)((e=>{function n(n){const{keyCode:r,shiftKey:a,altKey:o,metaKey:i,ctrlKey:s}=n,{multilineTag:c,createRecord:l,handleChange:u}=t.current;if(a||o||i||s||r!==Ue.SPACE||"li"!==c)return;const f=l();if(!B(f))return;const{text:d,start:m}=f,p=d[m-1];p&&p!==_||(u($e(f,{type:e.tagName.toLowerCase()})),n.preventDefault())}return e.addEventListener("keydown",n),()=>{e.removeEventListener("keydown",n)}}),[])}const Ge=new Set(["insertParagraph","insertOrderedList","insertUnorderedList","insertHorizontalRule","insertLink"]),Ze=[];function Je(e){const t=(0,Ve.useRef)(e);return t.current=e,(0,He.useRefEffect)((e=>{const{ownerDocument:n}=e,{defaultView:r}=n;let a,o=!1;function i(e){if(o)return;let n;e&&(n=e.inputType);const{record:r,applyRecord:a,createRecord:i,handleChange:s}=t.current;if(n&&(0===n.indexOf("format")||Ge.has(n)))return void a(r.current);const c=i(),{start:l,activeFormats:u=[]}=r.current;s(function({value:e,start:t,end:n,formats:r}){const a=Math.min(t,n),o=Math.max(t,n),i=e.formats[a-1]||[],s=e.formats[o]||[];for(e.activeFormats=r.map(((e,t)=>{if(i[t]){if(b(e,i[t]))return i[t]}else if(s[t]&&b(e,s[t]))return s[t];return e}));--n>=t;)e.activeFormats.length>0?e.formats[n]=e.activeFormats:delete e.formats[n];return e}({value:c,start:l,end:c.start,formats:u}))}function s(a){if(n.activeElement!==e)return;const{record:s,applyRecord:c,createRecord:l,isSelected:u,onSelectionChange:f}=t.current;if("selectionchange"!==a.type&&!u)return;if("true"!==e.contentEditable)return;if(o)return;const{start:d,end:m,text:p}=l(),g=s.current;if(p!==g.text)return void i();if(d===g.start&&m===g.end)return void(0===g.text.length&&0===d&&function(e){const t=e.getSelection(),{anchorNode:n,anchorOffset:r}=t;if(n.nodeType!==n.ELEMENT_NODE)return;const a=n.childNodes[r];a&&a.nodeType===a.ELEMENT_NODE&&a.getAttribute("data-rich-text-placeholder")&&t.collapseToStart()}(r));const h={...g,start:d,end:m,activeFormats:g._newActiveFormats,_newActiveFormats:void 0},v=$(h,Ze);h.activeFormats=v,s.current=h,c(h,{domOnly:!0}),f(d,m)}function c(){o=!0,n.removeEventListener("selectionchange",s)}function l(){o=!1,i({inputType:"insertText"}),n.addEventListener("selectionchange",s)}function u(){const{record:e,isSelected:o,onSelectionChange:i,applyRecord:c}=t.current;if(o)c(e.current),i(e.current.start,e.current.end);else{const t=void 0;e.current={...e.current,start:t,end:t,activeFormats:Ze},i(t,t)}a=r.requestAnimationFrame(s),n.addEventListener("selectionchange",s)}function f(){n.removeEventListener("selectionchange",s)}return e.addEventListener("input",i),e.addEventListener("compositionstart",c),e.addEventListener("compositionend",l),e.addEventListener("focus",u),e.addEventListener("blur",f),e.addEventListener("keyup",s),e.addEventListener("mouseup",s),e.addEventListener("touchend",s),()=>{e.removeEventListener("input",i),e.removeEventListener("compositionstart",c),e.removeEventListener("compositionend",l),e.removeEventListener("focus",u),e.removeEventListener("blur",f),e.removeEventListener("keyup",s),e.removeEventListener("mouseup",s),e.removeEventListener("touchend",s),n.removeEventListener("selectionchange",s),r.cancelAnimationFrame(a)}}),[])}function Qe(e){const t=(0,Ve.useRef)(e);return t.current=e,(0,He.useRefEffect)((e=>{function n(e){const{keyCode:n}=e,{createRecord:r,handleChange:a,multilineTag:o}=t.current;if(e.defaultPrevented)return;if(n!==Ue.DELETE&&n!==Ue.BACKSPACE)return;const i=r(),{start:s,end:c,text:l}=i,u=n===Ue.BACKSPACE;if(0===s&&0!==c&&c===l.length)return a(J(i)),void e.preventDefault();if(o){let t;t=u&&0===i.start&&0===i.end&&U(i)?te(i,!u):te(i,u),t&&(a(t),e.preventDefault())}}return e.addEventListener("keydown",n),()=>{e.removeEventListener("keydown",n)}}),[])}function et({value:e="",selectionStart:t,selectionEnd:n,placeholder:r,preserveWhiteSpace:a,onSelectionChange:o,onChange:s,__unstableMultilineTag:c,__unstableDisableFormats:l,__unstableIsSelected:u,__unstableDependencies:f=[],__unstableAfterParse:d,__unstableBeforeSerialize:m,__unstableAddInvisibleFormats:p}){const g=(0,i.useRegistry)(),[,h]=(0,Ve.useReducer)((()=>({}))),v=(0,Ve.useRef)();function y(){const{ownerDocument:{defaultView:e}}=v.current,t=e.getSelection(),n=t.rangeCount>0?t.getRangeAt(0):null;return L({element:v.current,range:n,multilineTag:c,multilineWrapperTags:"li"===c?["ul","ol"]:void 0,__unstableIsEditableTree:!0,preserveWhiteSpace:a})}function b(e,{domOnly:t}={}){Te({value:e,current:v.current,multilineTag:c,multilineWrapperTags:"li"===c?["ul","ol"]:void 0,prepareEditableTree:p,__unstableDomOnly:t,placeholder:r})}const T=(0,Ve.useRef)(e),E=(0,Ve.useRef)();function x(){T.current=e,E.current=L({html:e,multilineTag:c,multilineWrapperTags:"li"===c?["ul","ol"]:void 0,preserveWhiteSpace:a}),l&&(E.current.formats=Array(e.length),E.current.replacements=Array(e.length)),d&&(E.current.formats=d(E.current)),E.current.start=t,E.current.end=n}const w=(0,Ve.useRef)(!1);var _,C,F;E.current?t===E.current.start&&n===E.current.end||(w.current=u,E.current={...E.current,start:t,end:n}):(x(),"core/text-color"===(null===(_=E.current)||void 0===_||null===(C=_.formats[0])||void 0===C||null===(F=C[0])||void 0===F?void 0:F.type)&&function(e){E.current=e,T.current=we({value:m?{...e,formats:m(e)}:e,multilineTag:c,preserveWhiteSpace:a});const{formats:t,text:n}=e;g.batch((()=>{s(T.current,{__unstableFormats:t,__unstableText:n})})),h()}(E.current));function R(e){E.current=e,b(e),T.current=l?e.text:we({value:m?{...e,formats:m(e)}:e,multilineTag:c,preserveWhiteSpace:a});const{start:t,end:n,formats:r,text:i}=e;g.batch((()=>{o(t,n),s(T.current,{__unstableFormats:r,__unstableText:i})})),h()}function A(){x(),b(E.current)}const N=(0,Ve.useRef)(!1);(0,Ve.useLayoutEffect)((()=>{N.current&&e!==T.current&&A()}),[e]),(0,Ve.useLayoutEffect)((()=>{w.current&&(A(),w.current=!1)}),[w.current]);const S=(0,He.useMergeRefs)([v,(0,Ve.useCallback)((e=>{e&&(e.style.whiteSpace="pre-wrap",e.style.minWidth="1px")}),[]),Be({record:E}),ze({record:E,multilineTag:c,preserveWhiteSpace:a}),(0,He.useRefEffect)((e=>{function t(t){const{target:n}=t;if(n===e||n.textContent)return;const{ownerDocument:r}=n,{defaultView:a}=r,o=r.createRange(),i=a.getSelection();o.selectNode(n),i.removeAllRanges(),i.addRange(o)}return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}),[]),Xe({record:E,applyRecord:b}),Qe({createRecord:y,handleChange:R,multilineTag:c}),Ye({multilineTag:c,createRecord:y,handleChange:R}),Je({record:E,applyRecord:b,createRecord:y,handleChange:R,isSelected:u,onSelectionChange:o}),(0,He.useRefEffect)((e=>{function t(e){if(e.defaultPrevented)return;const{keyCode:t,altKey:n,metaKey:r,ctrlKey:a}=e;t!==Ue.SPACE||n||r||a||(e.target.ownerDocument.execCommand("insertText",!1," "),e.preventDefault())}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}),[]),(0,He.useRefEffect)((()=>{A(),N.current=!0}),[r,...f])]);return{value:E.current,onChange:R,ref:S}}function tt(){}function nt({formatTypes:e,onChange:t,onFocus:n,value:r,forwardedRef:a}){return e.map((e=>{const{name:o,edit:i}=e;if(!i)return null;const s=j(r,o),c=void 0!==s,l=I(r),u=void 0!==l&&l.type===o;return(0,Ve.createElement)(i,{key:o,isActive:c,activeAttributes:c&&s.attributes||{},isObjectActive:u,activeObjectAttributes:u&&l.attributes||{},value:r,onChange:t,onFocus:n,contentRef:a})}))}(window.wp=window.wp||{}).richText=t}();
changelog.txt CHANGED
@@ -1,230 +1,556 @@
1
  == Changelog ==
2
 
3
- = 11.7.0 =
4
 
5
- ### Enhancements
6
-
7
- #### Accessibility
8
- - Adjust wording for post format suggestions. ([14124](https://github.com/WordPress/gutenberg/pull/14124))
9
- - Add a visually hidden label for the Search block. ([35034](https://github.com/WordPress/gutenberg/pull/35034))
10
- - Add an accessible label to the Back button in preferences. ([35340](https://github.com/WordPress/gutenberg/pull/35340))
11
- - Global Styles: Add accessible label to Back button. ([35325](https://github.com/WordPress/gutenberg/pull/35325))
12
- - Template title: Include a button and label text when there is no post/page title. ([35148](https://github.com/WordPress/gutenberg/pull/35148))
13
-
14
-
15
- #### Block Editor
16
- - Allow other blocks to use the slash inserter. ([35196](https://github.com/WordPress/gutenberg/pull/35196))
17
- - Enable ability to create Pages from the inline Link UI. ([35083](https://github.com/WordPress/gutenberg/pull/35083))
18
- - Polish quick inserter. ([35339](https://github.com/WordPress/gutenberg/pull/35339))
19
- - Remove visual clue from alignment toolbar. ([35080](https://github.com/WordPress/gutenberg/pull/35080))
20
- - Remove native block inserter onboarding tooltip. ([35150](https://github.com/WordPress/gutenberg/pull/35150))
21
-
22
- #### Block Library
23
- - Site Logo: Add duotone support. ([35344](https://github.com/WordPress/gutenberg/pull/35344))
24
- - Columns block: Enable blockGap and vertical margin support. ([34630](https://github.com/WordPress/gutenberg/pull/34630))
25
- - File Block: Only display PDF preview height `RangeControl` when embed is enabled. ([35207](https://github.com/WordPress/gutenberg/pull/35207))
26
- - Navigation: Add transformations from a link to other allowed nav blocks. ([34978](https://github.com/WordPress/gutenberg/pull/34978))
27
- - Query Loop: Include a Query Pagination option on the block variations. ([35347](https://github.com/WordPress/gutenberg/pull/35347))
28
- - Show "none" as an alignment option and use contextual text to clarify settings. ([34710](https://github.com/WordPress/gutenberg/pull/34710))
29
- - Social Links: Add block gap support. ([35236](https://github.com/WordPress/gutenberg/pull/35236))
30
- - Site Title: Add option to toggle home link. ([31540](https://github.com/WordPress/gutenberg/pull/31540))
31
- - Site title: update block description. ([34474](https://github.com/WordPress/gutenberg/pull/34474))
32
- - Transform Nav Links with children into Submenus. ([34831](https://github.com/WordPress/gutenberg/pull/34831))
33
- - Add an option for displaying the label inside the Navigation Link block. ([34952](https://github.com/WordPress/gutenberg/pull/34952))
34
- - Add typography settings for the Navigation Link block. ([35324](https://github.com/WordPress/gutenberg/pull/35324))
35
- - Add option to remove/clear logo from the Site Logo block. ([34820](https://github.com/WordPress/gutenberg/pull/34820))
36
-
37
- #### Core data
38
- - Add 'context' to the query parts type definition. ([35069](https://github.com/WordPress/gutenberg/pull/35069))
39
-
40
- #### Components
41
- - Add new Navigator components and use them in the global styles sidebar. ([34904](https://github.com/WordPress/gutenberg/pull/34904))
42
- - Use _builtin property of classes in navigation link PHP. ([35166](https://github.com/WordPress/gutenberg/pull/35166))
43
- - `Item`: Remove `isAction` and use `onClick` to decide if it should render as `button`. ([35152](https://github.com/WordPress/gutenberg/pull/35152))
44
- - Make tooltip delay configurable with a property. ([35246](https://github.com/WordPress/gutenberg/pull/35246))
45
-
46
- #### Design Tools
47
- - Block gap: Only render CSS variable if corresponding theme setting is enabled. ([35209](https://github.com/WordPress/gutenberg/pull/35209))
48
- - Format library: Add background color. ([34680](https://github.com/WordPress/gutenberg/pull/34680))
49
- - Update: Custom gradient picker design. ([34712](https://github.com/WordPress/gutenberg/pull/34712))
50
-
51
- #### Global Styles
52
- - Add Padding to the root level of global styles. ([35241](https://github.com/WordPress/gutenberg/pull/35241))
53
- - Add duotone theme.json styles support. ([34667](https://github.com/WordPress/gutenberg/pull/34667))
54
- - Extract the color palette to its own global styles screen. ([35109](https://github.com/WordPress/gutenberg/pull/35109))
55
- - Update the rules to hide/show blocks in the global styles sidebar. ([35178](https://github.com/WordPress/gutenberg/pull/35178))
56
-
57
- #### Icons
58
- - Add color icon. ([35187](https://github.com/WordPress/gutenberg/pull/35187))
59
- - Rename globe icon to url. ([35032](https://github.com/WordPress/gutenberg/pull/35032))
60
-
61
- #### Site Editor
62
- - Remove warning box from post terms. ([35242](https://github.com/WordPress/gutenberg/pull/35242))
63
-
64
- #### Template Editor
65
- - Add back button for isolated template part editor. ([34732](https://github.com/WordPress/gutenberg/pull/34732))
66
- - Add template areas to template details. ([35202](https://github.com/WordPress/gutenberg/pull/35202))
67
-
68
-
69
  ### Bug Fixes
70
 
71
- #### Block Editor
72
- - Block Editor: Fix duplicate clientIds when dragging patterns. ([35124](https://github.com/WordPress/gutenberg/pull/35124))
73
- - Disallow creation of empty links using Link UI directly. ([35060](https://github.com/WordPress/gutenberg/pull/35060))
74
- - Fix Link UI when hyperlink has an empty `href` value. ([35043](https://github.com/WordPress/gutenberg/pull/35043))
75
- - Fix missing border in the quick inserter. ([35307](https://github.com/WordPress/gutenberg/pull/35307))
76
- - Fix toggle off for Duotone control and Post Date block’s date picking control. ([35024](https://github.com/WordPress/gutenberg/pull/35024))
77
- - useMultiSelection: Avoid crashing editor when block refs aren't available. ([35177](https://github.com/WordPress/gutenberg/pull/35177))
78
- - Rich text: fix internal paste across multiline and single line instances. ([35416](https://github.com/WordPress/gutenberg/pull/35416))
79
-
80
- #### Block Library
81
- - Embed: Remove meetup-com from variations. ([35146](https://github.com/WordPress/gutenberg/pull/35146))
82
- - Featured Image: Remove descendent space. ([35273](https://github.com/WordPress/gutenberg/pull/35273))
83
- - Fix: Broken disabled select style in the editor area. ([35135](https://github.com/WordPress/gutenberg/pull/35135))
84
- - Fix native BlockAlignmentControl. ([35191](https://github.com/WordPress/gutenberg/pull/35191))
85
- - Gallery block: Fix Safari image sizing issue. ([35309](https://github.com/WordPress/gutenberg/pull/35309))
86
- - Gallery block: Fix problem with caption showing encode tags when not selected. ([35131](https://github.com/WordPress/gutenberg/pull/35131))
87
- - Gallery block: Unset alignment on new images to prevent it breaking layout. ([35132](https://github.com/WordPress/gutenberg/pull/35132))
88
- - Post Template: Remove margins from the block. ([35193](https://github.com/WordPress/gutenberg/pull/35193))
89
- - Post Title: Always use blockProps. ([35286](https://github.com/WordPress/gutenberg/pull/35286))
90
- - Post Title: Only render link element if we have a post. ([35284](https://github.com/WordPress/gutenberg/pull/35284))
91
- - Query Pagination: Don't render an empty container. ([35092](https://github.com/WordPress/gutenberg/pull/35092))
92
- - Navigation Link: Fix PHP notice in the Navigation Link block. ([34984](https://github.com/WordPress/gutenberg/pull/34984))
93
- - Fix Post Comment Content block's edit function. ([35190](https://github.com/WordPress/gutenberg/pull/35190))
94
-
95
- #### Components
96
- - Color Picker: Match figma metrics. ([35039](https://github.com/WordPress/gutenberg/pull/35039))
97
- - Remove shift-stepping from range in RangeControl. ([35020](https://github.com/WordPress/gutenberg/pull/35020))
98
- - Popover: fix __unstableBoundaryParent ([35082](https://github.com/WordPress/gutenberg/pull/35082))
99
-
100
- #### Design Tools
101
- - ToolsPanelItem: Add panelId check before calling toggle methods. ([35375](https://github.com/WordPress/gutenberg/pull/35375))
102
-
103
- #### Media
104
- - MediaUpload: Ensure current images in a gallery are selected after opening media library. ([35070](https://github.com/WordPress/gutenberg/pull/35070))
105
-
106
- #### Post Editor
107
- - Fix missing save label. ([34948](https://github.com/WordPress/gutenberg/pull/34948))
108
- - Keyboard shortcut: Prevent post saving through keyboard if post saving locked. ([35361](https://github.com/WordPress/gutenberg/pull/35361))
109
-
110
- #### REST API
111
- - API Fetch: Improve isMediaUploadRequest check. ([34417](https://github.com/WordPress/gutenberg/pull/34417))
112
- - Fix slashing when creating or updating a menu item. ([35147](https://github.com/WordPress/gutenberg/pull/35147))
113
-
114
- #### Server Side Render
115
- - Prevent empty renders in ServerSideRender component caused by changing props while already fetching markup ([35433](https://github.com/WordPress/gutenberg/pull/35433))
116
-
117
- #### Template Editor
118
- - Fix the styling of template details. ([35285](https://github.com/WordPress/gutenberg/pull/35285))
119
-
120
- #### Widgets Editor
121
- - inspector-section: Track isOpen to make a better isContextuallyActive() function. ([35055](https://github.com/WordPress/gutenberg/pull/35055))
122
-
123
-
124
- ### Performance
125
-
126
- - Edit Site: Optimize useSelect calls. ([35213](https://github.com/WordPress/gutenberg/pull/35213))
127
- - Memoize entity records selectors properly. ([34323](https://github.com/WordPress/gutenberg/pull/34323))
128
- - Widgets: Optimize useSelect calls. ([35256](https://github.com/WordPress/gutenberg/pull/35256))
129
-
130
-
131
- ### Experiments
132
-
133
- #### Block Library
134
- - Polish responsive navigation modal, inherit justifications, fix submenu direction. ([35077](https://github.com/WordPress/gutenberg/pull/35077))
135
- - Polish submenu indicator button. ([35030](https://github.com/WordPress/gutenberg/pull/35030))
136
- - Fix: Adding nav items from existing menu. ([34837](https://github.com/WordPress/gutenberg/pull/34837))
137
-
138
- #### Global Styles
139
- - Add Padding to the root level of global styles. ([35241](https://github.com/WordPress/gutenberg/pull/35241))
140
- - Add duotone theme.json styles support. ([34667](https://github.com/WordPress/gutenberg/pull/34667))
141
- - Block gap: Only render CSS variable if corresponding theme setting is enabled. ([35209](https://github.com/WordPress/gutenberg/pull/35209))
142
- - Extract the color palette to its own global styles screen. ([35109](https://github.com/WordPress/gutenberg/pull/35109))
143
- - Update the rules to hide/show blocks in the global styles sidebar. ([35178](https://github.com/WordPress/gutenberg/pull/35178))
144
- - Clean up logic to retrieve GS settings depending on context. ([35437](https://github.com/WordPress/gutenberg/pull/35437))
145
- - Synchronize user custom post type registration and UI visibility. ([35427](https://github.com/WordPress/gutenberg/pull/35427))
146
- - Enqueue preset styles for all themes in the editor. ([35424](https://github.com/WordPress/gutenberg/pull/35424))
147
-
148
-
149
- #### Navigation Screen
150
- - Remove i18n of help link in navigation editor. ([35313](https://github.com/WordPress/gutenberg/pull/35313))
151
- - Add a tooltip to Navigation items in a setup state. ([35139](https://github.com/WordPress/gutenberg/pull/35139))
152
- - Fix gap regression in navigation screen. ([35234](https://github.com/WordPress/gutenberg/pull/35234))
153
- - Truncate long menu names. ([35188](https://github.com/WordPress/gutenberg/pull/35188))
154
- - Insert Navigation Link blocks by default in Navigation block. ([34899](https://github.com/WordPress/gutenberg/pull/34899))
155
- - Migrate resolvers to thunks. ([35044](https://github.com/WordPress/gutenberg/pull/35044))
156
-
157
- #### Full Site Editing
158
- - Remove extra styling around "Post content" placeholder. ([35243](https://github.com/WordPress/gutenberg/pull/35243))
159
-
160
-
161
- ### Documentation
162
-
163
- #### Handbook
164
- - Docs: Update testing overview with minor fixes. ([35232](https://github.com/WordPress/gutenberg/pull/35232))
165
- - Fix typos, grammar in contributors release doc. ([35268](https://github.com/WordPress/gutenberg/pull/35268))
166
- - Update `nvm` to latest `0.38.0` version in Handbook. ([35125](https://github.com/WordPress/gutenberg/pull/35125))
167
- - Adding example readme template to contributing guidelines. ([34847](https://github.com/WordPress/gutenberg/pull/34847))
168
- - Fix erroneous usage of the word `master`. ([35392](https://github.com/WordPress/gutenberg/pull/35392))
169
-
170
- #### Packages
171
- - Add instructions for installing plugins/themes with wp-env. ([35064](https://github.com/WordPress/gutenberg/pull/35064))
172
- - MediaUpload: Reflect the correct filter name in the readme. ([35240](https://github.com/WordPress/gutenberg/pull/35240))
173
- - Update LinkControl documentation with additional examples. ([35199](https://github.com/WordPress/gutenberg/pull/35199))
174
- - Update doc block in block editor to fix documentation generation lint error. ([35295](https://github.com/WordPress/gutenberg/pull/35295))
175
- - Add missing doc blocks for the exported members of edit-widgets store. ([35263](https://github.com/WordPress/gutenberg/pull/35263))
176
-
177
- ### Code Quality
178
-
179
- #### Block Editor
180
- - Add colord package to block editor; Replace tinycolor2 with colord on duotone. (https://github.com/WordPress/gutenberg/pull/34616), [34605](https://github.com/WordPress/gutenberg/pull/34605), [35165](https://github.com/WordPress/gutenberg/pull/35165), [35164](https://github.com/WordPress/gutenberg/pull/35164))
181
- - Migrate the toggleFeature action to a thunk. ([35075](https://github.com/WordPress/gutenberg/pull/35075))
182
-
183
- #### Block Library
184
- - Migrate store actions to thunks. ([35031](https://github.com/WordPress/gutenberg/pull/35031))
185
- - Post Title Block: Fix argument numbering in 'sprintf'. ([35338](https://github.com/WordPress/gutenberg/pull/35338))
186
- - Replace tinycolor2 with colord on block library package. ([35184](https://github.com/WordPress/gutenberg/pull/35184)
187
-
188
-
189
- #### Components
190
- - Refactor `Navigator*` folder structure, rename `Navigator` to `NavigatorProvider`. ([35160](https://github.com/WordPress/gutenberg/pull/35160))
191
- - Replace tinycolor2 with colord. ([35185](https://github.com/WordPress/gutenberg/pull/35185))
192
- - ToolsPanel component: Refactor to typescript. ([34028](https://github.com/WordPress/gutenberg/pull/34028))
193
- - UnitControl component: Refactor utils to TypeScript. ([35138](https://github.com/WordPress/gutenberg/pull/35138))
194
- - Do not export `SimpleColorSwatch` in Storybook examples for Item Group. ([35179](https://github.com/WordPress/gutenberg/pull/35179))
195
- - Refactor Navigator to TypeScript. ([35214](https://github.com/WordPress/gutenberg/pull/35214))
196
-
197
- #### Global Styles
198
- - Simplify code that deals with user data for clarity. ([35248](https://github.com/WordPress/gutenberg/pull/35248))
199
- - Simplify how we register preset metadata. ([35228](https://github.com/WordPress/gutenberg/pull/35228))
200
- - Reorganize the global styles UI code base. ([35218](https://github.com/WordPress/gutenberg/pull/35218))
201
- - Don't output preset classes for colors defined by the theme ([35514](https://github.com/WordPress/gutenberg/pull/35514))
202
-
203
- #### Post Editor
204
- - Keyboard Shortcuts: Use a new selector getter method. ([35385](https://github.com/WordPress/gutenberg/pull/35385))
205
-
206
- #### Navigation Component
207
- - Refactor the preferences modal to use the new Navigator components. ([35142](https://github.com/WordPress/gutenberg/pull/35142))
208
- - Navigation Editor: Remove duplicated stripHTML. ([35189](https://github.com/WordPress/gutenberg/pull/35189))
209
-
210
- #### Widgets Editor
211
- - Migrate edit-widgets store to thunks. ([35110](https://github.com/WordPress/gutenberg/pull/35110))
212
-
213
- ### Tools
214
-
215
- #### Build Tooling
216
- - Remove polyfills from view.js block scripts. ([35038](https://github.com/WordPress/gutenberg/pull/35038))
217
-
218
- #### Testing
219
- - Add tests for `Navigator*`. ([35163](https://github.com/WordPress/gutenberg/pull/35163))
220
- - Enable flaky tests reporter bot in PRs. ([35029](https://github.com/WordPress/gutenberg/pull/35029))
221
- - Replace tinycolor2 with colord on getMostReadableColor util. Add unit test. ([34625](https://github.com/WordPress/gutenberg/pull/34625))
222
- - Try fixing flaky navigation test. ([35380](https://github.com/WordPress/gutenberg/pull/35380))
223
- - Fix not archiving failure artifacts for flaky tests. ([35379](https://github.com/WordPress/gutenberg/pull/35379))
224
-
225
-
226
- #### Plugins
227
- - Add `oandregal` and `tellthemachines` to codeowners file. ([35233](https://github.com/WordPress/gutenberg/pull/35233))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
228
 
229
 
230
  = 11.6.0 =
1
  == Changelog ==
2
 
3
+ = 11.7.1 =
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  ### Bug Fixes
6
 
7
+ - Rich text: formats: allow format to filter value when changing tag name ([35516](https://github.com/WordPress/gutenberg/pull/35516))
8
+
9
+
10
+ = 11.8.0-rc.1 =
11
+
12
+
13
+
14
+ ### Enhancements
15
+
16
+ - Allow customization of the ARTIFACTS_PATH via WP_ARTIFACTS_PATH env var. ([35371](https://github.com/WordPress/gutenberg/pull/35371))
17
+ - Allow local directories to be passed to --template as relative paths. ([35645](https://github.com/WordPress/gutenberg/pull/35645))
18
+ - Test Setup: Add more-complete mocks of common timer functions. ([35368](https://github.com/WordPress/gutenberg/pull/35368))
19
+
20
+ #### Block Library
21
+ - Add basic example to site logo block. ([35588](https://github.com/WordPress/gutenberg/pull/35588))
22
+ - Add basic example to site-title block. ([35590](https://github.com/WordPress/gutenberg/pull/35590))
23
+ - Add fontStyle control to Site Tagline block. ([35507](https://github.com/WordPress/gutenberg/pull/35507))
24
+ - Add spacing controls to the featured image block. ([35775](https://github.com/WordPress/gutenberg/pull/35775))
25
+ - Add wide + full support to the site tagline block. ([35589](https://github.com/WordPress/gutenberg/pull/35589))
26
+ - Added a "plain" style for quote blocks. ([29856](https://github.com/WordPress/gutenberg/pull/29856))
27
+ - Autogenerate heading anchors. ([30825](https://github.com/WordPress/gutenberg/pull/30825))
28
+ - Comment Content Block: Add typography, color and padding support. ([35183](https://github.com/WordPress/gutenberg/pull/35183))
29
+ - Cover block: Add option to set opacity when background colour used. ([35065](https://github.com/WordPress/gutenberg/pull/35065))
30
+ - Cover block: Allow setting the height from the placeholder state. ([35068](https://github.com/WordPress/gutenberg/pull/35068))
31
+ - Embed: Add Pinterest as an embed provider. ([34895](https://github.com/WordPress/gutenberg/pull/34895))
32
+ - Enable always on burger menu for responsive navigation menus. ([35568](https://github.com/WordPress/gutenberg/pull/35568))
33
+ - Enable slash inserter for heading, list, and quote. ([35360](https://github.com/WordPress/gutenberg/pull/35360))
34
+ - Post editor: Add some top margin. ([35717](https://github.com/WordPress/gutenberg/pull/35717))
35
+ - Try: Site Logo placeholder tweaks. ([35397](https://github.com/WordPress/gutenberg/pull/35397))
36
+ - [Block: Post comment date]: Add link setting and block supports. ([35112](https://github.com/WordPress/gutenberg/pull/35112))
37
+ - [Categories]: Add support for showing only top level categories. ([35726](https://github.com/WordPress/gutenberg/pull/35726))
38
+
39
+ #### Components
40
+ - Fix some issues on the color picker component; Remove tinycolor2;. ([35562](https://github.com/WordPress/gutenberg/pull/35562))
41
+ - Iterate on the design of the colors and gradients panel. ([35535](https://github.com/WordPress/gutenberg/pull/35535))
42
+ - Storybook: Add RTL switcher to toolbar. ([35711](https://github.com/WordPress/gutenberg/pull/35711))
43
+ - Storybook: Enable Controls and disable Knobs by default. ([35682](https://github.com/WordPress/gutenberg/pull/35682))
44
+ - Support "any" step in NumberControl and RangeControl. ([34542](https://github.com/WordPress/gutenberg/pull/34542))
45
+ - ToggleGroupControl: Allow custom aria-label. ([35423](https://github.com/WordPress/gutenberg/pull/35423))
46
+ - Try: Remove segmented control vertical separators. ([35497](https://github.com/WordPress/gutenberg/pull/35497))
47
+ - Update `Navigator` styling to facilitate sticky positioning. ([35518](https://github.com/WordPress/gutenberg/pull/35518))
48
+ - Update the global styles sidebar's root view to use Card components. ([35547](https://github.com/WordPress/gutenberg/pull/35547))
49
+
50
+ #### Themes
51
+ - Enable theme supports automatically for FSE theme. ([35593](https://github.com/WordPress/gutenberg/pull/35593))
52
+ - Remove default padding/margin on the body of the page and editor canvas. ([35421](https://github.com/WordPress/gutenberg/pull/35421))
53
+ - Support title in templateParts. ([35626](https://github.com/WordPress/gutenberg/pull/35626))
54
+
55
+ #### Design Tools
56
+ - Add spacing controls to all heading blocks. ([35772](https://github.com/WordPress/gutenberg/pull/35772))
57
+ - ToolsPanel: Switch to plus icon when no controls present in panel body. ([34107](https://github.com/WordPress/gutenberg/pull/34107))
58
+
59
+ #### Patterns
60
+ - Increase number of items per page for default Query Loop Block. ([35603](https://github.com/WordPress/gutenberg/pull/35603))
61
+ - [Patterns]: Featured patterns from pattern directory. ([35115](https://github.com/WordPress/gutenberg/pull/35115))
62
+
63
+ #### Global Styles
64
+ - Extract the three color panels to their own global styles view. ([35400](https://github.com/WordPress/gutenberg/pull/35400))
65
+ - Move the global styles reset action to a dropdown menu. ([35559](https://github.com/WordPress/gutenberg/pull/35559))
66
+
67
+ #### List View
68
+ - Show ellipsis menu in the List View. ([35170](https://github.com/WordPress/gutenberg/pull/35170))
69
+
70
+ #### REST API
71
+ - Gallery Block: Get media data in a single request. ([34389](https://github.com/WordPress/gutenberg/pull/34389))
72
+
73
+
74
+ ### New APIs
75
+
76
+ - Add PascalCase slug to create-block template strings. ([35462](https://github.com/WordPress/gutenberg/pull/35462))
77
+
78
+
79
+ ### Bug Fixes
80
+
81
+ - Constrained tabbing: Simplify. ([34836](https://github.com/WordPress/gutenberg/pull/34836))
82
+ - Fix HelpHub link i18n for page-jumps. ([35404](https://github.com/WordPress/gutenberg/pull/35404))
83
+ - Fix invisible bottom sheet backdrop on Android. ([35557](https://github.com/WordPress/gutenberg/pull/35557))
84
+ - Fix overflowing content for native Help screen. ([35552](https://github.com/WordPress/gutenberg/pull/35552))
85
+ - Fix sibling inserter animation. ([35729](https://github.com/WordPress/gutenberg/pull/35729))
86
+ - Fix template part block untranslated strings. ([35715](https://github.com/WordPress/gutenberg/pull/35715))
87
+ - Fix updating the block list after block removal. ([35721](https://github.com/WordPress/gutenberg/pull/35721))
88
+ - Fix: Prevent empty renders in ServerSideRender component caused by changing props while already fetching markup. ([35433](https://github.com/WordPress/gutenberg/pull/35433))
89
+ - Fixed condition to show separator correctly. ([35409](https://github.com/WordPress/gutenberg/pull/35409))
90
+ - Popover: Fix __unstableBoundaryParent. ([35082](https://github.com/WordPress/gutenberg/pull/35082))
91
+ - Rich text: Fix internal paste across multiline and single line instances. ([35416](https://github.com/WordPress/gutenberg/pull/35416))
92
+ - Saving post: Transparent disabled button. ([35542](https://github.com/WordPress/gutenberg/pull/35542))
93
+
94
+ #### Block Library
95
+ - Block Settings: Don't render 'Move to' if the block cannot be moved. ([35463](https://github.com/WordPress/gutenberg/pull/35463))
96
+ - Cover block: Update placeholder minHeight style to support non-px units. ([35614](https://github.com/WordPress/gutenberg/pull/35614))
97
+ - Cover: Update 'templateLock' attribute. ([35671](https://github.com/WordPress/gutenberg/pull/35671))
98
+ - Featured Image: Center placeholder chip contents. ([35417](https://github.com/WordPress/gutenberg/pull/35417))
99
+ - Fix site logo block on dark backgrounds. ([35718](https://github.com/WordPress/gutenberg/pull/35718))
100
+ - Heading: Fix undo/redo "trap". ([35767](https://github.com/WordPress/gutenberg/pull/35767))
101
+ - Heading: Remove anchor map when block unmounts. ([35761](https://github.com/WordPress/gutenberg/pull/35761))
102
+
103
+ #### Components
104
+ - Add shortcut provider. ([35652](https://github.com/WordPress/gutenberg/pull/35652))
105
+ - Fix `ToggleGroupControlOption` not passing `ref` to the underlying element. ([35546](https://github.com/WordPress/gutenberg/pull/35546))
106
+ - For Tooltips, prevent emitting events to child elements if they are disabled. ([35254](https://github.com/WordPress/gutenberg/pull/35254))
107
+ - Hide horizontal overflow in `Navigator`. ([35332](https://github.com/WordPress/gutenberg/pull/35332))
108
+ - RawHTML component: Allow multiple children. ([35532](https://github.com/WordPress/gutenberg/pull/35532))
109
+ - Remove extra comma character from Tooltip when underlying component is disabled. ([35247](https://github.com/WordPress/gutenberg/pull/35247))
110
+ - [ToggleGroupControl]: Fix visual state when no option is selected. ([35545](https://github.com/WordPress/gutenberg/pull/35545))
111
+
112
+ #### Themes
113
+ - Custom Templates: Use "title" from the theme.json. ([35592](https://github.com/WordPress/gutenberg/pull/35592))
114
+ - Elements block support: Fix link color rendering on site front end. ([35446](https://github.com/WordPress/gutenberg/pull/35446))
115
+ - Move the link color styles to the footer. ([35425](https://github.com/WordPress/gutenberg/pull/35425))
116
+ - Reset margin for all children of flow layouts. ([35426](https://github.com/WordPress/gutenberg/pull/35426))
117
+
118
+ #### Template Editor
119
+ - FSE: Use slug as template parts area item key. ([35796](https://github.com/WordPress/gutenberg/pull/35796))
120
+ - Fix missing titles in general areas. ([35657](https://github.com/WordPress/gutenberg/pull/35657))
121
+
122
+ #### Block API
123
+ - Blocks: Apply the most recent filters to previously registered blocks. ([34299](https://github.com/WordPress/gutenberg/pull/34299))
124
+ - Fix class serialization of font-size and colors in dynamic blocks that use block supports. ([35751](https://github.com/WordPress/gutenberg/pull/35751))
125
+
126
+ #### Design Tools
127
+ - Border Radius Control: Fix undefined value on first click into RangeControl. ([35651](https://github.com/WordPress/gutenberg/pull/35651))
128
+
129
+ #### Block Editor
130
+ - Inserter: Fix gap between Search and Tabs. ([35537](https://github.com/WordPress/gutenberg/pull/35537))
131
+
132
+ #### REST API
133
+ - Fix preloading middleware referencing stale data for OPTIONS requests. ([35527](https://github.com/WordPress/gutenberg/pull/35527))
134
+
135
+ #### List View
136
+ - Fix expand and collapsing when the icon is clicked. ([35526](https://github.com/WordPress/gutenberg/pull/35526))
137
+
138
+ #### Navigation Screen
139
+ - Navigation: Preload more API requests. ([35402](https://github.com/WordPress/gutenberg/pull/35402))
140
+
141
+
142
+ ### Performance
143
+
144
+ #### Global Styles
145
+ - Pass only the data the site editor uses. ([35458](https://github.com/WordPress/gutenberg/pull/35458))
146
+ - Use a context provider for global styles configuration. ([35622](https://github.com/WordPress/gutenberg/pull/35622))
147
+
148
+ #### CSS & Styling
149
+ - Remove font size classes that are enqueued in the global stylesheet. ([35182](https://github.com/WordPress/gutenberg/pull/35182))
150
+
151
+ #### Block API
152
+ - Allow more than 1 block stylesheets. ([32510](https://github.com/WordPress/gutenberg/pull/32510))
153
+
154
+
155
+ ### Experiments
156
+
157
+ #### Global Styles
158
+ - Allow users to store duotone data. ([35318](https://github.com/WordPress/gutenberg/pull/35318))
159
+ - FSE: Allow child theme.json to be merged with parent theme.json. ([35459](https://github.com/WordPress/gutenberg/pull/35459))
160
+ - Fix presets that use a callback to validate user data. ([35255](https://github.com/WordPress/gutenberg/pull/35255))
161
+ - Font family: Switch from CSS Custom Property to classes. ([31910](https://github.com/WordPress/gutenberg/pull/31910))
162
+ - Update descriptions for the different screens under global styles. ([35429](https://github.com/WordPress/gutenberg/pull/35429))
163
+ - Use text color to render the Aa preview in global styles. ([35631](https://github.com/WordPress/gutenberg/pull/35631))
164
+
165
+ #### Block Library
166
+ - Navigation: Fix issue with space-between. ([35722](https://github.com/WordPress/gutenberg/pull/35722))
167
+ - Submenu item paddings & fixes. ([35716](https://github.com/WordPress/gutenberg/pull/35716))
168
+ - Try: Fix navigation gap & padding issues. ([35752](https://github.com/WordPress/gutenberg/pull/35752))
169
+ - Try: Remove color inheritance specificity. ([35725](https://github.com/WordPress/gutenberg/pull/35725))
170
+
171
+ #### Navigation Screen
172
+ - Use new core functions in menu items REST API. ([35648](https://github.com/WordPress/gutenberg/pull/35648))
173
+
174
+ #### Full Site Editing
175
+ - Try: Remove dotted ancestor border. ([35637](https://github.com/WordPress/gutenberg/pull/35637))
176
+
177
+ #### Design Tools
178
+ - Navigation Block: Add block gap support. ([35277](https://github.com/WordPress/gutenberg/pull/35277))
179
+
180
+ #### Themes
181
+ - CSS: Add a reset for image heights. ([30092](https://github.com/WordPress/gutenberg/pull/30092))
182
+
183
+
184
+ ### Documentation
185
+
186
+ - Add readme for SkipToSelectedBlock component. ([32958](https://github.com/WordPress/gutenberg/pull/32958))
187
+ - Added Table of Contents to FAQ page. ([35455](https://github.com/WordPress/gutenberg/pull/35455))
188
+ - Added missing documentation for the `wrapperProps` property for the `BlockListBlock` component returned by the `editor.blockListEdit` filter. ([26961](https://github.com/WordPress/gutenberg/pull/26961))
189
+ - Docs: Add section on using theme.json schema. ([35739](https://github.com/WordPress/gutenberg/pull/35739))
190
+ - Docs: CustomRadius - Remove plugin only text. ([35582](https://github.com/WordPress/gutenberg/pull/35582))
191
+ - Docs: Update block categories. ([35523](https://github.com/WordPress/gutenberg/pull/35523))
192
+ - Fix markdown highlighting on components CONTRIBUTING.md. ([35633](https://github.com/WordPress/gutenberg/pull/35633))
193
+ - Handbook: Add categories to TOC to help digest the FAQ. ([35519](https://github.com/WordPress/gutenberg/pull/35519))
194
+ - Update README for SelectControl. ([28811](https://github.com/WordPress/gutenberg/pull/28811))
195
+ - Update `npm run build` command for developing with Gutenberg locally. ([35681](https://github.com/WordPress/gutenberg/pull/35681))
196
+ - Update default value of the viewportWidth attribute in documentation. ([35659](https://github.com/WordPress/gutenberg/pull/35659))
197
+ - Update documentation and readme post merge of #35645. ([35679](https://github.com/WordPress/gutenberg/pull/35679))
198
+
199
+ #### Components
200
+ - Add CHANGELOG entry for the fieldset removal from `FontAppearanceControl`. ([35585](https://github.com/WordPress/gutenberg/pull/35585))
201
+ - Add entry to CHANGELOG regarding new ColorPicker. ([35486](https://github.com/WordPress/gutenberg/pull/35486))
202
+ - Mark `CustomSelectControl` `hint` option as experimental. ([35673](https://github.com/WordPress/gutenberg/pull/35673))
203
+ - Polish `ToggleGroupControl`. ([35600](https://github.com/WordPress/gutenberg/pull/35600))
204
+ - Small tweaks to contributing guidelines. ([35620](https://github.com/WordPress/gutenberg/pull/35620))
205
+
206
+
207
+ ### Code Quality
208
+
209
+ - Convert `usePrevious` hook to TypeScript. ([35597](https://github.com/WordPress/gutenberg/pull/35597))
210
+ - Fix odd usage of transform-styles wrap function (and tighten types). ([23599](https://github.com/WordPress/gutenberg/pull/23599))
211
+ - Update Callers to handle when getBlockType return undefined. ([35097](https://github.com/WordPress/gutenberg/pull/35097))
212
+ - Use new color picker props. ([35566](https://github.com/WordPress/gutenberg/pull/35566))
213
+
214
+ #### Components
215
+ - Chore: Remove tinycolor object usage from the gradient picker. ([35544](https://github.com/WordPress/gutenberg/pull/35544))
216
+ - FontAppearanceControl: Remove `fieldset` wrapper. ([35461](https://github.com/WordPress/gutenberg/pull/35461))
217
+ - Polish ResizableBox and convert it to TypeScript. ([35062](https://github.com/WordPress/gutenberg/pull/35062))
218
+ - Remove duplicated className in Card component. ([35333](https://github.com/WordPress/gutenberg/pull/35333))
219
+ - Remove unused `useJumpStep` utility. ([35561](https://github.com/WordPress/gutenberg/pull/35561))
220
+ - Replace the color picker component with the new version. ([35220](https://github.com/WordPress/gutenberg/pull/35220))
221
+ - ToolsPanel: Remove hardcoded classnames. ([35415](https://github.com/WordPress/gutenberg/pull/35415))
222
+ - UnitControl component: Refactor JSX components to TypeScript. ([35281](https://github.com/WordPress/gutenberg/pull/35281))
223
+
224
+ #### Global Styles
225
+ - Child theme.json: Update test to better capture that childs can update single parts in isolation. ([35759](https://github.com/WordPress/gutenberg/pull/35759))
226
+ - Refactor how the Global Styles access and sets data. ([35264](https://github.com/WordPress/gutenberg/pull/35264))
227
+
228
+ #### Design Tools
229
+ - Border Radius Control: Add fallback px unit and add utils tests. ([35786](https://github.com/WordPress/gutenberg/pull/35786))
230
+
231
+ #### Post Editor
232
+ - Fix-up Post Editor’s preferences modal. ([35369](https://github.com/WordPress/gutenberg/pull/35369))
233
+
234
+
235
+ ### Tools
236
+
237
+ - Scripts: Remove inject polyfill by default. ([35436](https://github.com/WordPress/gutenberg/pull/35436))
238
+
239
+ #### Testing
240
+ - Fix taxonomies flaky tests. ([35534](https://github.com/WordPress/gutenberg/pull/35534))
241
+ - Performance tests: Add more detailed loading metrics. ([32237](https://github.com/WordPress/gutenberg/pull/32237))
242
+ - Try another fix for flaky nav test. ([35443](https://github.com/WordPress/gutenberg/pull/35443))
243
+ - [Automated Testing]: Fix preview end-to-end tests. ([35565](https://github.com/WordPress/gutenberg/pull/35565))
244
+
245
+ #### Build Tooling
246
+ - Build Workflow: Revert version bump if build job fails. ([33239](https://github.com/WordPress/gutenberg/pull/33239))
247
+ - Updates react-native-aztec android to use S3 dependency for Aztec editor. ([35606](https://github.com/WordPress/gutenberg/pull/35606))
248
+
249
+ #### Components
250
+ - Panel: Improve unit tests. ([35658](https://github.com/WordPress/gutenberg/pull/35658))
251
+
252
+
253
+ ### Various
254
+
255
+ - Add the storybook link to the `/components` README. ([35493](https://github.com/WordPress/gutenberg/pull/35493))
256
+ - Allow the specification of blocks allowed within columns. ([35342](https://github.com/WordPress/gutenberg/pull/35342))
257
+ - Enable/skipped metabox test. ([35594](https://github.com/WordPress/gutenberg/pull/35594))
258
+ - FSE: Coding standards: DOCTYPE should be the first line/character of any HTML document. ([35442](https://github.com/WordPress/gutenberg/pull/35442))
259
+ - Mobile - Update macos version from latest to 11. ([35770](https://github.com/WordPress/gutenberg/pull/35770))
260
+ - Remove: Tinycolor usage from component color utils. ([35553](https://github.com/WordPress/gutenberg/pull/35553))
261
+ - Storybook: Add story for TypographyPanel. ([35293](https://github.com/WordPress/gutenberg/pull/35293))
262
+ - Translation note for Home/end to avoid mistranslations. ([35669](https://github.com/WordPress/gutenberg/pull/35669))
263
+ - Unify theme block placeholder content. ([35517](https://github.com/WordPress/gutenberg/pull/35517))
264
+ - Update DateTimePicker component README to remove reference to isDayHighlighted callback. ([35363](https://github.com/WordPress/gutenberg/pull/35363))
265
+ - [Block: Post comment author]: Add link settings and block supports. ([35595](https://github.com/WordPress/gutenberg/pull/35595))
266
+ - feat(SelectControl): Add children prop. ([29540](https://github.com/WordPress/gutenberg/pull/29540))
267
+
268
+ #### Block Library
269
+ - Add allowedBlocks and TemplateLock attributes in Cover Block. ([31326](https://github.com/WordPress/gutenberg/pull/31326))
270
+ - Cover Block: Use the description in the placeholder. ([34970](https://github.com/WordPress/gutenberg/pull/34970))
271
+ - Cover block: Change dimRatio to 50 if media added and dimRatio is set to 100. ([35789](https://github.com/WordPress/gutenberg/pull/35789))
272
+ - Cover block: Only use white text when the background of the cover block is dark. ([33541](https://github.com/WordPress/gutenberg/pull/33541))
273
+ - Enable inheritance in search block. ([35723](https://github.com/WordPress/gutenberg/pull/35723))
274
+ - Featured image block and Image blocks: Remove descendent space. ([35466](https://github.com/WordPress/gutenberg/pull/35466))
275
+ - Page List: Show empty placeholder if no items. ([35441](https://github.com/WordPress/gutenberg/pull/35441))
276
+ - Polish logos only style. ([35586](https://github.com/WordPress/gutenberg/pull/35586))
277
+ - Quote: Update deprecation to expect style block supports. ([35615](https://github.com/WordPress/gutenberg/pull/35615))
278
+ - Remove deprecated classnames from Navigation Link block. ([35358](https://github.com/WordPress/gutenberg/pull/35358))
279
+ - Site Logo: Move Reset button to the Replace menu dropdown. ([35372](https://github.com/WordPress/gutenberg/pull/35372))
280
+ - Site Logo: Remove "Reset" button icon. ([35434](https://github.com/WordPress/gutenberg/pull/35434))
281
+ - Social Icons: Add top and bottom margin support. ([35374](https://github.com/WordPress/gutenberg/pull/35374))
282
+ - [Buttons block]: Add gap and vertical margin support. ([34546](https://github.com/WordPress/gutenberg/pull/34546))
283
+
284
+ #### Components
285
+ - Repositioned RangeControl tooltip and adjusted image zoom control dropdown height. ([27374](https://github.com/WordPress/gutenberg/pull/27374))
286
+ - Storybook: Remove outdated decorator configuration. ([35678](https://github.com/WordPress/gutenberg/pull/35678))
287
+ - Update range control metrics. ([35540](https://github.com/WordPress/gutenberg/pull/35540))
288
+ - [Components] Update FontSize control. ([35395](https://github.com/WordPress/gutenberg/pull/35395))
289
+
290
+ #### Template Editor
291
+ - Add more options to template areas in template details. ([35577](https://github.com/WordPress/gutenberg/pull/35577))
292
+ - Add template areas to template inspector. ([35239](https://github.com/WordPress/gutenberg/pull/35239))
293
+ - Add template details to template parts. ([35444](https://github.com/WordPress/gutenberg/pull/35444))
294
+ - Align the layout of the template card with the block card. ([35391](https://github.com/WordPress/gutenberg/pull/35391))
295
+
296
+ #### Design Tools
297
+ - Block Supports: Switch dimensions inspector controls slot to bubble virtually. ([34725](https://github.com/WordPress/gutenberg/pull/34725))
298
+ - Inspector Controls: Resort the order of the design tools associated with styles hooks. ([35574](https://github.com/WordPress/gutenberg/pull/35574))
299
+ - Post Date: Add more typography options. ([35422](https://github.com/WordPress/gutenberg/pull/35422))
300
+
301
+ #### Site Editor
302
+ - Update site editor block placeholder styling. ([35513](https://github.com/WordPress/gutenberg/pull/35513))
303
+ - Use a dark background for the site editor. ([35520](https://github.com/WordPress/gutenberg/pull/35520))
304
+
305
+ #### Block Editor
306
+ - Add animations for insertion point, dropzone, and other elements. ([33132](https://github.com/WordPress/gutenberg/pull/33132))
307
+ - Adjust Link UI visual styling. ([35414](https://github.com/WordPress/gutenberg/pull/35414))
308
+
309
+ #### Accessibility
310
+ - Rich text popovers: Move to block tools to fix tab order. ([34956](https://github.com/WordPress/gutenberg/pull/34956))
311
+ - Save button: Prevent focus loss. ([34731](https://github.com/WordPress/gutenberg/pull/34731))
312
+
313
+ #### CSS & Styling
314
+ - Block Supports: Add panel specific className. ([35793](https://github.com/WordPress/gutenberg/pull/35793))
315
+
316
+ #### Documentation
317
+ - Clarify documentation for InnerBlocks orientation prop. ([35712](https://github.com/WordPress/gutenberg/pull/35712))
318
+
319
+ #### Themes
320
+ - Add [data-block] to appender. ([35356](https://github.com/WordPress/gutenberg/pull/35356))
321
+
322
+ #### Reusable Blocks
323
+ - Thunkify reusable-blocks store. ([35217](https://github.com/WordPress/gutenberg/pull/35217))
324
+
325
+
326
+
327
+
328
+
329
+ = 11.7.0 =
330
+
331
+ ### Enhancements
332
+
333
+ #### Accessibility
334
+ - Adjust wording for post format suggestions. ([14124](https://github.com/WordPress/gutenberg/pull/14124))
335
+ - Add a visually hidden label for the Search block. ([35034](https://github.com/WordPress/gutenberg/pull/35034))
336
+ - Add an accessible label to the Back button in preferences. ([35340](https://github.com/WordPress/gutenberg/pull/35340))
337
+ - Global Styles: Add accessible label to Back button. ([35325](https://github.com/WordPress/gutenberg/pull/35325))
338
+ - Template title: Include a button and label text when there is no post/page title. ([35148](https://github.com/WordPress/gutenberg/pull/35148))
339
+
340
+
341
+ #### Block Editor
342
+ - Allow other blocks to use the slash inserter. ([35196](https://github.com/WordPress/gutenberg/pull/35196))
343
+ - Enable ability to create Pages from the inline Link UI. ([35083](https://github.com/WordPress/gutenberg/pull/35083))
344
+ - Polish quick inserter. ([35339](https://github.com/WordPress/gutenberg/pull/35339))
345
+ - Remove visual clue from alignment toolbar. ([35080](https://github.com/WordPress/gutenberg/pull/35080))
346
+ - Remove native block inserter onboarding tooltip. ([35150](https://github.com/WordPress/gutenberg/pull/35150))
347
+
348
+ #### Block Library
349
+ - Site Logo: Add duotone support. ([35344](https://github.com/WordPress/gutenberg/pull/35344))
350
+ - Columns block: Enable blockGap and vertical margin support. ([34630](https://github.com/WordPress/gutenberg/pull/34630))
351
+ - File Block: Only display PDF preview height `RangeControl` when embed is enabled. ([35207](https://github.com/WordPress/gutenberg/pull/35207))
352
+ - Navigation: Add transformations from a link to other allowed nav blocks. ([34978](https://github.com/WordPress/gutenberg/pull/34978))
353
+ - Query Loop: Include a Query Pagination option on the block variations. ([35347](https://github.com/WordPress/gutenberg/pull/35347))
354
+ - Show "none" as an alignment option and use contextual text to clarify settings. ([34710](https://github.com/WordPress/gutenberg/pull/34710))
355
+ - Social Links: Add block gap support. ([35236](https://github.com/WordPress/gutenberg/pull/35236))
356
+ - Site Title: Add option to toggle home link. ([31540](https://github.com/WordPress/gutenberg/pull/31540))
357
+ - Site title: update block description. ([34474](https://github.com/WordPress/gutenberg/pull/34474))
358
+ - Transform Nav Links with children into Submenus. ([34831](https://github.com/WordPress/gutenberg/pull/34831))
359
+ - Add an option for displaying the label inside the Navigation Link block. ([34952](https://github.com/WordPress/gutenberg/pull/34952))
360
+ - Add typography settings for the Navigation Link block. ([35324](https://github.com/WordPress/gutenberg/pull/35324))
361
+ - Add option to remove/clear logo from the Site Logo block. ([34820](https://github.com/WordPress/gutenberg/pull/34820))
362
+
363
+ #### Core data
364
+ - Add 'context' to the query parts type definition. ([35069](https://github.com/WordPress/gutenberg/pull/35069))
365
+
366
+ #### Components
367
+ - Add new Navigator components and use them in the global styles sidebar. ([34904](https://github.com/WordPress/gutenberg/pull/34904))
368
+ - Use _builtin property of classes in navigation link PHP. ([35166](https://github.com/WordPress/gutenberg/pull/35166))
369
+ - `Item`: Remove `isAction` and use `onClick` to decide if it should render as `button`. ([35152](https://github.com/WordPress/gutenberg/pull/35152))
370
+ - Make tooltip delay configurable with a property. ([35246](https://github.com/WordPress/gutenberg/pull/35246))
371
+
372
+ #### Design Tools
373
+ - Block gap: Only render CSS variable if corresponding theme setting is enabled. ([35209](https://github.com/WordPress/gutenberg/pull/35209))
374
+ - Format library: Add background color. ([34680](https://github.com/WordPress/gutenberg/pull/34680))
375
+ - Update: Custom gradient picker design. ([34712](https://github.com/WordPress/gutenberg/pull/34712))
376
+
377
+ #### Global Styles
378
+ - Add Padding to the root level of global styles. ([35241](https://github.com/WordPress/gutenberg/pull/35241))
379
+ - Add duotone theme.json styles support. ([34667](https://github.com/WordPress/gutenberg/pull/34667))
380
+ - Extract the color palette to its own global styles screen. ([35109](https://github.com/WordPress/gutenberg/pull/35109))
381
+ - Update the rules to hide/show blocks in the global styles sidebar. ([35178](https://github.com/WordPress/gutenberg/pull/35178))
382
+
383
+ #### Icons
384
+ - Add color icon. ([35187](https://github.com/WordPress/gutenberg/pull/35187))
385
+ - Rename globe icon to url. ([35032](https://github.com/WordPress/gutenberg/pull/35032))
386
+
387
+ #### Site Editor
388
+ - Remove warning box from post terms. ([35242](https://github.com/WordPress/gutenberg/pull/35242))
389
+
390
+ #### Template Editor
391
+ - Add back button for isolated template part editor. ([34732](https://github.com/WordPress/gutenberg/pull/34732))
392
+ - Add template areas to template details. ([35202](https://github.com/WordPress/gutenberg/pull/35202))
393
+
394
+
395
+ ### Bug Fixes
396
+
397
+ #### Block Editor
398
+ - Block Editor: Fix duplicate clientIds when dragging patterns. ([35124](https://github.com/WordPress/gutenberg/pull/35124))
399
+ - Disallow creation of empty links using Link UI directly. ([35060](https://github.com/WordPress/gutenberg/pull/35060))
400
+ - Fix Link UI when hyperlink has an empty `href` value. ([35043](https://github.com/WordPress/gutenberg/pull/35043))
401
+ - Fix missing border in the quick inserter. ([35307](https://github.com/WordPress/gutenberg/pull/35307))
402
+ - Fix toggle off for Duotone control and Post Date block’s date picking control. ([35024](https://github.com/WordPress/gutenberg/pull/35024))
403
+ - useMultiSelection: Avoid crashing editor when block refs aren't available. ([35177](https://github.com/WordPress/gutenberg/pull/35177))
404
+ - Rich text: fix internal paste across multiline and single line instances. ([35416](https://github.com/WordPress/gutenberg/pull/35416))
405
+
406
+ #### Block Library
407
+ - Embed: Remove meetup-com from variations. ([35146](https://github.com/WordPress/gutenberg/pull/35146))
408
+ - Featured Image: Remove descendent space. ([35273](https://github.com/WordPress/gutenberg/pull/35273))
409
+ - Fix: Broken disabled select style in the editor area. ([35135](https://github.com/WordPress/gutenberg/pull/35135))
410
+ - Fix native BlockAlignmentControl. ([35191](https://github.com/WordPress/gutenberg/pull/35191))
411
+ - Gallery block: Fix Safari image sizing issue. ([35309](https://github.com/WordPress/gutenberg/pull/35309))
412
+ - Gallery block: Fix problem with caption showing encode tags when not selected. ([35131](https://github.com/WordPress/gutenberg/pull/35131))
413
+ - Gallery block: Unset alignment on new images to prevent it breaking layout. ([35132](https://github.com/WordPress/gutenberg/pull/35132))
414
+ - Post Template: Remove margins from the block. ([35193](https://github.com/WordPress/gutenberg/pull/35193))
415
+ - Post Title: Always use blockProps. ([35286](https://github.com/WordPress/gutenberg/pull/35286))
416
+ - Post Title: Only render link element if we have a post. ([35284](https://github.com/WordPress/gutenberg/pull/35284))
417
+ - Query Pagination: Don't render an empty container. ([35092](https://github.com/WordPress/gutenberg/pull/35092))
418
+ - Navigation Link: Fix PHP notice in the Navigation Link block. ([34984](https://github.com/WordPress/gutenberg/pull/34984))
419
+ - Fix Post Comment Content block's edit function. ([35190](https://github.com/WordPress/gutenberg/pull/35190))
420
+
421
+ #### Components
422
+ - Color Picker: Match figma metrics. ([35039](https://github.com/WordPress/gutenberg/pull/35039))
423
+ - Remove shift-stepping from range in RangeControl. ([35020](https://github.com/WordPress/gutenberg/pull/35020))
424
+ - Popover: fix __unstableBoundaryParent ([35082](https://github.com/WordPress/gutenberg/pull/35082))
425
+
426
+ #### Design Tools
427
+ - ToolsPanelItem: Add panelId check before calling toggle methods. ([35375](https://github.com/WordPress/gutenberg/pull/35375))
428
+
429
+ #### Media
430
+ - MediaUpload: Ensure current images in a gallery are selected after opening media library. ([35070](https://github.com/WordPress/gutenberg/pull/35070))
431
+
432
+ #### Post Editor
433
+ - Fix missing save label. ([34948](https://github.com/WordPress/gutenberg/pull/34948))
434
+ - Keyboard shortcut: Prevent post saving through keyboard if post saving locked. ([35361](https://github.com/WordPress/gutenberg/pull/35361))
435
+
436
+ #### REST API
437
+ - API Fetch: Improve isMediaUploadRequest check. ([34417](https://github.com/WordPress/gutenberg/pull/34417))
438
+ - Fix slashing when creating or updating a menu item. ([35147](https://github.com/WordPress/gutenberg/pull/35147))
439
+
440
+ #### Server Side Render
441
+ - Prevent empty renders in ServerSideRender component caused by changing props while already fetching markup ([35433](https://github.com/WordPress/gutenberg/pull/35433))
442
+
443
+ #### Template Editor
444
+ - Fix the styling of template details. ([35285](https://github.com/WordPress/gutenberg/pull/35285))
445
+
446
+ #### Widgets Editor
447
+ - inspector-section: Track isOpen to make a better isContextuallyActive() function. ([35055](https://github.com/WordPress/gutenberg/pull/35055))
448
+
449
+
450
+ ### Performance
451
+
452
+ - Edit Site: Optimize useSelect calls. ([35213](https://github.com/WordPress/gutenberg/pull/35213))
453
+ - Memoize entity records selectors properly. ([34323](https://github.com/WordPress/gutenberg/pull/34323))
454
+ - Widgets: Optimize useSelect calls. ([35256](https://github.com/WordPress/gutenberg/pull/35256))
455
+
456
+
457
+ ### Experiments
458
+
459
+ #### Block Library
460
+ - Polish responsive navigation modal, inherit justifications, fix submenu direction. ([35077](https://github.com/WordPress/gutenberg/pull/35077))
461
+ - Polish submenu indicator button. ([35030](https://github.com/WordPress/gutenberg/pull/35030))
462
+ - Fix: Adding nav items from existing menu. ([34837](https://github.com/WordPress/gutenberg/pull/34837))
463
+
464
+ #### Global Styles
465
+ - Add Padding to the root level of global styles. ([35241](https://github.com/WordPress/gutenberg/pull/35241))
466
+ - Add duotone theme.json styles support. ([34667](https://github.com/WordPress/gutenberg/pull/34667))
467
+ - Block gap: Only render CSS variable if corresponding theme setting is enabled. ([35209](https://github.com/WordPress/gutenberg/pull/35209))
468
+ - Extract the color palette to its own global styles screen. ([35109](https://github.com/WordPress/gutenberg/pull/35109))
469
+ - Update the rules to hide/show blocks in the global styles sidebar. ([35178](https://github.com/WordPress/gutenberg/pull/35178))
470
+ - Clean up logic to retrieve GS settings depending on context. ([35437](https://github.com/WordPress/gutenberg/pull/35437))
471
+ - Synchronize user custom post type registration and UI visibility. ([35427](https://github.com/WordPress/gutenberg/pull/35427))
472
+ - Enqueue preset styles for all themes in the editor. ([35424](https://github.com/WordPress/gutenberg/pull/35424))
473
+
474
+
475
+ #### Navigation Screen
476
+ - Remove i18n of help link in navigation editor. ([35313](https://github.com/WordPress/gutenberg/pull/35313))
477
+ - Add a tooltip to Navigation items in a setup state. ([35139](https://github.com/WordPress/gutenberg/pull/35139))
478
+ - Fix gap regression in navigation screen. ([35234](https://github.com/WordPress/gutenberg/pull/35234))
479
+ - Truncate long menu names. ([35188](https://github.com/WordPress/gutenberg/pull/35188))
480
+ - Insert Navigation Link blocks by default in Navigation block. ([34899](https://github.com/WordPress/gutenberg/pull/34899))
481
+ - Migrate resolvers to thunks. ([35044](https://github.com/WordPress/gutenberg/pull/35044))
482
+
483
+ #### Full Site Editing
484
+ - Remove extra styling around "Post content" placeholder. ([35243](https://github.com/WordPress/gutenberg/pull/35243))
485
+
486
+
487
+ ### Documentation
488
+
489
+ #### Handbook
490
+ - Docs: Update testing overview with minor fixes. ([35232](https://github.com/WordPress/gutenberg/pull/35232))
491
+ - Fix typos, grammar in contributors release doc. ([35268](https://github.com/WordPress/gutenberg/pull/35268))
492
+ - Update `nvm` to latest `0.38.0` version in Handbook. ([35125](https://github.com/WordPress/gutenberg/pull/35125))
493
+ - Adding example readme template to contributing guidelines. ([34847](https://github.com/WordPress/gutenberg/pull/34847))
494
+ - Fix erroneous usage of the word `master`. ([35392](https://github.com/WordPress/gutenberg/pull/35392))
495
+
496
+ #### Packages
497
+ - Add instructions for installing plugins/themes with wp-env. ([35064](https://github.com/WordPress/gutenberg/pull/35064))
498
+ - MediaUpload: Reflect the correct filter name in the readme. ([35240](https://github.com/WordPress/gutenberg/pull/35240))
499
+ - Update LinkControl documentation with additional examples. ([35199](https://github.com/WordPress/gutenberg/pull/35199))
500
+ - Update doc block in block editor to fix documentation generation lint error. ([35295](https://github.com/WordPress/gutenberg/pull/35295))
501
+ - Add missing doc blocks for the exported members of edit-widgets store. ([35263](https://github.com/WordPress/gutenberg/pull/35263))
502
+
503
+ ### Code Quality
504
+
505
+ #### Block Editor
506
+ - Add colord package to block editor; Replace tinycolor2 with colord on duotone. (https://github.com/WordPress/gutenberg/pull/34616), [34605](https://github.com/WordPress/gutenberg/pull/34605), [35165](https://github.com/WordPress/gutenberg/pull/35165), [35164](https://github.com/WordPress/gutenberg/pull/35164))
507
+ - Migrate the toggleFeature action to a thunk. ([35075](https://github.com/WordPress/gutenberg/pull/35075))
508
+
509
+ #### Block Library
510
+ - Migrate store actions to thunks. ([35031](https://github.com/WordPress/gutenberg/pull/35031))
511
+ - Post Title Block: Fix argument numbering in 'sprintf'. ([35338](https://github.com/WordPress/gutenberg/pull/35338))
512
+ - Replace tinycolor2 with colord on block library package. ([35184](https://github.com/WordPress/gutenberg/pull/35184)
513
+
514
+
515
+ #### Components
516
+ - Refactor `Navigator*` folder structure, rename `Navigator` to `NavigatorProvider`. ([35160](https://github.com/WordPress/gutenberg/pull/35160))
517
+ - Replace tinycolor2 with colord. ([35185](https://github.com/WordPress/gutenberg/pull/35185))
518
+ - ToolsPanel component: Refactor to typescript. ([34028](https://github.com/WordPress/gutenberg/pull/34028))
519
+ - UnitControl component: Refactor utils to TypeScript. ([35138](https://github.com/WordPress/gutenberg/pull/35138))
520
+ - Do not export `SimpleColorSwatch` in Storybook examples for Item Group. ([35179](https://github.com/WordPress/gutenberg/pull/35179))
521
+ - Refactor Navigator to TypeScript. ([35214](https://github.com/WordPress/gutenberg/pull/35214))
522
+
523
+ #### Global Styles
524
+ - Simplify code that deals with user data for clarity. ([35248](https://github.com/WordPress/gutenberg/pull/35248))
525
+ - Simplify how we register preset metadata. ([35228](https://github.com/WordPress/gutenberg/pull/35228))
526
+ - Reorganize the global styles UI code base. ([35218](https://github.com/WordPress/gutenberg/pull/35218))
527
+ - Don't output preset classes for colors defined by the theme ([35514](https://github.com/WordPress/gutenberg/pull/35514))
528
+
529
+ #### Post Editor
530
+ - Keyboard Shortcuts: Use a new selector getter method. ([35385](https://github.com/WordPress/gutenberg/pull/35385))
531
+
532
+ #### Navigation Component
533
+ - Refactor the preferences modal to use the new Navigator components. ([35142](https://github.com/WordPress/gutenberg/pull/35142))
534
+ - Navigation Editor: Remove duplicated stripHTML. ([35189](https://github.com/WordPress/gutenberg/pull/35189))
535
+
536
+ #### Widgets Editor
537
+ - Migrate edit-widgets store to thunks. ([35110](https://github.com/WordPress/gutenberg/pull/35110))
538
+
539
+ ### Tools
540
+
541
+ #### Build Tooling
542
+ - Remove polyfills from view.js block scripts. ([35038](https://github.com/WordPress/gutenberg/pull/35038))
543
+
544
+ #### Testing
545
+ - Add tests for `Navigator*`. ([35163](https://github.com/WordPress/gutenberg/pull/35163))
546
+ - Enable flaky tests reporter bot in PRs. ([35029](https://github.com/WordPress/gutenberg/pull/35029))
547
+ - Replace tinycolor2 with colord on getMostReadableColor util. Add unit test. ([34625](https://github.com/WordPress/gutenberg/pull/34625))
548
+ - Try fixing flaky navigation test. ([35380](https://github.com/WordPress/gutenberg/pull/35380))
549
+ - Fix not archiving failure artifacts for flaky tests. ([35379](https://github.com/WordPress/gutenberg/pull/35379))
550
+
551
+
552
+ #### Plugins
553
+ - Add `oandregal` and `tellthemachines` to codeowners file. ([35233](https://github.com/WordPress/gutenberg/pull/35233))
554
 
555
 
556
  = 11.6.0 =
gutenberg.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Printing since 1440. This is the development plugin for the new block editor in core.
6
  * Requires at least: 5.7
7
  * Requires PHP: 5.6
8
- * Version: 11.7.0
9
  * Author: Gutenberg Team
10
  * Text Domain: gutenberg
11
  *
@@ -13,8 +13,8 @@
13
  */
14
 
15
  ### BEGIN AUTO-GENERATED DEFINES
16
- define( 'GUTENBERG_VERSION', '11.7.0' );
17
- define( 'GUTENBERG_GIT_COMMIT', '86cb2a519a9b25cba76ef09168c4c091c91dd90a' );
18
  ### END AUTO-GENERATED DEFINES
19
 
20
  gutenberg_pre_init();
5
  * Description: Printing since 1440. This is the development plugin for the new block editor in core.
6
  * Requires at least: 5.7
7
  * Requires PHP: 5.6
8
+ * Version: 11.7.1
9
  * Author: Gutenberg Team
10
  * Text Domain: gutenberg
11
  *
13
  */
14
 
15
  ### BEGIN AUTO-GENERATED DEFINES
16
+ define( 'GUTENBERG_VERSION', '11.7.1' );
17
+ define( 'GUTENBERG_GIT_COMMIT', 'c94f5225d490caaa2d0b26ab409f8b42c898717f' );
18
  ### END AUTO-GENERATED DEFINES
19
 
20
  gutenberg_pre_init();
readme.txt CHANGED
@@ -1,7 +1,7 @@
1
  === Gutenberg ===
2
  Contributors: matveb, joen, karmatosed
3
  Tested up to: 5.8
4
- Stable tag: 11.6.0
5
  License: GPLv2 or later
6
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
7
 
@@ -56,4 +56,4 @@ The four phases of the project are Editing, Customization, Collaboration, and Mu
56
 
57
  == Changelog ==
58
 
59
- To read the changelog for Gutenberg 11.7.0, please navigate to the <a href="https://github.com/WordPress/gutenberg/releases/tag/v11.7.0">release page</a>.
1
  === Gutenberg ===
2
  Contributors: matveb, joen, karmatosed
3
  Tested up to: 5.8
4
+ Stable tag: 11.7.0
5
  License: GPLv2 or later
6
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
7
 
56
 
57
  == Changelog ==
58
 
59
+ To read the changelog for Gutenberg 11.7.1, please navigate to the <a href="https://github.com/WordPress/gutenberg/releases/tag/v11.7.0">release page</a>.