Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docgen: Replace doctrine with comment-parser #28615

Merged
merged 10 commits into from
Feb 15, 2021
54 changes: 27 additions & 27 deletions docs/designers-developers/developers/data/data-core-block-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ _Parameters_

_Returns_

- `?Object`: Block attributes.
- `Object?`: Block attributes.

<a name="getBlockCount" href="#getBlockCount">#</a> **getBlockCount**

Expand Down Expand Up @@ -259,7 +259,7 @@ _Parameters_

- _state_ `Object`: Editor state.
- _clientId_ `string`: Block from which to find root client ID.
- _blockName_ `(string|Array<string>)`: Block name(s) to filter.
- _blockName_ `string|string[]`: Block name(s) to filter.
- _ascending_ `boolean`: Order results from bottom to top (true) or top to bottom (false).

_Returns_
Expand Down Expand Up @@ -300,7 +300,7 @@ _Parameters_

_Returns_

- `Array<Object>`: Post blocks.
- `Object[]`: Post blocks.

<a name="getBlocksByClientId" href="#getBlocksByClientId">#</a> **getBlocksByClientId**

Expand All @@ -310,11 +310,11 @@ objects.
_Parameters_

- _state_ `Object`: Editor state.
- _clientIds_ `Array<string>`: Client IDs for which blocks are to be returned.
- _clientIds_ `string[]`: Client IDs for which blocks are to be returned.

_Returns_

- `Array<WPBlock>`: Block objects.
- `WPBlock[]`: Block objects.

<a name="getBlockSelectionEnd" href="#getBlockSelectionEnd">#</a> **getBlockSelectionEnd**

Expand Down Expand Up @@ -363,7 +363,7 @@ _Parameters_

_Returns_

- `Array<WPEditorTransformItem>`: Items that appear in inserter.
- `WPEditorTransformItem[]`: Items that appear in inserter.

_Type Definition_

Expand Down Expand Up @@ -417,7 +417,7 @@ _Parameters_

_Returns_

- `Array<string>`: Array of dragged block client ids.
- `string[]`: Array of dragged block client ids.

<a name="getFirstMultiSelectedBlockClientId" href="#getFirstMultiSelectedBlockClientId">#</a> **getFirstMultiSelectedBlockClientId**

Expand Down Expand Up @@ -466,7 +466,7 @@ _Parameters_

_Returns_

- `Array<WPEditorInserterItem>`: Items that appear in inserter.
- `WPEditorInserterItem[]`: Items that appear in inserter.

_Type Definition_

Expand All @@ -480,7 +480,7 @@ _Properties_
- _title_ `string`: Title of the item, as it appears in the inserter.
- _icon_ `string`: Dashicon for the item, as it appears in the inserter.
- _category_ `string`: Block category that the item is associated with.
- _keywords_ `Array<string>`: Keywords that can be searched to find this item.
- _keywords_ `string[]`: Keywords that can be searched to find this item.
- _isDisabled_ `boolean`: Whether or not the user should be prevented from inserting this item.
- _frecency_ `number`: Heuristic that combines frequency and recency.

Expand Down Expand Up @@ -665,7 +665,7 @@ _Parameters_

_Returns_

- `(||null)`: Initial position.
- `0|-1|null`: Initial position.

<a name="getSelectionEnd" href="#getSelectionEnd">#</a> **getSelectionEnd**

Expand Down Expand Up @@ -1060,7 +1060,7 @@ Generator that triggers an action used to duplicate a list of blocks.

_Parameters_

- _clientIds_ `Array<string>`:
- _clientIds_ `string[]`:
- _updateSelection_ `boolean`:

<a name="enterFormattedText" href="#enterFormattedText">#</a> **enterFormattedText**
Expand Down Expand Up @@ -1135,11 +1135,11 @@ be inserted, optionally at a specific index respective a root block list.

_Parameters_

- _blocks_ `Array<Object>`: Block objects to insert.
- _blocks_ `Object[]`: Block objects to insert.
- _index_ `?number`: Index at which block should be inserted.
- _rootClientId_ `?string`: Optional root client ID of block list on which to insert.
- _updateSelection_ `?boolean`: If true block selection will be updated. If false, block selection will not change. Defaults to true.
- _initialPosition_ `(||null)`: Initial focus position. Setting it to null prevent focusing the inserted block.
- _initialPosition_ `0|-1|null`: Initial focus position. Setting it to null prevent focusing the inserted block.
- _meta_ `?Object`: Optional Meta values to be passed to the action object.

_Returns_
Expand Down Expand Up @@ -1219,7 +1219,7 @@ replacing.

_Parameters_

- _blocks_ `Array<Object>`: Array of block objects.
- _blocks_ `Object[]`: Array of block objects.

