-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a catalog list of private APIs
- Loading branch information
Showing
1 changed file
with
341 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,341 @@ | ||
# Gutenberg Private APIs | ||
|
||
This is an overview of private APIs exposed by Gutenberg packages. Its purpose is to present a picture of how many private APIs we have, and provide information about the stability of each API and about the roadmap for its stabilization and making it public. | ||
|
||
## data | ||
|
||
The registry has two private methods: | ||
- `privateActionsOf` | ||
- `privateSelectorsOf` | ||
|
||
Every store has a private API for registering private selectors/actions: | ||
- `privateActions` | ||
- `registerPrivateActions` | ||
- `privateSelectors` | ||
- `registerPrivateSelectors` | ||
|
||
## blocks | ||
|
||
Private exports: | ||
- `isUnmodifiedBlockContent` (added Sep 2024, one usage in `block-editor`) | ||
|
||
### `core/blocks` store | ||
|
||
Private actions: | ||
- `addBlockBindingsSource` | ||
- `removeBlockBindingsSource` | ||
- `addBootstrappedBlockType` | ||
- `addUnprocessedBlockType` | ||
|
||
Private selectors: | ||
- `getAllBlockBindingsSources` | ||
- `getBlockBindingsSource` | ||
- `getBootstrappedBlockType` | ||
- `getSupportedStyles` | ||
- `getUnprocessedBlockTypes` | ||
- `hasContentRoleAttribute` | ||
|
||
## components | ||
|
||
Private exports: | ||
- `__experimentalPopoverLegacyPositionToPlacement` | ||
- `ComponentsContext` | ||
- `Tabs` | ||
- `Theme` | ||
- `Menu` | ||
- `kebabCase` | ||
|
||
## commands | ||
|
||
Private exports: | ||
- `useCommandContext` (added May 2023 in #50543) | ||
|
||
### `core/commands` store | ||
|
||
Private actions: | ||
- `setContext` (added together with `useCommandContext`) | ||
|
||
## preferences | ||
|
||
Private exports: (added in Jan 2024 in #57639) | ||
- `PreferenceBaseOption` | ||
- `PreferenceToggleControl` | ||
- `PreferencesModal` | ||
- `PreferencesModalSection` | ||
- `PreferencesModalTabs` | ||
|
||
There is only one publicly exported component! | ||
- `PreferenceToggleMenuItem` | ||
|
||
## block-editor | ||
|
||
Private exports: | ||
- `AdvancedPanel` | ||
- `BackgroundPanel` | ||
- `BorderPanel` | ||
- `ColorPanel` | ||
- `DimensionsPanel` | ||
- `FiltersPanel` | ||
- `GlobalStylesContext` | ||
- `ImageSettingsPanel` | ||
- `TypographyPanel` | ||
- `areGlobalStyleConfigsEqual` | ||
- `getBlockCSSSelector` | ||
- `getBlockSelectors` | ||
- `getGlobalStylesChanges` | ||
- `getLayoutStyles` | ||
- `toStyles` | ||
- `useGlobalSetting` | ||
- `useGlobalStyle` | ||
- `useGlobalStylesOutput` | ||
- `useGlobalStylesOutputWithConfig` | ||
- `useGlobalStylesReset` | ||
- `useHasBackgroundPanel` | ||
- `useHasBorderPanel` | ||
- `useHasBorderPanelControls` | ||
- `useHasColorPanel` | ||
- `useHasDimensionsPanel` | ||
- `useHasFiltersPanel` | ||
- `useHasImageSettingsPanel` | ||
- `useHasTypographyPanel` | ||
- `useSettingsForBlockElement` | ||
- `ExperimentalBlockCanvas` | ||
- `ExperimentalBlockEditorProvider` | ||
- `getDuotoneFilter` | ||
- `getRichTextValues` | ||
- `PrivateQuickInserter` | ||
- `extractWords` | ||
- `getNormalizedSearchTerms` | ||
- `normalizeString` | ||
- `PrivateListView` | ||
- `ResizableBoxPopover` | ||
- `BlockInfo` | ||
- `useHasBlockToolbar` | ||
- `cleanEmptyObject` | ||
- `BlockQuickNavigation` | ||
- `LayoutStyle` | ||
- `BlockRemovalWarningModal` | ||
- `useLayoutClasses` | ||
- `useLayoutStyles` | ||
- `DimensionsTool` | ||
- `ResolutionTool` | ||
- `TabbedSidebar` | ||
- `TextAlignmentControl` | ||
- `usesContextKey` | ||
- `useFlashEditableBlocks` | ||
- `useZoomOut` | ||
- `globalStylesDataKey` | ||
- `globalStylesLinksDataKey` | ||
- `selectBlockPatternsKey` | ||
- `requiresWrapperOnCopy` | ||
- `PrivateRichText` | ||
- `PrivateInserterLibrary` | ||
- `reusableBlocksSelectKey` | ||
- `PrivateBlockPopover` | ||
- `PrivatePublishDateTimePicker` | ||
- `useSpacingSizes` | ||
- `useBlockDisplayTitle` | ||
- `__unstableBlockStyleVariationOverridesWithConfig` | ||
- `setBackgroundStyleDefaults` | ||
- `sectionRootClientIdKey` | ||
- `__unstableCommentIconFill` | ||
- `__unstableCommentIconToolbarFill` | ||
|
||
### `core/block-editor` store | ||
|
||
Private actions: | ||
- `__experimentalUpdateSettings` | ||
- `clearBlockRemovalPrompt` | ||
- `deleteStyleOverride` | ||
- `ensureDefaultBlock` | ||
- `expandBlock` | ||
- `hideBlockInterface` | ||
- `modifyContentLockBlock` | ||
- `privateRemoveBlocks` | ||
- `resetZoomLevel` | ||
- `setBlockRemovalRules` | ||
- `setInsertionPoint` | ||
- `setLastFocus` | ||
- `setOpenedBlockSettingsMenu` | ||
- `setStyleOverride` | ||
- `setZoomLevel` | ||
- `showBlockInterface` | ||
- `startDragging` | ||
- `stopDragging` | ||
- `stopEditingAsBlocks` | ||
|
||
Private selectors: | ||
- `getAllPatterns` | ||
- `getBlockRemovalRules` | ||
- `getBlockSettings` | ||
- `getBlockStyles` | ||
- `getBlockWithoutAttributes` | ||
- `getClosestAllowedInsertionPoint` | ||
- `getClosestAllowedInsertionPointForPattern` | ||
- `getContentLockingParent` | ||
- `getEnabledBlockParents` | ||
- `getEnabledClientIdsTree` | ||
- `getExpandedBlock` | ||
- `getInserterMediaCategories` | ||
- `getInsertionPoint` | ||
- `getLastFocus` | ||
- `getLastInsertedBlocksClientIds` | ||
- `getOpenedBlockSettingsMenu` | ||
- `getParentSectionBlock` | ||
- `getPatternBySlug` | ||
- `getRegisteredInserterMediaCategories` | ||
- `getRemovalPromptData` | ||
- `getReusableBlocks` | ||
- `getSectionRootClientId` | ||
- `getStyleOverrides` | ||
- `getTemporarilyEditingAsBlocks` | ||
- `getTemporarilyEditingFocusModeToRevert` | ||
- `getZoomLevel` | ||
- `hasAllowedPatterns` | ||
- `isBlockInterfaceHidden` | ||
- `isBlockSubtreeDisabled` | ||
- `isDragging` | ||
- `isResolvingPatterns` | ||
- `isSectionBlock` | ||
- `isZoomOut` | ||
|
||
## core-data | ||
|
||
Private exports: | ||
- `useEntityRecordsWithPermissions` | ||
|
||
### `core` store | ||
|
||
Private actions: | ||
- `receiveRegisteredPostMeta` | ||
|
||
Private selectors: | ||
- `getBlockPatternsForPostType` | ||
- `getEntityRecordPermissions` | ||
- `getEntityRecordsPermissions` | ||
- `getNavigationFallbackId` | ||
- `getRegisteredPostMeta` | ||
- `getUndoManager` | ||
|
||
## patterns (package created in Aug 2023 and has no public exports, everything is private) | ||
|
||
Private exports: | ||
- `OverridesPanel` | ||
- `CreatePatternModal` | ||
- `CreatePatternModalContents` | ||
- `DuplicatePatternModal` | ||
- `isOverridableBlock` | ||
- `hasOverridableBlocks` | ||
- `useDuplicatePatternProps` | ||
- `RenamePatternModal` | ||
- `PatternsMenuItems` | ||
- `RenamePatternCategoryModal` | ||
- `PatternOverridesControls` | ||
- `ResetOverridesControl` | ||
- `PatternOverridesBlockControls` | ||
- `useAddPatternCategory` | ||
- `PATTERN_TYPES` | ||
- `PATTERN_DEFAULT_CATEGORY` | ||
- `PATTERN_USER_CATEGORY` | ||
- `EXCLUDED_PATTERN_SOURCES` | ||
- `PATTERN_SYNC_TYPES` | ||
- `PARTIAL_SYNCING_SUPPORTED_BLOCKS` | ||
|
||
### `core/patterns` store | ||
|
||
Private actions: | ||
- `convertSyncedPatternToStatic` | ||
- `createPattern` | ||
- `createPatternFromFile` | ||
- `setEditingPattern` | ||
|
||
Private selectors: | ||
- `isEditingPattern` | ||
|
||
## block-library | ||
|
||
Private exports: | ||
- `BlockKeyboardShortcuts` | ||
|
||
## router (private exports only) | ||
|
||
Private exports: | ||
- `useHistory` | ||
- `useLocation` | ||
- `RouterProvider` | ||
|
||
## core-commands (private exports only) | ||
|
||
Private exports: | ||
- `useCommands` | ||
|
||
## editor | ||
|
||
Private exports: | ||
- `CreateTemplatePartModal` | ||
- `BackButton` | ||
- `EntitiesSavedStatesExtensible` | ||
- `Editor` | ||
- `EditorContentSlotFill` | ||
- `GlobalStylesProvider` | ||
- `mergeBaseAndUserConfigs` | ||
- `PluginPostExcerpt` | ||
- `PostCardPanel` | ||
- `PreferencesModal` | ||
- `usePostActions` | ||
- `ToolsMoreMenuGroup` | ||
- `ViewMoreMenuGroup` | ||
- `ResizableEditor` | ||
- `registerCoreBlockBindingsSources` | ||
- `interfaceStore` | ||
- `ActionItem` | ||
- `ComplementaryArea` | ||
- `ComplementaryAreaMoreMenuItem` | ||
- `FullscreenMode` | ||
- `InterfaceSkeleton` | ||
- `NavigableRegion` | ||
- `PinnedItems` | ||
|
||
### `core/editor` store | ||
|
||
Private actions: | ||
- `createTemplate` | ||
- `hideBlockTypes` | ||
- `registerEntityAction` | ||
- `registerPostTypeActions` | ||
- `removeTemplates` | ||
- `revertTemplate` | ||
- `saveDirtyEntities` | ||
- `setCurrentTemplateId` | ||
- `setIsReady` | ||
- `showBlockTypes` | ||
- `unregisterEntityAction` | ||
|
||
Private selectors: | ||
- `getEntityActions` | ||
- `getInserter` | ||
- `getInserterSidebarToggleRef` | ||
- `getListViewToggleRef` | ||
- `getPostBlocksByName` | ||
- `getPostIcon` | ||
- `hasPostMetaChanges` | ||
- `isEntityReady` | ||
|
||
## edit-post | ||
|
||
### `core/edit-post` store | ||
|
||
Private selectors: | ||
- `getEditedPostTemplateId` | ||
|
||
## edit-site | ||
|
||
### `core/edit-site` store | ||
|
||
Private actions: | ||
- `registerRoute` | ||
- `setEditorCanvasContainerView` | ||
|
||
Private selectors: | ||
- `getRoutes` | ||
- `getEditorCanvasContainerView` |