@wordpress/block-editor 6.1.12 → 6.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +100 -98
- package/build/components/block-list/head.js +27 -0
- package/build/components/block-list/head.js.map +1 -0
- package/build/components/block-list/index.js +4 -2
- package/build/components/block-list/index.js.map +1 -1
- package/build/components/iframe/index.js +34 -5
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/rich-text/use-input-rules.js +5 -2
- package/build/components/rich-text/use-input-rules.js.map +1 -1
- package/build/components/use-setting/index.js +1 -1
- package/build/components/use-setting/index.js.map +1 -1
- package/build/components/writing-flow/index.js +27 -14
- package/build/components/writing-flow/index.js.map +1 -1
- package/build/components/writing-flow/use-select-all.js +36 -34
- package/build/components/writing-flow/use-select-all.js.map +1 -1
- package/build/components/writing-flow/use-tab-nav.js +8 -0
- package/build/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build/hooks/duotone.js +5 -2
- package/build/hooks/duotone.js.map +1 -1
- package/build/hooks/layout.js +5 -2
- package/build/hooks/layout.js.map +1 -1
- package/build-module/components/block-list/head.js +19 -0
- package/build-module/components/block-list/head.js.map +1 -0
- package/build-module/components/block-list/index.js +3 -2
- package/build-module/components/block-list/index.js.map +1 -1
- package/build-module/components/iframe/index.js +34 -5
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/rich-text/use-input-rules.js +5 -2
- package/build-module/components/rich-text/use-input-rules.js.map +1 -1
- package/build-module/components/use-setting/index.js +1 -1
- package/build-module/components/use-setting/index.js.map +1 -1
- package/build-module/components/writing-flow/index.js +23 -12
- package/build-module/components/writing-flow/index.js.map +1 -1
- package/build-module/components/writing-flow/use-select-all.js +30 -28
- package/build-module/components/writing-flow/use-select-all.js.map +1 -1
- package/build-module/components/writing-flow/use-tab-nav.js +8 -0
- package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build-module/hooks/duotone.js +5 -2
- package/build-module/hooks/duotone.js.map +1 -1
- package/build-module/hooks/layout.js +5 -2
- package/build-module/hooks/layout.js.map +1 -1
- package/build-style/style-rtl.css +1 -1
- package/build-style/style.css +1 -1
- package/package.json +23 -23
- package/src/components/block-list/head.js +18 -0
- package/src/components/block-list/index.js +21 -18
- package/src/components/block-list-appender/style.scss +3 -4
- package/src/components/iframe/index.js +39 -7
- package/src/components/rich-text/use-input-rules.js +4 -2
- package/src/components/use-setting/index.js +1 -1
- package/src/components/writing-flow/index.js +23 -10
- package/src/components/writing-flow/use-select-all.js +33 -35
- package/src/components/writing-flow/use-tab-nav.js +8 -0
- package/src/hooks/duotone.js +13 -5
- package/src/hooks/layout.js +12 -4
package/README.md
CHANGED
|
@@ -78,29 +78,29 @@ registerCoreBlocks();
|
|
|
78
78
|
|
|
79
79
|
<!-- START TOKEN(Autogenerated API docs) -->
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
### AlignmentControl
|
|
82
82
|
|
|
83
83
|
Undocumented declaration.
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
### AlignmentToolbar
|
|
86
86
|
|
|
87
87
|
Undocumented declaration.
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
### Autocomplete
|
|
90
90
|
|
|
91
91
|
_Related_
|
|
92
92
|
|
|
93
93
|
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/autocomplete/README.md>
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
### BlockAlignmentControl
|
|
96
96
|
|
|
97
97
|
Undocumented declaration.
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
### BlockAlignmentToolbar
|
|
100
100
|
|
|
101
101
|
Undocumented declaration.
|
|
102
102
|
|
|
103
|
-
|
|
103
|
+
### BlockBreadcrumb
|
|
104
104
|
|
|
105
105
|
Block breadcrumb component, displaying the hierarchy of the current block selection as a breadcrumb.
|
|
106
106
|
|
|
@@ -113,11 +113,11 @@ _Returns_
|
|
|
113
113
|
|
|
114
114
|
- `WPElement`: Block Breadcrumb.
|
|
115
115
|
|
|
116
|
-
|
|
116
|
+
### BlockColorsStyleSelector
|
|
117
117
|
|
|
118
118
|
Undocumented declaration.
|
|
119
119
|
|
|
120
|
-
|
|
120
|
+
### BlockContextProvider
|
|
121
121
|
|
|
122
122
|
Component which merges passed value with current consumed block context.
|
|
123
123
|
|
|
@@ -127,49 +127,49 @@ _Related_
|
|
|
127
127
|
|
|
128
128
|
_Parameters_
|
|
129
129
|
|
|
130
|
-
- _props_ `BlockContextProviderProps`:
|
|
130
|
+
- _props_ `BlockContextProviderProps`:
|
|
131
131
|
|
|
132
|
-
|
|
132
|
+
### BlockControls
|
|
133
133
|
|
|
134
134
|
Undocumented declaration.
|
|
135
135
|
|
|
136
|
-
|
|
136
|
+
### BlockEdit
|
|
137
137
|
|
|
138
138
|
Undocumented declaration.
|
|
139
139
|
|
|
140
|
-
|
|
140
|
+
### BlockEditorKeyboardShortcuts
|
|
141
141
|
|
|
142
142
|
Undocumented declaration.
|
|
143
143
|
|
|
144
|
-
|
|
144
|
+
### BlockEditorProvider
|
|
145
145
|
|
|
146
146
|
Undocumented declaration.
|
|
147
147
|
|
|
148
|
-
|
|
148
|
+
### BlockFormatControls
|
|
149
149
|
|
|
150
150
|
Undocumented declaration.
|
|
151
151
|
|
|
152
|
-
|
|
152
|
+
### BlockIcon
|
|
153
153
|
|
|
154
154
|
Undocumented declaration.
|
|
155
155
|
|
|
156
|
-
|
|
156
|
+
### BlockInspector
|
|
157
157
|
|
|
158
158
|
Undocumented declaration.
|
|
159
159
|
|
|
160
|
-
|
|
160
|
+
### BlockList
|
|
161
161
|
|
|
162
162
|
Undocumented declaration.
|
|
163
163
|
|
|
164
|
-
|
|
164
|
+
### BlockMover
|
|
165
165
|
|
|
166
166
|
Undocumented declaration.
|
|
167
167
|
|
|
168
|
-
|
|
168
|
+
### BlockNavigationDropdown
|
|
169
169
|
|
|
170
170
|
Undocumented declaration.
|
|
171
171
|
|
|
172
|
-
|
|
172
|
+
### BlockPreview
|
|
173
173
|
|
|
174
174
|
BlockPreview renders a preview of a block or array of blocks.
|
|
175
175
|
|
|
@@ -187,15 +187,15 @@ _Returns_
|
|
|
187
187
|
|
|
188
188
|
- `WPComponent`: The component to be rendered.
|
|
189
189
|
|
|
190
|
-
|
|
190
|
+
### BlockSelectionClearer
|
|
191
191
|
|
|
192
192
|
Undocumented declaration.
|
|
193
193
|
|
|
194
|
-
|
|
194
|
+
### BlockSettingsMenu
|
|
195
195
|
|
|
196
196
|
Undocumented declaration.
|
|
197
197
|
|
|
198
|
-
|
|
198
|
+
### BlockSettingsMenuControls
|
|
199
199
|
|
|
200
200
|
_Related_
|
|
201
201
|
|
|
@@ -209,7 +209,7 @@ _Returns_
|
|
|
209
209
|
|
|
210
210
|
- `WPElement`: Element.
|
|
211
211
|
|
|
212
|
-
|
|
212
|
+
### BlockTitle
|
|
213
213
|
|
|
214
214
|
Renders the block's configured title as a string, or empty if the title
|
|
215
215
|
cannot be determined.
|
|
@@ -222,18 +222,18 @@ _Usage_
|
|
|
222
222
|
|
|
223
223
|
_Parameters_
|
|
224
224
|
|
|
225
|
-
- _props_ `Object`:
|
|
225
|
+
- _props_ `Object`:
|
|
226
226
|
- _props.clientId_ `string`: Client ID of block.
|
|
227
227
|
|
|
228
228
|
_Returns_
|
|
229
229
|
|
|
230
230
|
- `?string`: Block title.
|
|
231
231
|
|
|
232
|
-
|
|
232
|
+
### BlockToolbar
|
|
233
233
|
|
|
234
234
|
Undocumented declaration.
|
|
235
235
|
|
|
236
|
-
|
|
236
|
+
### BlockTools
|
|
237
237
|
|
|
238
238
|
Renders block tools (the block toolbar, select/navigation mode toolbar, the
|
|
239
239
|
insertion point and a slot for the inline rich text toolbar). Must be wrapped
|
|
@@ -245,43 +245,43 @@ _Parameters_
|
|
|
245
245
|
- _$0.children_ `Object`: The block content and style container.
|
|
246
246
|
- _$0.\_\_unstableContentRef_ `Object`: Ref holding the content scroll container.
|
|
247
247
|
|
|
248
|
-
|
|
248
|
+
### BlockVerticalAlignmentControl
|
|
249
249
|
|
|
250
250
|
Undocumented declaration.
|
|
251
251
|
|
|
252
|
-
|
|
252
|
+
### BlockVerticalAlignmentToolbar
|
|
253
253
|
|
|
254
254
|
Undocumented declaration.
|
|
255
255
|
|
|
256
|
-
|
|
256
|
+
### ButtonBlockAppender
|
|
257
257
|
|
|
258
258
|
_Related_
|
|
259
259
|
|
|
260
260
|
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/button-block-appender/README.md>
|
|
261
261
|
|
|
262
|
-
|
|
262
|
+
### ButtonBlockerAppender
|
|
263
263
|
|
|
264
|
-
> **Deprecated**
|
|
264
|
+
> **Deprecated**
|
|
265
265
|
|
|
266
266
|
Use `ButtonBlockAppender` instead.
|
|
267
267
|
|
|
268
|
-
|
|
268
|
+
### ColorPalette
|
|
269
269
|
|
|
270
270
|
Undocumented declaration.
|
|
271
271
|
|
|
272
|
-
|
|
272
|
+
### ColorPaletteControl
|
|
273
273
|
|
|
274
274
|
Undocumented declaration.
|
|
275
275
|
|
|
276
|
-
|
|
276
|
+
### ContrastChecker
|
|
277
277
|
|
|
278
278
|
Undocumented declaration.
|
|
279
279
|
|
|
280
|
-
|
|
280
|
+
### CopyHandler
|
|
281
281
|
|
|
282
282
|
Undocumented declaration.
|
|
283
283
|
|
|
284
|
-
|
|
284
|
+
### createCustomColorsHOC
|
|
285
285
|
|
|
286
286
|
A higher-order component factory for creating a 'withCustomColors' HOC, which handles color logic
|
|
287
287
|
for class generation color value, retrieval and color attribute setting.
|
|
@@ -291,12 +291,15 @@ Use this higher-order component to work with a custom set of colors.
|
|
|
291
291
|
_Usage_
|
|
292
292
|
|
|
293
293
|
```jsx
|
|
294
|
-
const CUSTOM_COLORS = [
|
|
294
|
+
const CUSTOM_COLORS = [
|
|
295
|
+
{ name: 'Red', slug: 'red', color: '#ff0000' },
|
|
296
|
+
{ name: 'Blue', slug: 'blue', color: '#0000ff' },
|
|
297
|
+
];
|
|
295
298
|
const withCustomColors = createCustomColorsHOC( CUSTOM_COLORS );
|
|
296
299
|
// ...
|
|
297
300
|
export default compose(
|
|
298
|
-
|
|
299
|
-
|
|
301
|
+
withCustomColors( 'backgroundColor', 'borderColor' ),
|
|
302
|
+
MyColorfulComponent
|
|
300
303
|
);
|
|
301
304
|
```
|
|
302
305
|
|
|
@@ -308,15 +311,15 @@ _Returns_
|
|
|
308
311
|
|
|
309
312
|
- `Function`: Higher-order component.
|
|
310
313
|
|
|
311
|
-
|
|
314
|
+
### DefaultBlockAppender
|
|
312
315
|
|
|
313
316
|
Undocumented declaration.
|
|
314
317
|
|
|
315
|
-
|
|
318
|
+
### FontSizePicker
|
|
316
319
|
|
|
317
320
|
Undocumented declaration.
|
|
318
321
|
|
|
319
|
-
|
|
322
|
+
### getColorClassName
|
|
320
323
|
|
|
321
324
|
Returns a class based on the context a color is being used and its slug.
|
|
322
325
|
|
|
@@ -329,7 +332,7 @@ _Returns_
|
|
|
329
332
|
|
|
330
333
|
- `?string`: String with the class corresponding to the color in the provided context. Returns undefined if either colorContextName or colorSlug are not provided.
|
|
331
334
|
|
|
332
|
-
|
|
335
|
+
### getColorObjectByAttributeValues
|
|
333
336
|
|
|
334
337
|
Provided an array of color objects as set by the theme or by the editor defaults,
|
|
335
338
|
and the values of the defined color or custom color returns a color object describing the color.
|
|
@@ -344,7 +347,7 @@ _Returns_
|
|
|
344
347
|
|
|
345
348
|
- `?Object`: If definedColor is passed and the name is found in colors, the color object exactly as set by the theme or editor defaults is returned. Otherwise, an object that just sets the color is defined.
|
|
346
349
|
|
|
347
|
-
|
|
350
|
+
### getColorObjectByColorValue
|
|
348
351
|
|
|
349
352
|
Provided an array of color objects as set by the theme or by the editor defaults, and a color value returns the color object matching that value or undefined.
|
|
350
353
|
|
|
@@ -357,10 +360,10 @@ _Returns_
|
|
|
357
360
|
|
|
358
361
|
- `?Object`: Color object included in the colors array whose color property equals colorValue. Returns undefined if no color object matches this requirement.
|
|
359
362
|
|
|
360
|
-
|
|
363
|
+
### getFontSize
|
|
361
364
|
|
|
362
|
-
|
|
363
|
-
|
|
365
|
+
Returns the font size object based on an array of named font sizes and the namedFontSize and customFontSize values.
|
|
366
|
+
If namedFontSize is undefined or not found in fontSizes an object with just the size value based on customFontSize is returned.
|
|
364
367
|
|
|
365
368
|
_Parameters_
|
|
366
369
|
|
|
@@ -372,7 +375,7 @@ _Returns_
|
|
|
372
375
|
|
|
373
376
|
- `?Object`: If fontSizeAttribute is set and an equal slug is found in fontSizes it returns the font size object for that slug. Otherwise, an object with just the size value based on customFontSize is returned.
|
|
374
377
|
|
|
375
|
-
|
|
378
|
+
### getFontSizeClass
|
|
376
379
|
|
|
377
380
|
Returns a class based on fontSizeName.
|
|
378
381
|
|
|
@@ -384,7 +387,7 @@ _Returns_
|
|
|
384
387
|
|
|
385
388
|
- `string`: String with the class corresponding to the fontSize passed. The class is generated by appending 'has-' followed by fontSizeSlug in kebabCase and ending with '-font-size'.
|
|
386
389
|
|
|
387
|
-
|
|
390
|
+
### getFontSizeObjectByValue
|
|
388
391
|
|
|
389
392
|
Returns the corresponding font size object for a given value.
|
|
390
393
|
|
|
@@ -397,7 +400,7 @@ _Returns_
|
|
|
397
400
|
|
|
398
401
|
- `Object`: Font size object.
|
|
399
402
|
|
|
400
|
-
|
|
403
|
+
### getGradientSlugByValue
|
|
401
404
|
|
|
402
405
|
Retrieves the gradient slug per slug.
|
|
403
406
|
|
|
@@ -410,7 +413,7 @@ _Returns_
|
|
|
410
413
|
|
|
411
414
|
- `string`: Gradient slug.
|
|
412
415
|
|
|
413
|
-
|
|
416
|
+
### getGradientValueBySlug
|
|
414
417
|
|
|
415
418
|
Retrieves the gradient value per slug.
|
|
416
419
|
|
|
@@ -423,108 +426,108 @@ _Returns_
|
|
|
423
426
|
|
|
424
427
|
- `string`: Gradient value.
|
|
425
428
|
|
|
426
|
-
|
|
429
|
+
### InnerBlocks
|
|
427
430
|
|
|
428
431
|
_Related_
|
|
429
432
|
|
|
430
433
|
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/inner-blocks/README.md>
|
|
431
434
|
|
|
432
|
-
|
|
435
|
+
### Inserter
|
|
433
436
|
|
|
434
437
|
Undocumented declaration.
|
|
435
438
|
|
|
436
|
-
|
|
439
|
+
### InspectorAdvancedControls
|
|
437
440
|
|
|
438
441
|
_Related_
|
|
439
442
|
|
|
440
443
|
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/inspector-advanced-controls/README.md>
|
|
441
444
|
|
|
442
|
-
|
|
445
|
+
### InspectorControls
|
|
443
446
|
|
|
444
447
|
_Related_
|
|
445
448
|
|
|
446
449
|
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/inspector-controls/README.md>
|
|
447
450
|
|
|
448
|
-
|
|
451
|
+
### JustifyContentControl
|
|
449
452
|
|
|
450
453
|
Undocumented declaration.
|
|
451
454
|
|
|
452
|
-
|
|
455
|
+
### JustifyToolbar
|
|
453
456
|
|
|
454
457
|
Undocumented declaration.
|
|
455
458
|
|
|
456
|
-
|
|
459
|
+
### LineHeightControl
|
|
457
460
|
|
|
458
461
|
Undocumented declaration.
|
|
459
462
|
|
|
460
|
-
|
|
463
|
+
### MediaPlaceholder
|
|
461
464
|
|
|
462
465
|
_Related_
|
|
463
466
|
|
|
464
467
|
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/media-placeholder/README.md>
|
|
465
468
|
|
|
466
|
-
|
|
469
|
+
### MediaReplaceFlow
|
|
467
470
|
|
|
468
471
|
Undocumented declaration.
|
|
469
472
|
|
|
470
|
-
|
|
473
|
+
### MediaUpload
|
|
471
474
|
|
|
472
475
|
_Related_
|
|
473
476
|
|
|
474
477
|
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/media-upload/README.md>
|
|
475
478
|
|
|
476
|
-
|
|
479
|
+
### MediaUploadCheck
|
|
477
480
|
|
|
478
481
|
_Related_
|
|
479
482
|
|
|
480
483
|
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/media-upload/README.md>
|
|
481
484
|
|
|
482
|
-
|
|
485
|
+
### MultiSelectScrollIntoView
|
|
483
486
|
|
|
484
|
-
> **Deprecated**
|
|
487
|
+
> **Deprecated**
|
|
485
488
|
|
|
486
489
|
Scrolls the multi block selection end into view if not in view already. This
|
|
487
490
|
is important to do after selection by keyboard.
|
|
488
491
|
|
|
489
|
-
|
|
492
|
+
### NavigableToolbar
|
|
490
493
|
|
|
491
494
|
Undocumented declaration.
|
|
492
495
|
|
|
493
|
-
|
|
496
|
+
### ObserveTyping
|
|
494
497
|
|
|
495
498
|
_Related_
|
|
496
499
|
|
|
497
500
|
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/observe-typing/README.md>
|
|
498
501
|
|
|
499
|
-
|
|
502
|
+
### PanelColorSettings
|
|
500
503
|
|
|
501
504
|
Undocumented declaration.
|
|
502
505
|
|
|
503
|
-
|
|
506
|
+
### PlainText
|
|
504
507
|
|
|
505
508
|
_Related_
|
|
506
509
|
|
|
507
510
|
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/plain-text/README.md>
|
|
508
511
|
|
|
509
|
-
|
|
512
|
+
### PreserveScrollInReorder
|
|
510
513
|
|
|
511
514
|
Undocumented declaration.
|
|
512
515
|
|
|
513
|
-
|
|
516
|
+
### RichText
|
|
514
517
|
|
|
515
518
|
_Related_
|
|
516
519
|
|
|
517
520
|
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/rich-text/README.md>
|
|
518
521
|
|
|
519
|
-
|
|
522
|
+
### RichTextShortcut
|
|
520
523
|
|
|
521
524
|
Undocumented declaration.
|
|
522
525
|
|
|
523
|
-
|
|
526
|
+
### RichTextToolbarButton
|
|
524
527
|
|
|
525
528
|
Undocumented declaration.
|
|
526
529
|
|
|
527
|
-
|
|
530
|
+
### SETTINGS_DEFAULTS
|
|
528
531
|
|
|
529
532
|
The default editor settings
|
|
530
533
|
|
|
@@ -552,11 +555,11 @@ _Properties_
|
|
|
552
555
|
- _\_\_experimentalBlockPatterns_ `Array`: Array of objects representing the block patterns
|
|
553
556
|
- _\_\_experimentalBlockPatternCategories_ `Array`: Array of objects representing the block pattern categories
|
|
554
557
|
|
|
555
|
-
|
|
558
|
+
### SkipToSelectedBlock
|
|
556
559
|
|
|
557
560
|
Undocumented declaration.
|
|
558
561
|
|
|
559
|
-
|
|
562
|
+
### store
|
|
560
563
|
|
|
561
564
|
Store definition for the block editor namespace.
|
|
562
565
|
|
|
@@ -568,7 +571,7 @@ _Type_
|
|
|
568
571
|
|
|
569
572
|
- `Object`
|
|
570
573
|
|
|
571
|
-
|
|
574
|
+
### storeConfig
|
|
572
575
|
|
|
573
576
|
Block editor data store configuration.
|
|
574
577
|
|
|
@@ -580,11 +583,11 @@ _Type_
|
|
|
580
583
|
|
|
581
584
|
- `Object`
|
|
582
585
|
|
|
583
|
-
|
|
586
|
+
### ToolSelector
|
|
584
587
|
|
|
585
588
|
Undocumented declaration.
|
|
586
589
|
|
|
587
|
-
|
|
590
|
+
### transformStyles
|
|
588
591
|
|
|
589
592
|
Applies a series of CSS rule transforms to wrap selectors inside a given class and/or rewrite URLs depending on the parameters passed.
|
|
590
593
|
|
|
@@ -597,31 +600,31 @@ _Returns_
|
|
|
597
600
|
|
|
598
601
|
- `Array`: converted rules.
|
|
599
602
|
|
|
600
|
-
|
|
603
|
+
### Typewriter
|
|
601
604
|
|
|
602
605
|
Ensures that the text selection keeps the same vertical distance from the
|
|
603
606
|
viewport during keyboard events within this component. The vertical distance
|
|
604
607
|
can vary. It is the last clicked or scrolled to position.
|
|
605
608
|
|
|
606
|
-
|
|
609
|
+
### URLInput
|
|
607
610
|
|
|
608
611
|
_Related_
|
|
609
612
|
|
|
610
613
|
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/url-input/README.md>
|
|
611
614
|
|
|
612
|
-
|
|
615
|
+
### URLInputButton
|
|
613
616
|
|
|
614
617
|
_Related_
|
|
615
618
|
|
|
616
619
|
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/url-input/README.md>
|
|
617
620
|
|
|
618
|
-
|
|
621
|
+
### URLPopover
|
|
619
622
|
|
|
620
623
|
_Related_
|
|
621
624
|
|
|
622
625
|
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/url-popover/README.md>
|
|
623
626
|
|
|
624
|
-
|
|
627
|
+
### useBlockDisplayInformation
|
|
625
628
|
|
|
626
629
|
Hook used to try to find a matching block variation and return
|
|
627
630
|
the appropriate information for display reasons. In order to
|
|
@@ -641,11 +644,11 @@ _Returns_
|
|
|
641
644
|
|
|
642
645
|
- `?WPBlockDisplayInformation`: Block's display information, or `null` when the block or its type not found.
|
|
643
646
|
|
|
644
|
-
|
|
647
|
+
### useBlockEditContext
|
|
645
648
|
|
|
646
649
|
Undocumented declaration.
|
|
647
650
|
|
|
648
|
-
|
|
651
|
+
### useBlockProps
|
|
649
652
|
|
|
650
653
|
This hook is used to lightly mark an element as a block element. The element
|
|
651
654
|
should be the outermost element of a block. Call this hook and pass the
|
|
@@ -659,13 +662,13 @@ _Parameters_
|
|
|
659
662
|
|
|
660
663
|
- _props_ `Object`: Optional. Props to pass to the element. Must contain the ref if one is defined.
|
|
661
664
|
- _options_ `Object`: Options for internal use only.
|
|
662
|
-
- _options.\_\_unstableIsHtml_ `boolean`:
|
|
665
|
+
- _options.\_\_unstableIsHtml_ `boolean`:
|
|
663
666
|
|
|
664
667
|
_Returns_
|
|
665
668
|
|
|
666
669
|
- `Object`: Props to pass to the element to mark as a block.
|
|
667
670
|
|
|
668
|
-
|
|
671
|
+
### useSetting
|
|
669
672
|
|
|
670
673
|
Hook that retrieves the editor setting.
|
|
671
674
|
It works with nested objects using by finding the value at path.
|
|
@@ -684,7 +687,7 @@ _Returns_
|
|
|
684
687
|
|
|
685
688
|
- `any`: Returns the value defined for the setting.
|
|
686
689
|
|
|
687
|
-
|
|
690
|
+
### validateThemeColors
|
|
688
691
|
|
|
689
692
|
Given an array of theme colors checks colors for validity
|
|
690
693
|
|
|
@@ -696,7 +699,7 @@ _Returns_
|
|
|
696
699
|
|
|
697
700
|
- `Array`: The array of valid theme colors or the default colors
|
|
698
701
|
|
|
699
|
-
|
|
702
|
+
### validateThemeGradients
|
|
700
703
|
|
|
701
704
|
Given an array of theme gradients checks gradients for validity
|
|
702
705
|
|
|
@@ -708,17 +711,17 @@ _Returns_
|
|
|
708
711
|
|
|
709
712
|
- `Array`: The array of valid theme gradients or the default gradients
|
|
710
713
|
|
|
711
|
-
|
|
714
|
+
### Warning
|
|
712
715
|
|
|
713
716
|
_Related_
|
|
714
717
|
|
|
715
718
|
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/warning/README.md>
|
|
716
719
|
|
|
717
|
-
|
|
720
|
+
### withColorContext
|
|
718
721
|
|
|
719
722
|
Undocumented declaration.
|
|
720
723
|
|
|
721
|
-
|
|
724
|
+
### withColors
|
|
722
725
|
|
|
723
726
|
A higher-order component, which handles color logic for class generation color value, retrieval and color attribute setting.
|
|
724
727
|
|
|
@@ -728,8 +731,8 @@ _Usage_
|
|
|
728
731
|
|
|
729
732
|
```jsx
|
|
730
733
|
export default compose(
|
|
731
|
-
|
|
732
|
-
|
|
734
|
+
withColors( 'backgroundColor', { textColor: 'color' } ),
|
|
735
|
+
MyColorfulComponent
|
|
733
736
|
);
|
|
734
737
|
```
|
|
735
738
|
|
|
@@ -741,7 +744,7 @@ _Returns_
|
|
|
741
744
|
|
|
742
745
|
- `Function`: Higher-order component.
|
|
743
746
|
|
|
744
|
-
|
|
747
|
+
### withFontSizes
|
|
745
748
|
|
|
746
749
|
Higher-order component, which handles font size logic for class generation,
|
|
747
750
|
font size value retrieval, and font size change handling.
|
|
@@ -754,7 +757,7 @@ _Returns_
|
|
|
754
757
|
|
|
755
758
|
- `Function`: Higher-order component.
|
|
756
759
|
|
|
757
|
-
|
|
760
|
+
### WritingFlow
|
|
758
761
|
|
|
759
762
|
Handles selection and navigation across blocks. This component should be
|
|
760
763
|
wrapped around BlockList.
|
|
@@ -764,7 +767,6 @@ _Parameters_
|
|
|
764
767
|
- _props_ `Object`: Component properties.
|
|
765
768
|
- _props.children_ `WPElement`: Children to be rendered.
|
|
766
769
|
|
|
767
|
-
|
|
768
770
|
<!-- END TOKEN(Autogenerated API docs) -->
|
|
769
771
|
|
|
770
772
|
<br/><br/><p align="center"><img src="https://s.w.org/style/images/codeispoetry.png?1" alt="Code is Poetry." /></p>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Head = Head;
|
|
7
|
+
|
|
8
|
+
var _element = require("@wordpress/element");
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* WordPress dependencies
|
|
12
|
+
*/
|
|
13
|
+
const context = (0, _element.createContext)();
|
|
14
|
+
|
|
15
|
+
function Head({
|
|
16
|
+
children
|
|
17
|
+
}) {
|
|
18
|
+
const [element, setElement] = (0, _element.useState)();
|
|
19
|
+
return (0, _element.createElement)(context.Provider, {
|
|
20
|
+
value: element
|
|
21
|
+
}, (0, _element.createElement)("div", {
|
|
22
|
+
ref: setElement
|
|
23
|
+
}), children);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
Head.context = context;
|
|
27
|
+
//# sourceMappingURL=head.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-editor/src/components/block-list/head.js"],"names":["context","Head","children","element","setElement"],"mappings":";;;;;;;AAGA;;AAHA;AACA;AACA;AAGA,MAAMA,OAAO,GAAG,6BAAhB;;AAEO,SAASC,IAAT,CAAe;AAAEC,EAAAA;AAAF,CAAf,EAA8B;AACpC,QAAM,CAAEC,OAAF,EAAWC,UAAX,IAA0B,wBAAhC;AACA,SACC,4BAAC,OAAD,CAAS,QAAT;AAAkB,IAAA,KAAK,EAAGD;AAA1B,KACC;AAAK,IAAA,GAAG,EAAGC;AAAX,IADD,EAEGF,QAFH,CADD;AAMA;;AAEDD,IAAI,CAACD,OAAL,GAAeA,OAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createContext, useState } from '@wordpress/element';\n\nconst context = createContext();\n\nexport function Head( { children } ) {\n\tconst [ element, setElement ] = useState();\n\treturn (\n\t\t<context.Provider value={ element }>\n\t\t\t<div ref={ setElement } />\n\t\t\t{ children }\n\t\t</context.Provider>\n\t);\n}\n\nHead.context = context;\n"]}
|