_Returns_

Expand All @@ -1246,7 +1246,7 @@ the set of specified client IDs are to be removed.

_Parameters_

- _clientIds_ `(string|Array<string>)`: Client IDs of blocks to remove.
- _clientIds_ `string|string[]`: Client IDs of blocks to remove.
- _selectPrevious_ `boolean`: True if the previous block should be selected when a block is removed.

<a name="replaceBlock" href="#replaceBlock">#</a> **replaceBlock**
Expand All @@ -1256,8 +1256,8 @@ with one or more replacement blocks.

_Parameters_

- _clientId_ `(string|Array<string>)`: Block client ID to replace.
- _block_ `(Object|Array<Object>)`: Replacement block(s).
- _clientId_ `(string|string[])`: Block client ID to replace.
- _block_ `(Object|Object[])`: Replacement block(s).

_Returns_

Expand All @@ -1270,10 +1270,10 @@ one or more replacement blocks.

_Parameters_

- _clientIds_ `(string|Array<string>)`: Block client ID(s) to replace.
- _blocks_ `(Object|Array<Object>)`: Replacement block(s).
- _clientIds_ `(string|string[])`: Block client ID(s) to replace.
- _blocks_ `(Object|Object[])`: Replacement block(s).
- _indexToSelect_ `number`: Index of replacement block to select.
- _initialPosition_ `(||null)`: Index of caret after in the selected block after the operation.
- _initialPosition_ `0|-1|null`: Index of caret after in the selected block after the operation.
- _meta_ `?Object`: Optional Meta values to be passed to the action object.

<a name="replaceInnerBlocks" href="#replaceInnerBlocks">#</a> **replaceInnerBlocks**
Expand All @@ -1284,9 +1284,9 @@ specified client ID should be replaced.
_Parameters_

- _rootClientId_ `string`: Client ID of the block whose InnerBlocks will re replaced.
- _blocks_ `Array<Object>`: Block objects to insert as new InnerBlocks
- _blocks_ `Object[]`: Block objects to insert as new InnerBlocks
- _updateSelection_ `?boolean`: If true block selection will be updated. If false, block selection will not change. Defaults to false.
- _initialPosition_ `(||null)`: Initial block position.
- _initialPosition_ `0|-1|null`: Initial block position.

_Returns_

Expand All @@ -1311,7 +1311,7 @@ _Parameters_

- _selectionStart_ `WPBlockSelection`: The selection start.
- _selectionEnd_ `WPBlockSelection`: The selection end.
- _initialPosition_ `(||null)`: Initial block position.
- _initialPosition_ `0|-1|null`: Initial block position.

_Returns_

Expand All @@ -1327,7 +1327,7 @@ reflects a reverse selection.
_Parameters_

- _clientId_ `string`: Block client ID.
- _initialPosition_ `(||null)`: Optional initial position. Pass as -1 to reflect reverse selection.
- _initialPosition_ `0|-1|null`: Optional initial position. Pass as -1 to reflect reverse selection.

_Returns_

Expand Down Expand Up @@ -1373,7 +1373,7 @@ Generator that triggers an action used to enable or disable the block moving mod

_Parameters_

- _hasBlockMovingClientId_ `(string|null)`: Enable/Disable block moving mode.
- _hasBlockMovingClientId_ `string|null`: Enable/Disable block moving mode.

<a name="setHasControlledInnerBlocks" href="#setHasControlledInnerBlocks">#</a> **setHasControlledInnerBlocks**

Expand Down Expand Up @@ -1425,7 +1425,7 @@ Returns an action object used in signalling that the user has begun to drag bloc

_Parameters_

- _clientIds_ `Array<string>`: An array of client ids being dragged
- _clientIds_ `string[]`: An array of client ids being dragged

_Returns_

Expand Down Expand Up @@ -1534,7 +1534,7 @@ attributes with the specified client IDs have been updated.

_Parameters_

- _clientIds_ `(string|Array<string>)`: Block client IDs.
- _clientIds_ `string|string[]`: Block client IDs.
- _attributes_ `Object`: Block attributes to be merged.

_Returns_
Expand Down
32 changes: 16 additions & 16 deletions docs/designers-developers/developers/data/data-core-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ _Parameters_

_Returns_

- `?Array`: Block Styles.
- `Array?`: Block Styles.

<a name="getBlockSupport" href="#getBlockSupport">#</a> **getBlockSupport**

Expand Down Expand Up @@ -45,7 +45,7 @@ _Parameters_

_Returns_

- `?Object`: Block Type.
- `Object?`: Block Type.

<a name="getBlockTypes" href="#getBlockTypes">#</a> **getBlockTypes**

Expand All @@ -71,7 +71,7 @@ _Parameters_

