diff --git a/packages/annotations/src/block/index.js b/packages/annotations/src/block/index.js index 3a5dee89607abc..8342eb8e326092 100644 --- a/packages/annotations/src/block/index.js +++ b/packages/annotations/src/block/index.js @@ -4,6 +4,10 @@ import { addFilter } from '@wordpress/hooks'; import { withSelect } from '@wordpress/data'; +/** + * Internal dependencies + */ +import { STORE_NAME } from '../store/constants'; /** * Adds annotation className to the block-list-block component. * @@ -13,7 +17,7 @@ import { withSelect } from '@wordpress/data'; const addAnnotationClassName = ( OriginalComponent ) => { return withSelect( ( select, { clientId, className } ) => { const annotations = select( - 'core/annotations' + STORE_NAME ).__experimentalGetAnnotationsForBlock( clientId ); return { diff --git a/packages/annotations/src/format/annotation.js b/packages/annotations/src/format/annotation.js index f3ea7096a37827..dd0d618f9c678c 100644 --- a/packages/annotations/src/format/annotation.js +++ b/packages/annotations/src/format/annotation.js @@ -7,7 +7,10 @@ import { applyFormat, removeFormat } from '@wordpress/rich-text'; const FORMAT_NAME = 'core/annotation'; const ANNOTATION_ATTRIBUTE_PREFIX = 'annotation-text-'; -const STORE_NAME = 'core/annotations'; +/** + * Internal dependencies + */ +import { STORE_NAME } from '../store/constants'; /** * Applies given annotations to the given record. diff --git a/packages/annotations/src/store/constants.js b/packages/annotations/src/store/constants.js new file mode 100644 index 00000000000000..4b8cf0416eb92b --- /dev/null +++ b/packages/annotations/src/store/constants.js @@ -0,0 +1,6 @@ +/** + * The identifier for the data store. + * + * @type {string} + */ +export const STORE_NAME = 'core/annotations'; diff --git a/packages/annotations/src/store/index.js b/packages/annotations/src/store/index.js index 81dee6efd82b44..50c3cab06a72e7 100644 --- a/packages/annotations/src/store/index.js +++ b/packages/annotations/src/store/index.js @@ -13,7 +13,7 @@ import * as actions from './actions'; /** * Module Constants */ -const STORE_NAME = 'core/annotations'; +import { STORE_NAME } from './constants'; /** * Store definition for the annotations namespace.