Commit 0ac796d 1 parent a09263f commit 0ac796d Copy full SHA for 0ac796d
File tree 7 files changed +22
-30
lines changed
7 files changed +22
-30
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import {
18
18
isUnmodifiedDefaultBlock ,
19
19
serializeRawBlock ,
20
20
switchToBlockType ,
21
+ __experimentalAccessKey as blocksAccessKey ,
21
22
} from '@wordpress/blocks' ;
22
23
import { withFilters } from '@wordpress/components' ;
23
24
import {
@@ -45,10 +46,10 @@ import {
45
46
} from '../../experiments' ;
46
47
47
48
const {
48
- __experimentalHasContentRoleAttribute,
49
49
__unstableGetContentLockingParent,
50
50
__unstableGetTemporarilyEditingAsBlocks,
51
51
} = unlock ( blockEditorExperiments ) ;
52
+ const { __experimentalHasContentRoleAttribute } = unlock ( blocksAccessKey ) ;
52
53
53
54
export const BlockListBlockContext = createContext ( ) ;
54
55
Original file line number Diff line number Diff line change @@ -24,19 +24,18 @@ const { __experimentalPrivateSelector } = unlock( dataExperiments );
24
24
25
25
export const __experimentalAccessKey = register ( {
26
26
// Follow-up on https://github.com/WordPress/gutenberg/pull/42934
27
- __unstableSelectionHasUnmergeableBlock : ( ) =>
28
- __experimentalPrivateSelector (
29
- store ,
30
- __unstableSelectionHasUnmergeableBlock
31
- ) ,
27
+ __unstableSelectionHasUnmergeableBlock : __experimentalPrivateSelector (
28
+ store ,
29
+ __unstableSelectionHasUnmergeableBlock
30
+ ) ,
32
31
33
32
// Follow-up on https://github.com/WordPress/gutenberg/pull/43037
34
- __unstableGetContentLockingParent : ( ... args ) =>
35
- __experimentalPrivateSelector ( store , ( ) =>
36
- __unstableGetContentLockingParent ( ... args )
37
- ) ,
38
- __unstableGetTemporarilyEditingAsBlocks : ( ... args ) =>
39
- __experimentalPrivateSelector ( store , ( ) =>
40
- __unstableGetTemporarilyEditingAsBlocks ( ... args )
41
- ) ,
33
+ __unstableGetContentLockingParent : __experimentalPrivateSelector (
34
+ store ,
35
+ __unstableGetContentLockingParent
36
+ ) ,
37
+ __unstableGetTemporarilyEditingAsBlocks : __experimentalPrivateSelector (
38
+ store ,
39
+ __unstableGetTemporarilyEditingAsBlocks
40
+ ) ,
42
41
} ) ;
Original file line number Diff line number Diff line change @@ -6,5 +6,5 @@ import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/exp
6
6
export const { register, unlock } =
7
7
__dangerousOptInToUnstableAPIsOnlyForCoreModules (
8
8
'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.' ,
9
- '@wordpress/block-editor '
9
+ '@wordpress/block-library '
10
10
) ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -20,8 +20,8 @@ const { __experimentalPrivateSelector } = unlock( dataExperiments );
20
20
21
21
export const __experimentalAccessKey = register ( {
22
22
// Follow-up on https://github.com/WordPress/gutenberg/pull/42934
23
- __experimentalHasContentRoleAttribute : ( ... args ) =>
24
- __experimentalPrivateSelector ( store , ( ) =>
25
- __experimentalHasContentRoleAttribute ( ... args )
26
- ) ,
23
+ __experimentalHasContentRoleAttribute : __experimentalPrivateSelector (
24
+ store ,
25
+ __experimentalHasContentRoleAttribute
26
+ ) ,
27
27
} ) ;
Original file line number Diff line number Diff line change 11
11
export { store } from './store' ;
12
12
export * from './api' ;
13
13
export * from './deprecated' ;
14
+ export { __experimentalAccessKey } from './experiments' ;
Original file line number Diff line number Diff line change @@ -241,7 +241,8 @@ const experimentalAPIs = __dangerousOptInToUnstableAPIsOnlyForCoreModules(
241
241
) ;
242
242
243
243
function __experimentalPrivateSelector ( { name } , selector ) {
244
- return defaultRegistry . stores [ name ] . store . select ( selector ) ;
244
+ return ( ...args ) =>
245
+ selector ( defaultRegistry . stores [ name ] . store . getState ( ) , ...args ) ;
245
246
}
246
247
function __experimentalPrivateDispatch ( { name } , actionThunk ) {
247
248
return defaultRegistry . stores [ name ] . store . dispatch ( actionThunk ) ;
You can’t perform that action at this time.
0 commit comments