@wordpress/block-library 8.17.1 → 8.18.0
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/CHANGELOG.md +2 -0
- package/build/cover/edit/index.js +3 -1
- package/build/cover/edit/index.js.map +1 -1
- package/build/cover/shared.js +26 -21
- package/build/cover/shared.js.map +1 -1
- package/build/embed/embed-link-settings.native.js +0 -1
- package/build/embed/embed-link-settings.native.js.map +1 -1
- package/build/post-content/edit.js +1 -1
- package/build/post-content/edit.js.map +1 -1
- package/build/post-template/index.js +1 -1
- package/build/query/edit/inspector-controls/index.js +28 -3
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/query/edit/query-content.js +2 -1
- package/build/query/edit/query-content.js.map +1 -1
- package/build/query/index.js +9 -2
- package/build/query/index.js.map +1 -1
- package/build/query/view.js +75 -0
- package/build/query/view.js.map +1 -0
- package/build/query-pagination-next/index.js +1 -1
- package/build/query-pagination-numbers/edit.js +50 -5
- package/build/query-pagination-numbers/edit.js.map +1 -1
- package/build/query-pagination-numbers/index.js +7 -1
- package/build/query-pagination-numbers/index.js.map +1 -1
- package/build/query-pagination-previous/index.js +1 -1
- package/build/search/edit.js +3 -1
- package/build/search/edit.js.map +1 -1
- package/build/search/utils.js +2 -4
- package/build/search/utils.js.map +1 -1
- package/build/social-link/edit.native.js +1 -3
- package/build/social-link/edit.native.js.map +1 -1
- package/build-module/cover/edit/index.js +3 -1
- package/build-module/cover/edit/index.js.map +1 -1
- package/build-module/cover/shared.js +26 -21
- package/build-module/cover/shared.js.map +1 -1
- package/build-module/embed/embed-link-settings.native.js +0 -1
- package/build-module/embed/embed-link-settings.native.js.map +1 -1
- package/build-module/post-content/edit.js +1 -1
- package/build-module/post-content/edit.js.map +1 -1
- package/build-module/post-template/index.js +1 -1
- package/build-module/query/edit/inspector-controls/index.js +29 -4
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/query/edit/query-content.js +2 -1
- package/build-module/query/edit/query-content.js.map +1 -1
- package/build-module/query/index.js +9 -2
- package/build-module/query/index.js.map +1 -1
- package/build-module/query/view.js +72 -0
- package/build-module/query/view.js.map +1 -0
- package/build-module/query-pagination-next/index.js +1 -1
- package/build-module/query-pagination-numbers/edit.js +51 -6
- package/build-module/query-pagination-numbers/edit.js.map +1 -1
- package/build-module/query-pagination-numbers/index.js +7 -1
- package/build-module/query-pagination-numbers/index.js.map +1 -1
- package/build-module/query-pagination-previous/index.js +1 -1
- package/build-module/search/edit.js +4 -2
- package/build-module/search/edit.js.map +1 -1
- package/build-module/search/utils.js +0 -1
- package/build-module/search/utils.js.map +1 -1
- package/build-module/social-link/edit.native.js +1 -3
- package/build-module/social-link/edit.native.js.map +1 -1
- package/build-style/query/style-rtl.css +140 -0
- package/build-style/query/style.css +140 -0
- package/build-style/site-logo/style-rtl.css +1 -0
- package/build-style/site-logo/style.css +1 -0
- package/build-style/style-rtl.css +1 -0
- package/build-style/style.css +1 -0
- package/package.json +32 -32
- package/src/audio/test/__snapshots__/edit.native.js.snap +106 -78
- package/src/cover/edit/index.js +3 -1
- package/src/cover/shared.js +25 -20
- package/src/cover/test/edit.native.js +1 -5
- package/src/embed/embed-link-settings.native.js +0 -1
- package/src/embed/test/index.native.js +9 -9
- package/src/file/test/__snapshots__/edit.native.js.snap +218 -162
- package/src/image/index.php +5 -0
- package/src/post-content/edit.js +2 -2
- package/src/post-content/index.php +0 -6
- package/src/post-featured-image/index.php +0 -6
- package/src/post-template/block.json +2 -1
- package/src/post-template/index.php +19 -4
- package/src/query/block.json +9 -2
- package/src/query/edit/inspector-controls/index.js +46 -3
- package/src/query/edit/query-content.js +1 -0
- package/src/query/index.php +94 -1
- package/src/query/style.scss +63 -0
- package/src/query/view.js +82 -0
- package/src/query-no-results/index.php +1 -5
- package/src/query-pagination-next/block.json +7 -1
- package/src/query-pagination-next/index.php +20 -3
- package/src/query-pagination-numbers/block.json +7 -1
- package/src/query-pagination-numbers/edit.js +64 -16
- package/src/query-pagination-numbers/index.php +27 -4
- package/src/query-pagination-previous/block.json +7 -1
- package/src/query-pagination-previous/index.php +19 -2
- package/src/search/edit.js +8 -2
- package/src/search/test/__snapshots__/edit.native.js.snap +363 -265
- package/src/search/utils.js +0 -1
- package/src/site-logo/style.scss +1 -0
- package/src/social-link/edit.native.js +1 -1
- package/src/social-link/editor.native.scss +0 -4
- package/src/social-links/test/edit.native.js +30 -0
- package/src/social-link/test/index.native.js +0 -132
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-library",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.18.0",
|
|
4
4
|
"description": "Block library for the WordPress editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -31,36 +31,36 @@
|
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@babel/runtime": "^7.16.0",
|
|
34
|
-
"@wordpress/a11y": "^3.
|
|
35
|
-
"@wordpress/api-fetch": "^6.
|
|
36
|
-
"@wordpress/autop": "^3.
|
|
37
|
-
"@wordpress/blob": "^3.
|
|
38
|
-
"@wordpress/block-editor": "^12.
|
|
39
|
-
"@wordpress/blocks": "^12.
|
|
40
|
-
"@wordpress/components": "^25.
|
|
41
|
-
"@wordpress/compose": "^6.
|
|
42
|
-
"@wordpress/core-data": "^6.
|
|
43
|
-
"@wordpress/data": "^9.
|
|
44
|
-
"@wordpress/date": "^4.
|
|
45
|
-
"@wordpress/deprecated": "^3.
|
|
46
|
-
"@wordpress/dom": "^3.
|
|
47
|
-
"@wordpress/element": "^5.
|
|
48
|
-
"@wordpress/escape-html": "^2.
|
|
49
|
-
"@wordpress/hooks": "^3.
|
|
50
|
-
"@wordpress/html-entities": "^3.
|
|
51
|
-
"@wordpress/i18n": "^4.
|
|
52
|
-
"@wordpress/icons": "^9.
|
|
53
|
-
"@wordpress/interactivity": "^2.
|
|
54
|
-
"@wordpress/keycodes": "^3.
|
|
55
|
-
"@wordpress/notices": "^4.
|
|
56
|
-
"@wordpress/primitives": "^3.
|
|
57
|
-
"@wordpress/private-apis": "^0.
|
|
58
|
-
"@wordpress/reusable-blocks": "^4.
|
|
59
|
-
"@wordpress/rich-text": "^6.
|
|
60
|
-
"@wordpress/server-side-render": "^4.
|
|
61
|
-
"@wordpress/url": "^3.
|
|
62
|
-
"@wordpress/viewport": "^5.
|
|
63
|
-
"@wordpress/wordcount": "^3.
|
|
34
|
+
"@wordpress/a11y": "^3.41.0",
|
|
35
|
+
"@wordpress/api-fetch": "^6.38.0",
|
|
36
|
+
"@wordpress/autop": "^3.41.0",
|
|
37
|
+
"@wordpress/blob": "^3.41.0",
|
|
38
|
+
"@wordpress/block-editor": "^12.9.0",
|
|
39
|
+
"@wordpress/blocks": "^12.18.0",
|
|
40
|
+
"@wordpress/components": "^25.7.0",
|
|
41
|
+
"@wordpress/compose": "^6.18.0",
|
|
42
|
+
"@wordpress/core-data": "^6.18.0",
|
|
43
|
+
"@wordpress/data": "^9.11.0",
|
|
44
|
+
"@wordpress/date": "^4.41.0",
|
|
45
|
+
"@wordpress/deprecated": "^3.41.0",
|
|
46
|
+
"@wordpress/dom": "^3.41.0",
|
|
47
|
+
"@wordpress/element": "^5.18.0",
|
|
48
|
+
"@wordpress/escape-html": "^2.41.0",
|
|
49
|
+
"@wordpress/hooks": "^3.41.0",
|
|
50
|
+
"@wordpress/html-entities": "^3.41.0",
|
|
51
|
+
"@wordpress/i18n": "^4.41.0",
|
|
52
|
+
"@wordpress/icons": "^9.32.0",
|
|
53
|
+
"@wordpress/interactivity": "^2.2.0",
|
|
54
|
+
"@wordpress/keycodes": "^3.41.0",
|
|
55
|
+
"@wordpress/notices": "^4.9.0",
|
|
56
|
+
"@wordpress/primitives": "^3.39.0",
|
|
57
|
+
"@wordpress/private-apis": "^0.23.0",
|
|
58
|
+
"@wordpress/reusable-blocks": "^4.18.0",
|
|
59
|
+
"@wordpress/rich-text": "^6.18.0",
|
|
60
|
+
"@wordpress/server-side-render": "^4.18.0",
|
|
61
|
+
"@wordpress/url": "^3.42.0",
|
|
62
|
+
"@wordpress/viewport": "^5.18.0",
|
|
63
|
+
"@wordpress/wordcount": "^3.41.0",
|
|
64
64
|
"change-case": "^4.1.2",
|
|
65
65
|
"classnames": "^2.3.1",
|
|
66
66
|
"colord": "^2.7.0",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"publishConfig": {
|
|
80
80
|
"access": "public"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "5eac1734bcdca2301fdd37ec8cfe2a45e722a2c4"
|
|
83
83
|
}
|
|
@@ -133,7 +133,7 @@ exports[`Audio block renders audio block error state without crashing 1`] = `
|
|
|
133
133
|
]
|
|
134
134
|
}
|
|
135
135
|
>
|
|
136
|
-
<
|
|
136
|
+
<View
|
|
137
137
|
accessibilityState={
|
|
138
138
|
{
|
|
139
139
|
"busy": undefined,
|
|
@@ -143,59 +143,73 @@ exports[`Audio block renders audio block error state without crashing 1`] = `
|
|
|
143
143
|
"selected": undefined,
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
|
-
|
|
147
|
-
activeFormats={[]}
|
|
148
|
-
blockType={
|
|
146
|
+
accessibilityValue={
|
|
149
147
|
{
|
|
150
|
-
"
|
|
148
|
+
"max": undefined,
|
|
149
|
+
"min": undefined,
|
|
150
|
+
"now": undefined,
|
|
151
|
+
"text": undefined,
|
|
151
152
|
}
|
|
152
153
|
}
|
|
153
|
-
|
|
154
|
-
|
|
154
|
+
accessible={false}
|
|
155
|
+
collapsable={false}
|
|
155
156
|
focusable={true}
|
|
156
|
-
fontFamily="serif"
|
|
157
|
-
fontSize={14}
|
|
158
|
-
isMultiline={false}
|
|
159
|
-
maxImagesWidth={200}
|
|
160
|
-
onBackspace={[Function]}
|
|
161
157
|
onBlur={[Function]}
|
|
162
|
-
onChange={[Function]}
|
|
163
158
|
onClick={[Function]}
|
|
164
|
-
onContentSizeChange={[Function]}
|
|
165
|
-
onEnter={[Function]}
|
|
166
159
|
onFocus={[Function]}
|
|
167
|
-
onHTMLContentWithCursor={[Function]}
|
|
168
|
-
onKeyDown={[Function]}
|
|
169
|
-
onPaste={[Function]}
|
|
170
160
|
onResponderGrant={[Function]}
|
|
171
161
|
onResponderMove={[Function]}
|
|
172
162
|
onResponderRelease={[Function]}
|
|
173
163
|
onResponderTerminate={[Function]}
|
|
174
164
|
onResponderTerminationRequest={[Function]}
|
|
175
|
-
onSelectionChange={[Function]}
|
|
176
165
|
onStartShouldSetResponder={[Function]}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
"minHeight": 0,
|
|
166
|
+
>
|
|
167
|
+
<RCTAztecView
|
|
168
|
+
activeFormats={[]}
|
|
169
|
+
blockType={
|
|
170
|
+
{
|
|
171
|
+
"tag": "p",
|
|
172
|
+
}
|
|
185
173
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
174
|
+
deleteEnter={true}
|
|
175
|
+
disableEditingMenu={false}
|
|
176
|
+
fontFamily="serif"
|
|
177
|
+
fontSize={14}
|
|
178
|
+
isMultiline={false}
|
|
179
|
+
maxImagesWidth={200}
|
|
180
|
+
onBackspace={[Function]}
|
|
181
|
+
onBlur={[Function]}
|
|
182
|
+
onChange={[Function]}
|
|
183
|
+
onContentSizeChange={[Function]}
|
|
184
|
+
onEnter={[Function]}
|
|
185
|
+
onFocus={[Function]}
|
|
186
|
+
onHTMLContentWithCursor={[Function]}
|
|
187
|
+
onKeyDown={[Function]}
|
|
188
|
+
onPaste={[Function]}
|
|
189
|
+
onSelectionChange={[Function]}
|
|
190
|
+
placeholder="Add caption"
|
|
191
|
+
placeholderTextColor="gray"
|
|
192
|
+
selectionColor="black"
|
|
193
|
+
style={
|
|
194
|
+
{
|
|
195
|
+
"backgroundColor": undefined,
|
|
196
|
+
"maxWidth": undefined,
|
|
197
|
+
"minHeight": 0,
|
|
198
|
+
}
|
|
194
199
|
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
200
|
+
text={
|
|
201
|
+
{
|
|
202
|
+
"eventCount": undefined,
|
|
203
|
+
"linkTextColor": undefined,
|
|
204
|
+
"selection": null,
|
|
205
|
+
"tag": "p",
|
|
206
|
+
"text": "",
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
textAlign="center"
|
|
210
|
+
triggerKeyCodes={[]}
|
|
211
|
+
/>
|
|
212
|
+
</View>
|
|
199
213
|
</View>
|
|
200
214
|
</View>
|
|
201
215
|
</View>
|
|
@@ -359,7 +373,7 @@ exports[`Audio block renders audio file without crashing 1`] = `
|
|
|
359
373
|
]
|
|
360
374
|
}
|
|
361
375
|
>
|
|
362
|
-
<
|
|
376
|
+
<View
|
|
363
377
|
accessibilityState={
|
|
364
378
|
{
|
|
365
379
|
"busy": undefined,
|
|
@@ -369,59 +383,73 @@ exports[`Audio block renders audio file without crashing 1`] = `
|
|
|
369
383
|
"selected": undefined,
|
|
370
384
|
}
|
|
371
385
|
}
|
|
372
|
-
|
|
373
|
-
activeFormats={[]}
|
|
374
|
-
blockType={
|
|
386
|
+
accessibilityValue={
|
|
375
387
|
{
|
|
376
|
-
"
|
|
388
|
+
"max": undefined,
|
|
389
|
+
"min": undefined,
|
|
390
|
+
"now": undefined,
|
|
391
|
+
"text": undefined,
|
|
377
392
|
}
|
|
378
393
|
}
|
|
379
|
-
|
|
380
|
-
|
|
394
|
+
accessible={false}
|
|
395
|
+
collapsable={false}
|
|
381
396
|
focusable={true}
|
|
382
|
-
fontFamily="serif"
|
|
383
|
-
fontSize={14}
|
|
384
|
-
isMultiline={false}
|
|
385
|
-
maxImagesWidth={200}
|
|
386
|
-
onBackspace={[Function]}
|
|
387
397
|
onBlur={[Function]}
|
|
388
|
-
onChange={[Function]}
|
|
389
398
|
onClick={[Function]}
|
|
390
|
-
onContentSizeChange={[Function]}
|
|
391
|
-
onEnter={[Function]}
|
|
392
399
|
onFocus={[Function]}
|
|
393
|
-
onHTMLContentWithCursor={[Function]}
|
|
394
|
-
onKeyDown={[Function]}
|
|
395
|
-
onPaste={[Function]}
|
|
396
400
|
onResponderGrant={[Function]}
|
|
397
401
|
onResponderMove={[Function]}
|
|
398
402
|
onResponderRelease={[Function]}
|
|
399
403
|
onResponderTerminate={[Function]}
|
|
400
404
|
onResponderTerminationRequest={[Function]}
|
|
401
|
-
onSelectionChange={[Function]}
|
|
402
405
|
onStartShouldSetResponder={[Function]}
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
"minHeight": 0,
|
|
406
|
+
>
|
|
407
|
+
<RCTAztecView
|
|
408
|
+
activeFormats={[]}
|
|
409
|
+
blockType={
|
|
410
|
+
{
|
|
411
|
+
"tag": "p",
|
|
412
|
+
}
|
|
411
413
|
}
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
414
|
+
deleteEnter={true}
|
|
415
|
+
disableEditingMenu={false}
|
|
416
|
+
fontFamily="serif"
|
|
417
|
+
fontSize={14}
|
|
418
|
+
isMultiline={false}
|
|
419
|
+
maxImagesWidth={200}
|
|
420
|
+
onBackspace={[Function]}
|
|
421
|
+
onBlur={[Function]}
|
|
422
|
+
onChange={[Function]}
|
|
423
|
+
onContentSizeChange={[Function]}
|
|
424
|
+
onEnter={[Function]}
|
|
425
|
+
onFocus={[Function]}
|
|
426
|
+
onHTMLContentWithCursor={[Function]}
|
|
427
|
+
onKeyDown={[Function]}
|
|
428
|
+
onPaste={[Function]}
|
|
429
|
+
onSelectionChange={[Function]}
|
|
430
|
+
placeholder="Add caption"
|
|
431
|
+
placeholderTextColor="gray"
|
|
432
|
+
selectionColor="black"
|
|
433
|
+
style={
|
|
434
|
+
{
|
|
435
|
+
"backgroundColor": undefined,
|
|
436
|
+
"maxWidth": undefined,
|
|
437
|
+
"minHeight": 0,
|
|
438
|
+
}
|
|
420
439
|
}
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
440
|
+
text={
|
|
441
|
+
{
|
|
442
|
+
"eventCount": undefined,
|
|
443
|
+
"linkTextColor": undefined,
|
|
444
|
+
"selection": null,
|
|
445
|
+
"tag": "p",
|
|
446
|
+
"text": "",
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
textAlign="center"
|
|
450
|
+
triggerKeyCodes={[]}
|
|
451
|
+
/>
|
|
452
|
+
</View>
|
|
425
453
|
</View>
|
|
426
454
|
</View>
|
|
427
455
|
</View>
|
package/src/cover/edit/index.js
CHANGED
|
@@ -151,8 +151,10 @@ function CoverEdit( {
|
|
|
151
151
|
const setMedia = attributesFromMedia( setAttributes, dimRatio );
|
|
152
152
|
|
|
153
153
|
const onSelectMedia = async ( newMedia ) => {
|
|
154
|
+
// Only pass the url to getCoverIsDark if the media is an image as video is not handled.
|
|
155
|
+
const newUrl = newMedia?.type === 'image' ? newMedia.url : undefined;
|
|
154
156
|
const isDarkSetting = await getCoverIsDark(
|
|
155
|
-
|
|
157
|
+
newUrl,
|
|
156
158
|
dimRatio,
|
|
157
159
|
overlayColor.color
|
|
158
160
|
);
|
package/src/cover/shared.js
CHANGED
|
@@ -167,26 +167,31 @@ export async function getCoverIsDark( url, dimRatio = 50, overlayColor ) {
|
|
|
167
167
|
.toRgb();
|
|
168
168
|
|
|
169
169
|
if ( url ) {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
170
|
+
try {
|
|
171
|
+
const imgCrossOrigin = applyFilters(
|
|
172
|
+
'media.crossOrigin',
|
|
173
|
+
undefined,
|
|
174
|
+
url
|
|
175
|
+
);
|
|
176
|
+
const {
|
|
177
|
+
value: [ r, g, b, a ],
|
|
178
|
+
} = await retrieveFastAverageColor().getColorAsync( url, {
|
|
179
|
+
// Previously the default color was white, but that changed
|
|
180
|
+
// in v6.0.0 so it has to be manually set now.
|
|
181
|
+
defaultColor: [ 255, 255, 255, 255 ],
|
|
182
|
+
// Errors that come up don't reject the promise, so error
|
|
183
|
+
// logging has to be silenced with this option.
|
|
184
|
+
silent: process.env.NODE_ENV === 'production',
|
|
185
|
+
crossOrigin: imgCrossOrigin,
|
|
186
|
+
} );
|
|
187
|
+
// FAC uses 0-255 for alpha, but colord expects 0-1.
|
|
188
|
+
const media = { r, g, b, a: a / 255 };
|
|
189
|
+
const composite = compositeSourceOver( overlay, media );
|
|
190
|
+
return colord( composite ).isDark();
|
|
191
|
+
} catch ( error ) {
|
|
192
|
+
// If there's an error, just assume the image is dark.
|
|
193
|
+
return true;
|
|
194
|
+
}
|
|
190
195
|
}
|
|
191
196
|
|
|
192
197
|
// Assume a white background because it isn't easy to get the actual
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { Image
|
|
4
|
+
import { Image } from 'react-native';
|
|
5
5
|
import {
|
|
6
6
|
getEditorHtml,
|
|
7
7
|
initializeEditor,
|
|
@@ -12,7 +12,6 @@ import {
|
|
|
12
12
|
getBlock,
|
|
13
13
|
openBlockSettings,
|
|
14
14
|
} from 'test/helpers';
|
|
15
|
-
import HsvColorPicker from 'react-native-hsv-color-picker';
|
|
16
15
|
|
|
17
16
|
/**
|
|
18
17
|
* WordPress dependencies
|
|
@@ -541,9 +540,6 @@ describe( 'color settings', () => {
|
|
|
541
540
|
} );
|
|
542
541
|
|
|
543
542
|
it( 'displays the hex color value in the custom color picker', async () => {
|
|
544
|
-
HsvColorPicker.mockImplementation( ( props ) => {
|
|
545
|
-
return <Pressable { ...props } testID="hsv-color-picker" />;
|
|
546
|
-
} );
|
|
547
543
|
const screen = await initializeEditor( {
|
|
548
544
|
initialHtml: COVER_BLOCK_PLACEHOLDER_HTML,
|
|
549
545
|
} );
|
|
@@ -241,7 +241,7 @@ describe( 'Embed block', () => {
|
|
|
241
241
|
|
|
242
242
|
// Wait for edit URL modal to be visible.
|
|
243
243
|
const embedEditURLModal = editor.getByTestId(
|
|
244
|
-
'
|
|
244
|
+
'link-settings-navigation'
|
|
245
245
|
);
|
|
246
246
|
await waitForModalVisible( embedEditURLModal );
|
|
247
247
|
|
|
@@ -259,7 +259,7 @@ describe( 'Embed block', () => {
|
|
|
259
259
|
|
|
260
260
|
// Wait for edit URL modal to be visible.
|
|
261
261
|
const embedEditURLModal = editor.getByTestId(
|
|
262
|
-
'
|
|
262
|
+
'link-settings-navigation'
|
|
263
263
|
);
|
|
264
264
|
await waitForModalVisible( embedEditURLModal );
|
|
265
265
|
|
|
@@ -299,7 +299,7 @@ describe( 'Embed block', () => {
|
|
|
299
299
|
|
|
300
300
|
// Wait for edit URL modal to be visible.
|
|
301
301
|
const embedEditURLModal = editor.getByTestId(
|
|
302
|
-
'
|
|
302
|
+
'link-settings-navigation'
|
|
303
303
|
);
|
|
304
304
|
await waitForModalVisible( embedEditURLModal );
|
|
305
305
|
|
|
@@ -338,7 +338,7 @@ describe( 'Embed block', () => {
|
|
|
338
338
|
|
|
339
339
|
// Wait for edit URL modal to be visible.
|
|
340
340
|
const embedEditURLModal = editor.getByTestId(
|
|
341
|
-
'
|
|
341
|
+
'link-settings-navigation'
|
|
342
342
|
);
|
|
343
343
|
await waitForModalVisible( embedEditURLModal );
|
|
344
344
|
|
|
@@ -359,7 +359,7 @@ describe( 'Embed block', () => {
|
|
|
359
359
|
|
|
360
360
|
// Wait for edit URL modal to be visible.
|
|
361
361
|
const embedEditURLModal = editor.getByTestId(
|
|
362
|
-
'
|
|
362
|
+
'link-settings-navigation'
|
|
363
363
|
);
|
|
364
364
|
await waitForModalVisible( embedEditURLModal );
|
|
365
365
|
|
|
@@ -400,7 +400,7 @@ describe( 'Embed block', () => {
|
|
|
400
400
|
|
|
401
401
|
// Wait for edit URL modal to be visible.
|
|
402
402
|
const embedEditURLModal = editor.getByTestId(
|
|
403
|
-
'
|
|
403
|
+
'link-settings-navigation'
|
|
404
404
|
);
|
|
405
405
|
await waitForModalVisible( embedEditURLModal );
|
|
406
406
|
|
|
@@ -584,7 +584,7 @@ describe( 'Embed block', () => {
|
|
|
584
584
|
|
|
585
585
|
// Wait for edit URL modal to be visible.
|
|
586
586
|
const embedEditURLModal = editor.getByTestId(
|
|
587
|
-
'
|
|
587
|
+
'link-settings-navigation'
|
|
588
588
|
);
|
|
589
589
|
await waitForModalVisible( embedEditURLModal );
|
|
590
590
|
|
|
@@ -623,7 +623,7 @@ describe( 'Embed block', () => {
|
|
|
623
623
|
|
|
624
624
|
// Wait for edit URL modal to be visible.
|
|
625
625
|
const embedEditURLModal = editor.getByTestId(
|
|
626
|
-
'
|
|
626
|
+
'link-settings-navigation'
|
|
627
627
|
);
|
|
628
628
|
await waitForModalVisible( embedEditURLModal );
|
|
629
629
|
|
|
@@ -804,7 +804,7 @@ describe( 'Embed block', () => {
|
|
|
804
804
|
|
|
805
805
|
// Dismiss the edit URL modal.
|
|
806
806
|
const embedEditURLModal = editor.getByTestId(
|
|
807
|
-
'
|
|
807
|
+
'link-settings-navigation'
|
|
808
808
|
);
|
|
809
809
|
fireEvent( embedEditURLModal, 'backdropPress' );
|
|
810
810
|
fireEvent( embedEditURLModal, MODAL_DISMISS_EVENT );
|