[ Index ] |
PHP Cross Reference of WordPress |
[Source view] [Print] [Project Stats]
(no description)
File Size: | 38617 lines (1393 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
__webpack_require__(moduleId) X-Ref |
No description |
getDefault() X-Ref |
No description |
getModuleExports() X-Ref |
No description |
classNames() X-Ref |
No description |
_iterableToArrayLimit(arr, i) X-Ref |
No description |
_slicedToArray(arr, i) X-Ref |
No description |
_interopDefault(ex) X-Ref |
No description |
merge(target, lowercase) X-Ref |
No description |
useForceUpdate() X-Ref |
No description |
withDefault(value, defaultValue) X-Ref |
No description |
toArray(a) X-Ref |
No description |
callProp(obj) X-Ref |
No description |
getForwardProps(props) X-Ref |
No description |
interpolateTo(props) X-Ref |
No description |
handleRef(ref, forward) X-Ref |
No description |
Animated() X-Ref |
No description |
AnimatedArray() X-Ref |
No description |
AnimatedObject() X-Ref |
No description |
injectApplyAnimatedValues(fn, transform) X-Ref |
No description |
injectColorNames(names) X-Ref |
No description |
injectFrame(raf, caf) X-Ref |
No description |
injectStringInterpolator(fn) X-Ref |
No description |
injectNow(nowFn) X-Ref |
No description |
injectDefaultElement(el) X-Ref |
No description |
injectAnimatedApi(fn) X-Ref |
No description |
injectCreateAnimatedStyle(factory) X-Ref |
No description |
injectManualFrameloop(callback) X-Ref |
No description |
AnimatedProps(props, callback) X-Ref |
No description |
createInterpolator(range, output, extrapolate) X-Ref |
No description |
interpolate(input, inputMin, inputMax, outputMin, outputMax, easing, extrapolateLeft, extrapolateRight, map) X-Ref |
No description |
findRange(input, inputRange) X-Ref |
No description |
AnimatedInterpolation(parents, range, output, extrapolate) X-Ref |
No description |
useChain(refs, timeSteps, timeFrame) X-Ref |
No description |
addAnimatedStyles(node, styles) X-Ref |
Animated works by building a directed acyclic graph of dependencies transparently when you render your Animated components. new Animated.Value(0) .interpolate() .interpolate() new Animated.Value(1) opacity translateY scale style transform View#234 style View#123 A) Top Down phase When an AnimatedValue is updated, we recursively go down through this graph in order to find leaf nodes: the views that we flag as needing an update. B) Bottom Up phase When a view is flagged as needing an update, we recursively go back up in order to build the new value that it needs. The reason why we need this two-phases process is to deal with composite props such as transform which can receive values from multiple parents. |
AnimatedValue(_value) X-Ref |
No description |
AnimatedValueArray(values) X-Ref |
No description |
Controller() X-Ref |
No description |
useTransition(input, keyTransform, config) X-Ref |
No description |
cleanUp(state, filterKey) X-Ref |
No description |
diffItems(_ref9, props) X-Ref |
No description |
AnimatedStyle(style) X-Ref |
No description |
call() X-Ref |
No description |
normalizeColor(color) X-Ref |
No description |
hue2rgb(p, q, t) X-Ref |
No description |
hslToRgb(h, s, l) X-Ref |
No description |
parse255(str) X-Ref |
No description |
parse360(str) X-Ref |
No description |
parse1(str) X-Ref |
No description |
parsePercentage(str) X-Ref |
No description |
colorToRgba(input) X-Ref |
No description |
dangerousStyleValue(name, value, isCustomProperty) X-Ref |
No description |
_objectWithoutProperties(source, excluded) X-Ref |
No description |
ownKeys(object, enumerableOnly) X-Ref |
No description |
_objectSpread(target) X-Ref |
No description |
Icon(_ref) X-Ref |
Return an SVG icon. return: {JSX.Element} Icon component param: {IconProps} props icon is the SVG component to render |
emptyFunction() X-Ref |
No description |
emptyFunctionWithReset() X-Ref |
No description |
shim(props, propName, componentName, location, propFullName, secret) X-Ref |
No description |
getShim() X-Ref |
No description |
_arrayWithoutHoles(arr) X-Ref |
No description |
_nonIterableSpread() X-Ref |
No description |
_toConsumableArray(arr) X-Ref |
No description |
_inheritsLoose(subClass, superClass) X-Ref |
No description |
_assertThisInitialized(self) X-Ref |
No description |
_extends() X-Ref |
No description |
_objectWithoutPropertiesLoose(source, excluded) X-Ref |
No description |
_assertThisInitialized(self) X-Ref |
No description |
__() X-Ref |
No description |
TextareaAutosizeClass() X-Ref |
A light replacement for built-in textarea component which automaticaly adjusts its height to match the content |
assign(ta) X-Ref |
No description |
init() X-Ref |
No description |
changeOverflow(value) X-Ref |
No description |
getParentOverflows(el) X-Ref |
No description |
resize() X-Ref |
No description |
update() X-Ref |
No description |
destroy(ta) X-Ref |
No description |
update(ta) X-Ref |
No description |
lineHeight(node) X-Ref |
Calculate the `line-height` of a given node returns: {Number} `line-height` of the element in pixels param: {HTMLElement} node Element to calculate line height of. Must be in the DOM. |
_getPrototypeOf(o) X-Ref |
No description |
scrollIntoView(elem, container, config) X-Ref |
No description |
getClientPosition(elem) X-Ref |
No description |
getScroll(w, top) X-Ref |
No description |
getScrollLeft(w) X-Ref |
No description |
getScrollTop(w) X-Ref |
No description |
getOffset(el) X-Ref |
No description |
_getComputedStyle(elem, name, computedStyle_) X-Ref |
No description |
_getComputedStyleIE(elem, name) X-Ref |
No description |
each(arr, fn) X-Ref |
No description |
isBorderBoxFn(elem) X-Ref |
No description |
swap(elem, options, callback) X-Ref |
No description |
getPBMWidth(elem, props, which) X-Ref |
No description |
isWindow(obj) X-Ref |
A crude way of determining if an object is a window |
getWH(elem, name, extra) X-Ref |
No description |
getWHIgnoreDisplay(elem) X-Ref |
No description |
css(el, name, v) X-Ref |
No description |
setOffset(elem, offset) X-Ref |
No description |
_arrayLikeToArray(arr, len) X-Ref |
No description |
_classCallCheck(instance, Constructor) X-Ref |
No description |
_defineProperties(target, props) X-Ref |
No description |
_createClass(Constructor, protoProps, staticProps) X-Ref |
No description |
_interopRequireDefault(obj) X-Ref |
No description |
diffChars(oldStr, newStr, options) X-Ref |
No description |
_inherits(subClass, superClass) X-Ref |
No description |
matchQuery(mediaQuery, values) X-Ref |
No description |
parseQuery(mediaQuery) X-Ref |
No description |
toDecimal(ratio) X-Ref |
No description |
toDpi(resolution) X-Ref |
No description |
toPx(length) X-Ref |
No description |
Traverse(obj) X-Ref |
No description |
walk(root, cb, immutable) X-Ref |
No description |
updateState() X-Ref |
No description |
copy(src) X-Ref |
No description |
toS(obj) X-Ref |
No description |
isDate(obj) X-Ref |
No description |
isRegExp(obj) X-Ref |
No description |
isError(obj) X-Ref |
No description |
isBoolean(obj) X-Ref |
No description |
isNumber(obj) X-Ref |
No description |
isString(obj) X-Ref |
No description |
_possibleConstructorReturn(self, call) X-Ref |
No description |
_unsupportedIterableToArray(o, minLen) X-Ref |
No description |
Diff() X-Ref |
No description |
done(value) X-Ref |
No description |
execEditLength() X-Ref |
No description |
buildValues(diff, components, newString, oldString, useLongestToken) X-Ref |
No description |
clonePath(path) X-Ref |
No description |
_iterableToArray(iter) X-Ref |
No description |
_arrayWithHoles(arr) X-Ref |
No description |
_nonIterableRest() X-Ref |
No description |
arrayOf( value ) X-Ref |
Returns the first argument as the sole entry in an array. return: {Array} Value returned as entry in array. param: {*} value Value to return. |
isObjectLike( value ) X-Ref |
Returns true if the value passed is object-like, or false otherwise. A value is object-like if it can support property assignment, e.g. object or array. return: {boolean} Whether value is object-like. param: {*} value Value to test. |
createCache() X-Ref |
Creates and returns a new cache object. return: {Object} Cache object. |
isShallowEqual( a, b, fromIndex ) X-Ref |
Returns true if entries within the two arrays are strictly equal by reference from a starting index. return: {boolean} Whether arrays are shallowly equal. param: {Array} a First array. param: {Array} b Second array. param: {number} fromIndex Index from which to start comparison. |
getRootCache() X-Ref |
Returns the root cache. If WeakMap is supported, this is assigned to the root WeakMap cache set, otherwise it is a shared instance of the default cache object. return: {(WeakMap|Object)} Root cache object. |
getWeakMapCache( dependants ) X-Ref |
Returns the cache for a given dependants array. When possible, a WeakMap will be used to create a unique cache for each set of dependants. This is feasible due to the nature of WeakMap in allowing garbage collection to occur on entries where the key object is no longer referenced. Since WeakMap requires the key to be an object, this is only possible when the dependant is object-like. The root cache is created as a hierarchy where each top-level key is the first entry in a dependants set, the value a WeakMap where each key is the next dependant, and so on. This continues so long as the dependants are object-like. If no dependants are object- like, then the cache is shared across all invocations. return: {Object} Cache object. param: {Array} dependants Selector dependants. |
clear() X-Ref |
Resets root memoization cache. |
callSelector( ) X-Ref |
The augmented selector call, considering first whether dependants have changed before passing it to underlying memoize function. return: {*} Selector result. param: {Object} source Source object for derivation. param: {...*} extraArgs Additional arguments to pass to selector. |
_typeof(obj) X-Ref |
No description |
_objectWithoutPropertiesLoose(source, excluded) X-Ref |
No description |
useBlockEditContext() X-Ref |
A hook that returns the block edit context. return: {Object} Block edit context |
useDisplayBlockControls() X-Ref |
Internal dependencies |
BlockControlsSlot(props) X-Ref |
No description |
BlockControlsFill(_ref) X-Ref |
No description |
useLayout() X-Ref |
React hook used to retrieve the layout config. |
ownKeys(object, enumerableOnly) X-Ref |
No description |
_objectSpread(target) X-Ref |
No description |
BlockAlignmentToolbar(_ref) X-Ref |
No description |
applyOrUnset(align) X-Ref |
No description |
align_ownKeys(object, enumerableOnly) X-Ref |
No description |
align_objectSpread(target) X-Ref |
No description |
getValidAlignments(blockAlign) X-Ref |
Returns the valid alignments. Takes into consideration the aligns supported by a block, if the block supports wide controls or not and if theme supports wide controls or not. Exported just for testing purposes, not exported outside the module. return: {string[]} Valid alignments. param: {?boolean|string[]} blockAlign Aligns supported by the block. param: {?boolean} hasWideBlockSupport True if block supports wide alignments. And False otherwise. param: {?boolean} hasWideEnabled True if theme supports wide alignments. And False otherwise. |
addAttribute(settings) X-Ref |
Filters registered block settings, extending attributes to include `align`. return: {Object} Filtered block settings param: {Object} settings Original block settings |
addAssignedAlign(props, blockType, attributes) X-Ref |
Override props assigned to save component to inject alignment class name if block supports it. return: {Object} Filtered props applied to save element param: {Object} props Additional props applied to save element param: {Object} blockType Block type param: {Object} attributes Block attributes |
InspectorAdvancedControls(_ref) X-Ref |
No description |
InspectorControls(_ref) X-Ref |
No description |
anchor_ownKeys(object, enumerableOnly) X-Ref |
anchor_objectSpread(target) X-Ref |
No description |
anchor_addAttribute(settings) X-Ref |
Filters registered block settings, extending attributes with anchor using ID of the first node. return: {Object} Filtered block settings. param: {Object} settings Original block settings. |
addSaveProps(extraProps, blockType, attributes) X-Ref |
Override props assigned to save component to inject anchor ID, if block supports anchor. This is only applied if the block's save result is an element and not a markup string. return: {Object} Filtered props applied to save element. param: {Object} extraProps Additional props applied to save element. param: {Object} blockType Block type. param: {Object} attributes Current block attributes. |
custom_class_name_ownKeys(object, enumerableOnly) X-Ref |
No description |
custom_class_name_objectSpread(target) X-Ref |
No description |
custom_class_name_addAttribute(settings) X-Ref |
Filters registered block settings, extending attributes with anchor using ID of the first node. return: {Object} Filtered block settings. param: {Object} settings Original block settings. |
custom_class_name_addSaveProps(extraProps, blockType, attributes) X-Ref |
Override props assigned to save component to inject anchor ID, if block supports anchor. This is only applied if the block's save result is an element and not a markup string. return: {Object} Filtered props applied to save element. param: {Object} extraProps Additional props applied to save element. param: {Object} blockType Block type. param: {Object} attributes Current block attributes. |
getHTMLRootElementClasses(innerHTML) X-Ref |
Given an HTML string, returns an array of class names assigned to the root element in the markup. return: {string[]} Array of class names assigned to the root element. param: {string} innerHTML Markup string from which to extract classes. |
addParsedDifference(blockAttributes, blockType, innerHTML) X-Ref |
Given a parsed set of block attributes, if the block supports custom class names and an unknown class (per the block's serialization behavior) is found, the unknown classes are treated as custom classes. This prevents the block from being considered as invalid. return: {Object} Filtered block attributes. param: {Object} blockAttributes Original block attributes. param: {Object} blockType Block type settings. param: {string} innerHTML Original block markup. |
addGeneratedClassName(extraProps, blockType) X-Ref |
Override props assigned to save component to inject generated className if block supports it. This is only applied if the block's save result is an element and not a markup string. return: {Object} Filtered props applied to save element. param: {Object} extraProps Additional props applied to save element. param: {Object} blockType Block type. |
blockAttributesMatch(blockAttributes, attributes) X-Ref |
No description |
useEditorFeature(featurePath) X-Ref |
Hook that retrieves the setting for the given editor feature. It works with nested objects using by finding the value at path. return: {any} Returns the value defined for the setting. param: {string} featurePath The path to the feature. |
border_radius_ownKeys(object, enumerableOnly) X-Ref |
No description |
border_radius_objectSpread(target) X-Ref |
No description |
BorderRadiusEdit(props) X-Ref |
Inspector control panel containing the border radius related configuration. return: {WPElement} Border radius edit element. param: {Object} props Block properties. |
hasBorderRadiusSupport(blockType) X-Ref |
Determines if there is border radius support. return: {boolean} Whether there is support. param: {string|Object} blockType Block name or Block Type object. |
useIsBorderRadiusDisabled() X-Ref |
Custom hook that checks if border radius settings have been disabled. return: {boolean} Whether border radius setting is disabled. param: {string} name The name of the block. |
BorderPanel(props) X-Ref |
No description |
hasBorderSupport(blockName) X-Ref |
Determine whether there is block support for borders. return: {boolean} Whether there is support. param: {string} blockName Block name. |
getColorClassName(colorContextName, colorSlug) X-Ref |
Returns a class based on the context a color is being used and its slug. return: {?string} String with the class corresponding to the color in the provided context. param: {string} colorContextName Context/place where color is being used e.g: background, text etc... param: {string} colorSlug Slug of the color. |
utils_getMostReadableColor(colors, colorValue) X-Ref |
Given an array of color objects and a color value returns the color value of the most readable color in the array. return: {string} String with the color value of the most readable color. param: {Array} colors Array of color objects as set by the theme or by the editor defaults. param: {?string} colorValue A string containing the color value. |
__experimentalGetGradientClass(gradientSlug) X-Ref |
No description |
getGradientValueBySlug(gradients, slug) X-Ref |
Retrieves the gradient value per slug. return: {string} Gradient value. param: {Array} gradients Gradient Palette param: {string} slug Gradient slug |
__experimentalGetGradientObjectByGradientValue(gradients, value) X-Ref |
No description |
getGradientSlugByValue(gradients, value) X-Ref |
Retrieves the gradient slug per slug. return: {string} Gradient slug. param: {Array} gradients Gradient Palette param: {string} value Gradient value |
__experimentalUseGradient() X-Ref |
No description |
control_ownKeys(object, enumerableOnly) X-Ref |
No description |
control_objectSpread(target) X-Ref |
No description |
VisualLabel(_ref) X-Ref |
No description |
ColorGradientControlInner(_ref2) X-Ref |
No description |
ColorGradientControlSelect(props) X-Ref |
No description |
ColorGradientControl(props) X-Ref |
No description |
panel_color_gradient_settings_ownKeys(object, enumerableOnly) X-Ref |
No description |
panel_color_gradient_settings_objectSpread(target) X-Ref |
No description |
ContrastCheckerMessage(_ref) X-Ref |
No description |
ContrastChecker(_ref2) X-Ref |
No description |
getBlockDOMNode(clientId, doc) X-Ref |
Given a block client ID, returns the corresponding DOM node for the block, if exists. As much as possible, this helper should be avoided, and used only in cases where isolated behaviors need remote access to a block node. return: {Element?} Block DOM node. param: {string} clientId Block client ID. param: {Document} doc Document to search. |
getBlockPreviewContainerDOMNode(clientId, doc) X-Ref |
Returns the preview container DOM node for a given block client ID, or undefined if the container cannot be determined. return: {Node|undefined} Preview container DOM node. param: {string} clientId Block client ID. param: {Document} doc Document to search. |
isBlockFocusStop(element) X-Ref |
Returns true if the given element is a block focus stop. Blocks without their own text fields rely on the focus stop to be keyboard navigable. return: {boolean} Whether element is a block focus stop. param: {Element} element Element to test. |
isInSameBlock(a, b) X-Ref |
Returns true if two elements are contained within the same block. return: {boolean} Whether elements are in the same block. param: {Element} a First element. param: {Element} b Second element. |
isInsideRootBlock(blockElement, element) X-Ref |
Returns true if an element is considered part of the block and not its children. return: {boolean} Whether element is in the block Element but not its param: {Element} blockElement Block container element. param: {Element} element Element. |
hasInnerBlocksContext(element) X-Ref |
Returns true if the given element contains inner blocks (an InnerBlocks element). return: {boolean} Whether element contains inner blocks. param: {Element} element Element to test. |
getBlockClientId(node) X-Ref |
Finds the block client ID given any DOM node inside the block. return: {string|undefined} Client ID or undefined if the node is not part of param: {Node?} node DOM node. |
getComputedStyle(node) X-Ref |
No description |
ColorPanel(_ref) X-Ref |
No description |
color_ownKeys(object, enumerableOnly) X-Ref |
No description |
color_objectSpread(target) X-Ref |
No description |
addAttributes(settings) X-Ref |
Filters registered block settings, extending attributes to include `backgroundColor` and `textColor` attribute. return: {Object} Filtered block settings param: {Object} settings Original block settings |
color_addSaveProps(props, blockType, attributes) X-Ref |
Override props assigned to save component to inject colors classnames. return: {Object} Filtered props applied to save element param: {Object} props Additional props applied to save element param: {Object} blockType Block type param: {Object} attributes Block attributes |
addEditProps(settings) X-Ref |
Filters registered block settings to extand the block edit wrapper to apply the desired styles and classnames properly. return: {Object} Filtered block settings param: {Object} settings Original block settings |
ColorEdit(props) X-Ref |
Inspector control panel containing the color related configuration return: {WPElement} Color edit element. param: {Object} props |
TextDecorationControl(_ref) X-Ref |
Control to facilitate text decoration selections. return: {WPElement} Text decoration control. param: {Object} props Component props. param: {string} props.value Currently selected text decoration. param: {Function} props.onChange Handles change in text decoration selection. |
text_decoration_ownKeys(object, enumerableOnly) X-Ref |
No description |
text_decoration_objectSpread(target) X-Ref |
No description |
TextDecorationEdit(props) X-Ref |
Inspector control panel containing the text decoration options. return: {WPElement} Text decoration edit element. param: {Object} props Block properties. |
onChange(newDecoration) X-Ref |
No description |
useIsTextDecorationDisabled() X-Ref |
Checks if text-decoration settings have been disabled. return: {boolean} Whether or not the setting is disabled. param: {string} name Name of the block. |
TextTransformControl(_ref) X-Ref |
Control to facilitate text transform selections. return: {WPElement} Text transform control. param: {Object} props Component props. param: {string} props.value Currently selected text transform. param: {Function} props.onChange Handles change in text transform selection. |
text_transform_ownKeys(object, enumerableOnly) X-Ref |
No description |
text_transform_objectSpread(target) X-Ref |
No description |
TextTransformEdit(props) X-Ref |
Inspector control panel containing the text transform options. return: {WPElement} Text transform edit element. param: {Object} props Block properties. |
onChange(newTransform) X-Ref |
No description |
useIsTextTransformDisabled() X-Ref |
Checks if text-transform settings have been disabled. return: {boolean} Whether or not the setting is disabled. param: {string} name Name of the block. |
TextDecorationAndTransformEdit(props) X-Ref |
Handles grouping related text decoration and text transform edit components so they can be laid out in a more flexible manner within the Typography InspectorControls panel. return: {WPElement} Component containing text decoration or transform controls. param: {Object} props Block props to be passed on to individual controls. |
isLineHeightDefined(lineHeight) X-Ref |
Determines if the lineHeight attribute has been properly defined. return: {boolean} Whether the lineHeight attribute is valid. param: {any} lineHeight The value to check. |
LineHeightControl(_ref) X-Ref |
Internal dependencies |
line_height_ownKeys(object, enumerableOnly) X-Ref |
No description |
line_height_objectSpread(target) X-Ref |
No description |
LineHeightEdit(props) X-Ref |
Inspector control panel containing the line height related configuration return: {WPElement} Line height edit element. param: {Object} props |
useIsLineHeightDisabled() X-Ref |
Custom hook that checks if line-height settings have been disabled. return: {boolean} Whether setting is disabled. param: {string} name The name of the block. |
FontAppearanceControl(props) X-Ref |
Control to display unified font style and weight options. return: {WPElement} Font appearance control. param: {Object} props Component props. |
font_appearance_ownKeys(object, enumerableOnly) X-Ref |
No description |
font_appearance_objectSpread(target) X-Ref |
No description |
FontAppearanceEdit(props) X-Ref |
Inspector control panel containing the font appearance options. return: {WPElement} Font appearance edit element. param: {Object} props Block properties. |
useIsFontStyleDisabled() X-Ref |
Checks if font style support has been disabled either by not opting in for support or by failing to provide preset styles. return: {boolean} Whether font style support has been disabled. param: {Object} props Block properties. param: {string} props.name Name for the block type. |
useIsFontWeightDisabled() X-Ref |
Checks if font weight support has been disabled either by not opting in for support or by failing to provide preset weights. return: {boolean} Whether font weight support has been disabled. param: {Object} props Block properties. param: {string} props.name Name for the block type. |
useIsFontAppearanceDisabled(props) X-Ref |
Checks if font appearance support has been disabled. return: {boolean} Whether font appearance support has been disabled. param: {Object} props Block properties. |
FontFamilyControl(_ref) X-Ref |
Internal dependencies |
font_family_ownKeys(object, enumerableOnly) X-Ref |
No description |
font_family_objectSpread(target) X-Ref |
No description |
FontFamilyEdit(_ref2) X-Ref |
No description |
onChange(newValue) X-Ref |
No description |
useIsFontFamilyDisabled(_ref4) X-Ref |
Custom hook that checks if font-family functionality is disabled. return: {boolean} Whether setting is disabled. param: {string} name The name of the block. |
getFontSizeObjectByValue(fontSizes, value) X-Ref |
Returns the corresponding font size object for a given value. return: {Object} Font size object. param: {Array} fontSizes Array of font size objects. param: {number} value Font size value. |
getFontSizeClass(fontSizeSlug) X-Ref |
Returns a class based on fontSizeName. return: {string} String with the class corresponding to the fontSize passed. param: {string} fontSizeSlug Slug of the fontSize. |
FontSizePicker(props) X-Ref |
No description |
font_size_ownKeys(object, enumerableOnly) X-Ref |
No description |
font_size_objectSpread(target) X-Ref |
No description |
font_size_addAttributes(settings) X-Ref |
Filters registered block settings, extending attributes to include `fontSize` and `fontWeight` attributes. return: {Object} Filtered block settings param: {Object} settings Original block settings |
font_size_addSaveProps(props, blockType, attributes) X-Ref |
Override props assigned to save component to inject font size. return: {Object} Filtered props applied to save element param: {Object} props Additional props applied to save element param: {Object} blockType Block type param: {Object} attributes Block attributes |
font_size_addEditProps(settings) X-Ref |
Filters registered block settings to expand the block edit wrapper by applying the desired styles and classnames. return: {Object} Filtered block settings param: {Object} settings Original block settings |
FontSizeEdit(props) X-Ref |
Inspector control panel containing the font size related configuration return: {WPElement} Font size edit element. param: {Object} props |
useIsFontSizeDisabled() X-Ref |
Custom hook that checks if font-size settings have been disabled. return: {boolean} Whether setting is disabled. param: {string} name The name of the block. |
TypographyPanel(props) X-Ref |
No description |
useIsTypographyDisabled() X-Ref |
No description |
UnitControl(_ref) X-Ref |
Internal dependencies |
filterUnitsWithSettings() X-Ref |
Filters available units based on values defined by settings. return: {Array} Filtered units based on settings. param: {Array} settings Collection of preferred units. param: {Array} units Collection of available units. |
useCustomUnits(units) X-Ref |
Custom hook to retrieve and consolidate units setting from add_theme_support(). return: {Array} Filtered units based on settings. param: {Array} units Collection of available units. |
padding_ownKeys(object, enumerableOnly) X-Ref |
No description |
padding_objectSpread(target) X-Ref |
No description |
PaddingEdit(props) X-Ref |
Inspector control panel containing the padding related configuration return: {WPElement} Padding edit element. param: {Object} props |
SpacingPanelControl(_ref) X-Ref |
No description |
style_ownKeys(object, enumerableOnly) X-Ref |
No description |
style_objectSpread(target) X-Ref |
No description |
compileStyleValue(uncompiledValue) X-Ref |
No description |
getInlineStyles() X-Ref |
Returns the inline styles to add depending on the style object return: {Object} Flattened CSS variables declaration param: {Object} styles Styles configuration |
style_addAttribute(settings) X-Ref |
Filters registered block settings, extending attributes to include `style` attribute. return: {Object} Filtered block settings param: {Object} settings Original block settings |
style_addSaveProps(props, blockType, attributes) X-Ref |
Override props assigned to save component to inject the CSS variables definition. return: {Object} Filtered props applied to save element param: {Object} props Additional props applied to save element param: {Object} blockType Block type param: {Object} attributes Block attributes |
style_addEditProps(settings) X-Ref |
Filters registered block settings to extand the block edit wrapper to apply the desired styles and classnames properly. return: {Object} Filtered block settings param: {Object} settings Original block settings |
_createSuper(Derived) X-Ref |
No description |
_isNativeReflectConstruct() X-Ref |
No description |
with_colors_ownKeys(object, enumerableOnly) X-Ref |
No description |
with_colors_objectSpread(target) X-Ref |
No description |
createColorHOC(colorTypes, withColorPalette) X-Ref |
Helper function used with `createHigherOrderComponent` to create higher order components for managing color logic. return: {WPComponent} The component that can be used as a HOC. param: {Array} colorTypes An array of color types (e.g. 'backgroundColor, borderColor). param: {Function} withColorPalette A HOC for injecting the 'colors' prop into the WrappedComponent. |
_class(props) X-Ref |
No description |
createCustomColorsHOC(colorsArray) X-Ref |
A higher-order component factory for creating a 'withCustomColors' HOC, which handles color logic for class generation color value, retrieval and color attribute setting. Use this higher-order component to work with a custom set of colors. return: {Function} Higher-order component. param: {Array} colorsArray The array of color objects (name, slug, color, etc... ). |
withColors() X-Ref |
A higher-order component, which handles color logic for class generation color value, retrieval and color attribute setting. For use with the default editor/theme color palette. return: {Function} Higher-order component. param: {...(Object|string)} colorTypes The arguments can be strings or objects. If the argument is an object, |
panel_color_settings_ownKeys(object, enumerableOnly) X-Ref |
No description |
panel_color_settings_objectSpread(target) X-Ref |
No description |
color_panel_ColorPanel(_ref) X-Ref |
No description |
_createForOfIteratorHelper(o, allowArrayLike) X-Ref |
No description |
_unsupportedIterableToArray(o, minLen) X-Ref |
No description |
_arrayLikeToArray(arr, len) X-Ref |
No description |
use_colors_ownKeys(object, enumerableOnly) X-Ref |
No description |
use_colors_objectSpread(target) X-Ref |
No description |
use_colors_getComputedStyle(node) X-Ref |
No description |
__experimentalUseColors(colorConfigs) X-Ref |
No description |
with_font_sizes_ownKeys(object, enumerableOnly) X-Ref |
No description |
with_font_sizes_objectSpread(target) X-Ref |
No description |
with_font_sizes_createSuper(Derived) X-Ref |
No description |
with_font_sizes_isNativeReflectConstruct() X-Ref |
No description |
_class(props) X-Ref |
No description |
alignment_toolbar_ownKeys(object, enumerableOnly) X-Ref |
No description |
alignment_toolbar_objectSpread(target) X-Ref |
No description |
AlignmentToolbar(props) X-Ref |
No description |
applyOrUnset(align) X-Ref |
No description |
setIcon() X-Ref |
No description |
normalizeSearchInput() X-Ref |
Sanitizes the search input string. return: {string} The normalized search input. param: {string} input The search input to normalize. |
getItemSearchRank(item, searchTerm) X-Ref |
Get the search rank for a given item and a specific search term. The better the match, the higher the rank. If the rank equals 0, it should be excluded from the results. return: {number} Search Rank. param: {Object} item Item to filter. param: {string} searchTerm Search term. param: {Object} config Search Config. |
BlockIcon(_ref) X-Ref |
No description |
createBlockCompleter() X-Ref |
Creates a blocks repeater for replacing the current block with a selected block type. return: {WPCompleter} A blocks completer. |
BlockEditorAutocomplete(props) X-Ref |
Wrap the default Autocomplete component with one that supports a filter hook for customizing its list of autocompleters. |
BlockFullHeightAlignmentToolbar(_ref) X-Ref |
No description |
BlockAlignmentMatrixToolbar(props) X-Ref |
No description |
insertAt(array, elements, index) X-Ref |
Insert one or multiple elements into a given position of an array. return: {Array} Result. param: {Array} array Source array. param: {*} elements Elements to insert. param: {number} index Insert Position. |
moveTo(array, from, to) X-Ref |
Moves an element in an array. return: {Array} Result. param: {Array} array Source array. param: {number} from Source index. param: {number} to Destination index. param: {number} count Number of elements to move. |
reducer_ownKeys(object, enumerableOnly) X-Ref |
No description |
reducer_objectSpread(target) X-Ref |
No description |
mapBlockOrder(blocks) X-Ref |
Given an array of blocks, returns an object where each key is a nesting context, the value of which is an array of block client IDs existing within that nesting context. return: {Object} Block order map object. param: {Array} blocks Blocks to map. param: {?string} rootClientId Assumed root client ID. |
mapBlockParents(blocks) X-Ref |
Given an array of blocks, returns an object where each key contains the clientId of the block and the value is the parent of the block. return: {Object} Block order map object. param: {Array} blocks Blocks to map. param: {?string} rootClientId Assumed root client ID. |
flattenBlocks(blocks) X-Ref |
Helper method to iterate through all blocks, recursing into inner blocks, applying a transformation function to each one. Returns a flattened object with the transformed blocks. return: {Object} Flattened object. param: {Array} blocks Blocks to flatten. param: {Function} transform Transforming function to be applied to each block. |
getFlattenedBlocksWithoutAttributes(blocks) X-Ref |
Given an array of blocks, returns an object containing all blocks, without attributes, recursing into inner blocks. Keys correspond to the block client ID, the value of which is the attributes object. return: {Object} Flattened block attributes object. param: {Array} blocks Blocks to flatten. |
getFlattenedBlockAttributes(blocks) X-Ref |
Given an array of blocks, returns an object containing all block attributes, recursing into inner blocks. Keys correspond to the block client ID, the value of which is the attributes object. return: {Object} Flattened block attributes object. param: {Array} blocks Blocks to flatten. |
getNestedBlockClientIds(blocksOrder) X-Ref |
Given a block order map object, returns *all* of the block client IDs that are a descendant of the given root client ID. Calling this with `rootClientId` set to `''` results in a list of client IDs that are in the post. That is, it excludes blocks like fetched reusable blocks which are stored into state but not visible. It also excludes InnerBlocks controllers, like template parts. It is important to exclude the full inner block controller and not just the inner blocks because in many cases, we need to persist the previous value of an inner block controller. To do so, it must be excluded from the list of client IDs which are considered to be part of the top-level entity. return: {Array} List of descendant client IDs. param: {Object} blocksOrder Object that maps block client IDs to a list of param: {?string} rootClientId The root client ID to search. Defaults to ''. param: {?Object} controlledInnerBlocks The InnerBlocks controller state. |
getMutateSafeObject(original, working) X-Ref |
Returns an object against which it is safe to perform mutating operations, given the original object and its current working copy. return: {Object} Mutation-safe object. param: {Object} original Original object. param: {Object} working Working object. |
hasSameKeys(a, b) X-Ref |
Returns true if the two object arguments have the same keys, or false otherwise. return: {boolean} Whether the two objects have the same keys. param: {Object} a First object. param: {Object} b Second object. |
isUpdatingSameBlockAttribute(action, lastAction) X-Ref |
Returns true if, given the currently dispatching action and the previously dispatched action, the two actions are updating the same block attribute, or false otherwise. return: {boolean} Whether actions are updating the same block attribute. param: {Object} action Currently dispatching action. param: {Object} lastAction Previously dispatched action. |
withPersistentBlockChange(reducer) X-Ref |
Higher-order reducer intended to augment the blocks reducer, assigning an `isPersistentChange` property value corresponding to whether a change in state can be considered as persistent. All changes are considered persistent except when updating the same block attribute as in the previous action. return: {Function} Enhanced reducer function. param: {Function} reducer Original reducer function. |
withIgnoredBlockChange(reducer) X-Ref |
Higher-order reducer intended to augment the blocks reducer, assigning an `isIgnoredChange` property value corresponding to whether a change in state can be considered as ignored. A change is considered ignored when the result of an action not incurred by direct user interaction. return: {Function} Enhanced reducer function. param: {Function} reducer Original reducer function. |
reducer_isTyping() X-Ref |
No description |
draggedBlocks() X-Ref |
Reducer returning dragged block client id. return: {string[]} Updated state. param: {string[]} state Current state. param: {Object} action Dispatched action. |
reducer_isCaretWithinFormattedText() X-Ref |
Reducer returning whether the caret is within formatted text. return: {boolean} Updated state. param: {boolean} state Current state. param: {Object} action Dispatched action. |
selectionHelper() X-Ref |
Internal helper reducer for selectionStart and selectionEnd. Can hold a block selection, represented by an object with property clientId. return: {Object} Updated state. param: {Object} state Current state. param: {Object} action Dispatched action. |
reducer_selection() X-Ref |
Reducer returning the selection state. return: {boolean} Updated state. param: {boolean} state Current state. param: {Object} action Dispatched action. |
reducer_isMultiSelecting() X-Ref |
Reducer returning whether the user is multi-selecting. return: {boolean} Updated state. param: {boolean} state Current state. param: {Object} action Dispatched action. |
reducer_isSelectionEnabled() X-Ref |
Reducer returning whether selection is enabled. return: {boolean} Updated state. param: {boolean} state Current state. param: {Object} action Dispatched action. |
reducer_initialPosition(state, action) X-Ref |
Reducer returning the intial block selection. Currently this in only used to restore the selection after block deletion and pasting new content.This reducer should eventually be removed in favour of setting selection directly. return: {?number} Initial position: -1 or undefined. param: {boolean} state Current state. param: {Object} action Dispatched action. |
blocksMode() X-Ref |
No description |
resetInsertionPoint(state, action, defaultValue) X-Ref |
A helper for resetting the insertion point state. return: {*} Either the default value if a reset is required, or the state. param: {Object} state Current state. param: {Object} action Dispatched action. param: {*} defaultValue The default value for the reducer. |
reducer_insertionPoint() X-Ref |
Reducer returning the insertion point position, consisting of the rootClientId and an index. return: {Object} Updated state. param: {Object} state Current state. param: {Object} action Dispatched action. |
insertionPointVisibility() X-Ref |
Reducer returning the visibility of the insertion point. return: {Object} Updated state. param: {Object} state Current state. param: {Object} action Dispatched action. |
reducer_template() X-Ref |
Reducer returning whether the post blocks match the defined template or not. return: {boolean} Updated state. param: {Object} state Current state. param: {Object} action Dispatched action. |
reducer_settings() X-Ref |
Reducer returning the editor setting. return: {Object} Updated state. param: {Object} state Current state. param: {Object} action Dispatched action. |
preferences() X-Ref |
Reducer returning the user preferences. return: {string} Updated state. param: {Object} state Current state. param: {Object} action Dispatched action. |
reducer_isNavigationMode() X-Ref |
Reducer returning whether the navigation mode is enabled or not. return: {string} Updated state. param: {string} state Current state. param: {Object} action Dispatched action. |
reducer_hasBlockMovingClientId() X-Ref |
Reducer returning whether the block moving mode is enabled or not. return: {string|null} Updated state. param: {string|null} state Current state. param: {Object} action Dispatched action. |
lastBlockAttributesChange(state, action) X-Ref |
Reducer return an updated state representing the most recent block attribute update. The state is structured as an object where the keys represent the client IDs of blocks, the values a subset of attributes from the most recent block update. The state is always reset to null if the last action is anything other than an attributes update. return: {[string,Object]} Updated state. param: {Object<string,Object>} state Current state. param: {Object} action Action object. |
automaticChangeStatus(state, action) X-Ref |
Reducer returning automatic change state. return: {string} Updated state. param: {boolean} state Current state. param: {Object} action Dispatched action. |
highlightedBlock(state, action) X-Ref |
Reducer returning current highlighted block. return: {string} Updated state. param: {boolean} state Current highlighted block. param: {Object} action Dispatched action. |
selectors_createForOfIteratorHelper(o, allowArrayLike) X-Ref |
No description |
selectors_unsupportedIterableToArray(o, minLen) X-Ref |
No description |
selectors_arrayLikeToArray(arr, len) X-Ref |
No description |
selectors_ownKeys(object, enumerableOnly) X-Ref |
No description |
selectors_objectSpread(target) X-Ref |
No description |
selectors_getBlockName(state, clientId) X-Ref |
Returns a block's name given its client ID, or null if no block exists with the client ID. return: {string} Block name. param: {Object} state Editor state. param: {string} clientId Block client ID. |
selectors_isBlockValid(state, clientId) X-Ref |
Returns whether a block is valid or not. return: {boolean} Is Valid. param: {Object} state Editor state. param: {string} clientId Block client ID. |
selectors_getBlockAttributes(state, clientId) X-Ref |
Returns a block's attributes given its client ID, or null if no block exists with the client ID. return: {Object?} Block attributes. param: {Object} state Editor state. param: {string} clientId Block client ID. |
selectors_getBlockCount(state, rootClientId) X-Ref |
Returns the number of blocks currently present in the post. return: {number} Number of blocks in the post. param: {Object} state Editor state. param: {?string} rootClientId Optional root client ID of block list. |
selectors_getSelectionStart(state) X-Ref |
Returns the current selection start block client ID, attribute key and text offset. return: {WPBlockSelection} Selection start information. param: {Object} state Block editor state. |
selectors_getSelectionEnd(state) X-Ref |
Returns the current selection end block client ID, attribute key and text offset. return: {WPBlockSelection} Selection end information. param: {Object} state Block editor state. |
selectors_getBlockSelectionStart(state) X-Ref |
Returns the current block selection start. This value may be null, and it may represent either a singular block selection or multi-selection start. A selection is singular if its start and end match. return: {?string} Client ID of block selection start. param: {Object} state Global application state. |
getBlockSelectionEnd(state) X-Ref |
Returns the current block selection end. This value may be null, and it may represent either a singular block selection or multi-selection end. A selection is singular if its start and end match. return: {?string} Client ID of block selection end. param: {Object} state Global application state. |
selectors_getSelectedBlockCount(state) X-Ref |
Returns the number of blocks currently selected in the post. return: {number} Number of blocks selected in the post. param: {Object} state Global application state. |
selectors_hasSelectedBlock(state) X-Ref |
Returns true if there is a single selected block, or false otherwise. return: {boolean} Whether a single block is selected. param: {Object} state Editor state. |
selectors_getSelectedBlockClientId(state) X-Ref |
Returns the currently selected block client ID, or null if there is no selected block. return: {?string} Selected block client ID. param: {Object} state Editor state. |
getSelectedBlock(state) X-Ref |
Returns the currently selected block, or null if there is no selected block. return: {?Object} Selected block. param: {Object} state Global application state. |
selectors_getBlockRootClientId(state, clientId) X-Ref |
Given a block client ID, returns the root block from which the block is nested, an empty string for top-level blocks, or null if the block does not exist. return: {?string} Root client ID, if exists param: {Object} state Editor state. param: {string} clientId Block from which to find root client ID. |
getBlockHierarchyRootClientId(state, clientId) X-Ref |
Given a block client ID, returns the root of the hierarchy from which the block is nested, return the block itself for root level blocks. return: {string} Root client ID param: {Object} state Editor state. param: {string} clientId Block from which to find root client ID. |
getLowestCommonAncestorWithSelectedBlock(state, clientId) X-Ref |
Given a block client ID, returns the lowest common ancestor with selected client ID. return: {string} Common ancestor client ID or undefined param: {Object} state Editor state. param: {string} clientId Block from which to find common ancestor client ID. |
getAdjacentBlockClientId(state, startClientId) X-Ref |
Returns the client ID of the block adjacent one at the given reference startClientId and modifier directionality. Defaults start startClientId to the selected block, and direction as next block. Returns null if there is no adjacent block. return: {?string} Return the client ID of the block, or null if none exists. param: {Object} state Editor state. param: {?string} startClientId Optional client ID of block from which to param: {?number} modifier Directionality multiplier (1 next, -1 |
selectors_getPreviousBlockClientId(state, startClientId) X-Ref |
Returns the previous block's client ID from the given reference start ID. Defaults start to the selected block. Returns null if there is no previous block. return: {?string} Adjacent block's client ID, or null if none exists. param: {Object} state Editor state. param: {?string} startClientId Optional client ID of block from which to |
selectors_getNextBlockClientId(state, startClientId) X-Ref |
Returns the next block's client ID from the given reference start ID. Defaults start to the selected block. Returns null if there is no next block. return: {?string} Adjacent block's client ID, or null if none exists. param: {Object} state Editor state. param: {?string} startClientId Optional client ID of block from which to |
getSelectedBlocksInitialCaretPosition(state) X-Ref |
Returns the initial caret position for the selected block. This position is to used to position the caret properly when the selected block changes. return: {?Object} Selected block. param: {Object} state Global application state. |
selectors_getMultiSelectedBlockClientIds(state) X-Ref |
Returns the current multi-selection set of block client IDs, or an empty array if there is no multi-selection. return: {Array} Multi-selected block client IDs. param: {Object} state Editor state. |
selectors_getFirstMultiSelectedBlockClientId(state) X-Ref |
Returns the client ID of the first block in the multi-selection set, or null if there is no multi-selection. return: {?string} First block client ID in the multi-selection set. param: {Object} state Editor state. |
selectors_getLastMultiSelectedBlockClientId(state) X-Ref |
Returns the client ID of the last block in the multi-selection set, or null if there is no multi-selection. return: {?string} Last block client ID in the multi-selection set. param: {Object} state Editor state. |
isFirstMultiSelectedBlock(state, clientId) X-Ref |
Returns true if a multi-selection exists, and the block corresponding to the specified client ID is the first block of the multi-selection set, or false otherwise. return: {boolean} Whether block is first in multi-selection. param: {Object} state Editor state. param: {string} clientId Block client ID. |
isBlockMultiSelected(state, clientId) X-Ref |
Returns true if the client ID occurs within the block multi-selection, or false otherwise. return: {boolean} Whether block is in multi-selection set. param: {Object} state Editor state. param: {string} clientId Block client ID. |
selectors_getMultiSelectedBlocksStartClientId(state) X-Ref |
Returns the client ID of the block which begins the multi-selection set, or null if there is no multi-selection. This is not necessarily the first client ID in the selection. return: {?string} Client ID of block beginning multi-selection. param: {Object} state Editor state. |
selectors_getMultiSelectedBlocksEndClientId(state) X-Ref |
Returns the client ID of the block which ends the multi-selection set, or null if there is no multi-selection. This is not necessarily the last client ID in the selection. return: {?string} Client ID of block ending multi-selection. param: {Object} state Editor state. |
selectors_getBlockOrder(state, rootClientId) X-Ref |
Returns an array containing all block client IDs in the editor in the order they appear. Optionally accepts a root client ID of the block list for which the order should be returned, defaulting to the top-level block order. return: {Array} Ordered client IDs of editor blocks. param: {Object} state Editor state. param: {?string} rootClientId Optional root client ID of block list. |
selectors_getBlockIndex(state, clientId, rootClientId) X-Ref |
Returns the index at which the block corresponding to the specified client ID occurs within the block order, or `-1` if the block does not exist. return: {number} Index at which block exists in order. param: {Object} state Editor state. param: {string} clientId Block client ID. param: {?string} rootClientId Optional root client ID of block list. |
selectors_isBlockSelected(state, clientId) X-Ref |
Returns true if the block corresponding to the specified client ID is currently selected and no multi-selection exists, or false otherwise. return: {boolean} Whether block is selected and multi-selection exists. param: {Object} state Editor state. param: {string} clientId Block client ID. |
hasSelectedInnerBlock(state, clientId) X-Ref |
Returns true if one of the block's inner blocks is selected. return: {boolean} Whether the block as an inner block selected param: {Object} state Editor state. param: {string} clientId Block client ID. param: {boolean} deep Perform a deep check. |
isBlockWithinSelection(state, clientId) X-Ref |
Returns true if the block corresponding to the specified client ID is currently selected but isn't the last of the selected blocks. Here "last" refers to the block sequence in the document, _not_ the sequence of multi-selection, which is why `state.selectionEnd` isn't used. return: {boolean} Whether block is selected and not the last in the param: {Object} state Editor state. param: {string} clientId Block client ID. |
selectors_hasMultiSelection(state) X-Ref |
Returns true if a multi-selection has been made, or false otherwise. return: {boolean} Whether multi-selection has been made. param: {Object} state Editor state. |
selectors_isMultiSelecting(state) X-Ref |
Whether in the process of multi-selecting or not. This flag is only true while the multi-selection is being selected (by mouse move), and is false once the multi-selection has been settled. return: {boolean} True if multi-selecting, false if not. param: {Object} state Global application state. |
selectors_isSelectionEnabled(state) X-Ref |
Selector that returns if multi-selection is enabled or not. return: {boolean} True if it should be possible to multi-select blocks, false if multi-selection is disabled. param: {Object} state Global application state. |
selectors_getBlockMode(state, clientId) X-Ref |
Returns the block's editing mode, defaulting to "visual" if not explicitly assigned. return: {Object} Block editing mode. param: {Object} state Editor state. param: {string} clientId Block client ID. |
selectors_isTyping(state) X-Ref |
Returns true if the user is typing, or false otherwise. return: {boolean} Whether user is typing. param: {Object} state Global application state. |
isDraggingBlocks(state) X-Ref |
Returns true if the user is dragging blocks, or false otherwise. return: {boolean} Whether user is dragging blocks. param: {Object} state Global application state. |
selectors_getDraggedBlockClientIds(state) X-Ref |
Returns the client ids of any blocks being directly dragged. This does not include children of a parent being dragged. return: {string[]} Array of dragged block client ids. param: {Object} state Global application state. |
isBlockBeingDragged(state, clientId) X-Ref |
Returns whether the block is being dragged. Only returns true if the block is being directly dragged, not if the block is a child of a parent being dragged. See `isAncestorBeingDragged` for child blocks. return: {boolean} Whether the block is being dragged. param: {Object} state Global application state. param: {string} clientId Client id for block to check. |
isAncestorBeingDragged(state, clientId) X-Ref |
Returns whether a parent/ancestor of the block is being dragged. return: {boolean} Whether the block's ancestor is being dragged. param: {Object} state Global application state. param: {string} clientId Client id for block to check. |
selectors_isCaretWithinFormattedText(state) X-Ref |
Returns true if the caret is within formatted text, or false otherwise. return: {boolean} Whether the caret is within formatted text. param: {Object} state Global application state. |
getBlockInsertionPoint(state) X-Ref |
Returns the insertion point. This will be: 1) The insertion point manually set using setInsertionPoint() or showInsertionPoint(); or 2) The point after the current block selection, if there is a selection; or 3) The point at the end of the block list. Components like <Inserter> will default to inserting blocks at this point. return: {Object} Insertion point object with `rootClientId` and `index`. param: {Object} state Global application state. |
isBlockInsertionPointVisible(state) X-Ref |
Whether or not the insertion point should be shown to users. This is set using showInsertionPoint() or hideInsertionPoint(). return: {?boolean} Whether the insertion point should be shown. param: {Object} state Global application state. |
selectors_isValidTemplate(state) X-Ref |
Returns whether the blocks matches the template or not. return: {?boolean} Whether the template is valid or not. param: {boolean} state |
getTemplate(state) X-Ref |
Returns the defined block template return: {?Array} Block Template param: {boolean} state |
selectors_getTemplateLock(state, rootClientId) X-Ref |
Returns the defined block template lock. Optionally accepts a root block client ID as context, otherwise defaulting to the global context. return: {?string} Block Template Lock param: {Object} state Editor state. param: {?string} rootClientId Optional block root client ID. |
selectors_canInsertBlocks(state, clientIds) X-Ref |
Determines if the given blocks are allowed to be inserted into the block list. return: {boolean} Whether the given blocks are allowed to be inserted. param: {Object} state Editor state. param: {string} clientIds The block client IDs to be inserted. param: {?string} rootClientId Optional root client ID of block list. |
getInsertUsage(state, id) X-Ref |
Returns information about how recently and frequently a block has been inserted. return: {?{ time: number, count: number }} An object containing `time` which is when the last param: {Object} state Global application state. param: {string} id A string which identifies the insert, e.g. 'core/block/12' |
selectors_getBlockListSettings(state, clientId) X-Ref |
Returns the Block List settings of a block, if any exist. return: {?Object} Block settings of the block if set. param: {Object} state Editor state. param: {?string} clientId Block client ID. |
selectors_getSettings(state) X-Ref |
Returns the editor settings. return: {Object} The editor settings object. param: {Object} state Editor state. |
isLastBlockChangePersistent(state) X-Ref |
Returns true if the most recent block change is be considered persistent, or false otherwise. A persistent change is one committed by BlockEditorProvider via its `onChange` callback, in addition to `onInput`. return: {boolean} Whether the most recent block change was persistent. param: {Object} state Block editor state. |
__unstableIsLastBlockChangeIgnored(state) X-Ref |
Returns true if the most recent block change is be considered ignored, or false otherwise. An ignored change is one not to be committed by BlockEditorProvider, neither via `onChange` nor `onInput`. return: {boolean} Whether the most recent block change was ignored. param: {Object} state Block editor state. |
__experimentalGetLastBlockAttributeChanges(state) X-Ref |
Returns the block attributes changed as a result of the last dispatched action. return: {Object<string,Object>} Subsets of block attributes changed, keyed param: {Object} state Block editor state. |
getReusableBlocks(state) X-Ref |
Returns the available reusable blocks return: {Array} Reusable blocks param: {Object} state Global application state. |
selectors_isNavigationMode(state) X-Ref |
Returns whether the navigation mode is enabled. return: {boolean} Is navigation mode enabled. param: {Object} state Editor state. |
selectors_hasBlockMovingClientId(state) X-Ref |
Returns whether block moving mode is enabled. return: {string} Client Id of moving block. param: {Object} state Editor state. |
selectors_didAutomaticChange(state) X-Ref |
Returns true if the last change was an automatic change, false otherwise. return: {boolean} Whether the last change was automatic. param: {Object} state Global application state. |
isBlockHighlighted(state, clientId) X-Ref |
Returns true if the current highlighted block matches the block clientId. return: {boolean} Whether the block is currently highlighted. param: {Object} state Global application state. param: {string} clientId The block to check. |
areInnerBlocksControlled(state, clientId) X-Ref |
Checks if a given block has controlled inner blocks. return: {boolean} True if the block has controlled inner blocks. param: {Object} state Global application state. param: {string} clientId The block to check. |
actions_createForOfIteratorHelper(o, allowArrayLike) X-Ref |
No description |
actions_unsupportedIterableToArray(o, minLen) X-Ref |
No description |
actions_arrayLikeToArray(arr, len) X-Ref |
No description |
actions_ownKeys(object, enumerableOnly) X-Ref |
No description |
actions_objectSpread(target) X-Ref |
No description |
ensureDefaultBlock() X-Ref |
Generator which will yield a default block insert action if there are no other blocks at the root of the editor. This generator should be used in actions which may result in no blocks remaining in the editor (removal, replacement, etc). |
actions_resetBlocks(blocks) X-Ref |
Returns an action object used in signalling that blocks state should be reset to the specified array of blocks, taking precedence over any other content reflected as an edit in state. param: {Array} blocks Array of blocks. |
validateBlocksToTemplate(blocks) X-Ref |
Block validity is a function of blocks state (at the point of a reset) and the template setting. As a compromise to its placement across distinct parts of state, it is implemented here as a side- effect of the block reset action. param: {Array} blocks Array of blocks. |
actions_resetSelection(selectionStart, selectionEnd) X-Ref |
Returns an action object used in signalling that selection state should be reset to the specified selection. return: {Object} Action object. param: {WPBlockSelection} selectionStart The selection start. param: {WPBlockSelection} selectionEnd The selection end. |
receiveBlocks(blocks) X-Ref |
Returns an action object used in signalling that blocks have been received. Unlike resetBlocks, these should be appended to the existing known set, not replacing. return: {Object} Action object. param: {Object[]} blocks Array of block objects. |
actions_updateBlockAttributes(clientIds, attributes) X-Ref |
Returns an action object used in signalling that the multiple blocks' attributes with the specified client IDs have been updated. return: {Object} Action object. param: {string|string[]} clientIds Block client IDs. param: {Object} attributes Block attributes to be merged. |
actions_updateBlock(clientId, updates) X-Ref |
Returns an action object used in signalling that the block with the specified client ID has been updated. return: {Object} Action object. param: {string} clientId Block client ID. param: {Object} updates Block attributes to be merged. |
actions_selectBlock(clientId) X-Ref |
Returns an action object used in signalling that the block with the specified client ID has been selected, optionally accepting a position value reflecting its selection directionality. An initialPosition of -1 reflects a reverse selection. return: {Object} Action object. param: {string} clientId Block client ID. param: {?number} initialPosition Optional initial position. Pass as -1 to |
selectPreviousBlock(clientId) X-Ref |
Yields action objects used in signalling that the block preceding the given clientId should be selected. param: {string} clientId Block client ID. |
selectNextBlock(clientId) X-Ref |
Yields action objects used in signalling that the block following the given clientId should be selected. param: {string} clientId Block client ID. |
actions_startMultiSelect() X-Ref |
Returns an action object used in signalling that a block multi-selection has started. return: {Object} Action object. |
actions_stopMultiSelect() X-Ref |
Returns an action object used in signalling that block multi-selection stopped. return: {Object} Action object. |
actions_multiSelect(start, end) X-Ref |
Returns an action object used in signalling that block multi-selection changed. param: {string} start First block of the multi selection. param: {string} end Last block of the multiselection. |
actions_clearSelectedBlock() X-Ref |
Returns an action object used in signalling that the block selection is cleared. return: {Object} Action object. |
actions_toggleSelection() X-Ref |
Returns an action object that enables or disables block selection. return: {Object} Action object. param: {boolean} [isSelectionEnabled=true] Whether block selection should |
getBlocksWithDefaultStylesApplied(blocks, blockEditorSettings) X-Ref |
No description |
actions_replaceBlocks(clientIds, blocks, indexToSelect, initialPosition, meta) X-Ref |
Returns an action object signalling that a blocks should be replaced with one or more replacement blocks. param: {(string|string[])} clientIds Block client ID(s) to replace. param: {(Object|Object[])} blocks Replacement block(s). param: {number} indexToSelect Index of replacement block to select. param: {number} initialPosition Index of caret after in the selected block after the operation. param: {?Object} meta Optional Meta values to be passed to the action object. |
replaceBlock(clientId, block) X-Ref |
Returns an action object signalling that a single block should be replaced with one or more replacement blocks. return: {Object} Action object. param: {(string|string[])} clientId Block client ID to replace. param: {(Object|Object[])} block Replacement block(s). |
createOnMove(type) X-Ref |
Higher-order action creator which, given the action type to dispatch creates an action creator for managing block movement. return: {Function} Action creator. param: {string} type Action type to dispatch. |
actions_moveBlocksToPosition(clientIds) X-Ref |
Returns an action object signalling that the given blocks should be moved to a new position. param: {?string} clientIds The client IDs of the blocks. param: {?string} fromRootClientId Root client ID source. param: {?string} toRootClientId Root client ID destination. param: {number} index The index to move the blocks to. |
actions_moveBlockToPosition(clientId) X-Ref |
Returns an action object signalling that the given block should be moved to a new position. param: {?string} clientId The client ID of the block. param: {?string} fromRootClientId Root client ID source. param: {?string} toRootClientId Root client ID destination. param: {number} index The index to move the block to. |
actions_insertBlock(block, index, rootClientId) X-Ref |
Returns an action object used in signalling that a single block should be inserted, optionally at a specific index respective a root block list. return: {Object} Action object. param: {Object} block Block object to insert. param: {?number} index Index at which block should be inserted. param: {?string} rootClientId Optional root client ID of block list on which to insert. param: {?boolean} updateSelection If true block selection will be updated. If false, block selection will not change. Defaults to true. |
actions_insertBlocks(blocks, index, rootClientId) X-Ref |
Returns an action object used in signalling that an array of blocks should be inserted, optionally at a specific index respective a root block list. return: {Object} Action object. param: {Object[]} blocks Block objects to insert. param: {?number} index Index at which block should be inserted. param: {?string} rootClientId Optional root client ID of block list on which to insert. param: {?boolean} updateSelection If true block selection will be updated. If false, block selection will not change. Defaults to true. param: {?Object} meta Optional Meta values to be passed to the action object. |
actions_unstableSetInsertionPoint(rootClientId, index) X-Ref |
Sets the insertion point without showing it to users. Components like <Inserter> will default to inserting blocks at this point. return: {Object} Action object. param: {?string} rootClientId Root client ID of block list in which to param: {number} index Index at which block should be inserted. |
actions_showInsertionPoint(rootClientId, index) X-Ref |
Sets the insertion point and shows it to users. Components like <Inserter> will default to inserting blocks at this point. return: {Object} Action object. param: {?string} rootClientId Root client ID of block list in which to param: {number} index Index at which block should be inserted. |
actions_hideInsertionPoint() X-Ref |
Hides the insertion point for users. return: {Object} Action object. |
setTemplateValidity(isValid) X-Ref |
Returns an action object resetting the template validity. return: {Object} Action object. param: {boolean} isValid template validity flag. |
synchronizeTemplate() X-Ref |
Returns an action object synchronize the template with the list of blocks return: {Object} Action object. |
actions_mergeBlocks(firstBlockClientId, secondBlockClientId) X-Ref |
Returns an action object used in signalling that two blocks should be merged param: {string} firstBlockClientId Client ID of the first block to merge. param: {string} secondBlockClientId Client ID of the second block to merge. |
actions_removeBlocks(clientIds) X-Ref |
Yields action objects used in signalling that the blocks corresponding to the set of specified client IDs are to be removed. param: {string|string[]} clientIds Client IDs of blocks to remove. param: {boolean} selectPrevious True if the previous block should be |
actions_removeBlock(clientId, selectPrevious) X-Ref |
Returns an action object used in signalling that the block with the specified client ID is to be removed. return: {Object} Action object. param: {string} clientId Client ID of block to remove. param: {boolean} selectPrevious True if the previous block should be |
actions_replaceInnerBlocks(rootClientId, blocks) X-Ref |
Returns an action object used in signalling that the inner blocks with the specified client ID should be replaced. return: {Object} Action object. param: {string} rootClientId Client ID of the block whose InnerBlocks will re replaced. param: {Object[]} blocks Block objects to insert as new InnerBlocks param: {?boolean} updateSelection If true block selection will be updated. If false, block selection will not change. Defaults to false. |
toggleBlockMode(clientId) X-Ref |
Returns an action object used to toggle the block editing mode between visual and HTML modes. return: {Object} Action object. param: {string} clientId Block client ID. |
actions_startTyping() X-Ref |
Returns an action object used in signalling that the user has begun to type. return: {Object} Action object. |
actions_stopTyping() X-Ref |
Returns an action object used in signalling that the user has stopped typing. return: {Object} Action object. |
actions_startDraggingBlocks() X-Ref |
Returns an action object used in signalling that the user has begun to drag blocks. return: {Object} Action object. param: {string[]} clientIds An array of client ids being dragged |
actions_stopDraggingBlocks() X-Ref |
Returns an action object used in signalling that the user has stopped dragging blocks. return: {Object} Action object. |
actions_enterFormattedText() X-Ref |
Returns an action object used in signalling that the caret has entered formatted text. return: {Object} Action object. |
actions_exitFormattedText() X-Ref |
Returns an action object used in signalling that the user caret has exited formatted text. return: {Object} Action object. |
actions_selectionChange(clientId, attributeKey, startOffset, endOffset) X-Ref |
Returns an action object used in signalling that the user caret has changed position. return: {Object} Action object. param: {string} clientId The selected block client ID. param: {string} attributeKey The selected block attribute key. param: {number} startOffset The start offset. param: {number} endOffset The end offset. |
actions_insertDefaultBlock(attributes, rootClientId, index) X-Ref |
Returns an action object used in signalling that a new block of the default type should be added to the block list. return: {Object} Action object param: {?Object} attributes Optional attributes of the block to assign. param: {?string} rootClientId Optional root client ID of block list on which param: {?number} index Optional index where to insert the default block |
actions_updateBlockListSettings(clientId, settings) X-Ref |
Returns an action object that changes the nested settings of a given block. return: {Object} Action object param: {string} clientId Client ID of the block whose nested setting are param: {Object} settings Object with the new settings for the nested block. |
actions_updateSettings(settings) X-Ref |
Returns an action object used in signalling that the block editor settings have been updated. return: {Object} Action object param: {Object} settings Updated settings |
__unstableSaveReusableBlock(id, updatedId) X-Ref |
Returns an action object used in signalling that a temporary reusable blocks have been saved in order to switch its temporary id with the real id. return: {Object} Action object. param: {string} id Reusable block's id. param: {string} updatedId Updated block's id. |
actions_unstableMarkLastChangeAsPersistent() X-Ref |
Returns an action object used in signalling that the last block change should be marked explicitly as persistent. return: {Object} Action object. |
actions_unstableMarkNextChangeAsNotPersistent() X-Ref |
Returns an action object used in signalling that the next block change should be marked explicitly as not persistent. return: {Object} Action object. |
actions_unstableMarkAutomaticChange() X-Ref |
Returns an action object used in signalling that the last block change is an automatic change, meaning it was not performed by the user, and can be undone using the `Escape` and `Backspace` keys. This action must be called after the change was made, and any actions that are a consequence of it, so it is recommended to be called at the next idle period to ensure all selection changes have been recorded. |
__unstableMarkAutomaticChangeFinal() X-Ref |
No description |
actions_setNavigationMode() X-Ref |
Generators that triggers an action used to enable or disable the navigation mode. param: {string} isNavigationMode Enable/Disable navigation mode. |
actions_setBlockMovingClientId() X-Ref |
Generator that triggers an action used to enable or disable the block moving mode. param: {string|null} hasBlockMovingClientId Enable/Disable block moving mode. |
actions_duplicateBlocks(clientIds) X-Ref |
Generator that triggers an action used to duplicate a list of blocks. param: {string[]} clientIds param: {boolean} updateSelection |
actions_insertBeforeBlock(clientId) X-Ref |
Generator used to insert an empty block after a given block. param: {string} clientId |
actions_insertAfterBlock(clientId) X-Ref |
Generator used to insert an empty block before a given block. param: {string} clientId |
actions_toggleBlockHighlight(clientId, isHighlighted) X-Ref |
Returns an action object that toggles the highlighted block state. param: {string} clientId The block's clientId. param: {boolean} isHighlighted The highlight state. |
actions_flashBlock(clientId) X-Ref |
Yields action objects used in signalling that the block corresponding to the given clientId should appear to "flash" by rhythmically highlighting it. param: {string} clientId Target block client ID. |
actions_setHasControlledInnerBlocks(clientId, hasControlledInnerBlocks) X-Ref |
Returns an action object that sets whether the block has controlled innerblocks. param: {string} clientId The block's clientId. param: {boolean} hasControlledInnerBlocks True if the block's inner blocks are controlled. |
store_ownKeys(object, enumerableOnly) X-Ref |
No description |
store_objectSpread(target) X-Ref |
No description |
useBlockDisplayInformation(clientId) X-Ref |
Hook used to try to find a matching block variation and return the appropriate information for display reasons. In order to to try to find a match we need to things: 1. Block's client id to extract it's current attributes. 2. A block variation should have set `isActive` prop to a proper function. If for any reason a block variaton match cannot be found, the returned information come from the Block Type. If no blockType is found with the provided clientId, returns null. return: {?WPBlockDisplayInformation} Block's display information, or `null` when the block or its type not found. param: {string} clientId Block's client id. |
BlockTitle(_ref) X-Ref |
Renders the block's configured title as a string, or empty if the title cannot be determined. return: {?string} Block title. param: {Object} props param: {string} props.clientId Client ID of block. |
BlockBreadcrumb() X-Ref |
Block breadcrumb component, displaying the hierarchy of the current block selection as a breadcrumb. return: {WPElement} Block Breadcrumb. |
block_context_ownKeys(object, enumerableOnly) X-Ref |
No description |
block_context_objectSpread(target) X-Ref |
No description |
BlockContextProvider(_ref) X-Ref |
Component which merges passed value with current consumed block context. param: {BlockContextProviderProps} props |
block_edit_BlockEdit(props) X-Ref |
No description |
BlockFormatControlsSlot(props) X-Ref |
No description |
BlockFormatControlsFill(props) X-Ref |
No description |
useMovingAnimation(ref, isSelected, adjustScrolling, enableAnimation, triggerAnimationOnChange) X-Ref |
Hook used to compute the styles required to move a div into a new position. The way this animation works is the following: - It first renders the element as if there was no animation. - It takes a snapshot of the position of the block to use it as a destination point for the animation. - It restores the element to the previous position using a CSS transform - It uses the "resetAnimation" flag to reset the animation from the beginning in order to animate to the new destination point. param: {Object} ref Reference to the element to animate. param: {boolean} isSelected Whether it's the current block or not. param: {boolean} adjustScrolling Adjust the scroll position to the current block. param: {boolean} enableAnimation Enable/Disable animation. param: {*} triggerAnimationOnChange Variable used to trigger the animation if it changes. |
onFrameChange(_ref) X-Ref |
No description |
onFrame(_ref2) X-Ref |
No description |
BlockNavigationLeaf(_ref) X-Ref |
No description |
getBlockMoverDescription(selectedCount, type, firstIndex, isFirst, isLast, dir, orientation) X-Ref |
Return a label for the block movement controls depending on block position. return: {string} Label for the block movement controls. param: {number} selectedCount Number of blocks selected. param: {string} type Block type - in the case of a single block, should param: {number} firstIndex The index (position - 1) of the first block selected. param: {boolean} isFirst This is the first block. param: {boolean} isLast This is the last block. param: {number} dir Direction of movement (> 0 is considered to be going param: {string} orientation The orientation of the block movers, vertical or |
getMultiBlockMoverDescription(selectedCount, firstIndex, isFirst, isLast, dir) X-Ref |
Return a label for the block movement controls depending on block position. return: {string} Label for the block movement controls. param: {number} selectedCount Number of blocks selected. param: {number} firstIndex The index (position - 1) of the first block selected. param: {boolean} isFirst This is the first block. param: {boolean} isLast This is the last block. param: {number} dir Direction of movement (> 0 is considered to be going |
Warning(_ref) X-Ref |
No description |
BlockCompare(_ref) X-Ref |
No description |
getDifference(originalContent, newContent) X-Ref |
No description |
getConvertedContent(convertedBlock) X-Ref |
No description |
BlockInvalidWarning(_ref) X-Ref |
No description |
block_crash_boundary_createSuper(Derived) X-Ref |
No description |
block_crash_boundary_isNativeReflectConstruct() X-Ref |
No description |
BlockCrashBoundary() X-Ref |
No description |
BlockHTML(_ref) X-Ref |
No description |
Tips() X-Ref |
No description |
InserterSearchForm(_ref) X-Ref |
No description |
BlockCard(_ref) X-Ref |
No description |
useBlockSync(_ref) X-Ref |
useBlockSync is a side effect which handles bidirectional sync between the block-editor store and a controlling data source which provides blocks. This is most commonly used by the BlockEditorProvider to synchronize the contents of the block-editor store with the root entity, like a post. Another example would be the template part block, which provides blocks from a separate entity data source than a root entity. This hook syncs edits to the template part in the block editor back to the entity and vice-versa. Here are some of its basic functions: - Initalizes the block-editor store for the given clientID to the blocks given via props. - Adds incoming changes (like undo) to the block-editor store. - Adds outgoing changes (like editing content) to the controlling entity, determining if a change should be considered persistent or not. - Handles edge cases and race conditions which occur in those operations. - Ignores changes which happen to other entities (like nested inner block controllers. - Passes selection state from the block-editor store to the controlling entity. param: {Object} props Props for the block sync hook param: {string} props.clientId The client ID of the inner block controller. param: {Object[]} props.value The control value for the blocks. This value param: {Object} props.selectionStart The selection start vlaue from the param: {Object} props.selectionEnd The selection end vlaue from the param: {onBlockUpdate} props.onChange Function to call when a persistent param: {onBlockUpdate} props.onInput Function to call when a non-persistent |
BlockEditorProvider(props) X-Ref |
No description |
LiveBlockPreview(_ref) X-Ref |
Internal dependencies |
AutoBlockPreview(_ref) X-Ref |
No description |
BlockPreview(_ref) X-Ref |
No description |
preview_panel_ownKeys(object, enumerableOnly) X-Ref |
No description |
preview_panel_objectSpread(target) X-Ref |
No description |
InserterPreviewPanel(_ref) X-Ref |
No description |
BlockDraggableChip(_ref) X-Ref |
Internal dependencies |
InserterListItem(_ref) X-Ref |
No description |
BlockTypesList(_ref) X-Ref |
No description |
InserterPanel(_ref) X-Ref |
WordPress dependencies |
block_types_tab_ownKeys(object, enumerableOnly) X-Ref |
No description |
block_types_tab_objectSpread(target) X-Ref |
No description |
BlockTypesTab(_ref) X-Ref |
No description |
PatternInserterPanel(_ref) X-Ref |
No description |
BlockPattern(_ref) X-Ref |
No description |
BlockPatternPlaceholder() X-Ref |
No description |
BlockPatternList(_ref3) X-Ref |
No description |
BlockPatternsCategory(_ref) X-Ref |
No description |
BlockPatternsTabs(_ref3) X-Ref |
No description |
InserterNoResults() X-Ref |
No description |
ReusableBlocksList(_ref) X-Ref |
No description |
ReusableBlocksTab(_ref3) X-Ref |
List of reusable blocks shown in the "Reusable" tab of the inserter. return: {WPComponent} The component. param: {Object} props Component props. param: {?string} props.rootClientId Client id of block to insert into. param: {Function} props.onInsert Callback to run when item is inserted. param: {Function} props.onHover Callback to run when item is hovered. |
useInsertionPoint(_ref) X-Ref |
Returns the insertion point state given the inserter config. return: {Array} Insertion Point State (rootClientID, onInsertBlocks and onToggle). param: {WPInserterConfig} config Inserter Config. |
InserterSearchResults(_ref) X-Ref |
No description |
InserterTabs(_ref) X-Ref |
No description |
InserterMenu(_ref) X-Ref |
No description |
QuickInserter(_ref) X-Ref |
No description |
inserter_createSuper(Derived) X-Ref |
No description |
inserter_isNativeReflectConstruct() X-Ref |
No description |
handleClick(event) X-Ref |
No description |
Inserter() X-Ref |
No description |
getInsertionIndex() X-Ref |
No description |
default_block_appender_DefaultBlockAppender(_ref) X-Ref |
Internal dependencies |
button_block_appender_ButtonBlockAppender(_ref, ref) X-Ref |
No description |
stopPropagation(event) X-Ref |
No description |
BlockListAppender(_ref) X-Ref |
No description |
parseDropEvent(event) X-Ref |
Retrieve the data for a block drop event. return: {Object} An object with block drag and drop data. param: {WPSyntheticEvent} event The drop event. |
onBlockDrop(targetRootClientId, targetBlockIndex, getBlockIndex, getClientIdsOfDescendants, moveBlocksToPosition, insertBlocks, clearSelectedBlock) X-Ref |
A function that returns an event handler function for block drop events. return: {Function} The event handler for a block drop event. param: {string} targetRootClientId The root client id where the block(s) will be inserted. param: {number} targetBlockIndex The index where the block(s) will be inserted. param: {Function} getBlockIndex A function that gets the index of a block. param: {Function} getClientIdsOfDescendants A function that gets the client ids of descendant blocks. param: {Function} moveBlocksToPosition A function that moves blocks. param: {Function} insertBlocks A function that inserts blocks. param: {Function} clearSelectedBlock A function that clears block selection. |
onFilesDrop(targetRootClientId, targetBlockIndex, hasUploadPermissions, updateBlockAttributes, canInsertBlockType, insertBlocks) X-Ref |
A function that returns an event handler function for block-related file drop events. return: {Function} The event handler for a block-related file drop event. param: {string} targetRootClientId The root client id where the block(s) will be inserted. param: {number} targetBlockIndex The index where the block(s) will be inserted. param: {boolean} hasUploadPermissions Whether the user has upload permissions. param: {Function} updateBlockAttributes A function that updates a block's attributes. param: {Function} canInsertBlockType A function that returns checks whether a block type can be inserted. param: {Function} insertBlocks A function that inserts blocks. |
use_on_block_drop_onHTMLDrop(targetRootClientId, targetBlockIndex, insertBlocks) X-Ref |
A function that returns an event handler function for block-related HTML drop events. return: {Function} The event handler for a block-related HTML drop event. param: {string} targetRootClientId The root client id where the block(s) will be inserted. param: {number} targetBlockIndex The index where the block(s) will be inserted. param: {Function} insertBlocks A function that inserts blocks. |
useOnBlockDrop(targetRootClientId, targetBlockIndex) X-Ref |
A React hook for handling block drop events. return: {Object} An object that contains the event handlers `onDrop`, `onFilesDrop` and `onHTMLDrop`. param: {string} targetRootClientId The root client id where the block(s) will be inserted. param: {number} targetBlockIndex The index where the block(s) will be inserted. |
getDistanceFromPointToEdge(point, rect, edge) X-Ref |
Given a point, a DOMRect and the name of an edge, returns the distance to that edge of the rect. This function works for edges that are horizontal or vertical (e.g. not rotated), the following terms are used so that the function works in both orientations: - Forward, meaning the axis running horizontally when an edge is vertical and vertically when an edge is horizontal. - Lateral, meaning the axis running vertically when an edge is vertical and horizontally when an edge is horizontal. param: {WPPoint} point The point to measure distance from. param: {DOMRect} rect A DOM Rect containing edge positions. param: {WPEdgeName} edge The edge to measure to. |
getDistanceToNearestEdge(point, rect) X-Ref |
Given a point, a DOMRect and a list of allowed edges returns the name of and distance to the nearest edge. return: {[number, string]} An array where the first value is the distance param: {WPPoint} point The point to measure distance from. param: {DOMRect} rect A DOM Rect containing edge positions. param: {WPEdgeName[]} allowedEdges A list of the edges included in the |
use_block_drop_zone_ownKeys(object, enumerableOnly) X-Ref |
No description |
use_block_drop_zone_objectSpread(target) X-Ref |
No description |
getNearestBlockIndex(elements, position, orientation) X-Ref |
Given a list of block DOM elements finds the index that a block should be dropped at. return: {number|undefined} The block index that's closest to the drag position. param: {Element[]} elements Array of DOM elements that represent each block in a block list. param: {WPPoint} position The position of the item being dragged. param: {WPBlockListOrientation} orientation The orientation of a block list. |
useBlockDropZone(_ref) X-Ref |
A React hook that can be used to make a block list handle drag and drop. return: {number|undefined} The block index that's closest to the drag position. param: {WPBlockDropZoneConfig} dropZoneConfig configuration data for the drop zone. |
InsertionPointInserter(_ref) X-Ref |
No description |
InsertionPointPopover(_ref2) X-Ref |
No description |
onClick(event) X-Ref |
No description |
onFocus(event) X-Ref |
No description |
insertion_point_useInsertionPoint(ref) X-Ref |
No description |
isWindows() X-Ref |
Returns true if the user is using windows. return: {boolean} Whether the user is using Windows. |
block_selection_button_selector(select) X-Ref |
No description |
BlockSelectionButton(_ref) X-Ref |
Block selection button component, displaying the label of the block. If the block descends from a root block, a button is displayed enabling the user to select the root block. return: {WPComponent} The component to be rendered. param: {string} props Component props. param: {string} props.clientId Client ID of block. |
onKeyDown(event) X-Ref |
No description |
hasOnlyToolbarItem(elements) X-Ref |
No description |
getAllToolbarItemsIn(container) X-Ref |
No description |
hasFocusWithin(container) X-Ref |
No description |
focusFirstTabbableIn(container) X-Ref |
No description |
useIsAccessibleToolbar(ref) X-Ref |
No description |
useToolbarFocus(ref, focusOnMount, isAccessibleToolbar, defaultIndex, onIndexChange) X-Ref |
No description |
NavigableToolbar(_ref) X-Ref |
No description |
useScrollWhenDragging() X-Ref |
React hook that scrolls the scroll container when a block is being dragged. return: {Function[]} `startScrolling`, `scrollOnDragOver`, `stopScrolling` |
BlockMover(_ref) X-Ref |
No description |
BlockParentSelector() X-Ref |
Block parent selector component, displaying the hierarchy of the current block selection as a single icon to "go up" a level. return: {WPComponent} Parent block selector. |
PreviewBlockPopover(_ref) X-Ref |
Internal dependencies |
utils_createForOfIteratorHelper(o, allowArrayLike) X-Ref |
No description |
utils_unsupportedIterableToArray(o, minLen) X-Ref |
No description |
utils_arrayLikeToArray(arr, len) X-Ref |
No description |
getActiveStyle(styles, className) X-Ref |
Returns the active style from the given className. return: {Object?} The active style. param: {Array} styles Block style variations. param: {string} className Class name |
replaceActiveStyle(className, activeStyle, newStyle) X-Ref |
Replaces the active style in the block's className. return: {string} The updated className. param: {string} className Class name. param: {Object?} activeStyle The replaced style. param: {Object} newStyle The replacing style. |
block_styles_ownKeys(object, enumerableOnly) X-Ref |
No description |
block_styles_objectSpread(target) X-Ref |
No description |
BlockStyles(_ref) X-Ref |
No description |
BlockStyleItem(_ref2) X-Ref |
No description |
block_styles_menu_ownKeys(object, enumerableOnly) X-Ref |
No description |
block_styles_menu_objectSpread(target) X-Ref |
No description |
BlockStylesMenu(_ref) X-Ref |
No description |
block_switcher_ownKeys(object, enumerableOnly) X-Ref |
No description |
block_switcher_objectSpread(target) X-Ref |
No description |
getPasteEventData(_ref) X-Ref |
WordPress dependencies |
useNotifyCopy() X-Ref |
Internal dependencies |
useClipboardHandler(ref) X-Ref |
No description |
handler(event) X-Ref |
No description |
CopyHandler(_ref) X-Ref |
No description |
BlockActions(_ref) X-Ref |
Internal dependencies |
BlockModeToggle(_ref) X-Ref |
No description |
BlockConvertButton(_ref) X-Ref |
WordPress dependencies |
useConvertToGroupButtonProps() X-Ref |
Returns the properties `ConvertToGroupButton` component needs to work properly. It is used in `BlockSettingsMenuControls` to know if `ConvertToGroupButton` should be rendered, to avoid ending up with an empty MenuGroup. return: {ConvertToGroupButtonProps} Returns the properties needed by `ConvertToGroupButton`. |
ConvertToGroupButton(_ref) X-Ref |
No description |
block_settings_menu_controls_ownKeys(object, enumerableOnly) X-Ref |
No description |
block_settings_menu_controls_objectSpread(target) X-Ref |
No description |
BlockSettingsDropdown(_ref) X-Ref |
No description |
BlockSettingsMenu(_ref) X-Ref |
Internal dependencies |
useDebouncedShowMovers(_ref) X-Ref |
Hook that creates a showMover state, as well as debounced show/hide callbacks. param: {Object} props Component props. param: {Object} props.ref Element reference. param: {boolean} props.isFocused Whether the component has current focus. param: {number} [props.debounceTimeout=250] Debounce timeout in milliseconds. param: {Function} [props.onChange=noop] Callback function. |
useShowMoversGestures(_ref2) X-Ref |
Hook that provides a showMovers state and gesture events for DOM elements that interact with the showMovers state. param: {Object} props Component props. param: {Object} props.ref Element reference. param: {number} [props.debounceTimeout=250] Debounce timeout in milliseconds. param: {Function} [props.onChange=noop] Callback function. |
BlockToolbar(_ref) X-Ref |
No description |
BlockContextualToolbar(_ref) X-Ref |
No description |
block_popover_selector(select) X-Ref |
No description |
BlockPopover(_ref) X-Ref |
No description |
onFocus() X-Ref |
No description |
onBlur() X-Ref |
No description |
wrapperSelector(select) X-Ref |
No description |
WrappedBlockPopover() X-Ref |
No description |
BlockList(_ref) X-Ref |
No description |
Items(_ref2) X-Ref |
No description |
selector(select) X-Ref |
No description |
BlockListItems(props) X-Ref |
No description |
useInitialPosition(clientId) X-Ref |
Returns the initial position if the block needs to be focussed, `undefined` otherwise. The initial position is either 0 (start) or -1 (end). return: {number} The initial position, either 0 (start) or -1 (end). param: {string} clientId Block client ID. |
useFocusFirstElement(ref, clientId) X-Ref |
Transitions focus to the block or inner tabbable when the block becomes selected. param: {RefObject} ref React ref with the block element. param: {string} clientId Block client ID. |
useIsHovered(ref) X-Ref |
Returns true when the block is hovered and in navigation or outline mode, false if not. return: {boolean} Hovered state. param: {RefObject} ref React ref with the block element. |
addListener(eventType, value) X-Ref |
No description |
listener(event) X-Ref |
No description |
useBlockMovingModeClassNames(clientId) X-Ref |
Returns the class names used for block moving mode. return: {string} The class names. param: {string} clientId The block client ID to insert above. |
onFocus() X-Ref |
No description |
getDeepestNode(node, type) X-Ref |
Returns for the deepest node at the start or end of a container node. Ignores any text nodes that only contain HTML formatting whitespace. param: {Element} node Container to search. param: {string} type 'start' or 'end'. |
use_multi_selection_selector(select) X-Ref |
No description |
toggleRichText(container, toggle) X-Ref |
No description |
useMultiSelection(ref) X-Ref |
No description |
writing_flow_getComputedStyle(node) X-Ref |
No description |
isNavigationCandidate(element, keyCode, hasModifier) X-Ref |
Returns true if the element should consider edge navigation upon a keyboard event of the given directional key code, or false otherwise. return: {boolean} Whether element should consider edge navigation. param: {Element} element HTML element to test. param: {number} keyCode KeyboardEvent keyCode to test. param: {boolean} hasModifier Whether a modifier is pressed. |
getClosestTabbable(target, isReverse, containerElement, onlyVertical) X-Ref |
Returns the optimal tab target from the given focused element in the desired direction. A preference is made toward text fields, falling back to the block focus stop if no other candidates exist for the block. return: {?Element} Optimal tab target, if one exists. param: {Element} target Currently focused text field. param: {boolean} isReverse True if considering as the first field. param: {Element} containerElement Element containing all blocks. param: {boolean} onlyVertical Whether to only consider tabbable elements |
isTabCandidate(node, i, array) X-Ref |
No description |
writing_flow_selector(select) X-Ref |
No description |
WritingFlow(_ref) X-Ref |
Handles selection and navigation across blocks. This component should be wrapped around BlockList. param: {Object} props Component properties. param: {WPElement} props.children Children to be rendered. |
onMouseDown(event) X-Ref |
No description |
expandSelection(isReverse) X-Ref |
No description |
moveSelection(isReverse) X-Ref |
No description |
isTabbableEdge(target, isReverse) X-Ref |
Returns true if the given target field is the last in its block which can be considered for tab transition. For example, in a block with two text fields, this would return true when reversing from the first of the two fields, but false when reversing from the second. return: {boolean} Whether field is at edge for tab transition. param: {Element} target Currently focused text field. param: {boolean} isReverse True if considering as the first field. |
onKeyDown(event) X-Ref |
No description |
onMultiSelectKeyDown(event) X-Ref |
No description |
useEventHandlers(ref, clientId) X-Ref |
Adds block behaviour: - Selects the block if it receives focus. - Removes the block on BACKSPACE. - Inserts a default block on ENTER. - Initiates selection start for multi-selection. - Disables dragging of block contents. param: {RefObject} ref React ref with the block element. param: {string} clientId Block client ID. |
onFocus(event) X-Ref |
Marks the block as selected when focused and not already selected. This specifically handles the case where block does not set focus on its own (via `setFocus`), typically if there is no focusable input in the block. param: {FocusEvent} event Focus event. |
onKeyDown(event) X-Ref |
Interprets keydown event intent to remove or insert after block if key event occurs on wrapper node. This can occur when the block has no text fields of its own, particularly after initial insertion, to allow for easy deletion and continuous writing flow to add additional content. param: {KeyboardEvent} event Keydown event. |
onMouseLeave(_ref) X-Ref |
No description |
onDragStart(event) X-Ref |
Prevents default dragging behavior within a block. To do: we must handle this in the future and clean up the drag target. param: {DragEvent} event Drag event. |
use_block_props_ownKeys(object, enumerableOnly) X-Ref |
No description |
use_block_props_objectSpread(target) X-Ref |
No description |
useBlockProps() X-Ref |
This hook is used to lightly mark an element as a block element. The element should be the outermost element of a block. Call this hook and pass the returned props to the element to mark as a block. If you define a ref for the element, it is important to pass the ref to this hook, which the hook in turn will pass to the component through the props it returns. Optionally, you can also pass any other props through this hook, and they will be merged and returned. return: {Object} Props to pass to the element to mark as a block. param: {Object} props Optional. Props to pass to the element. Must contain param: {Object} options Options for internal use only. param: {boolean} options.__unstableIsHtml |
block_ownKeys(object, enumerableOnly) X-Ref |
No description |
block_objectSpread(target) X-Ref |
No description |
mergeWrapperProps(propsA, propsB) X-Ref |
Merges wrapper props with special handling for classNames and styles. return: {Object} Merged props. param: {Object} propsA param: {Object} propsB |
Block(_ref) X-Ref |
No description |
block_BlockListBlock(_ref2) X-Ref |
No description |
Indentation(_ref) X-Ref |
No description |
BlockNavigationBlockSelectButton(_ref, ref) X-Ref |
No description |
block_slot_ownKeys(object, enumerableOnly) X-Ref |
No description |
block_slot_objectSpread(target) X-Ref |
No description |
BlockNavigationBlockSlot(props, ref) X-Ref |
No description |
block_createForOfIteratorHelper(o, allowArrayLike) X-Ref |
No description |
block_unsupportedIterableToArray(o, minLen) X-Ref |
No description |
block_arrayLikeToArray(arr, len) X-Ref |
No description |
BlockNavigationBlock(_ref) X-Ref |
No description |
BlockNavigationAppender(_ref) X-Ref |
No description |
BlockNavigationBranch(props) X-Ref |
No description |
use_block_navigation_drop_zone_ownKeys(object, enumerableOnly) X-Ref |
No description |
use_block_navigation_drop_zone_objectSpread(target) X-Ref |
No description |
use_block_navigation_drop_zone_createForOfIteratorHelper(o, allowArrayLike) X-Ref |
No description |
use_block_navigation_drop_zone_unsupportedIterableToArray(o, minLen) X-Ref |
No description |
use_block_navigation_drop_zone_arrayLikeToArray(arr, len) X-Ref |
No description |
useDropTargetBlocksData(ref, position, dragEventType) X-Ref |
A react hook that returns data about blocks used for computing where a user can drop to when dragging and dropping blocks. return: {RefObject<WPBlockNavigationDropZoneBlocks>} A React ref containing the blocks data. param: {Object} ref A React ref of a containing element for block navigation. param: {WPPoint} position The current drag position. param: {WPDragEventType} dragEventType The drag event type. |
isPointContainedByRect(point, rect) X-Ref |
Is the point contained by the rectangle. return: {boolean} True if the point is contained by the rectangle, false otherwise. param: {WPPoint} point The point. param: {DOMRect} rect The rectangle. |
isNestingGesture(point, rect) X-Ref |
Determines whether the user positioning the dragged block to nest as an inner block. Presently this is determined by whether the cursor is on the right hand side of the block. param: {WPPoint} point The point representing the cursor position when dragging. param: {DOMRect} rect The rectangle. |
getBlockNavigationDropTarget(blocksData, position) X-Ref |
Given blocks data and the cursor position, compute the drop target. return: {WPBlockNavigationDropZoneTarget} An object containing data about the drop target. param: {WPBlockNavigationDropZoneBlocks} blocksData Data about the blocks in block navigation. param: {WPPoint} position The point representing the cursor position when dragging. |
useBlockNavigationDropZone(ref) X-Ref |
A react hook for implementing a drop zone in block navigation. return: {WPBlockNavigationDropZoneTarget} The drop target. param: {Object} ref A React ref of a containing element for block navigation. |
BlockNavigationTree(_ref) X-Ref |
Wrap `BlockNavigationRows` with `TreeGrid`. BlockNavigationRows is a recursive component (it renders itself), so this ensures TreeGrid is only present at the very top of the navigation grid. param: {Object} props Components props. param: {Object} props.__experimentalFeatures Object used in context provider. |
BlockNavigation(_ref) X-Ref |
No description |
BlockNavigationDropdownToggle(_ref) X-Ref |
No description |
BlockNavigationDropdown(_ref2, ref) X-Ref |
No description |
filePasteHandler(files) X-Ref |
WordPress dependencies |
rich_text_ownKeys(object, enumerableOnly) X-Ref |
No description |
rich_text_objectSpread(target) X-Ref |
No description |
getMultilineTag(multiline) X-Ref |
Get the multiline tag based on the multiline prop. return: {?string} The multiline tag. param: {?(string|boolean)} multiline The multiline prop. |
getAllowedFormats(_ref) X-Ref |
No description |
RichTextWrapper(_ref2, forwardedRef) X-Ref |
No description |
BlockNavigationEditor(_ref) X-Ref |
No description |
BlockVariationPicker(_ref) X-Ref |
No description |
block_variation_transforms_ownKeys(object, enumerableOnly) X-Ref |
No description |
block_variation_transforms_objectSpread(target) X-Ref |
No description |
__experimentalBlockVariationTransforms(_ref) X-Ref |
No description |
block_vertical_alignment_toolbar_ownKeys(object, enumerableOnly) X-Ref |
No description |
block_vertical_alignment_toolbar_objectSpread(target) X-Ref |
No description |
BlockVerticalAlignmentToolbar(_ref) X-Ref |
No description |
applyOrUnset(align) X-Ref |
No description |
with_color_context_ownKeys(object, enumerableOnly) X-Ref |
with_color_context_objectSpread(target) X-Ref |
No description |
ColorPaletteControl(_ref) X-Ref |
Internal dependencies |
GradientPickerWithGradients(props) X-Ref |
No description |
GradientPickerControl(_ref) X-Ref |
No description |
GradientPanel(props) X-Ref |
No description |
ImageSizeControl(_ref) X-Ref |
No description |
updateDimensions(nextWidth, nextHeight) X-Ref |
No description |
useNestedSettingsUpdate(clientId, allowedBlocks, templateLock, captureToolbars, orientation) X-Ref |
This hook is a side effect which updates the block-editor store when changes happen to inner block settings. The given props are transformed into a settings object, and if that is different from the current settings object in the block-editor store, then the store is updated with the new settings which came from props. param: {string} clientId The client ID of the block to update. param: {string[]} allowedBlocks An array of block names which are permitted param: {string} [templateLock] The template lock specified for the inner param: {boolean} captureToolbars Whether or children toolbars should be shown param: {string} orientation The direction in which the block |
useInnerBlockTemplateSync(clientId, template, templateLock, templateInsertUpdatesSelection) X-Ref |
This hook makes sure that a block's inner blocks stay in sync with the given block "template". The template is a block hierarchy to which inner blocks must conform. If the blocks get "out of sync" with the template and the template is meant to be locked (e.g. templateLock = "all"), then we replace the inner blocks with the correct value after synchronizing it with the template. param: {string} clientId The block client ID. param: {Object} template The template to match. param: {string} templateLock The template lock state for the inner blocks. For param: {boolean} templateInsertUpdatesSelection Whether or not to update the |
getBlockContext(attributes, blockType) X-Ref |
Returns a cached context object value for a given set of attributes for the block type. return: {Record<string,*>} Context value. param: {Record<string,*>} attributes Block attributes object. param: {WPBlockType} blockType Block type settings. |
inner_blocks_ownKeys(object, enumerableOnly) X-Ref |
No description |
inner_blocks_objectSpread(target) X-Ref |
No description |
UncontrolledInnerBlocks(props) X-Ref |
InnerBlocks is a component which allows a single block to have multiple blocks as children. The UncontrolledInnerBlocks component is used whenever the inner blocks are not controlled by another entity. In other words, it is normally used for inner blocks in the post editor param: {Object} props The component props. |
ControlledInnerBlocks(props) X-Ref |
The controlled inner blocks component wraps the uncontrolled inner blocks component with the blockSync hook. This keeps the innerBlocks of the block in the block-editor store in sync with the blocks of the controlling entity. An example of an inner block controller is a template part block, which provides its own blocks from the template part entity data source. param: {Object} props The component props. |
useInnerBlocksProps() X-Ref |
This hook is used to lightly mark an element as an inner blocks wrapper element. Call this hook and pass the returned props to the element to mark as an inner blocks wrapper, automatically rendering inner blocks as children. If you define a ref for the element, it is important to pass the ref to this hook, which the hook in turn will pass to the component through the props it returns. Optionally, you can also pass any other props through this hook, and they will be merged and returned. param: {Object} props Optional. Props to pass to the element. Must contain param: {Object} options Optional. Inner blocks options. |
settings_drawer_ownKeys(object, enumerableOnly) X-Ref |
settings_drawer_objectSpread(target) X-Ref |
No description |
url_input_createSuper(Derived) X-Ref |
No description |
url_input_isNativeReflectConstruct() X-Ref |
No description |
URLInput(props) X-Ref |
No description |
LinkControlSearchResults(_ref) X-Ref |
No description |
isURLLike(val) X-Ref |
Determines whether a given value could be a URL. Note this does not guarantee the value is a URL only that it looks like it might be one. For example, just because a string has `www.` in it doesn't make it a URL, but it does make it highly likely that it will be so in the context of creating a link it makes sense to treat it like one. return: {boolean} whether or not the value is potentially a URL. param: {string} val the candidate for being URL-like (or not). |
use_search_handler_ownKeys(object, enumerableOnly) X-Ref |
No description |
use_search_handler_objectSpread(target) X-Ref |
No description |
useSearchHandler(suggestionsQuery, allowDirectEntry, withCreateSuggestion, withURLSuggestion) X-Ref |
No description |
search_input_ownKeys(object, enumerableOnly) X-Ref |
No description |
search_input_objectSpread(target) X-Ref |
No description |
LinkPreview(_ref) X-Ref |
Internal dependencies |
useCreatePage(handleCreatePage) X-Ref |
WordPress dependencies |
LinkControl(_ref) X-Ref |
Renders a link control. A link control is a controlled input which maintains a value associated with a link (HTML anchor element) and relevant settings for how that link is expected to behave. param: {WPLinkControlProps} props Component props. |
stopEditing() X-Ref |
Cancels editing state and marks that focus may need to be restored after the next render, if focus was within the wrapper when editing finished. |
MediaUploadCheck(_ref) X-Ref |
WordPress dependencies |
LinkViewerURL(_ref) X-Ref |
No description |
LinkViewer(_ref) X-Ref |
Internal dependencies |
LinkEditor(_ref) X-Ref |
Internal dependencies |
URLPopover(_ref) X-Ref |
No description |
MediaPlaceholder(_ref2) X-Ref |
No description |
ResponsiveBlockControlLabel(_ref) X-Ref |
No description |
ResponsiveBlockControl(props) X-Ref |
No description |
RichTextShortcut(_ref) X-Ref |
WordPress dependencies |
RichTextToolbarButton(_ref) X-Ref |
WordPress dependencies |
input_event_createSuper(Derived) X-Ref |
No description |
input_event_isNativeReflectConstruct() X-Ref |
No description |
__unstableRichTextInputEvent() X-Ref |
No description |
ToolSelector(props, ref) X-Ref |
No description |
button_createSuper(Derived) X-Ref |
No description |
button_isNativeReflectConstruct() X-Ref |
No description |
URLInputButton() X-Ref |
No description |
PreviewOptions(_ref) X-Ref |
No description |
getStyleSheetsThatMatchHostname() X-Ref |
No description |
isReplaceableMediaRule(rule) X-Ref |
No description |
replaceRule(styleSheet, newRuleText, index) X-Ref |
No description |
replaceMediaQueryWithWidthEvaluation(ruleText, widthValue) X-Ref |
No description |
useSimulatedMediaQuery(marker, width) X-Ref |
Function that manipulates media queries from stylesheets to simulate a given viewport width. param: {string} marker CSS selector string defining start and end of param: {number?} width Viewport width to simulate. If provided null, the |
useResizeCanvas(deviceType, __unstableDisableSimulation) X-Ref |
Function to resize the editor window. return: {Object} Inline styles to be added to resizable container. param: {string} deviceType Used for determining the size of the container (e.g. Desktop, Tablet, Mobile) param: {boolean} __unstableDisableSimulation Whether to disable media query simulation. |
MultiSelectionInspector(_ref) X-Ref |
No description |
DefaultStylePicker(_ref) X-Ref |
No description |
block_wrapper_ownKeys(object, enumerableOnly) X-Ref |
No description |
block_wrapper_objectSpread(target) X-Ref |
No description |
useBlockSelectionClearer(ref) X-Ref |
WordPress dependencies |
onMouseDown(event) X-Ref |
No description |
BlockSelectionClearer(props) X-Ref |
No description |
updatePosition(str) X-Ref |
Update lineno and column based on `str`. |
position() X-Ref |
Mark position and patch `node.position`. |
Position(start) X-Ref |
Store position information for a node |
error(msg) X-Ref |
No description |
stylesheet() X-Ref |
Parse stylesheet. |
open() X-Ref |
Opening brace. |
close() X-Ref |
Closing brace. |
rules() X-Ref |
Parse ruleset. |
match(re) X-Ref |
Match `re` and return captures. |
whitespace() X-Ref |
Parse whitespace. |
comments(accumulator) X-Ref |
Parse comments; |
comment() X-Ref |
Parse comment. |
selector() X-Ref |
Parse selector. |
declaration() X-Ref |
Parse declaration. |
declarations() X-Ref |
Parse declarations. |
keyframe() X-Ref |
Parse keyframe. |
atkeyframes() X-Ref |
Parse keyframes. |
atsupports() X-Ref |
Parse supports. |
athost() X-Ref |
Parse host. |
atmedia() X-Ref |
Parse media. |
atcustommedia() X-Ref |
Parse custom-media. |
atpage() X-Ref |
Parse paged media. |
atdocument() X-Ref |
Parse document. |
atfontface() X-Ref |
Parse font-face. |
_compileAtrule(name) X-Ref |
Parse non-block at-rules |
atrule() X-Ref |
Parse at rule. |
rule() X-Ref |
Parse rule. |
trim(str) X-Ref |
Trim `str`. |
addParent(obj, parent) X-Ref |
Adds non-enumerable parent node reference to each node. |
Compiler(opts) X-Ref |
Initialize a compiler. |
compress_Compiler(options) X-Ref |
Initialize a new `Compiler`. |
identity_Compiler(options) X-Ref |
Initialize a new `Compiler`. |
traverseCSS(css, callback) X-Ref |
No description |
url_rewrite_ownKeys(object, enumerableOnly) X-Ref |
No description |
url_rewrite_objectSpread(target) X-Ref |
No description |
isRemotePath(filePath) X-Ref |
Return `true` if the given path is http/https. return: {boolean} is remote path. param: {string} filePath path |
isAbsolutePath(filePath) X-Ref |
Return `true` if the given filePath is an absolute url. return: {boolean} is absolute path. param: {string} filePath path |
isValidURL(meta) X-Ref |
Whether or not the url should be inluded. return: {boolean} is valid. param: {Object} meta url meta info |
getResourcePath(str, baseURL) X-Ref |
Get the absolute path of the url, relative to the basePath return: {string} the full path to the file param: {string} str the url param: {string} baseURL base URL |
processURL(baseURL) X-Ref |
Process the single `url()` pattern return: {Promise} the Promise param: {string} baseURL the base URL for relative URLs |
getURLs(value) X-Ref |
Get all `url()`s, and return the meta info return: {Array} the urls param: {string} value decl.value |
replaceURLs(raw, URLs) X-Ref |
Replace the raw value's `url()` segment to the new value return: {string} the new value param: {string} raw the raw value param: {Array} URLs the URLs to replace |
wrap_ownKeys(object, enumerableOnly) X-Ref |
No description |
wrap_objectSpread(target) X-Ref |
No description |
syncDarkThemeBodyClassname(node) X-Ref |
No description |
useEditorStyles(styles) X-Ref |
No description |
InserterLibrary(_ref) X-Ref |
No description |
KeyboardShortcuts() X-Ref |
No description |
KeyboardShortcutsRegister() X-Ref |
No description |
useScrollMultiSelectionIntoView(ref) X-Ref |
Internal dependencies |
MultiSelectScrollIntoView() X-Ref |
Scrolls the multi block selection end into view if not in view already. This is important to do after selection by keyboard. |
isKeyDownEligibleForStartTyping(event) X-Ref |
Returns true if a given keydown event can be inferred as intent to start typing, or false otherwise. A keydown is considered eligible if it is a text navigation without shift active. return: {boolean} Whether event is eligible to start typing. param: {KeyboardEvent} event Keydown event to test. |
useMouseMoveTypingReset(ref) X-Ref |
Removes the `isTyping` flag when the mouse moves in the document of the given element. param: {RefObject} ref React ref containing an element. |
stopTypingOnMouseMove(event) X-Ref |
On mouse move, unset typing flag if user has moved cursor. param: {MouseEvent} event Mousemove event. |
useTypingObserver(ref) X-Ref |
Sets and removes the `isTyping` flag based on user actions: - Sets the flag if the user types within the given element. - Removes the flag when the user selects some text, focusses a non-text field, presses ESC or TAB, or moves the mouse in the document. param: {RefObject} ref React ref containing an element. |
stopTypingOnNonTextField(event) X-Ref |
Stops typing when focus transitions to a non-text field element. param: {FocusEvent} event Focus event. |
stopTypingOnEscapeKey(event) X-Ref |
Unsets typing flag if user presses Escape while typing flag is active. param: {KeyboardEvent} event Keypress or keydown event to |
stopTypingOnSelectionUncollapse() X-Ref |
On selection change, unset typing flag if user has made an uncollapsed (shift) selection. |
startTypingInTextField(event) X-Ref |
Handles a keypress or keydown event to infer intention to start typing. param: {KeyboardEvent} event Keypress or keydown event to interpret. |
ObserveTyping(_ref) X-Ref |
No description |
PreserveScrollInReorder() X-Ref |
WordPress dependencies |
useTypewriter(ref) X-Ref |
No description |
onScrollResize() X-Ref |
No description |
onKeyDown(event) X-Ref |
No description |
maintainCaretPosition(_ref) X-Ref |
Maintains the scroll position after a selection change caused by a keyboard event. param: {KeyboardEvent} event Keyboard event. |
addSelectionChangeListener() X-Ref |
Adds a `selectionchange` listener to reset the scroll position to be maintained. |
computeCaretRectOnSelectionChange() X-Ref |
Resets the scroll position to be maintained during a `selectionchange` event. Also removes the listener, so it acts as a one-time listener. |
computeCaretRectangle() X-Ref |
Resets the scroll position to be maintained. |
isSelectionEligibleForScroll() X-Ref |
Checks if the current situation is elegible for scroll: - There should be one and only one block selected. - The component must contain the selection. - The active element must be contenteditable. |
isLastEditableNode() X-Ref |
No description |
Typewriter(_ref2) X-Ref |
No description |
useCanvasClickRedirect(ref) X-Ref |
Given an element, returns true if the element is a tabbable text field, or false otherwise. return: {boolean} Whether element is a tabbable text field. param: {Element} element Element to test. |
onMouseDown(event) X-Ref |
No description |
iframe_createForOfIteratorHelper(o, allowArrayLike) X-Ref |
No description |
iframe_unsupportedIterableToArray(o, minLen) X-Ref |
No description |
iframe_arrayLikeToArray(arr, len) X-Ref |
No description |
styleSheetsCompat(doc) X-Ref |
Clones stylesheets targetting the editor canvas to the given document. A stylesheet is considered targetting the editor a canvas if it contains the `editor-styles-wrapper`, `wp-block`, or `wp-block-*` class selectors. Ideally, this hook should be removed in the future and styles should be added explicitly as editor styles. param: {Document} doc The document to append cloned stylesheets to. |
bubbleEvents(doc) X-Ref |
Bubbles some event types (keydown, keypress, and dragover) to parent document document to ensure that the keyboard shortcuts and drag and drop work. Ideally, we should remove event bubbling in the future. Keyboard shortcuts should be context dependent, e.g. actions on blocks like Cmd+A should not work globally outside the block editor. param: {Document} doc Document to attach listeners to. |
bubbleEvent(event) X-Ref |
No description |
setBodyClassName(doc) X-Ref |
Sets the document direction. Sets the `editor-styles-wrapper` class name on the body. Copies the `admin-color-*` class name to the body so that the admin color scheme applies to components in the iframe. param: {Document} doc Document to add class name to. |
setHead(doc, head) X-Ref |
Sets the document head and default styles. param: {Document} doc Document to set the head for. param: {string} head HTML to set as the head. |
Iframe(_ref2, ref) X-Ref |
No description |
setDocumentIfReady() X-Ref |
No description |
add(set, element) X-Ref |
No description |
useNoRecursiveRenders(uniqueId) X-Ref |
A React hook for keeping track of blocks previously rendered up in the block tree. Blocks susceptible to recursiion can use this hook in their `Edit` function to prevent said recursion. return: {[boolean, Function]} A tuple of: param: {*} uniqueId Any value that acts as a unique identifier for a block instance. |
validateThemeColors(colors) X-Ref |
Given an array of theme colors checks colors for validity return: {Array} The array of valid theme colors or the default colors param: {Array} colors The array of theme colors |
validateThemeGradients(gradients) X-Ref |
Given an array of theme gradients checks gradients for validity return: {Array} The array of valid theme gradients or the default gradients param: {Array} gradients The array of theme gradients |
asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) X-Ref |
No description |
_asyncToGenerator(fn) X-Ref |
No description |
_next(value) X-Ref |
No description |
_throw(err) X-Ref |
No description |
_defineProperty(obj, key, value) X-Ref |
No description |
_setPrototypeOf(o, p) X-Ref |
No description |
tinycolor(color, opts) X-Ref |
No description |
inputToRGB(color) X-Ref |
No description |
rgbToRgb(r, g, b) X-Ref |
No description |
rgbToHsl(r, g, b) X-Ref |
No description |
hslToRgb(h, s, l) X-Ref |
No description |
hue2rgb(p, q, t) X-Ref |
No description |
rgbToHsv(r, g, b) X-Ref |
No description |
hsvToRgb(h, s, v) X-Ref |
No description |
rgbToHex(r, g, b, allow3Char) X-Ref |
No description |
rgbaToHex(r, g, b, a, allow4Char) X-Ref |
No description |
rgbaToArgbHex(r, g, b, a) X-Ref |
No description |
desaturate(color, amount) X-Ref |
No description |
saturate(color, amount) X-Ref |
No description |
greyscale(color) X-Ref |
No description |
lighten(color, amount) X-Ref |
No description |
brighten(color, amount) X-Ref |
No description |
darken(color, amount) X-Ref |
No description |
spin(color, amount) X-Ref |
No description |
complement(color) X-Ref |
No description |
triad(color) X-Ref |
No description |
tetrad(color) X-Ref |
No description |
splitcomplement(color) X-Ref |
No description |
analogous(color, results, slices) X-Ref |
No description |
monochromatic(color, results) X-Ref |
No description |
flip(o) X-Ref |
No description |
boundAlpha(a) X-Ref |
No description |
bound01(n, max) X-Ref |
No description |
clamp01(val) X-Ref |
No description |
parseIntFromHex(val) X-Ref |
No description |
isOnePointZero(n) X-Ref |
No description |
isPercentage(n) X-Ref |
No description |
pad2(c) X-Ref |
No description |
convertToPercentage(n) X-Ref |
No description |
convertDecimalToHex(d) X-Ref |
No description |
convertHexToDecimal(h) X-Ref |
No description |
isValidCSSUnit(color) X-Ref |
No description |
stringInputToObject(color) X-Ref |
No description |
validateWCAG2Parms(parms) X-Ref |
No description |
memize( fn, options ) X-Ref |
Accepts a function to be memoized, and returns a new memoized function, with optional options. return: {F & MemizeMemoizedFunction} Memoized function. param: {F} fn Function to memoize. param: {MemizeOptions} [options] Options object. |
memoized( ) X-Ref |
No description |
mergeRefs(refs) X-Ref |
No description |
_extends() X-Ref |
No description |
Generated: Fri Feb 26 01:00:04 2021 | Cross-referenced by PHPXref 0.7.1 |