<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[11616] sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns: Pattern Directory: Sync with git WordPress/pattern-directory@8a54a6393365ab5a457827fdb91ef27c84ba00fa</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://meta.trac.wordpress.org/changeset/11616">11616</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://meta.trac.wordpress.org/changeset/11616","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>ryelle</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2022-03-01 17:33:59 +0000 (Tue, 01 Mar 2022)</dd>
</dl>

<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Pattern Directory: Sync with git WordPress/pattern-directory@8a54a6393365ab5a457827fdb91ef27c84ba00fa</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgpatternsbuildindexassetphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/build/index.asset.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgpatternsbuildindexjs">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/build/index.js</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgpatternssrccomponentspatterngridmenuindexjs">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/src/components/pattern-grid-menu/index.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgpatternsbuildindexassetphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/build/index.asset.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/build/index.asset.php  2022-02-25 06:51:15 UTC (rev 11615)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/build/index.asset.php    2022-03-01 17:33:59 UTC (rev 11616)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1 +1 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<?php return array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-dom', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-primitives', 'wp-url'), 'version' => '24c169ea4e7d85c36375a1d017c5eccd');
</del><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php return array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-dom', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-primitives', 'wp-url'), 'version' => 'ee600a055bf8c13ae4dcbf96b76036e3');
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgpatternsbuildindexjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/build/index.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/build/index.js 2022-02-25 06:51:15 UTC (rev 11615)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/build/index.js   2022-03-01 17:33:59 UTC (rev 11616)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -30,4 +30,4 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: Author name */
</span><span class="cx" style="display: block; padding: 0 10px"> (0,o.sprintf)((0,o.__)("Block Patterns by %s","wporg-patterns"),i)):c.push((0,o.__)("Block Pattern Directory","wporg-patterns")),s>1&&c.push(
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: Page number */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-(0,o.sprintf)((0,o.__)("Page %d","wporg-patterns"),s)),c.push((0,o.__)("WordPress.org","wporg-patterns")),c.join(" | ")}));return(0,a.useEffect)((()=>{t&&(document.title=t)}),[t]),null},sn=function(){return(0,a.createElement)("div",{className:"pattern-grid__empty-header"},(0,a.createElement)("h2",null,(0,o.__)("No results found","wporg-patterns")),(0,a.createElement)("p",null,(0,a.createInterpolateElement)((0,o.__)("View <a>all block patterns</a> or browse some of our recent patterns.","wporg-patterns"),{a:(0,a.createElement)("a",{href:wporgPatternsUrl.site})})))},ln=e=>{let{options:t}=e;const{path:n,replace:r}=S(),i=(0,me.useViewportMatch)("medium",">=");return t?(0,a.createElement)("div",{c
 lassName:"pattern-order-select"},(0,a.createElement)(fe.SelectControl,{label:(0,o.__)("Order by","wporg-patterns"),labelPosition:"side",hideLabelFromVision:i,value:(0,v.getQueryArg)(window.location.href,"orderby"),options:t,onChange:e=>{r((0,v.addQueryArgs)(n,{orderby:e}).replace(/\/page\/[\d]+/,""))}})):null},cn=()=>(0,a.createElement)(c,{className:"pattern-menu",style:{flexDirection:"row"}},Array(7).fill().map(((e,t)=>(0,a.createElement)(u,{key:t,height:"1.25rem",width:"5rem",marginRight:"1rem"})))),un=e=>{let{current:t,isLoading:n,label:r=(0,o.__)("Main Menu","wporg-patterns"),onClick:i,options:s}=e;return n?(0,a.createElement)(cn,null):s.length?(0,a.createElement)("nav",null,(0,a.createElement)("h2",{className:"screen-reader-text"},r),(0,a.createElement)("ul",{className:"pattern-menu"},s.ma
 p((e=>(0,a.createElement)("li",{key:e.value},(0,a.createElement)("a",{className:Ct()({"pattern-menu__item":!0,"is-active":t===e.slug}),href:e.value,onClick:i,"aria-current":t===e.slug?"page":void 0},e.label)))))):null},pn=e=>{let{onClick:t,options:n,label:r=(0,o.__)("Browse categories","wporg-patterns")}=e;const[i,s]=(0,a.useState)(!1);return(0,a.createElement)(fe.PanelBody,{className:"pattern-menu is-mobile",title:r,initialOpen:i,opened:i,onToggle:()=>s(!i)},(0,a.createElement)("ul",null,n.map((e=>(0,a.createElement)("li",{key:e.value},(0,a.createElement)("a",{href:e.value,onClick:e=>{s(!1),t(e)}},e.label))))))},dn=e=>(0,me.useViewportMatch)("medium","<")?(0,a.createElement)(pn,e):(0,a.createElement)(un,e),gn=e=>{let{primary:t,secondary:n}=e;return(0,a.createElement)("div",{className:"pattern-navigation-la
 yout"},t&&(0,a.createElement)("div",{className:"pattern-navigation-layout__primary"},t),n&&(0,a.createElement)("div",{className:"pattern-navigation-layout__secondary"},n))},mn=e=>{let{basePath:t="",onNavigation:n,...r}=e;const{path:i,update:l}=S(),{categorySlug:c,isLoading:u,options:p}=(0,s.useSelect)((e=>{var n;const{getCategoryById:r,getCategories:a,getQueryFromUrl:o,getUrlFromQuery:s,isLoadingCategories:l}=e(de),c=o(i);delete c.page;const u=(a()||[]).map((e=>({value:s({...c,"pattern-categories":e.id},wporgPatternsUrl.site+t),slug:e.slug,label:e.name})));return{categorySlug:(null===(n=r(c["pattern-categories"]))||void 0===n?void 0:n.slug)||"",isLoading:l(),options:u}}));return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(gn,{primary:(0,a.createElement)(dn,{current:c,options:p||[],onClick:e=>{e.preventDefault(),l(e.target.pathname),"function"==typeof 
 n&&n()},isLoading:u}),secondary:(0,a.createElement)(ln,{options:[{label:(0,o.__)("Newest","wporg-patterns"),value:"date"},{label:(0,o.__)("Favorites","wporg-patterns"),value:"favorite_count"}]})}),(0,a.createElement)(an,r))},fn=()=>{const{setCurrentQuery:e}=(0,s.useDispatch)(de),{path:t}=S(),n=(0,s.useSelect)((e=>e(de).getQueryFromUrl(t)),[t]);return nn((()=>{e(n)}),[n]),null},hn=window.wp.dom;function vn(){const e=(0,a.useRef)(),t=(0,a.useCallback)((()=>{if(null==e||!e.current)return;const t=hn.focus.tabbable.find(e.current),n=t[t.length-1]||!1;n&&n.focus(),n.focus()}),[]);return[e,t]}var yn=function(e){let{isLoggedIn:t}=e;const n=(0,v.addQueryArgs)(wporgPatternsUrl.login,{redirect_to:window.location}),r=(0,v.addQueryArgs)(wporgPatternsUrl.register,{redirect_to:window.location});return t?(0,a.createElement)("div",{className:"pattern-grid__empty-header pattern-favorites__empty-head
 er"},(0,a.createElement)("h2",null,(0,o.__)("Collect and view your favorite patterns.","wporg-patterns")),(0,a.createElement)("p",null,(0,o.__)("Tap the heart on any pattern to mark it as a favorite. All your favorite patterns will appear here.","wporg-patterns"))):(0,a.createElement)("div",{className:"pattern-grid__empty-header pattern-favorites__empty-header"},(0,a.createElement)("h2",null,(0,o.__)("Collect and view your favorite patterns.","wporg-patterns")),(0,a.createElement)("p",null,(0,o.__)("Log in to your WordPress.org account and you’ll be able to see all your favorite patterns in one place.","wporg-patterns")),(0,a.createElement)("p",null,(0,a.createElement)("a",{className:"button button-primary button-large",href:n},(0,o.__)("Log in","wporg-patterns"))),(0,a.createElement)(&quo
 t;p",null,(0,a.createElement)("a",{className:"button-link link-create-account",href:r},(0,o.__)("Create an account","wporg-patterns"))))};function wn(){const{path:e,update:t}=S();let n=y(e,"my-patterns");"page"===n&&(n="all");const r=[{value:`${wporgPatternsUrl.site}/my-patterns/`,slug:"all",label:(0,o.__)("All","wporg-patterns")},{value:`${wporgPatternsUrl.site}/my-patterns/draft/`,slug:"draft",label:(0,o.__)("Drafts","wporg-patterns")},{value:`${wporgPatternsUrl.site}/my-patterns/pending/`,slug:"pending",label:(0,o.__)("Pending Review","wporg-patterns")}];return(0,a.createElement)(dn,{label:(0,o.__)("Menu","wporg-patterns"),current:n||"all",options:r,onClick:e=>{e.preventDefault(),t(e.target.pathname)},isLoading:!1})}const En=document.getElementById("patterns__container&quo
 t;);En&&(0,a.render)((0,a.createElement)((()=>{const{isEmpty:e,isSearch:t,query:n}=(0,s.useSelect)((e=>{const{getCurrentQuery:t,getPatternsByQuery:n,isLoadingPatternsByQuery:r}=e(de),a=t(),o=a&&r(a),i=a?n(a):[];return{isEmpty:!o&&!i.length,isSearch:a&&!!a.search,query:a}})),[r,o]=vn();return(0,a.createElement)(b,null,(0,a.createElement)(on,null),(0,a.createElement)(fn,null),(0,a.createElement)(Jt,null),(0,a.createElement)("div",{ref:r},t?(0,a.createElement)(an,{query:n}):(0,a.createElement)(mn,{onNavigation:o})),e?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(sn,null),(0,a.createElement)(ge,{query:{per_page:6},showPagination:!1},(e=>(0,a.createElement)(Ut,{key:e.id,pattern:e,showAvatar:!0})))):(0,a.createElement)(ge,{query:n,onNavigation:o},(e=>(0,a.createElement)(Ut,{key:e.id,pattern:e,showAvatar:!0}))))}),null),En);const bn=document.getElementById("my-patterns__container");bn&&(0,a.render)((0,a.creat
 eElement)((()=>{const e=wporgPatternsData.userId,{isEmpty:t,query:n}=(0,s.useSelect)((t=>{const{getCurrentQuery:n,getPatternsByQuery:r,isLoadingPatternsByQuery:a}=t(de),o={status:"any",...n()||{},author:e},i=e&&a(o),s=e?r(o):[];return{isEmpty:!i&&!s.length,query:o}}));if(!e){const e=(0,v.addQueryArgs)(wporgPatternsUrl.login,{redirect_to:window.location});return(0,a.createElement)("div",{className:"entry-content"},(0,a.createElement)("p",null,(0,o.__)("Please log in to view your patterns.","wporg-patterns")),(0,a.createElement)("a",{className:"button button-primary",href:e},(0,o.__)("Log in","wporg-patterns")))}return(0,a.createElement)(b,null,(0,a.createElement)(fn,null),(0,a.createElement)(gn,{primary:(0,a.createElement)(wn,null),secondary:(0,a.createElement)(ln,{options:[{label:(0,o.__)("Newest","wporg-patterns"),value:"date"},{lab
 el:(0,o.__)("Favorites","wporg-patterns"),value:"favorite_count"}]})}),t?(0,a.createElement)("div",{className:"pattern-grid__empty-header"},(0,a.createElement)("h2",null,(0,o.__)("Nothing found","wporg-patterns")),(0,a.createElement)("p",null,(0,o.__)("You haven’t created any patterns yet.","wporg-patterns"))):(0,a.createElement)(ge,{query:n},(e=>(0,a.createElement)(Ut,{key:e.id,pattern:e,showOptions:!0}))))}),null),bn);const Sn=document.getElementById("pattern-favorites__container");Sn&&(0,a.render)((0,a.createElement)((()=>{const{isEmpty:e,query:t}=(0,s.useSelect)((e=>{const{getCurrentQuery:t,getFavorites:n,getPatternsByQuery:r,isLoadingPatternsByQuery:a}=e(de),o=t()||{},i=n();if(null===i)return{query:!1,isEmpty:!1};const s={...o,include:i},l=!!i.length&&a(s),c=i.length?r(s):[];return{query:s,isEmpty:!l&&!c.length}})),[n,r]=vn()
 ,i={orderby:"favorite_count",per_page:6};t["pattern-categories"]&&(i["pattern-categories"]=t["pattern-categories"]);const l=!!wporgPatternsData.userId;return(0,a.createElement)(b,null,(0,a.createElement)(fn,null),(0,a.createElement)("div",{ref:n},l&&(0,a.createElement)(mn,{basePath:"/favorites/",query:t,onNavigation:r})),!l||e?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(yn,{isLoggedIn:l}),(0,a.createElement)(ge,{header:(0,a.createElement)("h2",{className:"pattern-favorites__grid-title"},(0,o.__)("Here’s a few of our favorite patterns","wporg-patterns")),query:i,showPagination:!1},(e=>(0,a.createElement)(Ut,{key:e.id,pattern:e,showAvatar:!0})))):(0,a.createElement)(ge,{query:t,onNavigation:r},(e=>(0,a.createElement)(Ut,{key:e.id,pattern:e,showAvatar:!0}))))}),null),Sn);const Pn=document.querySelectorAll(".pattern__container");for(let e=0;e&
 lt;Pn.length;e++){const t=Pn[e],n=t.dataset;(0,a.render)((0,a.createElement)(Yt,n),t,(()=>{t.hidden=!1,document.querySelectorAll(".hide-if-pattern-loaded").forEach((e=>e.hidden=!0))}))}}()}();
