WordPress/wp-includes/blocks/query.min.js
youknowriad 1de40f71be Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
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
2024-01-29 21:07:12 +00:00

1 line
4.0 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import*as e from"@wordpress/interactivity";var t,n,r={998:function(t,n,r){t.exports=(e=>{var t={};return r.d(t,e),t})({directivePrefix:()=>e.directivePrefix,getContext:()=>e.getContext,getElement:()=>e.getElement,getRegionRootFragment:()=>e.getRegionRootFragment,render:()=>e.render,store:()=>e.store,toVdom:()=>e.toVdom})}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return r[e](n,n.exports,i),n.exports}i.m=r,i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=function(e){return Promise.all(Object.keys(i.f).reduce((function(t,n){return i.f[n](e,t),t}),[]))},i.u=function(e){return"./blocks/"+e+".min.js"},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t={},n="WordPress:",i.l=function(e,r,o,a){if(t[e])t[e].push(r);else{var s,u;if(void 0!==o)for(var c=document.getElementsByTagName("script"),f=0;f<c.length;f++){var l=c[f];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==n+o){s=l;break}}s||(u=!0,(s=document.createElement("script")).type="module",s.charset="utf-8",s.timeout=120,i.nc&&s.setAttribute("nonce",i.nc),s.setAttribute("data-webpack",n+o),s.src=e),t[e]=[r];var d=function(n,r){s.onerror=s.onload=null,clearTimeout(m);var o=t[e];if(delete t[e],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((function(e){return e(r)})),n)return n(r)},m=setTimeout(d.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=d.bind(null,s.onerror),s.onload=d.bind(null,s.onload),u&&document.head.appendChild(s)}},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;if("string"==typeof import.meta.url&&(e=import.meta.url),!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e+"../"}(),function(){var e={658:0};i.f.j=function(t,n){var r=i.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise((function(n,o){r=e[t]=[n,o]}));n.push(r[2]=o);var a=i.p+i.u(t),s=new Error;i.l(a,(function(n){if(i.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",s.name="ChunkLoadError",s.type=o,s.request=a,r[1](s)}}),"chunk-"+t,t)}};var t=function(t,n){var r,o,a=n[0],s=n[1],u=n[2],c=0;if(a.some((function(t){return 0!==e[t]}))){for(r in s)i.o(s,r)&&(i.m[r]=s[r]);if(u)u(i)}for(t&&t(n);c<a.length;c++)o=a[c],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=self.webpackChunkWordPress=self.webpackChunkWordPress||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}(),function(){var e=i(998);const t=e=>e&&e instanceof window.HTMLAnchorElement&&e.href&&(!e.target||"_self"===e.target)&&e.origin===window.location.origin;(0,e.store)("core/query",{state:{get startAnimation(){return"start"===(0,e.getContext)().animation},get finishAnimation(){return"finish"===(0,e.getContext)().animation}},actions:{*navigate(n){const r=(0,e.getContext)(),{ref:o}=(0,e.getElement)(),{queryRef:a}=r,s=a?.dataset.wpNavigationDisabled;if(t(o)&&(e=>!(0!==e.button||e.metaKey||e.ctrlKey||e.altKey||e.shiftKey||e.defaultPrevented))(n)&&!s){n.preventDefault();const e=setTimeout((()=>{r.message=r.loadingText,r.animation="start"}),400),{actions:t}=yield i.e(908).then(i.bind(i,908));yield t.navigate(o.href),clearTimeout(e),r.message=r.loadedText+(r.message===r.loadedText?" ":""),r.animation="finish",r.url=o.href;const s=".wp-block-post-template a[href]";a.querySelector(s)?.focus()}},*prefetch(){const{queryRef:n}=(0,e.getContext)(),{ref:r}=(0,e.getElement)(),o=n?.dataset.wpNavigationDisabled;if(t(r)&&!o){const{actions:e}=yield i.e(908).then(i.bind(i,908));yield e.prefetch(r.href)}}},callbacks:{*prefetch(){const{url:n}=(0,e.getContext)(),{ref:r}=(0,e.getElement)();if(n&&t(r)){const{actions:e}=yield i.e(908).then(i.bind(i,908));yield e.prefetch(r.href)}},setQueryRef(){const t=(0,e.getContext)(),{ref:n}=(0,e.getElement)();t.queryRef=n}}})}();