mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-12 07:38:33 +02:00
This patch, somewhat small brings a lot to WordPress. This includes features like: - DataViews. - Customization tools like box shadow, background size and repeat. - UI improvements in the site editor. - Preferences sharing between the post and site editors. - Unified panels and editors between post and site editors. - Improved template mode in the post editor. - Iterations to multiple interactive blocks. - Preparing the blocks and UI for pattern overrides. - and a lot more. Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj. See #60315. Built from https://develop.svn.wordpress.org/trunk@57377 git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 line
1.5 KiB
JavaScript
1 line
1.5 KiB
JavaScript
(self.webpackChunkWordPress=self.webpackChunkWordPress||[]).push([[908],{908:function(t,e,o){o.r(e),o.d(e,{actions:function(){return u},state:function(){return l}});var r=o(998);const n=new Map,i=t=>{const e=new URL(t,window.location);return e.pathname+e.search},s=t=>{const e={},o=`data-${r.directivePrefix}-router-region`;t.querySelectorAll(`[${o}]`).forEach((t=>{const n=t.getAttribute(o);e[n]=(0,r.toVdom)(t)}));const n=t.querySelector("title")?.innerText;return{regions:e,title:n}},a=t=>{const e=`data-${r.directivePrefix}-router-region`;document.querySelectorAll(`[${e}]`).forEach((o=>{const n=o.getAttribute(e),i=(0,r.getRegionRootFragment)(o);(0,r.render)(t.regions[n],i)})),t.title&&(document.title=t.title)};let c="";window.addEventListener("popstate",(async()=>{const t=i(window.location),e=n.has(t)&&await n.get(t);e?a(e):window.location.reload()})),n.set(i(window.location),Promise.resolve(s(document)));const{state:l,actions:u}=(0,r.store)("core/router",{actions:{*navigate(t,e={}){const o=i(t);c=t,u.prefetch(o,e);const r=new Promise((t=>{var o;return setTimeout(t,null!==(o=e.timeout)&&void 0!==o?o:1e4)})),s=yield Promise.race([n.get(o),r]);c===t&&(s?(a(s),window.history[e.replace?"replaceState":"pushState"]({},"",t)):(window.location.assign(t),yield new Promise((()=>{}))))},prefetch(t,e={}){t=i(t),!e.force&&n.has(t)||n.set(t,(async(t,{html:e})=>{try{if(!e){const o=await window.fetch(t);if(200!==o.status)return!1;e=await o.text()}const o=(new window.DOMParser).parseFromString(e,"text/html");return s(o)}catch(t){return!1}})(t,e))}}})}}]); |