bibhamrokhanpin/wp-includes/js/dist/format-library.min.js

2 lines
23 KiB
JavaScript
Raw Normal View History

2024-04-10 12:01:06 +00:00
/*! This file is auto-generated */
(()=>{"use strict";var e={r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t);const n=window.wp.richText,o=window.React,r=window.wp.i18n,a=window.wp.blockEditor,l=window.wp.primitives,i=(0,o.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(l.Path,{d:"M14.7 11.3c1-.6 1.5-1.6 1.5-3 0-2.3-1.3-3.4-4-3.4H7v14h5.8c1.4 0 2.5-.3 3.3-1 .8-.7 1.2-1.7 1.2-2.9.1-1.9-.8-3.1-2.6-3.7zm-5.1-4h2.3c.6 0 1.1.1 1.4.4.3.3.5.7.5 1.2s-.2 1-.5 1.2c-.3.3-.8.4-1.4.4H9.6V7.3zm4.6 9c-.4.3-1 .4-1.7.4H9.6v-3.9h2.9c.7 0 1.3.2 1.7.5.4.3.6.8.6 1.5s-.2 1.2-.6 1.5z"})),c="core/bold",s=(0,r.__)("Bold"),u={name:c,title:s,tagName:"strong",className:null,edit({isActive:e,value:t,onChange:r,onFocus:l}){function u(){r((0,n.toggleFormat)(t,{type:c,title:s}))}return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(a.RichTextShortcut,{type:"primary",character:"b",onUse:u}),(0,o.createElement)(a.RichTextToolbarButton,{name:"bold",icon:i,title:s,onClick:function(){r((0,n.toggleFormat)(t,{type:c})),l()},isActive:e,shortcutType:"primary",shortcutCharacter:"b"}),(0,o.createElement)(a.__unstableRichTextInputEvent,{inputType:"formatBold",onInput:u}))}},m=(0,o.createElement)(l.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(l.Path,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"})),p="core/code",h=(0,r.__)("Inline code"),g={name:p,title:h,tagName:"code",className:null,__unstableInputRule(e){const{start:t,text:o}=e;if("`"!==o[t-1])return e;if(t-2<0)return e;const r=o.lastIndexOf("`",t-2);if(-1===r)return e;const a=r,l=t-2;return a===l?e:(e=(0,n.remove)(e,a,a+1),e=(0,n.remove)(e,l,l+1),e=(0,n.applyFormat)(e,{type:p},a,l))},edit({value:e,onChange:t,onFocus:r,isActive:l}){function i(){t((0,n.toggleFormat)(e,{type:p,title:h})),r()}return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(a.RichTextShortcut,{type:"access",character:"x",onUse:i}),(0,o.createElement)(a.RichTextToolbarButton,{icon:m,title:h,onClick:i,isActive:l,role:"menuitemcheckbox"}))}},d=window.wp.components,v=window.wp.element,b=(0,o.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,o.createElement)(l.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"})),f=["image"],w="core/image",y=(0,r.__)("Inline image"),E={name:w,title:y,keywords:[(0,r.__)("photo"),(0,r.__)("media")],object:!0,tagName:"img",className:null,attributes:{className:"class",style:"style",url:"src",alt:"alt"},edit:function({value:e,onChange:t,onFocus:r,isObjectActive:l,activeObjectAttributes:i,contentRef:c}){const[s,u]=(0,v.useState)(!1);function m(){u(!1)}return(0,o.createElement)(a.MediaUploadCheck,null,(0,o.createElement)(a.RichTextToolbarButton,{icon:(0,o.createElement)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(d.Path,{d:"M4 18.5h16V17H4v1.5zM16 13v1.5h4V13h-4zM5.1 15h7.8c.6 0 1.1-.5 1.1-1.1V6.1c0-.6-.5-1.1-1.1-1.1H5.1C4.5 5 4 5.5 4 6.1v7.8c0 .6.5 1.1 1.1 1.1zm.4-8.5h7V10l-1-1c-.3-.3-.8-.3-1 0l-1.6 1.5-1.2-.7c-.3-.2-.6-.2-.9 0l-1.3 1V6.5zm0 6.1l1.8-1.3 1.3.8c.3.2.7.2.9-.1l1.5-1.4 1.5 1.4v1.5h-7v-.9z"})),title:y,onClick:function(){u(!0)},isActive:l}),s&&(0,o.createElement)(a.MediaUpload,{allowedTypes:f,onSelect:({id:o,url:a,alt:l,width:i})=>{m(),t((0,n.insertObject)(e,{type:w,attributes:{className:`wp-image-${o}`,style:`width: ${Math.min(i,150)}px;`,url:a,alt:l}})),r()},onClose:m,render:({open:e})=>(e(),null)}),l&&(0,o.cr