[ Index ] |
PHP Cross Reference of WordPress |
[Source view] [Print] [Project Stats]
(no description)
File Size: | 49756 lines (1629 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
BlockCrashBoundary:: (33 methods):
BlockHTML()
queuedFn()
throttled()
schedule()
start()
stop()
loop()
update()
makeQueue()
eachSafely()
noop()
isEqual()
eachProp()
flush()
flushStartQueue()
startSafely()
startUnsafely()
advance()
findIndex()
call()
normalizeColor()
hue2rgb()
hslToRgb()
parse255()
parse360()
parse1()
parsePercentage()
colorToRgba()
interpolate()
findRange()
react_spring_shared_esm_extends()
callFluidObserver()
callFluidObservers()
FluidValue:: (10 methods):
addFluidObserver()
removeFluidObserver()
react_spring_shared_esm_deprecateInterpolate()
deprecateDirectCall()
isAnimatedString()
react_spring_shared_esm_useForceUpdate()
makeMountedRef()
useMemoOne()
areInputsEqual()
react_spring_shared_esm_usePrev()
Animated:: (0 methods):
AnimatedValue:: (0 methods):
AnimatedString:: (0 methods):
AnimatedObject:: (0 methods):
AnimatedArray:: (3 methods):
makeAnimated()
getAnimatedType()
react_spring_animated_esm_extends()
PropsObserver:: (12 methods):
getAnimatedState()
updateRef()
react_spring_core_esm_extends()
callProp()
getForwardProps()
inferTo()
computeGoal()
hasProps()
isAsyncTo()
detachRefs()
replaceRef()
useChain()
AnimationConfig:: (2 methods):
mergeConfig()
sanitizeConfig()
Animation:: (6 methods):
scheduleProps()
onPause()
onResume()
onStart()
runAsync()
stopAsync()
BailSignal:: (0 methods):
SkipAniamtionSignal:: (0 methods):
FrameValue:: (0 methods):
SpringValue:: (7 methods):
checkFinished()
createLoopUpdate()
createUpdate()
declareUpdate()
findDefined()
mergeActiveFn()
sendEvent()
Controller:: (17 methods):
flushUpdateQueue()
getSprings()
setSprings()
createSpring()
prepareSprings()
prepareKeys()
_objectWithoutPropertiesLoose()
makeContext()
useSprings()
declareUpdates()
useSpring()
useTrail()
useTransition()
getKeys()
Spring()
Trail()
Transition()
Interpolation:: (6 methods):
isIdle()
checkIdle()
becomeIdle()
react_spring_web_esm_objectWithoutPropertiesLoose()
dangerousStyleValue()
applyAnimatedValues()
AnimatedStyle:: (0 methods):
FluidTransform:: (161 methods):
useMovingAnimation()
onFrameChange()
onChange()
isInSameBlock()
isInsideRootBlock()
getBlockClientId()
useInitialPosition()
useFocusFirstElement()
listener()
useIsHovered()
useBlockClassNames()
useBlockDefaultClassName()
useBlockCustomClassName()
useBlockMovingModeClassNames()
useFocusHandler()
onFocus()
useEventHandlers()
onKeyDown()
onDragStart()
useNavModeExit()
onMouseDown()
useIntersectionObserver()
useBlockProps()
mergeWrapperProps()
Block()
BlockListBlock()
Tips()
BlockIcon()
BlockCard()
useBlockSync()
BlockEditorProvider()
LiveBlockPreview()
useBlockSelectionClearer()
onMouseDown()
BlockSelectionClearer()
selector()
useMultiSelection()
useTabNav()
onFocusCapture()
onKeyDown()
onFocusOut()
preventScrollOnTab()
isNavigationCandidate()
getClosestTabbable()
isTabCandidate()
useArrowNav()
onMouseDown()
isTabbableEdge()
onKeyDown()
useSelectAll()
onKeyDown()
setContentEditableWrapper()
useDragSelection()
onMouseUp()
onMouseLeave()
extractSelectionStartNode()
extractSelectionEndNode()
findDepth()
use_selection_observer_setContentEditableWrapper()
useSelectionObserver()
onSelectionChange()
addListeners()
removeListeners()
resetListeners()
useClickSelection()
onMouseDown()
useInput()
onKeyDown()
onCompositionStart()
useWritingFlow()
WritingFlow()
styleSheetsCompat()
bubbleEvents()
bubbleEvent()
useParsedAssets()
Iframe()
setDocumentIfReady()
names()
parse()
updatePosition()
position()
Position()
error()
stylesheet()
open()
close()
rules()
match()
whitespace()
comments()
comment()
selector()
declaration()
declarations()
keyframe()
atkeyframes()
atsupports()
athost()
atmedia()
atcustommedia()
atpage()
atdocument()
atfontface()
_compileAtrule()
atrule()
rule()
trim()
addParent()
Compiler()
compress_Compiler()
identity_Compiler()
stringify()
traverseCSS()
isRemotePath()
isAbsolutePath()
isValidURL()
getResourcePath()
processURL()
getURLs()
replaceURLs()
useDarkThemeBodyClassName()
EditorStyles()
AutoBlockPreview()
BlockPreview()
useBlockPreview()
InserterPreviewPanel()
InserterListboxItem()
BlockDraggableChip()
isAppleOS()
InserterListItem()
InserterListboxGroup()
InserterListboxRow()
chunk()
BlockTypesList()
InserterPanel()
InserterListbox()
BlockTypesTab()
PatternInserterPanel()
BlockPattern()
BlockPatternPlaceholder()
BlockPatternList()
PatternCategoriesList()
PatternsExplorerSearch()
PatternExplorerSidebar()
InserterNoResults()
useInsertionPoint()
normalizeSearchInput()
getItemSearchRank()
PatternsListHeader()
PatternList()
PatternsExplorer()
PatternsExplorerModal()
BlockPatternsCategory()
BlockPatternsTabs()
ReusableBlocksList()
ReusableBlocksTab()
InserterSearchResults()
InserterTabs()
InserterMenu()
QuickInserter()
handleClick()
Inserter:: (333 methods):
getAdjacentBlockAttributes()
getInsertionIndex()
DefaultBlockAppender()
ButtonBlockAppender()
BlockListAppender()
usePopoverScroll()
onWheel()
InsertionPointPopover()
onClick()
onFocus()
maybeHideInserterPoint()
InsertionPoint()
useInBetweenInserter()
onMouseMove()
usePreParsePatterns()
useBlockDisplayInformation()
useBlockDisplayTitle()
BlockTitle()
useScrollWhenDragging()
BlockSelectionButton()
onKeyDown()
hasOnlyToolbarItem()
getAllToolbarItemsIn()
hasFocusWithin()
focusFirstTabbableIn()
useIsAccessibleToolbar()
useToolbarFocus()
NavigableToolbar()
getBlockMoverDescription()
getMultiBlockMoverDescription()
BlockMover()
useDebouncedShowMovers()
useShowMoversGestures()
BlockParentSelector()
PreviewBlockPopover()
getActiveStyle()
replaceActiveStyle()
getRenderedStyles()
getDefaultStyle()
useGenericPreviewBlock()
useStylesForBlocks()
BlockStylesMenuItems()
BlockStylesMenu()
PatternTransformationsMenu()
PreviewPatternsPopover()
BlockPatternsList()
pattern_transformations_menu_BlockPattern()
getPasteEventData()
shouldDismissPastedFiles()
useNotifyCopy()
useClipboardHandler()
handler()
CopyHandler()
BlockActions()
BlockModeToggle()
BlockConvertButton()
ConvertToGroupButton()
useConvertToGroupButtonProps()
useBlockLock()
BlockLockModal()
BlockLockMenuItem()
BlockSettingsMenuControls()
CopyMenuItem()
BlockSettingsDropdown()
BlockSettingsMenu()
BlockLockToolbar()
BlockGroupToolbar()
BlockContextualToolbar()
block_popover_selector()
BlockPopover()
onFocus()
onBlur()
wrapperSelector()
WrappedBlockPopover()
BlockToolsBackCompat()
useNestedSettingsUpdate()
useInnerBlockTemplateSync()
getBlockContext()
parseDropEvent()
onBlockDrop()
onFilesDrop()
onHTMLDrop()
useOnBlockDrop()
getDistanceFromPointToEdge()
getDistanceToNearestEdge()
getNearestBlockIndex()
useBlockDropZone()
UncontrolledInnerBlocks()
ControlledInnerBlocks()
useInnerBlocksProps()
Root()
BlockList()
Items()
BlockListItems()
ColorGradientControlInner()
ColorGradientControlSelect()
ColorGradientControl()
ColorGradientSettingsDropdown()
useCommonSingleMultipleSelects()
useMultipleOriginColorsAndGradients()
getColorClassName()
getMostReadableColor()
BorderColorEdit()
hasBorderColorValue()
resetBorderColor()
addAttributes()
border_color_addSaveProps()
addEditProps()
mode()
getAllUnit()
getAllValue()
hasMixedValues()
hasDefinedValues()
AllInputControl()
BoxInputControls()
LinkedButton()
BorderRadiusControl()
BorderRadiusEdit()
hasBorderRadiusValue()
resetBorderRadius()
BorderStyleControl()
hasBorderStyleValue()
resetBorderStyle()
hasBorderWidthValue()
resetBorderWidth()
BorderPanel()
hasBorderSupport()
removeBorderAttribute()
__experimentalGetGradientClass()
getGradientValueBySlug()
__experimentalGetGradientObjectByGradientValue()
getGradientSlugByValue()
__experimentalUseGradient()
ContrastChecker()
ToolsPanelColorDropdown()
getComputedStyle()
ColorPanel()
color_addAttributes()
color_addSaveProps()
color_addEditProps()
ColorEdit()
color_addTransforms()
FontAppearanceControl()
isLineHeightDefined()
LineHeightEdit()
useIsLineHeightDisabled()
hasLineHeightValue()
resetLineHeight()
FontAppearanceEdit()
useIsFontStyleDisabled()
useIsFontWeightDisabled()
useIsFontAppearanceDisabled()
hasFontAppearanceValue()
resetFontAppearance()
FontFamilyControl()
font_family_addAttributes()
font_family_addSaveProps()
font_family_addEditProps()
FontFamilyEdit()
onChange()
useIsFontFamilyDisabled()
hasFontFamilyValue()
resetFontFamily()
getFontSizeObjectByValue()
getFontSizeClass()
FontSizePicker()
font_size_addAttributes()
font_size_addSaveProps()
font_size_addEditProps()
FontSizeEdit()
hasFontSizeValue()
resetFontSize()
useIsFontSizeDisabled()
font_size_addTransforms()
TextDecorationControl()
TextDecorationEdit()
onChange()
useIsTextDecorationDisabled()
hasTextDecorationValue()
resetTextDecoration()
TextTransformControl()
TextTransformEdit()
onChange()
useIsTextTransformDisabled()
hasTextTransformValue()
resetTextTransform()
LetterSpacingControl()
LetterSpacingEdit()
onChange()
useIsLetterSpacingDisabled()
hasLetterSpacingValue()
resetLetterSpacing()
TypographyPanel()
useIsTypographyDisabled()
compileStyleValue()
getInlineStyles()
compileElementsStyles()
style_addAttribute()
style_addSaveProps()
style_addEditProps()
DuotoneControl()
getValuesFromColors()
DuotoneStylesheet()
DuotoneFilter()
InlineDuotone()
useMultiOriginPresets()
DuotonePanel()
addDuotoneAttributes()
scopeSelector()
PresetDuotoneFilter()
LayoutPanel()
LayoutTypeSwitcher()
layout_addAttribute()
getBorderClassesAndStyles()
useBorderProps()
getColorClassesAndStyles()
useColorProps()
getSpacingClassesAndStyles()
useCachedTruthy()
createColorHOC()
createCustomColorsHOC()
withColors()
AlignmentUI()
applyOrUnset()
setIcon()
createBlockCompleter()
createLinkCompleter()
useCompleters()
useBlockEditorAutocompleteProps()
BlockEditorAutocomplete()
BlockFullHeightAlignmentControl()
BlockAlignmentMatrixControl()
BlockBreadcrumb()
BlockContentOverlay()
ListViewLeaf()
ListViewExpander()
ListViewBlockSelectButton()
onKeyDownHandler()
getCommonDepthClientIds()
ListViewBlock()
countBlocks()
ListViewBranch()
ListViewDropIndicator()
useBlockSelection()
useListViewClientIds()
isPointContainedByRect()
isNestingGesture()
getListViewDropTarget()
useListViewDropZone()
useListViewExpandSelectedItem()
ListView()
BlockNavigationDropdownToggle()
BlockNavigationDropdown()
BlockStylesPreviewPanel()
BlockStylesPreviewPanelSlot()
BlockStylesPreviewPanelFill()
BlockStyles()
BlockVariationPicker()
usePatternsSetup()
block_pattern_setup_BlockPattern()
BlockPatternSlide()
VariationsButtons()
VariationsDropdown()
__experimentalBlockVariationTransforms()
ColorPaletteControl()
DateFormatPicker()
NonDefaultControls()
__extends()
__()
__rest()
__decorate()
__param()
__metadata()
__awaiter()
adopt()
fulfilled()
rejected()
step()
__generator()
verb()
step()
__exportStar()
__values()
__read()
__spread()
__spreadArrays()
__await()
__asyncGenerator()
verb()
resume()
step()
fulfill()
reject()
settle()
__asyncDelegator()
verb()
__asyncValues()
verb()
settle()
__makeTemplateObject()
__importStar()
__importDefault()
__classPrivateFieldGet()
__classPrivateFieldSet()
getCropSize()
restrictPosition()
restrictPositionCoord()
getDistanceBetweenPoints()
getRotationBetweenPoints()
computeCroppedArea()
limitArea()
noOp()
getZoomFromCroppedAreaPixels()
getInitialCropFromCroppedAreaPixels()
getCenter()
rotateAroundMidPoint()
translateSize()
classNames()
Cropper()
useSaveImage()
useTransformState()
editImage()
useTransformImage()
ImageEditingProvider()
ImageCropper()
ZoomDropdown()
AspectGroup()
AspectRatioDropdown()
RotationButton()
FormControls()
ImageEditor()
useDimensionHandler()
ImageSizeControl()
URLInput:: (65 methods):
getVisualTypeName()
LinkControlSearchResults()
isURLLike()
useSearchHandler()
use_rich_url_data_reducer()
useRemoteUrlData()
LinkPreview()
useCreatePage()
LinkControl()
stopEditing()
MediaUploadCheck()
LinkViewerURL()
LinkViewer()
LinkEditor()
URLPopover()
MediaPlaceholder()
useUndoAutomaticChange()
onKeyDown()
useCaretInFormat()
useMarkPersistent()
filePasteHandler()
addActiveFormats()
getMultilineTag()
getAllowedFormats()
createLinkInParagraph()
splitValue()
adjustLines()
usePasteHandler()
_onPaste()
removeWindowsFragments()
removeCharsetMetaTag()
preventEventDiscovery()
findSelection()
useInputRules()
inputRule()
onInput()
useEnter()
onKeyDown()
formatTypesSelector()
useFormatTypes()
useRemoveBrowserShortcuts()
onKeydown()
useShortcuts()
onKeyDown()
useInputEvents()
onInput()
useFirefoxCompat()
onFocus()
FormatEdit()
removeNativeProps()
RichTextWrapper()
addEditorOnlyFormats()
removeEditorOnlyFormats()
addInvisibleFormats()
onKeyDown()
onFocus()
ResponsiveBlockControlLabel()
ResponsiveBlockControl()
RichTextShortcut()
callback()
RichTextToolbarButton()
__unstableRichTextInputEvent()
callback()
ToolSelector()
UnitControl()
URLInputButton:: (41 methods):
PreviewOptions()
useResizeCanvas()
MultiSelectionInspector()
DefaultStylePicker()
BlockTools()
onKeyDown()
InserterLibrary()
KeyboardShortcuts()
KeyboardShortcutsRegister()
MultiSelectScrollIntoView()
isKeyDownEligibleForStartTyping()
useMouseMoveTypingReset()
stopTypingOnMouseMove()
useTypingObserver()
stopTypingOnNonTextField()
stopTypingOnEscapeKey()
stopTypingOnSelectionUncollapse()
startTypingInTextField()
ObserveTyping()
useTypewriter()
onScrollResize()
onKeyDown()
maintainCaretPosition()
addSelectionChangeListener()
computeCaretRectOnSelectionChange()
computeCaretRectangle()
isSelectionEligibleForScroll()
isLastEditableNode()
Typewriter()
addToBlockType()
useNoRecursiveRenders()
parseUnit()
calculate()
getFunctionUnitValue()
parseUnitFunction()
isMathExpression()
evalMathExpression()
convertParsedUnitToPx()
getPxFromCssUnit()
memoizedGetPxFromCssUnit()
hashOptions()
Class: BlockCrashBoundary - X-Ref
WordPress dependenciesBlockHTML(_ref) X-Ref |
No description |
queuedFn() X-Ref |
No description |
throttled(...args) X-Ref |
No description |
schedule(fn, queue) X-Ref |
No description |
start() X-Ref |
No description |
stop() X-Ref |
No description |
loop() X-Ref |
No description |
update() X-Ref |
No description |
makeQueue() X-Ref |
No description |
eachSafely(values, each) X-Ref |
No description |
noop() X-Ref |
No description |
isEqual(a, b) X-Ref |
No description |
eachProp(obj, fn, ctx) X-Ref |
No description |
flush(queue, iterator) X-Ref |
No description |
flushStartQueue() X-Ref |
No description |
startSafely(animation) X-Ref |
No description |
startUnsafely(animation) X-Ref |
No description |
advance(dt) X-Ref |
No description |
findIndex(arr, test) X-Ref |
No description |
call(...parts) 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 |
interpolate(input, inputMin, inputMax, outputMin, outputMax, easing, extrapolateLeft, extrapolateRight, map) X-Ref |
No description |
findRange(input, inputRange) X-Ref |
No description |
react_spring_shared_esm_extends() X-Ref |
No description |
callFluidObserver(observer, event) X-Ref |
No description |
callFluidObservers(target, event) X-Ref |
No description |
Class: FluidValue - X-Ref
addFluidObserver(target, observer) X-Ref |
No description |
removeFluidObserver(target, observer) X-Ref |
No description |
react_spring_shared_esm_deprecateInterpolate() X-Ref |
No description |
deprecateDirectCall() X-Ref |
No description |
isAnimatedString(value) X-Ref |
No description |
react_spring_shared_esm_useForceUpdate() X-Ref |
No description |
makeMountedRef() X-Ref |
No description |
useMemoOne(getResult, inputs) X-Ref |
No description |
areInputsEqual(next, prev) X-Ref |
No description |
react_spring_shared_esm_usePrev(value) X-Ref |
No description |
Class: AnimatedValue - X-Ref
Class: AnimatedString - X-Ref
Class: AnimatedObject - X-Ref
Class: AnimatedArray - X-Ref
makeAnimated(value) X-Ref |
No description |
getAnimatedType(value) X-Ref |
No description |
react_spring_animated_esm_extends() X-Ref |
No description |
Class: PropsObserver - X-Ref
getAnimatedState(props, host) X-Ref |
No description |
updateRef(ref, value) X-Ref |
No description |
react_spring_core_esm_extends() X-Ref |
No description |
callProp(value, ...args) X-Ref |
No description |
getForwardProps(props) X-Ref |
No description |
inferTo(props) X-Ref |
No description |
computeGoal(value) X-Ref |
No description |
hasProps(props) X-Ref |
No description |
isAsyncTo(to) X-Ref |
No description |
detachRefs(ctrl, ref) X-Ref |
No description |
replaceRef(ctrl, ref) X-Ref |
No description |
useChain(refs, timeSteps, timeFrame = 1000) X-Ref |
No description |
Class: AnimationConfig - X-Ref
mergeConfig(config, newConfig, defaultConfig) X-Ref |
No description |
sanitizeConfig(config, props) X-Ref |
No description |
Class: BailSignal - X-Ref
Class: SkipAniamtionSignal - X-Ref
Class: FrameValue - X-Ref
Class: SpringValue - X-Ref
checkFinished(target, to) X-Ref |
No description |
createLoopUpdate(props, loop = props.loop, to = props.to) X-Ref |
No description |
createUpdate(props) X-Ref |
No description |
declareUpdate(props) X-Ref |
No description |
findDefined(values, keys) X-Ref |
No description |
mergeActiveFn(target, props, type) X-Ref |
No description |
sendEvent(target, type, ...args) X-Ref |
No description |
Class: Controller - X-Ref
flushUpdateQueue(ctrl, queue) X-Ref |
No description |
getSprings(ctrl, props) X-Ref |
No description |
setSprings(ctrl, springs) X-Ref |
No description |
createSpring(key, observer) X-Ref |
No description |
prepareSprings(springs, props, create) X-Ref |
No description |
prepareKeys(ctrl, queue) X-Ref |
No description |
_objectWithoutPropertiesLoose(source, excluded) X-Ref |
No description |
makeContext(target, init) X-Ref |
No description |
useSprings(length, props, deps) X-Ref |
No description |
declareUpdates(startIndex, endIndex) X-Ref |
No description |
useSpring(props, deps) X-Ref |
No description |
useTrail(length, propsArg, deps) X-Ref |
No description |
useTransition(data, props, deps) X-Ref |
No description |
getKeys(items, {key,keys = key}, prevTransitions) X-Ref |
No description |
Spring(_ref) X-Ref |
No description |
Trail(_ref) X-Ref |
No description |
Transition(_ref) X-Ref |
No description |
Class: Interpolation - X-Ref
isIdle(source) X-Ref |
No description |
checkIdle(active) X-Ref |
No description |
becomeIdle(self) X-Ref |
No description |
react_spring_web_esm_objectWithoutPropertiesLoose(source, excluded) X-Ref |
No description |
dangerousStyleValue(name, value) X-Ref |
No description |
applyAnimatedValues(instance, props) X-Ref |
No description |
Class: AnimatedStyle - X-Ref
Class: FluidTransform - X-Ref
useMovingAnimation(_ref) 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} $1 Options param: {boolean} $1.isSelected Whether it's the current block or not. param: {boolean} $1.adjustScrolling Adjust the scroll position to the current block. param: {boolean} $1.enableAnimation Enable/Disable animation. param: {*} $1.triggerAnimationOnChange Variable used to trigger the animation if it changes. |
onFrameChange(_ref2) X-Ref |
No description |
onChange(_ref3) X-Ref |
No description |
isInSameBlock(a, b) X-Ref |
Returns true if two elements are contained within the same block. param: {Element} a First element. param: {Element} b Second element. return: {boolean} Whether elements are in the same block. |
isInsideRootBlock(blockElement, element) X-Ref |
Returns true if an element is considered part of the block and not its inner blocks or appender. param: {Element} blockElement Block container element. param: {Element} element Element. return: {boolean} Whether an element is considered part of the block and not |
getBlockClientId(node) X-Ref |
Finds the block client ID given any DOM node inside the block. param: {Node?} node DOM node. return: {string|undefined} Client ID or undefined if the node is not part of |
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). param: {string} clientId Block client ID. return: {number} The initial position, either 0 (start) or -1 (end). |
useFocusFirstElement(clientId) X-Ref |
Transitions focus to the block or inner tabbable when the block becomes selected and an initial position is set. param: {string} clientId Block client ID. return: {RefObject} React ref with the block element. |
listener(event) X-Ref |
No description |
useIsHovered() X-Ref |
Adds `is-hovered` class when the block is hovered and in navigation or outline mode. |
useBlockClassNames(clientId) X-Ref |
Returns the class names used for the different states of the block. param: {string} clientId The block client ID. return: {string} The class names. |
useBlockDefaultClassName(clientId) X-Ref |
Returns the default class name if the block is a light block and it supports `className`. param: {string} clientId The block client ID. return: {string} The class name, e.g. `wp-block-paragraph`. |
useBlockCustomClassName(clientId) X-Ref |
Returns the custom class name if the block is a light block. param: {string} clientId The block client ID. return: {string} The custom class name. |
useBlockMovingModeClassNames(clientId) X-Ref |
Returns the class names used for block moving mode. param: {string} clientId The block client ID to insert above. return: {string} The class names. |
useFocusHandler(clientId) X-Ref |
Selects the block if it receives focus. 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. |
useEventHandlers(clientId) X-Ref |
Adds block behaviour: - Removes the block on BACKSPACE. - Inserts a default block on ENTER. - Disables dragging of block contents. param: {string} clientId Block client ID. |
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. |
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. |
useNavModeExit(clientId) X-Ref |
Allows navigation mode to be exited by clicking in the selected block. param: {string} clientId Block client ID. |
onMouseDown(event) X-Ref |
No description |
useIntersectionObserver() X-Ref |
Internal dependencies |
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. param: {Object} props Optional. Props to pass to the element. Must contain param: {Object} options Options for internal use only. param: {boolean} options.__unstableIsHtml return: {Object} Props to pass to the element to mark as a block. |
mergeWrapperProps(propsA, propsB) X-Ref |
Merges wrapper props with special handling for classNames and styles. param: {Object} propsA param: {Object} propsB return: {Object} Merged props. |
Block(_ref) X-Ref |
No description |
BlockListBlock(_ref2) X-Ref |
No description |
Tips() X-Ref |
No description |
BlockIcon(_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.selection The selection state responsible to restore the selection on undo/redo. 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 |
useBlockSelectionClearer() X-Ref |
Pass the returned ref callback to an element that should clear block selection. Selection will only be cleared if the element is clicked directly, not if a child element is clicked. return: {import('react').RefCallback} Ref callback. |
onMouseDown(event) X-Ref |
No description |
BlockSelectionClearer(props) X-Ref |
No description |
selector(select) X-Ref |
No description |
useMultiSelection() X-Ref |
No description |
useTabNav() X-Ref |
Internal dependencies |
onFocusCapture(event) X-Ref |
No description |
onKeyDown(event) X-Ref |
No description |
onFocusOut(event) X-Ref |
No description |
preventScrollOnTab(event) 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. param: {Element} element HTML element to test. param: {number} keyCode KeyboardEvent keyCode to test. param: {boolean} hasModifier Whether a modifier is pressed. return: {boolean} Whether element should consider edge navigation. |
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. 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 return: {?Element} Optimal tab target, if one exists. |
isTabCandidate(node) X-Ref |
No description |
useArrowNav() X-Ref |
No description |
onMouseDown() 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. param: {Element} target Currently focused text field. param: {boolean} isReverse True if considering as the first field. return: {boolean} Whether field is at edge for tab transition. |
onKeyDown(event) X-Ref |
No description |
useSelectAll() X-Ref |
Internal dependencies |
onKeyDown(event) X-Ref |
No description |
setContentEditableWrapper(node, value) X-Ref |
Sets the `contenteditable` wrapper element to `value`. param: {HTMLElement} node Block element. param: {boolean} value `contentEditable` value (true or false) |
useDragSelection() X-Ref |
Sets a multi-selection based on the native selection across blocks. |
onMouseUp() X-Ref |
No description |
onMouseLeave(_ref) X-Ref |
No description |
extractSelectionStartNode(selection) X-Ref |
Extract the selection start node from the selection. When the anchor node is not a text node, the selection offset is the index of a child node. param: {Selection} selection The selection. return: {Element} The selection start node. |
extractSelectionEndNode(selection) X-Ref |
Extract the selection end node from the selection. When the focus node is not a text node, the selection offset is the index of a child node. The selection reaches up to but excluding that child node. param: {Selection} selection The selection. return: {Element} The selection start node. |
findDepth(a, b) X-Ref |
No description |
use_selection_observer_setContentEditableWrapper(node, value) X-Ref |
Sets the `contenteditable` wrapper element to `value`. param: {HTMLElement} node Block element. param: {boolean} value `contentEditable` value (true or false) |
useSelectionObserver() X-Ref |
Sets a multi-selection based on the native selection across blocks. |
onSelectionChange(event) X-Ref |
No description |
addListeners() X-Ref |
No description |
removeListeners() X-Ref |
No description |
resetListeners() X-Ref |
No description |
useClickSelection() X-Ref |
No description |
onMouseDown(event) X-Ref |
No description |
useInput() X-Ref |
Handles input for selections across blocks. |
onKeyDown(event) X-Ref |
No description |
onCompositionStart(event) X-Ref |
No description |
useWritingFlow() X-Ref |
No description |
WritingFlow(_ref, forwardedRef) 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 |
useParsedAssets(html) X-Ref |
No description |
Iframe(_ref3, ref) X-Ref |
No description |
setDocumentIfReady() X-Ref |
No description |
names(e,f) X-Ref |
No description |
parse(css, options) 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`. |
stringify(node, options) X-Ref |
Stringfy the given AST `node`. Options: - `compress` space-optimized output - `sourcemap` return an object with `.code` and `.map` param: {Object} node param: {Object} [options] return: {string} |
traverseCSS(css, callback) X-Ref |
No description |
isRemotePath(filePath) X-Ref |
Return `true` if the given path is http/https. param: {string} filePath path return: {boolean} is remote path. |
isAbsolutePath(filePath) X-Ref |
Return `true` if the given filePath is an absolute url. param: {string} filePath path return: {boolean} is absolute path. |
isValidURL(meta) X-Ref |
Whether or not the url should be inluded. param: {Object} meta url meta info return: {boolean} is valid. |
getResourcePath(str, baseURL) X-Ref |
Get the absolute path of the url, relative to the basePath param: {string} str the url param: {string} baseURL base URL return: {string} the full path to the file |
processURL(baseURL) X-Ref |
Process the single `url()` pattern param: {string} baseURL the base URL for relative URLs. return: {Promise} the Promise. |
getURLs(value) X-Ref |
Get all `url()`s, and return the meta info param: {string} value decl.value. return: {Array} the urls. |
replaceURLs(raw, URLs) X-Ref |
Replace the raw value's `url()` segment to the new value param: {string} raw the raw value. param: {Array} URLs the URLs to replace. return: {string} the new value. |
useDarkThemeBodyClassName(styles) X-Ref |
No description |
EditorStyles(_ref) X-Ref |
No description |
AutoBlockPreview(_ref) X-Ref |
No description |
BlockPreview(_ref) X-Ref |
No description |
useBlockPreview(_ref2) X-Ref |
This hook is used to lightly mark an element as a block preview wrapper element. Call this hook and pass the returned props to the element to mark as a block preview 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} options Preview options. param: {WPBlock[]} options.blocks Block objects. param: {Object} options.props Optional. Props to pass to the element. Must contain param: {Object} options.__experimentalLayout Layout settings to be used in the preview. |
InserterPreviewPanel(_ref) X-Ref |
No description |
InserterListboxItem(_ref, ref) X-Ref |
No description |
BlockDraggableChip(_ref) X-Ref |
Internal dependencies |
isAppleOS() X-Ref |
Return true if platform is MacOS. param: {Object} _window window object by default; used for DI testing. return: {boolean} True if MacOS; false otherwise. |
InserterListItem(_ref) X-Ref |
No description |
InserterListboxGroup(props, ref) X-Ref |
No description |
InserterListboxRow(props, ref) X-Ref |
No description |
chunk(array, size) X-Ref |
No description |
BlockTypesList(_ref) X-Ref |
No description |
InserterPanel(_ref) X-Ref |
WordPress dependencies |
InserterListbox(_ref) X-Ref |
No description |
BlockTypesTab(_ref) X-Ref |
Shared reference to an empty array for cases where it is important to avoid returning a new array reference on every invocation and rerendering the component. |
PatternInserterPanel(_ref) X-Ref |
No description |
BlockPattern(_ref) X-Ref |
No description |
BlockPatternPlaceholder() X-Ref |
No description |
BlockPatternList(_ref3) X-Ref |
No description |
PatternCategoriesList(_ref) X-Ref |
No description |
PatternsExplorerSearch(_ref3) X-Ref |
No description |
PatternExplorerSidebar(_ref4) X-Ref |
No description |
InserterNoResults() X-Ref |
No description |
useInsertionPoint(_ref) X-Ref |
Returns the insertion point state given the inserter config. param: {WPInserterConfig} config Inserter Config. return: {Array} Insertion Point State (rootClientID, onInsertBlocks and onToggle). |
normalizeSearchInput() X-Ref |
Sanitizes the search input string. param: {string} input The search input to normalize. return: {string} The normalized search input. |
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. param: {Object} item Item to filter. param: {string} searchTerm Search term. param: {Object} config Search Config. return: {number} Search Rank. |
PatternsListHeader(_ref) X-Ref |
No description |
PatternList(_ref2) X-Ref |
No description |
PatternsExplorer(_ref) X-Ref |
No description |
PatternsExplorerModal(_ref2) X-Ref |
No description |
BlockPatternsCategory(_ref) X-Ref |
No description |
BlockPatternsTabs(_ref3) 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. 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. return: {WPComponent} The component. |
InserterSearchResults(_ref) X-Ref |
No description |
InserterTabs(_ref) X-Ref |
No description |
InserterMenu(_ref, ref) X-Ref |
No description |
QuickInserter(_ref) X-Ref |
No description |
handleClick(event) X-Ref |
No description |
getAdjacentBlockAttributes(attributesToCopy) X-Ref |
No description |
getInsertionIndex() X-Ref |
No description |
DefaultBlockAppender(_ref) X-Ref |
Zero width non-breaking space, used as padding for the paragraph when it is empty. |
ButtonBlockAppender(_ref, ref) X-Ref |
No description |
BlockListAppender(_ref) X-Ref |
No description |
usePopoverScroll(scrollableRef) X-Ref |
Allow scrolling "through" popovers over the canvas. This is only called for as long as the pointer is over a popover. Do not use React events because it will bubble through portals. param: {Object} scrollableRef |
onWheel(event) X-Ref |
No description |
InsertionPointPopover(_ref) X-Ref |
No description |
onClick(event) X-Ref |
No description |
onFocus(event) X-Ref |
No description |
maybeHideInserterPoint(event) X-Ref |
No description |
InsertionPoint(_ref2) X-Ref |
No description |
useInBetweenInserter() X-Ref |
No description |
onMouseMove(event) X-Ref |
No description |
usePreParsePatterns() 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. param: {string} clientId Block's client id. return: {?WPBlockDisplayInformation} Block's display information, or `null` when the block or its type not found. |
useBlockDisplayTitle(clientId, maximumLength) X-Ref |
Returns the block's configured title as a string, or empty if the title cannot be determined. param: {string} clientId Client ID of block. param: {number|undefined} maximumLength The maximum length that the block title string may be before truncated. return: {?string} Block title. |
BlockTitle(_ref) X-Ref |
Renders the block's configured title as a string, or empty if the title cannot be determined. param: {Object} props param: {string} props.clientId Client ID of block. param: {number|undefined} props.maximumLength The maximum length that the block title string may be before truncated. return: {JSX.Element} Block title. |
useScrollWhenDragging() X-Ref |
React hook that scrolls the scroll container when a block is being dragged. return: {Function[]} `startScrolling`, `scrollOnDragOver`, `stopScrolling` |
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. param: {string} props Component props. param: {string} props.clientId Client ID of block. return: {WPComponent} The component to be rendered. |
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 |
getBlockMoverDescription(selectedCount, type, firstIndex, isFirst, isLast, dir, orientation) X-Ref |
Return a label for the block movement controls depending on block position. 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 return: {string} Label for the block movement controls. |
getMultiBlockMoverDescription(selectedCount, firstIndex, isFirst, isLast, dir) X-Ref |
Return a label for the block movement controls depending on block position. 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 return: {string} Label for the block movement controls. |
BlockMover(_ref) X-Ref |
No description |
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. |
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 |
getActiveStyle(styles, className) X-Ref |
Returns the active style from the given className. param: {Array} styles Block style variations. param: {string} className Class name return: {Object?} The active style. |
replaceActiveStyle(className, activeStyle, newStyle) X-Ref |
Replaces the active style in the block's className. param: {string} className Class name. param: {Object?} activeStyle The replaced style. param: {Object} newStyle The replacing style. return: {string} The updated className. |
getRenderedStyles(styles) X-Ref |
Returns a collection of styles that can be represented on the frontend. The function checks a style collection for a default style. If none is found, it adds one to act as a fallback for when there is no active style applied to a block. The default item also serves as a switch on the frontend to deactivate non-default styles. param: {Array} styles Block style variations. return: {Array<Object?>} The style collection. |
getDefaultStyle(styles) X-Ref |
Returns a style object from a collection of styles where that style object is the default block style. param: {Array} styles Block style variations. return: {Object?} The default style object, if found. |
useGenericPreviewBlock(block, type) X-Ref |
param: {WPBlock} block Block object. param: {WPBlockType} type Block type settings. return: {WPBlock} A generic block ready for styles preview. |
useStylesForBlocks(_ref) X-Ref |
param: {useStylesForBlocksArguments} useStylesForBlocks arguments. return: {Object} Results of the select methods. |
BlockStylesMenuItems(_ref) X-Ref |
Internal dependencies |
BlockStylesMenu(_ref) X-Ref |
Internal dependencies |
PatternTransformationsMenu(_ref) X-Ref |
No description |
PreviewPatternsPopover(_ref2) X-Ref |
No description |
BlockPatternsList(_ref3) X-Ref |
No description |
pattern_transformations_menu_BlockPattern(_ref4) X-Ref |
No description |
getPasteEventData(_ref) X-Ref |
WordPress dependencies |
shouldDismissPastedFiles(files, html) X-Ref |
Given a collection of DataTransfer files and HTML and plain text strings, determine whether the files are to be dismissed in favor of the HTML. Certain office-type programs, like Microsoft Word or Apple Numbers, will, upon copy, generate a screenshot of the content being copied and attach it to the clipboard alongside the actual rich text that the user sought to copy. In those cases, we should let Gutenberg handle the rich text content and not the screenshot, since this allows Gutenberg to insert meaningful blocks, like paragraphs, lists or even tables. param: {File[]} files File objects obtained from a paste event param: {string} html HTML content obtained from a paste event return: {boolean} True if the files should be dismissed |
useNotifyCopy() X-Ref |
No description |
useClipboardHandler() X-Ref |
No description |
handler(event) X-Ref |
No description |
CopyHandler(_ref) X-Ref |
No description |
BlockActions(_ref) X-Ref |
No description |
BlockModeToggle(_ref) X-Ref |
Internal dependencies |
BlockConvertButton(_ref) X-Ref |
WordPress dependencies |
ConvertToGroupButton(_ref) X-Ref |
No description |
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`. |
useBlockLock(clientId) X-Ref |
Return details about the block lock status. param: {string} clientId The block client Id. return: {Object} Block lock status |
BlockLockModal(_ref) X-Ref |
No description |
BlockLockMenuItem(_ref) X-Ref |
No description |
BlockSettingsMenuControls(_ref2) X-Ref |
param: {Object} props Fill props. return: {WPElement} Element. |
CopyMenuItem(_ref) X-Ref |
No description |
BlockSettingsDropdown(_ref2) X-Ref |
No description |
BlockSettingsMenu(_ref) X-Ref |
Internal dependencies |
BlockLockToolbar(_ref) X-Ref |
No description |
BlockGroupToolbar() 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(_ref2) X-Ref |
No description |
BlockToolsBackCompat(_ref) X-Ref |
No description |
useNestedSettingsUpdate(clientId, allowedBlocks, __experimentalDefaultBlock, __experimentalDirectInsert, templateLock, captureToolbars, orientation, layout) 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: {?WPDirectInsertBlock} __experimentalDefaultBlock The default block to insert: [ blockName, { blockAttributes } ]. param: {?Function|boolean} __experimentalDirectInsert If a default block should be inserted directly by the 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 param: {Object} layout The layout object for the block container. |
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. param: {Record<string,*>} attributes Block attributes object. param: {WPBlockType} blockType Block type settings. return: {Record<string,*>} Context value. |
parseDropEvent(event) X-Ref |
Retrieve the data for a block drop event. param: {WPSyntheticEvent} event The drop event. return: {Object} An object with block drag and drop data. |
onBlockDrop(targetRootClientId, targetBlockIndex, getBlockIndex, getClientIdsOfDescendants, moveBlocksToPosition, insertBlocks, clearSelectedBlock) X-Ref |
A function that returns an event handler function for block drop events. 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. return: {Function} The event handler for a block drop event. |
onFilesDrop(targetRootClientId, targetBlockIndex, hasUploadPermissions, updateBlockAttributes, canInsertBlockType, insertBlocks) X-Ref |
A function that returns an event handler function for block-related file drop events. 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. return: {Function} The event handler for a block-related file drop event. |
onHTMLDrop(targetRootClientId, targetBlockIndex, insertBlocks) X-Ref |
A function that returns an event handler function for block-related HTML drop events. 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. return: {Function} The event handler for a block-related HTML drop event. |
useOnBlockDrop(targetRootClientId, targetBlockIndex) X-Ref |
A React hook for handling block drop events. 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. return: {Object} An object that contains the event handlers `onDrop`, `onFilesDrop` and `onHTMLDrop`. |
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. 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 return: {[number, string]} An array where the first value is the distance |
getNearestBlockIndex(elements, position, orientation) X-Ref |
Given a list of block DOM elements finds the index that a block should be dropped at. 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. return: {number|undefined} The block index that's closest to the drag position. |
useBlockDropZone() X-Ref |
A React hook that can be used to make a block list handle drag and drop. param: {WPBlockDropZoneConfig} dropZoneConfig configuration data for the drop zone. |
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. |
Root(_ref) X-Ref |
No description |
BlockList(settings) X-Ref |
No description |
Items(_ref2) X-Ref |
No description |
BlockListItems(props) X-Ref |
No description |
ColorGradientControlInner(_ref) X-Ref |
No description |
ColorGradientControlSelect(props) X-Ref |
No description |
ColorGradientControl(props) X-Ref |
No description |
ColorGradientSettingsDropdown(_ref) X-Ref |
Internal dependencies |
useCommonSingleMultipleSelects() X-Ref |
Internal dependencies |
useMultipleOriginColorsAndGradients() X-Ref |
Retrieves color and gradient related settings. The arrays for colors and gradients are made up of color palettes from each origin i.e. "Core", "Theme", and "User". return: {Object} Color and gradient related settings. |
getColorClassName(colorContextName, colorSlug) X-Ref |
Returns a class based on the context a color is being used and its slug. param: {string} colorContextName Context/place where color is being used e.g: background, text etc... param: {string} colorSlug Slug of the color. return: {?string} String with the class corresponding to the color in the provided context. |
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. 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. return: {string} String with the color value of the most readable color. |
BorderColorEdit(props) X-Ref |
Inspector control panel containing the border color related configuration. There is deliberate overlap between the colors and borders block supports relating to border color. It can be argued the border color controls could be included within either, or both, the colors and borders panels in the inspector controls. If they share the same block attributes it should not matter. param: {Object} props Block properties. return: {WPElement} Border color edit element. |
hasBorderColorValue(props) X-Ref |
Checks if there is a current value in the border color block support attributes. param: {Object} props Block props. return: {boolean} Whether or not the block has a border color value set. |
resetBorderColor(_ref) X-Ref |
Resets the border color block support attributes. This can be used when disabling the border color support controls for a block via a progressive discovery panel. param: {Object} props Block props. param: {Object} props.attributes Block's attributes. param: {Object} props.setAttributes Function to set block's attributes. |
addAttributes(settings) X-Ref |
Filters registered block settings, extending attributes to include `borderColor` if needed. param: {Object} settings Original block settings. return: {Object} Updated block settings. |
border_color_addSaveProps(props, blockType, attributes) X-Ref |
Override props assigned to save component to inject border color. param: {Object} props Additional props applied to save element. param: {Object} blockType Block type definition. param: {Object} attributes Block's attributes. return: {Object} Filtered props to apply to save element. |
addEditProps(settings) X-Ref |
Filters the registered block settings to apply border color styles and classnames to the block edit wrapper. param: {Object} settings Original block settings. return: {Object} Filtered block settings. |
mode(inputArray) X-Ref |
Gets the (non-undefined) item with the highest occurrence within an array Based in part on: https://stackoverflow.com/a/20762713 Undefined values are always sorted to the end by `sort`, so this function returns the first element, to always prioritize real values over undefined values. See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#description param: {Array<any>} inputArray Array of items to check. return: {any} The item with the most occurrences. |
getAllUnit() X-Ref |
Returns the most common CSS unit in the radius values. Falls back to `px` as a default unit. param: {Object|string} values Radius values. return: {string} Most common CSS unit in values. Default: `px`. |
getAllValue() X-Ref |
Gets the 'all' input value and unit from values data. param: {Object|string} values Radius values. return: {string} A value + unit for the 'all' input. |
hasMixedValues() X-Ref |
Checks to determine if values are mixed. param: {Object} values Radius values. return: {boolean} Whether values are mixed. |
hasDefinedValues(values) X-Ref |
Checks to determine if values are defined. param: {Object} values Radius values. return: {boolean} Whether values are mixed. |
AllInputControl(_ref) X-Ref |
Internal dependencies |
BoxInputControls(_ref) X-Ref |
No description |
LinkedButton(_ref) X-Ref |
No description |
BorderRadiusControl(_ref) X-Ref |
Control to display border radius options. param: {Object} props Component props. param: {Function} props.onChange Callback to handle onChange. param: {Object} props.values Border radius values. return: {WPElement} Custom border radius control. |
BorderRadiusEdit(props) X-Ref |
Inspector control panel containing the border radius related configuration. param: {Object} props Block properties. return: {WPElement} Border radius edit element. |
hasBorderRadiusValue(props) X-Ref |
Checks if there is a current value in the border radius block support attributes. param: {Object} props Block props. return: {boolean} Whether or not the block has a border radius value set. |
resetBorderRadius(_ref) X-Ref |
Resets the border radius block support attributes. This can be used when disabling the border radius support controls for a block via a progressive discovery panel. param: {Object} props Block props. param: {Object} props.attributes Block's attributes. param: {Object} props.setAttributes Function to set block's attributes. |
BorderStyleControl(_ref) X-Ref |
Control to display border style options. param: {Object} props Component props. param: {Function} props.onChange Handler for changing border style selection. param: {string} props.value Currently selected border style value. return: {WPElement} Custom border style segmented control. |
hasBorderStyleValue(props) X-Ref |
Checks if there is a current value in the border style block support attributes. param: {Object} props Block props. return: {boolean} Whether or not the block has a border style value set. |
resetBorderStyle(_ref) X-Ref |
Resets the border style block support attribute. This can be used when disabling the border style support control for a block via a progressive discovery panel. param: {Object} props Block props. param: {Object} props.attributes Block's attributes. param: {Object} props.setAttributes Function to set block's attributes. |
hasBorderWidthValue(props) X-Ref |
Checks if there is a current value in the border width block support attributes. param: {Object} props Block props. return: {boolean} Whether or not the block has a border width value set. |
resetBorderWidth(_ref) X-Ref |
Resets the border width block support attribute. This can be used when disabling the border width support control for a block via a progressive discovery panel. param: {Object} props Block props. param: {Object} props.attributes Block's attributes. param: {Object} props.setAttributes Function to set block's attributes. |
BorderPanel(props) X-Ref |
No description |
hasBorderSupport(blockName) X-Ref |
Determine whether there is block support for border properties. param: {string} blockName Block name. param: {string} feature Border feature to check support for. return: {boolean} Whether there is support. |
removeBorderAttribute(style, attribute) X-Ref |
Returns a new style object where the specified border attribute has been removed. param: {Object} style Styles from block attributes. param: {string} attribute The border style attribute to clear. return: {Object} Style object with the specified attribute removed. |
__experimentalGetGradientClass(gradientSlug) X-Ref |
No description |
getGradientValueBySlug(gradients, slug) X-Ref |
Retrieves the gradient value per slug. param: {Array} gradients Gradient Palette param: {string} slug Gradient slug return: {string} Gradient value. |
__experimentalGetGradientObjectByGradientValue(gradients, value) X-Ref |
No description |
getGradientSlugByValue(gradients, value) X-Ref |
Retrieves the gradient slug per slug. param: {Array} gradients Gradient Palette param: {string} value Gradient value return: {string} Gradient slug. |
__experimentalUseGradient() X-Ref |
No description |
ContrastChecker(_ref) X-Ref |
No description |
ToolsPanelColorDropdown(_ref) X-Ref |
No description |
getComputedStyle(node) X-Ref |
No description |
ColorPanel(_ref) X-Ref |
No description |
color_addAttributes(settings) X-Ref |
Filters registered block settings, extending attributes to include `backgroundColor` and `textColor` attribute. param: {Object} settings Original block settings. return: {Object} Filtered block settings. |
color_addSaveProps(props, blockType, attributes) X-Ref |
Override props assigned to save component to inject colors classnames. param: {Object} props Additional props applied to save element. param: {Object} blockType Block type. param: {Object} attributes Block attributes. return: {Object} Filtered props applied to save element. |
color_addEditProps(settings) X-Ref |
Filters registered block settings to extend the block edit wrapper to apply the desired styles and classnames properly. param: {Object} settings Original block settings. return: {Object} Filtered block settings. |
ColorEdit(props) X-Ref |
Inspector control panel containing the color related configuration param: {Object} props return: {WPElement} Color edit element. |
color_addTransforms(result, source, index, results) X-Ref |
No description |
FontAppearanceControl(props) X-Ref |
Control to display unified font style and weight options. param: {Object} props Component props. return: {WPElement} Font appearance control. |
isLineHeightDefined(lineHeight) X-Ref |
Determines if the lineHeight attribute has been properly defined. param: {any} lineHeight The value to check. return: {boolean} Whether the lineHeight attribute is valid. |
LineHeightEdit(props) X-Ref |
Inspector control panel containing the line height related configuration param: {Object} props return: {WPElement} Line height edit element. |
useIsLineHeightDisabled() X-Ref |
Custom hook that checks if line-height settings have been disabled. param: {string} name The name of the block. return: {boolean} Whether setting is disabled. |
hasLineHeightValue(props) X-Ref |
Checks if there is a current value set for the line height block support. param: {Object} props Block props. return: {boolean} Whether or not the block has a line height value set. |
resetLineHeight(_ref) X-Ref |
Resets the line height block support attribute. This can be used when disabling the line height support controls for a block via a progressive discovery panel. param: {Object} props Block props. param: {Object} props.attributes Block's attributes. param: {Object} props.setAttributes Function to set block's attributes. |
FontAppearanceEdit(props) X-Ref |
Inspector control panel containing the font appearance options. param: {Object} props Block properties. return: {WPElement} Font appearance edit element. |
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. param: {Object} props Block properties. param: {string} props.name Name for the block type. return: {boolean} Whether font style support has been disabled. |
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. param: {Object} props Block properties. param: {string} props.name Name for the block type. return: {boolean} Whether font weight support has been disabled. |
useIsFontAppearanceDisabled(props) X-Ref |
Checks if font appearance support has been disabled. param: {Object} props Block properties. return: {boolean} Whether font appearance support has been disabled. |
hasFontAppearanceValue(props) X-Ref |
Checks if there is either a font style or weight value set within the typography styles. param: {Object} props Block props. return: {boolean} Whether or not the block has a font style or weight. |
resetFontAppearance(_ref) X-Ref |
Resets the font style and weight block support attributes. This can be used when disabling the font appearance support controls for a block via a progressive discovery panel. param: {Object} props Block props. param: {Object} props.attributes Block's attributes. param: {Object} props.setAttributes Function to set block's attributes. |
FontFamilyControl(_ref) X-Ref |
Internal dependencies |
font_family_addAttributes(settings) X-Ref |
Filters registered block settings, extending attributes to include the `fontFamily` attribute. param: {Object} settings Original block settings return: {Object} Filtered block settings |
font_family_addSaveProps(props, blockType, attributes) X-Ref |
Override props assigned to save component to inject font family. param: {Object} props Additional props applied to save element param: {Object} blockType Block type param: {Object} attributes Block attributes return: {Object} Filtered props applied to save element |
font_family_addEditProps(settings) X-Ref |
Filters registered block settings to expand the block edit wrapper by applying the desired styles and classnames. param: {Object} settings Original block settings. return: {Object} Filtered block settings. |
FontFamilyEdit(_ref) X-Ref |
No description |
onChange(newValue) X-Ref |
No description |
useIsFontFamilyDisabled(_ref4) X-Ref |
Custom hook that checks if font-family functionality is disabled. param: {string} name The name of the block. return: {boolean} Whether setting is disabled. |
hasFontFamilyValue(props) X-Ref |
Checks if there is a current value set for the font family block support. param: {Object} props Block props. return: {boolean} Whether or not the block has a font family value set. |
resetFontFamily(_ref5) X-Ref |
Resets the font family block support attribute. This can be used when disabling the font family support controls for a block via a progressive discovery panel. param: {Object} props Block props. param: {Object} props.setAttributes Function to set block's attributes. |
getFontSizeObjectByValue(fontSizes, value) X-Ref |
Returns the corresponding font size object for a given value. param: {Array} fontSizes Array of font size objects. param: {number} value Font size value. return: {Object} Font size object. |
getFontSizeClass(fontSizeSlug) X-Ref |
Returns a class based on fontSizeName. param: {string} fontSizeSlug Slug of the fontSize. return: {string} String with the class corresponding to the fontSize passed. |
FontSizePicker(props) X-Ref |
No description |
font_size_addAttributes(settings) X-Ref |
Filters registered block settings, extending attributes to include `fontSize` and `fontWeight` attributes. param: {Object} settings Original block settings. return: {Object} Filtered block settings. |
font_size_addSaveProps(props, blockType, attributes) X-Ref |
Override props assigned to save component to inject font size. param: {Object} props Additional props applied to save element. param: {Object} blockType Block type. param: {Object} attributes Block attributes. return: {Object} Filtered props applied to save element. |
font_size_addEditProps(settings) X-Ref |
Filters registered block settings to expand the block edit wrapper by applying the desired styles and classnames. param: {Object} settings Original block settings. return: {Object} Filtered block settings. |
FontSizeEdit(props) X-Ref |
Inspector control panel containing the font size related configuration param: {Object} props return: {WPElement} Font size edit element. |
hasFontSizeValue(props) X-Ref |
Checks if there is a current value set for the font size block support. param: {Object} props Block props. return: {boolean} Whether or not the block has a font size value set. |
resetFontSize(_ref) X-Ref |
Resets the font size block support attribute. This can be used when disabling the font size support controls for a block via a progressive discovery panel. param: {Object} props Block props. param: {Object} props.attributes Block's attributes. param: {Object} props.setAttributes Function to set block's attributes. |
useIsFontSizeDisabled() X-Ref |
Custom hook that checks if font-size settings have been disabled. param: {string} name The name of the block. return: {boolean} Whether setting is disabled. |
font_size_addTransforms(result, source, index, results) X-Ref |
No description |
TextDecorationControl(_ref) X-Ref |
Control to facilitate text decoration selections. param: {Object} props Component props. param: {string} props.value Currently selected text decoration. param: {Function} props.onChange Handles change in text decoration selection. return: {WPElement} Text decoration control. |
TextDecorationEdit(props) X-Ref |
Inspector control panel containing the text decoration options. param: {Object} props Block properties. return: {WPElement} Text decoration edit element. |
onChange(newDecoration) X-Ref |
No description |
useIsTextDecorationDisabled() X-Ref |
Checks if text-decoration settings have been disabled. param: {string} name Name of the block. return: {boolean} Whether or not the setting is disabled. |
hasTextDecorationValue(props) X-Ref |
Checks if there is a current value set for the text decoration block support. param: {Object} props Block props. return: {boolean} Whether or not the block has a text decoration set. |
resetTextDecoration(_ref) X-Ref |
Resets the text decoration block support attribute. This can be used when disabling the text decoration support controls for a block via a progressive discovery panel. param: {Object} props Block props. param: {Object} props.attributes Block's attributes. param: {Object} props.setAttributes Function to set block's attributes. |
TextTransformControl(_ref) X-Ref |
Control to facilitate text transform selections. param: {Object} props Component props. param: {string} props.value Currently selected text transform. param: {Function} props.onChange Handles change in text transform selection. return: {WPElement} Text transform control. |
TextTransformEdit(props) X-Ref |
Inspector control panel containing the text transform options. param: {Object} props Block properties. return: {WPElement} Text transform edit element. |
onChange(newTransform) X-Ref |
No description |
useIsTextTransformDisabled() X-Ref |
Checks if text-transform settings have been disabled. param: {string} name Name of the block. return: {boolean} Whether or not the setting is disabled. |
hasTextTransformValue(props) X-Ref |
Checks if there is a current value set for the text transform block support. param: {Object} props Block props. return: {boolean} Whether or not the block has a text transform set. |
resetTextTransform(_ref) X-Ref |
Resets the text transform block support attribute. This can be used when disabling the text transform support controls for a block via a progressive discovery panel. param: {Object} props Block props. param: {Object} props.attributes Block's attributes. param: {Object} props.setAttributes Function to set block's attributes. |
LetterSpacingControl(_ref) X-Ref |
Control for letter-spacing. param: {Object} props Component props. param: {string} props.value Currently selected letter-spacing. param: {Function} props.onChange Handles change in letter-spacing selection. param: {string|number|undefined} props.__unstableInputWidth Input width to pass through to inner UnitControl. Should be a valid CSS value. return: {WPElement} Letter-spacing control. |
LetterSpacingEdit(props) X-Ref |
Inspector control panel containing the letter-spacing options. param: {Object} props Block properties. return: {WPElement} Letter-spacing edit element. |
onChange(newSpacing) X-Ref |
No description |
useIsLetterSpacingDisabled() X-Ref |
Checks if letter-spacing settings have been disabled. param: {string} name Name of the block. return: {boolean} Whether or not the setting is disabled. |
hasLetterSpacingValue(props) X-Ref |
Checks if there is a current value set for the letter spacing block support. param: {Object} props Block props. return: {boolean} Whether or not the block has a letter spacing set. |
resetLetterSpacing(_ref) X-Ref |
Resets the letter spacing block support attribute. This can be used when disabling the letter spacing support controls for a block via a progressive discovery panel. param: {Object} props Block props. param: {Object} props.attributes Block's attributes. param: {Object} props.setAttributes Function to set block's attributes. |
TypographyPanel(props) X-Ref |
No description |
useIsTypographyDisabled() X-Ref |
No description |
compileStyleValue(uncompiledValue) X-Ref |
No description |
getInlineStyles() X-Ref |
Returns the inline styles to add depending on the style object param: {Object} styles Styles configuration. return: {Object} Flattened CSS variables declaration. |
compileElementsStyles(selector) X-Ref |
No description |
style_addAttribute(settings) X-Ref |
Filters registered block settings, extending attributes to include `style` attribute. param: {Object} settings Original block settings. return: {Object} Filtered block settings. |
style_addSaveProps(props, blockType, attributes) X-Ref |
Override props assigned to save component to inject the CSS variables definition. param: {Object} props Additional props applied to save element. param: {Object} blockType Block type. param: {Object} attributes Block attributes. param: {?Record<string, string[]>} skipPaths An object of keys and paths to skip serialization. return: {Object} Filtered props applied to save element. |
style_addEditProps(settings) X-Ref |
Filters registered block settings to extend the block edit wrapper to apply the desired styles and classnames properly. param: {Object} settings Original block settings. return: {Object}.Filtered block settings. |
DuotoneControl(_ref) X-Ref |
No description |
getValuesFromColors() X-Ref |
Convert a list of colors to an object of R, G, and B values. param: {string[]} colors Array of RBG color strings. return: {Object} R, G, and B values. |
DuotoneStylesheet(_ref) X-Ref |
Stylesheet for rendering the duotone filter. param: {Object} props Duotone props. param: {string} props.selector Selector to apply the filter to. param: {string} props.id Unique id for this duotone filter. return: {WPElement} Duotone element. |
DuotoneFilter(_ref2) X-Ref |
SVG for rendering the duotone filter. param: {Object} props Duotone props. param: {string} props.id Unique id for this duotone filter. param: {Values} props.values R, G, B, and A values to filter with. return: {WPElement} Duotone element. |
InlineDuotone(_ref3) X-Ref |
SVG and stylesheet needed for rendering the duotone filter. param: {Object} props Duotone props. param: {string} props.selector Selector to apply the filter to. param: {string} props.id Unique id for this duotone filter. param: {Values} props.values R, G, B, and A values to filter with. return: {WPElement} Duotone element. |
useMultiOriginPresets(_ref4) X-Ref |
No description |
DuotonePanel(_ref5) X-Ref |
No description |
addDuotoneAttributes(settings) X-Ref |
Filters registered block settings, extending attributes to include the `duotone` attribute. param: {Object} settings Original block settings. return: {Object} Filtered block settings. |
scopeSelector(scope, selector) X-Ref |
Function that scopes a selector with another one. This works a bit like SCSS nesting except the `&` operator isn't supported. param: {string} scope Selector to scope to. param: {string} selector Original selector. return: {string} Scoped selector. |
PresetDuotoneFilter(_ref6) X-Ref |
No description |
LayoutPanel(_ref) X-Ref |
No description |
LayoutTypeSwitcher(_ref2) X-Ref |
No description |
layout_addAttribute(settings) X-Ref |
Filters registered block settings, extending attributes to include `layout`. param: {Object} settings Original block settings. return: {Object} Filtered block settings. |
getBorderClassesAndStyles(_ref) X-Ref |
Provides the CSS class names and inline styles for a block's border support attributes. param: {Object} attributes Block attributes. param: {string} attributes.borderColor Selected named border color. param: {Object} attributes.style Block's styles attribute. return: {Object} Border block support derived CSS classes & styles. |
useBorderProps(attributes) X-Ref |
Derives the border related props for a block from its border block support attributes. Inline styles are forced for named colors to ensure these selections are reflected when themes do not load their color stylesheets in the editor. param: {Object} attributes Block attributes. return: {Object} ClassName & style props from border block support. |
getColorClassesAndStyles(attributes) X-Ref |
Provides the CSS class names and inline styles for a block's color support attributes. param: {Object} attributes Block attributes. return: {Object} Color block support derived CSS classes & styles. |
useColorProps(attributes) X-Ref |
Determines the color related props for a block derived from its color block support attributes. Inline styles are forced for named colors to ensure these selections are reflected when themes do not load their color stylesheets in the editor. param: {Object} attributes Block attributes. return: {Object} ClassName & style props from colors block support. |
getSpacingClassesAndStyles(attributes) X-Ref |
Provides the CSS class names and inline styles for a block's spacing support attributes. param: {Object} attributes Block attributes. return: {Object} Spacing block support derived CSS classes & styles. |
useCachedTruthy(value) X-Ref |
Keeps an up-to-date copy of the passed value and returns it. If value becomes falsy, it will return the last truthy copy. param: {any} value return: {any} value |
createColorHOC(colorTypes, withColorPalette) X-Ref |
Helper function used with `createHigherOrderComponent` to create higher order components for managing color logic. 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. return: {WPComponent} The component that can be used as a HOC. |
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. param: {Array} colorsArray The array of color objects (name, slug, color, etc... ). return: {Function} Higher-order component. |
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. param: {...(Object|string)} colorTypes The arguments can be strings or objects. If the argument is an object, return: {Function} Higher-order component. |
AlignmentUI(_ref) X-Ref |
No description |
applyOrUnset(align) X-Ref |
No description |
setIcon() 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. |
createLinkCompleter() X-Ref |
Creates a suggestion list for links to posts or pages. return: {WPCompleter} A links completer. |
useCompleters(_ref) X-Ref |
No description |
useBlockEditorAutocompleteProps(props) X-Ref |
No description |
BlockEditorAutocomplete(props) X-Ref |
Wrap the default Autocomplete component with one that supports a filter hook for customizing its list of autocompleters. |
BlockFullHeightAlignmentControl(_ref) X-Ref |
No description |
BlockAlignmentMatrixControl(props) X-Ref |
No description |
BlockBreadcrumb(_ref) X-Ref |
Block breadcrumb component, displaying the hierarchy of the current block selection as a breadcrumb. param: {Object} props Component props. param: {string} props.rootLabelText Translated label for the root element of the breadcrumb trail. return: {WPElement} Block Breadcrumb. |
BlockContentOverlay(_ref) X-Ref |
External dependencies |
ListViewLeaf(_ref) X-Ref |
No description |
ListViewExpander(_ref) X-Ref |
WordPress dependencies |
ListViewBlockSelectButton(_ref, ref) X-Ref |
No description |
onKeyDownHandler(event) X-Ref |
No description |
getCommonDepthClientIds(startId, endId, startParents, endParents) X-Ref |
From a start and end clientId of potentially different nesting levels, return the nearest-depth ids that have a common level of depth in the nesting hierarchy. For multiple block selection, this ensure that the selection is always at the same nesting level, and not split across separate levels. param: {string} startId The first id of a selection. param: {string} endId The end id of a selection, usually one that has been clicked on. param: {string[]} startParents An array of ancestor ids for the start id, in descending order. param: {string[]} endParents An array of ancestor ids for the end id, in descending order. return: {Object} An object containing the start and end ids. |
ListViewBlock(_ref) X-Ref |
No description |
countBlocks(block, expandedState, draggedClientIds, isExpandedByDefault) X-Ref |
Given a block, returns the total number of blocks in that subtree. This is used to help determine the list position of a block. When a block is collapsed, we do not count their children as part of that total. In the current drag implementation dragged blocks and their children are not counted. param: {Object} block block tree param: {Object} expandedState state that notes which branches are collapsed param: {Array} draggedClientIds a list of dragged client ids param: {boolean} isExpandedByDefault flag to determine the default fallback expanded state. return: {number} block count |
ListViewBranch(props) X-Ref |
No description |
ListViewDropIndicator(_ref) X-Ref |
WordPress dependencies |
useBlockSelection() X-Ref |
No description |
useListViewClientIds(blocks) X-Ref |
Internal dependencies |
isPointContainedByRect(point, rect) X-Ref |
Is the point contained by the rectangle. param: {WPPoint} point The point. param: {DOMRect} rect The rectangle. return: {boolean} True if the point is contained by the rectangle, false otherwise. |
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. |
getListViewDropTarget(blocksData, position) X-Ref |
Given blocks data and the cursor position, compute the drop target. param: {WPListViewDropZoneBlocks} blocksData Data about the blocks in list view. param: {WPPoint} position The point representing the cursor position when dragging. return: {WPListViewDropZoneTarget} An object containing data about the drop target. |
useListViewDropZone() X-Ref |
A react hook for implementing a drop zone in list view. return: {WPListViewDropZoneTarget} The drop target. |
useListViewExpandSelectedItem(_ref) X-Ref |
Internal dependencies |
ListView(_ref, ref) X-Ref |
Wrap `ListViewRows` with `TreeGrid`. ListViewRows 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: {Array} props.blocks Custom subset of block client IDs to be used instead of the default hierarchy. param: {boolean} props.showNestedBlocks Flag to enable displaying nested blocks. param: {boolean} props.showBlockMovers Flag to enable block movers param: {boolean} props.__experimentalFeatures Flag to enable experimental features. param: {boolean} props.__experimentalPersistentListViewFeatures Flag to enable features for the Persistent List View experiment. param: {boolean} props.__experimentalHideContainerBlockActions Flag to hide actions of top level blocks (like core/widget-area) param: {string} props.id Unique identifier for the root list element (primarily for a11y purposes). param: {boolean} props.expandNested Flag to determine whether nested levels are expanded by default. param: {Object} ref Forwarded ref |
BlockNavigationDropdownToggle(_ref) X-Ref |
No description |
BlockNavigationDropdown(_ref2, ref) X-Ref |
No description |
BlockStylesPreviewPanel(_ref) X-Ref |
No description |
BlockStylesPreviewPanelSlot(_ref) X-Ref |
No description |
BlockStylesPreviewPanelFill(_ref2) X-Ref |
No description |
BlockStyles(_ref3) X-Ref |
No description |
BlockVariationPicker(_ref) X-Ref |
No description |
usePatternsSetup(clientId, blockName, filterPatternsFn) X-Ref |
No description |
block_pattern_setup_BlockPattern(_ref2) X-Ref |
No description |
BlockPatternSlide(_ref3) X-Ref |
No description |
VariationsButtons(_ref) X-Ref |
No description |
VariationsDropdown(_ref2) X-Ref |
No description |
__experimentalBlockVariationTransforms(_ref4) X-Ref |
No description |
ColorPaletteControl(_ref) X-Ref |
Internal dependencies |
DateFormatPicker(_ref) X-Ref |
The `DateFormatPicker` component renders controls that let the user choose a _date format_. That is, how they want their dates to be formatted. param: {Object} props param: {string|null} props.format The selected date param: {string} props.defaultFormat The date format that param: {( format: string|null ) => void} props.onChange Called when a |
NonDefaultControls(_ref2) X-Ref |
No description |
__extends(d, b) X-Ref |
No description |
__() X-Ref |
No description |
__rest(s, e) X-Ref |
No description |
__decorate(decorators, target, key, desc) X-Ref |
No description |
__param(paramIndex, decorator) X-Ref |
No description |
__metadata(metadataKey, metadataValue) X-Ref |
No description |
__awaiter(thisArg, _arguments, P, generator) X-Ref |
No description |
adopt(value) X-Ref |
No description |
fulfilled(value) X-Ref |
No description |
rejected(value) X-Ref |
No description |
step(result) X-Ref |
No description |
__generator(thisArg, body) X-Ref |
No description |
verb(n) X-Ref |
No description |
step(op) X-Ref |
No description |
__exportStar(m, o) X-Ref |
No description |
__values(o) X-Ref |
No description |
__read(o, n) X-Ref |
No description |
__spread() X-Ref |
No description |
__spreadArrays() X-Ref |
No description |
__await(v) X-Ref |
No description |
__asyncGenerator(thisArg, _arguments, generator) X-Ref |
No description |
verb(n) X-Ref |
No description |
resume(n, v) X-Ref |
No description |
step(r) X-Ref |
No description |
fulfill(value) X-Ref |
No description |
reject(value) X-Ref |
No description |
settle(f, v) X-Ref |
No description |
__asyncDelegator(o) X-Ref |
No description |
verb(n, f) X-Ref |
No description |
__asyncValues(o) X-Ref |
No description |
verb(n) X-Ref |
No description |
settle(resolve, reject, d, v) X-Ref |
No description |
__makeTemplateObject(cooked, raw) X-Ref |
No description |
__importStar(mod) X-Ref |
No description |
__importDefault(mod) X-Ref |
No description |
__classPrivateFieldGet(receiver, privateMap) X-Ref |
No description |
__classPrivateFieldSet(receiver, privateMap, value) X-Ref |
No description |
getCropSize(mediaWidth, mediaHeight, containerWidth, containerHeight, aspect, rotation) X-Ref |
Compute the dimension of the crop area based on media size, aspect ratio and optionally rotation |
restrictPosition(position, mediaSize, cropSize, zoom, rotation) X-Ref |
Ensure a new media position stays in the crop area. |
restrictPositionCoord(position, mediaSize, cropSize, zoom) X-Ref |
No description |
getDistanceBetweenPoints(pointA, pointB) X-Ref |
No description |
getRotationBetweenPoints(pointA, pointB) X-Ref |
No description |
computeCroppedArea(crop, mediaSize, cropSize, aspect, zoom, rotation, restrictPosition) X-Ref |
Compute the output cropped area of the media in percentages and pixels. x/y are the top-left coordinates on the src media |
limitArea(max, value) X-Ref |
Ensure the returned value is between 0 and max |
noOp(_max, value) X-Ref |
No description |
getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize) X-Ref |
Compute the crop and zoom from the croppedAreaPixels |
getInitialCropFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize) X-Ref |
Compute the crop and zoom from the croppedAreaPixels |
getCenter(a, b) X-Ref |
Return the point that is the center of point a and b |
rotateAroundMidPoint(x, y, xMid, yMid, degrees) X-Ref |
Returns an x,y point once rotated around xMid,yMid |
translateSize(width, height, rotation) X-Ref |
Returns the new bounding area of a rotated rectangle. |
classNames() X-Ref |
Combine multiple class names into a single string. |
Cropper() X-Ref |
No description |
useSaveImage(_ref) X-Ref |
No description |
useTransformState(_ref) X-Ref |
No description |
editImage(event) X-Ref |
No description |
useTransformImage(imageProperties, isEditing) X-Ref |
No description |
ImageEditingProvider(_ref) X-Ref |
No description |
ImageCropper(_ref) X-Ref |
No description |
ZoomDropdown() X-Ref |
No description |
AspectGroup(_ref) X-Ref |
No description |
AspectRatioDropdown(_ref3) X-Ref |
No description |
RotationButton() X-Ref |
Internal dependencies |
FormControls() X-Ref |
Internal dependencies |
ImageEditor(_ref) X-Ref |
No description |
useDimensionHandler(customHeight, customWidth, defaultHeight, defaultWidth, onChange) X-Ref |
WordPress dependencies |
ImageSizeControl(_ref) X-Ref |
No description |
getVisualTypeName(suggestion) 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. param: {string} val the candidate for being URL-like (or not). return: {boolean} whether or not the value is potentially a URL. |
useSearchHandler(suggestionsQuery, allowDirectEntry, withCreateSuggestion, withURLSuggestion) X-Ref |
No description |
use_rich_url_data_reducer(state, action) X-Ref |
No description |
useRemoteUrlData(url) X-Ref |
No description |
LinkPreview(_ref) X-Ref |
No description |
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 |
Internal 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 |
useUndoAutomaticChange() X-Ref |
Internal dependencies |
onKeyDown(event) X-Ref |
No description |
useCaretInFormat(_ref) X-Ref |
Internal dependencies |
useMarkPersistent(_ref) X-Ref |
Internal dependencies |
filePasteHandler(files) X-Ref |
WordPress dependencies |
addActiveFormats(value, activeFormats) X-Ref |
No description |
getMultilineTag(multiline) X-Ref |
Get the multiline tag based on the multiline prop. param: {?(string|boolean)} multiline The multiline prop. return: {?string} The multiline tag. |
getAllowedFormats(_ref) X-Ref |
No description |
createLinkInParagraph(url, onReplace) X-Ref |
Creates a link from pasted URL. Creates a paragraph block containing a link to the URL, and calls `onReplace`. param: {string} url The URL that could not be embedded. param: {Function} onReplace Function to call with the created fallback block. |
splitValue(_ref) X-Ref |
No description |
adjustLines(value, isMultiline) X-Ref |
Replaces line separators with line breaks if not multiline. Replaces line breaks with line separators if multiline. param: {RichTextValue} value Value to adjust. param: {boolean} isMultiline Whether to adjust to multiline or not. return: {RichTextValue} Adjusted value. |
usePasteHandler(props) X-Ref |
No description |
_onPaste(event) X-Ref |
No description |
removeWindowsFragments(html) X-Ref |
Normalizes a given string of HTML to remove the Windows specific "Fragment" comments and any preceeding and trailing whitespace. param: {string} html the html to be normalized return: {string} the normalized html |
removeCharsetMetaTag(html) X-Ref |
Removes the charset meta tag inserted by Chromium. See: - https://github.com/WordPress/gutenberg/issues/33585 - https://bugs.chromium.org/p/chromium/issues/detail?id=1264616#c4 param: {string} html the html to be stripped of the meta tag. return: {string} the cleaned html |
preventEventDiscovery(value) X-Ref |
WordPress dependencies |
findSelection(blocks) X-Ref |
No description |
useInputRules(props) X-Ref |
No description |
inputRule() X-Ref |
No description |
onInput(event) X-Ref |
No description |
useEnter(props) X-Ref |
No description |
onKeyDown(event) X-Ref |
No description |
formatTypesSelector(select) X-Ref |
No description |
useFormatTypes(_ref) X-Ref |
This hook provides RichText with the `formatTypes` and its derived props from experimental format type settings. param: {Object} $0 Options param: {string} $0.clientId Block client ID. param: {string} $0.identifier Block attribute. param: {boolean} $0.withoutInteractiveFormatting Whether to clean the interactive formattings or not. param: {Array} $0.allowedFormats Allowed formats |
useRemoveBrowserShortcuts() X-Ref |
Hook to prevent default behaviors for key combinations otherwise handled internally by RichText. return: {import('react').RefObject} The component to be rendered. |
onKeydown(event) X-Ref |
No description |
useShortcuts(keyboardShortcuts) X-Ref |
WordPress dependencies |
onKeyDown(event) X-Ref |
No description |
useInputEvents(inputEvents) X-Ref |
WordPress dependencies |
onInput(event) X-Ref |
No description |
useFirefoxCompat() X-Ref |
Internal dependencies |
onFocus() X-Ref |
No description |
FormatEdit(_ref) X-Ref |
External dependencies |
removeNativeProps(props) X-Ref |
Removes props used for the native version of RichText so that they are not passed to the DOM element and log warnings. param: {Object} props Props to filter. return: {Object} Filtered props. |
RichTextWrapper(_ref, forwardedRef) X-Ref |
No description |
addEditorOnlyFormats(value) X-Ref |
No description |
removeEditorOnlyFormats(value) X-Ref |
No description |
addInvisibleFormats(value) X-Ref |
No description |
onKeyDown(event) X-Ref |
No description |
onFocus() X-Ref |
No description |
ResponsiveBlockControlLabel(_ref) X-Ref |
No description |
ResponsiveBlockControl(props) X-Ref |
No description |
RichTextShortcut(_ref) X-Ref |
Internal dependencies |
callback(event) X-Ref |
No description |
RichTextToolbarButton(_ref) X-Ref |
WordPress dependencies |
__unstableRichTextInputEvent(_ref) X-Ref |
Internal dependencies |
callback(event) X-Ref |
No description |
ToolSelector(props, ref) X-Ref |
No description |
UnitControl(_ref) X-Ref |
Internal dependencies |
Class: URLInputButton - X-Ref
PreviewOptions(_ref) X-Ref |
No description |
useResizeCanvas(deviceType) X-Ref |
Function to resize the editor window. param: {string} deviceType Used for determining the size of the container (e.g. Desktop, Tablet, Mobile) return: {Object} Inline styles to be added to resizable container. |
MultiSelectionInspector(_ref) X-Ref |
No description |
DefaultStylePicker(_ref) X-Ref |
No description |
BlockTools(_ref) X-Ref |
Renders block tools (the block toolbar, select/navigation mode toolbar, the insertion point and a slot for the inline rich text toolbar). Must be wrapped around the block content and editor styles wrapper or iframe. param: {Object} $0 Props. param: {Object} $0.children The block content and style container. param: {Object} $0.__unstableContentRef Ref holding the content scroll container. |
onKeyDown(event) X-Ref |
No description |
InserterLibrary(_ref, ref) X-Ref |
No description |
KeyboardShortcuts() X-Ref |
No description |
KeyboardShortcutsRegister() X-Ref |
No description |
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. param: {KeyboardEvent} event Keydown event to test. return: {boolean} Whether event is eligible to start typing. |
useMouseMoveTypingReset() X-Ref |
Removes the `isTyping` flag when the mouse moves in the document of the given element. |
stopTypingOnMouseMove(event) X-Ref |
On mouse move, unset typing flag if user has moved cursor. param: {MouseEvent} event Mousemove event. |
useTypingObserver() 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. |
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 |
useTypewriter() 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 |
addToBlockType(renderedBlocks, blockName, uniqueId) X-Ref |
Immutably adds an unique identifier to a set scoped for a given block type. param: {Object} renderedBlocks Rendered blocks grouped by block name param: {string} blockName Name of the block. param: {*} uniqueId Any value that acts as a unique identifier for a block instance. return: {Object} The list of rendered blocks grouped by block name. |
useNoRecursiveRenders(uniqueId) X-Ref |
A React hook for keeping track of blocks previously rendered up in the block tree. Blocks susceptible to recursion can use this hook in their `Edit` function to prevent said recursion. param: {*} uniqueId Any value that acts as a unique identifier for a block instance. param: {string} blockName Optional block name. return: {[boolean, Function]} A tuple of: |
parseUnit(cssUnit) X-Ref |
Converts string to object { value, unit }. param: {string} cssUnit return: {Object} parsedUnit |
calculate(expression) X-Ref |
Evaluate a math expression. param: {string} expression return: {number} evaluated expression. |
getFunctionUnitValue(functionUnitValue, options) X-Ref |
Calculates the css function value for the supported css functions such as max, min, clamp and calc. param: {string} functionUnitValue string should be in a particular format (for example min(12px,12px) ) no nested loops. param: {Object} options return: {string} unit containing the unit in PX. |
parseUnitFunction(cssUnit) X-Ref |
Take a css function such as min, max, calc, clamp and returns parsedUnit How this works for the nested function is that it first replaces the inner function call. Then it tackles the outer onces. So for example: min( max(25px, 35px), 40px ) in the first pass we would replace max(25px, 35px) with 35px. then we would try to evaluate min( 35px, 40px ) and then finally return 35px. param: {string} cssUnit return: {Object} parsedUnit object. |
isMathExpression(cssUnit) X-Ref |
Return true if we think this is a math expression. param: {string} cssUnit the cssUnit value being evaluted. return: {boolean} Whether the cssUnit is a math expression. |
evalMathExpression(cssUnit) X-Ref |
Evaluates the math expression and return a px value. param: {string} cssUnit the cssUnit value being evaluted. return: {string} return a converfted value to px. |
convertParsedUnitToPx(parsedUnit, options) X-Ref |
Convert a parsedUnit object to px value. param: {Object} parsedUnit param: {Object} options return: {string} or {null} returns the converted with in a px value format. |
getPxFromCssUnit(cssUnit) X-Ref |
Returns the px value of a cssUnit. param: {string} cssUnit param: {Object} options return: {string} returns the cssUnit value in a simple px format. |
memoizedGetPxFromCssUnit(cssUnit) X-Ref |
Returns the px value of a cssUnit. The memoized version of getPxFromCssUnit; param: {string} cssUnit param: {Object} options return: {string} returns the cssUnit value in a simple px format. |
hashOptions(options) X-Ref |
No description |
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 |
classNames() 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 |
_interopRequireDefault(obj) X-Ref |
No description |
diffChars(oldStr, newStr, options) 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 |
lineHeight(node) X-Ref |
Calculate the `line-height` of a given node param: {HTMLElement} node Element to calculate line height of. Must be in the DOM. returns: {Number} `line-height` of the element in pixels |
_populate() X-Ref |
No description |
isEventSupported(eventNameSuffix, capture) X-Ref |
Checks if an event is supported in the current execution environment. NOTE: This will not work correctly for non-generic events such as `change`, `reset`, `load`, `error`, and `select`. Borrows from Modernizr. param: {string} eventNameSuffix Event name, e.g. "click". param: {?boolean} capture Check if the capture phase is supported. return: {boolean} True if the event is supported. |
normalizeWheel( event) X-Ref |
Mouse wheel (and 2-finger trackpad) support on the web sucks. It is complicated, thus this doc is long and (hopefully) detailed enough to answer your questions. If you need to react to the mouse wheel in a predictable way, this code is like your bestest friend. * hugs * As of today, there are 4 DOM event types you can listen to: 'wheel' -- Chrome(31+), FF(17+), IE(9+) 'mousewheel' -- Chrome, IE(6+), Opera, Safari 'MozMousePixelScroll' -- FF(3.5 only!) (2010-2013) -- don't bother! 'DOMMouseScroll' -- FF(0.9.7+) since 2003 So what to do? The is the best: normalizeWheel.getEventType(); In your event callback, use this code to get sane interpretation of the deltas. This code will return an object with properties: spinX -- normalized spin speed (use for zoom) - x plane spinY -- " - y plane pixelX -- normalized distance (to pixels) - x plane pixelY -- " - y plane Wheel values are provided by the browser assuming you are using the wheel to scroll a web page by a number of lines or pixels (or pages). Values can vary significantly on different platforms and browsers, forgetting that you can scroll at different speeds. Some devices (like trackpads) emit more events at smaller increments with fine granularity, and some emit massive jumps with linear speed or acceleration. This code does its best to normalize the deltas for you: - spin is trying to normalize how far the wheel was spun (or trackpad dragged). This is super useful for zoom support where you want to throw away the chunky scroll steps on the PC and make those equal to the slow and smooth tiny steps on the Mac. Key data: This code tries to resolve a single slow step on a wheel to 1. - pixel is normalizing the desired scroll delta in pixel units. You'll get the crazy differences between browsers, but at least it'll be in pixels! - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT. This should translate to positive value zooming IN, negative zooming OUT. This matches the newer 'wheel' event. Why are there spinX, spinY (or pixels)? - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn with a mouse. It results in side-scrolling in the browser by default. - spinY is what you expect -- it's the classic axis of a mouse wheel. - I dropped spinZ/pixelZ. It is supported by the DOM 3 'wheel' event and probably is by browsers in conjunction with fancy 3D controllers .. but you know. Implementation info: Examples of 'wheel' event if you scroll slowly (down) by one step with an average mouse: OS X + Chrome (mouse) - 4 pixel delta (wheelDelta -120) OS X + Safari (mouse) - N/A pixel delta (wheelDelta -12) OS X + Firefox (mouse) - 0.1 line delta (wheelDelta N/A) Win8 + Chrome (mouse) - 100 pixel delta (wheelDelta -120) Win8 + Firefox (mouse) - 3 line delta (wheelDelta -120) On the trackpad: OS X + Chrome (trackpad) - 2 pixel delta (wheelDelta -6) OS X + Firefox (trackpad) - 1 pixel delta (wheelDelta N/A) On other/older browsers.. it's more complicated as there can be multiple and also missing delta values. The 'wheel' event is more standard: http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents The basics is that it includes a unit, deltaMode (pixels, lines, pages), and deltaX, deltaY and deltaZ. Some browsers provide other values to maintain backward compatibility with older events. Those other values help us better normalize spin speed. Example of what the browsers provide: | event.wheelDelta | event.detail ------------------+------------------+-------------- Safari v5/OS X | -120 | 0 Safari v5/Win7 | -120 | 0 Chrome v17/OS X | -120 | 0 Chrome v17/Win7 | -120 | 0 IE9/Win7 | -120 | undefined Firefox v4/OS X | undefined | 1 Firefox v4/Win7 | undefined | 3 |
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 |
__() X-Ref |
No description |
TextareaAutosizeClass() X-Ref |
A light replacement for built-in textarea component which automaticaly adjusts its height to match the content |
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 |
__webpack_require__(moduleId) X-Ref |
No description |
migrateLightBlockWrapper(settings) X-Ref |
No description |
_extends() X-Ref |
No description |
insertAt(array, elements, index) X-Ref |
Insert one or multiple elements into a given position of an array. param: {Array} array Source array. param: {*} elements Elements to insert. param: {number} index Insert Position. return: {Array} Result. |
moveTo(array, from, to) X-Ref |
Moves an element in an array. param: {Array} array Source array. param: {number} from Source index. param: {number} to Destination index. param: {number} count Number of elements to move. return: {Array} Result. |
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. param: {Array} blocks Blocks to map. param: {?string} rootClientId Assumed root client ID. return: {Object} Block order map object. |
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. param: {Array} blocks Blocks to map. param: {?string} rootClientId Assumed root client ID. return: {Object} Block order map object. |
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. param: {Array} blocks Blocks to flatten. param: {Function} transform Transforming function to be applied to each block. return: {Object} Flattened object. |
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. param: {Array} blocks Blocks to flatten. return: {Object} Flattened block attributes object. |
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. param: {Array} blocks Blocks to flatten. return: {Object} Flattened block attributes object. |
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. param: {Object} original Original object. param: {Object} working Working object. return: {Object} Mutation-safe object. |
hasSameKeys(a, b) X-Ref |
Returns true if the two object arguments have the same keys, or false otherwise. param: {Object} a First object. param: {Object} b Second object. return: {boolean} Whether the two objects have the same keys. |
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. param: {Object} action Currently dispatching action. param: {Object} lastAction Previously dispatched action. return: {boolean} Whether actions are updating the same block attribute. |
buildBlockTree(state, blocks) X-Ref |
No description |
updateParentInnerBlocksInTree(state, tree, updatedClientIds) X-Ref |
No description |
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. param: {Function} reducer Original reducer function. return: {Function} Enhanced 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. param: {Function} reducer Original reducer function. return: {Function} Enhanced reducer function. |
isTyping() X-Ref |
Reducer returning typing state. param: {boolean} state Current state. param: {Object} action Dispatched action. return: {boolean} Updated state. |
draggedBlocks() X-Ref |
Reducer returning dragged block client id. param: {string[]} state Current state. param: {Object} action Dispatched action. return: {string[]} Updated state. |
isCaretWithinFormattedText() X-Ref |
Reducer returning whether the caret is within formatted text. param: {boolean} state Current state. param: {Object} action Dispatched action. return: {boolean} Updated state. |
selectionHelper() X-Ref |
Internal helper reducer for selectionStart and selectionEnd. Can hold a block selection, represented by an object with property clientId. param: {Object} state Current state. param: {Object} action Dispatched action. return: {Object} Updated state. |
selection() X-Ref |
Reducer returning the selection state. param: {boolean} state Current state. param: {Object} action Dispatched action. return: {boolean} Updated state. |
isMultiSelecting() X-Ref |
Reducer returning whether the user is multi-selecting. param: {boolean} state Current state. param: {Object} action Dispatched action. return: {boolean} Updated state. |
isSelectionEnabled() X-Ref |
Reducer returning whether selection is enabled. param: {boolean} state Current state. param: {Object} action Dispatched action. return: {boolean} Updated state. |
initialPosition() X-Ref |
Reducer returning the initial 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. param: {boolean} state Current state. param: {Object} action Dispatched action. return: {number|null} Initial position: 0, -1 or null. |
blocksMode() X-Ref |
No description |
insertionPoint() X-Ref |
Reducer returning the block insertion point visibility, either null if there is not an explicit insertion point assigned, or an object of its `index` and `rootClientId`. param: {Object} state Current state. param: {Object} action Dispatched action. return: {Object} Updated state. |
template() X-Ref |
Reducer returning whether the post blocks match the defined template or not. param: {Object} state Current state. param: {Object} action Dispatched action. return: {boolean} Updated state. |
settings() X-Ref |
Reducer returning the editor setting. param: {Object} state Current state. param: {Object} action Dispatched action. return: {Object} Updated state. |
preferences() X-Ref |
Reducer returning the user preferences. param: {Object} state Current state. param: {Object} action Dispatched action. return: {string} Updated state. |
isNavigationMode() X-Ref |
Reducer returning whether the navigation mode is enabled or not. param: {string} state Current state. param: {Object} action Dispatched action. return: {string} Updated state. |
hasBlockMovingClientId() X-Ref |
Reducer returning whether the block moving mode is enabled or not. param: {string|null} state Current state. param: {Object} action Dispatched action. return: {string|null} Updated state. |
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. param: {Object<string,Object>} state Current state. param: {Object} action Action object. return: {[string,Object]} Updated state. |
automaticChangeStatus(state, action) X-Ref |
Reducer returning automatic change state. param: {boolean} state Current state. param: {Object} action Dispatched action. return: {string} Updated state. |
highlightedBlock(state, action) X-Ref |
Reducer returning current highlighted block. param: {boolean} state Current highlighted block. param: {Object} action Dispatched action. return: {string} Updated state. |
lastBlockInserted() X-Ref |
Reducer returning the block insertion event list state. param: {Object} state Current state. param: {Object} action Dispatched action. return: {Object} Updated state. |
arrayOf( value ) X-Ref |
Returns the first argument as the sole entry in an array. param: {*} value Value to return. return: {Array} Value returned as entry in array. |
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. param: {*} value Value to test. return: {boolean} Whether value is object-like. |
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. param: {Array} a First array. param: {Array} b Second array. param: {number} fromIndex Index from which to start comparison. return: {boolean} Whether arrays are shallowly equal. |
rememo(selector, getDependants ) X-Ref |
Returns a memoized selector function. The getDependants function argument is called before the memoized selector and is expected to return an immutable reference or array of references on which the selector depends for computing its own return value. The memoize cache is preserved only as long as those dependant references remain the same. If getDependants returns a different reference(s), the cache is cleared and the selector value regenerated. param: {Function} selector Selector function. param: {Function} getDependants Dependant getter returning an immutable return: {Function} Memoized selector. |
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. param: {Array} dependants Selector dependants. return: {Object} Cache object. |
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. param: {Object} source Source object for derivation. param: {...*} extraArgs Additional arguments to pass to selector. return: {*} Selector result. |
mapRichTextSettings(attributeDefinition) X-Ref |
Helper function that maps attribute definition properties to the ones used by RichText utils like `create, toHTMLString, etc..`. param: {Object} attributeDefinition A block's attribute definition object. return: {Object} The mapped object. |
getBlockName(state, clientId) X-Ref |
Returns a block's name given its client ID, or null if no block exists with the client ID. param: {Object} state Editor state. param: {string} clientId Block client ID. return: {string} Block name. |
isBlockValid(state, clientId) X-Ref |
Returns whether a block is valid or not. param: {Object} state Editor state. param: {string} clientId Block client ID. return: {boolean} Is Valid. |
getBlockAttributes(state, clientId) X-Ref |
Returns a block's attributes given its client ID, or null if no block exists with the client ID. param: {Object} state Editor state. param: {string} clientId Block client ID. return: {Object?} Block attributes. |
getBlock(state, clientId) X-Ref |
Returns a block given its client ID. This is a parsed copy of the block, containing its `blockName`, `clientId`, and current `attributes` state. This is not the block's registration settings, which must be retrieved from the blocks module registration store. getBlock recurses through its inner blocks until all its children blocks have been retrieved. Note that getBlock will not return the child inner blocks of an inner block controller. This is because an inner block controller syncs itself with its own entity, and should therefore not be included with the blocks of a different entity. For example, say you call `getBlocks( TP )` to get the blocks of a template part. If another template part is a child of TP, then the nested template part's child blocks will not be returned. This way, the template block itself is considered part of the parent, but the children are not. param: {Object} state Editor state. param: {string} clientId Block client ID. return: {Object} Parsed block object. |
getBlocks(state, rootClientId) X-Ref |
Returns all block objects for the current post being edited as an array in the order they appear in the post. Note that this will exclude child blocks of nested inner block controllers. param: {Object} state Editor state. param: {?string} rootClientId Optional root client ID of block list. return: {Object[]} Post blocks. |
getBlockCount(state, rootClientId) X-Ref |
Returns the number of blocks currently present in the post. param: {Object} state Editor state. param: {?string} rootClientId Optional root client ID of block list. return: {number} Number of blocks in the post. |
getSelectionStart(state) X-Ref |
Returns the current selection start block client ID, attribute key and text offset. param: {Object} state Block editor state. return: {WPBlockSelection} Selection start information. |
getSelectionEnd(state) X-Ref |
Returns the current selection end block client ID, attribute key and text offset. param: {Object} state Block editor state. return: {WPBlockSelection} Selection end information. |
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. param: {Object} state Global application state. return: {?string} Client ID of block selection start. |
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. param: {Object} state Global application state. return: {?string} Client ID of block selection end. |
getSelectedBlockCount(state) X-Ref |
Returns the number of blocks currently selected in the post. param: {Object} state Global application state. return: {number} Number of blocks selected in the post. |
hasSelectedBlock(state) X-Ref |
Returns true if there is a single selected block, or false otherwise. param: {Object} state Editor state. return: {boolean} Whether a single block is selected. |
getSelectedBlockClientId(state) X-Ref |
Returns the currently selected block client ID, or null if there is no selected block. param: {Object} state Editor state. return: {?string} Selected block client ID. |
getSelectedBlock(state) X-Ref |
Returns the currently selected block, or null if there is no selected block. param: {Object} state Global application state. return: {?Object} Selected block. |
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. param: {Object} state Editor state. param: {string} clientId Block from which to find root client ID. return: {?string} Root client ID, if exists |
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. param: {Object} state Editor state. param: {string} clientId Block from which to find root client ID. return: {string} Root client ID |
getLowestCommonAncestorWithSelectedBlock(state, clientId) X-Ref |
Given a block client ID, returns the lowest common ancestor with selected client ID. param: {Object} state Editor state. param: {string} clientId Block from which to find common ancestor client ID. return: {string} Common ancestor client ID or undefined |
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. param: {Object} state Editor state. param: {?string} startClientId Optional client ID of block from which to param: {?number} modifier Directionality multiplier (1 next, -1 return: {?string} Return the client ID of the block, or null if none exists. |
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. param: {Object} state Editor state. param: {?string} startClientId Optional client ID of block from which to return: {?string} Adjacent block's client ID, or null if none exists. |
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. param: {Object} state Editor state. param: {?string} startClientId Optional client ID of block from which to return: {?string} Adjacent block's client ID, or null if none exists. |
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. If the current block is not a RichText, having initial position set to 0 means "focus block" param: {Object} state Global application state. return: {0|-1|null} Initial position. |
getMultiSelectedBlockClientIds(state) X-Ref |
Returns the current multi-selection set of block client IDs, or an empty array if there is no multi-selection. param: {Object} state Editor state. return: {Array} Multi-selected block client IDs. |
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. param: {Object} state Editor state. return: {?string} First block client ID in the multi-selection set. |
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. param: {Object} state Editor state. return: {?string} Last block client ID in the multi-selection set. |
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. param: {Object} state Editor state. param: {string} clientId Block client ID. return: {boolean} Whether block is first in multi-selection. |
isBlockMultiSelected(state, clientId) X-Ref |
Returns true if the client ID occurs within the block multi-selection, or false otherwise. param: {Object} state Editor state. param: {string} clientId Block client ID. return: {boolean} Whether block is in multi-selection set. |
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. param: {Object} state Editor state. return: {?string} Client ID of block beginning multi-selection. |
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. param: {Object} state Editor state. return: {?string} Client ID of block ending multi-selection. |
__unstableIsFullySelected(state) X-Ref |
Returns true if the selection is not partial. param: {Object} state Editor state. return: {boolean} Whether the selection is mergeable. |
__unstableIsSelectionCollapsed(state) X-Ref |
Returns true if the selection is collapsed. param: {Object} state Editor state. return: {boolean} Whether the selection is collapsed. |
__unstableIsSelectionMergeable(state, isForward) X-Ref |
Check whether the selection is mergeable. param: {Object} state Editor state. param: {boolean} isForward Whether to merge forwards. return: {boolean} Whether the selection is mergeable. |
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. param: {Object} state Editor state. param: {?string} rootClientId Optional root client ID of block list. return: {Array} Ordered client IDs of editor blocks. |
getBlockIndex(state, clientId) 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. param: {Object} state Editor state. param: {string} clientId Block client ID. return: {number} Index at which block exists in order. |
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. param: {Object} state Editor state. param: {string} clientId Block client ID. return: {boolean} Whether block is selected and multi-selection exists. |
hasSelectedInnerBlock(state, clientId) X-Ref |
Returns true if one of the block's inner blocks is selected. param: {Object} state Editor state. param: {string} clientId Block client ID. param: {boolean} deep Perform a deep check. return: {boolean} Whether the block as an inner block selected |
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. param: {Object} state Editor state. param: {string} clientId Block client ID. return: {boolean} Whether block is selected and not the last in the |
hasMultiSelection(state) X-Ref |
Returns true if a multi-selection has been made, or false otherwise. param: {Object} state Editor state. return: {boolean} Whether multi-selection has been made. |
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. param: {Object} state Global application state. return: {boolean} True if multi-selecting, false if not. |
selectors_isSelectionEnabled(state) X-Ref |
Selector that returns if multi-selection is enabled or not. param: {Object} state Global application state. return: {boolean} True if it should be possible to multi-select blocks, false if multi-selection is disabled. |
getBlockMode(state, clientId) X-Ref |
Returns the block's editing mode, defaulting to "visual" if not explicitly assigned. param: {Object} state Editor state. param: {string} clientId Block client ID. return: {Object} Block editing mode. |
selectors_isTyping(state) X-Ref |
Returns true if the user is typing, or false otherwise. param: {Object} state Global application state. return: {boolean} Whether user is typing. |
isDraggingBlocks(state) X-Ref |
Returns true if the user is dragging blocks, or false otherwise. param: {Object} state Global application state. return: {boolean} Whether user is dragging blocks. |
getDraggedBlockClientIds(state) X-Ref |
Returns the client ids of any blocks being directly dragged. This does not include children of a parent being dragged. param: {Object} state Global application state. return: {string[]} Array of dragged block client ids. |
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. param: {Object} state Global application state. param: {string} clientId Client id for block to check. return: {boolean} Whether the block is being dragged. |
isAncestorBeingDragged(state, clientId) X-Ref |
Returns whether a parent/ancestor of the block is being dragged. param: {Object} state Global application state. param: {string} clientId Client id for block to check. return: {boolean} Whether the block's ancestor is being dragged. |
selectors_isCaretWithinFormattedText(state) X-Ref |
Returns true if the caret is within formatted text, or false otherwise. param: {Object} state Global application state. return: {boolean} Whether the caret is within formatted text. |
getBlockInsertionPoint(state) X-Ref |
Returns the insertion point, the index at which the new inserted block would be placed. Defaults to the last index. param: {Object} state Editor state. return: {Object} Insertion point object with `rootClientId`, `index`. |
isBlockInsertionPointVisible(state) X-Ref |
Returns true if we should show the block insertion point. param: {Object} state Global application state. return: {?boolean} Whether the insertion point is visible or not. |
isValidTemplate(state) X-Ref |
Returns whether the blocks matches the template or not. param: {boolean} state return: {?boolean} Whether the template is valid or not. |
getTemplate(state) X-Ref |
Returns the defined block template param: {boolean} state return: {?Array} Block Template. |
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. param: {Object} state Editor state. param: {?string} rootClientId Optional block root client ID. return: {?string} Block Template Lock |
canInsertBlocks(state, clientIds) X-Ref |
Determines if the given blocks are allowed to be inserted into the block list. 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. return: {boolean} Whether the given blocks are allowed to be inserted. |
canRemoveBlock(state, clientId) X-Ref |
Determines if the given block is allowed to be deleted. param: {Object} state Editor state. param: {string} clientId The block client Id. param: {?string} rootClientId Optional root client ID of block list. return: {boolean} Whether the given block is allowed to be removed. |
canRemoveBlocks(state, clientIds) X-Ref |
Determines if the given blocks are allowed to be removed. param: {Object} state Editor state. param: {string} clientIds The block client IDs to be removed. param: {?string} rootClientId Optional root client ID of block list. return: {boolean} Whether the given blocks are allowed to be removed. |
canMoveBlock(state, clientId) X-Ref |
Determines if the given block is allowed to be moved. param: {Object} state Editor state. param: {string} clientId The block client Id. param: {?string} rootClientId Optional root client ID of block list. return: {boolean} Whether the given block is allowed to be moved. |
canMoveBlocks(state, clientIds) X-Ref |
Determines if the given blocks are allowed to be moved. param: {Object} state Editor state. param: {string} clientIds The block client IDs to be moved. param: {?string} rootClientId Optional root client ID of block list. return: {boolean} Whether the given blocks are allowed to be moved. |
canLockBlockType(state, nameOrType) X-Ref |
Determines if the given block type can be locked/unlocked by a user. param: {Object} state Editor state. param: {(string|Object)} nameOrType Block name or type object. return: {boolean} Whether a given block type can be locked/unlocked. |
getInsertUsage(state, id) X-Ref |
Returns information about how recently and frequently a block has been inserted. param: {Object} state Global application state. param: {string} id A string which identifies the insert, e.g. 'core/block/12' return: {?{ time: number, count: number }} An object containing `time` which is when the last |
getBlockListSettings(state, clientId) X-Ref |
Returns the Block List settings of a block, if any exist. param: {Object} state Editor state. param: {?string} clientId Block client ID. return: {?Object} Block settings of the block if set. |
getSettings(state) X-Ref |
Returns the editor settings. param: {Object} state Editor state. return: {Object} The editor settings object. |
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`. param: {Object} state Block editor state. return: {boolean} Whether the most recent block change was persistent. |
__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`. param: {Object} state Block editor state. return: {boolean} Whether the most recent block change was ignored. |
__experimentalGetLastBlockAttributeChanges(state) X-Ref |
Returns the block attributes changed as a result of the last dispatched action. param: {Object} state Block editor state. return: {Object<string,Object>} Subsets of block attributes changed, keyed |
getReusableBlocks(state) X-Ref |
Returns the available reusable blocks param: {Object} state Global application state. return: {Array} Reusable blocks |
selectors_isNavigationMode(state) X-Ref |
Returns whether the navigation mode is enabled. param: {Object} state Editor state. return: {boolean} Is navigation mode enabled. |
selectors_hasBlockMovingClientId(state) X-Ref |
Returns whether block moving mode is enabled. param: {Object} state Editor state. return: {string} Client Id of moving block. |
didAutomaticChange(state) X-Ref |
Returns true if the last change was an automatic change, false otherwise. param: {Object} state Global application state. return: {boolean} Whether the last change was automatic. |
isBlockHighlighted(state, clientId) X-Ref |
Returns true if the current highlighted block matches the block clientId. param: {Object} state Global application state. param: {string} clientId The block to check. return: {boolean} Whether the block is currently highlighted. |
areInnerBlocksControlled(state, clientId) X-Ref |
Checks if a given block has controlled inner blocks. param: {Object} state Global application state. param: {string} clientId The block to check. return: {boolean} True if the block has controlled inner blocks. |
wasBlockJustInserted(state, clientId, source) X-Ref |
Tells if the block with the passed clientId was just inserted. param: {Object} state Global application state. param: {Object} clientId Client Id of the block. param: {?string} source Optional insertion source of the block. return: {boolean} True if the block matches the last block inserted from the specified source. |
resetSelection(selectionStart, selectionEnd, initialPosition) X-Ref |
Returns an action object used in signalling that selection state should be reset to the specified selection. param: {WPBlockSelection} selectionStart The selection start. param: {WPBlockSelection} selectionEnd The selection end. param: {0|-1|null} initialPosition Initial block position. return: {Object} Action object. |
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. param: {Object[]} blocks Array of block objects. return: {Object} Action object. |
updateBlockAttributes(clientIds, attributes) X-Ref |
Action that updates attributes of multiple blocks with the specified client IDs. param: {string|string[]} clientIds Block client IDs. param: {Object} attributes Block attributes to be merged. Should be keyed by clientIds if param: {boolean} uniqueByBlock true if each block in clientIds array has a unique set of attributes return: {Object} Action object. |
updateBlock(clientId, updates) X-Ref |
Action that updates the block with the specified client ID. param: {string} clientId Block client ID. param: {Object} updates Block attributes to be merged. return: {Object} Action object. |
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. param: {string} clientId Block client ID. param: {0|-1|null} initialPosition Optional initial position. Pass as -1 to return: {Object} Action object. |
startMultiSelect() X-Ref |
Action that starts block multi-selection. return: {Object} Action object. |
stopMultiSelect() X-Ref |
Action that stops block multi-selection. return: {Object} Action object. |
clearSelectedBlock() X-Ref |
Action that clears the block selection. return: {Object} Action object. |
toggleSelection() X-Ref |
Action that enables or disables block selection. param: {boolean} [isSelectionEnabled=true] Whether block selection should return: {Object} Action object. |
getBlocksWithDefaultStylesApplied(blocks, blockEditorSettings) X-Ref |
No description |
replaceBlock(clientId, block) X-Ref |
Action that replaces a single block with one or more replacement blocks. param: {(string|string[])} clientId Block client ID to replace. param: {(Object|Object[])} block Replacement block(s). return: {Object} Action object. |
moveBlockToPosition(clientId) X-Ref |
Action that moves given block 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. |
insertBlock(block, index, rootClientId, updateSelection, meta) X-Ref |
Action that inserts a single block, optionally at a specific index respective a root block list. 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. param: {?Object} meta Optional Meta values to be passed to the action object. return: {Object} Action object. |
showInsertionPoint(rootClientId, index) X-Ref |
Action that shows the insertion point. param: {?string} rootClientId Optional root client ID of block list on param: {?number} index Index at which block should be inserted. param: {Object} __unstableOptions Whether or not to show an inserter button. return: {Object} Action object. |
hideInsertionPoint() X-Ref |
Action that hides the insertion point. return: {Object} Action object. |
setTemplateValidity(isValid) X-Ref |
Action that resets the template validity. param: {boolean} isValid template validity flag. return: {Object} Action object. |
removeBlock(clientId, selectPrevious) X-Ref |
Returns an action object used in signalling that the block with the specified client ID is to be removed. param: {string} clientId Client ID of block to remove. param: {boolean} selectPrevious True if the previous block should be return: {Object} Action object. |
replaceInnerBlocks(rootClientId, blocks) X-Ref |
Returns an action object used in signalling that the inner blocks with the specified client ID should be replaced. 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. param: {0|-1|null} initialPosition Initial block position. return: {Object} Action object. |
toggleBlockMode(clientId) X-Ref |
Returns an action object used to toggle the block editing mode between visual and HTML modes. param: {string} clientId Block client ID. return: {Object} Action object. |
startTyping() X-Ref |
Returns an action object used in signalling that the user has begun to type. return: {Object} Action object. |
stopTyping() X-Ref |
Returns an action object used in signalling that the user has stopped typing. return: {Object} Action object. |
startDraggingBlocks() X-Ref |
Returns an action object used in signalling that the user has begun to drag blocks. param: {string[]} clientIds An array of client ids being dragged return: {Object} Action object. |
stopDraggingBlocks() X-Ref |
Returns an action object used in signalling that the user has stopped dragging blocks. return: {Object} Action object. |
enterFormattedText() X-Ref |
Returns an action object used in signalling that the caret has entered formatted text. return: {Object} Action object. |
exitFormattedText() X-Ref |
Returns an action object used in signalling that the user caret has exited formatted text. return: {Object} Action object. |
selectionChange(clientId, attributeKey, startOffset, endOffset) X-Ref |
Action that changes the position of the user caret. param: {string|WPSelection} 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. return: {Object} Action object. |
updateBlockListSettings(clientId, settings) X-Ref |
Action that changes the nested settings of a given block. param: {string} clientId Client ID of the block whose nested setting are param: {Object} settings Object with the new settings for the nested block. return: {Object} Action object |
updateSettings(settings) X-Ref |
Action that updates the block editor settings. param: {Object} settings Updated settings return: {Object} Action object |
__unstableSaveReusableBlock(id, updatedId) X-Ref |
Action that signals that a temporary reusable block has been saved in order to switch its temporary id with the real id. param: {string} id Reusable block's id. param: {string} updatedId Updated block's id. return: {Object} Action object. |
__unstableMarkLastChangeAsPersistent() X-Ref |
Action that marks the last block change explicitly as persistent. return: {Object} Action object. |
__unstableMarkNextChangeAsNotPersistent() X-Ref |
Action that signals that the next block change should be marked explicitly as not persistent. return: {Object} Action object. |
toggleBlockHighlight(clientId, isHighlighted) X-Ref |
Action that toggles the highlighted block state. param: {string} clientId The block's clientId. param: {boolean} isHighlighted The highlight state. |
setHasControlledInnerBlocks(clientId, hasControlledInnerBlocks) X-Ref |
Action that sets whether a block has controlled inner blocks. param: {string} clientId The block's clientId. param: {boolean} hasControlledInnerBlocks True if the block's inner blocks are controlled. |
useBlockEditContext() X-Ref |
A hook that returns the block edit context. return: {Object} Block edit context |
useDisplayBlockControls() X-Ref |
No description |
useBlockControlsFill(group, shareWithChildBlocks) X-Ref |
No description |
BlockControlsFill(_ref) X-Ref |
Internal dependencies |
BlockControlsSlot(_ref) X-Ref |
Internal dependencies |
appendSelectors(selectors) X-Ref |
Utility to generate the proper CSS selector for layout styles. param: {string|string[]} selectors - CSS selectors param: {boolean} append - string to append. return: {string} - CSS selector. |
BlockRefsProvider(_ref) X-Ref |
No description |
useBlockRefProvider(clientId) X-Ref |
Provides a ref to the BlockRefs context. param: {string} clientId The client ID of the element ref. return: {RefCallback} Ref callback. |
useBlockRef(clientId) X-Ref |
Gets a ref pointing to the current block element. Continues to return a stable ref even if the block client ID changes. param: {string} clientId The client ID to get a ref for. return: {RefObject} A ref containing the element. |
useBlockElement(clientId) X-Ref |
Return the element for a given client ID. Updates whenever the element changes, becomes available, or disappears. param: {string} clientId The client ID to an element for. return: {Element|null} The block's wrapper element. |
useSetting(path) X-Ref |
Hook that retrieves the editor setting. It works with nested objects using by finding the value at path. param: {string} path The path to the setting. return: {any} Returns the value defined for the setting. |
InspectorControlsFill(_ref) X-Ref |
No description |
immutableSet(object, path, value) X-Ref |
No description |
transformStyles(activeSupports, migrationPaths, result, source, index, results) X-Ref |
No description |
shouldSkipSerialization(blockType, featureSet, feature) X-Ref |
Check whether serialization of specific block support feature or set should be skipped. param: {string|Object} blockType Block name or block type object. param: {string} featureSet Name of block support feature set. param: {string} feature Name of the individual feature to check. return: {boolean} Whether serialization should occur. |
BlockSupportToolsPanel(_ref) X-Ref |
No description |
BlockSupportSlotContainer(_ref) X-Ref |
WordPress dependencies |
InspectorControlsSlot(_ref) X-Ref |
No description |
hasMarginSupport(blockType) X-Ref |
Determines if there is margin support. param: {string|Object} blockType Block name or Block Type object. return: {boolean} Whether there is support. |
hasMarginValue(props) X-Ref |
Checks if there is a current value in the margin block support attributes. param: {Object} props Block props. return: {boolean} Whether or not the block has a margin value set. |
resetMargin(_ref) X-Ref |
Resets the margin block support attributes. This can be used when disabling the margin support controls for a block via a `ToolsPanel`. param: {Object} props Block props. param: {Object} props.attributes Block's attributes. param: {Object} props.setAttributes Function to set block's attributes. |
useIsMarginDisabled() X-Ref |
Custom hook that checks if margin settings have been disabled. param: {string} name The name of the block. return: {boolean} Whether margin setting is disabled. |
MarginEdit(props) X-Ref |
Inspector control panel containing the margin related configuration param: {Object} props Block props. return: {WPElement} Margin edit element. |
hasPaddingSupport(blockType) X-Ref |
Determines if there is padding support. param: {string|Object} blockType Block name or Block Type object. return: {boolean} Whether there is support. |
hasPaddingValue(props) X-Ref |
Checks if there is a current value in the padding block support attributes. param: {Object} props Block props. return: {boolean} Whether or not the block has a padding value set. |
resetPadding(_ref) X-Ref |
Resets the padding block support attributes. This can be used when disabling the padding support controls for a block via a `ToolsPanel`. param: {Object} props Block props. param: {Object} props.attributes Block's attributes. param: {Object} props.setAttributes Function to set block's attributes. |
useIsPaddingDisabled() X-Ref |
Custom hook that checks if padding settings have been disabled. param: {string} name The name of the block. return: {boolean} Whether padding setting is disabled. |
PaddingEdit(props) X-Ref |
Inspector control panel containing the padding related configuration param: {Object} props return: {WPElement} Padding edit element. |
DimensionsPanel(props) X-Ref |
Inspector controls for dimensions support. param: {Object} props Block props. return: {WPElement} Inspector controls for spacing support features. |
hasDimensionsSupport(blockName) X-Ref |
Determine whether there is dimensions related block support. param: {string} blockName Block name. return: {boolean} Whether there is support. |
useCustomSides(blockName, feature) X-Ref |
Custom hook to retrieve which padding/margin is supported e.g. top, right, bottom or left. Sides are opted into by default. It is only if a specific side is set to false that it is omitted. param: {string} blockName Block name. param: {string} feature The feature custom sides relate to e.g. padding or margins. return: {Object} Sides supporting custom margin. |
useIsDimensionsSupportValid(blockName, feature) X-Ref |
Custom hook to determine whether the sides configured in the block support are valid. A dimension property cannot declare support for a mix of axial and individual sides. param: {string} blockName Block name. param: {string} feature The feature custom sides relate to e.g. padding or margins. return: {boolean} If the feature has a valid configuration of sides. |
hasGapSupport(blockType) X-Ref |
Determines if there is gap support. param: {string|Object} blockType Block name or Block Type object. return: {boolean} Whether there is support. |
hasGapValue(props) X-Ref |
Checks if there is a current value in the gap block support attributes. param: {Object} props Block props. return: {boolean} Whether or not the block has a gap value set. |
getGapBoxControlValueFromStyle(blockGapValue) X-Ref |
Returns a BoxControl object value from a given blockGap style value. The string check is for backwards compatibility before Gutenberg supported split gap values (row and column) and the value was a string n + unit. param: {string? | Object?} blockGapValue A block gap string or axial object value, e.g., '10px' or { top: '10px', left: '10px'}. return: {Object|null} A value to pass to the BoxControl component. |
getGapCSSValue(blockGapValue) X-Ref |
Returns a CSS value for the `gap` property from a given blockGap style. param: {string? | Object?} blockGapValue A block gap string or axial object value, e.g., '10px' or { top: '10px', left: '10px'}. param: {string?} defaultValue A default gap value. return: {string|null} The concatenated gap value (row and column). |
resetGap(_ref) X-Ref |
Resets the gap block support attribute. This can be used when disabling the gap support controls for a block via a progressive discovery panel. param: {Object} props Block props. param: {Object} props.attributes Block's attributes. param: {Object} props.setAttributes Function to set block's attributes. |
useIsGapDisabled() X-Ref |
Custom hook that checks if gap settings have been disabled. param: {string} name The name of the block. return: {boolean} Whether the gap setting is disabled. |
GapEdit(props) X-Ref |
Inspector control panel containing the gap related configuration param: {Object} props return: {WPElement} Gap edit element. |
BlockVerticalAlignmentUI(_ref) X-Ref |
No description |
applyOrUnset(align) X-Ref |
No description |
JustifyContentUI(_ref) X-Ref |
No description |
FlexLayoutVerticalAlignmentControl(_ref4) X-Ref |
No description |
FlexLayoutJustifyContentControl(_ref5) X-Ref |
No description |
FlexWrapControl(_ref7) X-Ref |
No description |
OrientationControl(_ref8) X-Ref |
No description |
Icon(_ref) X-Ref |
Return an SVG icon. param: {IconProps} props icon is the SVG component to render return: {JSX.Element} Icon component |
getAlignmentsInfo(layout) X-Ref |
Helper method to assign contextual info to clarify alignment settings. Besides checking if `contentSize` and `wideSize` have a value, we now show this information only if their values are not a `css var`. This needs to change when parsing css variables land. param: {Object} layout The layout object. return: {Object} An object with contextual info per alignment. |
getLayoutType() X-Ref |
Retrieves a layout type by name. param: {string} name - The name of the layout type. return: {Object} Layout type. |
getLayoutTypes() X-Ref |
Retrieves the available layout types. return: {Array} Layout types. |
useLayout() X-Ref |
React hook used to retrieve the layout config. |
LayoutStyle(_ref) X-Ref |
No description |
useAvailableAlignments() X-Ref |
No description |
BlockAlignmentUI(_ref) X-Ref |
No description |
onChangeAlignment(align) 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. 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. return: {string[]} Valid alignments. |
addAttribute(settings) X-Ref |
Filters registered block settings, extending attributes to include `align`. param: {Object} settings Original block settings. return: {Object} Filtered block settings. |
addAssignedAlign(props, blockType, attributes) X-Ref |
Override props assigned to save component to inject alignment class name if block supports it. param: {Object} props Additional props applied to save element. param: {Object} blockType Block type. param: {Object} attributes Block attributes. return: {Object} Filtered props applied to save element. |
lock_addAttribute(settings) X-Ref |
Filters registered block settings, extending attributes to include `lock`. param: {Object} settings Original block settings. return: {Object} Filtered block settings. |
anchor_addAttribute(settings) X-Ref |
Filters registered block settings, extending attributes with anchor using ID of the first node. param: {Object} settings Original block settings. return: {Object} Filtered 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. param: {Object} extraProps Additional props applied to save element. param: {Object} blockType Block type. param: {Object} attributes Current block attributes. return: {Object} Filtered props applied to save element. |
custom_class_name_addAttribute(settings) X-Ref |
Filters registered block settings, extending attributes with anchor using ID of the first node. param: {Object} settings Original block settings. return: {Object} Filtered 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. param: {Object} extraProps Additional props applied to save element. param: {Object} blockType Block type. param: {Object} attributes Current block attributes. return: {Object} Filtered props applied to save element. |
addTransforms(result, source, index, results) X-Ref |
No description |
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. param: {Object} extraProps Additional props applied to save element. param: {Object} blockType Block type. return: {Object} Filtered props applied to save element. |
generateBoxRules(style, options, path, ruleKey) X-Ref |
Internal dependencies |
generate(style, options) X-Ref |
Generates a stylesheet for a given style object and selector. param: style Style object. param: options Options object with settings to adjust how the styles are generated. return: generated stylesheet. |
getCSSRules(style, options) X-Ref |
Returns a JSON representation of the generated CSS rules. param: style Style object. param: options Options object with settings to adjust how the styles are generated. return: generated styles. |
BlockContextProvider(_ref) X-Ref |
Component which merges passed value with current consumed block context. param: {BlockContextProviderProps} props |
BlockEdit(props) X-Ref |
The `useBlockEditContext` hook provides information about the block this hook is being used in. It returns an object with the `name`, `isSelected` state, and the `clientId` of the block. It is useful if you want to create custom hooks that need access to the current blocks clientId but don't want to rely on the data getting passed in as a parameter. return: {Object} Block edit context |
Warning(_ref) X-Ref |
No description |
BlockView(_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 |
Generated: Wed Oct 16 01:00:02 2024 | Cross-referenced by PHPXref 0.7.1 |