Edit File by line
/home/barbar84/www/wp-inclu.../js/dist
File: blocks.js
/**
[1000] Fix | Delete
* WordPress dependencies
[1001] Fix | Delete
*/
[1002] Fix | Delete
[1003] Fix | Delete
/**
[1004] Fix | Delete
* Internal dependencies
[1005] Fix | Delete
*/
[1006] Fix | Delete
[1007] Fix | Delete
[1008] Fix | Delete
[1009] Fix | Delete
[1010] Fix | Delete
[1011] Fix | Delete
/**
[1012] Fix | Delete
* Store definition for the blocks namespace.
[1013] Fix | Delete
*
[1014] Fix | Delete
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
[1015] Fix | Delete
*
[1016] Fix | Delete
* @type {Object}
[1017] Fix | Delete
*/
[1018] Fix | Delete
[1019] Fix | Delete
var store = Object(external_wp_data_["createReduxStore"])(STORE_NAME, {
[1020] Fix | Delete
reducer: reducer,
[1021] Fix | Delete
selectors: selectors_namespaceObject,
[1022] Fix | Delete
actions: actions_namespaceObject
[1023] Fix | Delete
});
[1024] Fix | Delete
Object(external_wp_data_["register"])(store);
[1025] Fix | Delete
[1026] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
[1027] Fix | Delete
var slicedToArray = __webpack_require__("ODXe");
[1028] Fix | Delete
[1029] Fix | Delete
// EXTERNAL MODULE: ./node_modules/uuid/dist/esm-browser/v4.js + 4 modules
[1030] Fix | Delete
var v4 = __webpack_require__("7Cbv");
[1031] Fix | Delete
[1032] Fix | Delete
// EXTERNAL MODULE: external ["wp","hooks"]
[1033] Fix | Delete
var external_wp_hooks_ = __webpack_require__("g56x");
[1034] Fix | Delete
[1035] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/block-default.js
[1036] Fix | Delete
var block_default = __webpack_require__("//Lo");
[1037] Fix | Delete
[1038] Fix | Delete
// EXTERNAL MODULE: ./node_modules/tinycolor2/tinycolor.js
[1039] Fix | Delete
var tinycolor = __webpack_require__("Zss7");
[1040] Fix | Delete
var tinycolor_default = /*#__PURE__*/__webpack_require__.n(tinycolor);
[1041] Fix | Delete
[1042] Fix | Delete
// EXTERNAL MODULE: external ["wp","element"]
[1043] Fix | Delete
var external_wp_element_ = __webpack_require__("GRId");
[1044] Fix | Delete
[1045] Fix | Delete
// EXTERNAL MODULE: external ["wp","dom"]
[1046] Fix | Delete
var external_wp_dom_ = __webpack_require__("1CF3");
[1047] Fix | Delete
[1048] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/utils.js
[1049] Fix | Delete
[1050] Fix | Delete
[1051] Fix | Delete
function utils_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
[1052] Fix | Delete
[1053] Fix | Delete
function utils_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { utils_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { utils_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
[1054] Fix | Delete
[1055] Fix | Delete
/**
[1056] Fix | Delete
* External dependencies
[1057] Fix | Delete
*/
[1058] Fix | Delete
[1059] Fix | Delete
[1060] Fix | Delete
/**
[1061] Fix | Delete
* WordPress dependencies
[1062] Fix | Delete
*/
[1063] Fix | Delete
[1064] Fix | Delete
[1065] Fix | Delete
[1066] Fix | Delete
[1067] Fix | Delete
[1068] Fix | Delete
/**
[1069] Fix | Delete
* Internal dependencies
[1070] Fix | Delete
*/
[1071] Fix | Delete
[1072] Fix | Delete
[1073] Fix | Delete
[1074] Fix | Delete
/**
[1075] Fix | Delete
* Array of icon colors containing a color to be used if the icon color
[1076] Fix | Delete
* was not explicitly set but the icon background color was.
[1077] Fix | Delete
*
[1078] Fix | Delete
* @type {Object}
[1079] Fix | Delete
*/
[1080] Fix | Delete
[1081] Fix | Delete
var ICON_COLORS = ['#191e23', '#f8f9f9'];
[1082] Fix | Delete
/**
[1083] Fix | Delete
* Determines whether the block is a default block
[1084] Fix | Delete
* and its attributes are equal to the default attributes
[1085] Fix | Delete
* which means the block is unmodified.
[1086] Fix | Delete
*
[1087] Fix | Delete
* @param {WPBlock} block Block Object
[1088] Fix | Delete
*
[1089] Fix | Delete
* @return {boolean} Whether the block is an unmodified default block
[1090] Fix | Delete
*/
[1091] Fix | Delete
[1092] Fix | Delete
function isUnmodifiedDefaultBlock(block) {
[1093] Fix | Delete
var defaultBlockName = registration_getDefaultBlockName();
[1094] Fix | Delete
[1095] Fix | Delete
if (block.name !== defaultBlockName) {
[1096] Fix | Delete
return false;
[1097] Fix | Delete
} // Cache a created default block if no cache exists or the default block
[1098] Fix | Delete
// name changed.
[1099] Fix | Delete
[1100] Fix | Delete
[1101] Fix | Delete
if (!isUnmodifiedDefaultBlock.block || isUnmodifiedDefaultBlock.block.name !== defaultBlockName) {
[1102] Fix | Delete
isUnmodifiedDefaultBlock.block = createBlock(defaultBlockName);
[1103] Fix | Delete
}
[1104] Fix | Delete
[1105] Fix | Delete
var newDefaultBlock = isUnmodifiedDefaultBlock.block;
[1106] Fix | Delete
var blockType = registration_getBlockType(defaultBlockName);
[1107] Fix | Delete
return Object(external_lodash_["every"])(blockType.attributes, function (value, key) {
[1108] Fix | Delete
return newDefaultBlock.attributes[key] === block.attributes[key];
[1109] Fix | Delete
});
[1110] Fix | Delete
}
[1111] Fix | Delete
/**
[1112] Fix | Delete
* Function that checks if the parameter is a valid icon.
[1113] Fix | Delete
*
[1114] Fix | Delete
* @param {*} icon Parameter to be checked.
[1115] Fix | Delete
*
[1116] Fix | Delete
* @return {boolean} True if the parameter is a valid icon and false otherwise.
[1117] Fix | Delete
*/
[1118] Fix | Delete
[1119] Fix | Delete
function isValidIcon(icon) {
[1120] Fix | Delete
return !!icon && (Object(external_lodash_["isString"])(icon) || Object(external_wp_element_["isValidElement"])(icon) || Object(external_lodash_["isFunction"])(icon) || icon instanceof external_wp_element_["Component"]);
[1121] Fix | Delete
}
[1122] Fix | Delete
/**
[1123] Fix | Delete
* Function that receives an icon as set by the blocks during the registration
[1124] Fix | Delete
* and returns a new icon object that is normalized so we can rely on just on possible icon structure
[1125] Fix | Delete
* in the codebase.
[1126] Fix | Delete
*
[1127] Fix | Delete
* @param {WPBlockTypeIconRender} icon Render behavior of a block type icon;
[1128] Fix | Delete
* one of a Dashicon slug, an element, or a
[1129] Fix | Delete
* component.
[1130] Fix | Delete
*
[1131] Fix | Delete
* @return {WPBlockTypeIconDescriptor} Object describing the icon.
[1132] Fix | Delete
*/
[1133] Fix | Delete
[1134] Fix | Delete
function normalizeIconObject(icon) {
[1135] Fix | Delete
if (isValidIcon(icon)) {
[1136] Fix | Delete
return {
[1137] Fix | Delete
src: icon
[1138] Fix | Delete
};
[1139] Fix | Delete
}
[1140] Fix | Delete
[1141] Fix | Delete
if (Object(external_lodash_["has"])(icon, ['background'])) {
[1142] Fix | Delete
var tinyBgColor = tinycolor_default()(icon.background);
[1143] Fix | Delete
return utils_objectSpread(utils_objectSpread({}, icon), {}, {
[1144] Fix | Delete
foreground: icon.foreground ? icon.foreground : Object(tinycolor["mostReadable"])(tinyBgColor, ICON_COLORS, {
[1145] Fix | Delete
includeFallbackColors: true,
[1146] Fix | Delete
level: 'AA',
[1147] Fix | Delete
size: 'large'
[1148] Fix | Delete
}).toHexString(),
[1149] Fix | Delete
shadowColor: tinyBgColor.setAlpha(0.3).toRgbString()
[1150] Fix | Delete
});
[1151] Fix | Delete
}
[1152] Fix | Delete
[1153] Fix | Delete
return icon;
[1154] Fix | Delete
}
[1155] Fix | Delete
/**
[1156] Fix | Delete
* Normalizes block type passed as param. When string is passed then
[1157] Fix | Delete
* it converts it to the matching block type object.
[1158] Fix | Delete
* It passes the original object otherwise.
[1159] Fix | Delete
*
[1160] Fix | Delete
* @param {string|Object} blockTypeOrName Block type or name.
[1161] Fix | Delete
*
[1162] Fix | Delete
* @return {?Object} Block type.
[1163] Fix | Delete
*/
[1164] Fix | Delete
[1165] Fix | Delete
function normalizeBlockType(blockTypeOrName) {
[1166] Fix | Delete
if (Object(external_lodash_["isString"])(blockTypeOrName)) {
[1167] Fix | Delete
return registration_getBlockType(blockTypeOrName);
[1168] Fix | Delete
}
[1169] Fix | Delete
[1170] Fix | Delete
return blockTypeOrName;
[1171] Fix | Delete
}
[1172] Fix | Delete
/**
[1173] Fix | Delete
* Get the label for the block, usually this is either the block title,
[1174] Fix | Delete
* or the value of the block's `label` function when that's specified.
[1175] Fix | Delete
*
[1176] Fix | Delete
* @param {Object} blockType The block type.
[1177] Fix | Delete
* @param {Object} attributes The values of the block's attributes.
[1178] Fix | Delete
* @param {Object} context The intended use for the label.
[1179] Fix | Delete
*
[1180] Fix | Delete
* @return {string} The block label.
[1181] Fix | Delete
*/
[1182] Fix | Delete
[1183] Fix | Delete
function getBlockLabel(blockType, attributes) {
[1184] Fix | Delete
var context = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'visual';
[1185] Fix | Delete
[1186] Fix | Delete
// Attempt to find entity title if block is a template part.
[1187] Fix | Delete
// Require slug to request, otherwise entity is uncreated and will throw 404.
[1188] Fix | Delete
if ('core/template-part' === blockType.name && attributes.slug) {
[1189] Fix | Delete
var entity = Object(external_wp_data_["select"])('core').getEntityRecord('postType', 'wp_template_part', attributes.theme + '//' + attributes.slug);
[1190] Fix | Delete
[1191] Fix | Delete
if (entity) {
[1192] Fix | Delete
var _entity$title;
[1193] Fix | Delete
[1194] Fix | Delete
return Object(external_lodash_["startCase"])(((_entity$title = entity.title) === null || _entity$title === void 0 ? void 0 : _entity$title.rendered) || entity.slug);
[1195] Fix | Delete
}
[1196] Fix | Delete
}
[1197] Fix | Delete
[1198] Fix | Delete
var getLabel = blockType.__experimentalLabel,
[1199] Fix | Delete
title = blockType.title;
[1200] Fix | Delete
var label = getLabel && getLabel(attributes, {
[1201] Fix | Delete
context: context
[1202] Fix | Delete
});
[1203] Fix | Delete
[1204] Fix | Delete
if (!label) {
[1205] Fix | Delete
return title;
[1206] Fix | Delete
} // Strip any HTML (i.e. RichText formatting) before returning.
[1207] Fix | Delete
[1208] Fix | Delete
[1209] Fix | Delete
return Object(external_wp_dom_["__unstableStripHTML"])(label);
[1210] Fix | Delete
}
[1211] Fix | Delete
/**
[1212] Fix | Delete
* Get a label for the block for use by screenreaders, this is more descriptive
[1213] Fix | Delete
* than the visual label and includes the block title and the value of the
[1214] Fix | Delete
* `getLabel` function if it's specified.
[1215] Fix | Delete
*
[1216] Fix | Delete
* @param {Object} blockType The block type.
[1217] Fix | Delete
* @param {Object} attributes The values of the block's attributes.
[1218] Fix | Delete
* @param {?number} position The position of the block in the block list.
[1219] Fix | Delete
* @param {string} [direction='vertical'] The direction of the block layout.
[1220] Fix | Delete
*
[1221] Fix | Delete
* @return {string} The block label.
[1222] Fix | Delete
*/
[1223] Fix | Delete
[1224] Fix | Delete
function getAccessibleBlockLabel(blockType, attributes, position) {
[1225] Fix | Delete
var direction = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'vertical';
[1226] Fix | Delete
// `title` is already localized, `label` is a user-supplied value.
[1227] Fix | Delete
var title = blockType.title;
[1228] Fix | Delete
var label = getBlockLabel(blockType, attributes, 'accessibility');
[1229] Fix | Delete
var hasPosition = position !== undefined; // getBlockLabel returns the block title as a fallback when there's no label,
[1230] Fix | Delete
// if it did return the title, this function needs to avoid adding the
[1231] Fix | Delete
// title twice within the accessible label. Use this `hasLabel` boolean to
[1232] Fix | Delete
// handle that.
[1233] Fix | Delete
[1234] Fix | Delete
var hasLabel = label && label !== title;
[1235] Fix | Delete
[1236] Fix | Delete
if (hasPosition && direction === 'vertical') {
[1237] Fix | Delete
if (hasLabel) {
[1238] Fix | Delete
return Object(external_wp_i18n_["sprintf"])(
[1239] Fix | Delete
/* translators: accessibility text. 1: The block title. 2: The block row number. 3: The block label.. */
[1240] Fix | Delete
Object(external_wp_i18n_["__"])('%1$s Block. Row %2$d. %3$s'), title, position, label);
[1241] Fix | Delete
}
[1242] Fix | Delete
[1243] Fix | Delete
return Object(external_wp_i18n_["sprintf"])(
[1244] Fix | Delete
/* translators: accessibility text. 1: The block title. 2: The block row number. */
[1245] Fix | Delete
Object(external_wp_i18n_["__"])('%1$s Block. Row %2$d'), title, position);
[1246] Fix | Delete
} else if (hasPosition && direction === 'horizontal') {
[1247] Fix | Delete
if (hasLabel) {
[1248] Fix | Delete
return Object(external_wp_i18n_["sprintf"])(
[1249] Fix | Delete
/* translators: accessibility text. 1: The block title. 2: The block column number. 3: The block label.. */
[1250] Fix | Delete
Object(external_wp_i18n_["__"])('%1$s Block. Column %2$d. %3$s'), title, position, label);
[1251] Fix | Delete
}
[1252] Fix | Delete
[1253] Fix | Delete
return Object(external_wp_i18n_["sprintf"])(
[1254] Fix | Delete
/* translators: accessibility text. 1: The block title. 2: The block column number. */
[1255] Fix | Delete
Object(external_wp_i18n_["__"])('%1$s Block. Column %2$d'), title, position);
[1256] Fix | Delete
}
[1257] Fix | Delete
[1258] Fix | Delete
if (hasLabel) {
[1259] Fix | Delete
return Object(external_wp_i18n_["sprintf"])(
[1260] Fix | Delete
/* translators: accessibility text. %1: The block title. %2: The block label. */
[1261] Fix | Delete
Object(external_wp_i18n_["__"])('%1$s Block. %2$s'), title, label);
[1262] Fix | Delete
}
[1263] Fix | Delete
[1264] Fix | Delete
return Object(external_wp_i18n_["sprintf"])(
[1265] Fix | Delete
/* translators: accessibility text. %s: The block title. */
[1266] Fix | Delete
Object(external_wp_i18n_["__"])('%s Block'), title);
[1267] Fix | Delete
}
[1268] Fix | Delete
/**
[1269] Fix | Delete
* Ensure attributes contains only values defined by block type, and merge
[1270] Fix | Delete
* default values for missing attributes.
[1271] Fix | Delete
*
[1272] Fix | Delete
* @param {string} name The block's name.
[1273] Fix | Delete
* @param {Object} attributes The block's attributes.
[1274] Fix | Delete
* @return {Object} The sanitized attributes.
[1275] Fix | Delete
*/
[1276] Fix | Delete
[1277] Fix | Delete
function sanitizeBlockAttributes(name, attributes) {
[1278] Fix | Delete
// Get the type definition associated with a registered block.
[1279] Fix | Delete
var blockType = registration_getBlockType(name);
[1280] Fix | Delete
[1281] Fix | Delete
if (undefined === blockType) {
[1282] Fix | Delete
throw new Error("Block type '".concat(name, "' is not registered."));
[1283] Fix | Delete
}
[1284] Fix | Delete
[1285] Fix | Delete
return Object(external_lodash_["reduce"])(blockType.attributes, function (accumulator, schema, key) {
[1286] Fix | Delete
var value = attributes[key];
[1287] Fix | Delete
[1288] Fix | Delete
if (undefined !== value) {
[1289] Fix | Delete
accumulator[key] = value;
[1290] Fix | Delete
} else if (schema.hasOwnProperty('default')) {
[1291] Fix | Delete
accumulator[key] = schema.default;
[1292] Fix | Delete
}
[1293] Fix | Delete
[1294] Fix | Delete
if (['node', 'children'].indexOf(schema.source) !== -1) {
[1295] Fix | Delete
// Ensure value passed is always an array, which we're expecting in
[1296] Fix | Delete
// the RichText component to handle the deprecated value.
[1297] Fix | Delete
if (typeof accumulator[key] === 'string') {
[1298] Fix | Delete
accumulator[key] = [accumulator[key]];
[1299] Fix | Delete
} else if (!Array.isArray(accumulator[key])) {
[1300] Fix | Delete
accumulator[key] = [];
[1301] Fix | Delete
}
[1302] Fix | Delete
}
[1303] Fix | Delete
[1304] Fix | Delete
return accumulator;
[1305] Fix | Delete
}, {});
[1306] Fix | Delete
}
[1307] Fix | Delete
[1308] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/constants.js
[1309] Fix | Delete
/**
[1310] Fix | Delete
* Array of valid keys in a block type settings deprecation object.
[1311] Fix | Delete
*
[1312] Fix | Delete
* @type {string[]}
[1313] Fix | Delete
*/
[1314] Fix | Delete
var DEPRECATED_ENTRY_KEYS = ['attributes', 'supports', 'save', 'migrate', 'isEligible', 'apiVersion'];
[1315] Fix | Delete
var __EXPERIMENTAL_STYLE_PROPERTY = {
[1316] Fix | Delete
'--wp--style--color--link': {
[1317] Fix | Delete
value: ['color', 'link'],
[1318] Fix | Delete
support: ['color', 'link']
[1319] Fix | Delete
},
[1320] Fix | Delete
background: {
[1321] Fix | Delete
value: ['color', 'gradient'],
[1322] Fix | Delete
support: ['color', 'gradients']
[1323] Fix | Delete
},
[1324] Fix | Delete
backgroundColor: {
[1325] Fix | Delete
value: ['color', 'background'],
[1326] Fix | Delete
support: ['color']
[1327] Fix | Delete
},
[1328] Fix | Delete
borderRadius: {
[1329] Fix | Delete
value: ['border', 'radius'],
[1330] Fix | Delete
support: ['__experimentalBorder', 'radius']
[1331] Fix | Delete
},
[1332] Fix | Delete
color: {
[1333] Fix | Delete
value: ['color', 'text'],
[1334] Fix | Delete
support: ['color']
[1335] Fix | Delete
},
[1336] Fix | Delete
fontFamily: {
[1337] Fix | Delete
value: ['typography', 'fontFamily'],
[1338] Fix | Delete
support: ['__experimentalFontFamily']
[1339] Fix | Delete
},
[1340] Fix | Delete
fontSize: {
[1341] Fix | Delete
value: ['typography', 'fontSize'],
[1342] Fix | Delete
support: ['fontSize']
[1343] Fix | Delete
},
[1344] Fix | Delete
fontStyle: {
[1345] Fix | Delete
value: ['typography', 'fontStyle'],
[1346] Fix | Delete
support: ['__experimentalFontStyle']
[1347] Fix | Delete
},
[1348] Fix | Delete
fontWeight: {
[1349] Fix | Delete
value: ['typography', 'fontWeight'],
[1350] Fix | Delete
support: ['__experimentalFontWeight']
[1351] Fix | Delete
},
[1352] Fix | Delete
lineHeight: {
[1353] Fix | Delete
value: ['typography', 'lineHeight'],
[1354] Fix | Delete
support: ['lineHeight']
[1355] Fix | Delete
},
[1356] Fix | Delete
padding: {
[1357] Fix | Delete
value: ['spacing', 'padding'],
[1358] Fix | Delete
support: ['spacing', 'padding'],
[1359] Fix | Delete
properties: ['top', 'right', 'bottom', 'left']
[1360] Fix | Delete
},
[1361] Fix | Delete
textDecoration: {
[1362] Fix | Delete
value: ['typography', 'textDecoration'],
[1363] Fix | Delete
support: ['__experimentalTextDecoration']
[1364] Fix | Delete
},
[1365] Fix | Delete
textTransform: {
[1366] Fix | Delete
value: ['typography', 'textTransform'],
[1367] Fix | Delete
support: ['__experimentalTextTransform']
[1368] Fix | Delete
}
[1369] Fix | Delete
};
[1370] Fix | Delete
[1371] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/registration.js
[1372] Fix | Delete
[1373] Fix | Delete
[1374] Fix | Delete
function registration_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
[1375] Fix | Delete
[1376] Fix | Delete
function registration_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { registration_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { registration_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
[1377] Fix | Delete
[1378] Fix | Delete
/* eslint no-console: [ 'error', { allow: [ 'error', 'warn' ] } ] */
[1379] Fix | Delete
[1380] Fix | Delete
/**
[1381] Fix | Delete
* External dependencies
[1382] Fix | Delete
*/
[1383] Fix | Delete
[1384] Fix | Delete
/**
[1385] Fix | Delete
* WordPress dependencies
[1386] Fix | Delete
*/
[1387] Fix | Delete
[1388] Fix | Delete
[1389] Fix | Delete
[1390] Fix | Delete
[1391] Fix | Delete
/**
[1392] Fix | Delete
* Internal dependencies
[1393] Fix | Delete
*/
[1394] Fix | Delete
[1395] Fix | Delete
[1396] Fix | Delete
[1397] Fix | Delete
[1398] Fix | Delete
/**
[1399] Fix | Delete
* An icon type definition. One of a Dashicon slug, an element,
[1400] Fix | Delete
* or a component.
[1401] Fix | Delete
*
[1402] Fix | Delete
* @typedef {(string|WPElement|WPComponent)} WPIcon
[1403] Fix | Delete
*
[1404] Fix | Delete
* @see https://developer.wordpress.org/resource/dashicons/
[1405] Fix | Delete
*/
[1406] Fix | Delete
[1407] Fix | Delete
/**
[1408] Fix | Delete
* Render behavior of a block type icon; one of a Dashicon slug, an element,
[1409] Fix | Delete
* or a component.
[1410] Fix | Delete
*
[1411] Fix | Delete
* @typedef {WPIcon} WPBlockTypeIconRender
[1412] Fix | Delete
*/
[1413] Fix | Delete
[1414] Fix | Delete
/**
[1415] Fix | Delete
* An object describing a normalized block type icon.
[1416] Fix | Delete
*
[1417] Fix | Delete
* @typedef {Object} WPBlockTypeIconDescriptor
[1418] Fix | Delete
*
[1419] Fix | Delete
* @property {WPBlockTypeIconRender} src Render behavior of the icon,
[1420] Fix | Delete
* one of a Dashicon slug, an
[1421] Fix | Delete
* element, or a component.
[1422] Fix | Delete
* @property {string} background Optimal background hex string
[1423] Fix | Delete
* color when displaying icon.
[1424] Fix | Delete
* @property {string} foreground Optimal foreground hex string
[1425] Fix | Delete
* color when displaying icon.
[1426] Fix | Delete
* @property {string} shadowColor Optimal shadow hex string
[1427] Fix | Delete
* color when displaying icon.
[1428] Fix | Delete
*/
[1429] Fix | Delete
[1430] Fix | Delete
/**
[1431] Fix | Delete
* Value to use to render the icon for a block type in an editor interface,
[1432] Fix | Delete
* either a Dashicon slug, an element, a component, or an object describing
[1433] Fix | Delete
* the icon.
[1434] Fix | Delete
*
[1435] Fix | Delete
* @typedef {(WPBlockTypeIconDescriptor|WPBlockTypeIconRender)} WPBlockTypeIcon
[1436] Fix | Delete
*/
[1437] Fix | Delete
[1438] Fix | Delete
/**
[1439] Fix | Delete
* Named block variation scopes.
[1440] Fix | Delete
*
[1441] Fix | Delete
* @typedef {'block'|'inserter'|'transform'} WPBlockVariationScope
[1442] Fix | Delete
*/
[1443] Fix | Delete
[1444] Fix | Delete
/**
[1445] Fix | Delete
* An object describing a variation defined for the block type.
[1446] Fix | Delete
*
[1447] Fix | Delete
* @typedef {Object} WPBlockVariation
[1448] Fix | Delete
*
[1449] Fix | Delete
* @property {string} name The unique and machine-readable name.
[1450] Fix | Delete
* @property {string} title A human-readable variation title.
[1451] Fix | Delete
* @property {string} [description] A detailed variation description.
[1452] Fix | Delete
* @property {string} [category] Block type category classification,
[1453] Fix | Delete
* used in search interfaces to arrange
[1454] Fix | Delete
* block types by category.
[1455] Fix | Delete
* @property {WPIcon} [icon] An icon helping to visualize the variation.
[1456] Fix | Delete
* @property {boolean} [isDefault] Indicates whether the current variation is
[1457] Fix | Delete
* the default one. Defaults to `false`.
[1458] Fix | Delete
* @property {Object} [attributes] Values which override block attributes.
[1459] Fix | Delete
* @property {Array[]} [innerBlocks] Initial configuration of nested blocks.
[1460] Fix | Delete
* @property {Object} [example] Example provides structured data for
[1461] Fix | Delete
* the block preview. You can set to
[1462] Fix | Delete
* `undefined` to disable the preview shown
[1463] Fix | Delete
* for the block type.
[1464] Fix | Delete
* @property {WPBlockVariationScope[]} [scope] The list of scopes where the variation
[1465] Fix | Delete
* is applicable. When not provided, it
[1466] Fix | Delete
* assumes all available scopes.
[1467] Fix | Delete
* @property {string[]} [keywords] An array of terms (which can be translated)
[1468] Fix | Delete
* that help users discover the variation
[1469] Fix | Delete
* while searching.
[1470] Fix | Delete
* @property {Function} [isActive] A function that accepts a block's attributes
[1471] Fix | Delete
* and the variation's attributes and determines
[1472] Fix | Delete
* if a variation is active. This function doesn't
[1473] Fix | Delete
* try to find a match dynamically based on all
[1474] Fix | Delete
* block's attributes, as in many cases some
[1475] Fix | Delete
* attributes are irrelevant. An example would
[1476] Fix | Delete
* be for `embed` block where we only care about
[1477] Fix | Delete
* `providerNameSlug` attribute's value.
[1478] Fix | Delete
*/
[1479] Fix | Delete
[1480] Fix | Delete
/**
[1481] Fix | Delete
* Defined behavior of a block type.
[1482] Fix | Delete
*
[1483] Fix | Delete
* @typedef {Object} WPBlock
[1484] Fix | Delete
*
[1485] Fix | Delete
* @property {string} name Block type's namespaced name.
[1486] Fix | Delete
* @property {string} title Human-readable block type label.
[1487] Fix | Delete
* @property {string} [description] A detailed block type description.
[1488] Fix | Delete
* @property {string} [category] Block type category classification,
[1489] Fix | Delete
* used in search interfaces to arrange
[1490] Fix | Delete
* block types by category.
[1491] Fix | Delete
* @property {WPBlockTypeIcon} [icon] Block type icon.
[1492] Fix | Delete
* @property {string[]} [keywords] Additional keywords to produce block
[1493] Fix | Delete
* type as result in search interfaces.
[1494] Fix | Delete
* @property {Object} [attributes] Block type attributes.
[1495] Fix | Delete
* @property {WPComponent} [save] Optional component describing
[1496] Fix | Delete
* serialized markup structure of a
[1497] Fix | Delete
* block type.
[1498] Fix | Delete
* @property {WPComponent} edit Component rendering an element to
[1499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function