WordPress/wp-includes/js/dist/keycodes.min.js
hellofromTonya 8588041fd2 Editor: Update @wordpress packages for 6.2 Beta 2.
Updates the `@wordpress` packages to include the following changes:

- Add missing period in keyboard shortcut descriptions
- Site Editor: Append template type and name to the site editor page title
- Specify active color state for template navigation button
- Global Styles: Move more link about custom CSS to part of description
- ToolsPanel: Display optional items when values are updated externally
- File block: Re-add editor styles for classic themes
- Enable undo after creating a new menu
- Style Book: Exclude blocks that are not allowed to insert
- Add basic tsconfig.json validation
- Fix Experiments native variant breakage
- Update moment and moment-timezone packages to fix timezone issues
- NavigatorButton: Reuse Button types
- ToolsPanel: Ensure display of optional items when panel id is null
- ColorPalette: Ensure text label contrast checking works with CSS variables
- Components: Add support for named arguments in the navigator components
- Rename experiments package to private-apis
- Cherry-pick CLI: Fix the default label to match the documentation
- Handle block metadata attribute and related experimental APIs
- Fix: Remove browser default border for iframe in the editor
- [Layout]: Fix align controls for hybrid themes
- Visual Regression tests: use default playwright utils
- SelectControl: Fix multiple prop styling
- Fix clicking on the toggle button not closing the block inserter
- Update deps for the useEffect that creates navigation menus
- Minor updates in Private APIs docs
- Site Editor: Fix custom Template Parts rename action
- [Block Library - Cover]: Ensure url is not malformed due to sanitization through wp_kses
- Revert "Prevent the image from being resized larger than its container"
- Lodash: Remove from @wordpress/keycodes package
- Distraction free mode: Fix keyboard shortcut not working
- Popover: lock the __experimentalPopoverPositionToPlacement function
- Rename the "experiments" export to "privateApis"
- Add an aria label to the site save dialog
- Navigator: add more pattern matching tests, refine existing tests
- Add parent navigation support for the navigator component
- Add back link to Design heading in site editor navigation to return to Dashboard
- Add a nested level when selecting templates or template parts
- Move site editor 6.2 specific code to the right file
- Fix site editor navigation

References:
* [1bf01c01a8 Gutenberg's commit for publishing the packages]

Follow-up to [55257].

Props ntsekouras.
See #57471.
Built from https://develop.svn.wordpress.org/trunk@55333


git-svn-id: http://core.svn.wordpress.org/trunk@54866 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-14 15:44:36 +00:00

2 lines
4.3 KiB
JavaScript

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