first commit

This commit is contained in:
Roman Pyrih
2026-05-21 15:33:11 +02:00
commit acb036dbd9
8059 changed files with 2885104 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
// packages/interactivity-router/build-module/full-page.mjs
var isValidLink = (ref) => ref && ref instanceof window.HTMLAnchorElement && ref.href && (!ref.target || ref.target === "_self") && ref.origin === window.location.origin && !ref.pathname.startsWith("/wp-admin") && !ref.pathname.startsWith("/wp-login.php") && !ref.getAttribute("href").startsWith("#") && !new URL(ref.href).searchParams.has("_wpnonce");
var isValidEvent = (event) => event && event.button === 0 && // Left clicks only.
!event.metaKey && // Open in new tab (Mac).
!event.ctrlKey && // Open in new tab (Windows).
!event.altKey && // Download.
!event.shiftKey && !event.defaultPrevented;
document.addEventListener("click", async (event) => {
const ref = event.target.closest("a");
if (isValidLink(ref) && isValidEvent(event)) {
event.preventDefault();
const { actions } = await import("@wordpress/interactivity-router");
actions.navigate(ref.href);
}
});
document.addEventListener(
"mouseenter",
async (event) => {
if (event.target?.nodeName === "A") {
const ref = event.target.closest("a");
if (isValidLink(ref) && isValidEvent(event)) {
const { actions } = await import("@wordpress/interactivity-router");
actions.prefetch(ref.href);
}
}
},
true
);

View File

@@ -0,0 +1 @@
<?php return array('dependencies' => array(), 'module_dependencies' => array(array('id' => '@wordpress/interactivity-router', 'import' => 'dynamic')), 'version' => '5c07cd7a12ae073c5241');

View File

@@ -0,0 +1 @@
var s=t=>t&&t instanceof window.HTMLAnchorElement&&t.href&&(!t.target||t.target==="_self")&&t.origin===window.location.origin&&!t.pathname.startsWith("/wp-admin")&&!t.pathname.startsWith("/wp-login.php")&&!t.getAttribute("href").startsWith("#")&&!new URL(t.href).searchParams.has("_wpnonce"),n=t=>t&&t.button===0&&!t.metaKey&&!t.ctrlKey&&!t.altKey&&!t.shiftKey&&!t.defaultPrevented;document.addEventListener("click",async t=>{let a=t.target.closest("a");if(s(a)&&n(t)){t.preventDefault();let{actions:i}=await import("@wordpress/interactivity-router");i.navigate(a.href)}});document.addEventListener("mouseenter",async t=>{if(t.target?.nodeName==="A"){let a=t.target.closest("a");if(s(a)&&n(t)){let{actions:i}=await import("@wordpress/interactivity-router");i.prefetch(a.href)}}},!0);

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
<?php return array('dependencies' => array(), 'module_dependencies' => array(array('id' => '@wordpress/a11y', 'import' => 'dynamic'), array('id' => '@wordpress/interactivity', 'import' => 'static')), 'version' => '71aa17bac91628a0f874');

File diff suppressed because one or more lines are too long