@wordpress/block-editor 12.19.0 → 12.19.1
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/build/components/rich-text/use-input-rules.js +1 -30
- package/build/components/rich-text/use-input-rules.js.map +1 -1
- package/build/hooks/use-bindings-attributes.js +1 -1
- package/build/hooks/use-bindings-attributes.js.map +1 -1
- package/build/store/reducer.js +2 -1
- package/build/store/reducer.js.map +1 -1
- package/build-module/components/rich-text/use-input-rules.js +2 -31
- package/build-module/components/rich-text/use-input-rules.js.map +1 -1
- package/build-module/hooks/use-bindings-attributes.js +1 -1
- package/build-module/hooks/use-bindings-attributes.js.map +1 -1
- package/build-module/store/reducer.js +2 -1
- package/build-module/store/reducer.js.map +1 -1
- package/build-style/style-rtl.css +0 -12
- package/build-style/style.css +0 -12
- package/package.json +7 -7
- package/src/components/link-control/style.scss +0 -7
- package/src/components/rich-text/use-input-rules.js +2 -30
- package/src/components/url-input/style.scss +0 -4
- package/src/hooks/use-bindings-attributes.js +1 -1
- package/src/store/reducer.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-editor",
|
|
3
|
-
"version": "12.19.
|
|
3
|
+
"version": "12.19.1",
|
|
4
4
|
"description": "Generic block editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"@wordpress/a11y": "^3.51.0",
|
|
39
39
|
"@wordpress/api-fetch": "^6.48.0",
|
|
40
40
|
"@wordpress/blob": "^3.51.0",
|
|
41
|
-
"@wordpress/blocks": "^12.28.
|
|
42
|
-
"@wordpress/commands": "^0.22.
|
|
43
|
-
"@wordpress/components": "^26.0.
|
|
41
|
+
"@wordpress/blocks": "^12.28.1",
|
|
42
|
+
"@wordpress/commands": "^0.22.1",
|
|
43
|
+
"@wordpress/components": "^26.0.1",
|
|
44
44
|
"@wordpress/compose": "^6.28.0",
|
|
45
45
|
"@wordpress/data": "^9.21.0",
|
|
46
46
|
"@wordpress/date": "^4.51.0",
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
"@wordpress/keyboard-shortcuts": "^4.28.0",
|
|
57
57
|
"@wordpress/keycodes": "^3.51.0",
|
|
58
58
|
"@wordpress/notices": "^4.19.0",
|
|
59
|
-
"@wordpress/preferences": "^3.28.
|
|
59
|
+
"@wordpress/preferences": "^3.28.1",
|
|
60
60
|
"@wordpress/private-apis": "^0.33.0",
|
|
61
|
-
"@wordpress/rich-text": "^6.28.
|
|
61
|
+
"@wordpress/rich-text": "^6.28.1",
|
|
62
62
|
"@wordpress/style-engine": "^1.34.0",
|
|
63
63
|
"@wordpress/token-list": "^2.51.0",
|
|
64
64
|
"@wordpress/url": "^3.52.0",
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"publishConfig": {
|
|
88
88
|
"access": "public"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "5902fc0f490528da6965dd4cf97f11192bcf5956"
|
|
91
91
|
}
|
|
@@ -340,13 +340,6 @@ $block-editor-link-control-number-of-actions: 1;
|
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
|
|
343
|
-
.block-editor-link-control__drawer {
|
|
344
|
-
display: flex; // allow for ordering.
|
|
345
|
-
order: 30;
|
|
346
|
-
flex-direction: column;
|
|
347
|
-
flex-basis: 100%; // occupy full width.
|
|
348
|
-
}
|
|
349
|
-
|
|
350
343
|
// Inner div required to avoid padding/margin
|
|
351
344
|
// causing janky animation.
|
|
352
345
|
.block-editor-link-control__drawer-inner {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { useRef } from '@wordpress/element';
|
|
5
5
|
import { useRefEffect } from '@wordpress/compose';
|
|
6
|
-
import { insert,
|
|
6
|
+
import { insert, toHTMLString } from '@wordpress/rich-text';
|
|
7
7
|
import { getBlockTransforms, findTransform } from '@wordpress/blocks';
|
|
8
8
|
import { useDispatch } from '@wordpress/data';
|
|
9
9
|
|
|
@@ -47,34 +47,6 @@ function findSelection( blocks ) {
|
|
|
47
47
|
return [];
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
/**
|
|
51
|
-
* An input rule that replaces two spaces with an en space, and an en space
|
|
52
|
-
* followed by a space with an em space.
|
|
53
|
-
*
|
|
54
|
-
* @param {Object} value Value to replace spaces in.
|
|
55
|
-
*
|
|
56
|
-
* @return {Object} Value with spaces replaced.
|
|
57
|
-
*/
|
|
58
|
-
function replacePrecedingSpaces( value ) {
|
|
59
|
-
if ( ! isCollapsed( value ) ) {
|
|
60
|
-
return value;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
const { text, start } = value;
|
|
64
|
-
const lastTwoCharacters = text.slice( start - 2, start );
|
|
65
|
-
|
|
66
|
-
// Replace two spaces with an em space.
|
|
67
|
-
if ( lastTwoCharacters === ' ' ) {
|
|
68
|
-
return insert( value, '\u2002', start - 2, start );
|
|
69
|
-
}
|
|
70
|
-
// Replace an en space followed by a space with an em space.
|
|
71
|
-
else if ( lastTwoCharacters === '\u2002 ' ) {
|
|
72
|
-
return insert( value, '\u2003', start - 2, start );
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
return value;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
50
|
export function useInputRules( props ) {
|
|
79
51
|
const {
|
|
80
52
|
__unstableMarkLastChangeAsPersistent,
|
|
@@ -155,7 +127,7 @@ export function useInputRules( props ) {
|
|
|
155
127
|
|
|
156
128
|
return accumlator;
|
|
157
129
|
},
|
|
158
|
-
preventEventDiscovery(
|
|
130
|
+
preventEventDiscovery( value )
|
|
159
131
|
);
|
|
160
132
|
|
|
161
133
|
if ( transformed !== value ) {
|
package/src/store/reducer.js
CHANGED
|
@@ -2057,7 +2057,7 @@ function blockBindingsSources( state = {}, action ) {
|
|
|
2057
2057
|
[ action.sourceName ]: {
|
|
2058
2058
|
label: action.sourceLabel,
|
|
2059
2059
|
useSource: action.useSource,
|
|
2060
|
-
lockAttributesEditing: action.lockAttributesEditing,
|
|
2060
|
+
lockAttributesEditing: action.lockAttributesEditing ?? true,
|
|
2061
2061
|
},
|
|
2062
2062
|
};
|
|
2063
2063
|
}
|