PluginProbe
Gutenberg / 16.5.0
Gutenberg v16.5.0
24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 12.6.0 All 403 releases
gutenberg / build / keycodes / index.min.js

index.min.js in Gutenberg 16.5.0, at build/keycodes/index.min.js

10 lines 3.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r: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,{ALT:()=>P,BACKSPACE:()=>d,COMMAND:()=>L,CTRL:()=>j,DELETE:()=>S,DOWN:()=>O,END:()=>g,ENTER:()=>p,ESCAPE:()=>h,F10:()=>b,HOME:()=>w,LEFT:()=>C,PAGEDOWN:()=>A,PAGEUP:()=>m,RIGHT:()=>E,SHIFT:()=>T,SPACE:()=>y,TAB:()=>f,UP:()=>v,ZERO:()=>_,displayShortcut:()=>x,displayShortcutList:()=>Z,isAppleOS:()=>u,isKeyboardEvent:()=>K,modifiers:()=>k,rawShortcut:()=>M,shortcutAriaLabel:()=>D});var r=function(){return r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};function n(e){return e.toLowerCase()}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var o=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],i=/[^A-Z0-9]+/gi;function a(e,t,r){return t instanceof RegExp?e.replace(t,r):t.reduce((function(e,t){return e.replace(t,r)}),e)}function c(e){return function(e){return e.charAt(0).toUpperCase()+e.substr(1)}(e.toLowerCase())}function l(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});for(var r=t.splitRegexp,c=void 0===r?o:r,l=t.stripRegexp,s=void 0===l?i:l,u=t.transform,d=void 0===u?n:u,f=t.delimiter,p=void 0===f?" ":f,h=a(a(e,c,"$1\0$2"),s,"\0"),y=0,m=h.length;"\0"===h.charAt(y);)y++;for(;"\0"===h.charAt(m-1);)m--;return h.slice(y,m).split("\0").map(d).join(p)}(e,r({delimiter:" ",transform:c},t))}const s=window.wp.i18n;function u(e=null){if(!e){if("undefined"==typeof window)return!1;e=window}const{platform:t}=e.navigator;return-1!==t.indexOf("Mac")||["iPad","iPhone"].includes(t)}const d=8,f=9,p=13,h=27,y=32,m=33,A=34,g=35,w=36,C=37,v=38,E=39,O=40,S=46,b=121,P="alt",j="ctrl",L="meta",T="shift",_=48;function R(e,t){return Object.fromEntries(Object.entries(e).map((([e,r])=>[e,t(r)])))}const k={primary:e=>e()?[L]:[j],primaryShift:e=>e()?[T,L]:[j,T],primaryAlt:e=>e()?[P,L]:[j,P],secondary:e=>e()?[T,P,L]:[j,T,P],access:e=>e()?[j,P]:[T,P],ctrl:()=>[j],alt:()=>[P],ctrlShift:()=>[j,T],shift:()=>[T],shiftAlt:()=>[T,P],undefined:()=>[]},M=R(k,(e=>(t,r=u)=>[...e(r),t.toLowerCase()].join("+"))),Z=R(k,(e=>(t,r=u)=>{const n=r(),o={[P]:n?"":"Alt",[j]:n?"":"Ctrl",[L]:"",[T]:n?"":"Shift"};return[...e(r).reduce(((e,t)=>{var r;const i=null!==(r=o[t])&&void 0!==r?r:t;return n?[...e,i]:[...e,i,"+"]}),[]),l(t,{stripRegexp:/[^A-Z0-9~`,\.\\\-]/gi})]})),x=R(Z,(e=>(t,r=u)=>e(t,r).join(""))),D=R(k,(e=>(t,r=u)=>{const n=r(),o={[T]:"Shift",[L]:n?"Command":"Control",[j]:"Control",[P]:n?"Option":"Alt",
2 /* translators: comma as in the character ',' */
3 ",":(0,s.__)("Comma"),
4 /* translators: period as in the character '.' */
5 ".":(0,s.__)("Period"),
6 /* translators: backtick as in the character '`' */
7 "`":(0,s.__)("Backtick"),
8 /* translators: tilde as in the character '~' */
9 "~":(0,s.__)("Tilde")};return[...e(r),t].map((e=>{var t;return l(null!==(t=o[e])&&void 0!==t?t:e)})).join(n?" ":" + ")})),K=R(k,(e=>(t,r,n=u)=>{const o=e(n),i=function(e){return[P,j,L,T].filter((t=>e[`${t}Key`]))}(t),a={Comma:",",Backslash:"\\",IntlRo:"\\",IntlYen:"\\"},c=o.filter((e=>!i.includes(e))),l=i.filter((e=>!o.includes(e)));if(c.length>0||l.length>0)return!1;let s=t.key.toLowerCase();return r?(t.altKey&&1===r.length&&(s=String.fromCharCode(t.keyCode).toLowerCase()),t.shiftKey&&1===r.length&&a[t.code]&&(s=a[t.code]),"del"===r&&(r="delete"),s===r.toLowerCase()):o.includes(s)}));(window.wp=window.wp||{}).keycodes=t})();
10 //# sourceMappingURL=index.min.js.map