WordPress/wp-includes/js/dist/plugins.min.js
gziolo c3ea09ebb8 Editor: Update WordPress packages published for Gutenberg 10.6
It contains several changes in addition to regular update to WordPress packages:
- All newly exposed blocks are now registered on the server.
- Dutone block support was added.
- Border block support was updated.
- New shared function `construct_wp_query_args` was added for the family of Query blocks - it might need some further work.

Props youknowriad.
See #52991.



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


git-svn-id: http://core.svn.wordpress.org/trunk@50538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-19 15:09:27 +00:00

2 lines
5.2 KiB
JavaScript

/*! This file is auto-generated */
this.wp=this.wp||{},this.wp.plugins=function(e){var n={};function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var i in e)t.d(r,i,function(n){return e[n]}.bind(null,i));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=580)}({0:function(e,n){e.exports=window.wp.element},10:function(e,n){e.exports=window.wp.compose},2:function(e,n){e.exports=window.lodash},21:function(e,n){e.exports=window.wp.hooks},3:function(e,n){e.exports=window.wp.primitives},322:function(e,n,t){"use strict";var r=t(0),i=t(3);const o=Object(r.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(i.Path,{d:"M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"}));n.a=o},42:function(e,n,t){e.exports=function(e,n){var t,r,i=0;function o(){var o,u,l=t,s=arguments.length;e:for(;l;){if(l.args.length===arguments.length){for(u=0;u<s;u++)if(l.args[u]!==arguments[u]){l=l.next;continue e}return l!==t&&(l===r&&(r=l.prev),l.prev.next=l.next,l.next&&(l.next.prev=l.prev),l.next=t,l.prev=null,t.prev=l,t=l),l.val}l=l.next}for(o=new Array(s),u=0;u<s;u++)o[u]=arguments[u];return l={args:o,val:e.apply(null,o)},t?(t.prev=l,l.next=t):r=l,i===n.maxSize?(r=r.prev).next=null:i++,t=l,l.val}return n=n||{},o.clear=function(){t=null,r=null,i=0},o}},580:function(e,n,t){"use strict";t.r(n),t.d(n,"PluginArea",(function(){return j})),t.d(n,"withPluginContext",(function(){return g})),t.d(n,"registerPlugin",(function(){return m})),t.d(n,"unregisterPlugin",(function(){return v})),t.d(n,"getPlugin",(function(){return h})),t.d(n,"getPlugins",(function(){return b}));var r=t(0),i=t(2),o=t(42),u=t.n(o),l=t(21),s=t(7),c=t(10);const{Consumer:a,Provider:p}=Object(r.createContext)({name:null,icon:null}),g=e=>Object(c.createHigherOrderComponent)(n=>t=>Object(r.createElement)(a,null,i=>Object(r.createElement)(n,Object(s.a)({},t,e(i,t)))),"withPluginContext");var d=t(322);const f={};function m(e,n){if("object"!=typeof n)return console.error("No settings object provided!"),null;if("string"!=typeof e)return console.error("Plugin name must be string."),null;if(!/^[a-z][a-z0-9-]*$/.test(e))return console.error('Plugin name must include only lowercase alphanumeric characters or dashes, and start with a letter. Example: "my-plugin".'),null;f[e]&&console.error(`Plugin "${e}" is already registered.`),n=Object(l.applyFilters)("plugins.registerPlugin",n,e);const{render:t,scope:r}=n;if(!Object(i.isFunction)(t))return console.error('The "render" property must be specified and must be a valid function.'),null;if(r){if("string"!=typeof r)return console.error("Plugin scope must be string."),null;if(!/^[a-z][a-z0-9-]*$/.test(r))return console.error('Plugin scope must include only lowercase alphanumeric characters or dashes, and start with a letter. Example: "my-page".'),null}return f[e]={name:e,icon:d.a,...n},Object(l.doAction)("plugins.pluginRegistered",n,e),n}function v(e){if(!f[e])return void console.error('Plugin "'+e+'" is not registered.');const n=f[e];return delete f[e],Object(l.doAction)("plugins.pluginUnregistered",n,e),n}function h(e){return f[e]}function b(e){return Object.values(f).filter(n=>n.scope===e)}class x extends r.Component{constructor(){super(...arguments),this.setPlugins=this.setPlugins.bind(this),this.memoizedContext=u()((e,n)=>({name:e,icon:n})),this.state=this.getCurrentPluginsState()}getCurrentPluginsState(){return{plugins:Object(i.map)(b(this.props.scope),({icon:e,name:n,render:t})=>({Plugin:t,context:this.memoizedContext(n,e)}))}}componentDidMount(){Object(l.addAction)("plugins.pluginRegistered","core/plugins/plugin-area/plugins-registered",this.setPlugins),Object(l.addAction)("plugins.pluginUnregistered","core/plugins/plugin-area/plugins-unregistered",this.setPlugins)}componentWillUnmount(){Object(l.removeAction)("plugins.pluginRegistered","core/plugins/plugin-area/plugins-registered"),Object(l.removeAction)("plugins.pluginUnregistered","core/plugins/plugin-area/plugins-unregistered")}setPlugins(){this.setState(this.getCurrentPluginsState)}render(){return Object(r.createElement)("div",{style:{display:"none"}},Object(i.map)(this.state.plugins,({context:e,Plugin:n})=>Object(r.createElement)(p,{key:e.name,value:e},Object(r.createElement)(n,null))))}}var j=x},7:function(e,n,t){"use strict";function r(){return(r=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}t.d(n,"a",(function(){return r}))}});