WordPress/wp-includes/js/dist/rich-text.min.js

2 lines
33 KiB
JavaScript
Raw Normal View History

/*! This file is auto-generated */
Editor: Update block editor packages to the latest patch releases. This updates the block editor related npm dependencies to their latest patch versions ahead of WordPress 6.2.1 RC1. Updated packages: - @wordpress/annotations@2.26.4 - @wordpress/block-directory@4.3.12 - @wordpress/block-editor@11.3.10 - @wordpress/block-library@8.3.12 - @wordpress/components@23.3.7 - @wordpress/customize-widgets@4.3.12 - @wordpress/edit-post@7.3.12 - @wordpress/edit-site@5.3.12 - @wordpress/edit-widgets@5.3.12 - @wordpress/editor@13.3.10 - @wordpress/format-library@4.3.10 - @wordpress/interface@5.3.8 - @wordpress/list-reusable-blocks@4.3.7 - @wordpress/preferences@3.3.7 - @wordpress/reusable-blocks@4.3.10 - @wordpress/rich-text@6.3.4 - @wordpress/server-side-render@4.3.7 - @wordpress/widgets@3.3.10 This changeset includes the following fixes: - i18n: Add context to labels related to CSS position properties gutenberg#49135 - Comments: Fix 'sprintf requires more than 1 params' error gutenberg#49054 - Fix the site editor loading in multi-site installs gutenberg#49861 - Fix quick inserter going off-screen in some situations gutenberg#49881 - Site Editor: Decode the site title properly gutenberg#49685 - Firefox: fix input rules (React async state issue) gutenberg#48210 - Only show alignment info when parent layout is constrained. gutenberg#49703 - [Inserter]: Fix onHover error on patterns tab in mobile gutenberg#49450 - Fix site editor redirection after creating new template or template part gutenberg#49364 Props mamaduka, audrasjb, wildworks, ocean90, aristath, costdev, hellofromtonya, youknowriad, mdxfr, oandregal, mattwiebe, bph, ndiego, talldanwp, joen, ellatrix, kevin940726, isabel_brison, andrewserong, ntsekouras, welcher. Fixes #58274. Built from https://develop.svn.wordpress.org/trunk@55737 git-svn-id: http://core.svn.wordpress.org/trunk@55249 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-09 16:13:25 +02:00
!function(){"use strict";var e={n:function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{__UNSTABLE_LINE_SEPARATOR:function(){return E},__experimentalRichText:function(){return Ge},__unstableCreateElement:function(){return T},__unstableFormatEdit:function(){return Ze},__unstableInsertLineSeparator:function(){return Y},__unstableIsEmptyLine:function(){return I},__unstableToDom:function(){return me},__unstableUseRichText:function(){return Ye},applyFormat:function(){return b},concat:function(){return O},create:function(){return _},getActiveFormat:function(){return k},getActiveFormats:function(){return W},getActiveObject:function(){return M},getTextContent:function(){return j},insert:function(){return q},insertObject:function(){return G},isCollapsed:function(){return P},isEmpty:function(){return V},join:function(){return B},registerFormatType:function(){return H},remove:function(){return K},removeFormat:function(){return z},replace:function(){return X},slice:function(){return Z},split:function(){return J},store:function(){return g},toHTMLString:function(){return ve},toggleFormat:function(){return Se},unregisterFormatType:function(){return Le},useAnchor:function(){return Me},useAnchorRef:function(){return ke}});var n={};e.r(n),e.d(n,{getFormatType:function(){return u},getFormatTypeForBareElement:function(){return f},getFormatTypeForClassName:function(){return d},getFormatTypes:function(){return l}});var r={};e.r(r),e.d(r,{addFormatTypes:function(){return m},removeFormatTypes:function(){return p}});var a=window.wp.data;var o=(0,a.combineReducers)({formatTypes:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_FORMAT_TYPES":return{...e,...t.formatTypes.reduce(((e,t)=>({...e,[t.name]:t})),{})};case"REMOVE_FORMAT_TYPES":return Object.fromEntries(Object.entries(e).filter((e=>{let[n]=e;return!t.names.includes(n)})))}return e}}),i={};function s(e){return[e]}function c(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}const l=function(e,t){var n,r=t||s;function a(e){var t,r,a,o,s,c=n,l=!0;for(t=0;t<e.length;t++){if(r=e[t],!(s=r)||"object"!=typeof s){l=!1;break}c.has(r)?c=c.get(r):(a=new WeakMap,c.set(r,a),c=a)}return c.has(i)||((o=function(){var e={clear:function(){e.head=null}};return e}()).isUniqueByDependants=l,c.set(i,o)),c.get(i)}function o(){n=new WeakMap}function l(){var t,n,o,i,s,l=arguments.length;for(i=new Array(l),o=0;o<l;o++)i[o]=arguments[o];for((t=a(s=r.apply(null,i))).isUniqueByDependants||(t.lastDependants&&!c(s,t.lastDependants,0)&&t.clear(),t.lastDependants=s),n=t.head;n;){if(c(n.args,i,1))return n!==t.head&&(n.prev.next=n.next,n.next&&(n.next.prev=n.prev),n.next=t.head,n.prev=null,t.head.prev=n,t.head=n),n.val;n=n.next}return n={val:e.apply(null,i)},i[0]=null,n.args=i,t.head&&(t.head.prev=n,n.next=t.head),t.head=n,n.val}return l.getDependants=r,l.clear=o,o(),l}((e=>Object.values(e.formatTypes)),(e=>[e.formatTypes]));function u(e,t){return e.formatTypes[t]}function f(e,t){const n=l(e);return n.find((e=>{let{className:n,tagName:r}=e;return null===n&&t===r}))||n.find((e=>{let{className:t,tagName:n}=e;return null===t&&"*"===n}))}function d(e,t){return l(e).find((e=>{let{className:n}=e;return null!==n&&` ${t} `.indexOf(` ${n} `)>=0}))}function m(e){return{type:"ADD_FORMAT_TYPES",formatTypes:Array.isArray(e)?e:[e]}}function p(e){return{type:"REMOVE_FORMAT_TYPES",names:Array.isArray(e)?e:[e]}}const g=(0,a.createReduxStore)("core/rich-text",{reducer:o,selectors:n,actions:r});function h(e,t){if(e===t)return!0;if(!e||!t)return!1;if(e.type!==t.type)return!1;const n=e.attributes,r