WordPress/wp-includes/js/dist/data.min.js

9 lines
26 KiB
JavaScript
Raw Normal View History

/*! This file is auto-generated */
Editor: Update @wordpress packages for 6.2 Beta 2. Updates the `@wordpress` packages to include the following changes: - Add missing period in keyboard shortcut descriptions - Site Editor: Append template type and name to the site editor page title - Specify active color state for template navigation button - Global Styles: Move more link about custom CSS to part of description - ToolsPanel: Display optional items when values are updated externally - File block: Re-add editor styles for classic themes - Enable undo after creating a new menu - Style Book: Exclude blocks that are not allowed to insert - Add basic tsconfig.json validation - Fix Experiments native variant breakage - Update moment and moment-timezone packages to fix timezone issues - NavigatorButton: Reuse Button types - ToolsPanel: Ensure display of optional items when panel id is null - ColorPalette: Ensure text label contrast checking works with CSS variables - Components: Add support for named arguments in the navigator components - Rename experiments package to private-apis - Cherry-pick CLI: Fix the default label to match the documentation - Handle block metadata attribute and related experimental APIs - Fix: Remove browser default border for iframe in the editor - [Layout]: Fix align controls for hybrid themes - Visual Regression tests: use default playwright utils - SelectControl: Fix multiple prop styling - Fix clicking on the toggle button not closing the block inserter - Update deps for the useEffect that creates navigation menus - Minor updates in Private APIs docs - Site Editor: Fix custom Template Parts rename action - [Block Library - Cover]: Ensure url is not malformed due to sanitization through wp_kses - Revert "Prevent the image from being resized larger than its container" - Lodash: Remove from @wordpress/keycodes package - Distraction free mode: Fix keyboard shortcut not working - Popover: lock the __experimentalPopoverPositionToPlacement function - Rename the "experiments" export to "privateApis" - Add an aria label to the site save dialog - Navigator: add more pattern matching tests, refine existing tests - Add parent navigation support for the navigator component - Add back link to Design heading in site editor navigation to return to Dashboard - Add a nested level when selecting templates or template parts - Move site editor 6.2 specific code to the right file - Fix site editor navigation References: * [https://github.com/WordPress/gutenberg/commit/1bf01c01a8238ce3a681ad1e517f86033818b78d Gutenberg's commit for publishing the packages] Follow-up to [55257]. Props ntsekouras. See #57471. Built from https://develop.svn.wordpress.org/trunk@55333 git-svn-id: http://core.svn.wordpress.org/trunk@54866 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-14 16:44:36 +01:00
!function(){var e={2167:function(e){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function n(e,t){var r=e._map,n=e._arrayTreeMap,o=e._objectTreeMap;if(r.has(t))return r.get(t);for(var i=Object.keys(t).sort(),s=Array.isArray(t)?n:o,u=0;u<i.length;u++){var c=i[u];if(void 0===(s=s.get(c)))return;var a=t[c];if(void 0===(s=s.get(a)))return}var l=s.get("_ekm_value");return l?(r.delete(l[0]),l[0]=t,s.set("_ekm_value",l),r.set(t,l),l):void 0}var o=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.clear(),t instanceof e){var r=[];t.forEach((function(e,t){r.push([t,e])})),t=r}if(null!=t)for(var n=0;n<t.length;n++)this.set(t[n][0],t[n][1])}var o,i,s;return o=e,i=[{key:"set",value:function(r,n){if(null===r||"object"!==t(r))return this._map.set(r,n),this;for(var o=Object.keys(r).sort(),i=[r,n],s=Array.isArray(r)?this._arrayTreeMap:this._objectTreeMap,u=0;u<o.length;u++){var c=o[u];s.has(c)||s.set(c,new e),s=s.get(c);var a=r[c];s.has(a)||s.set(a,new e),s=s.get(a)}var l=s.get("_ekm_value");return l&&this._map.delete(l[0]),s.set("_ekm_value",i),this._map.set(r,i),this}},{key:"get",value:function(e){if(null===e||"object"!==t(e))return this._map.get(e);var r=n(this,e);return r?r[1]:void 0}},{key:"has",value:function(e){return null===e||"object"!==t(e)?this._map.has(e):void 0!==n(this,e)}},{key:"delete",value:function(e){return!!this.has(e)&&(this.set(e,void 0),!0)}},{key:"forEach",value:function(e){var r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;this._map.forEach((function(o,i){null!==i&&"object"===t(i)&&(o=o[1]),e.call(n,o,i,r)}))}},{key:"clear",value:function(){this._map=new Map,this._arrayTreeMap=new Map,this._objectTreeMap=new Map}},{key:"size",get:function(){return this._map.size}}],i&&r(o.prototype,i),s&&r(o,s),e}();e.exports=o},9125:function(e){e.exports=function(e){var t,r=Object.keys(e);return t=function(){var e,t,n;for(e="return {",t=0;t<r.length;t++)e+=(n=JSON.stringify(r[t]))+":r["+n+"](s["+n+"],a),";return e+="}",new Function("r,s,a",e)}(),function(n,o){var i,s,u;if(void 0===n)return t(e,{},o);for(i=t(e,n,o),s=r.length;s--;)if(n[u=r[s]]!==i[u])return i;return n}}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};!function(){"use strict";r.r(n),r.d(n,{AsyncModeProvider:function(){return Xe},RegistryConsumer:function(){return Me},RegistryProvider:function(){return Ve},combineReducers:function(){return rt},controls:function(){return C},createReduxStore:function(){return ge},createRegistry:function(){return be},createRegistryControl:function(){return A},createRegistrySelector:function(){return N},dispatch:function(){return st},plugins:function(){return o},register:function(){return ft},registerGenericStore:function(){return ct},registerStore:function(){return at},resolveSelect:function(){return ot},select:function(){return nt},subscribe:function(){return ut},suspendSelect:function(){return it},use:function(){return lt},useDispatch:function(){return tt},useRegistry:function(){return Ge},useSelect:function(){return Be},useSuspenseSelect:function(){return Qe},withDispatch:function(){return Ze},withRegistry:function(){return et},withSel
Editor: Sync changes from the Gutenberg plugin 14.1 release Updated WordPress packages necessary for releasing WordPress 6.1 Beta 1: - @wordpress/a11y@3.17.1 - @wordpress/annotations@2.17.2 - @wordpress/api-fetch@6.14.1 - @wordpress/autop@3.17.1 - @wordpress/babel-plugin-import-jsx-pragma@4.0.1 - @wordpress/babel-plugin-makepot@5.1.1 - @wordpress/babel-preset-default@7.1.1 - @wordpress/base-styles@4.8.1 - @wordpress/blob@3.17.1 - @wordpress/block-directory@3.15.2 - @wordpress/block-editor@10.0.2 - @wordpress/block-library@7.14.2 - @wordpress/block-serialization-default-parser@4.17.1 - @wordpress/block-serialization-spec-parser@4.17.1 - @wordpress/blocks@11.16.2 - @wordpress/browserslist-config@5.0.1 - @wordpress/components@21.0.2 - @wordpress/compose@5.15.2 - @wordpress/core-data@5.0.2 - @wordpress/create-block-tutorial-template@2.5.1 - @wordpress/create-block@4.1.1 - @wordpress/custom-templated-path-webpack-plugin@2.1.3 - @wordpress/customize-widgets@3.14.2 - @wordpress/data-controls@2.17.2 - @wordpress/data@7.1.2 - @wordpress/date@4.17.1 - @wordpress/dependency-extraction-webpack-plugin@4.0.2 - @wordpress/deprecated@3.17.1 - @wordpress/docgen@1.26.1 - @wordpress/dom-ready@3.17.1 - @wordpress/dom@3.17.2 - @wordpress/e2e-test-utils@8.1.1 - @wordpress/e2e-tests@5.1.2 - @wordpress/edit-post@6.14.2 - @wordpress/edit-site@4.14.2 - @wordpress/edit-widgets@4.14.2 - @wordpress/editor@12.16.2 - @wordpress/element@4.15.1 - @wordpress/env@5.2.1 - @wordpress/escape-html@2.17.1 - @wordpress/eslint-plugin@13.1.1 - @wordpress/format-library@3.15.2 - @wordpress/hooks@3.17.1 - @wordpress/html-entities@3.17.1 - @wordpress/i18n@4.17.1 - @wordpress/icons@9.8.1 - @wordpress/interface@4.16.2 - @wordpress/is-shallow-equal@4.17.1 - @wordpress/jest-console@6.0.1 - @wordpress/jest-preset-default@9.0.1 - @wordpress/jest-puppeteer-axe@5.0.1 - @wordpress/keyboard-shortcuts@3.15.2 - @wordpress/keycodes@3.17.1 - @wordpress/lazy-import@1.4.3 - @wordpress/library-export-default-webpack-plugin@2.3.3 - @wordpress/list-reusable-blocks@3.15.2 - @wordpress/media-utils@4.8.1 - @wordpress/notices@3.17.2 - @wordpress/npm-package-json-lint-config@4.2.1 - @wordpress/nux@5.15.2 - @wordpress/plugins@4.15.2 - @wordpress/postcss-plugins-preset@4.1.1 - @wordpress/postcss-themes@5.0.1 - @wordpress/preferences-persistence@1.9.1 - @wordpress/preferences@2.9.2 - @wordpress/prettier-config@2.0.1 - @wordpress/primitives@3.15.1 - @wordpress/priority-queue@2.17.2 - @wordpress/project-management-automation@1.16.1 - @wordpress/react-i18n@3.15.1 - @wordpress/readable-js-assets-webpack-plugin@2.0.1 - @wordpress/redux-routine@4.17.1 - @wordpress/reusable-blocks@3.15.2 - @wordpress/rich-text@5.15.2 - @wordpress/scripts@24.1.2 - @wordpress/server-side-render@3.15.2 - @wordpress/shortcode@3.17.1 - @wordpress/style-engine@1.0.1 - @wordpress/stylelint-config@21.0.1 - @wordpress/token-list@2.17.1 - @wordpress/url@3.18.1 - @wordpress/viewport@4.15.2 - @wordpress/warning@2.17.1 - @wordpress/widgets@2.15.2 - @wordpress/wordcount@3.17.1 Props bernhard-reiter, cbravobernal, czapla, oandregal, isabel_brison, andrewserong, mciampini. See #56467. Built from https://develop.svn.wordpress.org/trunk@54257 git-svn-id: http://core.svn.wordpress.org/trunk@53816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 17:43:29 +02:00
/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
Editor: Update @wordpress packages for 6.2 Beta 2. Updates the `@wordpress` packages to include the following changes: - Add missing period in keyboard shortcut descriptions - Site Editor: Append template type and name to the site editor page title - Specify active color state for template navigation button - Global Styles: Move more link about custom CSS to part of description - ToolsPanel: Display optional items when values are updated externally - File block: Re-add editor styles for classic themes - Enable undo after creating a new menu - Style Book: Exclude blocks that are not allowed to insert - Add basic tsconfig.json validation - Fix Experiments native variant breakage - Update moment and moment-timezone packages to fix timezone issues - NavigatorButton: Reuse Button types - ToolsPanel: Ensure display of optional items when panel id is null - ColorPalette: Ensure text label contrast checking works with CSS variables - Components: Add support for named arguments in the navigator components - Rename experiments package to private-apis - Cherry-pick CLI: Fix the default label to match the documentation - Handle block metadata attribute and related experimental APIs - Fix: Remove browser default border for iframe in the editor - [Layout]: Fix align controls for hybrid themes - Visual Regression tests: use default playwright utils - SelectControl: Fix multiple prop styling - Fix clicking on the toggle button not closing the block inserter - Update deps for the useEffect that creates navigation menus - Minor updates in Private APIs docs - Site Editor: Fix custom Template Parts rename action - [Block Library - Cover]: Ensure url is not malformed due to sanitization through wp_kses - Revert "Prevent the image from being resized larger than its container" - Lodash: Remove from @wordpress/keycodes package - Distraction free mode: Fix keyboard shortcut not working - Popover: lock the __experimentalPopoverPositionToPlacement function - Rename the "experiments" export to "privateApis" - Add an aria label to the site save dialog - Navigator: add more pattern matching tests, refine existing tests - Add parent navigation support for the navigator component - Add back link to Design heading in site editor navigation to return to Dashboard - Add a nested level when selecting templates or template parts - Move site editor 6.2 specific code to the right file - Fix site editor navigation References: * [https://github.com/WordPress/gutenberg/commit/1bf01c01a8238ce3a681ad1e517f86033818b78d Gutenberg's commit for publishing the packages] Follow-up to [55257]. Props ntsekouras. See #57471. Built from https://develop.svn.wordpress.org/trunk@55333 git-svn-id: http://core.svn.wordpress.org/trunk@54866 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-14 16:44:36 +01:00
function we(e){return"[object Object]"===Object.prototype.toString.call(e)}function Oe(e){var t,r;return!1!==we(e)&&(void 0===(t=e.constructor)||!1!==we(r=t.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf"))}let Re;const Ee={getItem(e){return Re&&Re[e]?Re[e]:null},setItem(e,t){Re||Ee.clear(),Re[e]=String(t)},clear(){Re=Object.create(null)}};var _e=Ee;let Ie;try{Ie=window.localStorage,Ie.setItem("__wpDataTestLocalStorage",""),Ie.removeItem("__wpDataTestLocalStorage")}catch(e){Ie=_e}const Te=Ie,Ne="WP_DATA";function Ae(e,t){const r=function(e){const{storage:t=Te,storageKey:r=Ne}=e;let n;return{get:function(){if(void 0===n){const e=t.getItem(r);if(null===e)n={};else try{n=JSON.parse(e)}catch(e){n={}}}return n},set:function(e,o){n={...n,[e]:o},t.setItem(r,JSON.stringify(n))}}}(t);return{registerStore(t,n){if(!n.persist)return e.registerStore(t,n);const o=r.get()[t];if(void 0!==o){let e=n.reducer(n.initialState,{type:"@@WP/PERSISTENCE_RESTORE"});e=Oe(e)&&Oe(o)?(0,u.merge)({},e,o):o,n={...n,initialState:e}}const i=e.registerStore(t,n);return i.subscribe(function(e,t,n){let o;if(Array.isArray(n)){const e=n.reduce(((e,t)=>Object.assign(e,{[t]:(e,r)=>r.nextState[t]})),{});i=rt(e),o=(e,t)=>t.nextState===e?e:i(e,t)}else o=(e,t)=>t.nextState;var i;let s=o(void 0,{nextState:e()});return()=>{const n=o(s,{nextState:e()});n!==s&&(r.set(t,n),s=n)}}(i.getState,t,n.persist)),i}}}Ae.__unstableMigrate=()=>{};var je=Ae;function Le(){return Le=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Le.apply(this,arguments)}var Pe=window.wp.element,Fe=window.wp.priorityQueue,Ce=window.wp.isShallowEqual,Ue=r.n(Ce);const xe=(0,Pe.createContext)(me),{Consumer:ke,Provider:De}=xe,Me=ke;var Ve=De;function Ge(){return(0,Pe.useContext)(xe)}const He=(0,Pe.createContext)(!1),{Consumer:Ke,Provider:We}=He;var Xe=We;const ze=(0,Fe.createQueue)();function Je(e,t){const r=t?e.suspendSelect:e.select,n={};let o,i,s,u,c=!1;return(t,a,l)=>{const f=()=>t(r,e);function p(e){if(c&&t===o)return i;const r=e();Ue()(i,r)||(i=r),c=!0}if(s&&!l&&(c=!1,ze.cancel(n)),!u||a&&t!==o){const t={current:null};p((()=>e.__unstableMarkListeningStores(f,t))),g=t.current,u=t=>{c=!1;const r=()=>{c=!1,t()},o=()=>{s?ze.add(n,r):r()},i=g.map((t=>e.subscribe(o,t)));return()=>{for(const e of i)null==e||e();ze.cancel(n)}}}else p(f);var g;return s=l,o=t,{subscribe:u,getValue:function(){return p(f),i}}}}function $e(e,t,r){const n=Ge(),o=(0,Pe.useContext)(He),i=(0,Pe.useMemo)((()=>Je(n,e)),[n]),s=(0,Pe.useCallback)(t,r),{subscribe:u,getValue:c}=i(s,!!r,o),a=(0,Pe.useSyncExternalStore)(u,c,c);return(0,Pe.useDebugValue)(a),a}function Be(e,t){const r="function"!=typeof e,n=(0,Pe.useRef)(r);if(r!==n.current){const e=n.current?"static":"mapping";throw new Error(`Switching useSelect from ${e} to ${r?"static":"mapping"} is not allowed`)}return r?(o=e,Ge().select(o)):$e(!1,e,t);var o}function Qe(e,t){return $e(!0,e,t)}var qe=e=>(0,T.createHigherOrderComponent)((t=>(0,T.pure)((r=>{const n=Be(((t,n)=>e(t,r,n)));return(0,Pe.createElement)(t,Le({},r,n))}))),"withSelect");var Ye=(e,t)=>{const r=Ge(),n=(0,Pe.useRef)(e);return(0,T.useIsomorphicLayoutEffect)((()=>{n.current=e})),(0,Pe.useMemo)((()=>{const e=n.current(r.dispatch,r);return(0,u.mapValues)(e,((e,t)=>("function"!=typeof e&&console.warn(`Property ${t} returned from dispatchMap in useDispatchWithMap must be a function.`),function(){return n.current(r.dispatch,r)[t](...arguments)})))}),[r,...t])};var Ze=e=>(0,T.createHigherOrderComponent)((t=>r=>{const n=Ye(((t,n)=>e(t,r,n)),[]);return(0,Pe.createElement)(t,Le({},r,n))}),"withDispatch");var et=(0,T.createHigherOrderComponent)((e=>t=>(0,Pe.createElement)(Me,null,(r=>(0,Pe.createElement)(e,Le({},t,{registry:r}))))),"withRegistry");var tt=e=>{const{dispatch:t}=Ge();return void 0===e?t:t(e)};const rt=s(),nt=me.select,ot=me.resolveSelect,it=me.suspendSelect,st=me.dispatch,ut=me.subscribe,ct=me.registerGenericStore,at=me.registerStore,lt=me.use,ft=me.register}(),(window.wp=window.wp