</del><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+(0,o.sprintf)((0,o.__)("Page %d","wporg-patterns"),s)),c.push((0,o.__)("WordPress.org","wporg-patterns")),c.join(" | ")}));return(0,a.useEffect)((()=>{t&&(document.title=t)}),[t]),null},sn=function(){return(0,a.createElement)("div",{className:"pattern-grid__empty-header"},(0,a.createElement)("h2",null,(0,o.__)("No results found","wporg-patterns")),(0,a.createElement)("p",null,(0,a.createInterpolateElement)((0,o.__)("View <a>all block patterns</a> or browse some of our recent patterns.","wporg-patterns"),{a:(0,a.createElement)("a",{href:wporgPatternsUrl.site})})))},ln=e=>{let{options:t}=e;const{path:n,replace:r}=S(),i=(0,me.useViewportMatch)("medium",">=");return t?(0,a.createElement)("div",{c
 lassName:"pattern-order-select"},(0,a.createElement)(fe.SelectControl,{label:(0,o.__)("Order by","wporg-patterns"),labelPosition:"side",hideLabelFromVision:i,value:(0,v.getQueryArg)(window.location.href,"orderby"),options:t,onChange:e=>{r((0,v.addQueryArgs)(n,{orderby:e}).replace(/\/page\/[\d]+/,""))}})):null},cn=()=>(0,a.createElement)(c,{className:"pattern-menu",style:{flexDirection:"row"}},Array(7).fill().map(((e,t)=>(0,a.createElement)(u,{key:t,height:"1.25rem",width:"5rem",marginRight:"1rem"})))),un=e=>{let{current:t,isLoading:n,label:r=(0,o.__)("Main Menu","wporg-patterns"),onClick:i,options:s}=e;return n?(0,a.createElement)(cn,null):s.length?(0,a.createElement)("nav",null,(0,a.createElement)("h2",{className:"screen-reader-text"},r),(0,a.createElement)("ul",{className:"pattern-menu"},s.ma
 p((e=>(0,a.createElement)("li",{key:e.value},(0,a.createElement)("a",{className:Ct()({"pattern-menu__item":!0,"is-active":t===e.slug}),href:e.value,onClick:i,"aria-current":t===e.slug?"page":void 0},e.label)))))):null},pn=e=>{let{onClick:t,options:n,label:r=(0,o.__)("Browse categories","wporg-patterns")}=e;const[i,s]=(0,a.useState)(!1);return(0,a.createElement)(fe.PanelBody,{className:"pattern-menu is-mobile",title:r,initialOpen:i,opened:i,onToggle:()=>s(!i)},(0,a.createElement)("ul",null,n.map((e=>(0,a.createElement)("li",{key:e.value},(0,a.createElement)("a",{href:e.value,onClick:e=>{s(!1),t(e)}},e.label))))))},dn=e=>(0,me.useViewportMatch)("medium","<")?(0,a.createElement)(pn,e):(0,a.createElement)(un,e),gn=e=>{let{primary:t,secondary:n}=e;return(0,a.createElement)("div",{className:"pattern-navigation-la
 yout"},t&&(0,a.createElement)("div",{className:"pattern-navigation-layout__primary"},t),n&&(0,a.createElement)("div",{className:"pattern-navigation-layout__secondary"},n))},mn=e=>{let{basePath:t="",onNavigation:n,...r}=e;const{path:i,update:l}=S(),{categorySlug:c,isLoading:u,options:p}=(0,s.useSelect)((e=>{var n;const{getCategoryById:r,getCategories:a,getQueryFromUrl:o,getUrlFromQuery:s,isLoadingCategories:l}=e(de),c=o(i);delete c.page;const u=(a()||[]).map((e=>({value:s({...c,"pattern-categories":e.id},wporgPatternsUrl.site+t),slug:e.slug,label:e.name})));return{categorySlug:(null===(n=r(c["pattern-categories"]))||void 0===n?void 0:n.slug)||"",isLoading:l(),options:u}}));return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(gn,{primary:(0,a.createElement)(dn,{current:c,options:p||[],onClick:e=>{e.preventDefault(),l(e.target.pathname),"function"==typeof 
 n&&n()},isLoading:u}),secondary:(0,a.createElement)(ln,{options:[{label:(0,o.__)("Newest","wporg-patterns"),value:"date"},{label:(0,o.__)("Popular","wporg-patterns"),value:"favorite_count"}]})}),(0,a.createElement)(an,r))},fn=()=>{const{setCurrentQuery:e}=(0,s.useDispatch)(de),{path:t}=S(),n=(0,s.useSelect)((e=>e(de).getQueryFromUrl(t)),[t]);return nn((()=>{e(n)}),[n]),null},hn=window.wp.dom;function vn(){const e=(0,a.useRef)(),t=(0,a.useCallback)((()=>{if(null==e||!e.current)return;const t=hn.focus.tabbable.find(e.current),n=t[t.length-1]||!1;n&&n.focus(),n.focus()}),[]);return[e,t]}var yn=function(e){let{isLoggedIn:t}=e;const n=(0,v.addQueryArgs)(wporgPatternsUrl.login,{redirect_to:window.location}),r=(0,v.addQueryArgs)(wporgPatternsUrl.register,{redirect_to:window.location});return t?(0,a.createElement)("div",{className:"pattern-grid__empty-header pattern-favorites__empty-header
 "},(0,a.createElement)("h2",null,(0,o.__)("Collect and view your favorite patterns.","wporg-patterns")),(0,a.createElement)("p",null,(0,o.__)("Tap the heart on any pattern to mark it as a favorite. All your favorite patterns will appear here.","wporg-patterns"))):(0,a.createElement)("div",{className:"pattern-grid__empty-header pattern-favorites__empty-header"},(0,a.createElement)("h2",null,(0,o.__)("Collect and view your favorite patterns.","wporg-patterns")),(0,a.createElement)("p",null,(0,o.__)("Log in to your WordPress.org account and you’ll be able to see all your favorite patterns in one place.","wporg-patterns")),(0,a.createElement)("p",null,(0,a.createElement)("a",{className:"button button-primary button-large",href:n},(0,o.__)("Log in","wporg-patterns"))),(0,a.createElement)("
 p",null,(0,a.createElement)("a",{className:"button-link link-create-account",href:r},(0,o.__)("Create an account","wporg-patterns"))))};function wn(){const{path:e,update:t}=S();let n=y(e,"my-patterns");"page"===n&&(n="all");const r=[{value:`${wporgPatternsUrl.site}/my-patterns/`,slug:"all",label:(0,o.__)("All","wporg-patterns")},{value:`${wporgPatternsUrl.site}/my-patterns/draft/`,slug:"draft",label:(0,o.__)("Drafts","wporg-patterns")},{value:`${wporgPatternsUrl.site}/my-patterns/pending/`,slug:"pending",label:(0,o.__)("Pending Review","wporg-patterns")}];return(0,a.createElement)(dn,{label:(0,o.__)("Menu","wporg-patterns"),current:n||"all",options:r,onClick:e=>{e.preventDefault(),t(e.target.pathname)},isLoading:!1})}const En=document.getElementById("patterns__container"
 );En&&(0,a.render)((0,a.createElement)((()=>{const{isEmpty:e,isSearch:t,query:n}=(0,s.useSelect)((e=>{const{getCurrentQuery:t,getPatternsByQuery:n,isLoadingPatternsByQuery:r}=e(de),a=t(),o=a&&r(a),i=a?n(a):[];return{isEmpty:!o&&!i.length,isSearch:a&&!!a.search,query:a}})),[r,o]=vn();return(0,a.createElement)(b,null,(0,a.createElement)(on,null),(0,a.createElement)(fn,null),(0,a.createElement)(Jt,null),(0,a.createElement)("div",{ref:r},t?(0,a.createElement)(an,{query:n}):(0,a.createElement)(mn,{onNavigation:o})),e?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(sn,null),(0,a.createElement)(ge,{query:{per_page:6},showPagination:!1},(e=>(0,a.createElement)(Ut,{key:e.id,pattern:e,showAvatar:!0})))):(0,a.createElement)(ge,{query:n,onNavigation:o},(e=>(0,a.createElement)(Ut,{key:e.id,pattern:e,showAvatar:!0}))))}),null),En);const bn=document.getElementById("my-patterns__container");bn&&(0,a.render)((0,a.createE
 lement)((()=>{const e=wporgPatternsData.userId,{isEmpty:t,query:n}=(0,s.useSelect)((t=>{const{getCurrentQuery:n,getPatternsByQuery:r,isLoadingPatternsByQuery:a}=t(de),o={status:"any",...n()||{},author:e},i=e&&a(o),s=e?r(o):[];return{isEmpty:!i&&!s.length,query:o}}));if(!e){const e=(0,v.addQueryArgs)(wporgPatternsUrl.login,{redirect_to:window.location});return(0,a.createElement)("div",{className:"entry-content"},(0,a.createElement)("p",null,(0,o.__)("Please log in to view your patterns.","wporg-patterns")),(0,a.createElement)("a",{className:"button button-primary",href:e},(0,o.__)("Log in","wporg-patterns")))}return(0,a.createElement)(b,null,(0,a.createElement)(fn,null),(0,a.createElement)(gn,{primary:(0,a.createElement)(wn,null),secondary:(0,a.createElement)(ln,{options:[{label:(0,o.__)("Newest","wporg-patterns"),value:"date"},{label
 :(0,o.__)("Favorites","wporg-patterns"),value:"favorite_count"}]})}),t?(0,a.createElement)("div",{className:"pattern-grid__empty-header"},(0,a.createElement)("h2",null,(0,o.__)("Nothing found","wporg-patterns")),(0,a.createElement)("p",null,(0,o.__)("You haven’t created any patterns yet.","wporg-patterns"))):(0,a.createElement)(ge,{query:n},(e=>(0,a.createElement)(Ut,{key:e.id,pattern:e,showOptions:!0}))))}),null),bn);const Sn=document.getElementById("pattern-favorites__container");Sn&&(0,a.render)((0,a.createElement)((()=>{const{isEmpty:e,query:t}=(0,s.useSelect)((e=>{const{getCurrentQuery:t,getFavorites:n,getPatternsByQuery:r,isLoadingPatternsByQuery:a}=e(de),o=t()||{},i=n();if(null===i)return{query:!1,isEmpty:!1};const s={...o,include:i},l=!!i.length&&a(s),c=i.length?r(s):[];return{query:s,isEmpty:!l&&!c.length}})),[n,r]=vn(),i
 ={orderby:"favorite_count",per_page:6};t["pattern-categories"]&&(i["pattern-categories"]=t["pattern-categories"]);const l=!!wporgPatternsData.userId;return(0,a.createElement)(b,null,(0,a.createElement)(fn,null),(0,a.createElement)("div",{ref:n},l&&(0,a.createElement)(mn,{basePath:"/favorites/",query:t,onNavigation:r})),!l||e?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(yn,{isLoggedIn:l}),(0,a.createElement)(ge,{header:(0,a.createElement)("h2",{className:"pattern-favorites__grid-title"},(0,o.__)("Here’s a few of our favorite patterns","wporg-patterns")),query:i,showPagination:!1},(e=>(0,a.createElement)(Ut,{key:e.id,pattern:e,showAvatar:!0})))):(0,a.createElement)(ge,{query:t,onNavigation:r},(e=>(0,a.createElement)(Ut,{key:e.id,pattern:e,showAvatar:!0}))))}),null),Sn);const Pn=document.querySelectorAll(".pattern__container");for(let e=0;e&lt
 ;Pn.length;e++){const t=Pn[e],n=t.dataset;(0,a.render)((0,a.createElement)(Yt,n),t,(()=>{t.hidden=!1,document.querySelectorAll(".hide-if-pattern-loaded").forEach((e=>e.hidden=!0))}))}}()}();
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgpatternssrccomponentspatterngridmenuindexjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/src/components/pattern-grid-menu/index.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/src/components/pattern-grid-menu/index.js      2022-02-25 06:51:15 UTC (rev 11615)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/src/components/pattern-grid-menu/index.js        2022-03-01 17:33:59 UTC (rev 11616)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -62,7 +62,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                        <PatternOrderSelect
</span><span class="cx" style="display: block; padding: 0 10px">                                                options={ [
</span><span class="cx" style="display: block; padding: 0 10px">                                                        { label: __( 'Newest', 'wporg-patterns' ), value: 'date' },
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                                        { label: __( 'Favorites', 'wporg-patterns' ), value: 'favorite_count' },
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                                 { label: __( 'Popular', 'wporg-patterns' ), value: 'favorite_count' },
</ins><span class="cx" style="display: block; padding: 0 10px">                                                 ] }
</span><span class="cx" style="display: block; padding: 0 10px">                                        />
</span><span class="cx" style="display: block; padding: 0 10px">                                }
</span></span></pre>
</div>
</div>

</body>
</html>