WordPress/wp-includes/js/dist/keycodes.min.js
youknowriad 1de40f71be Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress. 
This includes features like:

 - DataViews.
 - Customization tools like box shadow, background size and repeat.
 - UI improvements in the site editor. 
 - Preferences sharing between the post and site editors.
 - Unified panels and editors between post and site editors.
 - Improved template mode in the post editor.
 - Iterations to multiple interactive blocks.
 - Preparing the blocks and UI for pattern overrides.
 - and a lot more.

Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377


git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 21:07:12 +00:00

2 lines
3.0 KiB
JavaScript

/*! This file is auto-generated */
!function(){"use strict";var n={d:function(t,r){for(var e in r)n.o(r,e)&&!n.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:r[e]})},o:function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r:function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})}},t={};n.r(t),n.d(t,{ALT:function(){return S},BACKSPACE:function(){return o},COMMAND:function(){return A},CTRL:function(){return E},DELETE:function(){return m},DOWN:function(){return C},END:function(){return d},ENTER:function(){return u},ESCAPE:function(){return c},F10:function(){return w},HOME:function(){return s},LEFT:function(){return p},PAGEDOWN:function(){return a},PAGEUP:function(){return l},RIGHT:function(){return h},SHIFT:function(){return O},SPACE:function(){return f},TAB:function(){return i},UP:function(){return y},ZERO:function(){return P},displayShortcut:function(){return _},displayShortcutList:function(){return L},isAppleOS:function(){return e},isKeyboardEvent:function(){return k},modifiers:function(){return v},rawShortcut:function(){return T},shortcutAriaLabel:function(){return j}});var r=window.wp.i18n;function e(n=null){if(!n){if("undefined"==typeof window)return!1;n=window}const{platform:t}=n.navigator;return-1!==t.indexOf("Mac")||["iPad","iPhone"].includes(t)}const o=8,i=9,u=13,c=27,f=32,l=33,a=34,d=35,s=36,p=37,y=38,h=39,C=40,m=46,w=121,S="alt",E="ctrl",A="meta",O="shift",P=48;function b(n){return n.length<2?n.toUpperCase():n.charAt(0).toUpperCase()+n.slice(1)}function g(n,t){return Object.fromEntries(Object.entries(n).map((([n,r])=>[n,t(r)])))}const v={primary:n=>n()?[A]:[E],primaryShift:n=>n()?[O,A]:[E,O],primaryAlt:n=>n()?[S,A]:[E,S],secondary:n=>n()?[O,S,A]:[E,O,S],access:n=>n()?[E,S]:[O,S],ctrl:()=>[E],alt:()=>[S],ctrlShift:()=>[E,O],shift:()=>[O],shiftAlt:()=>[O,S],undefined:()=>[]},T=g(v,(n=>(t,r=e)=>[...n(r),t.toLowerCase()].join("+"))),L=g(v,(n=>(t,r=e)=>{const o=r(),i={[S]:o?"⌥":"Alt",[E]:o?"⌃":"Ctrl",[A]:"⌘",[O]:o?"⇧":"Shift"};return[...n(r).reduce(((n,t)=>{var r;const e=null!==(r=i[t])&&void 0!==r?r:t;return o?[...n,e]:[...n,e,"+"]}),[]),b(t)]})),_=g(L,(n=>(t,r=e)=>n(t,r).join(""))),j=g(v,(n=>(t,o=e)=>{const i=o(),u={[O]:"Shift",[A]:i?"Command":"Control",[E]:"Control",[S]:i?"Option":"Alt",",":(0,r.__)("Comma"),".":(0,r.__)("Period"),"`":(0,r.__)("Backtick"),"~":(0,r.__)("Tilde")};return[...n(o),t].map((n=>{var t;return b(null!==(t=u[n])&&void 0!==t?t:n)})).join(i?" ":" + ")}));const k=g(v,(n=>(t,r,o=e)=>{const i=n(o),u=function(n){return[S,E,A,O].filter((t=>n[`${t}Key`]))}(t),c={Comma:",",Backslash:"\\",IntlRo:"\\",IntlYen:"\\"},f=i.filter((n=>!u.includes(n))),l=u.filter((n=>!i.includes(n)));if(f.length>0||l.length>0)return!1;let a=t.key.toLowerCase();return r?(t.altKey&&1===r.length&&(a=String.fromCharCode(t.keyCode).toLowerCase()),t.shiftKey&&1===r.length&&c[t.code]&&(a=c[t.code]),"del"===r&&(r="delete"),a===r.toLowerCase()):i.includes(a)}));(window.wp=window.wp||{}).keycodes=t}();