WordPress/wp-includes/js/dist/dom.min.js
youknowriad a225c5cdc6 Block Editor: Updated the WordPress packages from Gutenberg 10.7.0 RC.
This also includes:

 - The removal of the Post Author block.
 - Renaming build_query_vars_from_query_block function.
 - Update the block supports.

Props gziolo.
See #52991. 
-This line, and those below, will be ignored--

M    package-lock.json
M    package.json
M    src/wp-includes/assets/script-loader-packages.php
M    src/wp-includes/block-supports/colors.php
AM   src/wp-includes/block-supports/elements.php
D    src/wp-includes/block-supports/padding.php
AM   src/wp-includes/block-supports/spacing.php
M    src/wp-includes/block-supports/typography.php
M    src/wp-includes/blocks/column/block.json
M    src/wp-includes/blocks/index.php
D    src/wp-includes/blocks/post-author
D    src/wp-includes/blocks/post-author.php
M    src/wp-includes/blocks/post-content.php
M    src/wp-includes/blocks/post-featured-image.php
M    src/wp-includes/blocks/query/block.json
M    src/wp-includes/blocks/query-loop/block.json
M    src/wp-includes/blocks/query-loop.php
M    src/wp-includes/blocks/query-pagination/block.json
M    src/wp-includes/blocks/query-pagination-next.php
M    src/wp-includes/blocks/query-pagination-numbers.php
M    src/wp-includes/blocks/site-tagline/block.json
M    src/wp-includes/blocks/site-title/block.json
M    src/wp-includes/blocks.php
M    src/wp-settings.php
M    tests/phpunit/tests/blocks/block.php
M    tools/webpack/packages.js

Built from https://develop.svn.wordpress.org/trunk@50945


git-svn-id: http://core.svn.wordpress.org/trunk@50554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 10:14:23 +00:00

2 lines
13 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

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

