@@ -4,7 +4,7 @@ Namespace: `core/blocks`.
44
55## Selectors
66
7- <!-- START TOKEN(Autogenerated selectors|../../../packages/blocks/src/store/selectors.js ) -->
7+ <!-- START TOKEN(Autogenerated selectors|../../../packages/blocks/src/store/selectors.ts ) -->
88
99### getActiveBlockVariation
1010
@@ -45,14 +45,14 @@ const ExampleComponent = () => {
4545
4646_ Parameters_
4747
48- - _ state_ ` Object ` : Data state.
49- - _ blockName_ ` string ` : Name of block (example: “ core/columns” ).
50- - _ attributes_ ` Object ` : Block attributes used to determine active variation.
51- - _ scope_ ` [WPBlockVariationScope] ` : Block variation scope name.
48+ - _ state_ ` BlockStoreState ` : Data state.
49+ - _ blockName_ ` string ` : Name of block (example: " core/columns" ).
50+ - _ attributes_ ` Record< string, unknown > ` : Block attributes used to determine active variation.
51+ - _ scope_ ` BlockVariationScope ` : Block variation scope name.
5252
5353_ Returns_
5454
55- - ` (WPBlockVariation| undefined) ` : Active block variation.
55+ - ` BlockVariation | undefined` : Active block variation.
5656
5757### getBlockStyles
5858
@@ -83,12 +83,12 @@ const ExampleComponent = () => {
8383
8484_ Parameters_
8585
86- - _ state_ ` Object ` : Data state.
86+ - _ state_ ` BlockStoreState ` : Data state.
8787- _ name_ ` string ` : Block type name.
8888
8989_ Returns_
9090
91- - ` Array? ` : Block Styles.
91+ - ` BlockStyle[] ` : Block Styles.
9292
9393### getBlockSupport
9494
@@ -121,14 +121,14 @@ const ExampleComponent = () => {
121121
122122_ Parameters_
123123
124- - _ state_ ` Object ` : Data state.
125- - _ nameOrType_ ` ( string|Object) ` : Block name or type object
126- - _ feature_ ` Array| string` : Feature to retrieve
127- - _ defaultSupports_ ` * ` : Default value to return if not explicitly defined
124+ - _ state_ ` BlockStoreState ` : Data state.
125+ - _ nameOrType_ ` string | BlockType ` : Block name or type object
126+ - _ feature_ ` string | string[] ` : Feature to retrieve
127+ - _ defaultSupports_ ` unknown ` : Default value to return if not explicitly defined
128128
129129_ Returns_
130130
131- - ` ?* ` : Block support value
131+ - ` unknown ` : Block support value
132132
133133### getBlockType
134134
@@ -167,12 +167,12 @@ const ExampleComponent = () => {
167167
168168_ Parameters_
169169
170- - _ state_ ` Object ` : Data state.
170+ - _ state_ ` BlockStoreState ` : Data state.
171171- _ name_ ` string ` : Block type name.
172172
173173_ Returns_
174174
175- - ` ?Object ` : Block Type.
175+ - ` BlockType | undefined ` : Block Type.
176176
177177### getBlockTypes
178178
@@ -202,11 +202,11 @@ const ExampleComponent = () => {
202202
203203_ Parameters_
204204
205- - _ state_ ` Object ` : Data state.
205+ - _ state_ ` BlockStoreState ` : Data state.
206206
207207_ Returns_
208208
209- - ` Array ` : Block Types.
209+ - ` BlockType[] ` : Block Types.
210210
211211### getBlockVariations
212212
@@ -238,13 +238,13 @@ const ExampleComponent = () => {
238238
239239_ Parameters_
240240
241- - _ state_ ` Object ` : Data state.
241+ - _ state_ ` BlockStoreState ` : Data state.
242242- _ blockName_ ` string ` : Block type name.
243- - _ scope_ ` [WPBlockVariationScope] ` : Block variation scope name.
243+ - _ scope_ ` BlockVariationScope ` : Block variation scope name.
244244
245245_ Returns_
246246
247- - ` (WPBlockVariation[]|void) ` : Block variations.
247+ - ` BlockVariation[] | undefined ` : Block variations.
248248
249249### getCategories
250250
@@ -274,11 +274,11 @@ const ExampleComponent = () => {
274274
275275_ Parameters_
276276
277- - _ state_ ` Object ` : Data state.
277+ - _ state_ ` BlockStoreState ` : Data state.
278278
279279_ Returns_
280280
281- - ` WPBlockCategory []` : Categories list.
281+ - ` BlockCategory []` : Categories list.
282282
283283### getChildBlockNames
284284
@@ -310,12 +310,12 @@ const ExampleComponent = () => {
310310
311311_ Parameters_
312312
313- - _ state_ ` Object ` : Data state.
313+ - _ state_ ` BlockStoreState ` : Data state.
314314- _ blockName_ ` string ` : Block type name.
315315
316316_ Returns_
317317
318- - ` Array ` : Array of child block names.
318+ - ` string[] ` : Array of child block names.
319319
320320### getCollections
321321
@@ -346,11 +346,11 @@ const ExampleComponent = () => {
346346
347347_ Parameters_
348348
349- - _ state_ ` Object ` : Data state.
349+ - _ state_ ` BlockStoreState ` : Data state.
350350
351351_ Returns_
352352
353- - ` Object ` : Collections list.
353+ - ` Record< string, BlockCollection > ` : Collections list.
354354
355355### getDefaultBlockName
356356
@@ -381,11 +381,11 @@ const ExampleComponent = () => {
381381
382382_ Parameters_
383383
384- - _ state_ ` Object ` : Data state.
384+ - _ state_ ` BlockStoreState ` : Data state.
385385
386386_ Returns_
387387
388- - ` ? string` : Default block name.
388+ - ` string | null ` : Default block name.
389389
390390### getDefaultBlockVariation
391391
@@ -420,13 +420,13 @@ const ExampleComponent = () => {
420420
421421_ Parameters_
422422
423- - _ state_ ` Object ` : Data state.
423+ - _ state_ ` BlockStoreState ` : Data state.
424424- _ blockName_ ` string ` : Block type name.
425- - _ scope_ ` [WPBlockVariationScope] ` : Block variation scope name.
425+ - _ scope_ ` BlockVariationScope ` : Block variation scope name.
426426
427427_ Returns_
428428
429- - ` ?WPBlockVariation ` : The default block variation.
429+ - ` BlockVariation | undefined ` : The default block variation.
430430
431431### getFreeformFallbackBlockName
432432
@@ -460,11 +460,11 @@ const ExampleComponent = () => {
460460
461461_ Parameters_
462462
463- - _ state_ ` Object ` : Data state.
463+ - _ state_ ` BlockStoreState ` : Data state.
464464
465465_ Returns_
466466
467- - ` ? string` : Name of the block for handling non-block content.
467+ - ` string | null ` : Name of the block for handling non-block content.
468468
469469### getGroupingBlockName
470470
@@ -498,11 +498,11 @@ const ExampleComponent = () => {
498498
499499_ Parameters_
500500
501- - _ state_ ` Object ` : Data state.
501+ - _ state_ ` BlockStoreState ` : Data state.
502502
503503_ Returns_
504504
505- - ` ? string` : Name of the block for handling the grouping of blocks.
505+ - ` string | null ` : Name of the block for handling the grouping of blocks.
506506
507507### getUnregisteredFallbackBlockName
508508
@@ -536,11 +536,11 @@ const ExampleComponent = () => {
536536
537537_ Parameters_
538538
539- - _ state_ ` Object ` : Data state.
539+ - _ state_ ` BlockStoreState ` : Data state.
540540
541541_ Returns_
542542
543- - ` ? string` : Name of the block for handling unregistered blocks.
543+ - ` string | null ` : Name of the block for handling unregistered blocks.
544544
545545### hasBlockSupport
546546
@@ -572,10 +572,10 @@ const ExampleComponent = () => {
572572
573573_ Parameters_
574574
575- - _ state_ ` Object ` : Data state.
576- - _ nameOrType_ ` ( string|Object) ` : Block name or type object.
577- - _ feature_ ` string ` : Feature to test.
578- - _ defaultSupports_ ` boolean ` : Whether feature is supported by default if not explicitly defined.
575+ - _ state_ ` BlockStoreState ` : Data state.
576+ - _ nameOrType_ ` string | BlockType ` : Block name or type object.
577+ - _ feature_ ` string | string[] ` : Feature to test.
578+ - _ defaultSupports_ ` unknown ` : Whether feature is supported by default if not explicitly defined.
579579
580580_ Returns_
581581
@@ -611,7 +611,7 @@ const ExampleComponent = () => {
611611
612612_ Parameters_
613613
614- - _ state_ ` Object ` : Data state.
614+ - _ state_ ` BlockStoreState ` : Data state.
615615- _ blockName_ ` string ` : Block type name.
616616
617617_ Returns_
@@ -653,7 +653,7 @@ const ExampleComponent = () => {
653653
654654_ Parameters_
655655
656- - _ state_ ` Object ` : Data state.
656+ - _ state_ ` BlockStoreState ` : Data state.
657657- _ blockName_ ` string ` : Block type name.
658658
659659_ Returns_
@@ -696,26 +696,26 @@ const ExampleComponent = () => {
696696
697697_ Parameters_
698698
699- - _ state_ ` Object ` : Blocks state.
700- - _ nameOrType_ ` ( string|Object) ` : Block name or type object.
699+ - _ state_ ` BlockStoreState ` : Blocks state.
700+ - _ nameOrType_ ` string | BlockType ` : Block name or type object.
701701- _ searchTerm_ ` string ` : Search term by which to filter.
702702
703703_ Returns_
704704
705- - ` Object[] ` : Whether block type matches search term.
705+ - ` boolean ` : Whether block type matches search term.
706706
707- <!-- END TOKEN(Autogenerated selectors|../../../packages/blocks/src/store/selectors.js ) -->
707+ <!-- END TOKEN(Autogenerated selectors|../../../packages/blocks/src/store/selectors.ts ) -->
708708
709709## Actions
710710
711711The actions in this package shouldn't be used directly. Instead, use the functions listed in the public API [ here] ( /packages/blocks/README.md )
712712
713- <!-- START TOKEN(Autogenerated actions|../../../packages/blocks/src/store/actions.js ) -->
713+ <!-- START TOKEN(Autogenerated actions|../../../packages/blocks/src/store/actions.ts ) -->
714714
715715### reapplyBlockTypeFilters
716716
717717Signals that all block types should be computed again. It uses stored unprocessed block types and all the most recent list of registered filters.
718718
719719It addresses the issue where third party block filters get registered after third party blocks. A sample sequence: 1. Filter A. 2. Block B. 3. Block C. 4. Filter D. 5. Filter E. 6. Block F. 7. Filter G. In this scenario some filters would not get applied for all blocks because they are registered too late.
720720
721- <!-- END TOKEN(Autogenerated actions|../../../packages/blocks/src/store/actions.js ) -->
721+ <!-- END TOKEN(Autogenerated actions|../../../packages/blocks/src/store/actions.ts ) -->
0 commit comments