-
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.
- Loading branch information
1 parent
12dd949
commit 590e900
Showing
17 changed files
with
1,717 additions
and
2 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
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,55 @@ | ||
/** | ||
* Describes options for Block serialization. | ||
* | ||
* Used by the Block [serializer](./serializer.js). | ||
* | ||
* @public | ||
*/ | ||
export type BlockSerializationOptions = { | ||
/** | ||
* Whether to output HTML comments around blocks. | ||
*/ | ||
isCommentDelimited?: boolean; | ||
|
||
/** | ||
* Whether the serialization process has descended into the inner blocks. | ||
*/ | ||
isInnerBlocks?: boolean; | ||
|
||
/** | ||
* If a block is migrated from a deprecated version, skip logging the migration details. | ||
* | ||
* @internal | ||
*/ | ||
__unstableSkipMigrationLogs?: boolean; | ||
|
||
/** | ||
* Whether to skip autop when processing freeform content. | ||
* | ||
* @internal | ||
*/ | ||
__unstableSkipAutop?: boolean; | ||
}; | ||
|
||
/** | ||
* Describes options for Block parsing. | ||
* | ||
* Used by the block [parser](./parser/index.js). | ||
* | ||
* @public | ||
*/ | ||
export type BlockParseOptions = { | ||
/** | ||
* If a block is migrated from a deprecated version, skip logging the migration details. | ||
* | ||
* @internal | ||
*/ | ||
__unstableSkipMigrationLogs?: boolean; | ||
|
||
/** | ||
* Whether to skip autop when processing freeform content. | ||
* | ||
* @internal | ||
*/ | ||
__unstableSkipAutop?: boolean; | ||
}; |
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,67 @@ | ||
/** | ||
* Internal dependencies | ||
*/ | ||
import type { | ||
BlockCategory, | ||
BlockCollection, | ||
BlockVariation, | ||
BlockStyle, | ||
BlockType, | ||
} from '../types'; | ||
|
||
/** | ||
* The state of the `core/blocks` redux store. | ||
* | ||
* @public | ||
*/ | ||
export type BlockStoreState = { | ||
/** | ||
* Block variations by block name. | ||
*/ | ||
blockVariations: Record< string, BlockVariation[] >; | ||
|
||
/** | ||
* Block styles by block name. | ||
*/ | ||
blockStyles: Record< string, BlockStyle[] >; | ||
|
||
/** | ||
* Block type by name. | ||
*/ | ||
blockTypes: Record< string, BlockType< any > >; | ||
|
||
/** | ||
* The available block categories. | ||
*/ | ||
categories: BlockCategory[]; | ||
|
||
/** | ||
* The available collections. | ||
*/ | ||
collections: BlockCollection[]; | ||
|
||
/** | ||
* Name of the default block name. | ||
*/ | ||
defaultBlockName?: string; | ||
|
||
/** | ||
* Name of the block for handling non-block content. | ||
*/ | ||
freeformFallbackBlockName?: string; | ||
|
||
/** | ||
* Name of the block for handling unregistered blocks. | ||
*/ | ||
unregisteredFallbackBlockName?: string; | ||
|
||
/** | ||
* Name of the block for handling the grouping of blocks. | ||
*/ | ||
groupingBlockName?: string; | ||
|
||
/** | ||
* Unprocessed block types. | ||
*/ | ||
unprocessedBlockTypes?: any[]; | ||
}; |
Oops, something went wrong.