/*! This file is auto-generated */
this.wp=this.wp||{},this.wp.dom=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="./node_modules/@wordpress/dom/build-module/index.js")}({"./node_modules/@wordpress/dom/build-module/index.js":function(t,e,n){"use strict";n.r(e),n.d(e,"focus",(function(){return et})),n.d(e,"computeCaretRect",(function(){return C})),n.d(e,"documentHasTextSelection",(function(){return w})),n.d(e,"documentHasUncollapsedSelection",(function(){return S})),n.d(e,"documentHasSelection",(function(){return T})),n.d(e,"getRectangleFromRange",(function(){return N})),n.d(e,"getScrollContainer",(function(){return A})),n.d(e,"getOffsetParent",(function(){return R})),n.d(e,"isEntirelySelected",(function(){return D})),n.d(e,"isHorizontalEdge",(function(){return _})),n.d(e,"isNumberInput",(function(){return O})),n.d(e,"isTextField",(function(){return v})),n.d(e,"isVerticalEdge",(function(){return I})),n.d(e,"placeCaretAtHorizontalEdge",(function(){return V})),n.d(e,"placeCaretAtVerticalEdge",(function(){return F})),n.d(e,"replace",(function(){return U})),n.d(e,"remove",(function(){return z})),n.d(e,"insertAfter",(function(){return B})),n.d(e,"unwrap",(function(){return k})),n.d(e,"replaceTag",(function(){return q})),n.d(e,"wrap",(function(){return X})),n.d(e,"__unstableStripHTML",(function(){return G})),n.d(e,"isEmpty",(function(){return W})),n.d(e,"removeInvalidHTML",(function(){return Z})),n.d(e,"isRTL",(function(){return M})),n.d(e,"getPhrasingContentSchema",(function(){return J})),n.d(e,"isPhrasingContent",(function(){return K})),n.d(e,"isTextContent",(function(){return Q})),n.d(e,"getFilesFromDataTransfer",(function(){return tt}));var r={};n.r(r),n.d(r,"find",(function(){return c}));var o={};n.r(o),n.d(o,"isTabbableIndex",(function(){return l})),n.d(o,"find",(function(){return h})),n.d(o,"findPrevious",(function(){return b})),n.d(o,"findNext",(function(){return g}));const i=["[tabindex]","a[href]","button:not([disabled])",'input:not([type="hidden"]):not([disabled])',"select:not([disabled])","textarea:not([disabled])","iframe","object","embed","area[href]","[contenteditable]:not([contenteditable=false])"].join(",");function u(t){return t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0}function c(t){const e=t.querySelectorAll(i);return Array.from(e).filter(t=>{if(!u(t)||function(t){return"iframe"===t.nodeName.toLowerCase()&&"-1"===t.getAttribute("tabindex")}(t))return!1;const{nodeName:e}=t;return"AREA"!==e||function(t){const e=t.closest("map[name]");if(!e)return!1;const n=t.ownerDocument.querySelector('img[usemap="#'+e.name+'"]');return!!n&&u(n)}(t)})}var a=n("lodash");function s(t){const e=t.getAttribute("tabindex");return null===e?0:parseInt(e,10)}function l(t){return-1!==s(t)}function d(t,e){return{element:t,index:e}}function f(t){return t.element}function m(t,e){const n=s(t.element),r=s(e.element);return n===r?t.index-e.index:n-r}function p(t){return t.filter(l).map(d).sort(m).map(f).reduce(function(){const t={};return function(e,n){const{nodeName:r,type:o,checked:i,name:u}=n;if("INPUT"!==r||"radio"!==o||!u)return e.concat(n);const c=t.hasOwnProperty(u);if(!(i||!c))return e;if(c){const n=t[u];e=Object(a.without)(e,n)}return t[u]=n,e.concat(n)}}(),[])}function h(t){return p(c(t))}function b(t){const e=c(t.ownerDocument.body),n=e.indexOf(t);return e.length=n,Object(a.last)(p(e))}function g(t){const e=c(t.ownerDocument.body),n=e.indexOf(t),r=e.slice(n+1).filter(e=>!t.contains(e));return Object(a.first)(p(r))}function y(t,e){0}function N(t){if(!t.collapsed){const e=Array.from(t.getClientRects());if(1===e.length)return e[0];const n=e.filter(({width:t})=>t>1);if(0===n.length)return t.getBoundingClientRect();if(1===n.length)return n[0];let{top:r,bottom:o,left:i,right:u}=n[0];for(const{top:t,bottom:e,left:c,right:a}of n)t<r&&(r=t),e>o&&(o=e),c<i&&(i=c),a>u&&(u=a);return new window.DOMRect(i,r,u-i,o-r)}const{startContainer:e}=t,{ownerDocument:n}=e;if("BR"===e.nodeName){const{parentNode:r}=e;y();const o=Array.from(r.childNodes).indexOf(e);y(),(t=n.createRange()).setStart(r,o),t.setEnd(r,o)}let r=t.getClientRects()[0];if(!r){y();const e=n.createTextNode("");(t=t.cloneRange()).insertNode(e),r=t.getClientRects()[0],y(e.parentNode),e.parentNode.removeChild(e)}return r}function C(t){const e=t.getSelection();y();const n=e.rangeCount?e.getRangeAt(0):null;return n?N(n):null}function w(t){y(t.defaultView);const e=t.defaultView.getSelection();y();const n=e.rangeCount?e.getRangeAt(0):null;return!!n&&!n.collapsed}function E(t){return!!t&&"INPUT"===t.nodeName}function v(t){return E(t)&&t.type&&!["button","checkbox","hidden","file","radio","image","range","reset","submit","number"].includes(t.type)||"TEXTAREA"===t.nodeName||"true"===t.contentEditable}function O(t){return E(t)&&"number"===t.type&&!!t.valueAsNumber}function S(t){return w(t)||!!t.activeElement&&function(t){if(!v(t)&&!O(t))return!1;try{const{selectionStart:e,selectionEnd:n}=t;return null!==e&&e!==n}catch(t){return!1}}(t.activeElement)}function T(t){return!!t.activeElement&&(v(t.activeElement)||O(t.activeElement)||w(t))}function x(t){return y(t.ownerDocument.defaultView),t.ownerDocument.defaultView.getComputedStyle(t)}function A(t){if(t){if(t.scrollHeight>t.clientHeight){const{overflowY:e}=x(t);if(/(auto|scroll)/.test(e))return t}return A(t.parentNode)}}function R(t){let e;for(;(e=t.parentNode)&&e.nodeType!==e.ELEMENT_NODE;);return e?"static"!==x(e).position?e:e.offsetParent:null}function P(t){return"INPUT"===t.tagName||"TEXTAREA"===t.tagName}function D(t){if(P(t))return 0===t.selectionStart&&t.value.length===t.selectionEnd;if(!t.isContentEditable)return!0;const{ownerDocument:e}=t,{defaultView:n}=e;y();const r=n.getSelection();y();const o=r.rangeCount?r.getRangeAt(0):null;if(!o)return!0;const{startContainer:i,endContainer:u,startOffset:c,endOffset:a}=o;if(i===t&&u===t&&0===c&&a===t.childNodes.length)return!0;const s=t.lastChild;y();const l=s.nodeType===s.TEXT_NODE?s.data.length:s.childNodes.length;return i===t.firstChild&&u===t.lastChild&&0===c&&a===l}function M(t){return"rtl"===x(t).direction}function j(t,e,n,r){const o=r.style.zIndex,i=r.style.position,{position:u="static"}=x(r);"static"===u&&(r.style.position="relative"),r.style.zIndex="10000";const c=function(t,e,n){if(t.caretRangeFromPoint)return t.caretRangeFromPoint(e,n);if(!t.caretPositionFromPoint)return null;const r=t.caretPositionFromPoint(e,n);if(!r)return null;const o=t.createRange();return o.setStart(r.offsetNode,r.offset),o.collapse(!0),o}(t,e,n);return r.style.zIndex=o,r.style.position=i,c}function L(t,e,n=!1){if(P(t))return t.selectionStart===t.selectionEnd&&(e?0===t.selectionStart:t.value.length===t.selectionStart);if(!t.isContentEditable)return!0;const{ownerDocument:r}=t,{defaultView:o}=r;y();const i=o.getSelection();if(!i||!i.rangeCount)return!1;const u=i.getRangeAt(0),c=u.cloneRange(),a=function(t){const{anchorNode:e,focusNode:n,anchorOffset:r,focusOffset:o}=t;y(),y();const i=e.compareDocumentPosition(n);return!(i&e.DOCUMENT_POSITION_PRECEDING)&&(!!(i&e.DOCUMENT_POSITION_FOLLOWING)||(0!==i||r<=o))}(i),s=i.isCollapsed;s||c.collapse(!a);const l=N(c),d=N(u);if(!l||!d)return!1;const f=function(t){const e=Array.from(t.getClientRects());if(!e.length)return;const n=Math.min(...e.map(({top:t})=>t));return Math.max(...e.map(({bottom:t})=>t))-n}(u);if(!s&&f&&f>l.height&&a===e)return!1;const m=M(t)?!e:e,p=t.getBoundingClientRect(),h=j(r,m?p.left+1:p.right-1,e?p.top+1:p.bottom-1,t);if(!h)return!1;const b=N(h);if(!b)return!1;const g=e?"top":"bottom",C=m?"left":"right",w=b[g]-d[g],E=b[C]-l[C],v=Math.abs(w)<=1,O=Math.abs(E)<=1;return n?v:v&&O}function _(t,e){return L(t,e)}function I(t,e){return L(t,e,!0)}function H(t,e){const{ownerDocument:n}=t,r=M(t)?!e:e,o=t.getBoundingClientRect();return j(n,e?o.right-1:o.left+1,r?o.bottom-1:o.top+1,t)}function V(t,e){if(!t)return;if(t.focus(),P(t)){if("number"!=typeof t.selectionStart)return;return void(e?(t.selectionStart=t.value.length,t.selectionEnd=t.value.length):(t.selectionStart=0,t.selectionEnd=0))}if(!t.isContentEditable)return;let n=H(t,e);if(!(n&&n.startContainer&&t.contains(n.startContainer)||(t.scrollIntoView(e),n=H(t,e),n&&n.startContainer&&t.contains(n.startContainer))))return;const{ownerDocument:r}=t,{defaultView:o}=r;y();const i=o.getSelection();y(),i.removeAllRanges(),i.addRange(n)}function F(t,e,n,r=!0){if(!t)return;if(!n||!t.isContentEditable)return void V(t,e);t.focus();const o=n.height/2,i=t.getBoundingClientRect(),u=n.left,c=e?i.bottom-o:i.top+o,{ownerDocument:a}=t,{defaultView:s}=a,l=j(a,u,c,t);if(!l||!t.contains(l.startContainer))return!r||l&&l.startContainer&&l.startContainer.contains(t)?void V(t,e):(t.scrollIntoView(e),void F(t,e,n,!1));y();const d=s.getSelection();y(),d.removeAllRanges(),d.addRange(l)}function B(t,e){y(e.parentNode),e.parentNode.insertBefore(t,e.nextSibling)}function z(t){y(t.parentNode),t.parentNode.removeChild(t)}function U(t,e){y(t.parentNode),B(e,t.parentNode),z(t)}function k(t){const e=t.parentNode;for(y();t.firstChild;)e.insertBefore(t.firstChild,t);e.removeChild(t)}function q(t,e){const n=t.ownerDocument.createElement(e);for(;t.firstChild;)n.appendChild(t.firstChild);return y(t.parentNode),t.parentNode.replaceChild(n,t),n}function X(t,e){y(e.parentNode),e.parentNode.insertBefore(t,e),t.appendChild(e)}function G(t){return(new window.DOMParser).parseFromString(t,"text/html").body.textContent||""}function W(t){switch(t.nodeType){case t.TEXT_NODE:return/^[ \f\n\r\t\v\u00a0]*$/.test(t.nodeValue||"");case t.ELEMENT_NODE:return!t.hasAttributes()&&(!t.hasChildNodes()||Array.from(t.childNodes).every(W));default:return!0}}const Y={strong:{},em:{},s:{},del:{},ins:{},a:{attributes:["href","target","rel"]},code:{},abbr:{attributes:["title"]},sub:{},sup:{},br:{},small:{},q:{attributes:["cite"]},dfn:{attributes:["title"]},data:{attributes:["value"]},time:{attributes:["datetime"]},var:{},samp:{},kbd:{},i:{},b:{},u:{},mark:{},ruby:{},rt:{},rp:{},bdi:{attributes:["dir"]},bdo:{attributes:["dir"]},wbr:{},"#text":{}};Object(a.without)(Object.keys(Y),"#text","br").forEach(t=>{Y[t].children=Object(a.omit)(Y,t)});const $={...Y,audio:{attributes:["src","preload","autoplay","mediagroup","loop","muted"]},canvas:{attributes:["width","height"]},embed:{attributes:["src","type","width","height"]},img:{attributes:["alt","src","srcset","usemap","ismap","width","height"]},object:{attributes:["data","type","name","usemap","form","width","height"]},video:{attributes:["src","poster","preload","autoplay","mediagroup","loop","muted","controls","width","height"]}};function J(t){return"paste"!==t?$:Object(a.omit)({...$,ins:{children:$.ins.children},del:{children:$.del.children}},["u","abbr","data","time","wbr","bdi","bdo"])}function K(t){const e=t.nodeName.toLowerCase();return J().hasOwnProperty(e)||"span"===e}function Q(t){const e=t.nodeName.toLowerCase();return Y.hasOwnProperty(e)||"span"===e}function Z(t,e,n){const r=document.implementation.createHTMLDocument("");return r.body.innerHTML=t,function t(e,n,r,o){Array.from(e).forEach(e=>{var i,u;const c=e.nodeName.toLowerCase();if(r.hasOwnProperty(c)&&(!r[c].isMatch||null!==(i=(u=r[c]).isMatch)&&void 0!==i&&i.call(u,e))){if(function(t){return!!t&&t.nodeType===t.ELEMENT_NODE}(e)){const{attributes:i=[],classes:u=[],children:s,require:l=[],allowEmpty:d}=r[c];if(s&&!d&&W(e))return void z(e);if(e.hasAttributes()&&(Array.from(e.attributes).forEach(({name:t})=>{"class"===t||Object(a.includes)(i,t)||e.removeAttribute(t)}),e.classList&&e.classList.length)){const t=u.map(t=>"string"==typeof t?e=>e===t:t instanceof RegExp?e=>t.test(e):a.noop);Array.from(e.classList).forEach(n=>{t.some(t=>t(n))||e.classList.remove(n)}),e.classList.length||e.removeAttribute("class")}if(e.hasChildNodes()){if("*"===s)return;if(s)l.length&&!e.querySelector(l.join(","))?(t(e.childNodes,n,r,o),k(e)):e.parentNode&&"BODY"===e.parentNode.nodeName&&K(e)?(t(e.childNodes,n,r,o),Array.from(e.childNodes).some(t=>!K(t))&&k(e)):t(e.childNodes,n,s,o);else for(;e.firstChild;)z(e.firstChild)}}}else t(e.childNodes,n,r,o),o&&!K(e)&&e.nextElementSibling&&B(n.createElement("br"),e),k(e)})}(r.body.childNodes,r,e,n),r.body.innerHTML}function tt(t){const e=Array.from(t.files);return Array.from(t.items).forEach(t=>{const n=t.getAsFile();n&&!e.find(({name:t,type:e,size:r})=>t===n.name&&e===n.type&&r===n.size)&&e.push(n)}),e}const et={focusable:r,tabbable:o}},lodash:function(t,e){t.exports=window.lodash}});