_Returns_

- `(Array<WPBlockVariation>|void)`: Block variations.
- `(WPBlockVariation[]|void)`: Block variations.

<a name="getCategories" href="#getCategories">#</a> **getCategories**

Expand All @@ -83,7 +83,7 @@ _Parameters_

_Returns_

- `Array<WPBlockCategory>`: Categories list.
- `WPBlockCategory[]`: Categories list.

<a name="getChildBlockNames" href="#getChildBlockNames">#</a> **getChildBlockNames**

Expand Down Expand Up @@ -120,7 +120,7 @@ _Parameters_

_Returns_

- `?string`: Default block name.
- `string?`: Default block name.

<a name="getDefaultBlockVariation" href="#getDefaultBlockVariation">#</a> **getDefaultBlockVariation**

Expand Down Expand Up @@ -149,7 +149,7 @@ _Parameters_

_Returns_

- `?string`: Name of the block for handling non-block content.
- `string?`: Name of the block for handling non-block content.

<a name="getGroupingBlockName" href="#getGroupingBlockName">#</a> **getGroupingBlockName**

Expand All @@ -161,7 +161,7 @@ _Parameters_

_Returns_

- `?string`: Name of the block for handling unregistered blocks.
- `string?`: Name of the block for handling unregistered blocks.

<a name="getUnregisteredFallbackBlockName" href="#getUnregisteredFallbackBlockName">#</a> **getUnregisteredFallbackBlockName**

Expand All @@ -173,7 +173,7 @@ _Parameters_

_Returns_

- `?string`: Name of the block for handling unregistered blocks.
- `string?`: Name of the block for handling unregistered blocks.

<a name="hasBlockSupport" href="#hasBlockSupport">#</a> **hasBlockSupport**

Expand Down Expand Up @@ -229,7 +229,7 @@ _Parameters_

_Returns_

- `Array<Object>`: Whether block type matches search term.
- `Object[]`: Whether block type matches search term.

<!-- END TOKEN(Autogenerated selectors|../../../../packages/blocks/src/store/selectors.js) -->

Expand Down Expand Up @@ -258,7 +258,7 @@ Returns an action object used in signalling that new block styles have been adde
_Parameters_

- _blockName_ `string`: Block name.
- _styles_ `(Array|Object)`: Block styles.
- _styles_ `Array|Object`: Block styles.

_Returns_

Expand All @@ -270,7 +270,7 @@ Returns an action object used in signalling that block types have been added.

_Parameters_

- _blockTypes_ `(Array|Object)`: Block types received.
- _blockTypes_ `Array|Object`: Block types received.

_Returns_

Expand All @@ -283,7 +283,7 @@ Returns an action object used in signalling that new block variations have been
_Parameters_

- _blockName_ `string`: Block name.
- _variations_ `(WPBlockVariation|Array<WPBlockVariation>)`: Block variations.
- _variations_ `WPBlockVariation|WPBlockVariation[]`: Block variations.

_Returns_

Expand All @@ -308,7 +308,7 @@ Returns an action object used in signalling that block styles have been removed.
_Parameters_

- _blockName_ `string`: Block name.
- _styleNames_ `(Array|string)`: Block style names.
- _styleNames_ `Array|string`: Block style names.

_Returns_

Expand All @@ -320,7 +320,7 @@ Returns an action object used to remove a registered block type.

_Parameters_

- _names_ `(string|Array)`: Block name.
- _names_ `string|Array`: Block name.

_Returns_

Expand All @@ -333,7 +333,7 @@ Returns an action object used in signalling that block variations have been remo
_Parameters_

- _blockName_ `string`: Block name.
- _variationNames_ `(string|Array<string>)`: Block variation names.
- _variationNames_ `string|string[]`: Block variation names.

_Returns_

Expand All @@ -345,7 +345,7 @@ Returns an action object used to set block categories.

_Parameters_

- _categories_ `Array<Object>`: Block categories.
- _categories_ `Object[]`: Block categories.

_Returns_

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ _Parameters_

_Returns_

- `Array<string>`: Active meta box locations.
- `string[]`: Active meta box locations.

<a name="getAllMetaBoxes" href="#getAllMetaBoxes">#</a> **getAllMetaBoxes**

Expand Down Expand Up @@ -325,7 +325,7 @@ name(s) should be hidden.

_Parameters_

- _blockNames_ `Array<string>`: Names of block types to hide.
- _blockNames_ `string[]`: Names of block types to hide.

_Returns_

Expand Down Expand Up @@ -424,7 +424,7 @@ name(s) should be shown.

_Parameters_

- _blockNames_ `Array<string>`: Names of block types to show.
- _blockNames_ `string[]`: Names of block types to show.

_Returns_

Expand Down
Loading