[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
(no description)
File Size: | 74421 lines (2632 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
AtRule:: (0 methods):
Comment:: (2 methods):
cleanSource()
markTreeDirty()
Container:: (0 methods):
CssSyntaxError:: (0 methods):
Declaration:: (0 methods):
Document:: (1 method):
fromJSON()
Input:: (4 methods):
isPromise()
getEvents()
toStack()
cleanMarks()
LazyResult:: (0 methods):
MapGenerator:: (0 methods):
NoWorkResult:: (2 methods):
cloneNode()
sourceOffset()
Node:: (2 methods):
parse()
findLastWithPosition()
Parser:: (3 methods):
postcss()
creator()
fromBase64()
PreviousMap:: (0 methods):
Processor:: (0 methods):
Result:: (0 methods):
Root:: (0 methods):
Rule:: (1 method):
capitalize()
Stringifier:: (6 methods):
stringify()
position()
unclosed()
endOfFile()
nextToken()
back()
Warning:: (324 methods):
emptyFunction()
emptyFunctionWithReset()
shim()
getShim()
__()
TextareaAutosizeClass()
matcher()
__webpack_require__()
useBlockEditContext()
insertAt()
moveTo()
mapBlockOrder()
mapBlockParents()
flattenBlocks()
getFlattenedClientIds()
getFlattenedBlocksWithoutAttributes()
getFlattenedBlockAttributes()
hasSameKeys()
isUpdatingSameBlockAttribute()
updateBlockTreeForBlocks()
updateParentInnerBlocksInTree()
withPersistentBlockChange()
withIgnoredBlockChange()
isBlockInterfaceHidden()
isTyping()
isDragging()
draggedBlocks()
blockVisibility()
selectionHelper()
selection()
isMultiSelecting()
isSelectionEnabled()
removalPromptData()
blockRemovalRules()
initialPosition()
blocksMode()
insertionPoint()
template()
settings()
preferences()
editorMode()
hasBlockMovingClientId()
lastBlockAttributesChange()
highlightedBlock()
expandedBlock()
lastBlockInserted()
temporarilyEditingAsBlocks()
temporarilyEditingFocusModeRevert()
blockEditingModes()
openedBlockSettingsMenu()
styleOverrides()
registeredInserterMediaCategories()
lastFocus()
hoveredBlockClientId()
zoomLevel()
withAutomaticChangeReset()
parsePattern()
getParsedPattern()
getGrammar()
getInsertBlockTypeDependants()
orderBy()
isPatternFiltered()
setImmutably()
uniqByProperty()
getBlockSettings()
private_selectors_isBlockInterfaceHidden()
getLastInsertedBlocksClientIds()
getBlockWithoutAttributes()
getEnabledClientIdsTreeUnmemoized()
getRemovalPromptData()
getBlockRemovalRules()
getOpenedBlockSettingsMenu()
getRegisteredInserterMediaCategories()
mapUserPattern()
getLastFocus()
private_selectors_isDragging()
getExpandedBlock()
getTemporarilyEditingAsBlocks()
getTemporarilyEditingFocusModeToRevert()
isZoomOutMode()
getSectionRootClientId()
getZoomLevel()
isZoomOut()
isSectionBlock()
getBlockName()
isBlockValid()
getBlockAttributes()
getBlock()
getBlocks()
__experimentalGetGlobalBlocksByName()
getBlockCount()
getSelectionStart()
getSelectionEnd()
getBlockSelectionStart()
getBlockSelectionEnd()
getSelectedBlockCount()
hasSelectedBlock()
getSelectedBlockClientId()
getSelectedBlock()
getBlockRootClientId()
getBlockHierarchyRootClientId()
getLowestCommonAncestorWithSelectedBlock()
getAdjacentBlockClientId()
getPreviousBlockClientId()
getNextBlockClientId()
getSelectedBlocksInitialCaretPosition()
getMultiSelectedBlockClientIds()
getFirstMultiSelectedBlockClientId()
getLastMultiSelectedBlockClientId()
isFirstMultiSelectedBlock()
isBlockMultiSelected()
getMultiSelectedBlocksStartClientId()
getMultiSelectedBlocksEndClientId()
__unstableIsFullySelected()
__unstableIsSelectionCollapsed()
__unstableSelectionHasUnmergeableBlock()
__unstableIsSelectionMergeable()
getBlockOrder()
getBlockIndex()
isBlockSelected()
hasSelectedInnerBlock()
hasDraggedInnerBlock()
isBlockWithinSelection()
hasMultiSelection()
selectors_isMultiSelecting()
selectors_isSelectionEnabled()
getBlockMode()
selectors_isTyping()
isDraggingBlocks()
getDraggedBlockClientIds()
isBlockBeingDragged()
isAncestorBeingDragged()
isCaretWithinFormattedText()
isBlockInsertionPointVisible()
isValidTemplate()
getTemplate()
getTemplateLock()
canInsertBlocks()
canRemoveBlock()
canRemoveBlocks()
canMoveBlock()
canMoveBlocks()
canEditBlock()
canLockBlockType()
getInsertUsage()
getDirectInsertBlock()
__experimentalGetDirectInsertBlock()
enhancePatternWithParsedBlocks()
getBlockListSettings()
getSettings()
isLastBlockChangePersistent()
__unstableIsLastBlockChangeIgnored()
__experimentalGetLastBlockAttributeChanges()
isNavigationMode()
__unstableGetEditorMode()
selectors_hasBlockMovingClientId()
didAutomaticChange()
isBlockHighlighted()
areInnerBlocksControlled()
wasBlockJustInserted()
isBlockVisible()
getHoveredBlockClientId()
__unstableHasActiveBlockOverlayActive()
__unstableIsWithinBlockOverlay()
__unstableGetTemporarilyEditingAsBlocks()
__unstableGetTemporarilyEditingFocusModeToRevert()
__experimentalUpdateSettings()
hideBlockInterface()
showBlockInterface()
flattenBlocks()
displayBlockRemovalPrompt()
clearBlockRemovalPrompt()
setBlockRemovalRules()
setOpenedBlockSettingsMenu()
setStyleOverride()
deleteStyleOverride()
setLastFocus()
stopEditingAsBlocks()
startDragging()
stopDragging()
expandBlock()
setZoomLevel()
resetZoomLevel()
retrieveSelectedAttribute()
findRichTextAttributeKey()
resetSelection()
receiveBlocks()
updateBlockAttributes()
updateBlock()
selectBlock()
hoverBlock()
startMultiSelect()
stopMultiSelect()
clearSelectedBlock()
toggleSelection()
replaceBlock()
moveBlockToPosition()
insertBlock()
showInsertionPoint()
setTemplateValidity()
createEmpty()
removeBlock()
replaceInnerBlocks()
toggleBlockMode()
startTyping()
stopTyping()
startDraggingBlocks()
stopDraggingBlocks()
enterFormattedText()
exitFormattedText()
selectionChange()
updateBlockListSettings()
updateSettings()
__unstableSaveReusableBlock()
__unstableMarkLastChangeAsPersistent()
__unstableMarkNextChangeAsNotPersistent()
toggleBlockHighlight()
setHasControlledInnerBlocks()
setBlockVisibility()
__unstableSetTemporarilyEditingAsBlocks()
setBlockEditingMode()
unsetBlockEditingMode()
use_settings_useSettings()
useSetting()
getComputedFluidTypographyValue()
getTypographyValueAndUnit()
roundToPrecision()
formatFontStyle()
formatFontWeight()
getFontStylesAndWeights()
getTypographyFontSizeValue()
isFluidTypographyEnabled()
getFluidTypographyOptionsFromSettings()
getMergedFontFamiliesAndFontFamilyFaces()
findNearestFontWeight()
findNearestFontStyle()
findNearestStyleAndWeight()
useToolsPanelDropdownMenuProps()
findInPresetsBy()
getPresetVariableFromValue()
getValueFromPresetVariable()
getValueFromCustomVariable()
getValueFromVariable()
scopeSelector()
scopeFeatureSelectors()
appendToSelector()
areGlobalStyleConfigsEqual()
getBlockStyleVariationSelector()
getResolvedThemeFilePath()
getResolvedRefValue()
getResolvedValue()
useGlobalSetting()
useGlobalStyle()
useSettingsForBlockElement()
useColorsPerOrigin()
useGradientsPerOrigin()
r()
transformStyles()
shouldSkipSerialization()
useStyleOverride()
usePrivateStyleOverride()
useBlockSettings()
createBlockEditFilter()
BlockProps()
createBlockListBlockFilter()
createBlockSaveFilter()
extraPropsFromHooks()
migrateLightBlockWrapper()
useBlockControlsFill()
BlockControlsFill()
BlockControlsSlot()
appendSelectors()
getBlockGapCSS()
getAlignmentsInfo()
isValueSpacingPreset()
getCustomValueFromPreset()
getPresetValueFromCustomValue()
getSpacingPresetCssVar()
getSpacingPresetSlug()
getSliderValueFromPreset()
mode()
getAllRawValue()
isValuesMixed()
isValuesDefined()
hasAxisSupport()
getSupportedMenuItems()
hasBalancedSidesSupport()
getInitialView()
getGapBoxControlValueFromStyle()
getGapCSSValue()
BlockVerticalAlignmentUI()
applyOrUnset()
JustifyContentUI()
FlexLayoutVerticalAlignmentControl()
FlexLayoutJustifyContentControl()
FlexWrapControl()
OrientationControl()
Icon()
DefaultLayoutJustifyContentControl()
GridLayoutMinimumWidthControl()
GridLayoutColumnsAndRowsControl()
GridLayoutTypeControl()
getLayoutType()
getLayoutTypes()
useLayout()
LayoutStyle()
useAvailableAlignments()
BlockAlignmentUI()
onChangeAlignment()
useBlockEditingMode()
getValidAlignments()
addAttribute()
BlockEditAlignmentToolbarControlsPure()
useBlockProps()
addAssignedAlign()
InspectorControlsFill()
RegisterResetAll()
ToolsPanelInspectorControl()
BlockSupportToolsPanel()
BlockSupportSlotContainer()
InspectorControlsSlot()
MediaUploadCheck()
LinkSettingsDrawer()
isFunction()
URLInput:: (290 methods):
SearchItemIcon()
addLeadingSlash()
removeTrailingSlash()
getURLForDisplay()
getVisualTypeName()
LinkControlSearchResults()
isURLLike()
hasPossibleTLD()
useSearchHandler()
use_rich_url_data_reducer()
useRemoteUrlData()
filterTitleForDisplay()
LinkPreview()
useCreatePage()
useInternalValue()
LinkControl()
backgroundSizeHelpText()
InspectorImagePreviewItem()
BackgroundControlsPanel()
LoadingSpinner()
BackgroundImageControls()
BackgroundSizeControls()
BackgroundImagePanel()
useHasBackgroundPanel()
hasBackgroundSizeValue()
hasBackgroundImageValue()
BackgroundToolsPanel()
background_panel_BackgroundImagePanel()
hasBackgroundSupport()
setBackgroundStyleDefaults()
background_useBlockProps()
getBackgroundImageClasses()
BackgroundInspectorControl()
background_BackgroundImagePanel()
lock_addAttribute()
anchor_addAttribute()
BlockEditAnchorControlPure()
addSaveProps()
aria_label_addAttribute()
aria_label_addSaveProps()
custom_class_name_addAttribute()
CustomClassNameControlsPure()
custom_class_name_addSaveProps()
addTransforms()
addGeneratedClassName()
names()
getColorClassName()
getMostReadableColor()
useMultipleOriginColorsAndGradients()
utils_mode()
getAllUnit()
getAllValue()
hasMixedValues()
hasDefinedValues()
AllInputControl()
BoxInputControls()
LinkedButton()
BorderRadiusControl()
ShadowPopoverContainer()
ShadowPresets()
ShadowIndicator()
ShadowPopover()
renderShadowToggle()
useShadowPresets()
useHasBorderPanel()
useHasBorderPanelControls()
useHasBorderColorControl()
useHasBorderRadiusControl()
useHasBorderStyleControl()
useHasBorderWidthControl()
useHasShadowControl()
BorderToolsPanel()
BorderPanel()
getColorSlugFromVariable()
styleToAttributes()
attributesToStyle()
BordersInspectorControl()
border_BorderPanel()
selector()
hasBorderSupport()
hasShadowSupport()
useBorderPanelLabel()
removeBorderAttribute()
addAttributes()
border_addSaveProps()
getBorderClasses()
border_useBlockProps()
__experimentalGetGradientClass()
getGradientValueBySlug()
__experimentalGetGradientObjectByGradientValue()
getGradientSlugByValue()
__experimentalUseGradient()
ColorGradientControlInner()
ColorGradientControlSelect()
ColorGradientControl()
useHasColorPanel()
useHasTextPanel()
useHasLinkPanel()
useHasCaptionPanel()
useHasHeadingPanel()
useHasButtonPanel()
useHasBackgroundColorPanel()
ColorToolsPanel()
ColorPanelTab()
ColorPanelDropdown()
ColorPanel()
ContrastChecker()
BlockRefsProvider()
useBlockRefProvider()
assignRef()
useBlockElementRef()
useBlockElement()
getComputedStyle()
BlockColorContrastChecker()
color_addAttributes()
color_addSaveProps()
color_styleToAttributes()
color_attributesToStyle()
ColorInspectorControl()
ColorEdit()
selector()
color_useBlockProps()
color_addTransforms()
FontFamilyControl()
FontAppearanceControl()
isLineHeightDefined()
LetterSpacingControl()
TextAlignmentControl()
TextTransformControl()
TextDecorationControl()
WritingModeControl()
useHasTypographyPanel()
useHasFontSizeControl()
useHasFontFamilyControl()
useHasLineHeightControl()
useHasAppearanceControl()
useAppearanceControlLabel()
useHasLetterSpacingControl()
useHasTextTransformControl()
useHasTextAlignmentControl()
useHasTextDecorationControl()
useHasWritingModeControl()
useHasTextColumnsControl()
getMergedFontSizes()
TypographyToolsPanel()
TypographyPanel()
LineHeightEdit()
useIsLineHeightDisabled()
font_family_addAttributes()
font_family_addSaveProps()
font_family_useBlockProps()
resetFontFamily()
utils_getFontSizeObjectByValue()
getFontSizeClass()
font_size_addAttributes()
font_size_addSaveProps()
FontSizeEdit()
useIsFontSizeDisabled()
font_size_useBlockProps()
font_size_addTransforms()
AlignmentUI()
applyOrUnset()
setIcon()
getValidTextAlignments()
BlockEditTextAlignmentToolbarControlsPure()
text_align_useBlockProps()
addAssignedTextAlign()
omit()
typography_styleToAttributes()
typography_attributesToStyle()
TypographyInspectorControl()
typography_TypographyPanel()
selector()
SpacingInputControl()
AxialInputControls()
SeparatedInputControls()
SingleInputControl()
linked_button_LinkedButton()
useSpacingSizes()
SpacingSizesControl()
HeightControl()
useGetNumberOfBlocksBeforeCell()
helpText()
ChildLayoutControl()
FlexControls()
childLayoutOrientation()
GridControls()
AspectRatioTool()
useHasDimensionsPanel()
useHasContentSize()
useHasWideSize()
useHasPadding()
useHasMargin()
useHasGap()
useHasMinHeight()
useHasAspectRatio()
useHasChildLayout()
useHasSpacingPresets()
filterValuesBySides()
splitStyleValue()
splitGapValue()
DimensionsToolsPanel()
DimensionsPanel()
usePopoverScroll()
onWheel()
isInSameBlock()
isInsideRootBlock()
getBlockClientId()
rectUnion()
isElementVisible()
isScrollable()
getElementBounds()
BlockPopover()
BlockPopoverCover()
CoverContainer()
SpacingVisualizer()
getComputedCSS()
MarginVisualizer()
PaddingVisualizer()
useVisualizer()
DimensionsInspectorControl()
dimensions_DimensionsPanel()
hasDimensionsSupport()
dimensions_useBlockProps()
useCustomSides()
getInlineStyles()
style_addAttribute()
omitStyle()
style_addSaveProps()
BlockStyleControls()
style_useBlockProps()
settings_addAttribute()
DuotoneControl()
getValuesFromColors()
getDuotoneUnsetStylesheet()
getDuotoneStylesheet()
getDuotoneFilter()
getBlockCSSSelector()
useMultiOriginColorPresets()
useHasFiltersPanel()
useHasDuotoneControl()
FiltersToolsPanel()
FiltersPanel()
useMultiOriginPresets()
getColorsFromDuotonePreset()
getDuotonePresetFromColors()
DuotonePanelPure()
addDuotoneAttributes()
useDuotoneStyles()
duotone_useBlockProps()
getPositionTypeLabel()
useBlockDisplayInformation()
getPositionCSS()
hasStickyPositionSupport()
hasFixedPositionSupport()
hasPositionSupport()
hasPositionValue()
hasStickyOrFixedPositionValue()
resetPosition()
useIsPositionDisabled()
PositionPanelPure()
position_useBlockProps()
getPresetsDeclarations()
getPresetsClasses()
getPresetsSvgFilters()
flattenTree()
concatFeatureVariationSelectorString()
getStylesDeclarations()
getLayoutStyles()
pickStyleKeys()
toSvgFilters()
updateConfigWithSeparator()
processCSSNesting()
useGlobalStylesOutputWithConfig()
useGlobalStylesOutput()
getVariationMatches()
getVariationNameFromClass()
OverrideStyles()
__unstableBlockStyleVariationOverridesWithConfig()
getVariationStylesWithRefValues()
useBlockStyleVariation()
block_style_variation_useBlockProps()
hasLayoutBlockSupport()
useLayoutClasses()
useLayoutStyles()
LayoutPanelPure()
LayoutTypeSwitcher()
layout_addAttribute()
BlockWithLayoutStyles()
range()
GridRect:: (22 methods):
utils_getComputedCSS()
getGridTracks()
getClosestTrack()
getGridRect()
getGridItemRect()
getGridInfo()
Tips()
BlockIcon()
BlockCard()
getSubRegistry()
useBlockSync()
KeyboardShortcuts()
KeyboardShortcutsRegister()
BlockContextProvider()
Warning()
MultipleUsageWarning()
BlockEdit()
BlockView()
BlockCompare()
getDifference()
getConvertedContent()
BlockInvalidWarning()
BlockCrashBoundary:: (215 methods):
BlockHTML()
dist_esm_I()
getAbsolutePosition()
useMovingAnimation()
preserveScrollPosition()
useFocusFirstElement()
useIsHovered()
listener()
useFocusHandler()
onFocus()
useEventHandlers()
onKeyDown()
onDragStart()
useNavModeExit()
onMouseDown()
useZoomOutModeExit()
onDoubleClick()
useIntersectionObserver()
useScrollIntoView()
useFlashEditableBlocks()
replacePatternOverrideDefaultBindings()
canBindBlock()
canBindAttribute()
getBindableAttributes()
shimAttributeSource()
use_block_props_useBlockProps()
mergeWrapperProps()
Block()
BlockListBlock()
switchToDefaultOrRemove()
moveFirstItemUp()
BlockListBlockProvider()
DefaultBlockAppender()
DefaultAppender()
BlockListAppender()
BlockPopoverInbetween()
BlockDropZonePopover()
InbetweenInsertionPointPopover()
onClick()
maybeHideInserterPoint()
onFocus()
InsertionPoint()
useInBetweenInserter()
onMouseMove()
useBlockSelectionClearer()
onMouseDown()
BlockSelectionClearer()
ButtonBlockAppender()
default_block_appender_DefaultBlockAppender()
useShallowMemo()
useNestedSettingsUpdate()
useInnerBlockTemplateSync()
useBlockContext()
parseDropEvent()
onBlockDrop()
onFilesDrop()
onHTMLDrop()
useOnBlockDrop()
getDistanceFromPointToEdge()
getDistanceToNearestEdge()
isPointContainedByRect()
isPointWithinTopAndBottomBoundariesOfRect()
getDropTargetPosition()
isDropTargetValid()
isInsertionPoint()
useBlockDropZone()
BlockContext()
UncontrolledInnerBlocks()
ControlledInnerBlocks()
useInnerBlocksProps()
isKeyDownEligibleForStartTyping()
useMouseMoveTypingReset()
stopTypingOnMouseMove()
useTypingObserver()
stopTypingOnNonTextField()
stopTypingOnEscapeKey()
stopTypingOnSelectionUncollapse()
startTypingInTextField()
ObserveTyping()
ZoomOutSeparator()
Root()
StopEditingAsBlocksOnOutsideSelect()
BlockList()
Items()
BlockListItems()
selector()
useMultiSelection()
useTabNav()
onFocusCapture()
onKeyDown()
onFocusOut()
preventScrollOnTab()
isNavigationCandidate()
getClosestTabbable()
isTabCandidate()
useArrowNav()
onMouseDown()
isClosestTabbableABlock()
onKeyDown()
useSelectAll()
onKeyDown()
setContentEditableWrapper()
useDragSelection()
onMouseUp()
onMouseLeave()
extractSelectionStartNode()
extractSelectionEndNode()
findDepth()
use_selection_observer_setContentEditableWrapper()
getRichTextElement()
useSelectionObserver()
onSelectionChange()
useClickSelection()
onMouseDown()
useInput()
onBeforeInput()
onKeyDown()
onCompositionStart()
useNotifyCopy()
removeWindowsFragments()
removeCharsetMetaTag()
getPasteEventData()
shouldDismissPastedFiles()
setClipboardBlocks()
getPasteBlocks()
toPlainText()
useClipboardHandler()
handler()
useWritingFlow()
WritingFlow()
getCompatibilityStyles()
matchFromRules()
bubbleEvent()
useBubbleEvents()
Iframe()
preventFileDropDefault()
onLoad()
IframeIfReady()
gobbleParens()
tokenizeBy()
parsel_tokenize()
nestTokens()
walk()
parse()
stringify()
specificityToNumber()
specificity()
prefixRootSelector()
transformStyle()
useDarkThemeBodyClassName()
EditorStyles()
ScaledBlockPreview()
AutoBlockPreview()
BlockPreview()
useBlockPreview()
InserterPreviewPanel()
InserterListboxItem()
BlockDraggableChip()
InserterListItem()
InserterListboxGroup()
InserterListboxRow()
chunk()
BlockTypesList()
InserterPanel()
InserterListbox()
InserterNoResults()
BlockTypesTabPanel()
BlockTypesTab()
PatternCategoriesList()
PatternsExplorerSearch()
PatternExplorerSidebar()
Pagination()
BlockPattern()
BlockPatternPlaceholder()
BlockPatternsList()
getIndex()
useInsertionPoint()
localeLowerCase()
lowerCase()
noCase()
dist_es2015_replace()
extractWords()
normalizeString()
getItemSearchRank()
usePatternsPaging()
PatternsListHeader()
PatternList()
hasRegisteredCategory()
usePatternCategories()
PatternsExplorer()
PatternsExplorerModal()
ScreenHeader()
MobileTabNavigation()
PatternsFilter()
handleSetSourceFilterChange()
PatternCategoryPreviews()
CategoryTabs()
BlockPatternsTab()
getBlockAndPreviewFromMedia()
MediaPreviewOptions()
InsertExternalImageModal()
MediaPreview()
MediaList()
useMediaResults()
useMediaCategories()
MediaCategoryPanel()
MediaTab()
InserterSearchResults()
TabbedSidebar()
useZoomOut()
InserterMenu()
getInitialTab()
PublicInserterMenu()
QuickInserter()
handleClick()
Inserter:: (339 methods):
getAdjacentBlockAttributes()
getInsertionIndex()
button_block_appender_ButtonBlockAppender()
GridVisualizer()
onGlobalDrag()
onGlobalDragEnd()
ManualGridVisualizer()
GridVisualizerCell()
useGridVisualizerDropZone()
GridVisualizerDropZone()
GridVisualizerAppender()
useDropZoneWithValidation()
GridItemResizer()
GridItemResizerInner()
GridItemMovers()
GridItemMover()
useBlockPropsChildLayoutStyles()
ChildLayoutControlsPure()
GridTools()
updateLayout()
ContentLockControlsPure()
addMetaAttribute()
BlockHooksControlPure()
isObjectEmpty()
useBlockBindingsUtils()
BlockBindingsPanelDropdown()
BlockBindingsAttribute()
ReadOnlyBlockBindingsPanelItems()
EditableBlockBindingsPanelItems()
addLabelCallback()
useGridLayoutSync()
placeBlock()
GridLayoutSync()
grid_visualizer_GridTools()
getBorderClassesAndStyles()
useBorderProps()
getShadowClassesAndStyles()
getColorClassesAndStyles()
useColorProps()
getSpacingClassesAndStyles()
getTypographyClassesAndStyles()
useCachedTruthy()
createColorHOC()
createCustomColorsHOC()
withColors()
font_size_picker_FontSizePicker()
createBlockCompleter()
createLinkCompleter()
useCompleters()
useBlockEditorAutocompleteProps()
BlockEditorAutocomplete()
BlockFullHeightAlignmentControl()
BlockAlignmentMatrixControl()
useBlockDisplayTitle()
BlockTitle()
getEditorRegion()
BlockBreadcrumb()
useBlockOverlayActive()
getProps()
useBlockToolbarPopoverProps()
useSelectedBlockToolProps()
EmptyBlockInserter()
useScrollWhenDragging()
getBlockMoverDescription()
getMultiBlockMoverDescription()
BlockMover()
useDebouncedShowGestures()
useShowHoveredOrFocusedGestures()
BlockParentSelector()
PreviewBlockPopover()
useBlockVariationTransforms()
BlockVariationTranformationItem()
useGroupedTransforms()
RestTransformationItems()
BlockTranformationItem()
getActiveStyle()
replaceActiveStyle()
getRenderedStyles()
getDefaultStyle()
useGenericPreviewBlock()
useStylesForBlocks()
BlockStylesMenuItems()
BlockStylesMenu()
PatternTransformationsMenu()
PreviewPatternsPopover()
pattern_transformations_menu_BlockPatternsList()
pattern_transformations_menu_BlockPattern()
BlockSwitcherDropdownMenuContents()
selectForMultipleBlocks()
onBlockTransform()
onBlockVariationTransform()
onPatternTransform()
supports_hasBorderSupport()
hasSerializedBlocks()
getStyleAttributes()
recursivelyUpdateBlockAttributes()
usePasteStyles()
BlockActions()
BlockHTMLConvertButton()
useConvertToGroupButtonProps()
ConvertToGroupButton()
useBlockLock()
getTemplateLockValue()
BlockLockModal()
BlockLockMenuItem()
BlockModeToggle()
ModifyContentLockMenuItem()
useBlockRename()
isEmptyString()
BlockRenameModal()
BlockRenameControl()
onChange()
BlockSettingsMenuControls()
BlockParentSelectorMenuItem()
CopyMenuItem()
BlockSettingsDropdown()
updateSelectionAfterRemove()
onToggle()
BlockSettingsMenu()
BlockLockToolbar()
BlockGroupToolbar()
BlockEditVisuallyButton()
hasOnlyToolbarItem()
getAllFocusableToolbarItemsIn()
hasFocusWithin()
focusFirstTabbableIn()
useIsAccessibleToolbar()
useToolbarFocus()
NavigableToolbar()
useHasAnyBlockControls()
useHasBlockControls()
useHasBlockToolbar()
shuffle_Container()
Shuffle()
getNextPattern()
PrivateBlockToolbar()
BlockToolbar()
BlockToolbarPopover()
BlockSelectionButton()
onKeyDown()
BlockToolbarBreadcrumb()
ZoomOutModeInserterButton()
ZoomOutModeInserters()
useShowBlockTools()
block_tools_selector()
BlockTools()
onKeyDown()
selectForMultipleBlocks()
onBlockTransform()
ExperimentalBlockCanvas()
BlockCanvas()
AriaReferencedText()
useListViewScrollIntoView()
ListViewExpander()
getImage()
getImagesFromGallery()
getImagesFromBlock()
useListViewImages()
ListViewBlockSelectButton()
onKeyDown()
getCommonDepthClientIds()
focusListItem()
getDragDisplacementValues()
ListViewBlock()
getBlocksToUpdate()
countBlocks()
ListViewBranch()
ListViewDropIndicatorPreview()
useBlockSelection()
useListViewBlockIndexes()
useListViewClientIds()
useListViewCollapseItems()
isUpGesture()
getDesiredRelativeParentLevel()
getCandidateBlockParents()
getNextNonDraggedBlock()
isNestingGesture()
getListViewDropTarget()
useListViewDropZone()
useListViewExpandSelectedItem()
use_clipboard_handler_useClipboardHandler()
updateFocusAndSelection()
getBlocksToUpdate()
handler()
ListViewComponent()
BlockNavigationDropdownToggle()
BlockNavigationDropdown()
BlockStylesPreviewPanel()
BlockStyles()
HeadingLevelIcon()
HeadingLevelDropdown()
BlockVariationPicker()
usePatternsSetup()
block_pattern_setup_BlockPattern()
BlockPatternSlide()
VariationsButtons()
VariationsDropdown()
VariationsToggleGroupControl()
__experimentalBlockVariationTransforms()
ColorPaletteControl()
DateFormatPicker()
NonDefaultControls()
ColorGradientSettingsDropdown()
useSaveImage()
useTransformImage()
editImage()
ImageEditingProvider()
AspectRatioGroup()
ratioToNumber()
presetRatioAsNumber()
AspectRatioDropdown()
__extends()
__()
__rest()
__decorate()
__param()
__esDecorate()
accept()
__runInitializers()
__propKey()
__setFunctionName()
__metadata()
__awaiter()
adopt()
fulfilled()
rejected()
step()
__generator()
verb()
step()
__exportStar()
__values()
__read()
__spread()
__spreadArrays()
__spreadArray()
__await()
__asyncGenerator()
awaitReturn()
verb()
resume()
step()
fulfill()
reject()
settle()
__asyncDelegator()
verb()
__asyncValues()
verb()
settle()
__makeTemplateObject()
__importStar()
__importDefault()
__classPrivateFieldGet()
__classPrivateFieldSet()
__classPrivateFieldIn()
__addDisposableResource()
__disposeResources()
fail()
next()
getCropSize()
getMediaZoom()
restrictPosition()
restrictPositionCoord()
getDistanceBetweenPoints()
getRotationBetweenPoints()
computeCroppedArea()
limitArea()
noOp()
getInitialCropFromCroppedAreaPercentages()
getZoomFromCroppedAreaPixels()
getInitialCropFromCroppedAreaPixels()
getCenter()
getRadianAngle()
rotateSize()
clamp()
classNames()
Cropper()
ImageCropper()
ZoomDropdown()
RotationButton()
FormControls()
ImageEditor()
useDimensionHandler()
ImageSizeControl()
LinkViewerURL()
LinkViewer()
LinkEditor()
MediaPlaceholder()
recursivelyFindMediaFromBlocks()
InlineToolbar()
useMarkPersistent()
formatTypesSelector()
prefixSelectKeys()
getPrefixedSelectKeys()
useFormatTypes()
onInput()
preventEventDiscovery()
findSelection()
inputRule()
onInput()
onInput()
onKeydown()
onKeyDown()
onInput()
onKeyDown()
addActiveFormats()
getMultilineTag()
getAllowedFormats()
createLinkInParagraph()
_onPaste()
pasteInline()
onKeyDown()
onKeyDownDeprecated()
onKeyDown()
onFocus()
useEventListeners()
format_edit_Edit()
FormatEdit()
valueToHTMLString()
Content()
RichTextMultiline()
_onChange()
withDeprecations()
removeNativeProps()
RichTextWrapper()
addEditorOnlyFormats()
removeEditorOnlyFormats()
addInvisibleFormats()
onFocus()
ResponsiveBlockControlLabel()
ResponsiveBlockControl()
RichTextShortcut()
callback()
RichTextToolbarButton()
__unstableRichTextInputEvent()
callback()
ToolSelector()
UnitControl()
URLInputButton:: (106 methods):
PreviewOptions()
useResizeCanvas()
SkipToSelectedBlock()
MultiSelectionInspector()
InspectorControlsTabs()
getShowTabs()
useInspectorControlsTabs()
useBlockInspectorAnimationSettings()
BlockQuickNavigation()
BlockQuickNavigationItem()
BlockStylesPanel()
BlockInspectorLockedBlocks()
CopyHandler()
InserterLibrary()
PublicInserterLibrary()
MultiSelectScrollIntoView()
useTypewriter()
onScrollResize()
onKeyDown()
maintainCaretPosition()
addSelectionChangeListener()
computeCaretRectOnSelectionChange()
computeCaretRectangle()
isSelectionEligibleForScroll()
isLastEditableNode()
Typewriter()
addToBlockType()
RecursionProvider()
useHasRecursion()
InspectorPopoverHeader()
PublishDateTimePicker()
PublicPublishDateTimePicker()
useHasImageSettingsPanel()
ImageSettingsPanel()
AdvancedPanel()
handleOnChange()
handleOnBlur()
memize()
memoized()
getTranslation()
deepCompare()
getGlobalStylesChangelist()
getGlobalStylesChanges()
addValuesForElement()
addValuesForElements()
addValuesForBlocks()
getRichTextValues()
ResizableBoxPopover()
BlockRemovalWarningModal()
ScaleTool()
extends_extends()
memoize()
sheetForTag()
createStyleElement()
StyleSheet()
hash()
trim()
Utility_match()
Utility_replace()
indexof()
Utility_charat()
Utility_substr()
Utility_strlen()
Utility_sizeof()
Utility_append()
Utility_combine()
node()
Tokenizer_copy()
Tokenizer_char()
prev()
next()
peek()
caret()
slice()
token()
alloc()
dealloc()
delimit()
Tokenizer_tokenize()
whitespace()
tokenizer()
escaping()
delimiter()
commenter()
identifier()
Serializer_serialize()
Serializer_stringify()
middleware()
rulesheet()
prefixer()
namespace()
compile()
Parser_parse()
ruleset()
Parser_comment()
declaration()
emotion_cache_browser_esm_prefix()
murmur2()
handleInterpolation()
createStringFromObject()
withTheme()
emotion_utils_browser_esm_getRegisteredStyles()
_EMOTION_STRINGIFIED_CSS_ERROR__()
WidthHeightTool()
DimensionsTool()
ResolutionTool()
Class: CssSyntaxError - X-Ref
Class: Declaration - X-Ref
Class: LazyResult - X-Ref
Class: MapGenerator - X-Ref
Class: NoWorkResult - X-Ref
Class: PreviousMap - X-Ref
capitalize(str) X-Ref |
No description |
Class: Stringifier - X-Ref
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 |
matcher(match) X-Ref |
No description |
__webpack_require__(moduleId) X-Ref |
No description |
useBlockEditContext() X-Ref |
A hook that returns the block edit context. return: {Object} Block edit context |
insertAt(array, elements, index) X-Ref |
Insert one or multiple elements into a given position of an array. return: {Array} Result. param: {Array} array Source array. param: {*} elements Elements to insert. param: {number} index Insert Position. |
moveTo(array, from, to, count = 1) X-Ref |
Moves an element in an array. return: {Array} Result. param: {Array} array Source array. param: {number} from Source index. param: {number} to Destination index. param: {number} count Number of elements to move. |
mapBlockOrder(blocks, rootClientId = '') X-Ref |
Given an array of blocks, returns an object where each key is a nesting context, the value of which is an array of block client IDs existing within that nesting context. return: {Object} Block order map object. param: {Array} blocks Blocks to map. param: {?string} rootClientId Assumed root client ID. |
mapBlockParents(blocks, rootClientId = '') X-Ref |
Given an array of blocks, returns an object where each key contains the clientId of the block and the value is the parent of the block. return: {Object} Block order map object. param: {Array} blocks Blocks to map. param: {?string} rootClientId Assumed root client ID. |
flattenBlocks(blocks, transform = identity) X-Ref |
Helper method to iterate through all blocks, recursing into inner blocks, applying a transformation function to each one. Returns a flattened object with the transformed blocks. return: {Array} Flattened object. param: {Array} blocks Blocks to flatten. param: {Function} transform Transforming function to be applied to each block. |
getFlattenedClientIds(blocks) X-Ref |
No description |
getFlattenedBlocksWithoutAttributes(blocks) X-Ref |
Given an array of blocks, returns an object containing all blocks, without attributes, recursing into inner blocks. Keys correspond to the block client ID, the value of which is the attributes object. return: {Array} Flattened block attributes object. param: {Array} blocks Blocks to flatten. |
getFlattenedBlockAttributes(blocks) X-Ref |
Given an array of blocks, returns an object containing all block attributes, recursing into inner blocks. Keys correspond to the block client ID, the value of which is the attributes object. return: {Array} Flattened block attributes object. param: {Array} blocks Blocks to flatten. |
hasSameKeys(a, b) X-Ref |
Returns true if the two object arguments have the same keys, or false otherwise. return: {boolean} Whether the two objects have the same keys. param: {Object} a First object. param: {Object} b Second object. |
isUpdatingSameBlockAttribute(action, lastAction) X-Ref |
Returns true if, given the currently dispatching action and the previously dispatched action, the two actions are updating the same block attribute, or false otherwise. return: {boolean} Whether actions are updating the same block attribute. param: {Object} action Currently dispatching action. param: {Object} lastAction Previously dispatched action. |
updateBlockTreeForBlocks(state, blocks) X-Ref |
No description |
updateParentInnerBlocksInTree(state, updatedClientIds, updateChildrenOfUpdatedClientIds = false) 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. return: {Function} Enhanced reducer function. param: {Function} reducer Original reducer function. |
withIgnoredBlockChange(reducer) X-Ref |
Higher-order reducer intended to augment the blocks reducer, assigning an `isIgnoredChange` property value corresponding to whether a change in state can be considered as ignored. A change is considered ignored when the result of an action not incurred by direct user interaction. return: {Function} Enhanced reducer function. param: {Function} reducer Original reducer function. |
isBlockInterfaceHidden(state = false, action) X-Ref |
Reducer returning visibility status of block interface. return: {boolean} Updated state. param: {boolean} state Current state. param: {Object} action Dispatched action. |
isTyping(state = false, action) X-Ref |
Reducer returning typing state. return: {boolean} Updated state. param: {boolean} state Current state. param: {Object} action Dispatched action. |
isDragging(state = false, action) X-Ref |
Reducer returning dragging state. It is possible for a user to be dragging data from outside of the editor, so this state is separate from `draggedBlocks`. return: {boolean} Updated state. param: {boolean} state Current state. param: {Object} action Dispatched action. |
draggedBlocks(state = [], action) X-Ref |
Reducer returning dragged block client id. return: {string[]} Updated state. param: {string[]} state Current state. param: {Object} action Dispatched action. |
blockVisibility(state = {}, action) X-Ref |
Reducer tracking the visible blocks. return: {Record<string,boolean>} Block visibility. param: {Record<string,boolean>} state Current state. param: {Object} action Dispatched action. |
selectionHelper(state = {}, action) X-Ref |
Internal helper reducer for selectionStart and selectionEnd. Can hold a block selection, represented by an object with property clientId. return: {Object} Updated state. param: {Object} state Current state. param: {Object} action Dispatched action. |
selection(state = {}, action) X-Ref |
Reducer returning the selection state. return: {boolean} Updated state. param: {boolean} state Current state. param: {Object} action Dispatched action. |
isMultiSelecting(state = false, action) X-Ref |
Reducer returning whether the user is multi-selecting. return: {boolean} Updated state. param: {boolean} state Current state. param: {Object} action Dispatched action. |
isSelectionEnabled(state = true, action) X-Ref |
Reducer returning whether selection is enabled. return: {boolean} Updated state. param: {boolean} state Current state. param: {Object} action Dispatched action. |
removalPromptData(state = false, action) X-Ref |
Reducer returning the data needed to display a prompt when certain blocks are removed, or `false` if no such prompt is requested. return: {Object|false} Data for removal prompt display, if any. param: {boolean} state Current state. param: {Object} action Dispatched action. |
blockRemovalRules(state = false, action) X-Ref |
Reducer returning any rules that a block editor may provide in order to prevent a user from accidentally removing certain blocks. These rules are then used to display a confirmation prompt to the user. For instance, in the Site Editor, the Query Loop block is important enough to warrant such confirmation. The data is a record whose keys are block types (e.g. 'core/query') and whose values are the explanation to be shown to users (e.g. 'Query Loop displays a list of posts or pages.'). return: {Record<string,string>} Updated state. param: {boolean} state Current state. param: {Object} action Dispatched action. |
initialPosition(state = null, action) 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. return: {number|null} Initial position: 0, -1 or null. param: {boolean} state Current state. param: {Object} action Dispatched action. |
blocksMode(state = {}, action) X-Ref |
No description |
insertionPoint(state = null, action) 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`. return: {Object} Updated state. param: {Object} state Current state. param: {Object} action Dispatched action. |
template(state = {isValid: true}, action) X-Ref |
Reducer returning whether the post blocks match the defined template or not. return: {boolean} Updated state. param: {Object} state Current state. param: {Object} action Dispatched action. |
settings(state = SETTINGS_DEFAULTS, action) X-Ref |
Reducer returning the editor setting. return: {Object} Updated state. param: {Object} state Current state. param: {Object} action Dispatched action. |
preferences(state = PREFERENCES_DEFAULTS, action) X-Ref |
Reducer returning the user preferences. return: {string} Updated state. param: {Object} state Current state. param: {Object} action Dispatched action. |
editorMode(state = 'edit', action) X-Ref |
Reducer returning which mode is enabled. return: {string} Updated state. param: {string} state Current state. param: {Object} action Dispatched action. |
hasBlockMovingClientId(state = null, action) X-Ref |
Reducer returning whether the block moving mode is enabled or not. return: {string|null} Updated state. param: {string|null} state Current state. param: {Object} action Dispatched action. |
lastBlockAttributesChange(state = null, action) X-Ref |
Reducer return an updated state representing the most recent block attribute update. The state is structured as an object where the keys represent the client IDs of blocks, the values a subset of attributes from the most recent block update. The state is always reset to null if the last action is anything other than an attributes update. return: {[string,Object]} Updated state. param: {Object<string,Object>} state Current state. param: {Object} action Action object. |
highlightedBlock(state, action) X-Ref |
Reducer returning current highlighted block. return: {string} Updated state. param: {boolean} state Current highlighted block. param: {Object} action Dispatched action. |
expandedBlock(state = null, action) X-Ref |
Reducer returning current expanded block in the list view. return: {string|null} Updated state. param: {string|null} state Current expanded block. param: {Object} action Dispatched action. |
lastBlockInserted(state = {}, action) X-Ref |
Reducer returning the block insertion event list state. return: {Object} Updated state. param: {Object} state Current state. param: {Object} action Dispatched action. |
temporarilyEditingAsBlocks(state = '', action) X-Ref |
Reducer returning the block that is eding temporarily edited as blocks. return: {Object} Updated state. param: {Object} state Current state. param: {Object} action Dispatched action. |
temporarilyEditingFocusModeRevert(state = '', action) X-Ref |
Reducer returning the focus mode that should be used when temporarily edit as blocks finishes. return: {Object} Updated state. param: {Object} state Current state. param: {Object} action Dispatched action. |
blockEditingModes(state = new Map() X-Ref |
Reducer returning a map of block client IDs to block editing modes. return: {Map} Updated state. param: {Map} state Current state. param: {Object} action Dispatched action. |
openedBlockSettingsMenu(state = null, action) X-Ref |
Reducer returning the clientId of the block settings menu that is currently open. return: {string|null} Updated state. param: {string|null} state Current state. param: {Object} action Dispatched action. |
styleOverrides(state = new Map() X-Ref |
Reducer returning a map of style IDs to style overrides. return: {Map} Updated state. param: {Map} state Current state. param: {Object} action Dispatched action. |
registeredInserterMediaCategories(state = [], action) X-Ref |
Reducer returning a map of the registered inserter media categories. return: {Array} Updated state. param: {Array} state Current state. param: {Object} action Dispatched action. |
lastFocus(state = false, action) X-Ref |
Reducer setting last focused element return: {boolean} Updated state. param: {boolean} state Current state. param: {Object} action Dispatched action. |
hoveredBlockClientId(state = false, action) X-Ref |
Reducer setting currently hovered block. return: {boolean} Updated state. param: {boolean} state Current state. param: {Object} action Dispatched action. |
zoomLevel(state = 100, action) X-Ref |
Reducer setting zoom out state. return: {boolean} Updated state. param: {boolean} state Current state. param: {Object} action Dispatched action. |
withAutomaticChangeReset(reducer) X-Ref |
No description |
parsePattern(pattern) X-Ref |
No description |
getParsedPattern(pattern) X-Ref |
No description |
getGrammar(pattern) X-Ref |
No description |
getInsertBlockTypeDependants(state, rootClientId) X-Ref |
No description |
orderBy(items, field, order = 'asc') X-Ref |
Order items by a certain key. Supports decorator functions that allow complex picking of a comparison field. Sorts in ascending order by default, but supports descending as well. Stable sort - maintains original order of equal items. return: {Array} Sorted items. param: {Array} items Items to order. param: {string|Function} field Field to order by. param: {string} order Sorting order, `asc` or `desc`. |
isPatternFiltered(pattern, sourceFilter, syncFilter) X-Ref |
No description |
setImmutably(object, path, value) X-Ref |
Immutably sets a value inside an object. Like `lodash#set`, but returning a new object. Treats nullish initial values as empty objects. Clones any nested objects. Supports arrays, too. return: {Object} Cloned object with the new value set. param: {Object} object Object to set a value in. param: {number|string|Array} path Path in the object to modify. param: {*} value New value to set. |
uniqByProperty(array, property) X-Ref |
Helper util to filter out objects with duplicate values for a given property. return: {Object[]} Array of objects with unique values for the specified property. param: {Object[]} array Array of objects to filter. param: {string} property Property to filter unique values by. |
getBlockSettings(state, clientId, ...paths) X-Ref |
No description |
private_selectors_isBlockInterfaceHidden(state) X-Ref |
Returns true if the block interface is hidden, or false otherwise. return: {boolean} Whether the block toolbar is hidden. param: {Object} state Global application state. |
getLastInsertedBlocksClientIds(state) X-Ref |
Gets the client ids of the last inserted blocks. return: {Array|undefined} Client Ids of the last inserted block(s). param: {Object} state Global application state. |
getBlockWithoutAttributes(state, clientId) X-Ref |
No description |
getEnabledClientIdsTreeUnmemoized(state, rootClientId) X-Ref |
No description |
getRemovalPromptData(state) X-Ref |
Selector that returns the data needed to display a prompt when certain blocks are removed, or `false` if no such prompt is requested. return: {Object|false} Data for removal prompt display, if any. param: {Object} state Global application state. |
getBlockRemovalRules(state) X-Ref |
Returns true if removal prompt exists, or false otherwise. return: {boolean} Whether removal prompt exists. param: {Object} state Global application state. |
getOpenedBlockSettingsMenu(state) X-Ref |
Returns the client ID of the block settings menu that is currently open. return: {string|null} The client ID of the block menu that is currently open. param: {Object} state Global application state. |
getRegisteredInserterMediaCategories(state) X-Ref |
Returns the registered inserter media categories through the public API. return: {InserterMediaCategory[]} Inserter media categories. param: {Object} state Editor state. |
mapUserPattern(userPattern, __experimentalUserPatternCategories = []) X-Ref |
No description |
getLastFocus(state) X-Ref |
Returns the element of the last element that had focus when focus left the editor canvas. return: {Object} Element. param: {Object} state Block editor state. |
private_selectors_isDragging(state) X-Ref |
Returns true if the user is dragging anything, or false otherwise. It is possible for a user to be dragging data from outside of the editor, so this selector is separate from the `isDraggingBlocks` selector which only returns true if the user is dragging blocks. return: {boolean} Whether user is dragging. param: {Object} state Global application state. |
getExpandedBlock(state) X-Ref |
Retrieves the expanded block from the state. return: {string|null} The client ID of the expanded block, if set. param: {Object} state Block editor state. |
getTemporarilyEditingAsBlocks(state) X-Ref |
Retrieves the client ID of the block that is content locked but is currently being temporarily edited as a non-locked block. return: {?string} The client ID of the block being temporarily edited as a non-locked block. param: {Object} state Global application state. |
getTemporarilyEditingFocusModeToRevert(state) X-Ref |
Returns the focus mode that should be reapplied when the user stops editing a content locked blocks as a block without locking. return: {?string} The focus mode that should be re-set when temporarily editing as blocks stops. param: {Object} state Global application state. |
isZoomOutMode(state) X-Ref |
Returns whether zoom out mode is enabled. return: {boolean} Is zoom out mode enabled. param: {Object} state Editor state. |
getSectionRootClientId(state) X-Ref |
Retrieves the client ID of the block which contains the blocks acting as "sections" in the editor. This is typically the "main content" of the template/post. return: {string|undefined} The section root client ID or undefined if not set. param: {Object} state Editor state. |
getZoomLevel(state) X-Ref |
Returns the zoom out state. return: {boolean} The zoom out state. param: {Object} state Global application state. |
isZoomOut(state) X-Ref |
Returns whether the editor is considered zoomed out. return: {boolean} Whether the editor is zoomed. param: {Object} state Global application state. |
isSectionBlock(state, clientId) X-Ref |
Retrieves the client ID is a content locking parent return: {boolean} Whether the block is a content locking parent. param: {Object} state Global application state. param: {string} clientId Client Id of the block. |
getBlockName(state, clientId) X-Ref |
Returns a block's name given its client ID, or null if no block exists with the client ID. return: {string} Block name. param: {Object} state Editor state. param: {string} clientId Block client ID. |
isBlockValid(state, clientId) X-Ref |
Returns whether a block is valid or not. return: {boolean} Is Valid. param: {Object} state Editor state. param: {string} clientId Block client ID. |
getBlockAttributes(state, clientId) X-Ref |
Returns a block's attributes given its client ID, or null if no block exists with the client ID. return: {Object?} Block attributes. param: {Object} state Editor state. param: {string} clientId Block client ID. |
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. return: {Object} Parsed block object. param: {Object} state Editor state. param: {string} clientId Block client ID. |
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. return: {Object[]} Post blocks. param: {Object} state Editor state. param: {?string} rootClientId Optional root client ID of block list. |
__experimentalGetGlobalBlocksByName(state, blockName) X-Ref |
Returns all global blocks that match a blockName. Results include nested blocks. return: {Array} Array of clientIds of blocks with name equal to blockName. param: {Object} state Global application state. param: {string[]} blockName Block name(s) for which clientIds are to be returned. |
getBlockCount(state, rootClientId) X-Ref |
Returns the number of blocks currently present in the post. return: {number} Number of blocks in the post. param: {Object} state Editor state. param: {?string} rootClientId Optional root client ID of block list. |
getSelectionStart(state) X-Ref |
Returns the current selection start block client ID, attribute key and text offset. return: {WPBlockSelection} Selection start information. param: {Object} state Block editor state. |
getSelectionEnd(state) X-Ref |
Returns the current selection end block client ID, attribute key and text offset. return: {WPBlockSelection} Selection end information. param: {Object} state Block editor state. |
getBlockSelectionStart(state) X-Ref |
Returns the current block selection start. This value may be null, and it may represent either a singular block selection or multi-selection start. A selection is singular if its start and end match. return: {?string} Client ID of block selection start. param: {Object} state Global application state. |
getBlockSelectionEnd(state) X-Ref |
Returns the current block selection end. This value may be null, and it may represent either a singular block selection or multi-selection end. A selection is singular if its start and end match. return: {?string} Client ID of block selection end. param: {Object} state Global application state. |
getSelectedBlockCount(state) X-Ref |
Returns the number of blocks currently selected in the post. return: {number} Number of blocks selected in the post. param: {Object} state Global application state. |
hasSelectedBlock(state) X-Ref |
Returns true if there is a single selected block, or false otherwise. return: {boolean} Whether a single block is selected. param: {Object} state Editor state. |
getSelectedBlockClientId(state) X-Ref |
Returns the currently selected block client ID, or null if there is no selected block. return: {?string} Selected block client ID. param: {Object} state Editor state. |
getSelectedBlock(state) X-Ref |
Returns the currently selected block, or null if there is no selected block. return: {?Object} Selected block. param: {Object} state Global application state. |
getBlockRootClientId(state, clientId) X-Ref |
Given a block client ID, returns the root block from which the block is nested, an empty string for top-level blocks, or null if the block does not exist. return: {?string} Root client ID, if exists param: {Object} state Editor state. param: {string} clientId Block from which to find root client ID. |
getBlockHierarchyRootClientId(state, clientId) X-Ref |
Given a block client ID, returns the root of the hierarchy from which the block is nested, return the block itself for root level blocks. return: {string} Root client ID param: {Object} state Editor state. param: {string} clientId Block from which to find root client ID. |
getLowestCommonAncestorWithSelectedBlock(state, clientId) X-Ref |
Given a block client ID, returns the lowest common ancestor with selected client ID. return: {string} Common ancestor client ID or undefined param: {Object} state Editor state. param: {string} clientId Block from which to find common ancestor client ID. |
getAdjacentBlockClientId(state, startClientId, modifier = 1) X-Ref |
Returns the client ID of the block adjacent one at the given reference startClientId and modifier directionality. Defaults start startClientId to the selected block, and direction as next block. Returns null if there is no adjacent block. return: {?string} Return the client ID of the block, or null if none exists. param: {Object} state Editor state. param: {?string} startClientId Optional client ID of block from which to param: {?number} modifier Directionality multiplier (1 next, -1 |
getPreviousBlockClientId(state, startClientId) X-Ref |
Returns the previous block's client ID from the given reference start ID. Defaults start to the selected block. Returns null if there is no previous block. return: {?string} Adjacent block's client ID, or null if none exists. param: {Object} state Editor state. param: {?string} startClientId Optional client ID of block from which to |
getNextBlockClientId(state, startClientId) X-Ref |
Returns the next block's client ID from the given reference start ID. Defaults start to the selected block. Returns null if there is no next block. return: {?string} Adjacent block's client ID, or null if none exists. param: {Object} state Editor state. param: {?string} startClientId Optional client ID of block from which to |
getSelectedBlocksInitialCaretPosition(state) X-Ref |
Returns the initial caret position for the selected block. This position is to used to position the caret properly when the selected block changes. If the current block is not a RichText, having initial position set to 0 means "focus block" return: {0|-1|null} Initial position. param: {Object} state Global application state. |
getMultiSelectedBlockClientIds(state) X-Ref |
Returns the current multi-selection set of block client IDs, or an empty array if there is no multi-selection. return: {Array} Multi-selected block client IDs. param: {Object} state Editor state. |
getFirstMultiSelectedBlockClientId(state) X-Ref |
Returns the client ID of the first block in the multi-selection set, or null if there is no multi-selection. return: {?string} First block client ID in the multi-selection set. param: {Object} state Editor state. |
getLastMultiSelectedBlockClientId(state) X-Ref |
Returns the client ID of the last block in the multi-selection set, or null if there is no multi-selection. return: {?string} Last block client ID in the multi-selection set. param: {Object} state Editor state. |
isFirstMultiSelectedBlock(state, clientId) X-Ref |
Returns true if a multi-selection exists, and the block corresponding to the specified client ID is the first block of the multi-selection set, or false otherwise. return: {boolean} Whether block is first in multi-selection. param: {Object} state Editor state. param: {string} clientId Block client ID. |
isBlockMultiSelected(state, clientId) X-Ref |
Returns true if the client ID occurs within the block multi-selection, or false otherwise. return: {boolean} Whether block is in multi-selection set. param: {Object} state Editor state. param: {string} clientId Block client ID. |
getMultiSelectedBlocksStartClientId(state) X-Ref |
Returns the client ID of the block which begins the multi-selection set, or null if there is no multi-selection. This is not necessarily the first client ID in the selection. return: {?string} Client ID of block beginning multi-selection. param: {Object} state Editor state. |
getMultiSelectedBlocksEndClientId(state) X-Ref |
Returns the client ID of the block which ends the multi-selection set, or null if there is no multi-selection. This is not necessarily the last client ID in the selection. return: {?string} Client ID of block ending multi-selection. param: {Object} state Editor state. |
__unstableIsFullySelected(state) X-Ref |
Returns true if the selection is not partial. return: {boolean} Whether the selection is mergeable. param: {Object} state Editor state. |
__unstableIsSelectionCollapsed(state) X-Ref |
Returns true if the selection is collapsed. return: {boolean} Whether the selection is collapsed. param: {Object} state Editor state. |
__unstableSelectionHasUnmergeableBlock(state) X-Ref |
No description |
__unstableIsSelectionMergeable(state, isForward) X-Ref |
Check whether the selection is mergeable. return: {boolean} Whether the selection is mergeable. param: {Object} state Editor state. param: {boolean} isForward Whether to merge forwards. |
getBlockOrder(state, rootClientId) X-Ref |
Returns an array containing all block client IDs in the editor in the order they appear. Optionally accepts a root client ID of the block list for which the order should be returned, defaulting to the top-level block order. return: {Array} Ordered client IDs of editor blocks. param: {Object} state Editor state. param: {?string} rootClientId Optional root client ID of block list. |
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. return: {number} Index at which block exists in order. param: {Object} state Editor state. param: {string} clientId Block client ID. |
isBlockSelected(state, clientId) X-Ref |
Returns true if the block corresponding to the specified client ID is currently selected and no multi-selection exists, or false otherwise. return: {boolean} Whether block is selected and multi-selection exists. param: {Object} state Editor state. param: {string} clientId Block client ID. |
hasSelectedInnerBlock(state, clientId, deep = false) X-Ref |
Returns true if one of the block's inner blocks is selected. return: {boolean} Whether the block has an inner block selected param: {Object} state Editor state. param: {string} clientId Block client ID. param: {boolean} deep Perform a deep check. |
hasDraggedInnerBlock(state, clientId, deep = false) X-Ref |
Returns true if one of the block's inner blocks is dragged. return: {boolean} Whether the block has an inner block dragged param: {Object} state Editor state. param: {string} clientId Block client ID. param: {boolean} deep Perform a deep check. |
isBlockWithinSelection(state, clientId) X-Ref |
Returns true if the block corresponding to the specified client ID is currently selected but isn't the last of the selected blocks. Here "last" refers to the block sequence in the document, _not_ the sequence of multi-selection, which is why `state.selectionEnd` isn't used. return: {boolean} Whether block is selected and not the last in the param: {Object} state Editor state. param: {string} clientId Block client ID. |
hasMultiSelection(state) X-Ref |
Returns true if a multi-selection has been made, or false otherwise. return: {boolean} Whether multi-selection has been made. param: {Object} state Editor state. |
selectors_isMultiSelecting(state) X-Ref |
Whether in the process of multi-selecting or not. This flag is only true while the multi-selection is being selected (by mouse move), and is false once the multi-selection has been settled. return: {boolean} True if multi-selecting, false if not. param: {Object} state Global application state. |
selectors_isSelectionEnabled(state) X-Ref |
Selector that returns if multi-selection is enabled or not. return: {boolean} True if it should be possible to multi-select blocks, false if multi-selection is disabled. param: {Object} state Global application state. |
getBlockMode(state, clientId) X-Ref |
Returns the block's editing mode, defaulting to "visual" if not explicitly assigned. return: {Object} Block editing mode. param: {Object} state Editor state. param: {string} clientId Block client ID. |
selectors_isTyping(state) X-Ref |
Returns true if the user is typing, or false otherwise. return: {boolean} Whether user is typing. param: {Object} state Global application state. |
isDraggingBlocks(state) X-Ref |
Returns true if the user is dragging blocks, or false otherwise. return: {boolean} Whether user is dragging blocks. param: {Object} state Global application state. |
getDraggedBlockClientIds(state) X-Ref |
Returns the client ids of any blocks being directly dragged. This does not include children of a parent being dragged. return: {string[]} Array of dragged block client ids. param: {Object} state Global application state. |
isBlockBeingDragged(state, clientId) X-Ref |
Returns whether the block is being dragged. Only returns true if the block is being directly dragged, not if the block is a child of a parent being dragged. See `isAncestorBeingDragged` for child blocks. return: {boolean} Whether the block is being dragged. param: {Object} state Global application state. param: {string} clientId Client id for block to check. |
isAncestorBeingDragged(state, clientId) X-Ref |
Returns whether a parent/ancestor of the block is being dragged. return: {boolean} Whether the block's ancestor is being dragged. param: {Object} state Global application state. param: {string} clientId Client id for block to check. |
isCaretWithinFormattedText() X-Ref |
Returns true if the caret is within formatted text, or false otherwise. return: {boolean} Whether the caret is within formatted text. |
isBlockInsertionPointVisible(state) X-Ref |
Returns true if we should show the block insertion point. return: {?boolean} Whether the insertion point is visible or not. param: {Object} state Global application state. |
isValidTemplate(state) X-Ref |
Returns whether the blocks matches the template or not. return: {?boolean} Whether the template is valid or not. param: {boolean} state |
getTemplate(state) X-Ref |
Returns the defined block template return: {?Array} Block Template. param: {boolean} state |
getTemplateLock(state, rootClientId) X-Ref |
Returns the defined block template lock. Optionally accepts a root block client ID as context, otherwise defaulting to the global context. return: {string|false} Block Template Lock param: {Object} state Editor state. param: {?string} rootClientId Optional block root client ID. |
canInsertBlocks(state, clientIds, rootClientId = null) X-Ref |
Determines if the given blocks are allowed to be inserted into the block list. return: {boolean} Whether the given blocks are allowed to be inserted. param: {Object} state Editor state. param: {string} clientIds The block client IDs to be inserted. param: {?string} rootClientId Optional root client ID of block list. |
canRemoveBlock(state, clientId) X-Ref |
Determines if the given block is allowed to be deleted. return: {boolean} Whether the given block is allowed to be removed. param: {Object} state Editor state. param: {string} clientId The block client Id. |
canRemoveBlocks(state, clientIds) X-Ref |
Determines if the given blocks are allowed to be removed. return: {boolean} Whether the given blocks are allowed to be removed. param: {Object} state Editor state. param: {string} clientIds The block client IDs to be removed. |
canMoveBlock(state, clientId) X-Ref |
Determines if the given block is allowed to be moved. return: {boolean} Whether the given block is allowed to be moved. param: {Object} state Editor state. param: {string} clientId The block client Id. |
canMoveBlocks(state, clientIds) X-Ref |
Determines if the given blocks are allowed to be moved. return: {boolean} Whether the given blocks are allowed to be moved. param: {Object} state Editor state. param: {string} clientIds The block client IDs to be moved. |
canEditBlock(state, clientId) X-Ref |
Determines if the given block is allowed to be edited. return: {boolean} Whether the given block is allowed to be edited. param: {Object} state Editor state. param: {string} clientId The block client Id. |
canLockBlockType(state, nameOrType) X-Ref |
Determines if the given block type can be locked/unlocked by a user. return: {boolean} Whether a given block type can be locked/unlocked. param: {Object} state Editor state. param: {(string|Object)} nameOrType Block name or type object. |
getInsertUsage(state, id) X-Ref |
Returns information about how recently and frequently a block has been inserted. return: {?{ time: number, count: number }} An object containing `time` which is when the last param: {Object} state Global application state. param: {string} id A string which identifies the insert, e.g. 'core/block/12' |
getDirectInsertBlock(state, rootClientId = null) X-Ref |
Returns the block to be directly inserted by the block appender. return: {WPDirectInsertBlock|undefined} The block type to be directly inserted. param: {Object} state Editor state. param: {?string} rootClientId Optional root client ID of block list. |
__experimentalGetDirectInsertBlock(state, rootClientId = null) X-Ref |
No description |
enhancePatternWithParsedBlocks(pattern) X-Ref |
No description |
getBlockListSettings(state, clientId) X-Ref |
Returns the Block List settings of a block, if any exist. return: {?Object} Block settings of the block if set. param: {Object} state Editor state. param: {?string} clientId Block client ID. |
getSettings(state) X-Ref |
Returns the editor settings. return: {Object} The editor settings object. param: {Object} state Editor state. |
isLastBlockChangePersistent(state) X-Ref |
Returns true if the most recent block change is be considered persistent, or false otherwise. A persistent change is one committed by BlockEditorProvider via its `onChange` callback, in addition to `onInput`. return: {boolean} Whether the most recent block change was persistent. param: {Object} state Block editor state. |
__unstableIsLastBlockChangeIgnored(state) X-Ref |
Returns true if the most recent block change is be considered ignored, or false otherwise. An ignored change is one not to be committed by BlockEditorProvider, neither via `onChange` nor `onInput`. return: {boolean} Whether the most recent block change was ignored. param: {Object} state Block editor state. |
__experimentalGetLastBlockAttributeChanges(state) X-Ref |
Returns the block attributes changed as a result of the last dispatched action. return: {Object<string,Object>} Subsets of block attributes changed, keyed param: {Object} state Block editor state. |
isNavigationMode(state) X-Ref |
Returns whether the navigation mode is enabled. return: {boolean} Is navigation mode enabled. param: {Object} state Editor state. |
__unstableGetEditorMode(state) X-Ref |
Returns the current editor mode. return: {string} the editor mode. param: {Object} state Editor state. |
selectors_hasBlockMovingClientId(state) X-Ref |
Returns whether block moving mode is enabled. return: {string} Client Id of moving block. param: {Object} state Editor state. |
didAutomaticChange(state) X-Ref |
Returns true if the last change was an automatic change, false otherwise. return: {boolean} Whether the last change was automatic. param: {Object} state Global application state. |
isBlockHighlighted(state, clientId) X-Ref |
Returns true if the current highlighted block matches the block clientId. return: {boolean} Whether the block is currently highlighted. param: {Object} state Global application state. param: {string} clientId The block to check. |
areInnerBlocksControlled(state, clientId) X-Ref |
Checks if a given block has controlled inner blocks. return: {boolean} True if the block has controlled inner blocks. param: {Object} state Global application state. param: {string} clientId The block to check. |
wasBlockJustInserted(state, clientId, source) X-Ref |
Tells if the block with the passed clientId was just inserted. return: {boolean} True if the block matches the last block inserted from the specified source. param: {Object} state Global application state. param: {Object} clientId Client Id of the block. param: {?string} source Optional insertion source of the block. |
isBlockVisible(state, clientId) X-Ref |
Tells if the block is visible on the canvas or not. return: {boolean} True if the block is visible. param: {Object} state Global application state. param: {Object} clientId Client Id of the block. |
getHoveredBlockClientId(state) X-Ref |
Returns the currently hovered block. return: {Object} Client Id of the hovered block. param: {Object} state Global application state. |
__unstableHasActiveBlockOverlayActive(state, clientId) X-Ref |
No description |
__unstableIsWithinBlockOverlay(state, clientId) X-Ref |
No description |
__unstableGetTemporarilyEditingAsBlocks(state) X-Ref |
DO-NOT-USE in production. This selector is created for internal/experimental only usage and may be removed anytime without any warning, causing breakage on any plugin or theme invoking it. param: {Object} state Global application state. |
__unstableGetTemporarilyEditingFocusModeToRevert(state) X-Ref |
DO-NOT-USE in production. This selector is created for internal/experimental only usage and may be removed anytime without any warning, causing breakage on any plugin or theme invoking it. param: {Object} state Global application state. |
__experimentalUpdateSettings(settings, {stripExperimentalSettings = false,reset = false} = {}) X-Ref |
Action that updates the block editor settings and conditionally preserves the experimental ones. return: {Object} Action object param: {Object} settings Updated settings param: {Object} options Options object. param: {boolean} options.stripExperimentalSettings Whether to strip experimental settings. param: {boolean} options.reset Whether to reset the settings. |
hideBlockInterface() X-Ref |
Hides the block interface (eg. toolbar, outline, etc.) return: {Object} Action object. |
showBlockInterface() X-Ref |
Shows the block interface (eg. toolbar, outline, etc.) return: {Object} Action object. |
flattenBlocks(blocks) X-Ref |
No description |
displayBlockRemovalPrompt(clientIds, selectPrevious, message) X-Ref |
Returns an action object used in signalling that a block removal prompt must be displayed. Contrast with `setBlockRemovalRules`. return: {Object} Action object. param: {string|string[]} clientIds Client IDs of blocks to remove. param: {boolean} selectPrevious True if the previous block or the param: {string} message Message to display in the prompt. |
clearBlockRemovalPrompt() X-Ref |
Returns an action object used in signalling that a block removal prompt must be cleared, either be cause the user has confirmed or canceled the request for removal. return: {Object} Action object. |
setBlockRemovalRules(rules = false) X-Ref |
Returns an action object used to set up any rules that a block editor may provide in order to prevent a user from accidentally removing certain blocks. These rules are then used to display a confirmation prompt to the user. For instance, in the Site Editor, the Query Loop block is important enough to warrant such confirmation. IMPORTANT: Registering rules implicitly signals to the `privateRemoveBlocks` action that the editor will be responsible for displaying block removal prompts and confirming deletions. This action is meant to be used by component `BlockRemovalWarningModal` only. The data is a record whose keys are block types (e.g. 'core/query') and whose values are the explanation to be shown to users (e.g. 'Query Loop displays a list of posts or pages.'). Contrast with `displayBlockRemovalPrompt`. return: {Object} Action object. param: {Record<string,string>|false} rules Block removal rules. |
setOpenedBlockSettingsMenu(clientId) X-Ref |
Sets the client ID of the block settings menu that is currently open. return: {Object} Action object. param: {?string} clientId The block client ID. |
setStyleOverride(id, style) X-Ref |
No description |
deleteStyleOverride(id) X-Ref |
No description |
setLastFocus(lastFocus = null) X-Ref |
Action that sets the element that had focus when focus leaves the editor canvas. return: {Object} Action object. param: {Object} lastFocus The last focused element. |
stopEditingAsBlocks(clientId) X-Ref |
Action that stops temporarily editing as blocks. param: {string} clientId The block's clientId. |
startDragging() X-Ref |
Returns an action object used in signalling that the user has begun to drag. return: {Object} Action object. |
stopDragging() X-Ref |
Returns an action object used in signalling that the user has stopped dragging. return: {Object} Action object. |
expandBlock(clientId) X-Ref |
return: {Object} Action object. param: {string|null} clientId The block's clientId, or `null` to clear. |
setZoomLevel(zoom = 100) X-Ref |
Sets the zoom level. return: {Object} Action object. param: {number} zoom the new zoom level |
resetZoomLevel() X-Ref |
Resets the Zoom state. return: {Object} Action object. |
retrieveSelectedAttribute(blockAttributes) X-Ref |
Retrieve the block attribute that contains the selection position. return: {string|void} The name of the block attribute that was previously selected. param: {Object} blockAttributes Block attributes. |
findRichTextAttributeKey(blockType) X-Ref |
No description |
resetSelection(selectionStart, selectionEnd, initialPosition) X-Ref |
Returns an action object used in signalling that selection state should be reset to the specified selection. return: {Object} Action object. param: {WPBlockSelection} selectionStart The selection start. param: {WPBlockSelection} selectionEnd The selection end. param: {0|-1|null} initialPosition Initial block position. |
receiveBlocks(blocks) X-Ref |
Returns an action object used in signalling that blocks have been received. Unlike resetBlocks, these should be appended to the existing known set, not replacing. return: {Object} Action object. param: {Object[]} blocks Array of block objects. |
updateBlockAttributes(clientIds, attributes, uniqueByBlock = false) X-Ref |
Action that updates attributes of multiple blocks with the specified client IDs. return: {Object} Action object. 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 |
updateBlock(clientId, updates) X-Ref |
Action that updates the block with the specified client ID. return: {Object} Action object. param: {string} clientId Block client ID. param: {Object} updates Block attributes to be merged. |
selectBlock(clientId, initialPosition = 0) X-Ref |
Returns an action object used in signalling that the block with the specified client ID has been selected, optionally accepting a position value reflecting its selection directionality. An initialPosition of -1 reflects a reverse selection. return: {Object} Action object. param: {string} clientId Block client ID. param: {0|-1|null} initialPosition Optional initial position. Pass as -1 to |
hoverBlock(clientId) X-Ref |
Returns an action object used in signalling that the block with the specified client ID has been hovered. return: {Object} Action object. param: {string} clientId Block client ID. |
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(isSelectionEnabled = true) X-Ref |
Action that enables or disables block selection. return: {Object} Action object. param: {boolean} [isSelectionEnabled=true] Whether block selection should |
replaceBlock(clientId, block) X-Ref |
Action that replaces a single block with one or more replacement blocks. return: {Object} Action object. param: {(string|string[])} clientId Block client ID to replace. param: {(Object|Object[])} block Replacement block(s). |
moveBlockToPosition(clientId, fromRootClientId = '', toRootClientId = '', index) 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. Only allowed blocks are inserted. The action may fail silently for blocks that are not allowed or if a templateLock is active on the block list. return: {Object} Action object. param: {Object} block Block object to insert. param: {?number} index Index at which block should be inserted. param: {?string} rootClientId Optional root client ID of block list on which to insert. param: {?boolean} updateSelection If true block selection will be updated. If false, block selection will not change. Defaults to true. param: {?Object} meta Optional Meta values to be passed to the action object. |
showInsertionPoint(rootClientId, index, __unstableOptions = {}) X-Ref |
Action that shows the insertion point. return: {Object} Action object. param: {?string} rootClientId Optional root client ID of block list on param: {?number} index Index at which block should be inserted. param: {?Object} __unstableOptions Additional options. |
setTemplateValidity(isValid) X-Ref |
Action that resets the template validity. return: {Object} Action object. param: {boolean} isValid template validity flag. |
createEmpty() X-Ref |
No description |
removeBlock(clientId, selectPrevious) X-Ref |
Returns an action object used in signalling that the block with the specified client ID is to be removed. return: {Object} Action object. param: {string} clientId Client ID of block to remove. param: {boolean} selectPrevious True if the previous block should be |
replaceInnerBlocks(rootClientId, blocks, updateSelection = false, initialPosition = 0) X-Ref |
Returns an action object used in signalling that the inner blocks with the specified client ID should be replaced. return: {Object} Action object. param: {string} rootClientId Client ID of the block whose InnerBlocks will re replaced. param: {Object[]} blocks Block objects to insert as new InnerBlocks param: {?boolean} updateSelection If true block selection will be updated. If false, block selection will not change. Defaults to false. param: {0|-1|null} initialPosition Initial block position. |
toggleBlockMode(clientId) X-Ref |
Returns an action object used to toggle the block editing mode between visual and HTML modes. return: {Object} Action object. param: {string} clientId Block client ID. |
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(clientIds = []) X-Ref |
Returns an action object used in signalling that the user has begun to drag blocks. return: {Object} Action object. param: {string[]} clientIds An array of client ids being dragged |
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. return: {Object} Action object. 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. |
updateBlockListSettings(clientId, settings) X-Ref |
Action that changes the nested settings of the given block(s). return: {Object} Action object param: {string | SettingsByClientId} clientId Client ID of the block whose param: {Object} settings Object with the new settings |
updateSettings(settings) X-Ref |
Action that updates the block editor settings. return: {Object} Action object param: {Object} settings Updated settings |
__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. return: {Object} Action object. param: {string} id Reusable block's id. param: {string} updatedId Updated block's id. |
__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. |
setBlockVisibility(updates) X-Ref |
Action that sets whether given blocks are visible on the canvas. param: {Record<string,boolean>} updates For each block's clientId, its new visibility setting. |
__unstableSetTemporarilyEditingAsBlocks(temporarilyEditingAsBlocks, focusModeToRevert) X-Ref |
Action that sets whether a block is being temporarily edited as blocks. DO-NOT-USE in production. This action is created for internal/experimental only usage and may be removed anytime without any warning, causing breakage on any plugin or theme invoking it. param: {?string} temporarilyEditingAsBlocks The block's clientId being temporarily edited as blocks. param: {?string} focusModeToRevert The focus mode to revert after temporarily edit as blocks finishes. |
setBlockEditingMode(clientId = '', mode) X-Ref |
Sets the block editing mode for a given block. return: {Object} Action object. param: {string} clientId The block client ID, or `''` for the root container. param: {BlockEditingMode} mode The block editing mode. One of `'disabled'`, |
unsetBlockEditingMode(clientId = '') X-Ref |
Clears the block editing mode for a given block. return: {Object} Action object. param: {string} clientId The block client ID, or `''` for the root container. |
use_settings_useSettings(...paths) X-Ref |
Hook that retrieves the given settings for the block instance in use. It looks up the settings first in the block instance hierarchy. If none are found, it'll look them up in the block editor settings. return: {any[]} Returns the values defined for the settings. param: {string[]} paths The paths to the settings. |
useSetting(path) X-Ref |
Hook that retrieves the given setting for the block instance in use. It looks up the setting first in the block instance hierarchy. If none is found, it'll look it up in the block editor settings. return: {any} Returns the value defined for the setting. param: {string} path The path to the setting. |
getComputedFluidTypographyValue({minimumFontSize,maximumFontSize,fontSize,minimumViewportWidth = DEFAULT_MINIMUM_VIEWPORT_WIDTH,maximumViewportWidth = DEFAULT_MAXIMUM_VIEWPORT_WIDTH,scaleFactor = DEFAULT_SCALE_FACTOR,minimumFontSizeLimit}) X-Ref |
Computes a fluid font-size value that uses clamp(). A minimum and maximum font size OR a single font size can be specified. If a single font size is specified, it is scaled up and down using a logarithmic scale. return: {string|null} A font-size value using clamp(). param: {Object} args param: {?string} args.minimumViewportWidth Minimum viewport size from which type will have fluidity. Optional if fontSize is specified. param: {?string} args.maximumViewportWidth Maximum size up to which type will have fluidity. Optional if fontSize is specified. param: {string|number} [args.fontSize] Size to derive maximumFontSize and minimumFontSize from, if necessary. Optional if minimumFontSize and maximumFontSize are specified. param: {?string} args.maximumFontSize Maximum font size for any clamp() calculation. Optional. param: {?string} args.minimumFontSize Minimum font size for any clamp() calculation. Optional. param: {?number} args.scaleFactor A scale factor to determine how fast a font scales within boundaries. Optional. param: {?string} args.minimumFontSizeLimit The smallest a calculated font size may be. Optional. |
getTypographyValueAndUnit(rawValue, options = {}) X-Ref |
Internal method that checks a string for a unit and value and returns an array consisting of `'value'` and `'unit'`, e.g., [ '42', 'rem' ]. A raw font size of `value + unit` is expected. If the value is an integer, it will convert to `value + 'px'`. return: {{ unit: string, value: number }|null} An object consisting of `'value'` and `'unit'` properties. param: {string|number} rawValue Raw size value from theme.json. param: {Object|undefined} options Calculation options. |
roundToPrecision(value, digits = 3) X-Ref |
Returns a value rounded to defined precision. Returns `undefined` if the value is not a valid finite number. return: {number|undefined} Value rounded to standard precision. param: {number} value Raw value. param: {number} digits The number of digits to appear after the decimal point |
formatFontStyle(fontStyle) X-Ref |
Formats font styles to human readable names. return: {Object} new object with formatted font style param: {string} fontStyle font style string |
formatFontWeight(fontWeight) X-Ref |
Formats font weights to human readable names. return: {Object} new object with formatted font weight param: {string} fontWeight font weight string |
getFontStylesAndWeights(fontFamilyFaces) X-Ref |
Builds a list of font style and weight options based on font family faces. Defaults to the standard font styles and weights if no font family faces are provided. return: {Object} new object with combined and separated font style and weight properties param: {Array} fontFamilyFaces font family faces array |
getTypographyFontSizeValue(preset, settings) X-Ref |
Returns a font-size value based on a given font-size preset. Takes into account fluid typography parameters and attempts to return a css formula depending on available, valid values. The Core PHP equivalent is wp_get_typography_font_size_value(). return: {string|*} A font-size value or the value of preset.size. param: {Preset} preset param: {Object} settings param: {boolean|TypographySettings} settings.typography.fluid Whether fluid typography is enabled, and, optionally, fluid font size options. param: {Object?} settings.typography.layout Layout options. |
isFluidTypographyEnabled(typographySettings) X-Ref |
No description |
getFluidTypographyOptionsFromSettings(settings) X-Ref |
Returns fluid typography settings from theme.json setting object. return: {TypographySettings} Fluid typography settings param: {Object} settings Theme.json settings param: {Object} settings.typography Theme.json typography settings param: {Object} settings.layout Theme.json layout settings |
getMergedFontFamiliesAndFontFamilyFaces(settings, selectedFontFamily) X-Ref |
Returns an object of merged font families and the font faces from the selected font family based on the theme.json settings object and the currently selected font family. return: {Object} Merged font families and font faces from the selected font family. param: {Object} settings Theme.json settings. param: {string} selectedFontFamily Decoded font family string. |
findNearestFontWeight(availableFontWeights, newFontWeightValue) X-Ref |
Returns the nearest font weight value from the available font weight list based on the new font weight. The nearest font weight is the one with the smallest difference from the new font weight. return: {string} Nearest font weight. param: {Array} availableFontWeights Array of available font weights. param: {string} newFontWeightValue New font weight value. |
findNearestFontStyle(availableFontStyles, newFontStyleValue) X-Ref |
Returns the nearest font style based on the new font style. Defaults to an empty string if the new font style is not valid or available. return: {string} Nearest font style or an empty string. param: {Array} availableFontStyles Array of available font weights. param: {string} newFontStyleValue New font style value. |
findNearestStyleAndWeight(fontFamilyFaces, fontStyle, fontWeight) X-Ref |
Returns the nearest font style and weight based on the available font family faces and the new font style and weight. return: {Object} Nearest font style and font weight. param: {Array} fontFamilyFaces Array of available font family faces. param: {string} fontStyle New font style. Defaults to previous value. param: {string} fontWeight New font weight. Defaults to previous value. |
useToolsPanelDropdownMenuProps() X-Ref |
No description |
findInPresetsBy(features, blockName, presetPath, presetProperty, presetValueValue) X-Ref |
No description |
getPresetVariableFromValue(features, blockName, variableStylePath, presetPropertyValue) X-Ref |
No description |
getValueFromPresetVariable(features, blockName, variable, [presetType, slug]) X-Ref |
No description |
getValueFromCustomVariable(features, blockName, variable, path) X-Ref |
No description |
getValueFromVariable(features, blockName, variable) X-Ref |
Attempts to fetch the value of a theme.json CSS variable. return: {string|*|{ref}} The value of the CSS var, if found. If not found, the passed variable argument. param: {Object} features GlobalStylesContext config, e.g., user, base or merged. Represents the theme.json tree. param: {string} blockName The name of a block as represented in the styles property. E.g., 'root' for root-level, and 'core/${blockName}' for blocks. param: {string|*} variable An incoming style value. A CSS var value is expected, but it could be any value. |
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. return: {string} Scoped selector. param: {string} scope Selector to scope to. param: {string} selector Original selector. |
scopeFeatureSelectors(scope, selectors) X-Ref |
Scopes a collection of selectors for features and subfeatures. return: {Object|undefined} Scoped collection of feature selectors. param: {string} scope Selector to scope collection of selectors with. param: {Object} selectors Collection of feature selectors e.g. |
appendToSelector(selector, toAppend) X-Ref |
Appends a sub-selector to an existing one. Given the compounded `selector` "h1, h2, h3" and the `toAppend` selector ".some-class" the result will be "h1.some-class, h2.some-class, h3.some-class". return: {string} The new selector. param: {string} selector Original selector. param: {string} toAppend Selector to append. |
areGlobalStyleConfigsEqual(original, variation) X-Ref |
Compares global style variations according to their styles and settings properties. return: {boolean} Whether `original` and `variation` match. param: {Object} original A global styles object. param: {Object} variation A global styles object. |
getBlockStyleVariationSelector(variation, blockSelector) X-Ref |
Generates the selector for a block style variation by creating the appropriate CSS class and adding it to the ancestor portion of the block's selector. For example, take the Button block which has a compound selector: `.wp-block-button .wp-block-button__link`. With a variation named 'custom', the class `.is-style-custom` should be added to the `.wp-block-button` ancestor only. This function will take into account comma separated and complex selectors. return: {string} CSS selector for the block style variation. param: {string} variation Name for the variation. param: {string} blockSelector CSS selector for the block. |
getResolvedThemeFilePath(file, themeFileURIs) X-Ref |
Looks up a theme file URI based on a relative path. return: {string} A resolved theme file URI, if one is found in the themeFileURIs collection. param: {string} file A relative path. param: {Array<Object>} themeFileURIs A collection of absolute theme file URIs and their corresponding file paths. |
getResolvedRefValue(ruleValue, tree) X-Ref |
Resolves ref values in theme JSON. return: {*} The resolved value or incoming ruleValue. param: {Object|string} ruleValue A block style value that may contain a reference to a theme.json value. param: {Object} tree A theme.json object. |
getResolvedValue(ruleValue, tree) X-Ref |
Resolves ref and relative path values in theme JSON. return: {*} The resolved value or incoming ruleValue. param: {Object|string} ruleValue A block style value that may contain a reference to a theme.json value. param: {Object} tree A theme.json object. |
useGlobalSetting(propertyPath, blockName, source = 'all') X-Ref |
No description |
useGlobalStyle(path, blockName, source = 'all', {shouldDecodeEncode = true} = {}) X-Ref |
No description |
useSettingsForBlockElement(parentSettings, blockName, element) X-Ref |
React hook that overrides a global settings object with block and element specific settings. return: {Object} Merge of settings and supports. param: {Object} parentSettings Settings object. param: {blockName?} blockName Block name. param: {element?} element Element name. |
useColorsPerOrigin(settings) X-Ref |
No description |
useGradientsPerOrigin(settings) X-Ref |
No description |
r(e) X-Ref |
No description |
transformStyles(activeSupports, migrationPaths, result, source, index, results) X-Ref |
No description |
shouldSkipSerialization(blockNameOrType, featureSet, feature) X-Ref |
Check whether serialization of specific block support feature or set should be skipped. return: {boolean} Whether serialization should occur. param: {string|Object} blockNameOrType 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. |
useStyleOverride({id,css}) X-Ref |
Override a block editor settings style. Leave the ID blank to create a new style. param: {Object} override Override object. param: {?string} override.id Id of the style override, leave blank to create param: {string} override.css CSS to apply. |
usePrivateStyleOverride({id,css,assets,__unstableType,variation,clientId} = {}) X-Ref |
No description |
useBlockSettings(name, parentLayout) X-Ref |
Based on the block and its context, returns an object of all the block settings. This object can be passed as a prop to all the Styles UI components (TypographyPanel, DimensionsPanel...). return: {Object} Settings object. param: {string} name Block name. param: {*} parentLayout Parent layout. |
createBlockEditFilter(features) X-Ref |
No description |
BlockProps({index,useBlockProps,setAllWrapperProps,...props}) X-Ref |
No description |
createBlockListBlockFilter(features) X-Ref |
No description |
createBlockSaveFilter(features) X-Ref |
No description |
extraPropsFromHooks(props, name, attributes) X-Ref |
No description |
migrateLightBlockWrapper(settings) X-Ref |
WordPress dependencies |
useBlockControlsFill(group, shareWithChildBlocks) X-Ref |
Internal dependencies |
BlockControlsFill({group = 'default',controls,children,__experimentalShareWithChildBlocks = false}) X-Ref |
No description |
BlockControlsSlot({group = 'default',...props}) X-Ref |
No description |
appendSelectors(selectors, append = '') X-Ref |
Utility to generate the proper CSS selector for layout styles. return: {string} - CSS selector. param: {string} selectors CSS selector, also supports multiple comma-separated selectors. param: {string} append The string to append. |
getBlockGapCSS(selector, layoutDefinitions = LAYOUT_DEFINITIONS, layoutType, blockGapValue) X-Ref |
Get generated blockGap CSS rules based on layout definitions provided in theme.json Falsy values in the layout definition's spacingStyles rules will be swapped out with the provided `blockGapValue`. return: {string} The generated CSS rules. param: {string} selector The CSS selector to target for the generated rules. param: {Object} layoutDefinitions Layout definitions object. param: {string} layoutType The layout type (e.g. `default` or `flex`). param: {string} blockGapValue The current blockGap value to be applied. |
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. return: {Object} An object with contextual info per alignment. param: {Object} layout The layout object. |
isValueSpacingPreset(value) X-Ref |
Checks is given value is a spacing preset. return: {boolean} Return true if value is string in format var:preset|spacing|. param: {string} value Value to check |
getCustomValueFromPreset(value, spacingSizes) X-Ref |
Converts a spacing preset into a custom value. return: {string} Mapping of the spacing preset to its equivalent custom value. param: {string} value Value to convert param: {Array} spacingSizes Array of the current spacing preset objects |
getPresetValueFromCustomValue(value, spacingSizes) X-Ref |
Converts a custom value to preset value if one can be found. Returns value as-is if no match is found. return: {string} The preset value if it can be found. param: {string} value Value to convert param: {Array} spacingSizes Array of the current spacing preset objects |
getSpacingPresetCssVar(value) X-Ref |
Converts a spacing preset into a custom value. return: {string | undefined} CSS var string for given spacing preset value. param: {string} value Value to convert. |
getSpacingPresetSlug(value) X-Ref |
Returns the slug section of the given spacing preset string. return: {string|undefined} The int value of the slug from given spacing preset. param: {string} value Value to extract slug from. |
getSliderValueFromPreset(presetValue, spacingSizes) X-Ref |
Converts spacing preset value into a Range component value . return: {number} The int value for use in Range control. param: {string} presetValue Value to convert to Range value. param: {Array} spacingSizes Array of current spacing preset value objects. |
mode(arr) X-Ref |
Gets an items with the most occurrence within an array https://stackoverflow.com/a/20762713 return: {any} The item with the most occurrences. param: {Array<any>} arr Array of items to check. |
getAllRawValue(values = {}) X-Ref |
Gets the 'all' input value from values data. return: {string} The most common value from all sides of box. param: {Object} values Box spacing values |
isValuesMixed(values = {}, sides = ALL_SIDES) X-Ref |
Checks to determine if values are mixed. return: {boolean} Whether values are mixed. param: {Object} values Box values. param: {Array} sides Sides that values relate to. |
isValuesDefined(values) X-Ref |
Checks to determine if values are defined. return: {boolean} Whether values are defined. param: {Object} values Box values. |
hasAxisSupport(sides, axis) X-Ref |
Determines whether a particular axis has support. If no axis is specified, this function checks if either axis is supported. return: {boolean} Whether there is support for the specified axis or both axes. param: {Array} sides Supported sides. param: {string} axis Which axis to check. |
getSupportedMenuItems(sides) X-Ref |
Determines which menu options should be included in the SidePicker. return: {Object} Menu options with each option containing label & icon. param: {Array} sides Supported sides. |
hasBalancedSidesSupport(sides = []) X-Ref |
Checks if the supported sides are balanced for each axis. - Horizontal - both left and right sides are supported. - Vertical - both top and bottom are supported. return: {boolean} Whether or not the supported sides are balanced. param: {Array} sides The supported sides which may be axes as well. |
getInitialView(values = {}, sides) X-Ref |
Determines which view the SpacingSizesControl should default to on its first render; Axial, Custom, or Single side. return: {string} View to display. param: {Object} values Current side values. param: {Array} sides Supported sides. |
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. return: {Object|null} A value to pass to the BoxControl component. param: {string? | Object?} blockGapValue A block gap string or axial object value, e.g., '10px' or { top: '10px', left: '10px'}. |
getGapCSSValue(blockGapValue, defaultValue = '0') X-Ref |
Returns a CSS value for the `gap` property from a given blockGap style. return: {string|null} The concatenated gap value (row and column). 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. |
BlockVerticalAlignmentUI({value,onChange,controls = DEFAULT_CONTROLS,isCollapsed = true,isToolbar}) X-Ref |
No description |
applyOrUnset(align) X-Ref |
No description |
JustifyContentUI({allowedControls = ['left', 'center', 'right', 'space-between'],isCollapsed = true,onChange,value,popoverProps,isToolbar}) X-Ref |
No description |
FlexLayoutVerticalAlignmentControl({layout,onChange}) X-Ref |
No description |
FlexLayoutJustifyContentControl({layout,onChange,isToolbar = false}) X-Ref |
No description |
FlexWrapControl({layout,onChange}) X-Ref |
No description |
OrientationControl({layout,onChange}) X-Ref |
No description |
Icon({icon,size = 24,...props}, ref) X-Ref |
Return an SVG icon. return: {JSX.Element} Icon component param: {IconProps} props icon is the SVG component to render param: {import('react').ForwardedRef<HTMLElement>} ref The forwarded ref to the SVG element. |
DefaultLayoutJustifyContentControl({layout,onChange}) X-Ref |
No description |
GridLayoutMinimumWidthControl({layout,onChange}) X-Ref |
No description |
GridLayoutColumnsAndRowsControl({layout,onChange,allowSizingOnChildren}) X-Ref |
No description |
GridLayoutTypeControl({layout,onChange}) X-Ref |
No description |
getLayoutType(name = 'default') X-Ref |
Retrieves a layout type by name. return: {Object} Layout type. param: {string} name - The name of the 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({layout = {},css,...props}) X-Ref |
No description |
useAvailableAlignments(controls = use_available_alignments_DEFAULT_CONTROLS) X-Ref |
No description |
BlockAlignmentUI({value,onChange,controls,isToolbar,isCollapsed = true}) X-Ref |
No description |
onChangeAlignment(align) X-Ref |
No description |
useBlockEditingMode(mode) X-Ref |
Allows a block to restrict the user interface that is displayed for editing that block and its inner blocks. return: {BlockEditingMode} The current editing mode. param: {?BlockEditingMode} mode The editing mode to apply. If undefined, the |
getValidAlignments(blockAlign, hasWideBlockSupport = true, hasWideEnabled = true) X-Ref |
Returns the valid alignments. Takes into consideration the aligns supported by a block, if the block supports wide controls or not and if theme supports wide controls or not. Exported just for testing purposes, not exported outside the module. return: {string[]} Valid alignments. param: {?boolean|string[]} blockAlign Aligns supported by the block. param: {?boolean} hasWideBlockSupport True if block supports wide alignments. And False otherwise. param: {?boolean} hasWideEnabled True if theme supports wide alignments. And False otherwise. |
addAttribute(settings) X-Ref |
Filters registered block settings, extending attributes to include `align`. return: {Object} Filtered block settings. param: {Object} settings Original block settings. |
BlockEditAlignmentToolbarControlsPure({name: blockName,align,setAttributes}) X-Ref |
No description |
useBlockProps({name,align}) X-Ref |
No description |
addAssignedAlign(props, blockType, attributes) X-Ref |
Override props assigned to save component to inject alignment class name if block supports it. return: {Object} Filtered props applied to save element. param: {Object} props Additional props applied to save element. param: {Object} blockType Block type. param: {Object} attributes Block attributes. |
InspectorControlsFill({children,group = 'default',__experimentalGroup,resetAllFilter}) X-Ref |
No description |
RegisterResetAll({resetAllFilter,children}) X-Ref |
No description |
ToolsPanelInspectorControl({children,resetAllFilter,fillProps}) X-Ref |
No description |
BlockSupportToolsPanel({children,group,label}) X-Ref |
No description |
BlockSupportSlotContainer({Slot,fillProps,...props}) X-Ref |
No description |
InspectorControlsSlot({__experimentalGroup,group = 'default',label,fillProps,...props}) X-Ref |
No description |
MediaUploadCheck({fallback = null,children}) X-Ref |
Internal dependencies |
LinkSettingsDrawer({children,settingsOpen,setSettingsOpen}) X-Ref |
No description |
isFunction(maybeFunc) X-Ref |
No description |
SearchItemIcon({isURL,suggestion}) X-Ref |
No description |
addLeadingSlash(url) X-Ref |
Adds a leading slash to a url if it doesn't already have one. return: {string} the url with a leading slash. param: {string} url the url to add a leading slash to. |
removeTrailingSlash(url) X-Ref |
No description |
getURLForDisplay(url) X-Ref |
Prepares a URL for display in the UI. - decodes the URL. - filters it (removes protocol, www, etc.). - truncates it if necessary. - adds a leading slash. return: {string} the processed url to display. param: {string} url the url. |
getVisualTypeName(suggestion) X-Ref |
No description |
LinkControlSearchResults({instanceId,withCreateSuggestion,currentInputValue,handleSuggestionClick,suggestionsListProps,buildSuggestionItemProps,suggestions,selectedSuggestion,isLoading,isInitialSuggestions,createSuggestionButtonText,suggestionsQuery}) X-Ref |
No description |
isURLLike(val) X-Ref |
Determines whether a given value could be a URL. Note this does not guarantee the value is a URL only that it looks like it might be one. For example, just because a string has `www.` in it doesn't make it a URL, but it does make it highly likely that it will be so in the context of creating a link it makes sense to treat it like one. return: {boolean} whether or not the value is potentially a URL. param: {string} val the candidate for being URL-like (or not). |
hasPossibleTLD(url, maxLength = 6) X-Ref |
Checks if a given URL has a valid Top-Level Domain (TLD). return: {boolean} Returns true if the URL has a valid TLD, false otherwise. param: {string} url - The URL to check. param: {number} maxLength - The maximum length of the TLD. |
useSearchHandler(suggestionsQuery, allowDirectEntry, withCreateSuggestion) X-Ref |
No description |
use_rich_url_data_reducer(state, action) X-Ref |
WordPress dependencies |
useRemoteUrlData(url) X-Ref |
No description |
filterTitleForDisplay(title) X-Ref |
No description |
LinkPreview({value,onEditClick,hasRichPreviews = false,hasUnlinkControl = false,onRemove}) X-Ref |
No description |
useCreatePage(handleCreatePage) X-Ref |
WordPress dependencies |
useInternalValue(value) X-Ref |
External dependencies |
LinkControl({searchInputPlaceholder,value,settings = DEFAULT_LINK_SETTINGS,onChange = link_control_noop,onRemove,onCancel,noDirectEntry = false,showSuggestions = true,showInitialSuggestions,forceIsEditingLink,createSuggestion,withCreateSuggestion,inputValue: propInputValue = '',suggestionsQuery = {},noURLSuggestion = false,createSuggestionButtonText,hasRichPreviews = false,hasTextControl = false,renderControlBottom = null}) 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. |
backgroundSizeHelpText(value) X-Ref |
Get the help text for the background size control. return: {string} Translated help text. param: {string} value backgroundSize value. |
InspectorImagePreviewItem({as = 'span',imgUrl,toggleProps = {},filename,label,className,onToggleCallback = background_image_control_noop}) X-Ref |
No description |
BackgroundControlsPanel({label,filename,url: imgUrl,children,onToggle: onToggleCallback = background_image_control_noop,hasImageValue}) X-Ref |
No description |
LoadingSpinner() X-Ref |
No description |
BackgroundImageControls({onChange,style,inheritedValue,onRemoveImage = background_image_control_noop,onResetImage = background_image_control_noop,displayInPanel,defaultValues}) X-Ref |
No description |
BackgroundSizeControls({onChange,style,inheritedValue,defaultValues}) X-Ref |
No description |
BackgroundImagePanel({value,onChange,inheritedValue = value,settings,defaultValues = {}}) X-Ref |
No description |
useHasBackgroundPanel(settings) X-Ref |
Checks site settings to see if the background panel may be used. `settings.background.backgroundSize` exists also, but can only be used if settings?.background?.backgroundImage is `true`. return: {boolean} Whether site settings has activated background panel. param: {Object} settings Site settings |
hasBackgroundSizeValue(style) X-Ref |
Checks if there is a current value in the background size block support attributes. Background size values include background size as well as background position. return: {boolean} Whether the block has a background size value set. param: {Object} style Style attribute. |
hasBackgroundImageValue(style) X-Ref |
Checks if there is a current value in the background image block support attributes. return: {boolean} Whether the block has a background image value set. param: {Object} style Style attribute. |
BackgroundToolsPanel({resetAllFilter,onChange,value,panelId,children,headerLabel}) X-Ref |
No description |
background_panel_BackgroundImagePanel({as: Wrapper = BackgroundToolsPanel,value,onChange,inheritedValue,settings,panelId,defaultControls = background_panel_DEFAULT_CONTROLS,defaultValues = {},headerLabel = (0,external_wp_i18n_namespaceObject.__) X-Ref |
No description |
hasBackgroundSupport(blockName, feature = 'any') X-Ref |
Determine whether there is block support for background. return: {boolean} Whether there is support. param: {string} blockName Block name. param: {string} feature Background image feature to check for. |
setBackgroundStyleDefaults(backgroundStyle) X-Ref |
No description |
background_useBlockProps({name,style}) X-Ref |
No description |
getBackgroundImageClasses(style) X-Ref |
Generates a CSS class name if an background image is set. return: {string} CSS class name. param: {Object} style A block's style attribute. |
BackgroundInspectorControl({children}) X-Ref |
No description |
background_BackgroundImagePanel({clientId,name,setAttributes,settings}) X-Ref |
No description |
lock_addAttribute(settings) X-Ref |
Filters registered block settings, extending attributes to include `lock`. return: {Object} Filtered block settings. param: {Object} settings Original block settings. |
anchor_addAttribute(settings) X-Ref |
Filters registered block settings, extending attributes with anchor using ID of the first node. return: {Object} Filtered block settings. param: {Object} settings Original block settings. |
BlockEditAnchorControlPure({anchor,setAttributes}) X-Ref |
No description |
addSaveProps(extraProps, blockType, attributes) X-Ref |
Override props assigned to save component to inject anchor ID, if block supports anchor. This is only applied if the block's save result is an element and not a markup string. return: {Object} Filtered props applied to save element. param: {Object} extraProps Additional props applied to save element. param: {Object} blockType Block type. param: {Object} attributes Current block attributes. |
aria_label_addAttribute(settings) X-Ref |
Filters registered block settings, extending attributes with ariaLabel using aria-label of the first node. return: {Object} Filtered block settings. param: {Object} settings Original block settings. |
aria_label_addSaveProps(extraProps, blockType, attributes) X-Ref |
Override props assigned to save component to inject aria-label, if block supports ariaLabel. This is only applied if the block's save result is an element and not a markup string. return: {Object} Filtered props applied to save element. param: {Object} extraProps Additional props applied to save element. param: {Object} blockType Block type. param: {Object} attributes Current block attributes. |
custom_class_name_addAttribute(settings) X-Ref |
Filters registered block settings, extending attributes to include `className`. return: {Object} Filtered block settings. param: {Object} settings Original block settings. |
CustomClassNameControlsPure({className,setAttributes}) X-Ref |
No description |
custom_class_name_addSaveProps(extraProps, blockType, attributes) X-Ref |
Override props assigned to save component to inject the className, if block supports customClassName. This is only applied if the block's save result is an element and not a markup string. return: {Object} Filtered props applied to save element. param: {Object} extraProps Additional props applied to save element. param: {Object} blockType Block type. param: {Object} attributes Current block attributes. |
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. return: {Object} Filtered props applied to save element. param: {Object} extraProps Additional props applied to save element. param: {Object} blockType Block type. |
names(e,f) X-Ref |
No description |
getColorClassName(colorContextName, colorSlug) X-Ref |
Returns a class based on the context a color is being used and its slug. return: {?string} String with the class corresponding to the color in the provided context. param: {string} colorContextName Context/place where color is being used e.g: background, text etc... param: {string} colorSlug Slug of the color. |
getMostReadableColor(colors, colorValue) X-Ref |
Given an array of color objects and a color value returns the color value of the most readable color in the array. return: {string} String with the color value of the most readable color. param: {Array} colors Array of color objects as set by the theme or by the editor defaults. param: {?string} colorValue A string containing the color value. |
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. |
utils_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 return: {any} The item with the most occurrences. param: {Array<any>} inputArray Array of items to check. |
getAllUnit(selectedUnits = {}) X-Ref |
Returns the most common CSS unit from the current CSS unit selections. - If a single flat border radius is set, its unit will be used - If individual corner selections, the most common of those will be used - Failing any unit selections a default of 'px' is returned. return: {string} Most common CSS unit from current selections. Default: `px`. param: {Object} selectedUnits Unit selections for flat radius & each corner. |
getAllValue(values = {}) X-Ref |
Gets the 'all' input value and unit from values data. return: {string} A value + unit for the 'all' input. param: {Object|string} values Radius values. |
hasMixedValues(values = {}) X-Ref |
Checks to determine if values are mixed. return: {boolean} Whether values are mixed. param: {Object} values Radius values. |
hasDefinedValues(values) X-Ref |
Checks to determine if values are defined. return: {boolean} Whether values are mixed. param: {Object} values Radius values. |
AllInputControl({onChange,selectedUnits,setSelectedUnits,values,...props}) X-Ref |
Internal dependencies |
BoxInputControls({onChange,selectedUnits,setSelectedUnits,values: valuesProp,...props}) X-Ref |
No description |
LinkedButton({isLinked,...props}) X-Ref |
No description |
BorderRadiusControl({onChange,values}) X-Ref |
Control to display border radius options. return: {Element} Custom border radius control. param: {Object} props Component props. param: {Function} props.onChange Callback to handle onChange. param: {Object} props.values Border radius values. |
ShadowPopoverContainer({shadow,onShadowChange,settings}) X-Ref |
No description |
ShadowPresets({presets,activeShadow,onSelect}) X-Ref |
No description |
ShadowIndicator({type,label,isActive,onSelect,shadow}) X-Ref |
No description |
ShadowPopover({shadow,onShadowChange,settings}) X-Ref |
No description |
renderShadowToggle() X-Ref |
No description |
useShadowPresets(settings) X-Ref |
No description |
useHasBorderPanel(settings) X-Ref |
No description |
useHasBorderPanelControls(settings) X-Ref |
No description |
useHasBorderColorControl(settings) X-Ref |
No description |
useHasBorderRadiusControl(settings) X-Ref |
No description |
useHasBorderStyleControl(settings) X-Ref |
No description |
useHasBorderWidthControl(settings) X-Ref |
No description |
useHasShadowControl(settings) X-Ref |
No description |
BorderToolsPanel({resetAllFilter,onChange,value,panelId,children,label}) X-Ref |
No description |
BorderPanel({as: Wrapper = BorderToolsPanel,value,onChange,inheritedValue = value,settings,panelId,name,defaultControls = border_panel_DEFAULT_CONTROLS}) X-Ref |
No description |
getColorSlugFromVariable(value) X-Ref |
No description |
styleToAttributes(style) X-Ref |
No description |
attributesToStyle(attributes) X-Ref |
No description |
BordersInspectorControl({label,children,resetAllFilter}) X-Ref |
No description |
border_BorderPanel({clientId,name,setAttributes,settings}) X-Ref |
No description |
selector(select) X-Ref |
No description |
hasBorderSupport(blockName, feature = 'any') X-Ref |
Determine whether there is block support for border properties. return: {boolean} Whether there is support. param: {string} blockName Block name. param: {string} feature Border feature to check support for. |
hasShadowSupport(blockName) X-Ref |
Determine whether there is block support for shadow properties. return: {boolean} Whether there is support. param: {string} blockName Block name. |
useBorderPanelLabel({blockName,hasBorderControl,hasShadowControl} = {}) X-Ref |
No description |
removeBorderAttribute(style, attribute) X-Ref |
Returns a new style object where the specified border attribute has been removed. return: {Object} Style object with the specified attribute removed. param: {Object} style Styles from block attributes. param: {string} attribute The border style attribute to clear. |
addAttributes(settings) X-Ref |
Filters registered block settings, extending attributes to include `borderColor` if needed. return: {Object} Updated block settings. param: {Object} settings Original block settings. |
border_addSaveProps(props, blockNameOrType, attributes) X-Ref |
Override props assigned to save component to inject border color. return: {Object} Filtered props to apply to save element. param: {Object} props Additional props applied to save element. param: {Object|string} blockNameOrType Block type definition. param: {Object} attributes Block's attributes. |
getBorderClasses(attributes) X-Ref |
Generates a CSS class name consisting of all the applicable border color classes given the current block attributes. return: {string} CSS class name. param: {Object} attributes Block's attributes. |
border_useBlockProps({name,borderColor,style}) X-Ref |
No description |
__experimentalGetGradientClass(gradientSlug) X-Ref |
No description |
getGradientValueBySlug(gradients, slug) X-Ref |
Retrieves the gradient value per slug. return: {string} Gradient value. param: {Array} gradients Gradient Palette param: {string} slug Gradient slug |
__experimentalGetGradientObjectByGradientValue(gradients, value) X-Ref |
No description |
getGradientSlugByValue(gradients, value) X-Ref |
Retrieves the gradient slug per slug. return: {string} Gradient slug. param: {Array} gradients Gradient Palette param: {string} value Gradient value |
__experimentalUseGradient({gradientAttribute = 'gradient',customGradientAttribute = 'customGradient'} = {}) X-Ref |
No description |
ColorGradientControlInner({colors,gradients,disableCustomColors,disableCustomGradients,__experimentalIsRenderedInSidebar,className,label,onColorChange,onGradientChange,colorValue,gradientValue,clearable,showTitle = true,enableAlpha,headingLevel}) X-Ref |
No description |
ColorGradientControlSelect(props) X-Ref |
No description |
ColorGradientControl(props) X-Ref |
No description |
useHasColorPanel(settings) X-Ref |
No description |
useHasTextPanel(settings) X-Ref |
No description |
useHasLinkPanel(settings) X-Ref |
No description |
useHasCaptionPanel(settings) X-Ref |
No description |
useHasHeadingPanel(settings) X-Ref |
No description |
useHasButtonPanel(settings) X-Ref |
No description |
useHasBackgroundColorPanel(settings) X-Ref |
No description |
ColorToolsPanel({resetAllFilter,onChange,value,panelId,children}) X-Ref |
No description |
ColorPanelTab({isGradient,inheritedValue,userValue,setValue,colorGradientControlSettings}) X-Ref |
No description |
ColorPanelDropdown({label,hasValue,resetValue,isShownByDefault,indicators,tabs,colorGradientControlSettings,panelId}) X-Ref |
No description |
ColorPanel({as: Wrapper = ColorToolsPanel,value,onChange,inheritedValue = value,settings,panelId,defaultControls = color_panel_DEFAULT_CONTROLS,children}) X-Ref |
No description |
ContrastChecker({backgroundColor,fallbackBackgroundColor,fallbackTextColor,fallbackLinkColor,fontSize,isLargeText,textColor,linkColor,enableAlphaChecker = false}) X-Ref |
No description |
BlockRefsProvider({children}) X-Ref |
No description |
useBlockRefProvider(clientId) X-Ref |
Provides a ref to the BlockRefs context. return: {RefCallback} Ref callback. param: {string} clientId The client ID of the element ref. |
assignRef(ref, value) X-Ref |
No description |
useBlockElementRef(clientId, ref) X-Ref |
Tracks the DOM element for the block identified by `clientId` and assigns it to the `ref` whenever it changes. param: {string} clientId The client ID to track. param: {Ref} ref The ref object/callback to assign to. |
useBlockElement(clientId) X-Ref |
Return the element for a given client ID. Updates whenever the element changes, becomes available, or disappears. return: {Element|null} The block's wrapper element. param: {string} clientId The client ID to an element for. |
getComputedStyle(node) X-Ref |
No description |
BlockColorContrastChecker({clientId}) X-Ref |
No description |
color_addAttributes(settings) X-Ref |
Filters registered block settings, extending attributes to include `backgroundColor` and `textColor` attribute. return: {Object} Filtered block settings. param: {Object} settings Original block settings. |
color_addSaveProps(props, blockNameOrType, attributes) X-Ref |
Override props assigned to save component to inject colors classnames. return: {Object} Filtered props applied to save element. param: {Object} props Additional props applied to save element. param: {Object|string} blockNameOrType Block type. param: {Object} attributes Block attributes. |
color_styleToAttributes(style) X-Ref |
No description |
color_attributesToStyle(attributes) X-Ref |
No description |
ColorInspectorControl({children,resetAllFilter}) X-Ref |
No description |
ColorEdit({clientId,name,setAttributes,settings}) X-Ref |
No description |
selector(select) X-Ref |
No description |
color_useBlockProps({name,backgroundColor,textColor,gradient,style}) X-Ref |
No description |
color_addTransforms(result, source, index, results) X-Ref |
No description |
FontFamilyControl({__next40pxDefaultSize = false,__nextHasNoMarginBottom = false,value = '',onChange,fontFamilies,...props}) X-Ref |
Internal dependencies |
FontAppearanceControl(props) X-Ref |
Control to display font style and weight options of the active font. return: {Element} Font appearance control. param: {Object} props Component props. |
isLineHeightDefined(lineHeight) X-Ref |
Determines if the lineHeight attribute has been properly defined. return: {boolean} Whether the lineHeight attribute is valid. param: {any} lineHeight The value to check. |
LetterSpacingControl({__next40pxDefaultSize = false,value,onChange,__unstableInputWidth = '60px',...otherProps}) X-Ref |
Control for letter-spacing. return: {Element} Letter-spacing control. param: {Object} props Component props. param: {boolean} props.__next40pxDefaultSize Start opting into the larger default height that will become the default size in a future version. 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. |
TextAlignmentControl({className,value,onChange,options = DEFAULT_OPTIONS}) X-Ref |
Control to facilitate text alignment selections. return: {Element} Text alignment control. param: {Object} props Component props. param: {string} props.className Class name to add to the control. param: {string} props.value Currently selected text alignment. param: {Function} props.onChange Handles change in text alignment selection. param: {string[]} props.options Array of text alignment options to display. |
TextTransformControl({className,value,onChange}) X-Ref |
Control to facilitate text transform selections. return: {Element} Text transform control. param: {Object} props Component props. param: {string} props.className Class name to add to the control. param: {string} props.value Currently selected text transform. param: {Function} props.onChange Handles change in text transform selection. |
TextDecorationControl({value,onChange,className}) X-Ref |
Control to facilitate text decoration selections. return: {Element} Text decoration control. param: {Object} props Component props. param: {string} props.value Currently selected text decoration. param: {Function} props.onChange Handles change in text decoration selection. param: {string} props.className Additional class name to apply. |
WritingModeControl({className,value,onChange}) X-Ref |
Control to facilitate writing mode selections. return: {Element} Writing Mode control. param: {Object} props Component props. param: {string} props.className Class name to add to the control. param: {string} props.value Currently selected writing mode. param: {Function} props.onChange Handles change in the writing mode selection. |
useHasTypographyPanel(settings) X-Ref |
No description |
useHasFontSizeControl(settings) X-Ref |
No description |
useHasFontFamilyControl(settings) X-Ref |
No description |
useHasLineHeightControl(settings) X-Ref |
No description |
useHasAppearanceControl(settings) X-Ref |
No description |
useAppearanceControlLabel(settings) X-Ref |
No description |
useHasLetterSpacingControl(settings) X-Ref |
No description |
useHasTextTransformControl(settings) X-Ref |
No description |
useHasTextAlignmentControl(settings) X-Ref |
No description |
useHasTextDecorationControl(settings) X-Ref |
No description |
useHasWritingModeControl(settings) X-Ref |
No description |
useHasTextColumnsControl(settings) X-Ref |
No description |
getMergedFontSizes(settings) X-Ref |
Concatenate all the font sizes into a single list for the font size picker. return: {Array} The merged font sizes. param: {Object} settings The global styles settings. |
TypographyToolsPanel({resetAllFilter,onChange,value,panelId,children}) X-Ref |
No description |
TypographyPanel({as: Wrapper = TypographyToolsPanel,value,onChange,inheritedValue = value,settings,panelId,defaultControls = typography_panel_DEFAULT_CONTROLS}) X-Ref |
No description |
LineHeightEdit(props) X-Ref |
Inspector control panel containing the line height related configuration return: {Element} Line height edit element. param: {Object} props |
useIsLineHeightDisabled({name: blockName} = {}) X-Ref |
Custom hook that checks if line-height settings have been disabled. return: {boolean} Whether setting is disabled. param: {string} name The name of the block. |
font_family_addAttributes(settings) X-Ref |
Filters registered block settings, extending attributes to include the `fontFamily` attribute. return: {Object} Filtered block settings param: {Object} settings Original block settings |
font_family_addSaveProps(props, blockType, attributes) X-Ref |
Override props assigned to save component to inject font family. return: {Object} Filtered props applied to save element param: {Object} props Additional props applied to save element param: {Object} blockType Block type param: {Object} attributes Block attributes |
font_family_useBlockProps({name,fontFamily}) X-Ref |
No description |
resetFontFamily({setAttributes}) 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. |
utils_getFontSizeObjectByValue(fontSizes, value) X-Ref |
Returns the corresponding font size object for a given value. return: {Object} Font size object. param: {Array} fontSizes Array of font size objects. param: {number} value Font size value. |
getFontSizeClass(fontSizeSlug) X-Ref |
Returns a class based on fontSizeName. return: {string | undefined} String with the class corresponding to the fontSize passed. param: {string} fontSizeSlug Slug of the fontSize. |
font_size_addAttributes(settings) X-Ref |
Filters registered block settings, extending attributes to include `fontSize` and `fontWeight` attributes. return: {Object} Filtered block settings. param: {Object} settings Original block settings. |
font_size_addSaveProps(props, blockNameOrType, attributes) X-Ref |
Override props assigned to save component to inject font size. return: {Object} Filtered props applied to save element. param: {Object} props Additional props applied to save element. param: {Object} blockNameOrType Block type. param: {Object} attributes Block attributes. |
FontSizeEdit(props) X-Ref |
Inspector control panel containing the font size related configuration return: {Element} Font size edit element. param: {Object} props |
useIsFontSizeDisabled({name: blockName} = {}) X-Ref |
Custom hook that checks if font-size settings have been disabled. return: {boolean} Whether setting is disabled. param: {string} name The name of the block. |
font_size_useBlockProps({name,fontSize,style}) X-Ref |
No description |
font_size_addTransforms(result, source, index, results) X-Ref |
No description |
AlignmentUI({value,onChange,alignmentControls = DEFAULT_ALIGNMENT_CONTROLS,label = (0,external_wp_i18n_namespaceObject.__) X-Ref |
No description |
applyOrUnset(align) X-Ref |
No description |
setIcon() X-Ref |
No description |
getValidTextAlignments(blockTextAlign) X-Ref |
Returns the valid text alignments. Takes into consideration the text aligns supported by a block. Exported just for testing purposes, not exported outside the module. return: {string[]} Valid text alignments. param: {?boolean|string[]} blockTextAlign Text aligns supported by the block. |
BlockEditTextAlignmentToolbarControlsPure({style,name: blockName,setAttributes}) X-Ref |
No description |
text_align_useBlockProps({name,style}) X-Ref |
No description |
addAssignedTextAlign(props, blockType, attributes) X-Ref |
Override props assigned to save component to inject text alignment class name if block supports it. return: {Object} Filtered props applied to save element. param: {Object} props Additional props applied to save element. param: {Object} blockType Block type. param: {Object} attributes Block attributes. |
omit(object, keys) X-Ref |
No description |
typography_styleToAttributes(style) X-Ref |
No description |
typography_attributesToStyle(attributes) X-Ref |
No description |
TypographyInspectorControl({children,resetAllFilter}) X-Ref |
No description |
typography_TypographyPanel({clientId,name,setAttributes,settings}) X-Ref |
No description |
selector(select) X-Ref |
No description |
SpacingInputControl({icon,isMixed = false,minimumCustomValue,onChange,onMouseOut,onMouseOver,showSideInLabel = true,side,spacingSizes,type,value}) X-Ref |
No description |
AxialInputControls({minimumCustomValue,onChange,onMouseOut,onMouseOver,sides,spacingSizes,type,values}) X-Ref |
No description |
SeparatedInputControls({minimumCustomValue,onChange,onMouseOut,onMouseOver,sides,spacingSizes,type,values}) X-Ref |
No description |
SingleInputControl({minimumCustomValue,onChange,onMouseOut,onMouseOver,showSideInLabel,side,spacingSizes,type,values}) X-Ref |
No description |
linked_button_LinkedButton({isLinked,...props}) X-Ref |
No description |
useSpacingSizes() X-Ref |
No description |
SpacingSizesControl({inputProps,label: labelProp,minimumCustomValue = 0,onChange,onMouseOut,onMouseOver,showSideInLabel = true,sides = ALL_SIDES,useSelect,values}) X-Ref |
No description |
HeightControl({label = (0,external_wp_i18n_namespaceObject.__) X-Ref |
HeightControl renders a linked unit control and range control for adjusting the height of a block. return: {Component} The component to be rendered. param: {Object} props param: {?string} props.label A label for the control. param: {( value: string ) => void } props.onChange Called when the height changes. param: {string} props.value The current height value. |
useGetNumberOfBlocksBeforeCell(gridClientId, numColumns) X-Ref |
Internal dependencies |
helpText(selfStretch, parentLayout) X-Ref |
No description |
ChildLayoutControl({value: childLayout = {},onChange,parentLayout,isShownByDefault,panelId}) X-Ref |
Form to edit the child layout value. return: {Element} child layout edit element. param: {Object} props Props. param: {Object} props.value The child layout value. param: {Function} props.onChange Function to update the child layout value. param: {Object} props.parentLayout The parent layout value. param: {boolean} props.isShownByDefault param: {string} props.panelId |
FlexControls({childLayout,onChange,parentLayout,isShownByDefault,panelId}) X-Ref |
No description |
childLayoutOrientation(parentLayout) X-Ref |
No description |
GridControls({childLayout,onChange,parentLayout,isShownByDefault,panelId}) X-Ref |
No description |
AspectRatioTool({panelId,value,onChange = () X-Ref |
useHasDimensionsPanel(settings) X-Ref |
No description |
useHasContentSize(settings) X-Ref |
No description |
useHasWideSize(settings) X-Ref |
No description |
useHasPadding(settings) X-Ref |
No description |
useHasMargin(settings) X-Ref |
No description |
useHasGap(settings) X-Ref |
No description |
useHasMinHeight(settings) X-Ref |
No description |
useHasAspectRatio(settings) X-Ref |
No description |
useHasChildLayout(settings) X-Ref |
No description |
useHasSpacingPresets(settings) X-Ref |
No description |
filterValuesBySides(values, sides) X-Ref |
No description |
splitStyleValue(value) X-Ref |
No description |
splitGapValue(value) X-Ref |
No description |
DimensionsToolsPanel({resetAllFilter,onChange,value,panelId,children}) X-Ref |
No description |
DimensionsPanel({as: Wrapper = DimensionsToolsPanel,value,onChange,inheritedValue = value,settings,panelId,defaultControls = dimensions_panel_DEFAULT_CONTROLS,onVisualize = () 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 |
isInSameBlock(a, b) X-Ref |
Returns true if two elements are contained within the same block. return: {boolean} Whether elements are in the same block. param: {Element} a First element. param: {Element} b Second element. |
isInsideRootBlock(blockElement, element) X-Ref |
Returns true if an element is considered part of the block and not its inner blocks or appender. return: {boolean} Whether an element is considered part of the block and not param: {Element} blockElement Block container element. param: {Element} element Element. |
getBlockClientId(node) X-Ref |
Finds the block client ID given any DOM node inside the block. return: {string|undefined} Client ID or undefined if the node is not part of param: {Node?} node DOM node. |
rectUnion(rect1, rect2) X-Ref |
Calculates the union of two rectangles. return: {DOMRect} Union of the two rectangles. param: {DOMRect} rect1 First rectangle. param: {DOMRect} rect2 Second rectangle. |
isElementVisible(element) X-Ref |
Returns whether an element is visible. return: {boolean} Whether the element is visible. param: {Element} element Element. |
isScrollable(element) X-Ref |
Checks if the element is scrollable. return: {boolean} True if the element is scrollable. param: {Element} element Element. |
getElementBounds(element) X-Ref |
Returns the bounding rectangle of an element, with special handling for blocks that have visible overflowing children (defined in WITH_OVERFLOW_ELEMENT_BLOCKS). For blocks like Navigation that can have overflowing elements (e.g. submenus), this function calculates the combined bounds of both the parent and its visible children. The returned rect may extend beyond the viewport. The returned rect represents the full extent of the element and its visible children, which may extend beyond the viewport. return: {DOMRect} Bounding client rect of the element and its visible children. param: {Element} element Element. |
BlockPopover({clientId,bottomClientId,children,__unstablePopoverSlot,__unstableContentRef,shift = true,...props}, ref) X-Ref |
No description |
BlockPopoverCover({clientId,bottomClientId,children,shift = false,additionalStyles,...props}, ref) X-Ref |
No description |
CoverContainer({selectedElement,additionalStyles = {},children}) X-Ref |
No description |
SpacingVisualizer({clientId,value,computeStyle,forceShow}) X-Ref |
No description |
getComputedCSS(element, property) X-Ref |
No description |
MarginVisualizer({clientId,value,forceShow}) X-Ref |
No description |
PaddingVisualizer({clientId,value,forceShow}) X-Ref |
No description |
useVisualizer() X-Ref |
No description |
DimensionsInspectorControl({children,resetAllFilter}) X-Ref |
No description |
dimensions_DimensionsPanel({clientId,name,setAttributes,settings}) X-Ref |
No description |
hasDimensionsSupport(blockName, feature = 'any') X-Ref |
Determine whether there is block support for dimensions. return: {boolean} Whether there is support. param: {string} blockName Block name. param: {string} feature Background image feature to check for. |
dimensions_useBlockProps({name,minHeight,style}) X-Ref |
No description |
useCustomSides() X-Ref |
getInlineStyles(styles = {}) X-Ref |
Returns the inline styles to add depending on the style object return: {Object} Flattened CSS variables declaration. param: {Object} styles Styles configuration. |
style_addAttribute(settings) X-Ref |
Filters registered block settings, extending attributes to include `style` attribute. return: {Object} Filtered block settings. param: {Object} settings Original block settings. |
omitStyle(style, paths, preserveReference = false) X-Ref |
A utility function used to remove one or more paths from a style object. Works in a way similar to Lodash's `omit()`. See unit tests and examples below. It supports a single string path: ``` omitStyle( { color: 'red' }, 'color' ); // {} ``` or an array of paths: ``` omitStyle( { color: 'red', background: '#fff' }, [ 'color', 'background' ] ); // {} ``` It also allows you to specify paths at multiple levels in a string. ``` omitStyle( { typography: { textDecoration: 'underline' } }, 'typography.textDecoration' ); // {} ``` You can remove multiple paths at the same time: ``` omitStyle( { typography: { textDecoration: 'underline', textTransform: 'uppercase', } }, [ 'typography.textDecoration', 'typography.textTransform', ] ); // {} ``` You can also specify nested paths as arrays: ``` omitStyle( { typography: { textDecoration: 'underline', textTransform: 'uppercase', } }, [ [ 'typography', 'textDecoration' ], [ 'typography', 'textTransform' ], ] ); // {} ``` With regards to nesting of styles, infinite depth is supported: ``` omitStyle( { border: { radius: { topLeft: '10px', topRight: '0.5rem', } } }, [ [ 'border', 'radius', 'topRight' ], ] ); // { border: { radius: { topLeft: '10px' } } } ``` The third argument, `preserveReference`, defines how to treat the input style object. It is mostly necessary to properly handle mutation when recursively handling the style object. Defaulting to `false`, this will always create a new object, avoiding to mutate `style`. However, when recursing, we change that value to `true` in order to work with a single copy of the original style object. return: {Object} Styles object with the specified paths removed. param: {Object} style Styles object. param: {Array|string} paths Paths to remove. param: {boolean} preserveReference True to mutate the `style` object, false otherwise. |
style_addSaveProps(props, blockNameOrType, attributes, skipPaths = skipSerializationPathsSave) X-Ref |
Override props assigned to save component to inject the CSS variables definition. return: {Object} Filtered props applied to save element. param: {Object} props Additional props applied to save element. param: {Object|string} blockNameOrType Block type. param: {Object} attributes Block attributes. param: {?Record<string, string[]>} skipPaths An object of keys and paths to skip serialization. |
BlockStyleControls({clientId,name,setAttributes,__unstableParentLayout}) X-Ref |
No description |
style_useBlockProps({name,style}) X-Ref |
No description |
settings_addAttribute(settings) X-Ref |
No description |
DuotoneControl({id: idProp,colorPalette,duotonePalette,disableCustomColors,disableCustomDuotone,value,onChange}) X-Ref |
No description |
getValuesFromColors(colors = []) X-Ref |
Convert a list of colors to an object of R, G, and B values. return: {Object} R, G, and B values. param: {string[]} colors Array of RBG color strings. |
getDuotoneUnsetStylesheet(selector) X-Ref |
Stylesheet for disabling a global styles duotone filter. return: {string} Filter none style. param: {string} selector Selector to disable the filter for. |
getDuotoneStylesheet(selector, id) X-Ref |
SVG and stylesheet needed for rendering the duotone filter. return: {string} Duotone filter style. param: {string} selector Selector to apply the filter to. param: {string} id Unique id for this duotone filter. |
getDuotoneFilter(id, colors) X-Ref |
The SVG part of the duotone filter. return: {string} Duotone SVG. param: {string} id Unique id for this duotone filter. param: {string[]} colors Color strings from dark to light. |
getBlockCSSSelector(blockType, target = 'root', options = {}) X-Ref |
Determine the CSS selector for the block type and target provided, returning it if available. return: {?string} The CSS selector or `null` if no selector available. param: {import('@wordpress/blocks').Block} blockType The block's type. param: {string|string[]} target The desired selector's target e.g. `root`, delimited string, or array path. param: {Object} options Options object. param: {boolean} options.fallback Whether or not to fallback to broader selector. |
useMultiOriginColorPresets(settings, {presetSetting,defaultSetting}) X-Ref |
No description |
useHasFiltersPanel(settings) X-Ref |
No description |
useHasDuotoneControl(settings) X-Ref |
No description |
FiltersToolsPanel({resetAllFilter,onChange,value,panelId,children}) X-Ref |
No description |
FiltersPanel({as: Wrapper = FiltersToolsPanel,value,onChange,inheritedValue = value,settings,panelId,defaultControls = filters_panel_DEFAULT_CONTROLS}) X-Ref |
No description |
useMultiOriginPresets({presetSetting,defaultSetting}) X-Ref |
No description |
getColorsFromDuotonePreset(duotone, duotonePalette) X-Ref |
No description |
getDuotonePresetFromColors(colors, duotonePalette) X-Ref |
No description |
DuotonePanelPure({style,setAttributes,name}) X-Ref |
No description |
addDuotoneAttributes(settings) X-Ref |
Filters registered block settings, extending attributes to include the `duotone` attribute. return: {Object} Filtered block settings. param: {Object} settings Original block settings. |
useDuotoneStyles({clientId,id: filterId,selector: duotoneSelector,attribute: duotoneAttr}) X-Ref |
No description |
duotone_useBlockProps({clientId,name,style}) X-Ref |
No description |
getPositionTypeLabel(attributes) X-Ref |
Get the display label for a block's position type. return: {string} The position type label. param: {Object} attributes Block attributes. |
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 variation match cannot be found, the returned information come from the Block Type. If no blockType is found with the provided clientId, returns null. return: {?WPBlockDisplayInformation} Block's display information, or `null` when the block or its type not found. param: {string} clientId Block's client id. |
getPositionCSS({selector,style}) X-Ref |
Get calculated position CSS. return: {string} The generated CSS rules. param: {Object} props Component props. param: {string} props.selector Selector to use. param: {Object} props.style Style object. |
hasStickyPositionSupport(blockType) X-Ref |
Determines if there is sticky position support. return: {boolean} Whether there is support. param: {string|Object} blockType Block name or Block Type object. |
hasFixedPositionSupport(blockType) X-Ref |
Determines if there is fixed position support. return: {boolean} Whether there is support. param: {string|Object} blockType Block name or Block Type object. |
hasPositionSupport(blockType) X-Ref |
Determines if there is position support. return: {boolean} Whether there is support. param: {string|Object} blockType Block name or Block Type object. |
hasPositionValue(props) X-Ref |
Checks if there is a current value in the position block support attributes. return: {boolean} Whether or not the block has a position value set. param: {Object} props Block props. |
hasStickyOrFixedPositionValue(attributes) X-Ref |
Checks if the block is currently set to a sticky or fixed position. This check is helpful for determining how to position block toolbars or other elements. return: {boolean} Whether or not the block is set to a sticky or fixed position. param: {Object} attributes Block attributes. |
resetPosition({attributes = {},setAttributes}) X-Ref |
Resets the position block support attributes. This can be used when disabling the position 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. |
useIsPositionDisabled({name: blockName} = {}) X-Ref |
Custom hook that checks if position settings have been disabled. return: {boolean} Whether padding setting is disabled. param: {string} name The name of the block. |
PositionPanelPure({style = {},clientId,name: blockName,setAttributes}) X-Ref |
No description |
position_useBlockProps({name,style}) X-Ref |
No description |
getPresetsDeclarations(blockPresets = {}, mergedSettings) X-Ref |
Transform given preset tree into a set of style declarations. return: {Array<Object>} An array of style declarations. param: {Object} blockPresets param: {Object} mergedSettings Merged theme.json settings. |
getPresetsClasses(blockSelector = '*', blockPresets = {}) X-Ref |
Transform given preset tree into a set of preset class declarations. return: {string} CSS declarations for the preset classes. param: {?string} blockSelector param: {Object} blockPresets |
getPresetsSvgFilters(blockPresets = {}) X-Ref |
No description |
flattenTree(input = {}, prefix, token) X-Ref |
No description |
concatFeatureVariationSelectorString(featureSelector, styleVariationSelector) X-Ref |
Gets variation selector string from feature selector. return: {string} Combined selector string. param: {string} featureSelector The feature selector. param: {string} styleVariationSelector The style variation selector. |
getStylesDeclarations(blockStyles = {}, selector = '', useRootPaddingAlign, tree = {}, disableRootPadding = false) X-Ref |
Transform given style tree into a set of style declarations. return: {Array} An array of style declarations. param: {Object} blockStyles Block styles. param: {string} selector The selector these declarations should attach to. param: {boolean} useRootPaddingAlign Whether to use CSS custom properties in root selector. param: {Object} tree A theme.json tree containing layout definitions. param: {boolean} disableRootPadding Whether to force disable the root padding styles. |
getLayoutStyles({layoutDefinitions = LAYOUT_DEFINITIONS,style,selector,hasBlockGapSupport,hasFallbackGapSupport,fallbackGapValue}) X-Ref |
Get generated CSS for layout styles by looking up layout definitions provided in theme.json, and outputting common layout styles, and specific blockGap values. return: {string} Generated CSS rules for the layout styles. param: {Object} props param: {Object} props.layoutDefinitions Layout definitions, keyed by layout type. param: {Object} props.style A style object containing spacing values. param: {string} props.selector Selector used to group together layout styling rules. param: {boolean} props.hasBlockGapSupport Whether or not the theme opts-in to blockGap support. param: {boolean} props.hasFallbackGapSupport Whether or not the theme allows fallback gap styles. param: {?string} props.fallbackGapValue An optional fallback gap value if no real gap value is available. |
pickStyleKeys(treeToPickFrom) X-Ref |
No description |
toSvgFilters(tree, blockSelectors) X-Ref |
No description |
updateConfigWithSeparator(config) X-Ref |
If there is a separator block whose color is defined in theme.json via background, update the separator color to the same value by using border color. return: {Object} configTheme.json configuration file object updated. param: {Object} config Theme.json configuration file object. |
processCSSNesting(css, blockSelector) X-Ref |
No description |
useGlobalStylesOutputWithConfig(mergedConfig = {}, disableRootPadding) X-Ref |
Returns the global styles output using a global styles configuration. If wishing to generate global styles and settings based on the global styles config loaded in the editor context, use `useGlobalStylesOutput()`. The use case for a custom config is to generate bespoke styles and settings for previews, or other out-of-editor experiences. return: {Array} Array of stylesheets and settings. param: {Object} mergedConfig Global styles configuration. param: {boolean} disableRootPadding Disable root padding styles. |
useGlobalStylesOutput(disableRootPadding = false) X-Ref |
Returns the global styles output based on the current state of global styles config loaded in the editor context. return: {Array} Array of stylesheets and settings. param: {boolean} disableRootPadding Disable root padding styles. |
getVariationMatches(className) X-Ref |
No description |
getVariationNameFromClass(className, registeredStyles = []) X-Ref |
Get the first block style variation that has been registered from the class string. return: {string|null} The name of the first registered variation. param: {string} className CSS class string for a block. param: {Array} registeredStyles Currently registered block styles. |
OverrideStyles({override}) X-Ref |
No description |
__unstableBlockStyleVariationOverridesWithConfig({config}) X-Ref |
This component is used to generate new block style variation overrides based on an incoming theme config. If a matching style is found in the config, a new override is created and returned. The overrides can be used in conjunction with useStyleOverride to apply the new styles to the editor. Its use is subject to change. return: {JSX.Element|undefined} An array of new block variation overrides. param: {Object} props Props. param: {Object} props.config A global styles object, containing settings and styles. |
getVariationStylesWithRefValues(globalStyles, name, variation) X-Ref |
Retrieves any variation styles data and resolves any referenced values. return: {Object|undefined} The global styles data for the specified variation. param: {Object} globalStyles A complete global styles object, containing settings and styles. param: {string} name The name of the desired block type. param: {variation} variation The of the block style variation to retrieve data for. |
useBlockStyleVariation(name, variation, clientId) X-Ref |
No description |
block_style_variation_useBlockProps({name,className,clientId}) X-Ref |
No description |
hasLayoutBlockSupport(blockName) X-Ref |
No description |
useLayoutClasses(blockAttributes = {}, blockName = '') X-Ref |
Generates the utility classnames for the given block's layout attributes. return: { Array } Array of CSS classname strings. param: { Object } blockAttributes Block attributes. param: { string } blockName Block name. |
useLayoutStyles(blockAttributes = {}, blockName, selector) X-Ref |
Generates a CSS rule with the given block's layout styles. return: { string } CSS rule. param: { Object } blockAttributes Block attributes. param: { string } blockName Block name. param: { string } selector A selector to use in generating the CSS rule. |
LayoutPanelPure({layout,setAttributes,name: blockName,clientId}) X-Ref |
No description |
LayoutTypeSwitcher({type,onChange}) X-Ref |
No description |
layout_addAttribute(settings) X-Ref |
Filters registered block settings, extending attributes to include `layout`. return: {Object} Filtered block settings. param: {Object} settings Original block settings. |
BlockWithLayoutStyles({block: BlockListBlock,props,blockGapSupport,layoutClasses}) X-Ref |
No description |
range(start, length) X-Ref |
No description |
utils_getComputedCSS(element, property) X-Ref |
No description |
getGridTracks(template, gap) X-Ref |
Given a grid-template-columns or grid-template-rows CSS property value, gets the start and end position in pixels of each grid track. https://css-tricks.com/snippets/css/complete-guide-grid/#aa-grid-track return: {Array<{start: number, end: number}>} An array of objects with the start and end param: {string} template The grid-template-columns or grid-template-rows CSS property value. param: {number} gap The gap between grid tracks in pixels. |
getClosestTrack(tracks, position, edge = 'start') X-Ref |
Given an array of grid tracks and a position in pixels, gets the index of the closest track to that position. https://css-tricks.com/snippets/css/complete-guide-grid/#aa-grid-track return: {number} The index of the closest track to the position. 0-based, unlike CSS grid which param: {Array<{start: number, end: number}>} tracks An array of objects with the start and end param: {number} position The position in pixels. param: {string} edge The edge of the track to compare the |
getGridRect(gridElement, rect) X-Ref |
No description |
getGridItemRect(gridItemElement) X-Ref |
No description |
getGridInfo(gridElement) X-Ref |
No description |
Tips() X-Ref |
No description |
BlockIcon({icon,showColors = false,className,context}) X-Ref |
No description |
BlockCard({title,icon,description,blockType,className,name}) X-Ref |
No description |
getSubRegistry(subRegistries, registry, useSubRegistry) X-Ref |
No description |
useBlockSync({clientId = null,value: controlledBlocks,selection: controlledSelection,onChange = use_block_sync_noop,onInput = use_block_sync_noop}) 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 |
KeyboardShortcuts() X-Ref |
No description |
KeyboardShortcutsRegister() X-Ref |
No description |
BlockContextProvider({value,children}) X-Ref |
Component which merges passed value with current consumed block context. param: {BlockContextProviderProps} props |
Warning({className,actions,children,secondaryActions}) X-Ref |
No description |
MultipleUsageWarning({originalBlockClientId,name,onReplace}) X-Ref |
No description |
BlockEdit({mayDisplayControls,mayDisplayParentControls,blockEditingMode,isPreviewMode,...props}) X-Ref |
No description |
BlockView({title,rawContent,renderedContent,action,actionText,className}) X-Ref |
No description |
BlockCompare({block,onKeep,onConvert,convertor,convertButtonText}) X-Ref |
No description |
getDifference(originalContent, newContent) X-Ref |
No description |
getConvertedContent(convertedBlock) X-Ref |
No description |
BlockInvalidWarning({clientId}) X-Ref |
No description |
Class: BlockCrashBoundary - X-Ref
WordPress dependenciesBlockHTML({clientId}) X-Ref |
Internal dependencies |
dist_esm_I(t,...e) X-Ref |
No description |
getAbsolutePosition(element) X-Ref |
If the block count exceeds the threshold, we disable the reordering animation to avoid laginess. |
useMovingAnimation({triggerAnimationOnChange,clientId}) 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: {*} $1.triggerAnimationOnChange Variable used to trigger the animation if it changes. param: {string} $1.clientId |
preserveScrollPosition() X-Ref |
No description |
useFocusFirstElement({clientId,initialPosition}) X-Ref |
Transitions focus to the block or inner tabbable when the block becomes selected and an initial position is set. return: {RefObject} React ref with the block element. param: {string} clientId Block client ID. |
useIsHovered({clientId}) X-Ref |
No description |
listener(event) X-Ref |
No description |
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,isSelected}) 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 |
useZoomOutModeExit() X-Ref |
Allows Zoom Out mode to be exited by double clicking in the selected block. |
onDoubleClick(event) X-Ref |
No description |
useIntersectionObserver() X-Ref |
Internal dependencies |
useScrollIntoView({isSelected}) X-Ref |
WordPress dependencies |
useFlashEditableBlocks({clientId = '',isEnabled = true} = {}) X-Ref |
Internal dependencies |
replacePatternOverrideDefaultBindings(blockName, bindings) X-Ref |
Returns the bindings with the `__default` binding for pattern overrides replaced with the full-set of supported attributes. e.g.: bindings passed in: `{ __default: { source: 'core/pattern-overrides' } }` bindings returned: `{ content: { source: 'core/pattern-overrides' } }` return: {Object} The bindings with default replaced for pattern overrides. param: {string} blockName The block name (e.g. 'core/paragraph'). param: {Object} bindings A block's bindings from the metadata attribute. |
canBindBlock(blockName) X-Ref |
Based on the given block name, check if it is possible to bind the block. return: {boolean} Whether it is possible to bind the block to sources. param: {string} blockName - The block name. |
canBindAttribute(blockName, attributeName) X-Ref |
Based on the given block name and attribute name, check if it is possible to bind the block attribute. return: {boolean} Whether it is possible to bind the block attribute. param: {string} blockName - The block name. param: {string} attributeName - The attribute name. |
getBindableAttributes(blockName) X-Ref |
No description |
shimAttributeSource(settings, name) X-Ref |
Filters a registered block's settings to enhance a block's `edit` component to upgrade bound attributes. return: {WPBlockSettings} Filtered block settings. param: {WPBlockSettings} settings - Registered block settings. param: {string} name - Block name. |
use_block_props_useBlockProps(props = {}, {__unstableIsHtml} = {}) 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. Use of this hook on the outermost element of a block is required if using API >= v2. return: {Object} Props to pass to the element to mark as a block. param: {Object} props Optional. Props to pass to the element. Must contain param: {Object} options Options for internal use only. param: {boolean} options.__unstableIsHtml |
mergeWrapperProps(propsA, propsB) X-Ref |
Merges wrapper props with special handling for classNames and styles. return: {Object} Merged props. param: {Object} propsA param: {Object} propsB |
Block({children,isHtml,...props}) X-Ref |
No description |
BlockListBlock({block: {__unstableBlockSource},mode,isLocked,canRemove,clientId,isSelected,isSelectionEnabled,className,__unstableLayoutClassNames: layoutClassNames,name,isValid,attributes,wrapperProps,setAttributes,onReplace,onInsertBlocksAfter,onMerge,toggleSelection}) X-Ref |
No description |
switchToDefaultOrRemove() X-Ref |
No description |
moveFirstItemUp(_clientId, changeSelection = true) X-Ref |
Moves the block with clientId up one level. If the block type cannot be inserted at the new location, it will be attempted to convert to the default block type. param: {string} _clientId The block to move. param: {boolean} changeSelection Whether to change the selection |
BlockListBlockProvider(props) X-Ref |
No description |
DefaultBlockAppender({rootClientId}) X-Ref |
No description |
DefaultAppender({rootClientId}) X-Ref |
No description |
BlockListAppender({rootClientId,CustomAppender,className,tagName: TagName = 'div'}) X-Ref |
No description |
BlockPopoverInbetween({previousClientId,nextClientId,children,__unstablePopoverSlot,__unstableContentRef,operation = 'insert',nearestSide = 'right',...props}) X-Ref |
No description |
BlockDropZonePopover({__unstablePopoverSlot,__unstableContentRef}) X-Ref |
No description |
InbetweenInsertionPointPopover({__unstablePopoverSlot,__unstableContentRef,operation = 'insert',nearestSide = 'right'}) X-Ref |
No description |
onClick(event) X-Ref |
No description |
maybeHideInserterPoint(event) X-Ref |
No description |
onFocus(event) X-Ref |
No description |
InsertionPoint(props) X-Ref |
No description |
useInBetweenInserter() X-Ref |
Internal dependencies |
onMouseMove(event) X-Ref |
No description |
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 |
ButtonBlockAppender({showSeparator,isFloating,onAddBlock,isToggle}) X-Ref |
No description |
default_block_appender_DefaultBlockAppender() X-Ref |
No description |
useShallowMemo(value) X-Ref |
No description |
useNestedSettingsUpdate(clientId, parentLock, allowedBlocks, prioritizedInserterBlocks, defaultBlock, directInsert, __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} parentLock param: {string[]} allowedBlocks An array of block names which are permitted param: {string[]} prioritizedInserterBlocks Block names and/or block variations to be prioritized in the inserter, in the format {blockName}/{variationName}. param: {?WPDirectInsertBlock} defaultBlock The default block to insert: [ blockName, { blockAttributes } ]. param: {?boolean} directInsert If a default block should be inserted directly by the appender. param: {?WPDirectInsertBlock} __experimentalDefaultBlock A deprecated prop for the default block to insert: [ blockName, { blockAttributes } ]. Use `defaultBlock` instead. param: {?boolean} __experimentalDirectInsert A deprecated prop for whether a default block should be inserted directly by the appender. Use `directInsert` instead. 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" or templateLock = "contentOnly"), 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 |
useBlockContext(clientId) X-Ref |
Returns a context object for a given block. return: {Record<string,*>} Context value. param: {string} clientId The block client ID. |
parseDropEvent(event) X-Ref |
Retrieve the data for a block drop event. return: {Object} An object with block drag and drop data. param: {SyntheticEvent} event The drop event. |
onBlockDrop(targetRootClientId, targetBlockIndex, getBlockIndex, getClientIdsOfDescendants, moveBlocks, insertOrReplaceBlocks, clearSelectedBlock, operation, getBlock) X-Ref |
A function that returns an event handler function for block drop events. return: {Function} The event handler for a block drop event. param: {string} targetRootClientId The root client id where the block(s) will be inserted. param: {number} targetBlockIndex The index where the block(s) will be inserted. param: {Function} getBlockIndex A function that gets the index of a block. param: {Function} getClientIdsOfDescendants A function that gets the client ids of descendant blocks. param: {Function} moveBlocks A function that moves blocks. param: {Function} insertOrReplaceBlocks A function that inserts or replaces blocks. param: {Function} clearSelectedBlock A function that clears block selection. param: {string} operation The type of operation to perform on drop. Could be `insert` or `replace` or `group`. param: {Function} getBlock A function that returns a block given its client id. |
onFilesDrop(targetRootClientId, getSettings, updateBlockAttributes, canInsertBlockType, insertOrReplaceBlocks) X-Ref |
A function that returns an event handler function for block-related file drop events. return: {Function} The event handler for a block-related file drop event. param: {string} targetRootClientId The root client id where the block(s) will be inserted. param: {Function} getSettings A function that gets the block editor settings. 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} insertOrReplaceBlocks A function that inserts or replaces blocks. |
onHTMLDrop(insertOrReplaceBlocks) X-Ref |
A function that returns an event handler function for block-related HTML drop events. return: {Function} The event handler for a block-related HTML drop event. param: {Function} insertOrReplaceBlocks A function that inserts or replaces blocks. |
useOnBlockDrop(targetRootClientId, targetBlockIndex, options = {}) X-Ref |
A React hook for handling block drop events. return: {Function} A function to be passed to the onDrop handler. 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: {Object} options The optional options. param: {WPDropOperation} [options.operation] The type of operation to perform on drop. Could be `insert` or `replace` for now. |
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, allowedEdges = ['top', 'bottom', 'left', 'right']) X-Ref |
Given a point, a DOMRect and a list of allowed edges returns the name of and distance to the nearest edge. return: {[number, string]} An array where the first value is the distance param: {WPPoint} point The point to measure distance from. param: {DOMRect} rect A DOM Rect containing edge positions. param: {WPEdgeName[]} allowedEdges A list of the edges included in the |
isPointContainedByRect(point, rect) X-Ref |
Is the point contained by the rectangle. return: {boolean} True if the point is contained by the rectangle, false otherwise. param: {WPPoint} point The point. param: {DOMRect} rect The rectangle. |
isPointWithinTopAndBottomBoundariesOfRect(point, rect) X-Ref |
Is the point within the top and bottom boundaries of the rectangle. return: {boolean} True if the point is within top and bottom of rectangle, false otherwise. param: {WPPoint} point The point. param: {DOMRect} rect The rectangle. |
getDropTargetPosition(blocksData, position, orientation = 'vertical', options = {}) X-Ref |
Get the drop target position from a given drop point and the orientation. return: {[number, WPDropOperation]} The drop target position. param: {WPBlockData[]} blocksData The block data list. param: {WPPoint} position The position of the item being dragged. param: {WPBlockListOrientation} orientation The orientation of the block list. param: {Object} options Additional options. |
isDropTargetValid(getBlockType, allowedBlocks, draggedBlockNames, targetBlockName) X-Ref |
Check if the dragged blocks can be dropped on the target. return: {boolean} Whether the dragged blocks can be dropped on the target. param: {Function} getBlockType param: {Object[]} allowedBlocks param: {string[]} draggedBlockNames param: {string} targetBlockName |
isInsertionPoint(targetToCheck, ownerDocument) X-Ref |
Checks if the given element is an insertion point. return: {boolean} True if the element is a insertion point, false otherwise. param: {EventTarget|null} targetToCheck - The element to check. param: {Document} ownerDocument - The owner document of the element. |
useBlockDropZone({dropZoneElement,rootClientId: targetRootClientId = '',parentClientId: parentBlockClientId = '',isDisabled = false} = {}) 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. |
BlockContext({children,clientId}) X-Ref |
No description |
UncontrolledInnerBlocks(props) X-Ref |
InnerBlocks is a component which allows a single block to have multiple blocks as children. The UncontrolledInnerBlocks component is used whenever the inner blocks are not controlled by another entity. In other words, it is normally used for inner blocks in the post editor param: {Object} props The component props. |
ControlledInnerBlocks(props) X-Ref |
The controlled inner blocks component wraps the uncontrolled inner blocks component with the blockSync hook. This keeps the innerBlocks of the block in the block-editor store in sync with the blocks of the controlling entity. An example of an inner block controller is a template part block, which provides its own blocks from the template part entity data source. param: {Object} props The component props. |
useInnerBlocksProps(props = {}, options = {}) 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. |
isKeyDownEligibleForStartTyping(event) X-Ref |
Returns true if a given keydown event can be inferred as intent to start typing, or false otherwise. A keydown is considered eligible if it is a text navigation without shift active. return: {boolean} Whether event is eligible to start typing. param: {KeyboardEvent} event Keydown event to test. |
useMouseMoveTypingReset() 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({children}) X-Ref |
No description |
ZoomOutSeparator({clientId,rootClientId = '',position = 'top'}) X-Ref |
No description |
Root({className,...settings}) X-Ref |
No description |
StopEditingAsBlocksOnOutsideSelect({clientId}) X-Ref |
No description |
BlockList(settings) X-Ref |
No description |
Items({placeholder,rootClientId,renderAppender: CustomAppender,__experimentalAppenderTagName,layout = defaultLayout}) X-Ref |
No description |
BlockListItems(props) X-Ref |
No description |
selector(select) X-Ref |
Internal dependencies |
useMultiSelection() X-Ref |
No description |
useTabNav() X-Ref |
No description |
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. return: {boolean} Whether element should consider edge navigation. param: {Element} element HTML element to test. param: {number} keyCode KeyboardEvent keyCode to test. param: {boolean} hasModifier Whether a modifier is pressed. |
getClosestTabbable(target, isReverse, containerElement, onlyVertical) X-Ref |
Returns the optimal tab target from the given focused element in the desired direction. A preference is made toward text fields, falling back to the block focus stop if no other candidates exist for the block. return: {?Element} Optimal tab target, if one exists. param: {Element} target Currently focused text field. param: {boolean} isReverse True if considering as the first field. param: {Element} containerElement Element containing all blocks. param: {boolean} onlyVertical Whether to only consider tabbable elements |
isTabCandidate(node) X-Ref |
No description |
useArrowNav() X-Ref |
No description |
onMouseDown() X-Ref |
No description |
isClosestTabbableABlock(target, isReverse) X-Ref |
No description |
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({buttons,target,relatedTarget}) 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. return: {Element} The selection start node. param: {Selection} selection The selection. |
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. return: {Element} The selection start node. param: {Selection} selection The selection. |
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) |
getRichTextElement(node) X-Ref |
No description |
useSelectionObserver() X-Ref |
Sets a multi-selection based on the native selection across blocks. |
onSelectionChange(event) X-Ref |
No description |
useClickSelection() X-Ref |
Internal dependencies |
onMouseDown(event) X-Ref |
No description |
useInput() X-Ref |
Handles input for selections across blocks. |
onBeforeInput(event) X-Ref |
No description |
onKeyDown(event) X-Ref |
No description |
onCompositionStart(event) X-Ref |
No description |
useNotifyCopy() X-Ref |
Internal dependencies |
removeWindowsFragments(html) X-Ref |
Normalizes a given string of HTML to remove the Windows-specific "Fragment" comments and any preceding and trailing content. return: {string} the normalized html param: {string} html the html to be normalized |
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 return: {string} the cleaned html param: {string} html the html to be stripped of the meta tag. |
getPasteEventData({clipboardData}) X-Ref |
No description |
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. return: {boolean} True if the files should be dismissed param: {File[]} files File objects obtained from a paste event param: {string} html HTML content obtained from a paste event |
setClipboardBlocks(event, blocks, registry) X-Ref |
Sets the clipboard data for the provided blocks, with both HTML and plain text representations. param: {ClipboardEvent} event Clipboard event. param: {WPBlock[]} blocks Blocks to set as clipboard data. param: {Object} registry The registry to select from. |
getPasteBlocks(event, canUserUseUnfilteredHTML) X-Ref |
Returns the blocks to be pasted from the clipboard event. return: {Array|string} A list of blocks or a string, depending on `handlerMode`. param: {ClipboardEvent} event The clipboard event. param: {boolean} canUserUseUnfilteredHTML Whether the user can or can't post unfiltered HTML. |
toPlainText(html) X-Ref |
Given a string of HTML representing serialized blocks, returns the plain text extracted after stripping the HTML of any tags and fixing line breaks. return: {string} The plain-text content with any html removed. param: {string} html Serialized blocks. |
useClipboardHandler() X-Ref |
No description |
handler(event) X-Ref |
No description |
useWritingFlow() X-Ref |
No description |
WritingFlow({children,...props}, forwardedRef) X-Ref |
No description |
getCompatibilityStyles() X-Ref |
Returns a list of stylesheets that target the editor canvas. 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. |
matchFromRules(_cssRules) X-Ref |
No description |
bubbleEvent(event, Constructor, frame) X-Ref |
No description |
useBubbleEvents(iframeDocument) 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} iframeDocument Document to attach listeners to. |
Iframe({contentRef,children,tabIndex = 0,scale = 1,frameSize = 0,readonly,forwardedRef: ref,title = (0,external_wp_i18n_namespaceObject.__) X-Ref |
No description |
preventFileDropDefault(event) X-Ref |
No description |
onLoad() X-Ref |
No description |
IframeIfReady(props, ref) X-Ref |
No description |
gobbleParens(text, offset) X-Ref |
No description |
tokenizeBy(text, grammar = TOKENS) X-Ref |
No description |
parsel_tokenize(selector, grammar = TOKENS) X-Ref |
No description |
nestTokens(tokens, { list = true } = {}) X-Ref |
Convert a flat list of tokens into a tree of complex & compound selectors |
walk(node, visit, /*** @internal*/parent) X-Ref |
No description |
parse(selector, { recursive = true, list = true } = {}) X-Ref |
Parse a CSS selector param: selector - The selector to parse param: options.recursive - Whether to parse the arguments of pseudo-classes like :is(), :has() etc. Defaults to true. param: options.list - Whether this can be a selector list (A, B, C etc). Defaults to true. |
stringify(listOrNode) X-Ref |
Converts the given list or (sub)tree to a string. |
specificityToNumber(specificity, base) X-Ref |
To convert the specificity array to a number |
specificity(selector) X-Ref |
Calculate specificity of a selector. If the selector is a list, the max specificity is returned. |
prefixRootSelector(prefix, selector) X-Ref |
Prefixes root selectors in a way that ensures consistent specificity. This requires special handling, since prefixing a classname before html, body, or :root will generally result in an invalid selector. Some libraries will simply replace the root selector with the prefix instead, but this results in inconsistent specificity. This function instead inserts the prefix after the root tags but before any other part of the selector. This results in consistent specificity: - If a `:where()` selector is used for the prefix, all selectors output by `transformStyles` will have no specificity increase. - If a classname, id, or something else is used as the prefix, all selectors will have the same specificity bump when transformed. return: {string} The prefixed root selector. param: {string} prefix The prefix. param: {string} selector The selector. |
transformStyle({css,ignoredSelectors = [],baseURL}, wrapperSelector = '', transformOptions) X-Ref |
No description |
useDarkThemeBodyClassName(styles, scope) X-Ref |
No description |
EditorStyles({styles,scope,transformOptions}) X-Ref |
No description |
ScaledBlockPreview({viewportWidth,containerWidth,minHeight,additionalStyles = EMPTY_ADDITIONAL_STYLES}) X-Ref |
No description |
AutoBlockPreview(props) X-Ref |
No description |
BlockPreview({blocks,viewportWidth = 1200,minHeight,additionalStyles = block_preview_EMPTY_ADDITIONAL_STYLES,__experimentalMinHeight,__experimentalPadding}) X-Ref |
No description |
useBlockPreview({blocks,props = {},layout}) 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.layout Layout settings to be used in the preview. |
InserterPreviewPanel({item}) X-Ref |
No description |
InserterListboxItem({isFirst,as: Component,children,...props}, ref) X-Ref |
No description |
BlockDraggableChip({count,icon,isPattern,fadeWhenDisabled}) X-Ref |
No description |
InserterListItem({className,isFirst,item,onSelect,onHover,isDraggable,...props}) 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({items = [],onSelect,onHover = () X-Ref |
No description |
InserterPanel({title,icon,children}) X-Ref |
No description |
InserterListbox({children}) X-Ref |
No description |
InserterNoResults() X-Ref |
No description |
BlockTypesTabPanel({items,collections,categories,onSelectItem,onHover,showMostUsedBlocks,className}) 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. |
BlockTypesTab({rootClientId,onInsert,onHover,showMostUsedBlocks}, ref) X-Ref |
No description |
PatternCategoriesList({selectedCategory,patternCategories,onClickCategory}) X-Ref |
No description |
PatternsExplorerSearch({searchValue,setSearchValue}) X-Ref |
No description |
PatternExplorerSidebar({selectedCategory,patternCategories,onClickCategory,searchValue,setSearchValue}) X-Ref |
No description |
Pagination({currentPage,numPages,changePage,totalItems}) X-Ref |
No description |
BlockPattern({id,isDraggable,pattern,onClick,onHover,showTitle = true,showTooltip,category}) X-Ref |
No description |
BlockPatternPlaceholder() X-Ref |
No description |
BlockPatternsList({isDraggable,blockPatterns,shownPatterns,onHover,onClickPattern,orientation,label = (0,external_wp_i18n_namespaceObject.__) X-Ref |
No description |
getIndex({destinationRootClientId,destinationIndex,rootClientId,registry}) X-Ref |
Internal dependencies |
useInsertionPoint({rootClientId = '',insertionIndex,clientId,isAppender,onSelect,shouldFocusBlock = true,selectBlockOnInsert = true}) X-Ref |
Returns the insertion point state given the inserter config. return: {Array} Insertion Point State (rootClientID, onInsertBlocks and onToggle). param: {WPInserterConfig} config Inserter Config. |
localeLowerCase(str, locale) X-Ref |
Localized lower case. |
lowerCase(str) X-Ref |
Lower case as a function. |
noCase(input, options) X-Ref |
Normalize the string into something other libraries can manipulate easier. |
dist_es2015_replace(input, re, value) X-Ref |
Replace `re` in the input string with the replacement value. |
extractWords(input = '') X-Ref |
Extracts words from an input string. return: {Array} Words, extracted from the input string. param: {string} input The input string. |
normalizeString(input = '') X-Ref |
Sanitizes the search input string. return: {string} The normalized search input. param: {string} input The search input to normalize. |
getItemSearchRank(item, searchTerm, config = {}) X-Ref |
Get the search rank for a given item and a specific search term. The better the match, the higher the rank. If the rank equals 0, it should be excluded from the results. return: {number} Search Rank. param: {Object} item Item to filter. param: {string} searchTerm Search term. param: {Object} config Search Config. |
usePatternsPaging(currentCategoryPatterns, currentCategory, scrollContainerRef, currentFilter = '') X-Ref |
Supplies values needed to page the patterns list client side. return: {Object} Returns the relevant paging values. (totalItems, categoryPatternsList, numPages, changePage, currentPage) param: {Array} currentCategoryPatterns An array of the current patterns to display. param: {string} currentCategory The currently selected category. param: {Object} scrollContainerRef Ref of container to to find scroll container for when moving between pages. param: {string} currentFilter The currently search filter. |
PatternsListHeader({filterValue,filteredBlockPatternsLength}) X-Ref |
No description |
PatternList({searchValue,selectedCategory,patternCategories,rootClientId}) X-Ref |
No description |
hasRegisteredCategory(pattern, allCategories) X-Ref |
Internal dependencies |
usePatternCategories(rootClientId, sourceFilter = 'all') X-Ref |
No description |
PatternsExplorer({initialCategory,rootClientId}) X-Ref |
No description |
PatternsExplorerModal({onModalClose,...restProps}) X-Ref |
No description |
ScreenHeader({title}) X-Ref |
No description |
MobileTabNavigation({categories,children}) X-Ref |
No description |
PatternsFilter({setPatternSyncFilter,setPatternSourceFilter,patternSyncFilter,patternSourceFilter,scrollContainerRef,category}) X-Ref |
No description |
handleSetSourceFilterChange(newSourceFilter) X-Ref |
No description |
PatternCategoryPreviews({rootClientId,onInsert,onHover = pattern_category_previews_noop,category,showTitlesAsTooltip}) X-Ref |
No description |
CategoryTabs({categories,selectedCategory,onSelectCategory,children}) X-Ref |
No description |
BlockPatternsTab({onSelectCategory,selectedCategory,onInsert,rootClientId,setHasCategories,children}) X-Ref |
No description |
getBlockAndPreviewFromMedia(media, mediaType) X-Ref |
Creates a block and a preview element from a media object. return: {[WPBlock, JSX.Element]} An array containing the block and the preview element. param: {InserterMediaItem} media The media object to create the block from. param: {('image'|'audio'|'video')} mediaType The media type to create the block for. |
MediaPreviewOptions({category,media}) X-Ref |
No description |
InsertExternalImageModal({onClose,onSubmit}) X-Ref |
No description |
MediaPreview({media,onClick,category}) X-Ref |
No description |
MediaList({mediaList,category,onClick,label = (0,external_wp_i18n_namespaceObject.__) X-Ref |
Internal dependencies |
useMediaResults(category, query = {}) X-Ref |
Fetches media items based on the provided category. Each media category is responsible for providing a `fetch` function. return: {InserterMediaItem[]} The media results. param: {Object} category The media category to fetch results for. param: {InserterMediaRequest} query The query args to use for the request. |
useMediaCategories(rootClientId) X-Ref |
No description |
MediaCategoryPanel({rootClientId,onInsert,category}) X-Ref |
No description |
MediaTab({rootClientId,selectedCategory,onSelectCategory,setHasCategories,onInsert,children}) X-Ref |
No description |
InserterSearchResults({filterValue,onSelect,onHover,onHoverPattern,rootClientId,clientId,isAppender,__experimentalInsertionIndex,maxBlockPatterns,maxBlockTypes,showBlockDirectory = false,isDraggable = true,shouldFocusBlock = true,prioritizePatterns,selectBlockOnInsert,isQuick}) 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. |
TabbedSidebar({defaultTabId,onClose,onSelect,selectedTab,tabs,closeButtonLabel}, ref) X-Ref |
No description |
useZoomOut(zoomOut = true) X-Ref |
A hook used to set the editor mode to zoomed out mode, invoking the hook sets the mode. param: {boolean} zoomOut If we should enter into zoomOut mode or not |
InserterMenu({rootClientId,clientId,isAppender,__experimentalInsertionIndex,onSelect,showInserterHelpPanel,showMostUsedBlocks,__experimentalFilterValue = '',shouldFocusBlock = true,onPatternCategorySelection,onClose,__experimentalInitialTab,__experimentalInitialCategory}, ref) X-Ref |
No description |
getInitialTab() X-Ref |
No description |
PublicInserterMenu(props, ref) X-Ref |
No description |
QuickInserter({onSelect,rootClientId,clientId,isAppender,prioritizePatterns,selectBlockOnInsert,hasSearch = true}) X-Ref |
No description |
handleClick(event) X-Ref |
No description |
getAdjacentBlockAttributes(attributesToCopy) X-Ref |
No description |
getInsertionIndex() X-Ref |
No description |
button_block_appender_ButtonBlockAppender({rootClientId,className,onFocus,tabIndex,onSelect}, ref) X-Ref |
No description |
GridVisualizer({clientId,contentRef,parentLayout}) X-Ref |
No description |
onGlobalDrag() X-Ref |
No description |
onGlobalDragEnd() X-Ref |
No description |
ManualGridVisualizer({gridClientId,gridInfo}) X-Ref |
No description |
GridVisualizerCell({color,children,className}) X-Ref |
No description |
useGridVisualizerDropZone(column, row, gridClientId, gridInfo, setHighlightedRect) X-Ref |
No description |
GridVisualizerDropZone({column,row,gridClientId,gridInfo,setHighlightedRect}) X-Ref |
No description |
GridVisualizerAppender({column,row,gridClientId,gridInfo,setHighlightedRect}) X-Ref |
No description |
useDropZoneWithValidation({validateDrag,onDragEnter,onDragLeave,onDrop}) X-Ref |
No description |
GridItemResizer({clientId,bounds,onChange,parentLayout}) X-Ref |
No description |
GridItemResizerInner({clientId,bounds,blockElement,rootBlockElement,onChange,isManualGrid}) X-Ref |
No description |
GridItemMovers({layout,parentLayout,onChange,gridClientId,blockClientId}) X-Ref |
No description |
GridItemMover({className,icon,label,isDisabled,onClick,description}) X-Ref |
No description |
useBlockPropsChildLayoutStyles({style}) X-Ref |
No description |
ChildLayoutControlsPure({clientId,style,setAttributes}) X-Ref |
No description |
GridTools({clientId,style,setAttributes,allowSizingOnChildren,isManualPlacement,parentLayout}) X-Ref |
No description |
updateLayout(layout) X-Ref |
No description |
ContentLockControlsPure({clientId}) X-Ref |
No description |
addMetaAttribute(blockTypeSettings) X-Ref |
Filters registered block settings, extending attributes to include `metadata`. see: https://github.com/WordPress/gutenberg/pull/40393/files#r864632012 return: {Object} Filtered block settings. param: {Object} blockTypeSettings Original block settings. |
BlockHooksControlPure({name,clientId,metadata: {ignoredHookedBlocks = []} = {}}) X-Ref |
No description |
isObjectEmpty(object) X-Ref |
Internal dependencies |
useBlockBindingsUtils(clientId) X-Ref |
Retrieves the existing utils needed to update the block `bindings` metadata. They can be used to create, modify, or remove connections from the existing block attributes. It contains the following utils: - `updateBlockBindings`: Updates the value of the bindings connected to block attributes. It can be used to remove a specific binding by setting the value to `undefined`. - `removeAllBlockBindings`: Removes the bindings property of the `metadata` attribute. return: {?WPBlockBindingsUtils} Object containing the block bindings utils. param: {?string} clientId Optional block client ID. If not set, it will use the current block client ID from the context. |
BlockBindingsPanelDropdown({fieldsList,attribute,binding}) X-Ref |
No description |
BlockBindingsAttribute({attribute,binding,fieldsList}) X-Ref |
No description |
ReadOnlyBlockBindingsPanelItems({bindings,fieldsList}) X-Ref |
No description |
EditableBlockBindingsPanelItems({attributes,bindings,fieldsList}) X-Ref |
No description |
addLabelCallback(settings) X-Ref |
Filters registered block settings, adding an `__experimentalLabel` callback if one does not already exist. return: {Object} Filtered block settings. param: {Object} settings Original block settings. |
useGridLayoutSync({clientId: gridClientId}) X-Ref |
No description |
placeBlock(occupiedRects, gridColumnCount, blockColumnSpan, blockRowSpan, startColumn = 1, startRow = 1) X-Ref |
param: {GridRect[]} occupiedRects param: {number} gridColumnCount param: {number} blockColumnSpan param: {number} blockRowSpan param: {number?} startColumn param: {number?} startRow |
GridLayoutSync(props) X-Ref |
No description |
grid_visualizer_GridTools({clientId,layout}) X-Ref |
No description |
getBorderClassesAndStyles(attributes) X-Ref |
Provides the CSS class names and inline styles for a block's border support attributes. return: {Object} Border block support derived CSS classes & styles. param: {Object} attributes Block attributes. |
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. return: {Object} ClassName & style props from border block support. param: {Object} attributes Block attributes. |
getShadowClassesAndStyles(attributes) X-Ref |
Provides the CSS class names and inline styles for a block's shadow support attributes. return: {Object} Shadow block support derived CSS classes & styles. param: {Object} attributes Block attributes. |
getColorClassesAndStyles(attributes) X-Ref |
Provides the CSS class names and inline styles for a block's color support attributes. return: {Object} Color block support derived CSS classes & styles. param: {Object} attributes Block attributes. |
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. return: {Object} ClassName & style props from colors block support. param: {Object} attributes Block attributes. |
getSpacingClassesAndStyles(attributes) X-Ref |
Provides the CSS class names and inline styles for a block's spacing support attributes. return: {Object} Spacing block support derived CSS classes & styles. param: {Object} attributes Block attributes. |
getTypographyClassesAndStyles(attributes, settings) X-Ref |
Provides the CSS class names and inline styles for a block's typography support attributes. return: {Object} Typography block support derived CSS classes & styles. param: {Object} attributes Block attributes. param: {Object|boolean} settings Merged theme.json settings |
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. return: {any} value param: {any} value |
createColorHOC(colorTypes, withColorPalette) X-Ref |
Helper function used with `createHigherOrderComponent` to create higher order components for managing color logic. return: {Component} The component that can be used as a HOC. param: {Array} colorTypes An array of color types (e.g. 'backgroundColor, borderColor). param: {Function} withColorPalette A HOC for injecting the 'colors' prop into the WrappedComponent. |
createCustomColorsHOC(colorsArray) X-Ref |
A higher-order component factory for creating a 'withCustomColors' HOC, which handles color logic for class generation color value, retrieval and color attribute setting. Use this higher-order component to work with a custom set of colors. return: {Function} Higher-order component. param: {Array} colorsArray The array of color objects (name, slug, color, etc... ). |
withColors(...colorTypes) X-Ref |
A higher-order component, which handles color logic for class generation color value, retrieval and color attribute setting. For use with the default editor/theme color palette. return: {Function} Higher-order component. param: {...(Object|string)} colorTypes The arguments can be strings or objects. If the argument is an object, |
font_size_picker_FontSizePicker(props) X-Ref |
Internal dependencies |
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({completers = autocomplete_EMPTY_ARRAY}) X-Ref |
Shared reference to an empty array for cases where it is important to avoid returning a new array reference on every invocation. |
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({isActive,label = (0,external_wp_i18n_namespaceObject.__) X-Ref |
No description |
BlockAlignmentMatrixControl(props) X-Ref |
No description |
useBlockDisplayTitle({clientId,maximumLength,context}) X-Ref |
Returns the block's configured title as a string, or empty if the title cannot be determined. return: {?string} Block title. param: {Object} props param: {string} props.clientId Client ID of block. param: {number|undefined} props.maximumLength The maximum length that the block title string may be before truncated. param: {string|undefined} props.context The context to pass to `getBlockLabel`. |
BlockTitle({clientId,maximumLength,context}) X-Ref |
Renders the block's configured title as a string, or empty if the title cannot be determined. return: {JSX.Element} Block title. 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. param: {string|undefined} props.context The context to pass to `getBlockLabel`. |
getEditorRegion(editor) X-Ref |
Gets the editor region for a given editor canvas element or returns the passed element if no region is found return: { Object } The editor region or given editor element param: { Object } editor The editor canvas element. |
BlockBreadcrumb({rootLabelText}) X-Ref |
Block breadcrumb component, displaying the hierarchy of the current block selection as a breadcrumb. return: {Element} Block Breadcrumb. param: {Object} props Component props. param: {string} props.rootLabelText Translated label for the root element of the breadcrumb trail. |
useBlockOverlayActive(clientId) X-Ref |
Internal dependencies |
getProps(contentElement, selectedBlockElement, scrollContainer, toolbarHeight, isSticky) X-Ref |
Get the popover props for the block toolbar, determined by the space at the top of the canvas and the toolbar height. return: {Object} The popover props used to determine the position of the toolbar. param: {Element} contentElement The DOM element that represents the editor content or canvas. param: {Element} selectedBlockElement The outer DOM element of the first selected block. param: {Element} scrollContainer The scrollable container for the contentElement. param: {number} toolbarHeight The height of the toolbar in pixels. param: {boolean} isSticky Whether or not the selected block is sticky or fixed. |
useBlockToolbarPopoverProps({contentElement,clientId}) X-Ref |
Determines the desired popover positioning behavior, returning a set of appropriate props. return: {Object} The popover props used to determine the position of the toolbar. param: {Object} elements param: {Element} elements.contentElement The DOM element that represents the editor content or canvas. param: {string} elements.clientId The clientId of the first selected block. |
useSelectedBlockToolProps(clientId) X-Ref |
Returns props for the selected block tools and empty block inserter. param: {string} clientId Selected block client ID. |
EmptyBlockInserter({clientId,__unstableContentRef}) X-Ref |
No description |
useScrollWhenDragging() X-Ref |
React hook that scrolls the scroll container when a block is being dragged. return: {Function[]} `startScrolling`, `scrollOnDragOver`, `stopScrolling` |
getBlockMoverDescription(selectedCount, type, firstIndex, isFirst, isLast, dir, orientation) X-Ref |
Return a label for the block movement controls depending on block position. return: {string | undefined} Label for the block movement controls. param: {number} selectedCount Number of blocks selected. param: {string} type Block type - in the case of a single block, should param: {number} firstIndex The index (position - 1) of the first block selected. param: {boolean} isFirst This is the first block. param: {boolean} isLast This is the last block. param: {number} dir Direction of movement (> 0 is considered to be going param: {string} orientation The orientation of the block movers, vertical or |
getMultiBlockMoverDescription(selectedCount, firstIndex, isFirst, isLast, dir, orientation) X-Ref |
Return a label for the block movement controls depending on block position. return: {string | undefined} Label for the block movement controls. param: {number} selectedCount Number of blocks selected. param: {number} firstIndex The index (position - 1) of the first block selected. param: {boolean} isFirst This is the first block. param: {boolean} isLast This is the last block. param: {number} dir Direction of movement (> 0 is considered to be going param: {string} orientation The orientation of the block movers, vertical or |
BlockMover({clientIds,hideDragHandle,isBlockMoverUpButtonDisabled,isBlockMoverDownButtonDisabled}) X-Ref |
No description |
useDebouncedShowGestures({ref,isFocused,highlightParent,debounceTimeout = DEBOUNCE_TIMEOUT}) X-Ref |
Hook that creates debounced callbacks when the node is hovered or focused. param: {Object} props Component props. param: {Object} props.ref Element reference. param: {boolean} props.isFocused Whether the component has current focus. param: {number} props.highlightParent Whether to highlight the parent block. It defaults in highlighting the selected block. param: {number} [props.debounceTimeout=250] Debounce timeout in milliseconds. |
useShowHoveredOrFocusedGestures({ref,highlightParent = false,debounceTimeout = DEBOUNCE_TIMEOUT}) X-Ref |
Hook that provides gesture events for DOM elements that interact with the isFocused state. param: {Object} props Component props. param: {Object} props.ref Element reference. param: {number} [props.highlightParent=false] Whether to highlight the parent block. It defaults to highlighting the selected block. param: {number} [props.debounceTimeout=250] Debounce timeout in milliseconds. |
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: {Component} Parent block selector. |
PreviewBlockPopover({blocks}) X-Ref |
No description |
useBlockVariationTransforms({clientIds,blocks}) X-Ref |
No description |
BlockVariationTranformationItem({item,onSelect,setHoveredTransformItemName}) X-Ref |
No description |
useGroupedTransforms(possibleBlockTransformations) X-Ref |
No description |
RestTransformationItems({restTransformations,onSelect,setHoveredTransformItemName}) X-Ref |
No description |
BlockTranformationItem({item,onSelect,setHoveredTransformItemName}) X-Ref |
No description |
getActiveStyle(styles, className) X-Ref |
Returns the active style from the given className. return: {Object?} The active style. param: {Array} styles Block styles. param: {string} className Class name |
replaceActiveStyle(className, activeStyle, newStyle) X-Ref |
Replaces the active style in the block's className. return: {string} The updated className. param: {string} className Class name. param: {Object?} activeStyle The replaced style. param: {Object} newStyle The replacing style. |
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. return: {Array<Object?>} The style collection. param: {Array} styles Block styles. |
getDefaultStyle(styles) X-Ref |
Returns a style object from a collection of styles where that style object is the default block style. return: {Object?} The default style object, if found. param: {Array} styles Block styles. |
useGenericPreviewBlock(block, type) X-Ref |
return: {WPBlock} A generic block ready for styles preview. param: {WPBlock} block Block object. param: {WPBlockType} type Block type settings. |
useStylesForBlocks({clientId,onSwitch}) X-Ref |
return: {Object} Results of the select methods. param: {useStylesForBlocksArguments} useStylesForBlocks arguments. |
BlockStylesMenuItems({clientId,onSwitch = menu_items_noop}) X-Ref |
No description |
BlockStylesMenu({hoveredBlock,onSwitch}) X-Ref |
Internal dependencies |
PatternTransformationsMenu({blocks,patterns: statePatterns,onSelect}) X-Ref |
No description |
PreviewPatternsPopover({patterns,onSelect}) X-Ref |
No description |
pattern_transformations_menu_BlockPatternsList({patterns,onSelect}) X-Ref |
No description |
pattern_transformations_menu_BlockPattern({pattern,onSelect}) X-Ref |
No description |
BlockSwitcherDropdownMenuContents({onClose,clientIds,hasBlockStyles,canRemove,isUsingBindings}) X-Ref |
No description |
selectForMultipleBlocks(insertedBlocks) X-Ref |
No description |
onBlockTransform(name) X-Ref |
No description |
onBlockVariationTransform(name) X-Ref |
No description |
onPatternTransform(transformedBlocks) X-Ref |
No description |
supports_hasBorderSupport(nameOrType, feature = 'any') X-Ref |
Determine whether there is block support for border properties. return: {boolean} Whether there is support. param: {string|Object} nameOrType Block name or type object. param: {string} feature Border feature to check support for. |
hasSerializedBlocks(text) X-Ref |
Determine if the copied text looks like serialized blocks or not. Since plain text will always get parsed into a freeform block, we check that if the parsed blocks is anything other than that. return: {boolean} True if the text looks like serialized blocks, false otherwise. param: {string} text The copied text. |
getStyleAttributes(sourceBlock, targetBlock) X-Ref |
Get the "style attributes" from a given block to a target block. return: {Object} the filtered attributes object. param: {WPBlock} sourceBlock The source block. param: {WPBlock} targetBlock The target block. |
recursivelyUpdateBlockAttributes(targetBlocks, sourceBlocks, updateBlockAttributes) X-Ref |
Update the target blocks with style attributes recursively. param: {WPBlock[]} targetBlocks The target blocks to be updated. param: {WPBlock[]} sourceBlocks The source blocks to get th style attributes from. param: {Function} updateBlockAttributes The function to update the attributes. |
usePasteStyles() X-Ref |
A hook to return a pasteStyles event function for handling pasting styles to blocks. return: {Function} A function to update the styles to the blocks. |
BlockActions({clientIds,children,__experimentalUpdateSelection: updateSelection}) X-Ref |
No description |
BlockHTMLConvertButton({clientId}) X-Ref |
Internal dependencies |
useConvertToGroupButtonProps(selectedClientIds) 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`. param: {?string[]} selectedClientIds An optional array of clientIds to group. The selected blocks |
ConvertToGroupButton({clientIds,isGroupable,isUngroupable,onUngroup,blocksSelection,groupingBlockName,onClose = () X-Ref |
No description |
useBlockLock(clientId) X-Ref |
Return details about the block lock status. return: {Object} Block lock status param: {string} clientId The block client Id. |
getTemplateLockValue(lock) X-Ref |
No description |
BlockLockModal({clientId,onClose}) X-Ref |
No description |
BlockLockMenuItem({clientId}) X-Ref |
No description |
BlockModeToggle({clientId,onToggle = block_mode_toggle_noop}) X-Ref |
No description |
ModifyContentLockMenuItem({clientId,onClose}) X-Ref |
No description |
useBlockRename(name) X-Ref |
WordPress dependencies |
isEmptyString(testString) X-Ref |
No description |
BlockRenameModal({blockName,originalBlockName,onClose,onSave,hasOverridesWarning}) X-Ref |
No description |
BlockRenameControl({clientId}) X-Ref |
No description |
onChange(newName) X-Ref |
No description |
BlockSettingsMenuControls({...props}) X-Ref |
return: {Element} Element. param: {Object} props Fill props. |
BlockParentSelectorMenuItem({parentClientId,parentBlockType}) X-Ref |
No description |
CopyMenuItem({clientIds,onCopy,label,shortcut}) X-Ref |
No description |
BlockSettingsDropdown({block,clientIds,children,__experimentalSelectBlock,...props}) X-Ref |
No description |
updateSelectionAfterRemove() X-Ref |
No description |
onToggle(localOpen) X-Ref |
No description |
BlockSettingsMenu({clientIds,...props}) X-Ref |
Internal dependencies |
BlockLockToolbar({clientId}) X-Ref |
No description |
BlockGroupToolbar() X-Ref |
No description |
BlockEditVisuallyButton({clientIds}) X-Ref |
Internal dependencies |
hasOnlyToolbarItem(elements) X-Ref |
No description |
getAllFocusableToolbarItemsIn(container) X-Ref |
No description |
hasFocusWithin(container) X-Ref |
No description |
focusFirstTabbableIn(container) X-Ref |
No description |
useIsAccessibleToolbar(toolbarRef) X-Ref |
No description |
useToolbarFocus({toolbarRef,focusOnMount,isAccessibleToolbar,defaultIndex,onIndexChange,shouldUseKeyboardFocusShortcut,focusEditorOnEscape}) X-Ref |
No description |
NavigableToolbar({children,focusOnMount,focusEditorOnEscape = false,shouldUseKeyboardFocusShortcut = true,__experimentalInitialIndex: initialIndex,__experimentalOnIndexChange: onIndexChange,orientation = 'horizontal',...props}) X-Ref |
No description |
useHasAnyBlockControls() X-Ref |
Internal dependencies |
useHasBlockControls(group = 'default') X-Ref |
No description |
useHasBlockToolbar() X-Ref |
Returns true if the block toolbar should be shown. return: {boolean} Whether the block toolbar component will be rendered. |
shuffle_Container(props) X-Ref |
No description |
Shuffle({clientId,as = shuffle_Container}) X-Ref |
No description |
getNextPattern() X-Ref |
No description |
PrivateBlockToolbar({hideDragHandle,focusOnMount,__experimentalInitialIndex,__experimentalOnIndexChange,variant = 'unstyled'}) X-Ref |
No description |
BlockToolbar({hideDragHandle,variant}) X-Ref |
Renders the block toolbar. param: {Object} props Components props. param: {boolean} props.hideDragHandle Show or hide the Drag Handle for drag and drop functionality. param: {string} props.variant Style variant of the toolbar, also passed to the Dropdowns rendered from Block Toolbar Buttons. |
BlockToolbarPopover({clientId,isTyping,__unstableContentRef}) X-Ref |
No description |
BlockSelectionButton({clientId,rootClientId}, ref) X-Ref |
Block selection button component, displaying the label of the block. If the block descends from a root block, a button is displayed enabling the user to select the root block. return: {Component} The component to be rendered. param: {string} props Component props. param: {string} props.clientId Client ID of block. param: {Object} ref Reference to the component. |
onKeyDown(event) X-Ref |
No description |
BlockToolbarBreadcrumb({clientId,__unstableContentRef}, ref) X-Ref |
No description |
ZoomOutModeInserterButton({isVisible,onClick}) X-Ref |
No description |
ZoomOutModeInserters() X-Ref |
No description |
useShowBlockTools() X-Ref |
Source of truth for which block tools are showing in the block editor. return: {Object} Object of which block tools will be shown. |
block_tools_selector(select) X-Ref |
No description |
BlockTools({children,__unstableContentRef,...props}) 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 |
selectForMultipleBlocks(insertedBlocks) X-Ref |
No description |
onBlockTransform(name) X-Ref |
No description |
ExperimentalBlockCanvas({shouldIframe = true,height = '300px',children = (0,external_ReactJSXRuntime_namespaceObject.jsx) X-Ref |
No description |
BlockCanvas({children,height,styles}) X-Ref |
BlockCanvas component is a component used to display the canvas of the block editor. What we call the canvas is an iframe containing the block list that you can manipulate. The component is also responsible of wiring up all the necessary hooks to enable the keyboard navigation across blocks in the editor and inject content styles into the iframe. return: {Element} Block Breadcrumb. param: {Object} props Component props. param: {string} props.height Canvas height, defaults to 300px. param: {Array} props.styles Content styles to inject into the iframe. param: {Element} props.children Content of the canvas, defaults to the BlockList component. |
AriaReferencedText({children,...props}) X-Ref |
A component specifically designed to be used as an element referenced by ARIA attributes such as `aria-labelledby` or `aria-describedby`. param: {Object} props Props. param: {import('react').ReactNode} props.children |
useListViewScrollIntoView({isSelected,selectedClientIds,rowItemRef}) X-Ref |
WordPress dependencies |
ListViewExpander({onClick}) X-Ref |
No description |
getImage(block) X-Ref |
No description |
getImagesFromGallery(block) X-Ref |
No description |
getImagesFromBlock(block, isExpanded) X-Ref |
No description |
useListViewImages({clientId,isExpanded}) X-Ref |
Get a block's preview images for display within a list view row. TODO: Currently only supports images from the core/image and core/gallery blocks. This should be expanded to support other blocks that have images, potentially via an API that blocks can opt into / provide their own logic. return: {Array} Images. param: {Object} props Hook properties. param: {string} props.clientId The block's clientId. param: {boolean} props.isExpanded Whether or not the block is expanded in the list view. |
ListViewBlockSelectButton({className,block: {clientId},onClick,onContextMenu,onMouseDown,onToggleExpanded,tabIndex,onFocus,onDragStart,onDragEnd,draggable,isExpanded,ariaDescribedBy}, ref) X-Ref |
No description |
onKeyDown(event) X-Ref |
param: {KeyboardEvent} event |
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. return: {Object} An object containing the start and end ids. 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. |
focusListItem(focusClientId, treeGridElement) X-Ref |
Shift focus to the list view item associated with a particular clientId. param: {string} focusClientId The client ID of the block to focus. param: {?HTMLElement} treeGridElement The container element to search within. |
getDragDisplacementValues({blockIndexes,blockDropTargetIndex,blockDropPosition,clientId,firstDraggedBlockIndex,isDragged}) X-Ref |
Get values for the block that flag whether the block should be displaced up or down, whether the block is being nested, and whether the block appears after the dragged blocks. These values are used to determine the class names to apply to the block. The list view rows are displaced visually via CSS rules. Displacement rules: - `normal`: no displacement — used to apply a translateY of `0` so that the block appears in its original position, and moves to that position smoothly when dragging outside of the list view area. - `up`: the block should be displaced up, creating room beneath the block for the drop indicator. - `down`: the block should be displaced down, creating room above the block for the drop indicator. return: {Object} An object containing the `displacement`, `isAfterDraggedBlocks` and `isNesting` values. param: {Object} props param: {Object} props.blockIndexes The indexes of all the blocks in the list view, keyed by clientId. param: {number|null|undefined} props.blockDropTargetIndex The index of the block that the user is dropping to. param: {?string} props.blockDropPosition The position relative to the block that the user is dropping to. param: {string} props.clientId The client id for the current block. param: {?number} props.firstDraggedBlockIndex The index of the first dragged block. param: {?boolean} props.isDragged Whether the current block is being dragged. Dragged blocks skip displacement. |
ListViewBlock({block: {clientId},displacement,isAfterDraggedBlocks,isDragged,isNesting,isSelected,isBranchSelected,selectBlock,position,level,rowCount,siblingBlockCount,showBlockMovers,path,isExpanded,selectedClientIds,isSyncedBranch}) X-Ref |
No description |
getBlocksToUpdate() X-Ref |
No description |
countBlocks(block, expandedState, draggedClientIds, isExpandedByDefault) X-Ref |
No description |
ListViewBranch(props) X-Ref |
No description |
ListViewDropIndicatorPreview({draggedBlockClientId,listViewRef,blockDropTarget}) X-Ref |
No description |
useBlockSelection() X-Ref |
Internal dependencies |
useListViewBlockIndexes(blocks) X-Ref |
WordPress dependencies |
useListViewClientIds({blocks,rootClientId}) X-Ref |
Internal dependencies |
useListViewCollapseItems({collapseAll,expand}) X-Ref |
Internal dependencies |
isUpGesture(point, rect, nestingLevel = 1, rtl = false) X-Ref |
Determines whether the user is positioning the dragged block to be moved up to a parent level. Determined based on nesting level indentation of the current block. return: {boolean} Whether the gesture is an upward gesture. param: {WPPoint} point The point representing the cursor position when dragging. param: {DOMRect} rect The rectangle. param: {number} nestingLevel The nesting level of the block. param: {boolean} rtl Whether the editor is in RTL mode. |
getDesiredRelativeParentLevel(point, rect, nestingLevel = 1, rtl = false) X-Ref |
Returns how many nesting levels up the user is attempting to drag to. The relative parent level is calculated based on how far the cursor is from the provided nesting level (e.g. of a candidate block that the user is hovering over). The nesting level is considered "desired" because it is not guaranteed that the user will be able to drag to the desired level. The returned integer can be used to access an ascending array of parent blocks, where the first item is the block the user is hovering over, and the last item is the root block. return: {number} The desired relative parent level. param: {WPPoint} point The point representing the cursor position when dragging. param: {DOMRect} rect The rectangle. param: {number} nestingLevel The nesting level of the block. param: {boolean} rtl Whether the editor is in RTL mode. |
getCandidateBlockParents(candidateBlockData, blocksData) X-Ref |
Returns an array of the parent blocks of the block the user is dropping to. return: {WPListViewDropZoneBlocks} An array of block parents, including the block the user is dropping to. param: {WPListViewDropZoneBlock} candidateBlockData The block the user is dropping to. param: {WPListViewDropZoneBlocks} blocksData Data about the blocks in list view. |
getNextNonDraggedBlock(blocksData, index) X-Ref |
Given a list of blocks data and a block index, return the next non-dragged block. This is used to determine the block that the user is dropping to, while ignoring the dragged block. return: {WPListViewDropZoneBlock | undefined} The next non-dragged block. param: {WPListViewDropZoneBlocks} blocksData Data about the blocks in list view. param: {number} index The index to begin searching from. |
isNestingGesture(point, rect, nestingLevel = 1, rtl = false) X-Ref |
Determines whether the user positioning the dragged block to nest as an inner block. Determined based on nesting level indentation of the current block, plus the indentation of the next level of nesting. The vertical position of the cursor must also be within the block. param: {WPPoint} point The point representing the cursor position when dragging. param: {DOMRect} rect The rectangle. param: {number} nestingLevel The nesting level of the block. param: {boolean} rtl Whether the editor is in RTL mode. |
getListViewDropTarget(blocksData, position, rtl = false) X-Ref |
Given blocks data and the cursor position, compute the drop target. return: {WPListViewDropZoneTarget | undefined} An object containing data about the drop target. param: {WPListViewDropZoneBlocks} blocksData Data about the blocks in list view. param: {WPPoint} position The point representing the cursor position when dragging. param: {boolean} rtl Whether the editor is in RTL mode. |
useListViewDropZone({dropZoneElement,expandedState,setExpandedState}) X-Ref |
A react hook for implementing a drop zone in list view. return: {WPListViewDropZoneTarget} The drop target. param: {Object} props Named parameters. param: {?HTMLElement} [props.dropZoneElement] Optional element to be used as the drop zone. param: {Object} [props.expandedState] The expanded state of the blocks in the list view. param: {Function} [props.setExpandedState] Function to set the expanded state of a list of block clientIds. |
useListViewExpandSelectedItem({firstSelectedBlockClientId,setExpandedState}) X-Ref |
Internal dependencies |
use_clipboard_handler_useClipboardHandler({selectBlock}) X-Ref |
No description |
updateFocusAndSelection(focusClientId, shouldSelectBlock) X-Ref |
No description |
getBlocksToUpdate(clientId) X-Ref |
No description |
handler(event) X-Ref |
No description |
ListViewComponent({id,blocks,dropZoneElement,showBlockMovers = false,isExpanded = false,showAppender = false,blockSettingsMenu: BlockSettingsMenu = BlockSettingsDropdown,rootClientId,description,onSelect,additionalBlockContent: AdditionalBlockContent}, ref) X-Ref |
Show a hierarchical list of blocks. param: {Object} props Components props. param: {string} props.id An HTML element id for the root element of ListView. param: {Array} props.blocks _deprecated_ Custom subset of block client IDs to be used instead of the default hierarchy. param: {?HTMLElement} props.dropZoneElement Optional element to be used as the drop zone. param: {?boolean} props.showBlockMovers Flag to enable block movers. Defaults to `false`. param: {?boolean} props.isExpanded Flag to determine whether nested levels are expanded by default. Defaults to `false`. param: {?boolean} props.showAppender Flag to show or hide the block appender. Defaults to `false`. param: {?ComponentType} props.blockSettingsMenu Optional more menu substitution. Defaults to the standard `BlockSettingsDropdown` component. param: {string} props.rootClientId The client id of the root block from which we determine the blocks to show in the list. param: {string} props.description Optional accessible description for the tree grid component. param: {?Function} props.onSelect Optional callback to be invoked when a block is selected. Receives the block object that was selected. param: {?ComponentType} props.additionalBlockContent Component that renders additional block content UI. param: {Ref} ref Forwarded ref |
BlockNavigationDropdownToggle({isEnabled,onToggle,isOpen,innerRef,...props}) X-Ref |
No description |
BlockNavigationDropdown({isDisabled,...props}, ref) X-Ref |
No description |
BlockStylesPreviewPanel({genericPreviewBlock,style,className,activeStyle}) X-Ref |
No description |
BlockStyles({clientId,onSwitch = block_styles_noop,onHoverClassName = block_styles_noop}) X-Ref |
No description |
HeadingLevelIcon({level}) X-Ref |
Heading level icon. return: {?ComponentType} The icon. param: {WPHeadingLevelIconProps} props Component props. |
HeadingLevelDropdown({options = HEADING_LEVELS,value,onChange}) X-Ref |
Dropdown for selecting a heading level (1 through 6) or paragraph (0). return: {ComponentType} The toolbar. param: {WPHeadingLevelDropdownProps} props Component props. |
BlockVariationPicker({icon = library_layout,label = (0,external_wp_i18n_namespaceObject.__) X-Ref |
No description |
usePatternsSetup(clientId, blockName, filterPatternsFn) X-Ref |
Internal dependencies |
block_pattern_setup_BlockPattern({pattern,onSelect,showTitles}) X-Ref |
No description |
BlockPatternSlide({active,className,pattern,minHeight}) X-Ref |
No description |
VariationsButtons({className,onSelectVariation,selectedValue,variations}) X-Ref |
No description |
VariationsDropdown({className,onSelectVariation,selectedValue,variations}) X-Ref |
No description |
VariationsToggleGroupControl({className,onSelectVariation,selectedValue,variations}) X-Ref |
No description |
__experimentalBlockVariationTransforms({blockClientId}) X-Ref |
No description |
ColorPaletteControl({onChange,value,...otherProps}) X-Ref |
Internal dependencies |
DateFormatPicker({format,defaultFormat,onChange}) 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({format,onChange}) X-Ref |
No description |
ColorGradientSettingsDropdown({colors,disableCustomColors,disableCustomGradients,enableAlpha,gradients,settings,__experimentalIsRenderedInSidebar,...props}) X-Ref |
No description |
useSaveImage({crop,rotation,url,id,onSaveImage,onFinishEditing}) X-Ref |
No description |
useTransformImage({url,naturalWidth,naturalHeight}) X-Ref |
WordPress dependencies |
editImage(event) X-Ref |
No description |
ImageEditingProvider({id,url,naturalWidth,naturalHeight,onFinishEditing,onSaveImage,children}) X-Ref |
No description |
AspectRatioGroup({aspectRatios,isDisabled,label,onClick,value}) X-Ref |
No description |
ratioToNumber(str) X-Ref |
No description |
presetRatioAsNumber({ratio,...rest}) X-Ref |
No description |
AspectRatioDropdown({toggleProps}) 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 |
__esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) X-Ref |
No description |
accept(f) X-Ref |
No description |
__runInitializers(thisArg, initializers, value) X-Ref |
No description |
__propKey(x) X-Ref |
No description |
__setFunctionName(f, name, prefix) 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 |
__spreadArray(to, from, pack) X-Ref |
No description |
__await(v) X-Ref |
No description |
__asyncGenerator(thisArg, _arguments, generator) X-Ref |
No description |
awaitReturn(f) X-Ref |
No description |
verb(n, f) 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, state, kind, f) X-Ref |
No description |
__classPrivateFieldSet(receiver, state, value, kind, f) X-Ref |
No description |
__classPrivateFieldIn(state, receiver) X-Ref |
No description |
__addDisposableResource(env, value, async) X-Ref |
No description |
__disposeResources(env) X-Ref |
No description |
fail(e) X-Ref |
No description |
next() 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 |
getMediaZoom(mediaSize) X-Ref |
Compute media zoom. We fit the media into the container with "max-width: 100%; max-height: 100%;" |
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 |
getInitialCropFromCroppedAreaPercentages(croppedAreaPercentages, mediaSize, rotation, cropSize, minZoom, maxZoom) X-Ref |
Compute crop and zoom from the croppedAreaPercentages. |
getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize) X-Ref |
Compute zoom from the croppedAreaPixels |
getInitialCropFromCroppedAreaPixels(croppedAreaPixels, mediaSize, rotation, cropSize, minZoom, maxZoom) X-Ref |
Compute crop and zoom from the croppedAreaPixels |
getCenter(a, b) X-Ref |
Return the point that is the center of point a and b |
getRadianAngle(degreeValue) X-Ref |
No description |
rotateSize(width, height, rotation) X-Ref |
Returns the new bounding area of a rotated rectangle. |
clamp(value, min, max) X-Ref |
Clamp value between min and max |
classNames() X-Ref |
Combine multiple class names into a single string. |
Cropper() X-Ref |
No description |
ImageCropper({url,width,height,naturalHeight,naturalWidth,borderProps}) X-Ref |
No description |
ZoomDropdown() X-Ref |
No description |
RotationButton() X-Ref |
Internal dependencies |
FormControls() X-Ref |
No description |
ImageEditor({id,url,width,height,naturalHeight,naturalWidth,onSaveImage,onFinishEditing,borderProps}) X-Ref |
No description |
useDimensionHandler(customHeight, customWidth, defaultHeight, defaultWidth, onChange) X-Ref |
WordPress dependencies |
ImageSizeControl({imageSizeHelp,imageWidth,imageHeight,imageSizeOptions = [],isResizable = true,slug,width,height,onChange,onChangeImage = image_size_control_noop}) X-Ref |
No description |
LinkViewerURL({url,urlLabel,className}) X-Ref |
No description |
LinkViewer({className,linkClassName,onEditLinkClick,url,urlLabel,...props}) X-Ref |
No description |
LinkEditor({autocompleteRef,className,onChangeInputValue,value,...props}) X-Ref |
No description |
MediaPlaceholder({value = {},allowedTypes,className,icon,labels = {},mediaPreview,notices,isAppender,accept,addToGallery,multiple = false,handleUpload = true,disableDropZone,disableMediaButtons,onError,onSelect,onCancel,onSelectURL,onToggleFeaturedImage,onDoubleClick,onFilesPreUpload = media_placeholder_noop,onHTMLDrop: deprecatedOnHTMLDrop,children,mediaLibraryButton,placeholder,style}) X-Ref |
No description |
recursivelyFindMediaFromBlocks(_blocks) X-Ref |
No description |
InlineToolbar({popoverAnchor}) X-Ref |
No description |
useMarkPersistent({html,value}) X-Ref |
Internal dependencies |
formatTypesSelector(select) X-Ref |
No description |
prefixSelectKeys(selected, prefix) X-Ref |
Set of all interactive content tags. |
getPrefixedSelectKeys(selected, prefix) X-Ref |
No description |
useFormatTypes({clientId,identifier,withoutInteractiveFormatting,allowedFormats}) 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 |
onInput(event) X-Ref |
When typing over a selection, the selection will we wrapped by a matching character pair. The second character is optional, it defaults to the first character. |
preventEventDiscovery(value) X-Ref |
WordPress dependencies |
findSelection(blocks) X-Ref |
No description |
inputRule() X-Ref |
No description |
onInput(event) X-Ref |
No description |
onInput(event) X-Ref |
When the browser is about to auto correct, add an undo level so the user can revert the change. param: {Object} props |
onKeydown(event) X-Ref |
Hook to prevent default behaviors for key combinations otherwise handled internally by RichText. |
onKeyDown(event) X-Ref |
No description |
onInput(event) X-Ref |
No description |
onKeyDown(event) X-Ref |
Internal dependencies |
addActiveFormats(value, activeFormats) X-Ref |
No description |
getMultilineTag(multiline) X-Ref |
Get the multiline tag based on the multiline prop. return: {string | undefined} The multiline tag. param: {?(string|boolean)} multiline The multiline prop. |
getAllowedFormats({allowedFormats,disableFormats}) 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. |
_onPaste(event) X-Ref |
No description |
pasteInline(content) X-Ref |
No description |
onKeyDown(event) X-Ref |
No description |
onKeyDownDeprecated(event) X-Ref |
No description |
onKeyDown(event) X-Ref |
No description |
onFocus() X-Ref |
Internal dependencies |
useEventListeners(props) X-Ref |
No description |
format_edit_Edit({onChange,onFocus,value,forwardedRef,settings}) X-Ref |
No description |
FormatEdit({formatTypes,...props}) X-Ref |
No description |
valueToHTMLString(value, multiline) X-Ref |
Internal dependencies |
Content({value,tagName: Tag,multiline,format,...props}) X-Ref |
No description |
RichTextMultiline({children,identifier,tagName: TagName = 'div',value = '',onChange,multiline,...props}, forwardedRef) X-Ref |
No description |
_onChange(newValues) X-Ref |
No description |
withDeprecations(Component) X-Ref |
Internal 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. return: {Object} Filtered props. param: {Object} props Props to filter. |
RichTextWrapper({children,tagName = 'div',value: adjustedValue = '',onChange: adjustedOnChange,isSelected: originalIsSelected,multiline,inlineToolbar,wrapperClassName,autocompleters,onReplace,placeholder,allowedFormats,withoutInteractiveFormatting,onRemove,onMerge,onSplit,__unstableOnSplitAtEnd: onSplitAtEnd,__unstableOnSplitAtDoubleLineEnd: onSplitAtDoubleLineEnd,identifier,preserveWhiteSpace,__unstablePastePlainText: pastePlainText,__unstableEmbedURLOnPaste,__unstableDisableFormats: disableFormats,disableLineBreaks,__unstableAllowPrefixTransformations,readOnly,...props}, forwardedRef) X-Ref |
No description |
addEditorOnlyFormats(value) X-Ref |
No description |
removeEditorOnlyFormats(value) X-Ref |
No description |
addInvisibleFormats(value) X-Ref |
No description |
onFocus() X-Ref |
No description |
ResponsiveBlockControlLabel({property,viewport,desc}) X-Ref |
No description |
ResponsiveBlockControl(props) X-Ref |
No description |
RichTextShortcut({character,type,onUse}) X-Ref |
Internal dependencies |
callback(event) X-Ref |
No description |
RichTextToolbarButton({name,shortcutType,shortcutCharacter,...props}) X-Ref |
No description |
__unstableRichTextInputEvent({inputType,onInput}) X-Ref |
Internal dependencies |
callback(event) X-Ref |
No description |
ToolSelector(props, ref) X-Ref |
No description |
UnitControl({units: unitsProp,...props}) X-Ref |
Internal dependencies |
Class: URLInputButton - X-Ref
PreviewOptions() X-Ref |
WordPress dependencies |
useResizeCanvas(deviceType) X-Ref |
Function to resize the editor window. return: {Object} Inline styles to be added to resizable container. param: {string} deviceType Used for determining the size of the container (e.g. Desktop, Tablet, Mobile) |
SkipToSelectedBlock() X-Ref |
MultiSelectionInspector() X-Ref |
No description |
InspectorControlsTabs({blockName,clientId,hasBlockStyles,tabs}) X-Ref |
No description |
getShowTabs(blockName, tabSettings = {}) X-Ref |
No description |
useInspectorControlsTabs(blockName) X-Ref |
No description |
useBlockInspectorAnimationSettings(blockType) X-Ref |
Internal dependencies |
BlockQuickNavigation({clientIds,onSelect}) X-Ref |
No description |
BlockQuickNavigationItem({clientId,onSelect}) X-Ref |
No description |
BlockStylesPanel({clientId}) X-Ref |
No description |
BlockInspectorLockedBlocks({topLevelLockedBlock}) X-Ref |
No description |
CopyHandler(props) X-Ref |
param: {Object} props |
InserterLibrary({rootClientId,clientId,isAppender,showInserterHelpPanel,showMostUsedBlocks = false,__experimentalInsertionIndex,__experimentalInitialTab,__experimentalInitialCategory,__experimentalFilterValue,onPatternCategorySelection,onSelect = library_noop,shouldFocusBlock = false,onClose}, ref) X-Ref |
No description |
PublicInserterLibrary(props, ref) 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. |
useTypewriter() X-Ref |
No description |
onScrollResize() X-Ref |
No description |
onKeyDown(event) X-Ref |
No description |
maintainCaretPosition({keyCode}) 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({children}) X-Ref |
No description |
addToBlockType(renderedBlocks, blockName, uniqueId) X-Ref |
Immutably adds an unique identifier to a set scoped for a given block type. return: {Object} The list of rendered blocks grouped by block name. 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. |
RecursionProvider({children,uniqueId,blockName = ''}) X-Ref |
A React context provider for use with the `useHasRecursion` hook to prevent recursive renders. Wrap block content with this provider and provide the same `uniqueId` prop as used with `useHasRecursion`. return: {JSX.Element} A React element. param: {Object} props param: {*} props.uniqueId Any value that acts as a unique identifier for a block instance. param: {string} props.blockName Optional block name. param: {JSX.Element} props.children React children. |
useHasRecursion(uniqueId, blockName = '') 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. Use this with the `RecursionProvider` component, using the same `uniqueId` value for both the hook and the provider. return: {boolean} A boolean describing whether the provided id has already been rendered. param: {*} uniqueId Any value that acts as a unique identifier for a block instance. param: {string} blockName Optional block name. |
InspectorPopoverHeader({title,help,actions = [],onClose}) X-Ref |
No description |
PublishDateTimePicker({onClose,onChange,showPopoverHeaderActions,isCompact,currentDate,...additionalProps}, ref) X-Ref |
No description |
PublicPublishDateTimePicker(props, ref) X-Ref |
No description |
useHasImageSettingsPanel(name, value, inheritedValue) X-Ref |
No description |
ImageSettingsPanel({onChange,value,inheritedValue,panelId}) X-Ref |
No description |
AdvancedPanel({value,onChange,inheritedValue = value}) X-Ref |
No description |
handleOnChange(newValue) X-Ref |
No description |
handleOnBlur(event) X-Ref |
No description |
memize(fn, options) X-Ref |
Accepts a function to be memoized, and returns a new memoized function, with optional options. return: {((...args: Parameters<F>) => ReturnType<F>) & MemizeMemoizedFunction} Memoized function. param: {F} fn Function to memoize. param: {MemizeOptions} [options] Options object. |
memoized() X-Ref |
No description |
getTranslation(key) X-Ref |
Get the translation for a given global styles key. return: {string|undefined} A translated key or undefined if no translation exists. param: {string} key A key representing a path to a global style property or setting. |
deepCompare(changedObject, originalObject, parentPath = '') X-Ref |
A deep comparison of two objects, optimized for comparing global styles. return: {string[]} An array of paths whose values have changed. param: {Object} changedObject The changed object to compare. param: {Object} originalObject The original object to compare against. param: {string} parentPath A key/value pair object of block names and their rendered titles. |
getGlobalStylesChangelist(next, previous) X-Ref |
Returns an array of translated summarized global styles changes. Results are cached using a Map() key of `JSON.stringify( { next, previous } )`. return: {Array[]} A 2-dimensional array of tuples: [ "group", "translated change" ]. param: {Object} next The changed object to compare. param: {Object} previous The original object to compare against. |
getGlobalStylesChanges(next, previous, options = {}) X-Ref |
From a getGlobalStylesChangelist() result, returns an array of translated global styles changes, grouped by type. The types are 'blocks', 'elements', 'settings', and 'styles'. return: {string[]} An array of translated changes. param: {Object} next The changed object to compare. param: {Object} previous The original object to compare against. param: {{maxResults:number}} options Options. maxResults: results to return before truncating. |
addValuesForElement(element, values, innerBlocks) X-Ref |
No description |
addValuesForElements(children, ...args) X-Ref |
No description |
addValuesForBlocks(values, blocks) X-Ref |
No description |
getRichTextValues(blocks = []) X-Ref |
No description |
ResizableBoxPopover({clientId,resizableBoxProps,...props}) X-Ref |
Internal dependencies |
BlockRemovalWarningModal({rules}) X-Ref |
No description |
ScaleTool({panelId,value,onChange,options = DEFAULT_SCALE_OPTIONS,defaultValue = DEFAULT_SCALE_OPTIONS[0].value,isShownByDefault = true}) X-Ref |
A tool to select the CSS object-fit property for the image. return: {import('react').ReactElement} The scale tool. param: {ScaleToolProps} props |
extends_extends() X-Ref |
No description |
memoize(fn) X-Ref |
No description |
sheetForTag(tag) X-Ref |
No description |
createStyleElement(options) X-Ref |
No description |
StyleSheet(options) X-Ref |
No description |
hash(value, length) X-Ref |
return: {number} param: {string} value param: {number} length |
trim(value) X-Ref |
return: {string} param: {string} value |
Utility_match(value, pattern) X-Ref |
return: {string?} param: {string} value param: {RegExp} pattern |
Utility_replace(value, pattern, replacement) X-Ref |
return: {string} param: {string} value param: {(string|RegExp)} pattern param: {string} replacement |
indexof(value, search) X-Ref |
return: {number} param: {string} value param: {string} search |
Utility_charat(value, index) X-Ref |
return: {number} param: {string} value param: {number} index |
Utility_substr(value, begin, end) X-Ref |
return: {string} param: {string} value param: {number} begin param: {number} end |
Utility_strlen(value) X-Ref |
return: {number} param: {string} value |
Utility_sizeof(value) X-Ref |
return: {number} param: {any[]} value |
Utility_append(value, array) X-Ref |
return: {any} param: {any} value param: {any[]} array |
Utility_combine(array, callback) X-Ref |
return: {string} param: {string[]} array param: {function} callback |
node(value, root, parent, type, props, children, length) X-Ref |
param: {string} value param: {object | null} root param: {object | null} parent param: {string} type param: {string[] | string} props param: {object[] | string} children param: {number} length |
Tokenizer_copy(root, props) X-Ref |
return: {object} param: {object} root param: {object} props |
Tokenizer_char() X-Ref |
return: {number} |
prev() X-Ref |
return: {number} |
next() X-Ref |
return: {number} |
peek() X-Ref |
return: {number} |
caret() X-Ref |
return: {number} |
slice(begin, end) X-Ref |
return: {string} param: {number} begin param: {number} end |
token(type) X-Ref |
return: {number} param: {number} type |
alloc(value) X-Ref |
return: {any[]} param: {string} value |
dealloc(value) X-Ref |
return: {any} param: {any} value |
delimit(type) X-Ref |
return: {string} param: {number} type |
Tokenizer_tokenize(value) X-Ref |
return: {string[]} param: {string} value |
whitespace(type) X-Ref |
return: {string} param: {number} type |
tokenizer(children) X-Ref |
return: {string[]} param: {string[]} children |
escaping(index, count) X-Ref |
return: {string} param: {number} index param: {number} count |
delimiter(type) X-Ref |
return: {number} param: {number} type |
commenter(type, index) X-Ref |
return: {number} param: {number} type param: {number} index |
identifier(index) X-Ref |
No description |
Serializer_serialize(children, callback) X-Ref |
return: {string} param: {object[]} children param: {function} callback |
Serializer_stringify(element, index, children, callback) X-Ref |
return: {string} param: {object} element param: {number} index param: {object[]} children param: {function} callback |
middleware(collection) X-Ref |
return: {function} param: {function[]} collection |
rulesheet(callback) X-Ref |
return: {function} param: {function} callback |
prefixer(element, index, children, callback) X-Ref |
param: {object} element param: {number} index param: {object[]} children param: {function} callback |
namespace(element) X-Ref |
param: {object} element param: {number} index param: {object[]} children |
compile(value) X-Ref |
return: {object[]} param: {string} value |
Parser_parse(value, root, parent, rule, rules, rulesets, pseudo, points, declarations) X-Ref |
return: {object} param: {string} value param: {object} root param: {object?} parent param: {string[]} rule param: {string[]} rules param: {string[]} rulesets param: {number[]} pseudo param: {number[]} points param: {string[]} declarations |
ruleset(value, root, parent, index, offset, rules, points, type, props, children, length) X-Ref |
return: {object} param: {string} value param: {object} root param: {object?} parent param: {number} index param: {number} offset param: {string[]} rules param: {number[]} points param: {string} type param: {string[]} props param: {string[]} children param: {number} length |
Parser_comment(value, root, parent) X-Ref |
return: {object} param: {number} value param: {object} root param: {object?} parent |
declaration(value, root, parent, length) X-Ref |
return: {object} param: {string} value param: {object} root param: {object?} parent param: {number} length |
emotion_cache_browser_esm_prefix(value, length) X-Ref |
No description |
murmur2(str) X-Ref |
No description |
handleInterpolation(mergedProps, registered, interpolation) X-Ref |
No description |
createStringFromObject(mergedProps, registered, obj) X-Ref |
No description |
withTheme(Component) X-Ref |
No description |
emotion_utils_browser_esm_getRegisteredStyles(registered, registeredStyles, classNames) X-Ref |
No description |
_EMOTION_STRINGIFIED_CSS_ERROR__() X-Ref |
No description |
WidthHeightTool({panelId,value = {},onChange = () X-Ref |
Component that renders controls to edit the dimensions of an image or container. return: {import('react').ReactElement} The width and height tool. param: {WidthHeightToolProps} props The component props. |
DimensionsTool({panelId,value = {},onChange = () X-Ref |
No description |
ResolutionTool({panelId,value,onChange,options = DEFAULT_SIZE_OPTIONS,defaultValue = DEFAULT_SIZE_OPTIONS[0].value,isShownByDefault = true}) 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 |
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 |
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. return: {boolean} True if the event is supported. param: {string} eventNameSuffix Event name, e.g. "click". param: {?boolean} capture Check if the capture phase 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 |
isFileInArray(file, arr) X-Ref |
No description |
excludeSelector(selector, excludeArr) X-Ref |
No description |
ValueParser(value) X-Ref |
stringifyNode(node, custom) X-Ref |
No description |
stringify(nodes, custom) X-Ref |
No description |
likeNumber(value) X-Ref |
No description |
Generated : Sat Dec 21 08:20:01 2024 | Cross-referenced by PHPXref |