Block Editor: Update WordPress Packages WordPress 5.4 RC 2.

The following package versions were changed:
@wordpress/block-directory: 1.5.3 -> 1.5.4
@wordpress/block-editor: 3.7.3 -> 3.7.4
@wordpress/block-library: 2.14.3 -> 2.14.4
@wordpress/edit-post: 3.13.4 -> 3.13.5
@wordpress/editor: 9.12.3 -> 9.12.4
@wordpress/format-library: 1.14.3 -> 1.14.4

Props aduth, gziolo, mapk.
Merges [47441] to the 5.4 branch.
Fixes: #49611.

Built from https://develop.svn.wordpress.org/branches/5.4@47442


git-svn-id: http://core.svn.wordpress.org/branches/5.4@47229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
aduth 2020-03-10 15:42:14 +00:00
parent 768c11f15c
commit 1d596890a0
42 changed files with 623 additions and 294 deletions

File diff suppressed because one or more lines are too long

View File

@ -205,7 +205,6 @@
.block-editor-block-list__layout .block-editor-block-list__block.has-warning > * { .block-editor-block-list__layout .block-editor-block-list__block.has-warning > * {
pointer-events: none; pointer-events: none;
-webkit-user-select: none; -webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none; -ms-user-select: none;
user-select: none; } user-select: none; }
@ -1176,23 +1175,24 @@ body.admin-color-light .block-list-appender.is-drop-target > div::before {
min-height: 28px; min-height: 28px;
line-height: 1.8; } line-height: 1.8; }
.block-editor-block-list__empty-block-inserter, .block-editor-block-list__empty-block-inserter.block-editor-block-list__empty-block-inserter,
.block-editor-default-block-appender .block-editor-inserter { .block-editor-default-block-appender .block-editor-inserter {
position: absolute; position: absolute;
top: 0; } top: 0;
.block-editor-block-list__empty-block-inserter .components-button.has-icon, height: 28px; }
.block-editor-block-list__empty-block-inserter.block-editor-block-list__empty-block-inserter .components-button.has-icon,
.block-editor-default-block-appender .block-editor-inserter .components-button.has-icon { .block-editor-default-block-appender .block-editor-inserter .components-button.has-icon {
width: 28px; width: 28px;
height: 28px; height: 28px;
padding: 0; } padding: 0; }
.block-editor-block-list__empty-block-inserter .components-button svg, .block-editor-block-list__empty-block-inserter.block-editor-block-list__empty-block-inserter .components-button svg,
.block-editor-default-block-appender .block-editor-inserter .components-button svg { .block-editor-default-block-appender .block-editor-inserter .components-button svg {
display: block; display: block;
margin: auto; } margin: auto; }
.block-editor-block-list__empty-block-inserter .block-editor-inserter__toggle, .block-editor-block-list__empty-block-inserter.block-editor-block-list__empty-block-inserter .block-editor-inserter__toggle,
.block-editor-default-block-appender .block-editor-inserter .block-editor-inserter__toggle { .block-editor-default-block-appender .block-editor-inserter .block-editor-inserter__toggle {
margin-left: 0; } margin-left: 0; }
.block-editor-block-list__empty-block-inserter .block-editor-inserter__toggle:not(:disabled):not([aria-disabled="true"]):not(.is-secondary):hover, .block-editor-block-list__empty-block-inserter.block-editor-block-list__empty-block-inserter .block-editor-inserter__toggle:not(:disabled):not([aria-disabled="true"]):not(.is-secondary):hover,
.block-editor-default-block-appender .block-editor-inserter .block-editor-inserter__toggle:not(:disabled):not([aria-disabled="true"]):not(.is-secondary):hover { .block-editor-default-block-appender .block-editor-inserter .block-editor-inserter__toggle:not(:disabled):not([aria-disabled="true"]):not(.is-secondary):hover {
box-shadow: none; } box-shadow: none; }

File diff suppressed because one or more lines are too long

View File

@ -205,7 +205,6 @@
.block-editor-block-list__layout .block-editor-block-list__block.has-warning > * { .block-editor-block-list__layout .block-editor-block-list__block.has-warning > * {
pointer-events: none; pointer-events: none;
-webkit-user-select: none; -webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none; -ms-user-select: none;
user-select: none; } user-select: none; }
@ -1180,23 +1179,24 @@ body.admin-color-light .block-list-appender.is-drop-target > div::before {
min-height: 28px; min-height: 28px;
line-height: 1.8; } line-height: 1.8; }
.block-editor-block-list__empty-block-inserter, .block-editor-block-list__empty-block-inserter.block-editor-block-list__empty-block-inserter,
.block-editor-default-block-appender .block-editor-inserter { .block-editor-default-block-appender .block-editor-inserter {
position: absolute; position: absolute;
top: 0; } top: 0;
.block-editor-block-list__empty-block-inserter .components-button.has-icon, height: 28px; }
.block-editor-block-list__empty-block-inserter.block-editor-block-list__empty-block-inserter .components-button.has-icon,
.block-editor-default-block-appender .block-editor-inserter .components-button.has-icon { .block-editor-default-block-appender .block-editor-inserter .components-button.has-icon {
width: 28px; width: 28px;
height: 28px; height: 28px;
padding: 0; } padding: 0; }
.block-editor-block-list__empty-block-inserter .components-button svg, .block-editor-block-list__empty-block-inserter.block-editor-block-list__empty-block-inserter .components-button svg,
.block-editor-default-block-appender .block-editor-inserter .components-button svg { .block-editor-default-block-appender .block-editor-inserter .components-button svg {
display: block; display: block;
margin: auto; } margin: auto; }
.block-editor-block-list__empty-block-inserter .block-editor-inserter__toggle, .block-editor-block-list__empty-block-inserter.block-editor-block-list__empty-block-inserter .block-editor-inserter__toggle,
.block-editor-default-block-appender .block-editor-inserter .block-editor-inserter__toggle { .block-editor-default-block-appender .block-editor-inserter .block-editor-inserter__toggle {
margin-right: 0; } margin-right: 0; }
.block-editor-block-list__empty-block-inserter .block-editor-inserter__toggle:not(:disabled):not([aria-disabled="true"]):not(.is-secondary):hover, .block-editor-block-list__empty-block-inserter.block-editor-block-list__empty-block-inserter .block-editor-inserter__toggle:not(:disabled):not([aria-disabled="true"]):not(.is-secondary):hover,
.block-editor-default-block-appender .block-editor-inserter .block-editor-inserter__toggle:not(:disabled):not([aria-disabled="true"]):not(.is-secondary):hover { .block-editor-default-block-appender .block-editor-inserter .block-editor-inserter__toggle:not(:disabled):not([aria-disabled="true"]):not(.is-secondary):hover {
box-shadow: none; } box-shadow: none; }

File diff suppressed because one or more lines are too long

View File

