Skip to content

Commit

Permalink
Docs: Run Prettier after updating API in documentation (#33498)
Browse files Browse the repository at this point in the history
  • Loading branch information
gziolo authored Jul 19, 2021
1 parent ceaa2da commit 626f233
Show file tree
Hide file tree
Showing 45 changed files with 350 additions and 368 deletions.
3 changes: 3 additions & 0 deletions bin/api-docs/update-api-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,9 @@ glob.stream( [
{ shell: true }
);
}
await execa( 'npm', [ 'run', 'format', output ], {
shell: true,
} );
} catch ( error ) {
console.error( error );
process.exit( 1 );
Expand Down
1 change: 0 additions & 1 deletion docs/reference-guides/data/data-core-annotations.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ Nothing to document.

Nothing to document.


<!-- END TOKEN(Autogenerated actions|../../../packages/annotations/src/store/actions.js) -->
15 changes: 7 additions & 8 deletions docs/reference-guides/data/data-core-block-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ Returns the defined block template

_Parameters_

- _state_ `boolean`:
- _state_ `boolean`:

_Returns_

Expand Down Expand Up @@ -1027,7 +1027,7 @@ Returns whether the blocks matches the template or not.

_Parameters_

- _state_ `boolean`:
- _state_ `boolean`:

_Returns_

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

_Parameters_

- _clientIds_ `string[]`:
- _updateSelection_ `boolean`:
- _clientIds_ `string[]`:
- _updateSelection_ `boolean`:

### enterFormattedText

Expand Down Expand Up @@ -1109,15 +1109,15 @@ Generator used to insert an empty block before a given block.

_Parameters_

- _clientId_ `string`:
- _clientId_ `string`:

### insertBeforeBlock

Generator used to insert an empty block after a given block.

_Parameters_

- _clientId_ `string`:
- _clientId_ `string`:

### insertBlock

Expand Down Expand Up @@ -1146,7 +1146,7 @@ _Parameters_
- _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.
- _updateSelection_ `?boolean`: If true block selection will be updated. If false, block selection will not change. Defaults to true.
- _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.

Expand Down Expand Up @@ -1586,5 +1586,4 @@ _Parameters_

- _blocks_ `Array`: Array of blocks.


<!-- END TOKEN(Autogenerated actions|../../../packages/block-editor/src/store/actions.js) -->
1 change: 0 additions & 1 deletion docs/reference-guides/data/data-core-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -440,5 +440,4 @@ _Returns_

- `Object`: Action object.


<!-- END TOKEN(Autogenerated actions|../../../packages/blocks/src/store/actions.js) -->
1 change: 0 additions & 1 deletion docs/reference-guides/data/data-core-edit-post.md
Original file line number Diff line number Diff line change
Expand Up @@ -545,5 +545,4 @@ _Returns_

- `Object`: Action object.


<!-- END TOKEN(Autogenerated actions|../../../packages/edit-post/src/store/actions.js) -->
13 changes: 6 additions & 7 deletions docs/reference-guides/data/data-core-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ Return the current block list.

_Parameters_

- _state_ `Object`:
- _state_ `Object`:

_Returns_

Expand All @@ -379,7 +379,7 @@ Returns the current selection.

_Parameters_

- _state_ `Object`:
- _state_ `Object`:

_Returns_

Expand All @@ -393,7 +393,7 @@ Returns the current selection end.

_Parameters_

- _state_ `Object`:
- _state_ `Object`:

_Returns_

Expand All @@ -407,7 +407,7 @@ Returns the current selection start.

_Parameters_

- _state_ `Object`:
- _state_ `Object`:

_Returns_

Expand Down Expand Up @@ -1094,7 +1094,7 @@ _Related_

### autosave

Action generator used in signalling that the post should autosave. This
Action generator used in signalling that the post should autosave. This
includes server-side autosaving (default) and client-side (a.k.a. local)
autosaving (e.g. on the Web, the post might be committed to Session
Storage).
Expand Down Expand Up @@ -1364,7 +1364,7 @@ Action generator for saving the current post in the editor.

_Parameters_

- _options_ `Object`:
- _options_ `Object`:

### selectBlock

Expand Down Expand Up @@ -1537,5 +1537,4 @@ _Returns_

- `Object`: Action object.


<!-- END TOKEN(Autogenerated actions|../../../packages/editor/src/store/actions.js) -->
1 change: 0 additions & 1 deletion docs/reference-guides/data/data-core-keyboard-shortcuts.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,4 @@ _Returns_

- `Object`: action.


<!-- END TOKEN(Autogenerated actions|../../../packages/keyboard-shortcuts/src/store/actions.js) -->
1 change: 0 additions & 1 deletion docs/reference-guides/data/data-core-notices.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,5 +134,4 @@ _Returns_

- `Object`: Action object.


<!-- END TOKEN(Autogenerated actions|../../../packages/notices/src/store/actions.js) -->
1 change: 0 additions & 1 deletion docs/reference-guides/data/data-core-nux.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,4 @@ _Returns_

- `Object`: Action object.


<!-- END TOKEN(Autogenerated actions|../../../packages/nux/src/store/actions.js) -->
1 change: 0 additions & 1 deletion docs/reference-guides/data/data-core-viewport.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,4 @@ _Returns_

- `Object`: Action object.


<!-- END TOKEN(Autogenerated actions|../../../packages/viewport/src/store/actions.js) -->
1 change: 0 additions & 1 deletion docs/reference-guides/data/data-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -707,5 +707,4 @@ _Parameters_
Action triggered to undo the last edit to
an entity record, if any.


<!-- END TOKEN(Autogenerated actions|../../../packages/core-data/src/actions.js) -->
1 change: 0 additions & 1 deletion packages/a11y/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ _Parameters_
- _message_ `string`: The message to be announced by assistive technologies.
- _ariaLive_ `[string]`: The politeness level for aria-live; default: 'polite'.


<!-- END TOKEN(Autogenerated API docs) -->

### Background
Expand Down
1 change: 0 additions & 1 deletion packages/autop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ _Returns_

- `string`: The content with stripped paragraph tags.


<!-- END TOKEN(Autogenerated API docs) -->

<br/><br/><p align="center"><img src="https://s.w.org/style/images/codeispoetry.png?1" alt="Code is Poetry." /></p>
1 change: 0 additions & 1 deletion packages/blob/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ _Parameters_

- _url_ `string`: The blob URL.


<!-- END TOKEN(Autogenerated API docs) -->

<br/><br/><p align="center"><img src="https://s.w.org/style/images/codeispoetry.png?1" alt="Code is Poetry." /></p>
5 changes: 2 additions & 3 deletions packages/block-directory/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ Returns an action object used to indicate install in progress.

_Parameters_

- _blockId_ `string`:
- _isInstalling_ `boolean`:
- _blockId_ `string`:
- _isInstalling_ `boolean`:

_Returns_

Expand Down Expand Up @@ -251,7 +251,6 @@ _Returns_

- `boolean`: Whether a request is in progress for the blocks list.


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

<br/><br/><p align="center"><img src="https://s.w.org/style/images/codeispoetry.png?1" alt="Code is Poetry." /></p>
28 changes: 15 additions & 13 deletions packages/block-editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ _Related_

_Parameters_

- _props_ `BlockContextProviderProps`:
- _props_ `BlockContextProviderProps`:

### BlockControls

Expand Down Expand Up @@ -222,7 +222,7 @@ _Usage_

_Parameters_

- _props_ `Object`:
- _props_ `Object`:
- _props.clientId_ `string`: Client ID of block.

_Returns_
Expand Down Expand Up @@ -261,7 +261,7 @@ _Related_

### ButtonBlockerAppender

> **Deprecated**
> **Deprecated**
Use `ButtonBlockAppender` instead.

Expand Down Expand Up @@ -291,12 +291,15 @@ Use this higher-order component to work with a custom set of colors.
_Usage_

```jsx
const CUSTOM_COLORS = [ { name: 'Red', slug: 'red', color: '#ff0000' }, { name: 'Blue', slug: 'blue', color: '#0000ff' } ];
const CUSTOM_COLORS = [
{ name: 'Red', slug: 'red', color: '#ff0000' },
{ name: 'Blue', slug: 'blue', color: '#0000ff' },
];
const withCustomColors = createCustomColorsHOC( CUSTOM_COLORS );
// ...
export default compose(
withCustomColors( 'backgroundColor', 'borderColor' ),
MyColorfulComponent,
withCustomColors( 'backgroundColor', 'borderColor' ),
MyColorfulComponent
);
```

Expand Down Expand Up @@ -359,8 +362,8 @@ _Returns_

### getFontSize

Returns the font size object based on an array of named font sizes and the namedFontSize and customFontSize values.
If namedFontSize is undefined or not found in fontSizes an object with just the size value based on customFontSize is returned.
Returns the font size object based on an array of named font sizes and the namedFontSize and customFontSize values.
If namedFontSize is undefined or not found in fontSizes an object with just the size value based on customFontSize is returned.

_Parameters_

Expand Down Expand Up @@ -481,7 +484,7 @@ _Related_

### MultiSelectScrollIntoView

> **Deprecated**
> **Deprecated**
Scrolls the multi block selection end into view if not in view already. This
is important to do after selection by keyboard.
Expand Down Expand Up @@ -659,7 +662,7 @@ _Parameters_

- _props_ `Object`: Optional. Props to pass to the element. Must contain the ref if one is defined.
- _options_ `Object`: Options for internal use only.
- _options.\_\_unstableIsHtml_ `boolean`:
- _options.\_\_unstableIsHtml_ `boolean`:

_Returns_

Expand Down Expand Up @@ -728,8 +731,8 @@ _Usage_

```jsx
export default compose(
withColors( 'backgroundColor', { textColor: 'color' } ),
MyColorfulComponent,
withColors( 'backgroundColor', { textColor: 'color' } ),
MyColorfulComponent
);
```

Expand Down Expand Up @@ -764,7 +767,6 @@ _Parameters_
- _props_ `Object`: Component properties.
- _props.children_ `WPElement`: Children to be rendered.


<!-- END TOKEN(Autogenerated API docs) -->

<br/><br/><p align="center"><img src="https://s.w.org/style/images/codeispoetry.png?1" alt="Code is Poetry." /></p>
1 change: 0 additions & 1 deletion packages/block-library/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ _Parameters_

- _blocks_ `Array`: An optional array of the core blocks being registered.


<!-- END TOKEN(Autogenerated API docs) -->

<br/><br/><p align="center"><img src="https://s.w.org/style/images/codeispoetry.png?1" alt="Code is Poetry." /></p>
Loading

0 comments on commit 626f233

Please sign in to comment.