first commit
This commit is contained in:
49
wp-includes/js/dist/script-modules/a11y/index.js
vendored
Normal file
49
wp-includes/js/dist/script-modules/a11y/index.js
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
// packages/a11y/build-module/shared/clear.mjs
|
||||
function clear() {
|
||||
const regions = document.getElementsByClassName("a11y-speak-region");
|
||||
const introText = document.getElementById("a11y-speak-intro-text");
|
||||
for (let i = 0; i < regions.length; i++) {
|
||||
regions[i].textContent = "";
|
||||
}
|
||||
if (introText) {
|
||||
introText.setAttribute("hidden", "hidden");
|
||||
}
|
||||
}
|
||||
|
||||
// packages/a11y/build-module/shared/filter-message.mjs
|
||||
var previousMessage = "";
|
||||
function filterMessage(message) {
|
||||
message = message.replace(/<[^<>]+>/g, " ");
|
||||
if (previousMessage === message) {
|
||||
message += "\xA0";
|
||||
}
|
||||
previousMessage = message;
|
||||
return message;
|
||||
}
|
||||
|
||||
// packages/a11y/build-module/shared/index.mjs
|
||||
function speak(message, ariaLive) {
|
||||
clear();
|
||||
message = filterMessage(message);
|
||||
const introText = document.getElementById("a11y-speak-intro-text");
|
||||
const containerAssertive = document.getElementById(
|
||||
"a11y-speak-assertive"
|
||||
);
|
||||
const containerPolite = document.getElementById("a11y-speak-polite");
|
||||
if (containerAssertive && ariaLive === "assertive") {
|
||||
containerAssertive.textContent = message;
|
||||
} else if (containerPolite) {
|
||||
containerPolite.textContent = message;
|
||||
}
|
||||
if (introText) {
|
||||
introText.removeAttribute("hidden");
|
||||
}
|
||||
}
|
||||
|
||||
// packages/a11y/build-module/module/index.mjs
|
||||
var setup = () => {
|
||||
};
|
||||
export {
|
||||
setup,
|
||||
speak
|
||||
};
|
||||
1
wp-includes/js/dist/script-modules/a11y/index.min.asset.php
vendored
Normal file
1
wp-includes/js/dist/script-modules/a11y/index.min.asset.php
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'version' => '1c371cb517a97cdbcb9f');
|
||||
1
wp-includes/js/dist/script-modules/a11y/index.min.js
vendored
Normal file
1
wp-includes/js/dist/script-modules/a11y/index.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
function i(){let t=document.getElementsByClassName("a11y-speak-region"),n=document.getElementById("a11y-speak-intro-text");for(let e=0;e<t.length;e++)t[e].textContent="";n&&n.setAttribute("hidden","hidden")}var a="";function c(t){return t=t.replace(/<[^<>]+>/g," "),a===t&&(t+="\xA0"),a=t,t}function l(t,n){i(),t=c(t);let e=document.getElementById("a11y-speak-intro-text"),o=document.getElementById("a11y-speak-assertive"),r=document.getElementById("a11y-speak-polite");o&&n==="assertive"?o.textContent=t:r&&(r.textContent=t),e&&e.removeAttribute("hidden")}var m=()=>{};export{m as setup,l as speak};
|
||||
7644
wp-includes/js/dist/script-modules/abilities/index.js
vendored
Normal file
7644
wp-includes/js/dist/script-modules/abilities/index.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
wp-includes/js/dist/script-modules/abilities/index.min.asset.php
vendored
Normal file
1
wp-includes/js/dist/script-modules/abilities/index.min.asset.php
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('wp-data', 'wp-i18n'), 'version' => 'f3475bc77a30dcc5b38d');
|
||||
8
wp-includes/js/dist/script-modules/abilities/index.min.js
vendored
Normal file
8
wp-includes/js/dist/script-modules/abilities/index.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
84
wp-includes/js/dist/script-modules/block-editor/utils/fit-text-frontend.js
vendored
Normal file
84
wp-includes/js/dist/script-modules/block-editor/utils/fit-text-frontend.js
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
// packages/block-editor/build-module/utils/fit-text-frontend.mjs
|
||||
import { store, getElement, getContext } from "@wordpress/interactivity";
|
||||
|
||||
// packages/block-editor/build-module/utils/fit-text-utils.mjs
|
||||
function findOptimalFontSize(textElement, applyFontSize) {
|
||||
const alreadyHasScrollableHeight = textElement.scrollHeight > textElement.clientHeight;
|
||||
let minSize = 0;
|
||||
let maxSize = 2400;
|
||||
let bestSize = minSize;
|
||||
const computedStyle = window.getComputedStyle(textElement);
|
||||
let paddingLeft = parseFloat(computedStyle.paddingLeft) || 0;
|
||||
let paddingRight = parseFloat(computedStyle.paddingRight) || 0;
|
||||
const range = document.createRange();
|
||||
range.selectNodeContents(textElement);
|
||||
let referenceElement = textElement;
|
||||
const parentElement = textElement.parentElement;
|
||||
if (parentElement) {
|
||||
const parentElementComputedStyle = window.getComputedStyle(parentElement);
|
||||
if (parentElementComputedStyle?.display === "flex") {
|
||||
referenceElement = parentElement;
|
||||
paddingLeft += parseFloat(parentElementComputedStyle.paddingLeft) || 0;
|
||||
paddingRight += parseFloat(parentElementComputedStyle.paddingRight) || 0;
|
||||
}
|
||||
}
|
||||
let maxclientHeight = referenceElement.clientHeight;
|
||||
while (minSize <= maxSize) {
|
||||
const midSize = Math.floor((minSize + maxSize) / 2);
|
||||
applyFontSize(midSize);
|
||||
const rect = range.getBoundingClientRect();
|
||||
const textWidth = rect.width;
|
||||
const fitsWidth = textElement.scrollWidth <= referenceElement.clientWidth && textWidth <= referenceElement.clientWidth - paddingLeft - paddingRight;
|
||||
const fitsHeight = alreadyHasScrollableHeight || textElement.scrollHeight <= referenceElement.clientHeight || textElement.scrollHeight <= maxclientHeight;
|
||||
if (referenceElement.clientHeight > maxclientHeight) {
|
||||
maxclientHeight = referenceElement.clientHeight;
|
||||
}
|
||||
if (fitsWidth && fitsHeight) {
|
||||
bestSize = midSize;
|
||||
minSize = midSize + 1;
|
||||
} else {
|
||||
maxSize = midSize - 1;
|
||||
}
|
||||
}
|
||||
range.detach();
|
||||
return bestSize;
|
||||
}
|
||||
function optimizeFitText(textElement, applyFontSize) {
|
||||
if (!textElement) {
|
||||
return;
|
||||
}
|
||||
applyFontSize(0);
|
||||
const optimalSize = findOptimalFontSize(textElement, applyFontSize);
|
||||
applyFontSize(optimalSize);
|
||||
return optimalSize;
|
||||
}
|
||||
|
||||
// packages/block-editor/build-module/utils/fit-text-frontend.mjs
|
||||
store("core/fit-text", {
|
||||
callbacks: {
|
||||
init() {
|
||||
const context = getContext();
|
||||
const { ref } = getElement();
|
||||
const applyFontSize = (fontSize) => {
|
||||
if (fontSize === 0) {
|
||||
ref.style.fontSize = "";
|
||||
} else {
|
||||
ref.style.fontSize = `${fontSize}px`;
|
||||
}
|
||||
};
|
||||
context.fontSize = optimizeFitText(ref, applyFontSize);
|
||||
if (window.ResizeObserver && ref.parentElement) {
|
||||
const resizeObserver = new window.ResizeObserver(() => {
|
||||
context.fontSize = optimizeFitText(ref, applyFontSize);
|
||||
});
|
||||
resizeObserver.observe(ref.parentElement);
|
||||
resizeObserver.observe(ref);
|
||||
return () => {
|
||||
if (resizeObserver) {
|
||||
resizeObserver.disconnect();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
1
wp-includes/js/dist/script-modules/block-editor/utils/fit-text-frontend.min.asset.php
vendored
Normal file
1
wp-includes/js/dist/script-modules/block-editor/utils/fit-text-frontend.min.asset.php
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'module_dependencies' => array(array('id' => '@wordpress/interactivity', 'import' => 'static')), 'version' => '383c7a8bd24a1f2fd9b9');
|
||||
1
wp-includes/js/dist/script-modules/block-editor/utils/fit-text-frontend.min.js
vendored
Normal file
1
wp-includes/js/dist/script-modules/block-editor/utils/fit-text-frontend.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import{store as H,getElement as w,getContext as b}from"@wordpress/interactivity";function u(e,t){let o=e.scrollHeight>e.clientHeight,i=0,l=2400,g=i,f=window.getComputedStyle(e),p=parseFloat(f.paddingLeft)||0,h=parseFloat(f.paddingRight)||0,c=document.createRange();c.selectNodeContents(e);let r=e,s=e.parentElement;if(s){let n=window.getComputedStyle(s);n?.display==="flex"&&(r=s,p+=parseFloat(n.paddingLeft)||0,h+=parseFloat(n.paddingRight)||0)}let d=r.clientHeight;for(;i<=l;){let n=Math.floor((i+l)/2);t(n);let m=c.getBoundingClientRect().width,z=e.scrollWidth<=r.clientWidth&&m<=r.clientWidth-p-h,S=o||e.scrollHeight<=r.clientHeight||e.scrollHeight<=d;r.clientHeight>d&&(d=r.clientHeight),z&&S?(g=n,i=n+1):l=n-1}return c.detach(),g}function a(e,t){if(!e)return;t(0);let o=u(e,t);return t(o),o}H("core/fit-text",{callbacks:{init(){let e=b(),{ref:t}=w(),o=i=>{i===0?t.style.fontSize="":t.style.fontSize=`${i}px`};if(e.fontSize=a(t,o),window.ResizeObserver&&t.parentElement){let i=new window.ResizeObserver(()=>{e.fontSize=a(t,o)});return i.observe(t.parentElement),i.observe(t),()=>{i&&i.disconnect()}}}}});
|
||||
119
wp-includes/js/dist/script-modules/block-library/accordion/view.js
vendored
Normal file
119
wp-includes/js/dist/script-modules/block-library/accordion/view.js
vendored
Normal file
@@ -0,0 +1,119 @@
|
||||
// packages/block-library/build-module/accordion/view.mjs
|
||||
import { store, getContext, withSyncEvent } from "@wordpress/interactivity";
|
||||
var hashHandled = false;
|
||||
var { actions } = store(
|
||||
"core/accordion",
|
||||
{
|
||||
state: {
|
||||
get isOpen() {
|
||||
const { id, accordionItems } = getContext();
|
||||
const accordionItem = accordionItems.find(
|
||||
(item) => item.id === id
|
||||
);
|
||||
return accordionItem ? accordionItem.isOpen : false;
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
toggle: () => {
|
||||
const context = getContext();
|
||||
const { id, autoclose, accordionItems } = context;
|
||||
const accordionItem = accordionItems.find(
|
||||
(item) => item.id === id
|
||||
);
|
||||
if (autoclose) {
|
||||
accordionItems.forEach((item) => {
|
||||
item.isOpen = item.id === id ? !accordionItem.isOpen : false;
|
||||
});
|
||||
} else {
|
||||
accordionItem.isOpen = !accordionItem.isOpen;
|
||||
}
|
||||
},
|
||||
handleKeyDown: withSyncEvent((event) => {
|
||||
if (event.key !== "ArrowUp" && event.key !== "ArrowDown" && event.key !== "Home" && event.key !== "End") {
|
||||
return;
|
||||
}
|
||||
event.preventDefault();
|
||||
const context = getContext();
|
||||
const { id, accordionItems } = context;
|
||||
const currentIndex = accordionItems.findIndex(
|
||||
(item) => item.id === id
|
||||
);
|
||||
let nextIndex;
|
||||
switch (event.key) {
|
||||
case "ArrowUp":
|
||||
nextIndex = Math.max(0, currentIndex - 1);
|
||||
break;
|
||||
case "ArrowDown":
|
||||
nextIndex = Math.min(
|
||||
currentIndex + 1,
|
||||
accordionItems.length - 1
|
||||
);
|
||||
break;
|
||||
case "Home":
|
||||
nextIndex = 0;
|
||||
break;
|
||||
case "End":
|
||||
nextIndex = accordionItems.length - 1;
|
||||
break;
|
||||
}
|
||||
const nextId = accordionItems[nextIndex].id;
|
||||
const nextButton = document.getElementById(nextId);
|
||||
if (nextButton) {
|
||||
nextButton.focus();
|
||||
}
|
||||
}),
|
||||
openPanelByHash: () => {
|
||||
if (hashHandled || !window.location?.hash?.length) {
|
||||
return;
|
||||
}
|
||||
const context = getContext();
|
||||
const { id, accordionItems, autoclose } = context;
|
||||
const hash = decodeURIComponent(
|
||||
window.location.hash.slice(1)
|
||||
);
|
||||
const targetElement = window.document.getElementById(hash);
|
||||
if (!targetElement) {
|
||||
return;
|
||||
}
|
||||
const panelElement = window.document.querySelector(
|
||||
'.wp-block-accordion-panel[aria-labelledby="' + id + '"]'
|
||||
);
|
||||
if (!panelElement || !panelElement.contains(targetElement)) {
|
||||
return;
|
||||
}
|
||||
hashHandled = true;
|
||||
if (autoclose) {
|
||||
accordionItems.forEach((item) => {
|
||||
item.isOpen = item.id === id;
|
||||
});
|
||||
} else {
|
||||
const targetItem = accordionItems.find(
|
||||
(item) => item.id === id
|
||||
);
|
||||
if (targetItem) {
|
||||
targetItem.isOpen = true;
|
||||
}
|
||||
}
|
||||
window.setTimeout(() => {
|
||||
targetElement.scrollIntoView();
|
||||
}, 0);
|
||||
}
|
||||
},
|
||||
callbacks: {
|
||||
initAccordionItems: () => {
|
||||
const context = getContext();
|
||||
const { id, openByDefault, accordionItems } = context;
|
||||
accordionItems.push({
|
||||
id,
|
||||
isOpen: openByDefault
|
||||
});
|
||||
actions.openPanelByHash();
|
||||
},
|
||||
hashChange: () => {
|
||||
hashHandled = false;
|
||||
actions.openPanelByHash();
|
||||
}
|
||||
}
|
||||
},
|
||||
{ lock: true }
|
||||
);
|
||||
1
wp-includes/js/dist/script-modules/block-library/accordion/view.min.asset.php
vendored
Normal file
1
wp-includes/js/dist/script-modules/block-library/accordion/view.min.asset.php
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'module_dependencies' => array(array('id' => '@wordpress/interactivity', 'import' => 'static')), 'version' => '2af01b43d30739c3fb8d');
|
||||
1
wp-includes/js/dist/script-modules/block-library/accordion/view.min.js
vendored
Normal file
1
wp-includes/js/dist/script-modules/block-library/accordion/view.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import{store as f,getContext as i,withSyncEvent as m}from"@wordpress/interactivity";var l=!1,{actions:h}=f("core/accordion",{state:{get isOpen(){let{id:e,accordionItems:t}=i(),c=t.find(o=>o.id===e);return c?c.isOpen:!1}},actions:{toggle:()=>{let e=i(),{id:t,autoclose:c,accordionItems:o}=e,s=o.find(n=>n.id===t);c?o.forEach(n=>{n.isOpen=n.id===t?!s.isOpen:!1}):s.isOpen=!s.isOpen},handleKeyDown:m(e=>{if(e.key!=="ArrowUp"&&e.key!=="ArrowDown"&&e.key!=="Home"&&e.key!=="End")return;e.preventDefault();let t=i(),{id:c,accordionItems:o}=t,s=o.findIndex(d=>d.id===c),n;switch(e.key){case"ArrowUp":n=Math.max(0,s-1);break;case"ArrowDown":n=Math.min(s+1,o.length-1);break;case"Home":n=0;break;case"End":n=o.length-1;break}let r=o[n].id,a=document.getElementById(r);a&&a.focus()}),openPanelByHash:()=>{if(l||!window.location?.hash?.length)return;let e=i(),{id:t,accordionItems:c,autoclose:o}=e,s=decodeURIComponent(window.location.hash.slice(1)),n=window.document.getElementById(s);if(!n)return;let r=window.document.querySelector('.wp-block-accordion-panel[aria-labelledby="'+t+'"]');if(!(!r||!r.contains(n))){if(l=!0,o)c.forEach(a=>{a.isOpen=a.id===t});else{let a=c.find(d=>d.id===t);a&&(a.isOpen=!0)}window.setTimeout(()=>{n.scrollIntoView()},0)}}},callbacks:{initAccordionItems:()=>{let e=i(),{id:t,openByDefault:c,accordionItems:o}=e;o.push({id:t,isOpen:c}),h.openPanelByHash()},hashChange:()=>{l=!1,h.openPanelByHash()}}},{lock:!0});
|
||||
44
wp-includes/js/dist/script-modules/block-library/file/view.js
vendored
Normal file
44
wp-includes/js/dist/script-modules/block-library/file/view.js
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
// packages/block-library/build-module/file/view.mjs
|
||||
import { store } from "@wordpress/interactivity";
|
||||
|
||||
// packages/block-library/build-module/file/utils/index.mjs
|
||||
var browserSupportsPdfs = () => {
|
||||
if (window.navigator.pdfViewerEnabled) {
|
||||
return true;
|
||||
}
|
||||
if (window.navigator.userAgent.indexOf("Mobi") > -1) {
|
||||
return false;
|
||||
}
|
||||
if (window.navigator.userAgent.indexOf("Android") > -1) {
|
||||
return false;
|
||||
}
|
||||
if (window.navigator.userAgent.indexOf("Macintosh") > -1 && window.navigator.maxTouchPoints && window.navigator.maxTouchPoints > 2) {
|
||||
return false;
|
||||
}
|
||||
if (!!(window.ActiveXObject || "ActiveXObject" in window) && !(createActiveXObject("AcroPDF.PDF") || createActiveXObject("PDF.PdfCtrl"))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
var createActiveXObject = (type) => {
|
||||
let ax;
|
||||
try {
|
||||
ax = new window.ActiveXObject(type);
|
||||
} catch (e) {
|
||||
ax = void 0;
|
||||
}
|
||||
return ax;
|
||||
};
|
||||
|
||||
// packages/block-library/build-module/file/view.mjs
|
||||
store(
|
||||
"core/file",
|
||||
{
|
||||
state: {
|
||||
get hasPdfPreview() {
|
||||
return browserSupportsPdfs();
|
||||
}
|
||||
}
|
||||
},
|
||||
{ lock: true }
|
||||
);
|
||||
1
wp-includes/js/dist/script-modules/block-library/file/view.min.asset.php
vendored
Normal file
1
wp-includes/js/dist/script-modules/block-library/file/view.min.asset.php
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'module_dependencies' => array(array('id' => '@wordpress/interactivity', 'import' => 'static')), 'version' => '7d4d261d10dca47ebecb');
|
||||
1
wp-includes/js/dist/script-modules/block-library/file/view.min.js
vendored
Normal file
1
wp-includes/js/dist/script-modules/block-library/file/view.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import{store as n}from"@wordpress/interactivity";var t=()=>window.navigator.pdfViewerEnabled?!0:!(window.navigator.userAgent.indexOf("Mobi")>-1||window.navigator.userAgent.indexOf("Android")>-1||window.navigator.userAgent.indexOf("Macintosh")>-1&&window.navigator.maxTouchPoints&&window.navigator.maxTouchPoints>2||(window.ActiveXObject||"ActiveXObject"in window)&&!(r("AcroPDF.PDF")||r("PDF.PdfCtrl"))),r=i=>{let e;try{e=new window.ActiveXObject(i)}catch{e=void 0}return e};n("core/file",{state:{get hasPdfPreview(){return t()}}},{lock:!0});
|
||||
45
wp-includes/js/dist/script-modules/block-library/form/view.js
vendored
Normal file
45
wp-includes/js/dist/script-modules/block-library/form/view.js
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
// packages/block-library/build-module/form/view.mjs
|
||||
var formSettings;
|
||||
try {
|
||||
formSettings = JSON.parse(
|
||||
document.getElementById(
|
||||
"wp-script-module-data-@wordpress/block-library/form/view"
|
||||
)?.textContent
|
||||
);
|
||||
} catch {
|
||||
}
|
||||
document.querySelectorAll("form.wp-block-form").forEach(function(form) {
|
||||
if (!formSettings || !form.action || !form.action.startsWith("mailto:")) {
|
||||
return;
|
||||
}
|
||||
const redirectNotification = (status) => {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
urlParams.append("wp-form-result", status);
|
||||
window.location.search = urlParams.toString();
|
||||
};
|
||||
form.addEventListener("submit", async function(event) {
|
||||
event.preventDefault();
|
||||
const formData = Object.fromEntries(new FormData(form).entries());
|
||||
formData.formAction = form.action;
|
||||
formData._ajax_nonce = formSettings.nonce;
|
||||
formData.action = formSettings.action;
|
||||
formData._wp_http_referer = window.location.href;
|
||||
formData.formAction = form.action;
|
||||
try {
|
||||
const response = await fetch(formSettings.ajaxUrl, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/x-www-form-urlencoded"
|
||||
},
|
||||
body: new URLSearchParams(formData).toString()
|
||||
});
|
||||
if (response.ok) {
|
||||
redirectNotification("success");
|
||||
} else {
|
||||
redirectNotification("error");
|
||||
}
|
||||
} catch (error) {
|
||||
redirectNotification("error");
|
||||
}
|
||||
});
|
||||
});
|
||||
1
wp-includes/js/dist/script-modules/block-library/form/view.min.asset.php
vendored
Normal file
1
wp-includes/js/dist/script-modules/block-library/form/view.min.asset.php
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'version' => '5542f8ad251fe43ef09e');
|
||||
1
wp-includes/js/dist/script-modules/block-library/form/view.min.js
vendored
Normal file
1
wp-includes/js/dist/script-modules/block-library/form/view.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var o;try{o=JSON.parse(document.getElementById("wp-script-module-data-@wordpress/block-library/form/view")?.textContent)}catch{}document.querySelectorAll("form.wp-block-form").forEach(function(e){if(!o||!e.action||!e.action.startsWith("mailto:"))return;let r=n=>{let t=new URLSearchParams(window.location.search);t.append("wp-form-result",n),window.location.search=t.toString()};e.addEventListener("submit",async function(n){n.preventDefault();let t=Object.fromEntries(new FormData(e).entries());t.formAction=e.action,t._ajax_nonce=o.nonce,t.action=o.action,t._wp_http_referer=window.location.href,t.formAction=e.action;try{(await fetch(o.ajaxUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(t).toString()})).ok?r("success"):r("error")}catch{r("error")}})});
|
||||
462
wp-includes/js/dist/script-modules/block-library/image/view.js
vendored
Normal file
462
wp-includes/js/dist/script-modules/block-library/image/view.js
vendored
Normal file
@@ -0,0 +1,462 @@
|
||||
// packages/block-library/build-module/image/view.mjs
|
||||
import {
|
||||
store,
|
||||
getContext,
|
||||
getElement,
|
||||
getConfig,
|
||||
withSyncEvent,
|
||||
withScope
|
||||
} from "@wordpress/interactivity";
|
||||
|
||||
// packages/block-library/build-module/image/constants.mjs
|
||||
var IMAGE_PRELOAD_DELAY = 200;
|
||||
|
||||
// packages/block-library/build-module/image/view.mjs
|
||||
var isTouching = false;
|
||||
var lastTouchTime = 0;
|
||||
var touchStartEvent = {
|
||||
startX: 0,
|
||||
startY: 0,
|
||||
startTime: 0
|
||||
};
|
||||
var focusableSelectors = [
|
||||
".wp-lightbox-close-button",
|
||||
".wp-lightbox-navigation-button"
|
||||
];
|
||||
function getImageSrc({ uploadedSrc }) {
|
||||
return uploadedSrc || "data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";
|
||||
}
|
||||
function getImageSrcset({ lightboxSrcset }) {
|
||||
return lightboxSrcset || "";
|
||||
}
|
||||
var { state, actions, callbacks } = store(
|
||||
"core/image",
|
||||
{
|
||||
state: {
|
||||
selectedImageId: null,
|
||||
selectedGalleryId: null,
|
||||
preloadTimers: /* @__PURE__ */ new Map(),
|
||||
preloadedImageIds: /* @__PURE__ */ new Set(),
|
||||
get galleryImages() {
|
||||
if (!state.selectedGalleryId) {
|
||||
return [state.selectedImageId];
|
||||
}
|
||||
return Object.entries(state.metadata).filter(
|
||||
([, value]) => value.galleryId === state.selectedGalleryId
|
||||
).sort(([, a], [, b]) => {
|
||||
const orderA = a.order ?? 0;
|
||||
const orderB = b.order ?? 0;
|
||||
return orderA - orderB;
|
||||
}).map(([key]) => key);
|
||||
},
|
||||
get selectedImageIndex() {
|
||||
return state.galleryImages.findIndex(
|
||||
(id) => id === state.selectedImageId
|
||||
);
|
||||
},
|
||||
get selectedImage() {
|
||||
return state.metadata[state.selectedImageId];
|
||||
},
|
||||
get hasNavigationIcon() {
|
||||
const { navigationButtonType } = state.selectedImage;
|
||||
return navigationButtonType === "icon" || navigationButtonType === "both";
|
||||
},
|
||||
get hasNavigationText() {
|
||||
const { navigationButtonType } = state.selectedImage;
|
||||
return navigationButtonType === "text" || navigationButtonType === "both";
|
||||
},
|
||||
get thisImage() {
|
||||
const { imageId } = getContext();
|
||||
return state.metadata[imageId];
|
||||
},
|
||||
get hasNavigation() {
|
||||
return state.galleryImages.length > 1;
|
||||
},
|
||||
get hasNextImage() {
|
||||
return state.selectedImageIndex + 1 < state.galleryImages.length;
|
||||
},
|
||||
get hasPreviousImage() {
|
||||
return state.selectedImageIndex - 1 >= 0;
|
||||
},
|
||||
get overlayOpened() {
|
||||
return state.selectedImageId !== null;
|
||||
},
|
||||
get roleAttribute() {
|
||||
return state.overlayOpened ? "dialog" : null;
|
||||
},
|
||||
get ariaModal() {
|
||||
return state.overlayOpened ? "true" : null;
|
||||
},
|
||||
get ariaLabel() {
|
||||
return state.selectedImage.customAriaLabel || getConfig().defaultAriaLabel;
|
||||
},
|
||||
get closeButtonAriaLabel() {
|
||||
return state.hasNavigationText ? void 0 : getConfig().closeButtonText;
|
||||
},
|
||||
get prevButtonAriaLabel() {
|
||||
return state.hasNavigationText ? void 0 : getConfig().prevButtonText;
|
||||
},
|
||||
get nextButtonAriaLabel() {
|
||||
return state.hasNavigationText ? void 0 : getConfig().nextButtonText;
|
||||
},
|
||||
get enlargedSrc() {
|
||||
return getImageSrc(state.selectedImage);
|
||||
},
|
||||
get enlargedSrcset() {
|
||||
return getImageSrcset(state.selectedImage);
|
||||
},
|
||||
get figureStyles() {
|
||||
return state.overlayOpened && `${state.selectedImage.figureStyles?.replace(
|
||||
/margin[^;]*;?/g,
|
||||
""
|
||||
)};`;
|
||||
},
|
||||
get imgStyles() {
|
||||
return state.overlayOpened && `${state.selectedImage.imgStyles?.replace(
|
||||
/;$/,
|
||||
""
|
||||
)}; object-fit:cover;`;
|
||||
},
|
||||
get isContentHidden() {
|
||||
const ctx = getContext();
|
||||
return state.overlayEnabled && state.selectedImageId === ctx.imageId;
|
||||
},
|
||||
get isContentVisible() {
|
||||
const ctx = getContext();
|
||||
return !state.overlayEnabled && state.selectedImageId === ctx.imageId;
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
showLightbox() {
|
||||
const { imageId } = getContext();
|
||||
if (!state.metadata[imageId].imageRef?.complete) {
|
||||
return;
|
||||
}
|
||||
state.scrollTopReset = document.documentElement.scrollTop;
|
||||
state.scrollLeftReset = document.documentElement.scrollLeft;
|
||||
state.selectedImageId = imageId;
|
||||
const { galleryId } = getContext("core/gallery") || {};
|
||||
state.selectedGalleryId = galleryId || null;
|
||||
state.overlayEnabled = true;
|
||||
callbacks.setOverlayStyles();
|
||||
},
|
||||
hideLightbox() {
|
||||
if (state.overlayEnabled) {
|
||||
state.overlayEnabled = false;
|
||||
setTimeout(function() {
|
||||
state.selectedImage.buttonRef.focus({
|
||||
preventScroll: true
|
||||
});
|
||||
state.selectedImageId = null;
|
||||
state.selectedGalleryId = null;
|
||||
}, 450);
|
||||
}
|
||||
},
|
||||
showPreviousImage: withSyncEvent((event) => {
|
||||
event.stopPropagation();
|
||||
const nextIndex = state.hasPreviousImage ? state.selectedImageIndex - 1 : state.galleryImages.length - 1;
|
||||
state.selectedImageId = state.galleryImages[nextIndex];
|
||||
callbacks.setOverlayStyles();
|
||||
}),
|
||||
showNextImage: withSyncEvent((event) => {
|
||||
event.stopPropagation();
|
||||
const nextIndex = state.hasNextImage ? state.selectedImageIndex + 1 : 0;
|
||||
state.selectedImageId = state.galleryImages[nextIndex];
|
||||
callbacks.setOverlayStyles();
|
||||
}),
|
||||
handleKeydown: withSyncEvent((event) => {
|
||||
if (state.overlayEnabled) {
|
||||
if (event.key === "Escape") {
|
||||
actions.hideLightbox();
|
||||
} else if (event.key === "ArrowLeft") {
|
||||
actions.showPreviousImage(event);
|
||||
} else if (event.key === "ArrowRight") {
|
||||
actions.showNextImage(event);
|
||||
} else if (event.key === "Tab") {
|
||||
const focusableElements = Array.from(
|
||||
document.querySelectorAll(focusableSelectors)
|
||||
);
|
||||
const firstFocusableElement = focusableElements[0];
|
||||
const lastFocusableElement = focusableElements[focusableElements.length - 1];
|
||||
if (event.shiftKey && event.target === firstFocusableElement) {
|
||||
event.preventDefault();
|
||||
lastFocusableElement.focus();
|
||||
} else if (!event.shiftKey && event.target === lastFocusableElement) {
|
||||
event.preventDefault();
|
||||
firstFocusableElement.focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
}),
|
||||
handleTouchMove: withSyncEvent((event) => {
|
||||
if (state.overlayEnabled) {
|
||||
event.preventDefault();
|
||||
}
|
||||
}),
|
||||
handleTouchStart(event) {
|
||||
isTouching = true;
|
||||
const t = event.touches && event.touches[0];
|
||||
if (t) {
|
||||
touchStartEvent.startX = t.clientX;
|
||||
touchStartEvent.startY = t.clientY;
|
||||
touchStartEvent.startTime = Date.now();
|
||||
}
|
||||
},
|
||||
handleTouchEnd: withSyncEvent((event) => {
|
||||
const touchEndEvent = event.changedTouches && event.changedTouches[0] || event.touches && event.touches[0];
|
||||
const now = Date.now();
|
||||
if (touchEndEvent && state.overlayEnabled) {
|
||||
const deltaX = touchEndEvent.clientX - touchStartEvent.startX;
|
||||
const deltaY = touchEndEvent.clientY - touchStartEvent.startY;
|
||||
const absDeltaX = Math.abs(deltaX);
|
||||
const absDeltaY = Math.abs(deltaY);
|
||||
const elapsedMs = now - touchStartEvent.startTime;
|
||||
const isHorizontalSwipe = (
|
||||
// Swipe distance is greater than 50px
|
||||
absDeltaX > 50 && // Horizontal movement is much larger than the vertical movement
|
||||
absDeltaX > absDeltaY * 1.5 && // Fast action of less than 800ms
|
||||
elapsedMs < 800
|
||||
);
|
||||
if (isHorizontalSwipe) {
|
||||
event.preventDefault();
|
||||
if (deltaX < 0) {
|
||||
actions.showNextImage(event);
|
||||
} else {
|
||||
actions.showPreviousImage(event);
|
||||
}
|
||||
}
|
||||
}
|
||||
lastTouchTime = now;
|
||||
isTouching = false;
|
||||
}),
|
||||
handleScroll() {
|
||||
if (state.overlayOpened) {
|
||||
if (!isTouching && Date.now() - lastTouchTime > 450) {
|
||||
window.scrollTo(
|
||||
state.scrollLeftReset,
|
||||
state.scrollTopReset
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
preloadImage() {
|
||||
const { imageId } = getContext();
|
||||
if (state.preloadedImageIds.has(imageId)) {
|
||||
return;
|
||||
}
|
||||
const imageMetadata = state.metadata[imageId];
|
||||
const imageLink = document.createElement("link");
|
||||
imageLink.rel = "preload";
|
||||
imageLink.as = "image";
|
||||
imageLink.href = getImageSrc(imageMetadata);
|
||||
const srcset = getImageSrcset(imageMetadata);
|
||||
if (srcset) {
|
||||
imageLink.setAttribute("imagesrcset", srcset);
|
||||
imageLink.setAttribute("imagesizes", "100vw");
|
||||
}
|
||||
document.head.appendChild(imageLink);
|
||||
state.preloadedImageIds.add(imageId);
|
||||
},
|
||||
preloadImageWithDelay() {
|
||||
const { imageId } = getContext();
|
||||
actions.cancelPreload();
|
||||
const timerId = setTimeout(
|
||||
withScope(() => {
|
||||
actions.preloadImage();
|
||||
state.preloadTimers.delete(imageId);
|
||||
}),
|
||||
IMAGE_PRELOAD_DELAY
|
||||
);
|
||||
state.preloadTimers.set(imageId, timerId);
|
||||
},
|
||||
cancelPreload() {
|
||||
const { imageId } = getContext();
|
||||
if (state.preloadTimers.has(imageId)) {
|
||||
clearTimeout(state.preloadTimers.get(imageId));
|
||||
state.preloadTimers.delete(imageId);
|
||||
}
|
||||
}
|
||||
},
|
||||
callbacks: {
|
||||
setOverlayStyles() {
|
||||
if (!state.overlayEnabled) {
|
||||
return;
|
||||
}
|
||||
let {
|
||||
naturalWidth,
|
||||
naturalHeight,
|
||||
offsetWidth: originalWidth,
|
||||
offsetHeight: originalHeight
|
||||
} = state.selectedImage.imageRef;
|
||||
let { x: screenPosX, y: screenPosY } = state.selectedImage.imageRef.getBoundingClientRect();
|
||||
const naturalRatio = naturalWidth / naturalHeight;
|
||||
let originalRatio = originalWidth / originalHeight;
|
||||
if (state.selectedImage.scaleAttr === "contain") {
|
||||
if (naturalRatio > originalRatio) {
|
||||
const heightWithoutSpace = originalWidth / naturalRatio;
|
||||
screenPosY += (originalHeight - heightWithoutSpace) / 2;
|
||||
originalHeight = heightWithoutSpace;
|
||||
} else {
|
||||
const widthWithoutSpace = originalHeight * naturalRatio;
|
||||
screenPosX += (originalWidth - widthWithoutSpace) / 2;
|
||||
originalWidth = widthWithoutSpace;
|
||||
}
|
||||
}
|
||||
originalRatio = originalWidth / originalHeight;
|
||||
let imgMaxWidth = parseFloat(
|
||||
state.selectedImage.targetWidth && state.selectedImage.targetWidth !== "none" ? state.selectedImage.targetWidth : naturalWidth
|
||||
);
|
||||
let imgMaxHeight = parseFloat(
|
||||
state.selectedImage.targetHeight && state.selectedImage.targetHeight !== "none" ? state.selectedImage.targetHeight : naturalHeight
|
||||
);
|
||||
let imgRatio = imgMaxWidth / imgMaxHeight;
|
||||
let containerMaxWidth = imgMaxWidth;
|
||||
let containerMaxHeight = imgMaxHeight;
|
||||
let containerWidth = imgMaxWidth;
|
||||
let containerHeight = imgMaxHeight;
|
||||
if (naturalRatio.toFixed(2) !== imgRatio.toFixed(2)) {
|
||||
if (naturalRatio > imgRatio) {
|
||||
const reducedHeight = imgMaxWidth / naturalRatio;
|
||||
if (imgMaxHeight - reducedHeight > imgMaxWidth) {
|
||||
imgMaxHeight = reducedHeight;
|
||||
imgMaxWidth = reducedHeight * naturalRatio;
|
||||
} else {
|
||||
imgMaxHeight = imgMaxWidth / naturalRatio;
|
||||
}
|
||||
} else {
|
||||
const reducedWidth = imgMaxHeight * naturalRatio;
|
||||
if (imgMaxWidth - reducedWidth > imgMaxHeight) {
|
||||
imgMaxWidth = reducedWidth;
|
||||
imgMaxHeight = reducedWidth / naturalRatio;
|
||||
} else {
|
||||
imgMaxWidth = imgMaxHeight * naturalRatio;
|
||||
}
|
||||
}
|
||||
containerWidth = imgMaxWidth;
|
||||
containerHeight = imgMaxHeight;
|
||||
imgRatio = imgMaxWidth / imgMaxHeight;
|
||||
if (originalRatio > imgRatio) {
|
||||
containerMaxWidth = imgMaxWidth;
|
||||
containerMaxHeight = containerMaxWidth / originalRatio;
|
||||
} else {
|
||||
containerMaxHeight = imgMaxHeight;
|
||||
containerMaxWidth = containerMaxHeight * originalRatio;
|
||||
}
|
||||
}
|
||||
if (originalWidth > containerWidth || originalHeight > containerHeight) {
|
||||
containerWidth = originalWidth;
|
||||
containerHeight = originalHeight;
|
||||
}
|
||||
let horizontalPadding = 0;
|
||||
let verticalPadding = 160;
|
||||
if (480 < window.innerWidth) {
|
||||
horizontalPadding = 80;
|
||||
verticalPadding = 160;
|
||||
}
|
||||
if (960 < window.innerWidth) {
|
||||
horizontalPadding = state.hasNavigation ? 320 : 80;
|
||||
verticalPadding = 80;
|
||||
}
|
||||
const targetMaxWidth = Math.min(
|
||||
window.innerWidth - horizontalPadding,
|
||||
containerWidth
|
||||
);
|
||||
const targetMaxHeight = Math.min(
|
||||
window.innerHeight - verticalPadding,
|
||||
containerHeight
|
||||
);
|
||||
const targetContainerRatio = targetMaxWidth / targetMaxHeight;
|
||||
if (originalRatio > targetContainerRatio) {
|
||||
containerWidth = targetMaxWidth;
|
||||
containerHeight = containerWidth / originalRatio;
|
||||
} else {
|
||||
containerHeight = targetMaxHeight;
|
||||
containerWidth = containerHeight * originalRatio;
|
||||
}
|
||||
const containerScale = originalWidth / containerWidth;
|
||||
const lightboxImgWidth = imgMaxWidth * (containerWidth / containerMaxWidth);
|
||||
const lightboxImgHeight = imgMaxHeight * (containerHeight / containerMaxHeight);
|
||||
state.overlayStyles = `
|
||||
--wp--lightbox-initial-top-position: ${screenPosY}px;
|
||||
--wp--lightbox-initial-left-position: ${screenPosX}px;
|
||||
--wp--lightbox-container-width: ${containerWidth + 1}px;
|
||||
--wp--lightbox-container-height: ${containerHeight + 1}px;
|
||||
--wp--lightbox-image-width: ${lightboxImgWidth}px;
|
||||
--wp--lightbox-image-height: ${lightboxImgHeight}px;
|
||||
--wp--lightbox-scale: ${containerScale};
|
||||
--wp--lightbox-scrollbar-width: ${window.innerWidth - document.documentElement.clientWidth}px;
|
||||
`;
|
||||
},
|
||||
setButtonStyles() {
|
||||
const { ref } = getElement();
|
||||
if (!ref) {
|
||||
return;
|
||||
}
|
||||
const { imageId } = getContext();
|
||||
state.metadata[imageId].imageRef = ref;
|
||||
state.metadata[imageId].currentSrc = ref.currentSrc;
|
||||
const {
|
||||
naturalWidth,
|
||||
naturalHeight,
|
||||
offsetWidth,
|
||||
offsetHeight
|
||||
} = ref;
|
||||
if (naturalWidth === 0 || naturalHeight === 0) {
|
||||
return;
|
||||
}
|
||||
const figure = ref.parentElement;
|
||||
const figureWidth = ref.parentElement.clientWidth;
|
||||
let figureHeight = ref.parentElement.clientHeight;
|
||||
const caption = figure.querySelector("figcaption");
|
||||
if (caption) {
|
||||
const captionComputedStyle = window.getComputedStyle(caption);
|
||||
if (!["absolute", "fixed"].includes(
|
||||
captionComputedStyle.position
|
||||
)) {
|
||||
figureHeight = figureHeight - caption.offsetHeight - parseFloat(captionComputedStyle.marginTop) - parseFloat(captionComputedStyle.marginBottom);
|
||||
}
|
||||
}
|
||||
const buttonOffsetTop = figureHeight - offsetHeight;
|
||||
const buttonOffsetRight = figureWidth - offsetWidth;
|
||||
let buttonTop = buttonOffsetTop + 16;
|
||||
let buttonRight = buttonOffsetRight + 16;
|
||||
if (state.metadata[imageId].scaleAttr === "contain") {
|
||||
const naturalRatio = naturalWidth / naturalHeight;
|
||||
const offsetRatio = offsetWidth / offsetHeight;
|
||||
if (naturalRatio >= offsetRatio) {
|
||||
const referenceHeight = offsetWidth / naturalRatio;
|
||||
buttonTop = (offsetHeight - referenceHeight) / 2 + buttonOffsetTop + 16;
|
||||
buttonRight = buttonOffsetRight + 16;
|
||||
} else {
|
||||
const referenceWidth = offsetHeight * naturalRatio;
|
||||
buttonTop = buttonOffsetTop + 16;
|
||||
buttonRight = (offsetWidth - referenceWidth) / 2 + buttonOffsetRight + 16;
|
||||
}
|
||||
}
|
||||
state.metadata[imageId].buttonTop = buttonTop;
|
||||
state.metadata[imageId].buttonRight = buttonRight;
|
||||
},
|
||||
setOverlayFocus() {
|
||||
if (state.overlayEnabled) {
|
||||
const { ref } = getElement();
|
||||
ref.focus();
|
||||
}
|
||||
},
|
||||
setInertElements() {
|
||||
document.querySelectorAll("body > :not(.wp-lightbox-overlay)").forEach((el) => {
|
||||
if (state.overlayEnabled) {
|
||||
el.setAttribute("inert", "");
|
||||
} else {
|
||||
el.removeAttribute("inert");
|
||||
}
|
||||
});
|
||||
},
|
||||
initTriggerButton() {
|
||||
const { imageId } = getContext();
|
||||
const { ref } = getElement();
|
||||
state.metadata[imageId].buttonRef = ref;
|
||||
}
|
||||
}
|
||||
},
|
||||
{ lock: true }
|
||||
);
|
||||
1
wp-includes/js/dist/script-modules/block-library/image/view.min.asset.php
vendored
Normal file
1
wp-includes/js/dist/script-modules/block-library/image/view.min.asset.php
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'module_dependencies' => array(array('id' => '@wordpress/interactivity', 'import' => 'static')), 'version' => '25ee935fd6c67371d0f3');
|
||||
10
wp-includes/js/dist/script-modules/block-library/image/view.min.js
vendored
Normal file
10
wp-includes/js/dist/script-modules/block-library/image/view.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
177
wp-includes/js/dist/script-modules/block-library/navigation/view.js
vendored
Normal file
177
wp-includes/js/dist/script-modules/block-library/navigation/view.js
vendored
Normal file
@@ -0,0 +1,177 @@
|
||||
// packages/block-library/build-module/navigation/view.mjs
|
||||
import {
|
||||
store,
|
||||
getContext,
|
||||
getElement,
|
||||
withSyncEvent
|
||||
} from "@wordpress/interactivity";
|
||||
var focusableSelectors = [
|
||||
"a[href]",
|
||||
'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',
|
||||
"select:not([disabled]):not([aria-hidden])",
|
||||
"textarea:not([disabled]):not([aria-hidden])",
|
||||
"button:not([disabled]):not([aria-hidden])",
|
||||
"[contenteditable]",
|
||||
'[tabindex]:not([tabindex^="-"])'
|
||||
];
|
||||
function getFocusableElements(ref) {
|
||||
const focusableElements = ref.querySelectorAll(focusableSelectors);
|
||||
return Array.from(focusableElements).filter((element) => {
|
||||
if (typeof element.checkVisibility === "function") {
|
||||
return element.checkVisibility({
|
||||
checkOpacity: false,
|
||||
checkVisibilityCSS: true
|
||||
});
|
||||
}
|
||||
return element.offsetParent !== null;
|
||||
});
|
||||
}
|
||||
document.addEventListener("click", () => {
|
||||
});
|
||||
var { state, actions } = store(
|
||||
"core/navigation",
|
||||
{
|
||||
state: {
|
||||
get roleAttribute() {
|
||||
const ctx = getContext();
|
||||
return ctx.type === "overlay" && state.isMenuOpen ? "dialog" : null;
|
||||
},
|
||||
get ariaModal() {
|
||||
const ctx = getContext();
|
||||
return ctx.type === "overlay" && state.isMenuOpen ? "true" : null;
|
||||
},
|
||||
get ariaLabel() {
|
||||
const ctx = getContext();
|
||||
return ctx.type === "overlay" && state.isMenuOpen ? ctx.ariaLabel : null;
|
||||
},
|
||||
get isMenuOpen() {
|
||||
return Object.values(state.menuOpenedBy).filter(Boolean).length > 0;
|
||||
},
|
||||
get menuOpenedBy() {
|
||||
const ctx = getContext();
|
||||
return ctx.type === "overlay" ? ctx.overlayOpenedBy : ctx.submenuOpenedBy;
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
openMenuOnHover(event) {
|
||||
if (event?.pointerType === "touch") {
|
||||
return;
|
||||
}
|
||||
const { type, overlayOpenedBy } = getContext();
|
||||
if (type === "submenu" && // Only open on hover if the overlay is closed.
|
||||
Object.values(overlayOpenedBy || {}).filter(Boolean).length === 0) {
|
||||
actions.openMenu("hover");
|
||||
}
|
||||
},
|
||||
closeMenuOnHover(event) {
|
||||
if (event?.pointerType === "touch") {
|
||||
return;
|
||||
}
|
||||
const { type, overlayOpenedBy } = getContext();
|
||||
if (type === "submenu" && // Only close on hover if the overlay is closed.
|
||||
Object.values(overlayOpenedBy || {}).filter(Boolean).length === 0) {
|
||||
actions.closeMenu("hover");
|
||||
}
|
||||
},
|
||||
openMenuOnClick() {
|
||||
const ctx = getContext();
|
||||
const { ref } = getElement();
|
||||
ctx.previousFocus = ref;
|
||||
actions.openMenu("click");
|
||||
},
|
||||
closeMenuOnClick() {
|
||||
actions.closeMenu("click");
|
||||
actions.closeMenu("focus");
|
||||
},
|
||||
openMenuOnFocus() {
|
||||
actions.openMenu("focus");
|
||||
},
|
||||
toggleMenuOnClick() {
|
||||
const ctx = getContext();
|
||||
const { ref } = getElement();
|
||||
if (window.document.activeElement !== ref) {
|
||||
ref.focus();
|
||||
}
|
||||
const { menuOpenedBy } = state;
|
||||
if (menuOpenedBy.click || menuOpenedBy.focus) {
|
||||
actions.closeMenu("click");
|
||||
actions.closeMenu("focus");
|
||||
actions.closeMenu("hover");
|
||||
} else {
|
||||
ctx.previousFocus = ref;
|
||||
actions.openMenu("click");
|
||||
}
|
||||
},
|
||||
handleMenuKeydown: withSyncEvent((event) => {
|
||||
const { type, firstFocusableElement, lastFocusableElement } = getContext();
|
||||
if (state.menuOpenedBy.click) {
|
||||
if (event.key === "Escape") {
|
||||
event.stopPropagation();
|
||||
actions.closeMenu("click");
|
||||
actions.closeMenu("focus");
|
||||
return;
|
||||
}
|
||||
if (type === "overlay" && event.key === "Tab") {
|
||||
if (event.shiftKey && window.document.activeElement === firstFocusableElement) {
|
||||
event.preventDefault();
|
||||
lastFocusableElement.focus();
|
||||
} else if (!event.shiftKey && window.document.activeElement === lastFocusableElement) {
|
||||
event.preventDefault();
|
||||
firstFocusableElement.focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
}),
|
||||
handleMenuFocusout: withSyncEvent((event) => {
|
||||
const { modal, type } = getContext();
|
||||
if (event.relatedTarget === null || !modal?.contains(event.relatedTarget) && event.target !== window.document.activeElement && type === "submenu") {
|
||||
actions.closeMenu("click");
|
||||
actions.closeMenu("focus");
|
||||
}
|
||||
}),
|
||||
openMenu(menuOpenedOn = "click") {
|
||||
const { type } = getContext();
|
||||
state.menuOpenedBy[menuOpenedOn] = true;
|
||||
if (type === "overlay") {
|
||||
document.documentElement.classList.add("has-modal-open");
|
||||
}
|
||||
},
|
||||
closeMenu(menuClosedOn = "click") {
|
||||
const ctx = getContext();
|
||||
state.menuOpenedBy[menuClosedOn] = false;
|
||||
if (!state.isMenuOpen) {
|
||||
if (ctx.modal?.contains(window.document.activeElement)) {
|
||||
ctx.previousFocus?.focus();
|
||||
}
|
||||
ctx.modal = null;
|
||||
ctx.previousFocus = null;
|
||||
if (ctx.type === "overlay") {
|
||||
document.documentElement.classList.remove(
|
||||
"has-modal-open"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
callbacks: {
|
||||
initMenu() {
|
||||
const ctx = getContext();
|
||||
const { ref } = getElement();
|
||||
if (state.isMenuOpen) {
|
||||
const focusableElements = getFocusableElements(ref);
|
||||
ctx.modal = ref;
|
||||
ctx.firstFocusableElement = focusableElements[0];
|
||||
ctx.lastFocusableElement = focusableElements[focusableElements.length - 1];
|
||||
}
|
||||
},
|
||||
focusFirstElement() {
|
||||
const { ref } = getElement();
|
||||
if (state.isMenuOpen) {
|
||||
const focusableElements = getFocusableElements(ref);
|
||||
focusableElements?.[0]?.focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{ lock: true }
|
||||
);
|
||||
1
wp-includes/js/dist/script-modules/block-library/navigation/view.min.asset.php
vendored
Normal file
1
wp-includes/js/dist/script-modules/block-library/navigation/view.min.asset.php
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'module_dependencies' => array(array('id' => '@wordpress/interactivity', 'import' => 'static')), 'version' => '96a846e1d7b789c39ab9');
|
||||
1
wp-includes/js/dist/script-modules/block-library/navigation/view.min.js
vendored
Normal file
1
wp-includes/js/dist/script-modules/block-library/navigation/view.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import{store as r,getContext as c,getElement as s,withSyncEvent as i}from"@wordpress/interactivity";var d=["a[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","[contenteditable]",'[tabindex]:not([tabindex^="-"])'];function a(e){let n=e.querySelectorAll(d);return Array.from(n).filter(t=>typeof t.checkVisibility=="function"?t.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!0}):t.offsetParent!==null)}document.addEventListener("click",()=>{});var{state:l,actions:o}=r("core/navigation",{state:{get roleAttribute(){return c().type==="overlay"&&l.isMenuOpen?"dialog":null},get ariaModal(){return c().type==="overlay"&&l.isMenuOpen?"true":null},get ariaLabel(){let e=c();return e.type==="overlay"&&l.isMenuOpen?e.ariaLabel:null},get isMenuOpen(){return Object.values(l.menuOpenedBy).filter(Boolean).length>0},get menuOpenedBy(){let e=c();return e.type==="overlay"?e.overlayOpenedBy:e.submenuOpenedBy}},actions:{openMenuOnHover(e){if(e?.pointerType==="touch")return;let{type:n,overlayOpenedBy:t}=c();n==="submenu"&&Object.values(t||{}).filter(Boolean).length===0&&o.openMenu("hover")},closeMenuOnHover(e){if(e?.pointerType==="touch")return;let{type:n,overlayOpenedBy:t}=c();n==="submenu"&&Object.values(t||{}).filter(Boolean).length===0&&o.closeMenu("hover")},openMenuOnClick(){let e=c(),{ref:n}=s();e.previousFocus=n,o.openMenu("click")},closeMenuOnClick(){o.closeMenu("click"),o.closeMenu("focus")},openMenuOnFocus(){o.openMenu("focus")},toggleMenuOnClick(){let e=c(),{ref:n}=s();window.document.activeElement!==n&&n.focus();let{menuOpenedBy:t}=l;t.click||t.focus?(o.closeMenu("click"),o.closeMenu("focus"),o.closeMenu("hover")):(e.previousFocus=n,o.openMenu("click"))},handleMenuKeydown:i(e=>{let{type:n,firstFocusableElement:t,lastFocusableElement:u}=c();if(l.menuOpenedBy.click){if(e.key==="Escape"){e.stopPropagation(),o.closeMenu("click"),o.closeMenu("focus");return}n==="overlay"&&e.key==="Tab"&&(e.shiftKey&&window.document.activeElement===t?(e.preventDefault(),u.focus()):!e.shiftKey&&window.document.activeElement===u&&(e.preventDefault(),t.focus()))}}),handleMenuFocusout:i(e=>{let{modal:n,type:t}=c();(e.relatedTarget===null||!n?.contains(e.relatedTarget)&&e.target!==window.document.activeElement&&t==="submenu")&&(o.closeMenu("click"),o.closeMenu("focus"))}),openMenu(e="click"){let{type:n}=c();l.menuOpenedBy[e]=!0,n==="overlay"&&document.documentElement.classList.add("has-modal-open")},closeMenu(e="click"){let n=c();l.menuOpenedBy[e]=!1,l.isMenuOpen||(n.modal?.contains(window.document.activeElement)&&n.previousFocus?.focus(),n.modal=null,n.previousFocus=null,n.type==="overlay"&&document.documentElement.classList.remove("has-modal-open"))}},callbacks:{initMenu(){let e=c(),{ref:n}=s();if(l.isMenuOpen){let t=a(n);e.modal=n,e.firstFocusableElement=t[0],e.lastFocusableElement=t[t.length-1]}},focusFirstElement(){let{ref:e}=s();l.isMenuOpen&&a(e)?.[0]?.focus()}}},{lock:!0});
|
||||
64
wp-includes/js/dist/script-modules/block-library/playlist/view.js
vendored
Normal file
64
wp-includes/js/dist/script-modules/block-library/playlist/view.js
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
// packages/block-library/build-module/playlist/view.mjs
|
||||
import { store, getContext, getElement } from "@wordpress/interactivity";
|
||||
store(
|
||||
"core/playlist",
|
||||
{
|
||||
state: {
|
||||
playlists: {},
|
||||
get currentTrack() {
|
||||
const { currentId, playlistId } = getContext();
|
||||
if (!currentId || !playlistId) {
|
||||
return {};
|
||||
}
|
||||
const playlist = this.playlists[playlistId];
|
||||
if (!playlist) {
|
||||
return {};
|
||||
}
|
||||
return playlist.tracks[currentId] || {};
|
||||
},
|
||||
get isCurrentTrack() {
|
||||
const { currentId, uniqueId } = getContext();
|
||||
return currentId === uniqueId;
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
changeTrack() {
|
||||
const context = getContext();
|
||||
context.currentId = context.uniqueId;
|
||||
context.isPlaying = true;
|
||||
},
|
||||
isPlaying() {
|
||||
const context = getContext();
|
||||
context.isPlaying = true;
|
||||
},
|
||||
isPaused() {
|
||||
const context = getContext();
|
||||
context.isPlaying = false;
|
||||
},
|
||||
nextSong() {
|
||||
const context = getContext();
|
||||
const currentIndex = context.tracks.findIndex(
|
||||
(uniqueId) => uniqueId === context.currentId
|
||||
);
|
||||
const nextTrack = context.tracks[currentIndex + 1];
|
||||
if (nextTrack) {
|
||||
context.currentId = nextTrack;
|
||||
const { ref } = getElement();
|
||||
setTimeout(() => {
|
||||
ref.play();
|
||||
}, 1e3);
|
||||
}
|
||||
}
|
||||
},
|
||||
callbacks: {
|
||||
autoPlay() {
|
||||
const context = getContext();
|
||||
const { ref } = getElement();
|
||||
if (context.currentId && context.isPlaying) {
|
||||
ref.play();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{ lock: true }
|
||||
);
|
||||
1
wp-includes/js/dist/script-modules/block-library/playlist/view.min.asset.php
vendored
Normal file
1
wp-includes/js/dist/script-modules/block-library/playlist/view.min.asset.php
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'module_dependencies' => array(array('id' => '@wordpress/interactivity', 'import' => 'static')), 'version' => '99f747d731f80246db11');
|
||||
1
wp-includes/js/dist/script-modules/block-library/playlist/view.min.js
vendored
Normal file
1
wp-includes/js/dist/script-modules/block-library/playlist/view.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import{store as a,getContext as e,getElement as s}from"@wordpress/interactivity";a("core/playlist",{state:{playlists:{},get currentTrack(){let{currentId:t,playlistId:n}=e();if(!t||!n)return{};let r=this.playlists[n];return r?r.tracks[t]||{}:{}},get isCurrentTrack(){let{currentId:t,uniqueId:n}=e();return t===n}},actions:{changeTrack(){let t=e();t.currentId=t.uniqueId,t.isPlaying=!0},isPlaying(){let t=e();t.isPlaying=!0},isPaused(){let t=e();t.isPlaying=!1},nextSong(){let t=e(),n=t.tracks.findIndex(c=>c===t.currentId),r=t.tracks[n+1];if(r){t.currentId=r;let{ref:c}=s();setTimeout(()=>{c.play()},1e3)}}},callbacks:{autoPlay(){let t=e(),{ref:n}=s();t.currentId&&t.isPlaying&&n.play()}}},{lock:!0});
|
||||
53
wp-includes/js/dist/script-modules/block-library/query/view.js
vendored
Normal file
53
wp-includes/js/dist/script-modules/block-library/query/view.js
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
// packages/block-library/build-module/query/view.mjs
|
||||
import {
|
||||
store,
|
||||
getContext,
|
||||
getElement,
|
||||
withSyncEvent
|
||||
} from "@wordpress/interactivity";
|
||||
var isValidLink = (ref) => ref && ref instanceof window.HTMLAnchorElement && ref.href && (!ref.target || ref.target === "_self") && ref.origin === window.location.origin;
|
||||
var isValidEvent = (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;
|
||||
store(
|
||||
"core/query",
|
||||
{
|
||||
actions: {
|
||||
navigate: withSyncEvent(function* (event) {
|
||||
const ctx = getContext();
|
||||
const { ref } = getElement();
|
||||
const queryRef = ref.closest(
|
||||
".wp-block-query[data-wp-router-region]"
|
||||
);
|
||||
if (isValidLink(ref) && isValidEvent(event)) {
|
||||
event.preventDefault();
|
||||
const { actions } = yield import("@wordpress/interactivity-router");
|
||||
yield actions.navigate(ref.href);
|
||||
ctx.url = ref.href;
|
||||
const firstAnchor = `.wp-block-post-template a[href]`;
|
||||
queryRef.querySelector(firstAnchor)?.focus();
|
||||
}
|
||||
}),
|
||||
*prefetch() {
|
||||
const { ref } = getElement();
|
||||
if (isValidLink(ref)) {
|
||||
const { actions } = yield import("@wordpress/interactivity-router");
|
||||
yield actions.prefetch(ref.href);
|
||||
}
|
||||
}
|
||||
},
|
||||
callbacks: {
|
||||
*prefetch() {
|
||||
const { url } = getContext();
|
||||
const { ref } = getElement();
|
||||
if (url && isValidLink(ref)) {
|
||||
const { actions } = yield import("@wordpress/interactivity-router");
|
||||
yield actions.prefetch(ref.href);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{ lock: true }
|
||||
);
|
||||
1
wp-includes/js/dist/script-modules/block-library/query/view.min.asset.php
vendored
Normal file
1
wp-includes/js/dist/script-modules/block-library/query/view.min.asset.php
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'module_dependencies' => array(array('id' => '@wordpress/interactivity', 'import' => 'static'), array('id' => '@wordpress/interactivity-router', 'import' => 'dynamic')), 'version' => '7a4ec5bfb61a7137cf4b');
|
||||
1
wp-includes/js/dist/script-modules/block-library/query/view.min.js
vendored
Normal file
1
wp-includes/js/dist/script-modules/block-library/query/view.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import{store as a,getContext as c,getElement as r,withSyncEvent as l}from"@wordpress/interactivity";var i=t=>t&&t instanceof window.HTMLAnchorElement&&t.href&&(!t.target||t.target==="_self")&&t.origin===window.location.origin,f=t=>t.button===0&&!t.metaKey&&!t.ctrlKey&&!t.altKey&&!t.shiftKey&&!t.defaultPrevented;a("core/query",{actions:{navigate:l(function*(t){let e=c(),{ref:o}=r(),n=o.closest(".wp-block-query[data-wp-router-region]");if(i(o)&&f(t)){t.preventDefault();let{actions:s}=yield import("@wordpress/interactivity-router");yield s.navigate(o.href),e.url=o.href,n.querySelector(".wp-block-post-template a[href]")?.focus()}}),*prefetch(){let{ref:t}=r();if(i(t)){let{actions:e}=yield import("@wordpress/interactivity-router");yield e.prefetch(t.href)}}},callbacks:{*prefetch(){let{url:t}=c(),{ref:e}=r();if(t&&i(e)){let{actions:o}=yield import("@wordpress/interactivity-router");yield o.prefetch(e.href)}}}},{lock:!0});
|
||||
63
wp-includes/js/dist/script-modules/block-library/search/view.js
vendored
Normal file
63
wp-includes/js/dist/script-modules/block-library/search/view.js
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
// packages/block-library/build-module/search/view.mjs
|
||||
import {
|
||||
store,
|
||||
getContext,
|
||||
getElement,
|
||||
withSyncEvent
|
||||
} from "@wordpress/interactivity";
|
||||
var { actions } = store(
|
||||
"core/search",
|
||||
{
|
||||
state: {
|
||||
get ariaLabel() {
|
||||
const {
|
||||
isSearchInputVisible,
|
||||
ariaLabelCollapsed,
|
||||
ariaLabelExpanded
|
||||
} = getContext();
|
||||
return isSearchInputVisible ? ariaLabelExpanded : ariaLabelCollapsed;
|
||||
},
|
||||
get ariaControls() {
|
||||
const { isSearchInputVisible, inputId } = getContext();
|
||||
return isSearchInputVisible ? null : inputId;
|
||||
},
|
||||
get type() {
|
||||
const { isSearchInputVisible } = getContext();
|
||||
return isSearchInputVisible ? "submit" : "button";
|
||||
},
|
||||
get tabindex() {
|
||||
const { isSearchInputVisible } = getContext();
|
||||
return isSearchInputVisible ? "0" : "-1";
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
openSearchInput: withSyncEvent((event) => {
|
||||
const ctx = getContext();
|
||||
const { ref } = getElement();
|
||||
if (!ctx.isSearchInputVisible) {
|
||||
event.preventDefault();
|
||||
ctx.isSearchInputVisible = true;
|
||||
ref.parentElement.querySelector("input").focus();
|
||||
}
|
||||
}),
|
||||
closeSearchInput() {
|
||||
const ctx = getContext();
|
||||
ctx.isSearchInputVisible = false;
|
||||
},
|
||||
handleSearchKeydown: withSyncEvent((event) => {
|
||||
const { ref } = getElement();
|
||||
if (event?.key === "Escape") {
|
||||
actions.closeSearchInput();
|
||||
ref.querySelector("button").focus();
|
||||
}
|
||||
}),
|
||||
handleSearchFocusout: withSyncEvent((event) => {
|
||||
const { ref } = getElement();
|
||||
if (!ref.contains(event.relatedTarget) && event.target !== window.document.activeElement) {
|
||||
actions.closeSearchInput();
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
{ lock: true }
|
||||
);
|
||||
1
wp-includes/js/dist/script-modules/block-library/search/view.min.asset.php
vendored
Normal file
1
wp-includes/js/dist/script-modules/block-library/search/view.min.asset.php
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'module_dependencies' => array(array('id' => '@wordpress/interactivity', 'import' => 'static')), 'version' => '38bd0e230eaffa354d2a');
|
||||
1
wp-includes/js/dist/script-modules/block-library/search/view.min.js
vendored
Normal file
1
wp-includes/js/dist/script-modules/block-library/search/view.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import{store as i,getContext as n,getElement as a,withSyncEvent as c}from"@wordpress/interactivity";var{actions:s}=i("core/search",{state:{get ariaLabel(){let{isSearchInputVisible:e,ariaLabelCollapsed:t,ariaLabelExpanded:r}=n();return e?r:t},get ariaControls(){let{isSearchInputVisible:e,inputId:t}=n();return e?null:t},get type(){let{isSearchInputVisible:e}=n();return e?"submit":"button"},get tabindex(){let{isSearchInputVisible:e}=n();return e?"0":"-1"}},actions:{openSearchInput:c(e=>{let t=n(),{ref:r}=a();t.isSearchInputVisible||(e.preventDefault(),t.isSearchInputVisible=!0,r.parentElement.querySelector("input").focus())}),closeSearchInput(){let e=n();e.isSearchInputVisible=!1},handleSearchKeydown:c(e=>{let{ref:t}=a();e?.key==="Escape"&&(s.closeSearchInput(),t.querySelector("button").focus())}),handleSearchFocusout:c(e=>{let{ref:t}=a();!t.contains(e.relatedTarget)&&e.target!==window.document.activeElement&&s.closeSearchInput()})}},{lock:!0});
|
||||
246
wp-includes/js/dist/script-modules/block-library/tabs/view.js
vendored
Normal file
246
wp-includes/js/dist/script-modules/block-library/tabs/view.js
vendored
Normal file
@@ -0,0 +1,246 @@
|
||||
// packages/block-library/build-module/tabs/view.mjs
|
||||
import {
|
||||
store,
|
||||
getContext,
|
||||
getElement,
|
||||
withSyncEvent
|
||||
} from "@wordpress/interactivity";
|
||||
function createReadOnlyProxy(obj) {
|
||||
const arrayMutationMethods = /* @__PURE__ */ new Set([
|
||||
"push",
|
||||
"pop",
|
||||
"shift",
|
||||
"unshift",
|
||||
"splice",
|
||||
"sort",
|
||||
"reverse",
|
||||
"copyWithin",
|
||||
"fill"
|
||||
]);
|
||||
return new Proxy(obj, {
|
||||
get(target, prop) {
|
||||
if (Array.isArray(target) && arrayMutationMethods.has(prop)) {
|
||||
return () => {
|
||||
};
|
||||
}
|
||||
const value = target[prop];
|
||||
if (typeof value === "object" && value !== null) {
|
||||
return createReadOnlyProxy(value);
|
||||
}
|
||||
return value;
|
||||
},
|
||||
set() {
|
||||
return false;
|
||||
},
|
||||
deleteProperty() {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
var { actions: privateActions, state: privateState } = store(
|
||||
"core/tabs/private",
|
||||
{
|
||||
state: {
|
||||
/**
|
||||
* Gets a contextually aware list of tabs for the current tabs block.
|
||||
*
|
||||
* @type {Array}
|
||||
*/
|
||||
get tabsList() {
|
||||
const context = getContext();
|
||||
const tabsId = context?.tabsId;
|
||||
const tabsList = privateState[tabsId];
|
||||
return tabsList;
|
||||
},
|
||||
/**
|
||||
* Gets the index of the active tab element whether it
|
||||
* is a tab label or tab panel.
|
||||
*
|
||||
* @type {number|null}
|
||||
*/
|
||||
get tabIndex() {
|
||||
const { attributes } = getElement();
|
||||
const tabId = attributes?.id?.replace("tab__", "") || null;
|
||||
if (!tabId) {
|
||||
return null;
|
||||
}
|
||||
const { tabsList } = privateState;
|
||||
const tabIndex = tabsList.findIndex((t) => t.id === tabId);
|
||||
return tabIndex;
|
||||
},
|
||||
/**
|
||||
* Whether the tab panel or tab label is the active tab.
|
||||
*
|
||||
* @type {boolean}
|
||||
*/
|
||||
get isActiveTab() {
|
||||
const { activeTabIndex } = getContext();
|
||||
const { tabIndex } = privateState;
|
||||
return activeTabIndex === tabIndex;
|
||||
},
|
||||
/**
|
||||
* The value of the tabindex attribute for tab buttons.
|
||||
* Only the active tab should be in the tab sequence.
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
get tabIndexAttribute() {
|
||||
return privateState.isActiveTab ? 0 : -1;
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
/**
|
||||
* Handles the keydown events for the tab label and tabs controller.
|
||||
*
|
||||
* @param {KeyboardEvent} event The keydown event.
|
||||
*/
|
||||
handleTabKeyDown: withSyncEvent((event) => {
|
||||
const context = getContext();
|
||||
const { isVertical } = context;
|
||||
const { tabIndex } = privateState;
|
||||
if (tabIndex === null) {
|
||||
return;
|
||||
}
|
||||
if (event.key === "ArrowRight" && !isVertical) {
|
||||
event.preventDefault();
|
||||
privateActions.moveFocus(tabIndex + 1);
|
||||
} else if (event.key === "ArrowLeft" && !isVertical) {
|
||||
event.preventDefault();
|
||||
privateActions.moveFocus(tabIndex - 1);
|
||||
} else if (event.key === "ArrowDown" && isVertical) {
|
||||
event.preventDefault();
|
||||
privateActions.moveFocus(tabIndex + 1);
|
||||
} else if (event.key === "ArrowUp" && isVertical) {
|
||||
event.preventDefault();
|
||||
privateActions.moveFocus(tabIndex - 1);
|
||||
}
|
||||
}),
|
||||
/**
|
||||
* Handles the click event for the tab label.
|
||||
*
|
||||
* @param {MouseEvent} event The click event.
|
||||
*/
|
||||
handleTabClick: withSyncEvent((event) => {
|
||||
event.preventDefault();
|
||||
const { tabIndex } = privateState;
|
||||
if (tabIndex !== null) {
|
||||
privateActions.setActiveTab(tabIndex);
|
||||
}
|
||||
}),
|
||||
/**
|
||||
* Moves focus to a specific tab without activating it.
|
||||
*
|
||||
* @param {number} tabIndex The index to move focus to.
|
||||
*/
|
||||
moveFocus: (tabIndex) => {
|
||||
const { tabsList } = privateState;
|
||||
if (!tabsList || tabsList.length === 0) {
|
||||
return;
|
||||
}
|
||||
let newIndex = tabIndex;
|
||||
if (newIndex < 0) {
|
||||
newIndex = tabsList.length - 1;
|
||||
} else if (newIndex >= tabsList.length) {
|
||||
newIndex = 0;
|
||||
}
|
||||
const tabId = tabsList[newIndex].id;
|
||||
const tabElement = document.getElementById("tab__" + tabId);
|
||||
if (tabElement) {
|
||||
tabElement.focus();
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Sets the active tab index (internal implementation).
|
||||
*
|
||||
* @param {number} tabIndex The index of the active tab.
|
||||
* @param {boolean} scrollToTab Whether to scroll to the tab element.
|
||||
*/
|
||||
setActiveTab: (tabIndex, scrollToTab = false) => {
|
||||
const { tabsList } = privateState;
|
||||
if (!tabsList || tabsList.length === 0) {
|
||||
return;
|
||||
}
|
||||
let newIndex = tabIndex;
|
||||
if (newIndex < 0) {
|
||||
newIndex = 0;
|
||||
} else if (newIndex >= tabsList.length) {
|
||||
newIndex = tabsList.length - 1;
|
||||
}
|
||||
const context = getContext();
|
||||
context.activeTabIndex = newIndex;
|
||||
if (scrollToTab) {
|
||||
const tabId = tabsList[newIndex].id;
|
||||
const tabElement = document.getElementById(tabId);
|
||||
if (tabElement) {
|
||||
setTimeout(() => {
|
||||
tabElement.scrollIntoView({ behavior: "smooth" });
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
callbacks: {
|
||||
/**
|
||||
* When the tabs are initialized, we need to check if there is a hash in the url and if so if it exists in the current tabsList, set the active tab to that index.
|
||||
*
|
||||
*/
|
||||
onTabsInit: () => {
|
||||
const { tabsList } = privateState;
|
||||
if (tabsList.length === 0) {
|
||||
return;
|
||||
}
|
||||
const { hash } = window.location;
|
||||
const tabId = hash.replace("#", "");
|
||||
const tabIndex = tabsList.findIndex((t) => t.id === tabId);
|
||||
if (tabIndex >= 0) {
|
||||
privateActions.setActiveTab(tabIndex, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
lock: true
|
||||
}
|
||||
);
|
||||
store("core/tabs", {
|
||||
state: {
|
||||
/**
|
||||
* Gets a contextually aware list of tabs for the current tabs block.
|
||||
* Public API for third-party access.
|
||||
*
|
||||
* @type {Array}
|
||||
*/
|
||||
get tabsList() {
|
||||
return createReadOnlyProxy(privateState.tabsList);
|
||||
},
|
||||
/**
|
||||
* Gets the index of the active tab element whether it
|
||||
* is a tab label or tab panel.
|
||||
*
|
||||
* @type {number|null}
|
||||
*/
|
||||
get tabIndex() {
|
||||
return privateState.tabIndex;
|
||||
},
|
||||
/**
|
||||
* Whether the tab panel or tab label is the active tab.
|
||||
*
|
||||
* @type {boolean}
|
||||
*/
|
||||
get isActiveTab() {
|
||||
return privateState.isActiveTab;
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
/**
|
||||
* Sets the active tab index.
|
||||
* Public API for third-party programmatic tab activation.
|
||||
*
|
||||
* @param {number} tabIndex The index of the active tab.
|
||||
* @param {boolean} scrollToTab Whether to scroll to the tab element.
|
||||
*/
|
||||
setActiveTab: (tabIndex, scrollToTab = false) => {
|
||||
privateActions.setActiveTab(tabIndex, scrollToTab);
|
||||
}
|
||||
}
|
||||
});
|
||||
1
wp-includes/js/dist/script-modules/block-library/tabs/view.min.asset.php
vendored
Normal file
1
wp-includes/js/dist/script-modules/block-library/tabs/view.min.asset.php
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'module_dependencies' => array(array('id' => '@wordpress/interactivity', 'import' => 'static')), 'version' => '1f60dd5e3fa56c6b2e2e');
|
||||
1
wp-includes/js/dist/script-modules/block-library/tabs/view.min.js
vendored
Normal file
1
wp-includes/js/dist/script-modules/block-library/tabs/view.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import{store as b,getContext as r,getElement as f,withSyncEvent as l}from"@wordpress/interactivity";function u(t){let e=new Set(["push","pop","shift","unshift","splice","sort","reverse","copyWithin","fill"]);return new Proxy(t,{get(n,s){if(Array.isArray(n)&&e.has(s))return()=>{};let a=n[s];return typeof a=="object"&&a!==null?u(a):a},set(){return!1},deleteProperty(){return!1}})}var{actions:o,state:i}=b("core/tabs/private",{state:{get tabsList(){let e=r()?.tabsId;return i[e]},get tabIndex(){let{attributes:t}=f(),e=t?.id?.replace("tab__","")||null;if(!e)return null;let{tabsList:n}=i;return n.findIndex(a=>a.id===e)},get isActiveTab(){let{activeTabIndex:t}=r(),{tabIndex:e}=i;return t===e},get tabIndexAttribute(){return i.isActiveTab?0:-1}},actions:{handleTabKeyDown:l(t=>{let e=r(),{isVertical:n}=e,{tabIndex:s}=i;s!==null&&(t.key==="ArrowRight"&&!n?(t.preventDefault(),o.moveFocus(s+1)):t.key==="ArrowLeft"&&!n?(t.preventDefault(),o.moveFocus(s-1)):t.key==="ArrowDown"&&n?(t.preventDefault(),o.moveFocus(s+1)):t.key==="ArrowUp"&&n&&(t.preventDefault(),o.moveFocus(s-1)))}),handleTabClick:l(t=>{t.preventDefault();let{tabIndex:e}=i;e!==null&&o.setActiveTab(e)}),moveFocus:t=>{let{tabsList:e}=i;if(!e||e.length===0)return;let n=t;n<0?n=e.length-1:n>=e.length&&(n=0);let s=e[n].id,a=document.getElementById("tab__"+s);a&&a.focus()},setActiveTab:(t,e=!1)=>{let{tabsList:n}=i;if(!n||n.length===0)return;let s=t;s<0?s=0:s>=n.length&&(s=n.length-1);let a=r();if(a.activeTabIndex=s,e){let d=n[s].id,c=document.getElementById(d);c&&setTimeout(()=>{c.scrollIntoView({behavior:"smooth"})},100)}}},callbacks:{onTabsInit:()=>{let{tabsList:t}=i;if(t.length===0)return;let{hash:e}=window.location,n=e.replace("#",""),s=t.findIndex(a=>a.id===n);s>=0&&o.setActiveTab(s,!0)}}},{lock:!0});b("core/tabs",{state:{get tabsList(){return u(i.tabsList)},get tabIndex(){return i.tabIndex},get isActiveTab(){return i.isActiveTab}},actions:{setActiveTab:(t,e=!1)=>{o.setActiveTab(t,e)}}});
|
||||
2435
wp-includes/js/dist/script-modules/boot/index.js
vendored
Normal file
2435
wp-includes/js/dist/script-modules/boot/index.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
wp-includes/js/dist/script-modules/boot/index.min.asset.php
vendored
Normal file
1
wp-includes/js/dist/script-modules/boot/index.min.asset.php
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-theme', 'wp-url'), 'module_dependencies' => array(array('id' => '@wordpress/a11y', 'import' => 'static'), array('id' => '@wordpress/lazy-editor', 'import' => 'dynamic'), array('id' => '@wordpress/route', 'import' => 'static')), 'version' => '54bb5a420026a61c7e4f');
|
||||
1
wp-includes/js/dist/script-modules/boot/index.min.js
vendored
Normal file
1
wp-includes/js/dist/script-modules/boot/index.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
318
wp-includes/js/dist/script-modules/connectors/index.js
vendored
Normal file
318
wp-includes/js/dist/script-modules/connectors/index.js
vendored
Normal file
@@ -0,0 +1,318 @@
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __commonJS = (cb, mod) => function __require() {
|
||||
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
|
||||
// package-external:@wordpress/data
|
||||
var require_data = __commonJS({
|
||||
"package-external:@wordpress/data"(exports, module) {
|
||||
module.exports = window.wp.data;
|
||||
}
|
||||
});
|
||||
|
||||
// package-external:@wordpress/private-apis
|
||||
var require_private_apis = __commonJS({
|
||||
"package-external:@wordpress/private-apis"(exports, module) {
|
||||
module.exports = window.wp.privateApis;
|
||||
}
|
||||
});
|
||||
|
||||
// package-external:@wordpress/components
|
||||
var require_components = __commonJS({
|
||||
"package-external:@wordpress/components"(exports, module) {
|
||||
module.exports = window.wp.components;
|
||||
}
|
||||
});
|
||||
|
||||
// package-external:@wordpress/element
|
||||
var require_element = __commonJS({
|
||||
"package-external:@wordpress/element"(exports, module) {
|
||||
module.exports = window.wp.element;
|
||||
}
|
||||
});
|
||||
|
||||
// package-external:@wordpress/i18n
|
||||
var require_i18n = __commonJS({
|
||||
"package-external:@wordpress/i18n"(exports, module) {
|
||||
module.exports = window.wp.i18n;
|
||||
}
|
||||
});
|
||||
|
||||
// vendor-external:react/jsx-runtime
|
||||
var require_jsx_runtime = __commonJS({
|
||||
"vendor-external:react/jsx-runtime"(exports, module) {
|
||||
module.exports = window.ReactJSXRuntime;
|
||||
}
|
||||
});
|
||||
|
||||
// packages/connectors/build-module/api.mjs
|
||||
var import_data2 = __toESM(require_data(), 1);
|
||||
|
||||
// packages/connectors/build-module/store.mjs
|
||||
var import_data = __toESM(require_data(), 1);
|
||||
|
||||
// packages/connectors/build-module/lock-unlock.mjs
|
||||
var import_private_apis = __toESM(require_private_apis(), 1);
|
||||
var { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
|
||||
"I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
|
||||
"@wordpress/connectors"
|
||||
);
|
||||
|
||||
// packages/connectors/build-module/store.mjs
|
||||
var STORE_NAME = "core/connectors";
|
||||
var DEFAULT_STATE = {
|
||||
connectors: {}
|
||||
};
|
||||
var actions = {
|
||||
registerConnector(slug, config) {
|
||||
return {
|
||||
type: "REGISTER_CONNECTOR",
|
||||
slug,
|
||||
config
|
||||
};
|
||||
},
|
||||
unregisterConnector(slug) {
|
||||
return {
|
||||
type: "UNREGISTER_CONNECTOR",
|
||||
slug
|
||||
};
|
||||
}
|
||||
};
|
||||
function reducer(state = DEFAULT_STATE, action) {
|
||||
switch (action.type) {
|
||||
case "REGISTER_CONNECTOR":
|
||||
return {
|
||||
...state,
|
||||
connectors: {
|
||||
...state.connectors,
|
||||
[action.slug]: {
|
||||
...state.connectors[action.slug],
|
||||
slug: action.slug,
|
||||
...action.config
|
||||
}
|
||||
}
|
||||
};
|
||||
case "UNREGISTER_CONNECTOR": {
|
||||
if (!state.connectors[action.slug]) {
|
||||
return state;
|
||||
}
|
||||
const { [action.slug]: _, ...rest } = state.connectors;
|
||||
return {
|
||||
...state,
|
||||
connectors: rest
|
||||
};
|
||||
}
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
}
|
||||
var selectors = {
|
||||
getConnectors: (0, import_data.createSelector)(
|
||||
(state) => Object.values(state.connectors),
|
||||
(state) => [state.connectors]
|
||||
),
|
||||
getConnector(state, slug) {
|
||||
return state.connectors[slug];
|
||||
}
|
||||
};
|
||||
var store = (0, import_data.createReduxStore)(STORE_NAME, {
|
||||
reducer
|
||||
});
|
||||
(0, import_data.register)(store);
|
||||
unlock(store).registerPrivateActions(actions);
|
||||
unlock(store).registerPrivateSelectors(selectors);
|
||||
|
||||
// packages/connectors/build-module/api.mjs
|
||||
function registerConnector(slug, config) {
|
||||
unlock((0, import_data2.dispatch)(store)).registerConnector(slug, config);
|
||||
}
|
||||
function unregisterConnector(slug) {
|
||||
unlock((0, import_data2.dispatch)(store)).unregisterConnector(slug);
|
||||
}
|
||||
|
||||
// packages/connectors/build-module/connector-item.mjs
|
||||
var import_components = __toESM(require_components(), 1);
|
||||
var import_element = __toESM(require_element(), 1);
|
||||
var import_i18n = __toESM(require_i18n(), 1);
|
||||
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
||||
function ConnectorItem({
|
||||
className,
|
||||
logo,
|
||||
name,
|
||||
description,
|
||||
actionArea,
|
||||
children
|
||||
}) {
|
||||
const headingId = (0, import_element.useId)();
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.__experimentalItem, { className, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_components.__experimentalVStack, { spacing: 4, role: "group", "aria-labelledby": headingId, children: [
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_components.__experimentalHStack, { alignment: "center", spacing: 4, wrap: true, children: [
|
||||
logo,
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.FlexBlock, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_components.__experimentalVStack, { spacing: 0, children: [
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
import_components.__experimentalText,
|
||||
{
|
||||
weight: 600,
|
||||
size: 15,
|
||||
id: headingId,
|
||||
as: "h2",
|
||||
children: name
|
||||
}
|
||||
),
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.__experimentalText, { variant: "muted", size: 12, children: description })
|
||||
] }) }),
|
||||
actionArea
|
||||
] }),
|
||||
children
|
||||
] }) });
|
||||
}
|
||||
function DefaultConnectorSettings({
|
||||
onSave,
|
||||
onRemove,
|
||||
initialValue = "",
|
||||
helpUrl,
|
||||
helpLabel,
|
||||
readOnly = false,
|
||||
keySource
|
||||
}) {
|
||||
const [apiKey, setApiKey] = (0, import_element.useState)(initialValue);
|
||||
const [isSaving, setIsSaving] = (0, import_element.useState)(false);
|
||||
const [saveError, setSaveError] = (0, import_element.useState)(null);
|
||||
const helpLinkLabel = helpLabel || helpUrl?.replace(/^https?:\/\//, "");
|
||||
const helpLink = helpUrl ? (0, import_element.createInterpolateElement)(
|
||||
(0, import_i18n.sprintf)(
|
||||
/* translators: %s: Link to provider settings. */
|
||||
(0, import_i18n.__)("Get your API key at %s"),
|
||||
"<a></a>"
|
||||
),
|
||||
{
|
||||
a: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.ExternalLink, { href: helpUrl, children: helpLinkLabel })
|
||||
}
|
||||
) : void 0;
|
||||
const isExternallyConfigured = keySource === "env" || keySource === "constant";
|
||||
const getHelp = () => {
|
||||
if (isExternallyConfigured) {
|
||||
if (keySource === "env") {
|
||||
return (0, import_i18n.__)(
|
||||
"This API key is configured using an environment variable."
|
||||
);
|
||||
}
|
||||
if (keySource === "constant") {
|
||||
return (0, import_i18n.__)("This API key is configured as a constant.");
|
||||
}
|
||||
}
|
||||
if (readOnly) {
|
||||
return helpUrl ? (0, import_element.createInterpolateElement)(
|
||||
(0, import_i18n.sprintf)(
|
||||
/* translators: %s: Link to provider settings. */
|
||||
(0, import_i18n.__)(
|
||||
"Your API key is stored securely. You can manage it at %s"
|
||||
),
|
||||
"<a></a>"
|
||||
),
|
||||
{
|
||||
a: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.ExternalLink, { href: helpUrl, children: helpLinkLabel })
|
||||
}
|
||||
) : (0, import_i18n.__)("Your API key is stored securely.");
|
||||
}
|
||||
if (saveError) {
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { role: "alert", className: "connector-settings__error", children: saveError });
|
||||
}
|
||||
return helpLink;
|
||||
};
|
||||
const handleSave = async () => {
|
||||
setSaveError(null);
|
||||
setIsSaving(true);
|
||||
try {
|
||||
await onSave?.(apiKey);
|
||||
} catch (error) {
|
||||
setSaveError(
|
||||
error instanceof Error ? error.message : (0, import_i18n.__)(
|
||||
"It was not possible to connect to the provider using this key."
|
||||
)
|
||||
);
|
||||
} finally {
|
||||
setIsSaving(false);
|
||||
}
|
||||
};
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
||||
import_components.__experimentalVStack,
|
||||
{
|
||||
spacing: 4,
|
||||
className: "connector-settings",
|
||||
style: readOnly ? {
|
||||
"--wp-components-color-background": "#f0f0f0"
|
||||
} : void 0,
|
||||
children: [
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
import_components.TextControl,
|
||||
{
|
||||
__next40pxDefaultSize: true,
|
||||
label: (0, import_i18n.__)("API Key"),
|
||||
value: apiKey,
|
||||
onChange: (value) => {
|
||||
if (!readOnly) {
|
||||
setSaveError(null);
|
||||
setApiKey(value);
|
||||
}
|
||||
},
|
||||
placeholder: (0, import_i18n.__)("Enter your API key"),
|
||||
disabled: readOnly || isSaving,
|
||||
help: getHelp()
|
||||
}
|
||||
),
|
||||
readOnly ? onRemove && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.__experimentalHStack, { justify: "flex-start", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
import_components.Button,
|
||||
{
|
||||
variant: "link",
|
||||
isDestructive: true,
|
||||
onClick: onRemove,
|
||||
children: (0, import_i18n.__)("Remove and replace")
|
||||
}
|
||||
) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.__experimentalHStack, { justify: "flex-start", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
import_components.Button,
|
||||
{
|
||||
__next40pxDefaultSize: true,
|
||||
variant: "primary",
|
||||
disabled: !apiKey || isSaving,
|
||||
accessibleWhenDisabled: true,
|
||||
isBusy: isSaving,
|
||||
onClick: handleSave,
|
||||
children: (0, import_i18n.__)("Save")
|
||||
}
|
||||
) })
|
||||
]
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
// packages/connectors/build-module/private-apis.mjs
|
||||
var privateApis = {};
|
||||
lock(privateApis, { store, STORE_NAME });
|
||||
export {
|
||||
ConnectorItem as __experimentalConnectorItem,
|
||||
DefaultConnectorSettings as __experimentalDefaultConnectorSettings,
|
||||
registerConnector as __experimentalRegisterConnector,
|
||||
unregisterConnector as __experimentalUnregisterConnector,
|
||||
privateApis
|
||||
};
|
||||
1
wp-includes/js/dist/script-modules/connectors/index.min.asset.php
vendored
Normal file
1
wp-includes/js/dist/script-modules/connectors/index.min.asset.php
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-private-apis'), 'version' => '274797868955a828dfdc');
|
||||
1
wp-includes/js/dist/script-modules/connectors/index.min.js
vendored
Normal file
1
wp-includes/js/dist/script-modules/connectors/index.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var W=Object.create;var y=Object.defineProperty;var J=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var X=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var f=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var Q=(e,r,i,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let c of U(r))!q.call(e,c)&&c!==i&&y(e,c,{get:()=>r[c],enumerable:!(s=J(r,c))||s.enumerable});return e};var m=(e,r,i)=>(i=e!=null?W(X(e)):{},Q(r||!e||!e.__esModule?y(i,"default",{value:e,enumerable:!0}):i,e));var C=f((ce,T)=>{T.exports=window.wp.data});var A=f((ae,R)=>{R.exports=window.wp.privateApis});var O=f((ge,P)=>{P.exports=window.wp.components});var j=f((xe,D)=>{D.exports=window.wp.element});var L=f((_e,G)=>{G.exports=window.wp.i18n});var B=f((he,z)=>{z.exports=window.ReactJSXRuntime});var E=m(C(),1);var g=m(C(),1);var b=m(A(),1),{lock:N,unlock:d}=(0,b.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/connectors");var w="core/connectors",Z={connectors:{}},$={registerConnector(e,r){return{type:"REGISTER_CONNECTOR",slug:e,config:r}},unregisterConnector(e){return{type:"UNREGISTER_CONNECTOR",slug:e}}};function ee(e=Z,r){switch(r.type){case"REGISTER_CONNECTOR":return{...e,connectors:{...e.connectors,[r.slug]:{...e.connectors[r.slug],slug:r.slug,...r.config}}};case"UNREGISTER_CONNECTOR":{if(!e.connectors[r.slug])return e;let{[r.slug]:i,...s}=e.connectors;return{...e,connectors:s}}default:return e}}var re={getConnectors:(0,g.createSelector)(e=>Object.values(e.connectors),e=>[e.connectors]),getConnector(e,r){return e.connectors[r]}},l=(0,g.createReduxStore)(w,{reducer:ee});(0,g.register)(l);d(l).registerPrivateActions($);d(l).registerPrivateSelectors(re);function te(e,r){d((0,E.dispatch)(l)).registerConnector(e,r)}function ne(e){d((0,E.dispatch)(l)).unregisterConnector(e)}var t=m(O(),1),a=m(j(),1),o=m(L(),1),n=m(B(),1);function oe({className:e,logo:r,name:i,description:s,actionArea:c,children:p}){let u=(0,a.useId)();return(0,n.jsx)(t.__experimentalItem,{className:e,children:(0,n.jsxs)(t.__experimentalVStack,{spacing:4,role:"group","aria-labelledby":u,children:[(0,n.jsxs)(t.__experimentalHStack,{alignment:"center",spacing:4,wrap:!0,children:[r,(0,n.jsx)(t.FlexBlock,{children:(0,n.jsxs)(t.__experimentalVStack,{spacing:0,children:[(0,n.jsx)(t.__experimentalText,{weight:600,size:15,id:u,as:"h2",children:i}),(0,n.jsx)(t.__experimentalText,{variant:"muted",size:12,children:s})]})}),c]}),p]})})}function se({onSave:e,onRemove:r,initialValue:i="",helpUrl:s,helpLabel:c,readOnly:p=!1,keySource:u}){let[_,H]=(0,a.useState)(i),[h,I]=(0,a.useState)(!1),[k,v]=(0,a.useState)(null),S=c||s?.replace(/^https?:\/\//,""),K=s?(0,a.createInterpolateElement)((0,o.sprintf)((0,o.__)("Get your API key at %s"),"<a></a>"),{a:(0,n.jsx)(t.ExternalLink,{href:s,children:S})}):void 0,M=u==="env"||u==="constant",Y=()=>{if(M){if(u==="env")return(0,o.__)("This API key is configured using an environment variable.");if(u==="constant")return(0,o.__)("This API key is configured as a constant.")}return p?s?(0,a.createInterpolateElement)((0,o.sprintf)((0,o.__)("Your API key is stored securely. You can manage it at %s"),"<a></a>"),{a:(0,n.jsx)(t.ExternalLink,{href:s,children:S})}):(0,o.__)("Your API key is stored securely."):k?(0,n.jsx)("span",{role:"alert",className:"connector-settings__error",children:k}):K},V=async()=>{v(null),I(!0);try{await e?.(_)}catch(x){v(x instanceof Error?x.message:(0,o.__)("It was not possible to connect to the provider using this key."))}finally{I(!1)}};return(0,n.jsxs)(t.__experimentalVStack,{spacing:4,className:"connector-settings",style:p?{"--wp-components-color-background":"#f0f0f0"}:void 0,children:[(0,n.jsx)(t.TextControl,{__next40pxDefaultSize:!0,label:(0,o.__)("API Key"),value:_,onChange:x=>{p||(v(null),H(x))},placeholder:(0,o.__)("Enter your API key"),disabled:p||h,help:Y()}),p?r&&(0,n.jsx)(t.__experimentalHStack,{justify:"flex-start",children:(0,n.jsx)(t.Button,{variant:"link",isDestructive:!0,onClick:r,children:(0,o.__)("Remove and replace")})}):(0,n.jsx)(t.__experimentalHStack,{justify:"flex-start",children:(0,n.jsx)(t.Button,{__next40pxDefaultSize:!0,variant:"primary",disabled:!_||h,accessibleWhenDisabled:!0,isBusy:h,onClick:V,children:(0,o.__)("Save")})})]})}var F={};N(F,{store:l,STORE_NAME:w});export{oe as __experimentalConnectorItem,se as __experimentalDefaultConnectorSettings,te as __experimentalRegisterConnector,ne as __experimentalUnregisterConnector,F as privateApis};
|
||||
127
wp-includes/js/dist/script-modules/core-abilities/index.js
vendored
Normal file
127
wp-includes/js/dist/script-modules/core-abilities/index.js
vendored
Normal file
@@ -0,0 +1,127 @@
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __commonJS = (cb, mod) => function __require() {
|
||||
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
|
||||
// package-external:@wordpress/api-fetch
|
||||
var require_api_fetch = __commonJS({
|
||||
"package-external:@wordpress/api-fetch"(exports, module) {
|
||||
module.exports = window.wp.apiFetch;
|
||||
}
|
||||
});
|
||||
|
||||
// package-external:@wordpress/url
|
||||
var require_url = __commonJS({
|
||||
"package-external:@wordpress/url"(exports, module) {
|
||||
module.exports = window.wp.url;
|
||||
}
|
||||
});
|
||||
|
||||
// packages/core-abilities/build-module/index.mjs
|
||||
var import_api_fetch = __toESM(require_api_fetch(), 1);
|
||||
var import_url = __toESM(require_url(), 1);
|
||||
import { registerAbility, registerAbilityCategory } from "@wordpress/abilities";
|
||||
var API_BASE = "/wp-abilities/v1";
|
||||
var ABILITIES_ENDPOINT = `${API_BASE}/abilities`;
|
||||
var CATEGORIES_ENDPOINT = `${API_BASE}/categories`;
|
||||
function createServerCallback(ability) {
|
||||
return async (input) => {
|
||||
let method = "POST";
|
||||
if (!!ability.meta?.annotations?.readonly) {
|
||||
method = "GET";
|
||||
} else if (!!ability.meta?.annotations?.destructive && !!ability.meta?.annotations?.idempotent) {
|
||||
method = "DELETE";
|
||||
}
|
||||
let path = `${ABILITIES_ENDPOINT}/${ability.name}/run`;
|
||||
const options = {
|
||||
method
|
||||
};
|
||||
if (["GET", "DELETE"].includes(method) && input !== null && input !== void 0) {
|
||||
path = (0, import_url.addQueryArgs)(path, { input });
|
||||
} else if (method === "POST" && input !== null && input !== void 0) {
|
||||
options.data = { input };
|
||||
}
|
||||
return (0, import_api_fetch.default)({
|
||||
path,
|
||||
...options
|
||||
});
|
||||
};
|
||||
}
|
||||
async function initializeCategories() {
|
||||
try {
|
||||
const categories = await (0, import_api_fetch.default)({
|
||||
path: (0, import_url.addQueryArgs)(CATEGORIES_ENDPOINT, {
|
||||
per_page: -1,
|
||||
context: "edit"
|
||||
})
|
||||
});
|
||||
if (categories && Array.isArray(categories)) {
|
||||
for (const category of categories) {
|
||||
registerAbilityCategory(category.slug, {
|
||||
label: category.label,
|
||||
description: category.description,
|
||||
meta: {
|
||||
annotations: { serverRegistered: true }
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Failed to fetch ability categories:", error);
|
||||
}
|
||||
}
|
||||
async function initializeAbilities() {
|
||||
try {
|
||||
const abilities = await (0, import_api_fetch.default)({
|
||||
path: (0, import_url.addQueryArgs)(ABILITIES_ENDPOINT, {
|
||||
per_page: -1,
|
||||
context: "edit"
|
||||
})
|
||||
});
|
||||
if (abilities && Array.isArray(abilities)) {
|
||||
for (const ability of abilities) {
|
||||
registerAbility({
|
||||
...ability,
|
||||
callback: createServerCallback(ability),
|
||||
meta: {
|
||||
annotations: {
|
||||
...ability.meta?.annotations,
|
||||
serverRegistered: true
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Failed to fetch abilities:", error);
|
||||
}
|
||||
}
|
||||
async function initialize() {
|
||||
await initializeCategories();
|
||||
await initializeAbilities();
|
||||
}
|
||||
var ready = initialize();
|
||||
export {
|
||||
ready
|
||||
};
|
||||
1
wp-includes/js/dist/script-modules/core-abilities/index.min.asset.php
vendored
Normal file
1
wp-includes/js/dist/script-modules/core-abilities/index.min.asset.php
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('wp-api-fetch', 'wp-url'), 'module_dependencies' => array(array('id' => '@wordpress/abilities', 'import' => 'static')), 'version' => '012760fd849397dd0031');
|
||||
1
wp-includes/js/dist/script-modules/core-abilities/index.min.js
vendored
Normal file
1
wp-includes/js/dist/script-modules/core-abilities/index.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var E=Object.create;var s=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var v=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var c=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var b=(e,t,i,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of u(t))!w.call(e,a)&&a!==i&&s(e,a,{get:()=>t[a],enumerable:!(r=A(t,a))||r.enumerable});return e};var l=(e,t,i)=>(i=e!=null?E(v(e)):{},b(t||!e||!e.__esModule?s(i,"default",{value:e,enumerable:!0}):i,e));var f=c((C,d)=>{d.exports=window.wp.apiFetch});var y=c((D,p)=>{p.exports=window.wp.url});var o=l(f(),1),n=l(y(),1);import{registerAbility as h,registerAbilityCategory as T}from"@wordpress/abilities";var m="/wp-abilities/v1",g=`${m}/abilities`,I=`${m}/categories`;function S(e){return async t=>{let i="POST";e.meta?.annotations?.readonly?i="GET":e.meta?.annotations?.destructive&&e.meta?.annotations?.idempotent&&(i="DELETE");let r=`${g}/${e.name}/run`,a={method:i};return["GET","DELETE"].includes(i)&&t!==null&&t!==void 0?r=(0,n.addQueryArgs)(r,{input:t}):i==="POST"&&t!==null&&t!==void 0&&(a.data={input:t}),(0,o.default)({path:r,...a})}}async function x(){try{let e=await(0,o.default)({path:(0,n.addQueryArgs)(I,{per_page:-1,context:"edit"})});if(e&&Array.isArray(e))for(let t of e)T(t.slug,{label:t.label,description:t.description,meta:{annotations:{serverRegistered:!0}}})}catch(e){console.error("Failed to fetch ability categories:",e)}}async function O(){try{let e=await(0,o.default)({path:(0,n.addQueryArgs)(g,{per_page:-1,context:"edit"})});if(e&&Array.isArray(e))for(let t of e)h({...t,callback:S(t),meta:{annotations:{...t.meta?.annotations,serverRegistered:!0}}})}catch(e){console.error("Failed to fetch abilities:",e)}}async function P(){await x(),await O()}var N=P();export{N as ready};
|
||||
111
wp-includes/js/dist/script-modules/edit-site-init/index.js
vendored
Normal file
111
wp-includes/js/dist/script-modules/edit-site-init/index.js
vendored
Normal file
@@ -0,0 +1,111 @@
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __commonJS = (cb, mod) => function __require() {
|
||||
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
|
||||
// package-external:@wordpress/primitives
|
||||
var require_primitives = __commonJS({
|
||||
"package-external:@wordpress/primitives"(exports, module) {
|
||||
module.exports = window.wp.primitives;
|
||||
}
|
||||
});
|
||||
|
||||
// vendor-external:react/jsx-runtime
|
||||
var require_jsx_runtime = __commonJS({
|
||||
"vendor-external:react/jsx-runtime"(exports, module) {
|
||||
module.exports = window.ReactJSXRuntime;
|
||||
}
|
||||
});
|
||||
|
||||
// package-external:@wordpress/data
|
||||
var require_data = __commonJS({
|
||||
"package-external:@wordpress/data"(exports, module) {
|
||||
module.exports = window.wp.data;
|
||||
}
|
||||
});
|
||||
|
||||
// packages/icons/build-module/library/home.mjs
|
||||
var import_primitives = __toESM(require_primitives(), 1);
|
||||
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
||||
var home_default = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Path, { d: "M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z" }) });
|
||||
|
||||
// packages/icons/build-module/library/layout.mjs
|
||||
var import_primitives2 = __toESM(require_primitives(), 1);
|
||||
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
|
||||
var layout_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.Path, { d: "M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z" }) });
|
||||
|
||||
// packages/icons/build-module/library/navigation.mjs
|
||||
var import_primitives3 = __toESM(require_primitives(), 1);
|
||||
var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
|
||||
var navigation_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.Path, { d: "M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z" }) });
|
||||
|
||||
// packages/icons/build-module/library/page.mjs
|
||||
var import_primitives4 = __toESM(require_primitives(), 1);
|
||||
var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
|
||||
var page_default = /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
|
||||
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.Path, { d: "M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z" }),
|
||||
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.Path, { d: "M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z" })
|
||||
] });
|
||||
|
||||
// packages/icons/build-module/library/styles.mjs
|
||||
var import_primitives5 = __toESM(require_primitives(), 1);
|
||||
var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
|
||||
var styles_default = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 0 1-6.5 6.5v-13a6.5 6.5 0 0 1 6.5 6.5Z" }) });
|
||||
|
||||
// packages/icons/build-module/library/symbol-filled.mjs
|
||||
var import_primitives6 = __toESM(require_primitives(), 1);
|
||||
var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
|
||||
var symbol_filled_default = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.Path, { d: "M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z" }) });
|
||||
|
||||
// packages/icons/build-module/library/symbol.mjs
|
||||
var import_primitives7 = __toESM(require_primitives(), 1);
|
||||
var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
|
||||
var symbol_default = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.Path, { d: "M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z" }) });
|
||||
|
||||
// packages/icons/build-module/library/typography.mjs
|
||||
var import_primitives8 = __toESM(require_primitives(), 1);
|
||||
var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
|
||||
var typography_default = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.Path, { d: "m8.6 7 3.9 10.8h-1.7l-1-2.8H5.7l-1 2.8H3L6.9 7h1.7Zm-2.4 6.6h3L7.7 9.3l-1.5 4.3ZM17.691 8.879c.473 0 .88.055 1.221.165.352.1.643.264.875.495.274.253.456.572.544.957.088.374.132.83.132 1.37v4.554c0 .274.033.472.099.593.077.11.198.166.363.166.11 0 .215-.028.313-.083.11-.055.237-.137.38-.247l.165.28a3.304 3.304 0 0 1-.71.446c-.23.11-.527.165-.89.165-.352 0-.639-.055-.858-.165-.22-.11-.386-.27-.495-.479-.1-.209-.149-.468-.149-.775-.286.462-.627.814-1.023 1.056-.396.242-.858.363-1.386.363-.462 0-.858-.088-1.188-.264a1.752 1.752 0 0 1-.742-.726 2.201 2.201 0 0 1-.248-1.056c0-.484.11-.875.33-1.172.22-.308.5-.556.841-.742.352-.187.721-.341 1.106-.462.396-.132.765-.253 1.106-.363.351-.121.637-.259.857-.413.232-.154.347-.357.347-.61V10.81c0-.396-.066-.71-.198-.941a1.05 1.05 0 0 0-.511-.511 1.763 1.763 0 0 0-.76-.149c-.253 0-.522.039-.808.116a1.165 1.165 0 0 0-.677.412 1.1 1.1 0 0 1 .595.396c.165.187.247.424.247.71 0 .307-.104.55-.313.726-.198.176-.451.263-.76.263-.34 0-.594-.104-.758-.313a1.231 1.231 0 0 1-.248-.759c0-.297.072-.539.214-.726.154-.187.352-.363.595-.528.264-.176.6-.324 1.006-.445.418-.121.88-.182 1.386-.182Zm.99 3.729a1.57 1.57 0 0 1-.528.462c-.231.121-.479.248-.742.38a5.377 5.377 0 0 0-.76.462c-.23.165-.423.38-.577.643-.154.264-.231.6-.231 1.007 0 .429.11.77.33 1.023.22.242.517.363.891.363.308 0 .594-.088.858-.264.275-.176.528-.44.759-.792v-3.284Z" }) });
|
||||
|
||||
// packages/edit-site-init/build-module/index.mjs
|
||||
var import_data = __toESM(require_data(), 1);
|
||||
import { store as bootStore } from "@wordpress/boot";
|
||||
async function init() {
|
||||
const menuIcons = {
|
||||
home: { icon: home_default },
|
||||
styles: { icon: styles_default },
|
||||
navigation: { icon: navigation_default },
|
||||
pages: { icon: page_default },
|
||||
templateParts: { icon: symbol_filled_default },
|
||||
patterns: { icon: symbol_default },
|
||||
templates: { icon: layout_default },
|
||||
fontList: { icon: typography_default }
|
||||
};
|
||||
Object.entries(menuIcons).forEach(([id, { icon }]) => {
|
||||
(0, import_data.dispatch)(bootStore).updateMenuItem(id, { icon });
|
||||
});
|
||||
}
|
||||
export {
|
||||
init
|
||||
};
|
||||
1
wp-includes/js/dist/script-modules/edit-site-init/index.min.asset.php
vendored
Normal file
1
wp-includes/js/dist/script-modules/edit-site-init/index.min.asset.php
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-data', 'wp-element', 'wp-primitives'), 'module_dependencies' => array(array('id' => '@wordpress/boot', 'import' => 'static')), 'version' => 'e57f44d1a9f69e75d2d9');
|
||||
1
wp-includes/js/dist/script-modules/edit-site-init/index.min.js
vendored
Normal file
1
wp-includes/js/dist/script-modules/edit-site-init/index.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var Z=Object.create;var H=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var G=Object.getPrototypeOf,N=Object.prototype.hasOwnProperty;var g=(f,t)=>()=>(t||f((t={exports:{}}).exports,t),t.exports);var q=(f,t,r,D)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of _(t))!N.call(f,l)&&l!==r&&H(f,l,{get:()=>t[l],enumerable:!(D=I(t,l))||D.enumerable});return f};var a=(f,t,r)=>(r=f!=null?Z(G(f)):{},q(t||!f||!f.__esModule?H(r,"default",{value:f,enumerable:!0}):r,f));var e=g((J,M)=>{M.exports=window.wp.primitives});var o=g((W,P)=>{P.exports=window.ReactJSXRuntime});var A=g((pa,U)=>{U.exports=window.wp.data});var d=a(e(),1),w=a(o(),1),v=(0,w.jsx)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,w.jsx)(d.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})});var u=a(e(),1),b=a(o(),1),y=(0,b.jsx)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,b.jsx)(u.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})});var i=a(e(),1),x=a(o(),1),L=(0,x.jsx)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,x.jsx)(i.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z"})});var s=a(e(),1),m=a(o(),1),R=(0,m.jsxs)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,m.jsx)(s.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,m.jsx)(s.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})]});var p=a(e(),1),V=a(o(),1),S=(0,V.jsx)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,V.jsx)(p.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 0 1-6.5 6.5v-13a6.5 6.5 0 0 1 6.5 6.5Z"})});var n=a(e(),1),k=a(o(),1),B=(0,k.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,k.jsx)(n.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})});var c=a(e(),1),C=a(o(),1),j=(0,C.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,C.jsx)(c.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})});var h=a(e(),1),z=a(o(),1),T=(0,z.jsx)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,z.jsx)(h.Path,{d:"m8.6 7 3.9 10.8h-1.7l-1-2.8H5.7l-1 2.8H3L6.9 7h1.7Zm-2.4 6.6h3L7.7 9.3l-1.5 4.3ZM17.691 8.879c.473 0 .88.055 1.221.165.352.1.643.264.875.495.274.253.456.572.544.957.088.374.132.83.132 1.37v4.554c0 .274.033.472.099.593.077.11.198.166.363.166.11 0 .215-.028.313-.083.11-.055.237-.137.38-.247l.165.28a3.304 3.304 0 0 1-.71.446c-.23.11-.527.165-.89.165-.352 0-.639-.055-.858-.165-.22-.11-.386-.27-.495-.479-.1-.209-.149-.468-.149-.775-.286.462-.627.814-1.023 1.056-.396.242-.858.363-1.386.363-.462 0-.858-.088-1.188-.264a1.752 1.752 0 0 1-.742-.726 2.201 2.201 0 0 1-.248-1.056c0-.484.11-.875.33-1.172.22-.308.5-.556.841-.742.352-.187.721-.341 1.106-.462.396-.132.765-.253 1.106-.363.351-.121.637-.259.857-.413.232-.154.347-.357.347-.61V10.81c0-.396-.066-.71-.198-.941a1.05 1.05 0 0 0-.511-.511 1.763 1.763 0 0 0-.76-.149c-.253 0-.522.039-.808.116a1.165 1.165 0 0 0-.677.412 1.1 1.1 0 0 1 .595.396c.165.187.247.424.247.71 0 .307-.104.55-.313.726-.198.176-.451.263-.76.263-.34 0-.594-.104-.758-.313a1.231 1.231 0 0 1-.248-.759c0-.297.072-.539.214-.726.154-.187.352-.363.595-.528.264-.176.6-.324 1.006-.445.418-.121.88-.182 1.386-.182Zm.99 3.729a1.57 1.57 0 0 1-.528.462c-.231.121-.479.248-.742.38a5.377 5.377 0 0 0-.76.462c-.23.165-.423.38-.577.643-.154.264-.231.6-.231 1.007 0 .429.11.77.33 1.023.22.242.517.363.891.363.308 0 .594-.088.858-.264.275-.176.528-.44.759-.792v-3.284Z"})});var F=a(A(),1);import{store as O}from"@wordpress/boot";async function ha(){Object.entries({home:{icon:v},styles:{icon:S},navigation:{icon:L},pages:{icon:R},templateParts:{icon:B},patterns:{icon:j},templates:{icon:y},fontList:{icon:T}}).forEach(([t,{icon:r}])=>{(0,F.dispatch)(O).updateMenuItem(t,{icon:r})})}export{ha as init};
|
||||
28
wp-includes/js/dist/script-modules/interactivity-router/full-page.js
vendored
Normal file
28
wp-includes/js/dist/script-modules/interactivity-router/full-page.js
vendored
Normal 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
|
||||
);
|
||||
1
wp-includes/js/dist/script-modules/interactivity-router/full-page.min.asset.php
vendored
Normal file
1
wp-includes/js/dist/script-modules/interactivity-router/full-page.min.asset.php
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'module_dependencies' => array(array('id' => '@wordpress/interactivity-router', 'import' => 'dynamic')), 'version' => '5c07cd7a12ae073c5241');
|
||||
1
wp-includes/js/dist/script-modules/interactivity-router/full-page.min.js
vendored
Normal file
1
wp-includes/js/dist/script-modules/interactivity-router/full-page.min.js
vendored
Normal 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);
|
||||
1020
wp-includes/js/dist/script-modules/interactivity-router/index.js
vendored
Normal file
1020
wp-includes/js/dist/script-modules/interactivity-router/index.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
wp-includes/js/dist/script-modules/interactivity-router/index.min.asset.php
vendored
Normal file
1
wp-includes/js/dist/script-modules/interactivity-router/index.min.asset.php
vendored
Normal 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');
|
||||
7
wp-includes/js/dist/script-modules/interactivity-router/index.min.js
vendored
Normal file
7
wp-includes/js/dist/script-modules/interactivity-router/index.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3170
wp-includes/js/dist/script-modules/interactivity/index.js
vendored
Normal file
3170
wp-includes/js/dist/script-modules/interactivity/index.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
wp-includes/js/dist/script-modules/interactivity/index.min.asset.php
vendored
Normal file
1
wp-includes/js/dist/script-modules/interactivity/index.min.asset.php
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'version' => 'efaa5193bbad9c60ffd1');
|
||||
1
wp-includes/js/dist/script-modules/interactivity/index.min.js
vendored
Normal file
1
wp-includes/js/dist/script-modules/interactivity/index.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
12078
wp-includes/js/dist/script-modules/latex-to-mathml/index.js
vendored
Normal file
12078
wp-includes/js/dist/script-modules/latex-to-mathml/index.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
wp-includes/js/dist/script-modules/latex-to-mathml/index.min.asset.php
vendored
Normal file
1
wp-includes/js/dist/script-modules/latex-to-mathml/index.min.asset.php
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'version' => 'e5fd3ae6d2c3b6e669da');
|
||||
94
wp-includes/js/dist/script-modules/latex-to-mathml/index.min.js
vendored
Normal file
94
wp-includes/js/dist/script-modules/latex-to-mathml/index.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
7
wp-includes/js/dist/script-modules/latex-to-mathml/loader.js
vendored
Normal file
7
wp-includes/js/dist/script-modules/latex-to-mathml/loader.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// packages/latex-to-mathml/build-module/loader.mjs
|
||||
function loader() {
|
||||
return import("@wordpress/latex-to-mathml");
|
||||
}
|
||||
export {
|
||||
loader as default
|
||||
};
|
||||
1
wp-includes/js/dist/script-modules/latex-to-mathml/loader.min.asset.php
vendored
Normal file
1
wp-includes/js/dist/script-modules/latex-to-mathml/loader.min.asset.php
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'module_dependencies' => array(array('id' => '@wordpress/latex-to-mathml', 'import' => 'dynamic')), 'version' => '4f37456af539bd3d2351');
|
||||
1
wp-includes/js/dist/script-modules/latex-to-mathml/loader.min.js
vendored
Normal file
1
wp-includes/js/dist/script-modules/latex-to-mathml/loader.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
function r(){return import("@wordpress/latex-to-mathml")}export{r as default};
|
||||
2612
wp-includes/js/dist/script-modules/lazy-editor/index.js
vendored
Normal file
2612
wp-includes/js/dist/script-modules/lazy-editor/index.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
wp-includes/js/dist/script-modules/lazy-editor/index.min.asset.php
vendored
Normal file
1
wp-includes/js/dist/script-modules/lazy-editor/index.min.asset.php
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-private-apis', 'wp-style-engine'), 'version' => '30ab62f45bfe9f971ea0');
|
||||
37
wp-includes/js/dist/script-modules/lazy-editor/index.min.js
vendored
Normal file
37
wp-includes/js/dist/script-modules/lazy-editor/index.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
151
wp-includes/js/dist/script-modules/registry.php
vendored
Normal file
151
wp-includes/js/dist/script-modules/registry.php
vendored
Normal file
@@ -0,0 +1,151 @@
|
||||
<?php
|
||||
/**
|
||||
* Script module registry - Auto-generated by build process.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* @package wp
|
||||
*/
|
||||
|
||||
return array(
|
||||
array(
|
||||
'id' => '@wordpress/a11y',
|
||||
'path' => 'a11y/index',
|
||||
'asset' => 'a11y/index.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/abilities',
|
||||
'path' => 'abilities/index',
|
||||
'asset' => 'abilities/index.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/block-editor/utils/fit-text-frontend',
|
||||
'path' => 'block-editor/utils/fit-text-frontend',
|
||||
'asset' => 'block-editor/utils/fit-text-frontend.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/block-library/accordion/view',
|
||||
'path' => 'block-library/accordion/view',
|
||||
'asset' => 'block-library/accordion/view.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/block-library/file/view',
|
||||
'path' => 'block-library/file/view',
|
||||
'asset' => 'block-library/file/view.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/block-library/form/view',
|
||||
'path' => 'block-library/form/view',
|
||||
'asset' => 'block-library/form/view.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/block-library/image/view',
|
||||
'path' => 'block-library/image/view',
|
||||
'asset' => 'block-library/image/view.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/block-library/navigation/view',
|
||||
'path' => 'block-library/navigation/view',
|
||||
'asset' => 'block-library/navigation/view.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/block-library/playlist/view',
|
||||
'path' => 'block-library/playlist/view',
|
||||
'asset' => 'block-library/playlist/view.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/block-library/query/view',
|
||||
'path' => 'block-library/query/view',
|
||||
'asset' => 'block-library/query/view.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/block-library/search/view',
|
||||
'path' => 'block-library/search/view',
|
||||
'asset' => 'block-library/search/view.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/block-library/tabs/view',
|
||||
'path' => 'block-library/tabs/view',
|
||||
'asset' => 'block-library/tabs/view.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/boot',
|
||||
'path' => 'boot/index',
|
||||
'asset' => 'boot/index.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/boot',
|
||||
'path' => 'boot/index',
|
||||
'asset' => 'boot/index.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/connectors',
|
||||
'path' => 'connectors/index',
|
||||
'asset' => 'connectors/index.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/core-abilities',
|
||||
'path' => 'core-abilities/index',
|
||||
'asset' => 'core-abilities/index.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/edit-site-init',
|
||||
'path' => 'edit-site-init/index',
|
||||
'asset' => 'edit-site-init/index.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/interactivity',
|
||||
'path' => 'interactivity/index',
|
||||
'asset' => 'interactivity/index.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/interactivity-router',
|
||||
'path' => 'interactivity-router/index',
|
||||
'asset' => 'interactivity-router/index.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/interactivity-router/full-page',
|
||||
'path' => 'interactivity-router/full-page',
|
||||
'asset' => 'interactivity-router/full-page.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/latex-to-mathml',
|
||||
'path' => 'latex-to-mathml/index',
|
||||
'asset' => 'latex-to-mathml/index.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/latex-to-mathml/loader',
|
||||
'path' => 'latex-to-mathml/loader',
|
||||
'asset' => 'latex-to-mathml/loader.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/lazy-editor',
|
||||
'path' => 'lazy-editor/index',
|
||||
'asset' => 'lazy-editor/index.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/route',
|
||||
'path' => 'route/index',
|
||||
'asset' => 'route/index.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/route',
|
||||
'path' => 'route/index',
|
||||
'asset' => 'route/index.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/vips/loader',
|
||||
'path' => 'vips/loader',
|
||||
'asset' => 'vips/loader.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/vips/worker',
|
||||
'path' => 'vips/worker',
|
||||
'asset' => 'vips/worker.min.asset.php',
|
||||
'min_only' => true,
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/workflow',
|
||||
'path' => 'workflow/index',
|
||||
'asset' => 'workflow/index.min.asset.php',
|
||||
),
|
||||
);
|
||||
5568
wp-includes/js/dist/script-modules/route/index.js
vendored
Normal file
5568
wp-includes/js/dist/script-modules/route/index.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
wp-includes/js/dist/script-modules/route/index.min.asset.php
vendored
Normal file
1
wp-includes/js/dist/script-modules/route/index.min.asset.php
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-private-apis'), 'version' => 'c5843b6c5e84b352f43b');
|
||||
26
wp-includes/js/dist/script-modules/route/index.min.js
vendored
Normal file
26
wp-includes/js/dist/script-modules/route/index.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3531
wp-includes/js/dist/script-modules/workflow/index.js
vendored
Normal file
3531
wp-includes/js/dist/script-modules/workflow/index.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
wp-includes/js/dist/script-modules/workflow/index.min.asset.php
vendored
Normal file
1
wp-includes/js/dist/script-modules/workflow/index.min.asset.php
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-primitives', 'wp-private-apis'), 'module_dependencies' => array(array('id' => '@wordpress/abilities', 'import' => 'static')), 'version' => '13556bc597bbf2a8d620');
|
||||
45
wp-includes/js/dist/script-modules/workflow/index.min.js
vendored
Normal file
45
wp-includes/js/dist/script-modules/workflow/index.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user