PluginProbe
Gutenberg / 17.5.3
Gutenberg v17.5.3
24.1.0 24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 All 404 releases
gutenberg / build / interactivity / query.min.js

query.min.js in Gutenberg 17.5.3, at build/interactivity/query.min.js

2 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import*as t from"@wordpress/interactivity";var e,a,n={d:function(t,e){for(var a in e)n.o(e,a)&&!n.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:e[a]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},i=(e={getContext:()=>t.getContext,getElement:()=>t.getElement,navigate:()=>t.navigate,prefetch:()=>t.prefetch,store:()=>t.store},a={},n.d(a,e),a);const o=t=>t&&t instanceof window.HTMLAnchorElement&&t.href&&(!t.target||"_self"===t.target)&&t.origin===window.location.origin;(0,i.store)("core/query",{state:{get startAnimation(){return"start"===(0,i.getContext)().animation},get finishAnimation(){return"finish"===(0,i.getContext)().animation}},actions:{*navigate(t){const e=(0,i.getContext)(),{ref:a}=(0,i.getElement)(),n=a.closest("[data-wp-navigation-id]")?.dataset.wpNavigationDisabled;if(o(a)&&(t=>!(0!==t.button||t.metaKey||t.ctrlKey||t.altKey||t.shiftKey||t.defaultPrevented))(t)&&!n){t.preventDefault();const n=a.closest("[data-wp-navigation-id]").dataset.wpNavigationId,o=setTimeout((()=>{e.message=e.loadingText,e.animation="start"}),400);yield(0,i.navigate)(a.href),clearTimeout(o),e.message=e.loadedText+(e.message===e.loadedText?" ":""),e.animation="finish",e.url=a.href;const r=`[data-wp-navigation-id=${n}] .wp-block-post-template a[href]`;document.querySelector(r)?.focus()}},*prefetch(){const{ref:t}=(0,i.getElement)(),e=t.closest("[data-wp-navigation-id]")?.dataset.wpNavigationDisabled;o(t)&&!e&&(yield(0,i.prefetch)(t.href))}},callbacks:{*prefetch(){const{url:t}=(0,i.getContext)(),{ref:e}=(0,i.getElement)();t&&o(e)&&(yield(0,i.prefetch)(e.href))}}});
2 //# sourceMappingURL=query.min.js.map