@ -946,16 +946,6 @@ body.admin-color-light .blocks-gallery-item figure.is-selected {
.wp-block-media-text > .block-editor-inner-blocks > .block-editor-block-list__layout > .block-editor-block-list__block { .wp-block-media-text > .block-editor-inner-blocks > .block-editor-block-list__layout > .block-editor-block-list__block {
max-width: unset; } max-width: unset; }
figure.block-library-media-text__media-container {
margin: 0;
height: 100%;
width: 100%; }
.wp-block-media-text .block-library-media-text__media-container img,
.wp-block-media-text .block-library-media-text__media-container video {
vertical-align: middle;
width: 100%; }
.editor-media-container__resizer .components-resizable-box__handle { .editor-media-container__resizer .components-resizable-box__handle {
display: none; } display: none; }

File diff suppressed because one or more lines are too long

View File

@ -951,16 +951,6 @@ body.admin-color-light .blocks-gallery-item figure.is-selected {
.wp-block-media-text > .block-editor-inner-blocks > .block-editor-block-list__layout > .block-editor-block-list__block { .wp-block-media-text > .block-editor-inner-blocks > .block-editor-block-list__layout > .block-editor-block-list__block {
max-width: unset; } max-width: unset; }
figure.block-library-media-text__media-container {
margin: 0;
height: 100%;
width: 100%; }
.wp-block-media-text .block-library-media-text__media-container img,
.wp-block-media-text .block-library-media-text__media-container video {
vertical-align: middle;
width: 100%; }
.editor-media-container__resizer .components-resizable-box__handle { .editor-media-container__resizer .components-resizable-box__handle {
display: none; } display: none; }

File diff suppressed because one or more lines are too long

View File

@ -336,7 +336,6 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: 0; z-index: 0;
-o-object-fit: cover;
object-fit: cover; } object-fit: cover; }
section.wp-block-cover-image h2, section.wp-block-cover-image h2,
@ -565,7 +564,6 @@ section.wp-block-cover-image > h2,
.blocks-gallery-grid.is-cropped .blocks-gallery-item img { .blocks-gallery-grid.is-cropped .blocks-gallery-item img {
height: 100%; height: 100%;
flex: 1; flex: 1;
-o-object-fit: cover;
object-fit: cover; } } object-fit: cover; } }
.wp-block-gallery .blocks-gallery-image, .wp-block-gallery .blocks-gallery-image,
.wp-block-gallery .blocks-gallery-item, .wp-block-gallery .blocks-gallery-item,
@ -1068,7 +1066,6 @@ section.wp-block-cover-image > h2,
.wp-block-navigation .wp-block-navigation-link .wp-block-navigation-link__content { .wp-block-navigation .wp-block-navigation-link .wp-block-navigation-link__content {
display: flex; display: flex;
align-items: center; align-items: center;
width: -webkit-max-content;
width: max-content; width: max-content;
padding: 6px 16px; } padding: 6px 16px; }
.wp-block-navigation .wp-block-navigation-link .wp-block-navigation-link:first-child:not(:only-child) .wp-block-navigation-link__content { .wp-block-navigation .wp-block-navigation-link .wp-block-navigation-link:first-child:not(:only-child) .wp-block-navigation-link__content {
@ -1672,7 +1669,6 @@ p.wp-block-subhead {
max-width: 100%; } max-width: 100%; }
@supports ((position: -webkit-sticky) or (position: sticky)) { @supports ((position: -webkit-sticky) or (position: sticky)) {
.wp-block-video [poster] { .wp-block-video [poster] {
-o-object-fit: cover;
object-fit: cover; } } object-fit: cover; } }
.wp-block-video.aligncenter { .wp-block-video.aligncenter {
text-align: center; } text-align: center; }

File diff suppressed because one or more lines are too long

View File

@ -339,7 +339,6 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: 0; z-index: 0;
-o-object-fit: cover;
object-fit: cover; } object-fit: cover; }
section.wp-block-cover-image h2, section.wp-block-cover-image h2,
@ -569,7 +568,6 @@ section.wp-block-cover-image > h2,
.blocks-gallery-grid.is-cropped .blocks-gallery-item img { .blocks-gallery-grid.is-cropped .blocks-gallery-item img {
height: 100%; height: 100%;
flex: 1; flex: 1;
-o-object-fit: cover;
object-fit: cover; } } object-fit: cover; } }
.wp-block-gallery .blocks-gallery-image, .wp-block-gallery .blocks-gallery-image,
.wp-block-gallery .blocks-gallery-item, .wp-block-gallery .blocks-gallery-item,
@ -1090,7 +1088,6 @@ section.wp-block-cover-image > h2,
.wp-block-navigation .wp-block-navigation-link .wp-block-navigation-link__content { .wp-block-navigation .wp-block-navigation-link .wp-block-navigation-link__content {
display: flex; display: flex;
align-items: center; align-items: center;
width: -webkit-max-content;
width: max-content; width: max-content;
padding: 6px 16px; } padding: 6px 16px; }
.wp-block-navigation .wp-block-navigation-link .wp-block-navigation-link:first-child:not(:only-child) .wp-block-navigation-link__content { .wp-block-navigation .wp-block-navigation-link .wp-block-navigation-link:first-child:not(:only-child) .wp-block-navigation-link__content {
@ -1696,7 +1693,6 @@ p.wp-block-subhead {
max-width: 100%; } max-width: 100%; }
@supports ((position: -webkit-sticky) or (position: sticky)) { @supports ((position: -webkit-sticky) or (position: sticky)) {
.wp-block-video [poster] { .wp-block-video [poster] {
-o-object-fit: cover;
object-fit: cover; } } object-fit: cover; } }
.wp-block-video.aligncenter { .wp-block-video.aligncenter {
text-align: center; } text-align: center; }

File diff suppressed because one or more lines are too long

View File

@ -67,19 +67,14 @@
.edit-post-header { .edit-post-header {
height: 56px; height: 56px;
padding: 4px 2px;
background: #fff; background: #fff;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between;
align-items: center; align-items: center;
max-width: 100vw; } max-width: 100vw; }
@media (min-width: 280px) { @media (min-width: 280px) {
.edit-post-header { .edit-post-header {
flex-wrap: nowrap; } } flex-wrap: nowrap; } }
@media (min-width: 600px) {
.edit-post-header {
padding: 8px; } }
.edit-post-header > .edit-post-header__settings { .edit-post-header > .edit-post-header__settings {
order: 1; } order: 1; }
@supports ((position: -webkit-sticky) or (position: sticky)) { @supports ((position: -webkit-sticky) or (position: sticky)) {
@ -87,12 +82,15 @@
order: initial; } } order: initial; } }
.edit-post-header__toolbar { .edit-post-header__toolbar {
display: flex; } display: flex;
flex-grow: 1;
padding-right: 16px; }
.edit-post-header__settings { .edit-post-header__settings {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
flex-wrap: wrap; } flex-wrap: wrap;
padding-left: 8px; }
.edit-post-header .components-button.is-pressed { .edit-post-header .components-button.is-pressed {
color: #fff; color: #fff;
@ -127,16 +125,28 @@
.edit-post-header .components-button.editor-post-publish-button, .edit-post-header .components-button.editor-post-publish-panel__toggle { .edit-post-header .components-button.editor-post-publish-button, .edit-post-header .components-button.editor-post-publish-panel__toggle {
margin: 0 3px 0 12px; } } margin: 0 3px 0 12px; } }
.edit-post-fullscreen-mode-close__toolbar { .edit-post-fullscreen-mode-close.has-icon {
display: none; } display: none; }
@media (min-width: 782px) { @media (min-width: 782px) {
.edit-post-fullscreen-mode-close__toolbar { .edit-post-fullscreen-mode-close.has-icon {
display: flex; display: flex;
border-top: 0; align-items: center;
border-bottom: 0; align-self: stretch;
border-right: 0; border: none;
margin: -9px -10px -8px 10px; background: #23282e;
padding: 9px 10px; } } color: #fff;
border-radius: 0;
height: auto;
width: 56px; }
.edit-post-fullscreen-mode-close.has-icon:hover {
background: #32373d !important;
color: #fff !important;
box-shadow: none !important; }
.edit-post-fullscreen-mode-close.has-icon:active {
color: #fff; } }
.edit-post-fullscreen-mode-close.has-icon svg {
margin-right: auto;
margin-left: auto; }
.edit-post-header-toolbar { .edit-post-header-toolbar {
display: inline-flex; display: inline-flex;

File diff suppressed because one or more lines are too long

View File

@ -67,19 +67,14 @@
.edit-post-header { .edit-post-header {
height: 56px; height: 56px;
padding: 4px 2px;
background: #fff; background: #fff;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between;
align-items: center; align-items: center;
max-width: 100vw; } max-width: 100vw; }
@media (min-width: 280px) { @media (min-width: 280px) {
.edit-post-header { .edit-post-header {
flex-wrap: nowrap; } } flex-wrap: nowrap; } }
@media (min-width: 600px) {
.edit-post-header {
padding: 8px; } }
.edit-post-header > .edit-post-header__settings { .edit-post-header > .edit-post-header__settings {
order: 1; } order: 1; }
@supports ((position: -webkit-sticky) or (position: sticky)) { @supports ((position: -webkit-sticky) or (position: sticky)) {
@ -87,12 +82,15 @@
order: initial; } } order: initial; } }
.edit-post-header__toolbar { .edit-post-header__toolbar {
display: flex; } display: flex;
flex-grow: 1;
padding-left: 16px; }
.edit-post-header__settings { .edit-post-header__settings {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
flex-wrap: wrap; } flex-wrap: wrap;
padding-right: 8px; }
.edit-post-header .components-button.is-pressed { .edit-post-header .components-button.is-pressed {
color: #fff; color: #fff;
@ -127,16 +125,28 @@
.edit-post-header .components-button.editor-post-publish-button, .edit-post-header .components-button.editor-post-publish-panel__toggle { .edit-post-header .components-button.editor-post-publish-button, .edit-post-header .components-button.editor-post-publish-panel__toggle {
margin: 0 12px 0 3px; } } margin: 0 12px 0 3px; } }
.edit-post-fullscreen-mode-close__toolbar { .edit-post-fullscreen-mode-close.has-icon {
display: none; } display: none; }
@media (min-width: 782px) { @media (min-width: 782px) {
.edit-post-fullscreen-mode-close__toolbar { .edit-post-fullscreen-mode-close.has-icon {
display: flex; display: flex;
border-top: 0; align-items: center;
border-bottom: 0; align-self: stretch;
border-left: 0; border: none;
margin: -9px 10px -8px -10px; background: #23282e;
padding: 9px 10px; } } color: #fff;
border-radius: 0;
height: auto;
width: 56px; }
.edit-post-fullscreen-mode-close.has-icon:hover {
background: #32373d !important;
color: #fff !important;
box-shadow: none !important; }
.edit-post-fullscreen-mode-close.has-icon:active {
color: #fff; } }
.edit-post-fullscreen-mode-close.has-icon svg {
margin-left: auto;
margin-right: auto; }
.edit-post-header-toolbar { .edit-post-header-toolbar {
display: inline-flex; display: inline-flex;

File diff suppressed because one or more lines are too long

View File

@ -407,7 +407,6 @@
position: absolute; position: absolute;
-webkit-touch-callout: none; -webkit-touch-callout: none;
-webkit-user-select: none; -webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none; -ms-user-select: none;
user-select: none; user-select: none;
pointer-events: none; pointer-events: none;

File diff suppressed because one or more lines are too long

View File

@ -409,7 +409,6 @@
position: absolute; position: absolute;
-webkit-touch-callout: none; -webkit-touch-callout: none;
-webkit-user-select: none; -webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none; -ms-user-select: none;
user-select: none; user-select: none;
pointer-events: none; pointer-events: none;

File diff suppressed because one or more lines are too long

View File

@ -5317,6 +5317,13 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ }), /***/ }),
/***/ 26:
/***/ (function(module, exports) {
(function() { module.exports = this["wp"]["dom"]; }());
/***/ }),
/***/ 260: /***/ 260:
/***/ (function(module, exports) { /***/ (function(module, exports) {
@ -5636,13 +5643,6 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) {
}; };
/***/ }),
/***/ 27:
/***/ (function(module, exports) {
(function() { module.exports = this["wp"]["dom"]; }());
/***/ }), /***/ }),
/***/ 279: /***/ 279:
@ -13694,7 +13694,7 @@ function (_Component) {
var web_cjs = __webpack_require__(75); var web_cjs = __webpack_require__(75);
// EXTERNAL MODULE: external {"this":["wp","dom"]} // EXTERNAL MODULE: external {"this":["wp","dom"]}
var external_this_wp_dom_ = __webpack_require__(27); var external_this_wp_dom_ = __webpack_require__(26);
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/more-horizontal.js // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/more-horizontal.js
var more_horizontal = __webpack_require__(282); var more_horizontal = __webpack_require__(282);
@ -24017,19 +24017,19 @@ function (_Component) {
return null; return null;
}; };
var getMovementDirection = function getMovementDirection(moveDirection) { var getMovementDirectionLabel = function getMovementDirectionLabel(moveDirection) {
if (moveDirection === 'up') { if (moveDirection === 'up') {
if (orientation === 'horizontal') { if (orientation === 'horizontal') {
return isRTL ? 'right' : 'left'; return isRTL ? Object(external_this_wp_i18n_["__"])('Move right') : Object(external_this_wp_i18n_["__"])('Move left');
} }
return 'up'; return Object(external_this_wp_i18n_["__"])('Move up');
} else if (moveDirection === 'down') { } else if (moveDirection === 'down') {
if (orientation === 'horizontal') { if (orientation === 'horizontal') {
return isRTL ? 'left' : 'right'; return isRTL ? Object(external_this_wp_i18n_["__"])('Move left') : Object(external_this_wp_i18n_["__"])('Move right');
} }
return 'down'; return Object(external_this_wp_i18n_["__"])('Move down');
} }
return null; return null;
@ -24047,9 +24047,8 @@ function (_Component) {
}, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], { }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
className: "block-editor-block-mover__control", className: "block-editor-block-mover__control",
onClick: isFirst ? null : onMoveUp, onClick: isFirst ? null : onMoveUp,
icon: getArrowIcon('up') // translators: %s: Horizontal direction of block movement ( left, right ) icon: getArrowIcon('up'),
, label: getMovementDirectionLabel('up'),
label: Object(external_this_wp_i18n_["sprintf"])(Object(external_this_wp_i18n_["__"])('Move %s'), getMovementDirection('up')),
"aria-describedby": "block-editor-block-mover__up-description-".concat(instanceId), "aria-describedby": "block-editor-block-mover__up-description-".concat(instanceId),
"aria-disabled": isFirst, "aria-disabled": isFirst,
onFocus: this.onFocus, onFocus: this.onFocus,
@ -24073,9 +24072,8 @@ function (_Component) {
}), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], { }), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
className: "block-editor-block-mover__control", className: "block-editor-block-mover__control",
onClick: isLast ? null : onMoveDown, onClick: isLast ? null : onMoveDown,
icon: getArrowIcon('down') // translators: %s: Horizontal direction of block movement ( left, right ) icon: getArrowIcon('down'),
, label: getMovementDirectionLabel('down'),
label: Object(external_this_wp_i18n_["sprintf"])(Object(external_this_wp_i18n_["__"])('Move %s'), getMovementDirection('down')),
"aria-describedby": "block-editor-block-mover__down-description-".concat(instanceId), "aria-describedby": "block-editor-block-mover__down-description-".concat(instanceId),
"aria-disabled": isLast, "aria-disabled": isLast,
onFocus: this.onFocus, onFocus: this.onFocus,
@ -28026,13 +28024,55 @@ var transform_styles_transformStyles = function transformStyles(styles) {
/***/ 44: /***/ 44:
/***/ (function(module, exports, __webpack_require__) { /***/ (function(module, exports, __webpack_require__) {
module.exports = function memize( fn, options ) { /**
var size = 0, * Memize options object.
maxSize, head, tail; *
* @typedef MemizeOptions
*
* @property {number} [maxSize] Maximum size of the cache.
*/
if ( options && options.maxSize ) { /**
maxSize = options.maxSize; * Internal cache entry.
} *
* @typedef MemizeCacheNode
*
* @property {?MemizeCacheNode|undefined} [prev] Previous node.
* @property {?MemizeCacheNode|undefined} [next] Next node.
* @property {Array<*>} args Function arguments for cache
* entry.
* @property {*} val Function result.
*/
/**
* Properties of the enhanced function for controlling cache.
*
* @typedef MemizeMemoizedFunction
*
* @property {()=>void} clear Clear the cache.
*/
/**
* Accepts a function to be memoized, and returns a new memoized function, with
* optional options.
*
* @template {Function} F
*
* @param {F} fn Function to memoize.
* @param {MemizeOptions} [options] Options object.
*
* @return {F & MemizeMemoizedFunction} Memoized function.
*/
function memize( fn, options ) {
var size = 0;
/** @type {?MemizeCacheNode|undefined} */
var head;
/** @type {?MemizeCacheNode|undefined} */
var tail;
options = options || {};
function memoized( /* ...args */ ) { function memoized( /* ...args */ ) {
var node = head, var node = head,
@ -28072,14 +28112,14 @@ module.exports = function memize( fn, options ) {
// Adjust siblings to point to each other. If node was tail, // Adjust siblings to point to each other. If node was tail,
// this also handles new tail's empty `next` assignment. // this also handles new tail's empty `next` assignment.
node.prev.next = node.next; /** @type {MemizeCacheNode} */ ( node.prev ).next = node.next;
if ( node.next ) { if ( node.next ) {
node.next.prev = node.prev; node.next.prev = node.prev;
} }
node.next = head; node.next = head;
node.prev = null; node.prev = null;
head.prev = node; /** @type {MemizeCacheNode} */ ( head ).prev = node;
head = node; head = node;
} }
@ -28099,7 +28139,7 @@ module.exports = function memize( fn, options ) {
args: args, args: args,
// Generate the result from original function // Generate the result from original function
val: fn.apply( null, args ) val: fn.apply( null, args ),
}; };
// Don't need to check whether node is already head, since it would // Don't need to check whether node is already head, since it would
@ -28115,9 +28155,9 @@ module.exports = function memize( fn, options ) {
} }
// Trim tail if we're reached max size and are pending cache insertion // Trim tail if we're reached max size and are pending cache insertion
if ( size === maxSize ) { if ( size === /** @type {MemizeOptions} */ ( options ).maxSize ) {
tail = tail.prev; tail = /** @type {MemizeCacheNode} */ ( tail ).prev;
tail.next = null; /** @type {MemizeCacheNode} */ ( tail ).next = null;
} else { } else {
size++; size++;
} }
@ -28135,8 +28175,16 @@ module.exports = function memize( fn, options ) {
if ( false ) {} if ( false ) {}
// Ignore reason: There's not a clear solution to create an intersection of
// the function with additional properties, where the goal is to retain the
// function signature of the incoming argument and add control properties
// on the return value.
// @ts-ignore
return memoized; return memoized;
}; }
module.exports = memize;
/***/ }), /***/ }),

File diff suppressed because one or more lines are too long

View File

@ -14814,7 +14814,7 @@ function (_Component) {
imageFill = attributes.imageFill, imageFill = attributes.imageFill,
focalPoint = attributes.focalPoint; focalPoint = attributes.focalPoint;
return Object(external_this_wp_element_["createElement"])(media_container, Object(esm_extends["a" /* default */])({ return Object(external_this_wp_element_["createElement"])(media_container, Object(esm_extends["a" /* default */])({
className: "block-library-media-text__media-container", className: "wp-block-media-text__media",
onSelectMedia: this.onSelectMedia, onSelectMedia: this.onSelectMedia,
onWidthChange: this.onWidthChange, onWidthChange: this.onWidthChange,
commitWidthChange: this.commitWidthChange commitWidthChange: this.commitWidthChange
@ -15782,6 +15782,7 @@ function (_Component) {
var imageClasses = classnames_default()(Object(defineProperty["a" /* default */])({ var imageClasses = classnames_default()(Object(defineProperty["a" /* default */])({
'wp-block-latest-posts__featured-image': true 'wp-block-latest-posts__featured-image': true
}, "align".concat(featuredImageAlign), !!featuredImageAlign)); }, "align".concat(featuredImageAlign), !!featuredImageAlign));
var postExcerpt = excerptLength < excerpt.trim().split(' ').length && post.excerpt.raw === '' ? excerpt.trim().split(' ', excerptLength).join(' ') + ' ... <a href=' + post.link + 'target="_blank" rel="noopener noreferrer">' + Object(external_this_wp_i18n_["__"])('Read more') + '</a>' : excerpt;
return Object(external_this_wp_element_["createElement"])("li", { return Object(external_this_wp_element_["createElement"])("li", {
key: i key: i
}, displayFeaturedImage && Object(external_this_wp_element_["createElement"])("div", { }, displayFeaturedImage && Object(external_this_wp_element_["createElement"])("div", {
@ -15804,7 +15805,7 @@ function (_Component) {
className: "wp-block-latest-posts__post-excerpt" className: "wp-block-latest-posts__post-excerpt"
}, Object(external_this_wp_element_["createElement"])(external_this_wp_element_["RawHTML"], { }, Object(external_this_wp_element_["createElement"])(external_this_wp_element_["RawHTML"], {
key: "html" key: "html"
}, excerptLength < excerpt.trim().split(' ').length ? excerpt.trim().split(' ', excerptLength).join(' ') + ' ... <a href=' + post.link + 'target="_blank" rel="noopener noreferrer">' + Object(external_this_wp_i18n_["__"])('Read more') + '</a>' : excerpt.trim().split(' ', excerptLength).join(' '))), displayPostContent && displayPostContentRadio === 'full_post' && Object(external_this_wp_element_["createElement"])("div", { }, postExcerpt)), displayPostContent && displayPostContentRadio === 'full_post' && Object(external_this_wp_element_["createElement"])("div", {
className: "wp-block-latest-posts__post-full-content" className: "wp-block-latest-posts__post-full-content"
}, Object(external_this_wp_element_["createElement"])(external_this_wp_element_["RawHTML"], { }, Object(external_this_wp_element_["createElement"])(external_this_wp_element_["RawHTML"], {
key: "html" key: "html"
@ -23690,13 +23691,55 @@ var __experimentalRegisterExperimentalCoreBlocks = false ? undefined : undefine
/***/ 44: /***/ 44:
/***/ (function(module, exports, __webpack_require__) { /***/ (function(module, exports, __webpack_require__) {
module.exports = function memize( fn, options ) { /**
var size = 0, * Memize options object.
maxSize, head, tail; *
* @typedef MemizeOptions
*
* @property {number} [maxSize] Maximum size of the cache.
*/
if ( options && options.maxSize ) { /**
maxSize = options.maxSize; * Internal cache entry.
} *
* @typedef MemizeCacheNode
*
* @property {?MemizeCacheNode|undefined} [prev] Previous node.
* @property {?MemizeCacheNode|undefined} [next] Next node.
* @property {Array<*>} args Function arguments for cache
* entry.
* @property {*} val Function result.
*/
/**
* Properties of the enhanced function for controlling cache.
*
* @typedef MemizeMemoizedFunction
*
* @property {()=>void} clear Clear the cache.
*/
/**
* Accepts a function to be memoized, and returns a new memoized function, with
* optional options.
*
* @template {Function} F
*
* @param {F} fn Function to memoize.
* @param {MemizeOptions} [options] Options object.
*
* @return {F & MemizeMemoizedFunction} Memoized function.
*/
function memize( fn, options ) {
var size = 0;
/** @type {?MemizeCacheNode|undefined} */
var head;
/** @type {?MemizeCacheNode|undefined} */
var tail;
options = options || {};
function memoized( /* ...args */ ) { function memoized( /* ...args */ ) {
var node = head, var node = head,
@ -23736,14 +23779,14 @@ module.exports = function memize( fn, options ) {
// Adjust siblings to point to each other. If node was tail, // Adjust siblings to point to each other. If node was tail,
// this also handles new tail's empty `next` assignment. // this also handles new tail's empty `next` assignment.
node.prev.next = node.next; /** @type {MemizeCacheNode} */ ( node.prev ).next = node.next;
if ( node.next ) { if ( node.next ) {
node.next.prev = node.prev; node.next.prev = node.prev;
} }
node.next = head; node.next = head;
node.prev = null; node.prev = null;
head.prev = node; /** @type {MemizeCacheNode} */ ( head ).prev = node;
head = node; head = node;
} }
@ -23763,7 +23806,7 @@ module.exports = function memize( fn, options ) {
args: args, args: args,
// Generate the result from original function // Generate the result from original function
val: fn.apply( null, args ) val: fn.apply( null, args ),
}; };
// Don't need to check whether node is already head, since it would // Don't need to check whether node is already head, since it would
@ -23779,9 +23822,9 @@ module.exports = function memize( fn, options ) {
} }
// Trim tail if we're reached max size and are pending cache insertion // Trim tail if we're reached max size and are pending cache insertion
if ( size === maxSize ) { if ( size === /** @type {MemizeOptions} */ ( options ).maxSize ) {
tail = tail.prev; tail = /** @type {MemizeCacheNode} */ ( tail ).prev;
tail.next = null; /** @type {MemizeCacheNode} */ ( tail ).next = null;
} else { } else {
size++; size++;
} }
@ -23799,8 +23842,16 @@ module.exports = function memize( fn, options ) {
if ( false ) {} if ( false ) {}
// Ignore reason: There's not a clear solution to create an intersection of
// the function with additional properties, where the goal is to retain the
// function signature of the incoming argument and add control properties
// on the return value.
// @ts-ignore
return memoized; return memoized;
}; }
module.exports = memize;
/***/ }), /***/ }),

File diff suppressed because one or more lines are too long

View File

@ -333,6 +333,13 @@ function _slicedToArray(arr, i) {
/***/ }), /***/ }),
/***/ 26:
/***/ (function(module, exports) {
(function() { module.exports = this["wp"]["dom"]; }());
/***/ }),
/***/ 262: /***/ 262:
/***/ (function(module, exports) { /***/ (function(module, exports) {
@ -5482,13 +5489,6 @@ if (true) {
/***/ }),
/***/ 27:
/***/ (function(module, exports) {
(function() { module.exports = this["wp"]["dom"]; }());
/***/ }), /***/ }),
/***/ 30: /***/ 30:
@ -6658,7 +6658,7 @@ var tinycolor_default = /*#__PURE__*/__webpack_require__.n(tinycolor);
var external_this_wp_element_ = __webpack_require__(0); var external_this_wp_element_ = __webpack_require__(0);
// EXTERNAL MODULE: external {"this":["wp","dom"]} // EXTERNAL MODULE: external {"this":["wp","dom"]}
var external_this_wp_dom_ = __webpack_require__(27); var external_this_wp_dom_ = __webpack_require__(26);
// CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/utils.js // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/utils.js

File diff suppressed because one or more lines are too long

View File

@ -486,13 +486,13 @@ if (false) { var throwOnDirectAccess, ReactIs; } else {
/***/ }), /***/ }),
/* 26 */, /* 26 */
/* 27 */
/***/ (function(module, exports) { /***/ (function(module, exports) {
(function() { module.exports = this["wp"]["dom"]; }()); (function() { module.exports = this["wp"]["dom"]; }());
/***/ }), /***/ }),
/* 27 */,
/* 28 */, /* 28 */,
/* 29 */, /* 29 */,
/* 30 */ /* 30 */
@ -6707,7 +6707,7 @@ var classnames = __webpack_require__(11);
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
// EXTERNAL MODULE: external {"this":["wp","dom"]} // EXTERNAL MODULE: external {"this":["wp","dom"]}
var external_this_wp_dom_ = __webpack_require__(27); var external_this_wp_dom_ = __webpack_require__(26);
// EXTERNAL MODULE: external {"this":["wp","keycodes"]} // EXTERNAL MODULE: external {"this":["wp","keycodes"]}
var external_this_wp_keycodes_ = __webpack_require__(21); var external_this_wp_keycodes_ = __webpack_require__(21);
@ -9509,7 +9509,7 @@ process.umask = function() { return 0; };
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(21); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(21);
/* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_keycodes__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_keycodes__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var _wordpress_dom__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(27); /* harmony import */ var _wordpress_dom__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(26);
/* harmony import */ var _wordpress_dom__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_dom__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_dom__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_dom__WEBPACK_IMPORTED_MODULE_9__);
@ -24006,7 +24006,7 @@ function memoize(fn) {
// CONCATENATED MODULE: ./node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js // CONCATENATED MODULE: ./node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js
var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23 var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
var is_prop_valid_browser_esm_index = memoize_browser_esm(function (prop) { var is_prop_valid_browser_esm_index = memoize_browser_esm(function (prop) {
return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
@ -33122,7 +33122,7 @@ function DimensionControl(props) {
/* harmony default export */ var dimension_control = (DimensionControl); /* harmony default export */ var dimension_control = (DimensionControl);
// EXTERNAL MODULE: external {"this":["wp","dom"]} // EXTERNAL MODULE: external {"this":["wp","dom"]}
var external_this_wp_dom_ = __webpack_require__(27); var external_this_wp_dom_ = __webpack_require__(26);
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/disabled/index.js // CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/disabled/index.js

File diff suppressed because one or more lines are too long

View File

@ -3568,13 +3568,55 @@ var build_module_use = default_registry.use;
/***/ 44: /***/ 44:
/***/ (function(module, exports, __webpack_require__) { /***/ (function(module, exports, __webpack_require__) {
module.exports = function memize( fn, options ) { /**
var size = 0, * Memize options object.
maxSize, head, tail; *
* @typedef MemizeOptions
*
* @property {number} [maxSize] Maximum size of the cache.
*/
if ( options && options.maxSize ) { /**
maxSize = options.maxSize; * Internal cache entry.
} *
* @typedef MemizeCacheNode
*
* @property {?MemizeCacheNode|undefined} [prev] Previous node.
* @property {?MemizeCacheNode|undefined} [next] Next node.
* @property {Array<*>} args Function arguments for cache
* entry.
* @property {*} val Function result.
*/
/**
* Properties of the enhanced function for controlling cache.
*
* @typedef MemizeMemoizedFunction
*
* @property {()=>void} clear Clear the cache.
*/
/**
* Accepts a function to be memoized, and returns a new memoized function, with
* optional options.
*
* @template {Function} F
*
* @param {F} fn Function to memoize.
* @param {MemizeOptions} [options] Options object.
*
* @return {F & MemizeMemoizedFunction} Memoized function.
*/
function memize( fn, options ) {
var size = 0;
/** @type {?MemizeCacheNode|undefined} */
var head;
/** @type {?MemizeCacheNode|undefined} */
var tail;
options = options || {};
function memoized( /* ...args */ ) { function memoized( /* ...args */ ) {
var node = head, var node = head,
@ -3614,14 +3656,14 @@ module.exports = function memize( fn, options ) {
// Adjust siblings to point to each other. If node was tail, // Adjust siblings to point to each other. If node was tail,
// this also handles new tail's empty `next` assignment. // this also handles new tail's empty `next` assignment.
node.prev.next = node.next; /** @type {MemizeCacheNode} */ ( node.prev ).next = node.next;
if ( node.next ) { if ( node.next ) {
node.next.prev = node.prev; node.next.prev = node.prev;
} }
node.next = head; node.next = head;
node.prev = null; node.prev = null;
head.prev = node; /** @type {MemizeCacheNode} */ ( head ).prev = node;
head = node; head = node;
} }
@ -3641,7 +3683,7 @@ module.exports = function memize( fn, options ) {
args: args, args: args,
// Generate the result from original function // Generate the result from original function
val: fn.apply( null, args ) val: fn.apply( null, args ),
}; };
// Don't need to check whether node is already head, since it would // Don't need to check whether node is already head, since it would
@ -3657,9 +3699,9 @@ module.exports = function memize( fn, options ) {
} }
// Trim tail if we're reached max size and are pending cache insertion // Trim tail if we're reached max size and are pending cache insertion
if ( size === maxSize ) { if ( size === /** @type {MemizeOptions} */ ( options ).maxSize ) {
tail = tail.prev; tail = /** @type {MemizeCacheNode} */ ( tail ).prev;
tail.next = null; /** @type {MemizeCacheNode} */ ( tail ).next = null;
} else { } else {
size++; size++;
} }
@ -3677,8 +3719,16 @@ module.exports = function memize( fn, options ) {
if ( false ) {} if ( false ) {}
// Ignore reason: There's not a clear solution to create an intersection of
// the function with additional properties, where the goal is to retain the
// function signature of the incoming argument and add control properties
// on the return value.
// @ts-ignore
return memoized; return memoized;
}; }
module.exports = memize;
/***/ }), /***/ }),

File diff suppressed because one or more lines are too long

View File

@ -4106,21 +4106,6 @@ function (_Component) {
}; };
})(browser_url_BrowserURL)); })(browser_url_BrowserURL));
// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-left.js
/**
* WordPress dependencies
*/
var chevronLeft = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "-2 -2 24 24"
}, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
d: "M14 5l-5 5 5 5-1 2-7-7 7-7z"
}));
/* harmony default export */ var chevron_left = (chevronLeft);
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/fullscreen-mode-close/index.js // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/fullscreen-mode-close/index.js
@ -4137,27 +4122,17 @@ var chevronLeft = Object(external_this_wp_element_["createElement"])(external_th
var wordPressLogo = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
function FullscreenModeClose(_ref) { width: "28",
var isActive = _ref.isActive, height: "28",
postType = _ref.postType; viewBox: "0 0 128 128",
version: "1.1"
if (!isActive || !postType) { }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
return null; d: "M100 61.3c0-6.6-2.4-11.2-4.4-14.7-2.7-4.4-5.2-8.1-5.2-12.5 0-4.9 3.7-9.5 9-9.5h.7c-9.5-8.7-22.1-14-36-14-18.6 0-35 9.6-44.6 24 1.3 0 2.4.1 3.4.1 5.6 0 14.2-.7 14.2-.7 2.9-.2 3.2 4.1.3 4.4 0 0-2.9.3-6.1.5l19.4 57.8 11.7-35L54.1 39c-2.9-.2-5.6-.5-5.6-.5-2.9-.2-2.5-4.6.3-4.4 0 0 8.8.7 14 .7 5.6 0 14.2-.7 14.2-.7 2.9-.2 3.2 4.1.3 4.4 0 0-2.9.3-6.1.5l19.3 57.3L96 78.9c2.6-7.6 4-13 4-17.6zM10.7 64c0 21.1 12.3 39.4 30.1 48L15.3 42.3c-3 6.6-4.6 14-4.6 21.7zm54.2 4.7l-16 46.5c4.8 1.4 9.8 2.2 15.1 2.2 6.2 0 12.2-1.1 17.7-3-.1-.2-.3-.5-.4-.7l-16.4-45zM64 0C28.7 0 0 28.7 0 64s28.7 64 64 64 64-28.7 64-64S99.3 0 64 0zm49.9 97.6c-2.2 3.2-4.6 6.2-7.3 8.9s-5.7 5.2-8.9 7.3c-3.2 2.2-6.7 4-10.2 5.5-7.4 3.1-15.3 4.7-23.4 4.7s-16-1.6-23.4-4.7c-3.6-1.5-7-3.4-10.2-5.5-3.2-2.2-6.2-4.6-8.9-7.3s-5.2-5.7-7.3-8.9c-2.2-3.2-4-6.7-5.5-10.2-3.4-7.4-5-15.3-5-23.4s1.6-16 4.7-23.4c1.5-3.6 3.4-7 5.5-10.2 2.2-3.2 4.6-6.2 7.3-8.9s5.7-5.2 8.9-7.3c3.2-2.2 6.7-4 10.2-5.5C48 5.4 55.9 3.8 64 3.8s16 1.6 23.4 4.7c3.6 1.5 7 3.4 10.2 5.5 3.2 2.2 6.2 4.6 8.9 7.3s5.2 5.7 7.3 8.9c2.2 3.2 4 6.7 5.5 10.2 3.1 7.4 4.7 15.3 4.7 23.4s-1.6 16-4.7 23.4c-1.4 3.8-3.2 7.2-5.4 10.4zm-2.7-53.7c0 5.4-1 11.5-4.1 19.1l-16.3 47.1c15.9-9.2 26.5-26.4 26.5-46.1 0-9.3-2.4-18-6.5-25.6.2 1.7.4 3.5.4 5.5z"
}
return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Toolbar"], {
className: "edit-post-fullscreen-mode-close__toolbar"
}, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
icon: chevron_left,
href: Object(external_this_wp_url_["addQueryArgs"])('edit.php', {
post_type: postType.slug
}),
label: Object(external_this_lodash_["get"])(postType, ['labels', 'view_items'], Object(external_this_wp_i18n_["__"])('Back'))
})); }));
}
/* harmony default export */ var fullscreen_mode_close = (Object(external_this_wp_data_["withSelect"])(function (select) { function FullscreenModeClose() {
var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
var _select = select('core/editor'), var _select = select('core/editor'),
getCurrentPostType = _select.getCurrentPostType; getCurrentPostType = _select.getCurrentPostType;
@ -4171,7 +4146,26 @@ function FullscreenModeClose(_ref) {
isActive: isFeatureActive('fullscreenMode'), isActive: isFeatureActive('fullscreenMode'),
postType: getPostType(getCurrentPostType()) postType: getPostType(getCurrentPostType())
}; };
})(FullscreenModeClose)); }, []),
isActive = _useSelect.isActive,
postType = _useSelect.postType;
if (!isActive || !postType) {
return null;
}
return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
className: "edit-post-fullscreen-mode-close",
icon: wordPressLogo,
iconSize: 36,
href: Object(external_this_wp_url_["addQueryArgs"])('edit.php', {
post_type: postType.slug
}),
label: Object(external_this_lodash_["get"])(postType, ['labels', 'view_items'], Object(external_this_wp_i18n_["__"])('Back'))
});
}
/* harmony default export */ var fullscreen_mode_close = (FullscreenModeClose);
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/header-toolbar/index.js // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/header-toolbar/index.js
@ -4673,9 +4667,9 @@ function Header() {
}; };
return Object(external_this_wp_element_["createElement"])("div", { return Object(external_this_wp_element_["createElement"])("div", {
className: "edit-post-header" className: "edit-post-header"
}, Object(external_this_wp_element_["createElement"])("div", { }, Object(external_this_wp_element_["createElement"])(fullscreen_mode_close, null), Object(external_this_wp_element_["createElement"])("div", {
className: "edit-post-header__toolbar" className: "edit-post-header__toolbar"
}, Object(external_this_wp_element_["createElement"])(fullscreen_mode_close, null), Object(external_this_wp_element_["createElement"])(header_toolbar, null)), Object(external_this_wp_element_["createElement"])("div", { }, Object(external_this_wp_element_["createElement"])(header_toolbar, null)), Object(external_this_wp_element_["createElement"])("div", {
className: "edit-post-header__settings" className: "edit-post-header__settings"
}, !isPublishSidebarOpened && // This button isn't completely hidden by the publish sidebar. }, !isPublishSidebarOpened && // This button isn't completely hidden by the publish sidebar.
// We can't hide the whole toolbar when the publish sidebar is open because // We can't hide the whole toolbar when the publish sidebar is open because
@ -7394,13 +7388,55 @@ function initializeEditor(id, postType, postId, settings, initialEdits) {
/***/ 44: /***/ 44:
/***/ (function(module, exports, __webpack_require__) { /***/ (function(module, exports, __webpack_require__) {
module.exports = function memize( fn, options ) { /**
var size = 0, * Memize options object.
maxSize, head, tail; *
* @typedef MemizeOptions
*
* @property {number} [maxSize] Maximum size of the cache.
*/
if ( options && options.maxSize ) { /**
maxSize = options.maxSize; * Internal cache entry.
} *
* @typedef MemizeCacheNode
*
* @property {?MemizeCacheNode|undefined} [prev] Previous node.
* @property {?MemizeCacheNode|undefined} [next] Next node.
* @property {Array<*>} args Function arguments for cache
* entry.
* @property {*} val Function result.
*/
/**
* Properties of the enhanced function for controlling cache.
*
* @typedef MemizeMemoizedFunction
*
* @property {()=>void} clear Clear the cache.
*/
/**
* Accepts a function to be memoized, and returns a new memoized function, with
* optional options.
*
* @template {Function} F
*
* @param {F} fn Function to memoize.
* @param {MemizeOptions} [options] Options object.
*
* @return {F & MemizeMemoizedFunction} Memoized function.
*/
function memize( fn, options ) {
var size = 0;
/** @type {?MemizeCacheNode|undefined} */
var head;
/** @type {?MemizeCacheNode|undefined} */
var tail;
options = options || {};
function memoized( /* ...args */ ) { function memoized( /* ...args */ ) {
var node = head, var node = head,
@ -7440,14 +7476,14 @@ module.exports = function memize( fn, options ) {
// Adjust siblings to point to each other. If node was tail, // Adjust siblings to point to each other. If node was tail,
// this also handles new tail's empty `next` assignment. // this also handles new tail's empty `next` assignment.
node.prev.next = node.next; /** @type {MemizeCacheNode} */ ( node.prev ).next = node.next;
if ( node.next ) { if ( node.next ) {
node.next.prev = node.prev; node.next.prev = node.prev;
} }
node.next = head; node.next = head;
node.prev = null; node.prev = null;
head.prev = node; /** @type {MemizeCacheNode} */ ( head ).prev = node;
head = node; head = node;
} }
@ -7467,7 +7503,7 @@ module.exports = function memize( fn, options ) {
args: args, args: args,
// Generate the result from original function // Generate the result from original function
val: fn.apply( null, args ) val: fn.apply( null, args ),
}; };
// Don't need to check whether node is already head, since it would // Don't need to check whether node is already head, since it would
@ -7483,9 +7519,9 @@ module.exports = function memize( fn, options ) {
} }
// Trim tail if we're reached max size and are pending cache insertion // Trim tail if we're reached max size and are pending cache insertion
if ( size === maxSize ) { if ( size === /** @type {MemizeOptions} */ ( options ).maxSize ) {
tail = tail.prev; tail = /** @type {MemizeCacheNode} */ ( tail ).prev;
tail.next = null; /** @type {MemizeCacheNode} */ ( tail ).next = null;
} else { } else {
size++; size++;
} }
@ -7503,8 +7539,16 @@ module.exports = function memize( fn, options ) {
if ( false ) {} if ( false ) {}
// Ignore reason: There's not a clear solution to create an intersection of
// the function with additional properties, where the goal is to retain the
// function signature of the incoming argument and add control properties
// on the return value.
// @ts-ignore
return memoized; return memoized;
}; }
module.exports = memize;
/***/ }), /***/ }),

File diff suppressed because one or more lines are too long

View File

@ -14113,13 +14113,55 @@ Object(external_this_wp_hooks_["addFilter"])('editor.Autocomplete.completers', '
/***/ 44: /***/ 44:
/***/ (function(module, exports, __webpack_require__) { /***/ (function(module, exports, __webpack_require__) {
module.exports = function memize( fn, options ) { /**
var size = 0, * Memize options object.
maxSize, head, tail; *
* @typedef MemizeOptions
*
* @property {number} [maxSize] Maximum size of the cache.
*/
if ( options && options.maxSize ) { /**
maxSize = options.maxSize; * Internal cache entry.
} *
* @typedef MemizeCacheNode
*
* @property {?MemizeCacheNode|undefined} [prev] Previous node.
* @property {?MemizeCacheNode|undefined} [next] Next node.
* @property {Array<*>} args Function arguments for cache
* entry.
* @property {*} val Function result.
*/
/**
* Properties of the enhanced function for controlling cache.
*
* @typedef MemizeMemoizedFunction
*
* @property {()=>void} clear Clear the cache.
*/
/**
* Accepts a function to be memoized, and returns a new memoized function, with
* optional options.
*
* @template {Function} F
*
* @param {F} fn Function to memoize.
* @param {MemizeOptions} [options] Options object.
*
* @return {F & MemizeMemoizedFunction} Memoized function.
*/
function memize( fn, options ) {
var size = 0;
/** @type {?MemizeCacheNode|undefined} */
var head;
/** @type {?MemizeCacheNode|undefined} */
var tail;
options = options || {};
function memoized( /* ...args */ ) { function memoized( /* ...args */ ) {
var node = head, var node = head,
@ -14159,14 +14201,14 @@ module.exports = function memize( fn, options ) {
// Adjust siblings to point to each other. If node was tail, // Adjust siblings to point to each other. If node was tail,
// this also handles new tail's empty `next` assignment. // this also handles new tail's empty `next` assignment.
node.prev.next = node.next; /** @type {MemizeCacheNode} */ ( node.prev ).next = node.next;
if ( node.next ) { if ( node.next ) {
node.next.prev = node.prev; node.next.prev = node.prev;
} }
node.next = head; node.next = head;
node.prev = null; node.prev = null;
head.prev = node; /** @type {MemizeCacheNode} */ ( head ).prev = node;
head = node; head = node;
} }
@ -14186,7 +14228,7 @@ module.exports = function memize( fn, options ) {
args: args, args: args,
// Generate the result from original function // Generate the result from original function
val: fn.apply( null, args ) val: fn.apply( null, args ),
}; };
// Don't need to check whether node is already head, since it would // Don't need to check whether node is already head, since it would
@ -14202,9 +14244,9 @@ module.exports = function memize( fn, options ) {
} }
// Trim tail if we're reached max size and are pending cache insertion // Trim tail if we're reached max size and are pending cache insertion
if ( size === maxSize ) { if ( size === /** @type {MemizeOptions} */ ( options ).maxSize ) {
tail = tail.prev; tail = /** @type {MemizeCacheNode} */ ( tail ).prev;
tail.next = null; /** @type {MemizeCacheNode} */ ( tail ).next = null;
} else { } else {
size++; size++;
} }
@ -14222,8 +14264,16 @@ module.exports = function memize( fn, options ) {
if ( false ) {} if ( false ) {}
// Ignore reason: There's not a clear solution to create an intersection of
// the function with additional properties, where the goal is to retain the
// function signature of the incoming argument and add control properties
// on the return value.
// @ts-ignore
return memoized; return memoized;
}; }
module.exports = memize;
/***/ }), /***/ }),

File diff suppressed because one or more lines are too long

View File

@ -380,7 +380,7 @@ function _slicedToArray(arr, i) {
/***/ }), /***/ }),
/***/ 27: /***/ 26:
/***/ (function(module, exports) { /***/ (function(module, exports) {
(function() { module.exports = this["wp"]["dom"]; }()); (function() { module.exports = this["wp"]["dom"]; }());
@ -1568,7 +1568,7 @@ var external_this_wp_data_ = __webpack_require__(4);
var esm_extends = __webpack_require__(12); var esm_extends = __webpack_require__(12);
// EXTERNAL MODULE: external {"this":["wp","dom"]} // EXTERNAL MODULE: external {"this":["wp","dom"]}
var external_this_wp_dom_ = __webpack_require__(27); var external_this_wp_dom_ = __webpack_require__(26);
// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/text-color/inline.js // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/text-color/inline.js
@ -1611,11 +1611,12 @@ function getActiveColor(formatName, formatValue, colors) {
} }
var inline_ColorPopoverAtLink = function ColorPopoverAtLink(_ref) { var inline_ColorPopoverAtLink = function ColorPopoverAtLink(_ref) {
var isActive = _ref.isActive, var addingColor = _ref.addingColor,
addingColor = _ref.addingColor, props = Object(objectWithoutProperties["a" /* default */])(_ref, ["addingColor"]);
value = _ref.value,
props = Object(objectWithoutProperties["a" /* default */])(_ref, ["isActive", "addingColor", "value"]);
// There is no way to open a text formatter popover when another one is mounted.
// The first popover will always be dismounted when a click outside happens, so we can store the
// anchor Rect during the lifetime of the component.
var anchorRect = Object(external_this_wp_element_["useMemo"])(function () { var anchorRect = Object(external_this_wp_element_["useMemo"])(function () {
var selection = window.getSelection(); var selection = window.getSelection();
var range = selection.rangeCount > 0 ? selection.getRangeAt(0) : null; var range = selection.rangeCount > 0 ? selection.getRangeAt(0) : null;
@ -1641,7 +1642,7 @@ var inline_ColorPopoverAtLink = function ColorPopoverAtLink(_ref) {
if (closest) { if (closest) {
return closest.getBoundingClientRect(); return closest.getBoundingClientRect();
} }
}, [isActive, addingColor, value.start, value.end]); }, []);
if (!anchorRect) { if (!anchorRect) {
return null; return null;

File diff suppressed because one or more lines are too long

View File

@ -329,13 +329,55 @@ var __WEBPACK_AMD_DEFINE_RESULT__;/* global window, exports, define */
/***/ 44: /***/ 44:
/***/ (function(module, exports, __webpack_require__) { /***/ (function(module, exports, __webpack_require__) {
module.exports = function memize( fn, options ) { /**
var size = 0, * Memize options object.
maxSize, head, tail; *
* @typedef MemizeOptions
*
* @property {number} [maxSize] Maximum size of the cache.
*/
if ( options && options.maxSize ) { /**
maxSize = options.maxSize; * Internal cache entry.
} *
* @typedef MemizeCacheNode
*
* @property {?MemizeCacheNode|undefined} [prev] Previous node.
* @property {?MemizeCacheNode|undefined} [next] Next node.
* @property {Array<*>} args Function arguments for cache
* entry.
* @property {*} val Function result.
*/
/**
* Properties of the enhanced function for controlling cache.
*
* @typedef MemizeMemoizedFunction
*
* @property {()=>void} clear Clear the cache.
*/
/**
* Accepts a function to be memoized, and returns a new memoized function, with
* optional options.
*
* @template {Function} F
*
* @param {F} fn Function to memoize.
* @param {MemizeOptions} [options] Options object.
*
* @return {F & MemizeMemoizedFunction} Memoized function.
*/
function memize( fn, options ) {
var size = 0;
/** @type {?MemizeCacheNode|undefined} */
var head;
/** @type {?MemizeCacheNode|undefined} */
var tail;
options = options || {};
function memoized( /* ...args */ ) { function memoized( /* ...args */ ) {
var node = head, var node = head,
@ -375,14 +417,14 @@ module.exports = function memize( fn, options ) {
// Adjust siblings to point to each other. If node was tail, // Adjust siblings to point to each other. If node was tail,
// this also handles new tail's empty `next` assignment. // this also handles new tail's empty `next` assignment.
node.prev.next = node.next; /** @type {MemizeCacheNode} */ ( node.prev ).next = node.next;
if ( node.next ) { if ( node.next ) {
node.next.prev = node.prev; node.next.prev = node.prev;
} }
node.next = head; node.next = head;
node.prev = null; node.prev = null;
head.prev = node; /** @type {MemizeCacheNode} */ ( head ).prev = node;
head = node; head = node;
} }
@ -402,7 +444,7 @@ module.exports = function memize( fn, options ) {
args: args, args: args,
// Generate the result from original function // Generate the result from original function
val: fn.apply( null, args ) val: fn.apply( null, args ),
}; };
// Don't need to check whether node is already head, since it would // Don't need to check whether node is already head, since it would
@ -418,9 +460,9 @@ module.exports = function memize( fn, options ) {
} }
// Trim tail if we're reached max size and are pending cache insertion // Trim tail if we're reached max size and are pending cache insertion
if ( size === maxSize ) { if ( size === /** @type {MemizeOptions} */ ( options ).maxSize ) {
tail = tail.prev; tail = /** @type {MemizeCacheNode} */ ( tail ).prev;
tail.next = null; /** @type {MemizeCacheNode} */ ( tail ).next = null;
} else { } else {
size++; size++;
} }
@ -438,8 +480,16 @@ module.exports = function memize( fn, options ) {
if ( false ) {} if ( false ) {}
// Ignore reason: There's not a clear solution to create an intersection of
// the function with additional properties, where the goal is to retain the
// function signature of the incoming argument and add control properties
// on the return value.
// @ts-ignore
return memoized; return memoized;
}; }
module.exports = memize;
/***/ }), /***/ }),
@ -712,7 +762,7 @@ function evaluate_evaluate( postfix, variables ) {
* *
* @param {string} expression C expression. * @param {string} expression C expression.
* *
* @return {Function} Compiled evaluator. * @return {(variables?:{[variable:string]:*})=>*} Compiled evaluator.
*/ */
function compile( expression ) { function compile( expression ) {
var terms = postfix( expression ); var terms = postfix( expression );
@ -769,13 +819,7 @@ function pluralForms( expression ) {
* Domain translation pair respectively representing the singular and plural * Domain translation pair respectively representing the singular and plural
* translation. * translation.
* *
* @typedef {Array<string,string>} TanninTranslation * @typedef {[string,string]} TanninTranslation
*/
/**
* Locale domain entry.
*
* @typedef {(TanninDomainMetadata|TanninTranslation)} LocaleDomainEntry
*/ */
/** /**
@ -783,7 +827,7 @@ function pluralForms( expression ) {
* array of two string entries respectively representing the singular and plural * array of two string entries respectively representing the singular and plural
* translation. * translation.
* *
* @typedef {Object<string,LocaleDomainEntry>} TanninLocaleDomain * @typedef {{[key:string]:TanninDomainMetadata|TanninTranslation,'':TanninDomainMetadata|TanninTranslation}} TanninLocaleDomain
*/ */
/** /**
@ -791,7 +835,7 @@ function pluralForms( expression ) {
* *
* @see http://messageformat.github.io/Jed/ * @see http://messageformat.github.io/Jed/
* *
* @typedef {Object<string,TanninLocaleDomain>} TanninLocaleData * @typedef {{[domain:string]:TanninLocaleDomain}} TanninLocaleData
*/ */
/** /**
@ -867,9 +911,9 @@ function Tannin( data, options ) {
this.options = {}; this.options = {};
for ( key in DEFAULT_OPTIONS ) { for ( key in DEFAULT_OPTIONS ) {
this.options[ key ] = options !== undefined && key in options ? this.options[ key ] = options !== undefined && key in options
options[ key ] : ? options[ key ]
DEFAULT_OPTIONS[ key ]; : DEFAULT_OPTIONS[ key ];
} }
} }
@ -920,10 +964,11 @@ Tannin.prototype.getPluralForm = function( domain, n ) {
* Translate a string. * Translate a string.
* *
* @param {string} domain Translation domain. * @param {string} domain Translation domain.
* @param {string} context Context distinguishing terms of the same name. * @param {string|void} context Context distinguishing terms of the same name.
* @param {string} singular Primary key for translation lookup. * @param {string} singular Primary key for translation lookup.
* @param {string} plural Fallback value used for non-zero plural form index. * @param {string=} plural Fallback value used for non-zero plural
* @param {number} n Value to use in calculating plural form. * form index.
* @param {number=} n Value to use in calculating plural form.
* *
* @return {string} Translated string. * @return {string} Translated string.
*/ */

File diff suppressed because one or more lines are too long

View File

@ -466,13 +466,55 @@ Object(lodash__WEBPACK_IMPORTED_MODULE_0__["extend"])(shortcode.prototype, {
/***/ 44: /***/ 44:
/***/ (function(module, exports, __webpack_require__) { /***/ (function(module, exports, __webpack_require__) {
module.exports = function memize( fn, options ) { /**
var size = 0, * Memize options object.
maxSize, head, tail; *
* @typedef MemizeOptions
*
* @property {number} [maxSize] Maximum size of the cache.
*/
if ( options && options.maxSize ) { /**
maxSize = options.maxSize; * Internal cache entry.
} *
* @typedef MemizeCacheNode
*
* @property {?MemizeCacheNode|undefined} [prev] Previous node.
* @property {?MemizeCacheNode|undefined} [next] Next node.
* @property {Array<*>} args Function arguments for cache
* entry.
* @property {*} val Function result.
*/
/**
* Properties of the enhanced function for controlling cache.
*
* @typedef MemizeMemoizedFunction
*
* @property {()=>void} clear Clear the cache.
*/
/**
* Accepts a function to be memoized, and returns a new memoized function, with
* optional options.
*
* @template {Function} F
*
* @param {F} fn Function to memoize.
* @param {MemizeOptions} [options] Options object.
*
* @return {F & MemizeMemoizedFunction} Memoized function.
*/
function memize( fn, options ) {
var size = 0;
/** @type {?MemizeCacheNode|undefined} */
var head;
/** @type {?MemizeCacheNode|undefined} */
var tail;
options = options || {};
function memoized( /* ...args */ ) { function memoized( /* ...args */ ) {
var node = head, var node = head,
@ -512,14 +554,14 @@ module.exports = function memize( fn, options ) {
// Adjust siblings to point to each other. If node was tail, // Adjust siblings to point to each other. If node was tail,
// this also handles new tail's empty `next` assignment. // this also handles new tail's empty `next` assignment.
node.prev.next = node.next; /** @type {MemizeCacheNode} */ ( node.prev ).next = node.next;
if ( node.next ) { if ( node.next ) {
node.next.prev = node.prev; node.next.prev = node.prev;
} }
node.next = head; node.next = head;
node.prev = null; node.prev = null;
head.prev = node; /** @type {MemizeCacheNode} */ ( head ).prev = node;
head = node; head = node;
} }
@ -539,7 +581,7 @@ module.exports = function memize( fn, options ) {
args: args, args: args,
// Generate the result from original function // Generate the result from original function
val: fn.apply( null, args ) val: fn.apply( null, args ),
}; };
// Don't need to check whether node is already head, since it would // Don't need to check whether node is already head, since it would
@ -555,9 +597,9 @@ module.exports = function memize( fn, options ) {
} }
// Trim tail if we're reached max size and are pending cache insertion // Trim tail if we're reached max size and are pending cache insertion
if ( size === maxSize ) { if ( size === /** @type {MemizeOptions} */ ( options ).maxSize ) {
tail = tail.prev; tail = /** @type {MemizeCacheNode} */ ( tail ).prev;
tail.next = null; /** @type {MemizeCacheNode} */ ( tail ).next = null;
} else { } else {
size++; size++;
} }
@ -575,8 +617,16 @@ module.exports = function memize( fn, options ) {
if ( false ) {} if ( false ) {}
// Ignore reason: There's not a clear solution to create an intersection of
// the function with additional properties, where the goal is to retain the
// function signature of the incoming argument and add control properties
// on the return value.
// @ts-ignore
return memoized; return memoized;
}; }
module.exports = memize;
/***/ }) /***/ })

View File

@ -1,2 +1,2 @@
/*! This file is auto-generated */ /*! This file is auto-generated */
this.wp=this.wp||{},this.wp.shortcode=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=413)}({2:function(t,e){!function(){t.exports=this.lodash}()},413:function(t,e,n){"use strict";n.r(e),n.d(e,"next",(function(){return u})),n.d(e,"replace",(function(){return o})),n.d(e,"string",(function(){return c})),n.d(e,"regexp",(function(){return s})),n.d(e,"attrs",(function(){return a})),n.d(e,"fromMatch",(function(){return f}));var r=n(2),i=n(44);function u(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=s(t);r.lastIndex=n;var i=r.exec(e);if(i){if("["===i[1]&&"]"===i[7])return u(t,e,r.lastIndex);var o={index:i.index,content:i[0],shortcode:f(i)};return i[1]&&(o.content=o.content.slice(1),o.index++),i[7]&&(o.content=o.content.slice(0,-1)),o}}function o(t,e,n){return e.replace(s(t),(function(t,e,r,i,u,o,c,s){if("["===e&&"]"===s)return t;var a=n(f(arguments));return a?e+a+s:t}))}function c(t){return new l(t).string()}function s(t){return new RegExp("\\[(\\[?)("+t+")(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)","g")}var a=n.n(i)()((function(t){var e,n={},r=[],i=/([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*'([^']*)'(?:\s|$)|([\w-]+)\s*=\s*([^\s'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|'([^']*)'(?:\s|$)|(\S+)(?:\s|$)/g;for(t=t.replace(/[\u00a0\u200b]/g," ");e=i.exec(t);)e[1]?n[e[1].toLowerCase()]=e[2]:e[3]?n[e[3].toLowerCase()]=e[4]:e[5]?n[e[5].toLowerCase()]=e[6]:e[7]?r.push(e[7]):e[8]?r.push(e[8]):e[9]&&r.push(e[9]);return{named:n,numeric:r}}));function f(t){var e;return e=t[4]?"self-closing":t[6]?"closed":"single",new l({tag:t[2],attrs:t[3],type:e,content:t[5]})}var l=Object(r.extend)((function(t){var e=this;Object(r.extend)(this,Object(r.pick)(t||{},"tag","attrs","type","content"));var n=this.attrs;this.attrs={named:{},numeric:[]},n&&(Object(r.isString)(n)?this.attrs=a(n):Object(r.isEqual)(Object.keys(n),["named","numeric"])?this.attrs=n:Object(r.forEach)(n,(function(t,n){e.set(n,t)})))}),{next:u,replace:o,string:c,regexp:s,attrs:a,fromMatch:f});Object(r.extend)(l.prototype,{get:function(t){return this.attrs[Object(r.isNumber)(t)?"numeric":"named"][t]},set:function(t,e){return this.attrs[Object(r.isNumber)(t)?"numeric":"named"][t]=e,this},string:function(){var t="["+this.tag;return Object(r.forEach)(this.attrs.numeric,(function(e){/\s/.test(e)?t+=' "'+e+'"':t+=" "+e})),Object(r.forEach)(this.attrs.named,(function(e,n){t+=" "+n+'="'+e+'"'})),"single"===this.type?t+"]":"self-closing"===this.type?t+" /]":(t+="]",this.content&&(t+=this.content),t+"[/"+this.tag+"]")}}),e.default=l},44:function(t,e,n){t.exports=function(t,e){var n,r,i,u=0;function o(){var e,o,c=r,s=arguments.length;t:for(;c;){if(c.args.length===arguments.length){for(o=0;o<s;o++)if(c.args[o]!==arguments[o]){c=c.next;continue t}return c!==r&&(c===i&&(i=c.prev),c.prev.next=c.next,c.next&&(c.next.prev=c.prev),c.next=r,c.prev=null,r.prev=c,r=c),c.val}c=c.next}for(e=new Array(s),o=0;o<s;o++)e[o]=arguments[o];return c={args:e,val:t.apply(null,e)},r?(r.prev=c,c.next=r):i=c,u===n?(i=i.prev).next=null:u++,r=c,c.val}return e&&e.maxSize&&(n=e.maxSize),o.clear=function(){r=null,i=null,u=0},o}}}).default; this.wp=this.wp||{},this.wp.shortcode=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=413)}({2:function(t,e){!function(){t.exports=this.lodash}()},413:function(t,e,n){"use strict";n.r(e),n.d(e,"next",(function(){return u})),n.d(e,"replace",(function(){return o})),n.d(e,"string",(function(){return c})),n.d(e,"regexp",(function(){return s})),n.d(e,"attrs",(function(){return a})),n.d(e,"fromMatch",(function(){return f}));var r=n(2),i=n(44);function u(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=s(t);r.lastIndex=n;var i=r.exec(e);if(i){if("["===i[1]&&"]"===i[7])return u(t,e,r.lastIndex);var o={index:i.index,content:i[0],shortcode:f(i)};return i[1]&&(o.content=o.content.slice(1),o.index++),i[7]&&(o.content=o.content.slice(0,-1)),o}}function o(t,e,n){return e.replace(s(t),(function(t,e,r,i,u,o,c,s){if("["===e&&"]"===s)return t;var a=n(f(arguments));return a?e+a+s:t}))}function c(t){return new l(t).string()}function s(t){return new RegExp("\\[(\\[?)("+t+")(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)","g")}var a=n.n(i)()((function(t){var e,n={},r=[],i=/([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*'([^']*)'(?:\s|$)|([\w-]+)\s*=\s*([^\s'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|'([^']*)'(?:\s|$)|(\S+)(?:\s|$)/g;for(t=t.replace(/[\u00a0\u200b]/g," ");e=i.exec(t);)e[1]?n[e[1].toLowerCase()]=e[2]:e[3]?n[e[3].toLowerCase()]=e[4]:e[5]?n[e[5].toLowerCase()]=e[6]:e[7]?r.push(e[7]):e[8]?r.push(e[8]):e[9]&&r.push(e[9]);return{named:n,numeric:r}}));function f(t){var e;return e=t[4]?"self-closing":t[6]?"closed":"single",new l({tag:t[2],attrs:t[3],type:e,content:t[5]})}var l=Object(r.extend)((function(t){var e=this;Object(r.extend)(this,Object(r.pick)(t||{},"tag","attrs","type","content"));var n=this.attrs;this.attrs={named:{},numeric:[]},n&&(Object(r.isString)(n)?this.attrs=a(n):Object(r.isEqual)(Object.keys(n),["named","numeric"])?this.attrs=n:Object(r.forEach)(n,(function(t,n){e.set(n,t)})))}),{next:u,replace:o,string:c,regexp:s,attrs:a,fromMatch:f});Object(r.extend)(l.prototype,{get:function(t){return this.attrs[Object(r.isNumber)(t)?"numeric":"named"][t]},set:function(t,e){return this.attrs[Object(r.isNumber)(t)?"numeric":"named"][t]=e,this},string:function(){var t="["+this.tag;return Object(r.forEach)(this.attrs.numeric,(function(e){/\s/.test(e)?t+=' "'+e+'"':t+=" "+e})),Object(r.forEach)(this.attrs.named,(function(e,n){t+=" "+n+'="'+e+'"'})),"single"===this.type?t+"]":"self-closing"===this.type?t+" /]":(t+="]",this.content&&(t+=this.content),t+"[/"+this.tag+"]")}}),e.default=l},44:function(t,e,n){t.exports=function(t,e){var n,r,i=0;function u(){var u,o,c=n,s=arguments.length;t:for(;c;){if(c.args.length===arguments.length){for(o=0;o<s;o++)if(c.args[o]!==arguments[o]){c=c.next;continue t}return c!==n&&(c===r&&(r=c.prev),c.prev.next=c.next,c.next&&(c.next.prev=c.prev),c.next=n,c.prev=null,n.prev=c,n=c),c.val}c=c.next}for(u=new Array(s),o=0;o<s;o++)u[o]=arguments[o];return c={args:u,val:t.apply(null,u)},n?(n.prev=c,c.next=n):r=c,i===e.maxSize?(r=r.prev).next=null:i++,n=c,c.val}return e=e||{},u.clear=function(){n=null,r=null,i=0},u}}}).default;

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.4-RC1-47440'; $wp_version = '5.4-RC1-47442';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.