@wordpress/block-library 9.12.1-next.082ed6819.0 → 9.13.1-next.a9f418477.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.
Files changed (190) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/block/edit.js +2 -29
  3. package/build/block/edit.js.map +1 -1
  4. package/build/cover/edit/index.js +4 -2
  5. package/build/cover/edit/index.js.map +1 -1
  6. package/build/cover/edit/inspector-controls.js +6 -4
  7. package/build/cover/edit/inspector-controls.js.map +1 -1
  8. package/build/form/index.js +1 -2
  9. package/build/form/index.js.map +1 -1
  10. package/build/form/view.js +10 -5
  11. package/build/form/view.js.map +1 -1
  12. package/build/list-item/hooks/use-merge.js +2 -2
  13. package/build/list-item/hooks/use-merge.js.map +1 -1
  14. package/build/navigation/edit/deleted-navigation-warning.js +9 -2
  15. package/build/navigation/edit/deleted-navigation-warning.js.map +1 -1
  16. package/build/navigation-link/edit.js +1 -2
  17. package/build/navigation-link/edit.js.map +1 -1
  18. package/build/navigation-submenu/edit.js +3 -1
  19. package/build/navigation-submenu/edit.js.map +1 -1
  20. package/build/pattern/recursion-detector.js +0 -1
  21. package/build/pattern/recursion-detector.js.map +1 -1
  22. package/build/query/edit/index.js +2 -2
  23. package/build/query/edit/index.js.map +1 -1
  24. package/build/query/edit/inspector-controls/author-control.js +0 -1
  25. package/build/query/edit/inspector-controls/author-control.js.map +1 -1
  26. package/build/query/edit/inspector-controls/parent-control.js +0 -1
  27. package/build/query/edit/inspector-controls/parent-control.js.map +1 -1
  28. package/build/query/edit/inspector-controls/taxonomy-controls.js +0 -1
  29. package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  30. package/build/query/edit/{pattern-selection-modal.js → pattern-selection.js} +55 -36
  31. package/build/query/edit/pattern-selection.js.map +1 -0
  32. package/build/query/edit/query-content.js +5 -8
  33. package/build/query/edit/query-content.js.map +1 -1
  34. package/build/query/edit/query-placeholder.js +5 -11
  35. package/build/query/edit/query-placeholder.js.map +1 -1
  36. package/build/query/edit/query-toolbar.js +31 -11
  37. package/build/query/edit/query-toolbar.js.map +1 -1
  38. package/build/separator/deprecated.js +2 -1
  39. package/build/separator/deprecated.js.map +1 -1
  40. package/build/separator/edit.js +29 -4
  41. package/build/separator/edit.js.map +1 -1
  42. package/build/separator/index.js +5 -0
  43. package/build/separator/index.js.map +1 -1
  44. package/build/separator/save.js +3 -2
  45. package/build/separator/save.js.map +1 -1
  46. package/build/social-link/edit.js +35 -1
  47. package/build/social-link/edit.js.map +1 -1
  48. package/build/social-link/index.js +4 -2
  49. package/build/social-link/index.js.map +1 -1
  50. package/build/template-part/edit/import-controls.js +0 -1
  51. package/build/template-part/edit/import-controls.js.map +1 -1
  52. package/build-module/block/edit.js +3 -30
  53. package/build-module/block/edit.js.map +1 -1
  54. package/build-module/cover/edit/index.js +4 -2
  55. package/build-module/cover/edit/index.js.map +1 -1
  56. package/build-module/cover/edit/inspector-controls.js +6 -4
  57. package/build-module/cover/edit/inspector-controls.js.map +1 -1
  58. package/build-module/form/index.js +1 -2
  59. package/build-module/form/index.js.map +1 -1
  60. package/build-module/form/view.js +10 -5
  61. package/build-module/form/view.js.map +1 -1
  62. package/build-module/list-item/hooks/use-merge.js +2 -2
  63. package/build-module/list-item/hooks/use-merge.js.map +1 -1
  64. package/build-module/navigation/edit/deleted-navigation-warning.js +10 -3
  65. package/build-module/navigation/edit/deleted-navigation-warning.js.map +1 -1
  66. package/build-module/navigation-link/edit.js +1 -2
  67. package/build-module/navigation-link/edit.js.map +1 -1
  68. package/build-module/navigation-submenu/edit.js +3 -1
  69. package/build-module/navigation-submenu/edit.js.map +1 -1
  70. package/build-module/pattern/recursion-detector.js +0 -1
  71. package/build-module/pattern/recursion-detector.js.map +1 -1
  72. package/build-module/query/edit/index.js +1 -1
  73. package/build-module/query/edit/index.js.map +1 -1
  74. package/build-module/query/edit/inspector-controls/author-control.js +0 -1
  75. package/build-module/query/edit/inspector-controls/author-control.js.map +1 -1
  76. package/build-module/query/edit/inspector-controls/parent-control.js +0 -1
  77. package/build-module/query/edit/inspector-controls/parent-control.js.map +1 -1
  78. package/build-module/query/edit/inspector-controls/taxonomy-controls.js +0 -1
  79. package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  80. package/build-module/query/edit/{pattern-selection-modal.js → pattern-selection.js} +53 -36
  81. package/build-module/query/edit/pattern-selection.js.map +1 -0
  82. package/build-module/query/edit/query-content.js +5 -8
  83. package/build-module/query/edit/query-content.js.map +1 -1
  84. package/build-module/query/edit/query-placeholder.js +6 -12
  85. package/build-module/query/edit/query-placeholder.js.map +1 -1
  86. package/build-module/query/edit/query-toolbar.js +31 -13
  87. package/build-module/query/edit/query-toolbar.js.map +1 -1
  88. package/build-module/separator/deprecated.js +2 -1
  89. package/build-module/separator/deprecated.js.map +1 -1
  90. package/build-module/separator/edit.js +32 -7
  91. package/build-module/separator/edit.js.map +1 -1
  92. package/build-module/separator/index.js +5 -0
  93. package/build-module/separator/index.js.map +1 -1
  94. package/build-module/separator/save.js +3 -2
  95. package/build-module/separator/save.js.map +1 -1
  96. package/build-module/social-link/edit.js +37 -3
  97. package/build-module/social-link/edit.js.map +1 -1
  98. package/build-module/social-link/index.js +4 -2
  99. package/build-module/social-link/index.js.map +1 -1
  100. package/build-module/template-part/edit/import-controls.js +0 -1
  101. package/build-module/template-part/edit/import-controls.js.map +1 -1
  102. package/build-style/button/style-rtl.css +3 -3
  103. package/build-style/button/style.css +3 -3
  104. package/build-style/comments/editor-rtl.css +1 -1
  105. package/build-style/comments/editor.css +1 -1
  106. package/build-style/comments/style-rtl.css +1 -1
  107. package/build-style/comments/style.css +1 -1
  108. package/build-style/comments-pagination/editor-rtl.css +1 -0
  109. package/build-style/comments-pagination/editor.css +1 -0
  110. package/build-style/comments-pagination/style-rtl.css +1 -0
  111. package/build-style/comments-pagination/style.css +1 -0
  112. package/build-style/common-rtl.css +17 -17
  113. package/build-style/common.css +17 -17
  114. package/build-style/editor-rtl.css +76 -41
  115. package/build-style/editor.css +76 -41
  116. package/build-style/gallery/style-rtl.css +2 -2
  117. package/build-style/gallery/style.css +2 -2
  118. package/build-style/heading/style-rtl.css +11 -11
  119. package/build-style/heading/style.css +11 -11
  120. package/build-style/image/style-rtl.css +4 -3
  121. package/build-style/image/style.css +4 -3
  122. package/build-style/latest-comments/style-rtl.css +4 -4
  123. package/build-style/latest-comments/style.css +4 -4
  124. package/build-style/latest-posts/style-rtl.css +2 -1
  125. package/build-style/latest-posts/style.css +2 -1
  126. package/build-style/more/editor-rtl.css +1 -1
  127. package/build-style/more/editor.css +1 -1
  128. package/build-style/nextpage/editor-rtl.css +1 -1
  129. package/build-style/nextpage/editor.css +1 -1
  130. package/build-style/post-comments-form/style-rtl.css +2 -2
  131. package/build-style/post-comments-form/style.css +2 -2
  132. package/build-style/post-featured-image/editor-rtl.css +27 -27
  133. package/build-style/post-featured-image/editor.css +27 -27
  134. package/build-style/pullquote/style-rtl.css +1 -0
  135. package/build-style/pullquote/style.css +1 -0
  136. package/build-style/query/editor-rtl.css +30 -0
  137. package/build-style/query/editor.css +30 -0
  138. package/build-style/read-more/style-rtl.css +2 -2
  139. package/build-style/read-more/style.css +2 -2
  140. package/build-style/social-link/editor-rtl.css +6 -2
  141. package/build-style/social-link/editor.css +6 -2
  142. package/build-style/social-links/editor-rtl.css +2 -2
  143. package/build-style/social-links/editor.css +2 -2
  144. package/build-style/social-links/style-rtl.css +2 -2
  145. package/build-style/social-links/style.css +2 -2
  146. package/build-style/style-rtl.css +55 -51
  147. package/build-style/style.css +55 -51
  148. package/build-style/text-columns/style-rtl.css +3 -3
  149. package/build-style/text-columns/style.css +3 -3
  150. package/build-types/lock-unlock.d.ts +1 -1
  151. package/build-types/lock-unlock.d.ts.map +1 -1
  152. package/package.json +35 -34
  153. package/src/block/edit.js +6 -51
  154. package/src/comments-pagination/editor.scss +1 -0
  155. package/src/comments-pagination/style.scss +1 -0
  156. package/src/cover/edit/index.js +4 -1
  157. package/src/cover/edit/inspector-controls.js +10 -3
  158. package/src/cover/index.php +2 -2
  159. package/src/form/block.json +1 -2
  160. package/src/form/index.php +1 -20
  161. package/src/form/view.js +18 -5
  162. package/src/image/style.scss +4 -3
  163. package/src/latest-posts/style.scss +2 -1
  164. package/src/list-item/hooks/use-merge.js +2 -2
  165. package/src/missing/test/edit.native.js +0 -1
  166. package/src/navigation/README.md +1 -0
  167. package/src/navigation/edit/deleted-navigation-warning.js +11 -2
  168. package/src/navigation/index.php +9 -35
  169. package/src/navigation-link/edit.js +0 -6
  170. package/src/navigation-submenu/edit.js +5 -6
  171. package/src/navigation-submenu/index.php +17 -1
  172. package/src/pullquote/style.scss +1 -0
  173. package/src/query/edit/index.js +1 -1
  174. package/src/query/edit/{pattern-selection-modal.js → pattern-selection.js} +53 -33
  175. package/src/query/edit/query-content.js +4 -10
  176. package/src/query/edit/query-placeholder.js +5 -14
  177. package/src/query/edit/query-toolbar.js +38 -17
  178. package/src/query/editor.scss +30 -0
  179. package/src/search/index.php +3 -3
  180. package/src/separator/block.json +5 -0
  181. package/src/separator/deprecated.js +1 -0
  182. package/src/separator/edit.js +28 -3
  183. package/src/separator/save.js +2 -2
  184. package/src/separator/test/edit.js +1 -0
  185. package/src/social-link/block.json +4 -2
  186. package/src/social-link/edit.js +40 -0
  187. package/src/social-link/editor.scss +5 -0
  188. package/tsconfig.tsbuildinfo +1 -1
  189. package/build/query/edit/pattern-selection-modal.js.map +0 -1
  190. package/build-module/query/edit/pattern-selection-modal.js.map +0 -1
@@ -21,48 +21,67 @@ import {
21
21
  } from '../utils';
22
22
  import { searchPatterns } from '../../utils/search-patterns';
23
23
 
24
- export default function PatternSelectionModal( {
24
+ export function PatternSelectionModal( {
25
25
  clientId,
26
26
  attributes,
27
27
  setIsPatternSelectionModalOpen,
28
+ } ) {
29
+ return (
30
+ <Modal
31
+ overlayClassName="block-library-query-pattern__selection-modal"
32
+ title={ __( 'Choose a pattern' ) }
33
+ onRequestClose={ () => setIsPatternSelectionModalOpen( false ) }
34
+ isFullScreen
35
+ >
36
+ <PatternSelection clientId={ clientId } attributes={ attributes } />
37
+ </Modal>
38
+ );
39
+ }
40
+
41
+ export function useBlockPatterns( clientId, attributes ) {
42
+ const blockNameForPatterns = useBlockNameForPatterns(
43
+ clientId,
44
+ attributes
45
+ );
46
+ return usePatterns( clientId, blockNameForPatterns );
47
+ }
48
+
49
+ export default function PatternSelection( {
50
+ clientId,
51
+ attributes,
52
+ showTitlesAsTooltip = false,
53
+ showSearch = true,
28
54
  } ) {
29
55
  const [ searchValue, setSearchValue ] = useState( '' );
30
56
  const { replaceBlock, selectBlock } = useDispatch( blockEditorStore );
31
- const onBlockPatternSelect = ( pattern, blocks ) => {
32
- const { newBlocks, queryClientIds } = getTransformedBlocksFromPattern(
33
- blocks,
34
- attributes
35
- );
36
- replaceBlock( clientId, newBlocks );
37
- if ( queryClientIds[ 0 ] ) {
38
- selectBlock( queryClientIds[ 0 ] );
39
- }
40
- };
41
- // When we preview Query Loop blocks we should prefer the current
42
- // block's postType, which is passed through block context.
57
+ const blockPatterns = useBlockPatterns( clientId, attributes );
58
+ /*
59
+ * When we preview Query Loop blocks we should prefer the current
60
+ * block's postType, which is passed through block context.
61
+ */
43
62
  const blockPreviewContext = useMemo(
44
63
  () => ( {
45
64
  previewPostType: attributes.query.postType,
46
65
  } ),
47
66
  [ attributes.query.postType ]
48
67
  );
49
- const blockNameForPatterns = useBlockNameForPatterns(
50
- clientId,
51
- attributes
52
- );
53
- const blockPatterns = usePatterns( clientId, blockNameForPatterns );
54
68
  const filteredBlockPatterns = useMemo( () => {
55
69
  return searchPatterns( blockPatterns, searchValue );
56
70
  }, [ blockPatterns, searchValue ] );
57
71
 
72
+ const onBlockPatternSelect = ( pattern, blocks ) => {
73
+ const { newBlocks, queryClientIds } = getTransformedBlocksFromPattern(
74
+ blocks,
75
+ attributes
76
+ );
77
+ replaceBlock( clientId, newBlocks );
78
+ if ( queryClientIds[ 0 ] ) {
79
+ selectBlock( queryClientIds[ 0 ] );
80
+ }
81
+ };
58
82
  return (
59
- <Modal
60
- overlayClassName="block-library-query-pattern__selection-modal"
61
- title={ __( 'Choose a pattern' ) }
62
- onRequestClose={ () => setIsPatternSelectionModalOpen( false ) }
63
- isFullScreen
64
- >
65
- <div className="block-library-query-pattern__selection-content">
83
+ <div className="block-library-query-pattern__selection-content">
84
+ { showSearch && (
66
85
  <div className="block-library-query-pattern__selection-search">
67
86
  <SearchControl
68
87
  __nextHasNoMarginBottom
@@ -72,13 +91,14 @@ export default function PatternSelectionModal( {
72
91
  placeholder={ __( 'Search' ) }
73
92
  />
74
93
  </div>
75
- <BlockContextProvider value={ blockPreviewContext }>
76
- <BlockPatternsList
77
- blockPatterns={ filteredBlockPatterns }
78
- onClickPattern={ onBlockPatternSelect }
79
- />
80
- </BlockContextProvider>
81
- </div>
82
- </Modal>
94
+ ) }
95
+ <BlockContextProvider value={ blockPreviewContext }>
96
+ <BlockPatternsList
97
+ blockPatterns={ filteredBlockPatterns }
98
+ onClickPattern={ onBlockPatternSelect }
99
+ showTitlesAsTooltip={ showTitlesAsTooltip }
100
+ />
101
+ </BlockContextProvider>
102
+ </div>
83
103
  );
84
104
  }
@@ -19,10 +19,10 @@ import { store as coreStore } from '@wordpress/core-data';
19
19
  * Internal dependencies
20
20
  */
21
21
  import EnhancedPaginationControl from './inspector-controls/enhanced-pagination-control';
22
- import QueryToolbar from './query-toolbar';
23
22
  import QueryInspectorControls from './inspector-controls';
24
23
  import EnhancedPaginationModal from './enhanced-pagination-modal';
25
24
  import { getQueryContextFromTemplate } from '../utils';
25
+ import QueryToolbar from './query-toolbar';
26
26
 
27
27
  const DEFAULTS_POSTS_PER_PAGE = 3;
28
28
 
@@ -30,10 +30,9 @@ const TEMPLATE = [ [ 'core/post-template' ] ];
30
30
  export default function QueryContent( {
31
31
  attributes,
32
32
  setAttributes,
33
- openPatternSelectionModal,
34
- name,
35
33
  clientId,
36
34
  context,
35
+ name,
37
36
  } ) {
38
37
  const {
39
38
  queryId,
@@ -154,6 +153,7 @@ export default function QueryContent( {
154
153
  />
155
154
  <InspectorControls>
156
155
  <QueryInspectorControls
156
+ name={ name }
157
157
  attributes={ attributes }
158
158
  setQuery={ updateQuery }
159
159
  setDisplayLayout={ updateDisplayLayout }
@@ -163,13 +163,7 @@ export default function QueryContent( {
163
163
  />
164
164
  </InspectorControls>
165
165
  <BlockControls>
166
- <QueryToolbar
167
- name={ name }
168
- clientId={ clientId }
169
- attributes={ attributes }
170
- setQuery={ updateQuery }
171
- openPatternSelectionModal={ openPatternSelectionModal }
172
- />
166
+ <QueryToolbar attributes={ attributes } clientId={ clientId } />
173
167
  </BlockControls>
174
168
  <InspectorControls group="advanced">
175
169
  <SelectControl
@@ -18,7 +18,8 @@ import { __ } from '@wordpress/i18n';
18
18
  /**
19
19
  * Internal dependencies
20
20
  */
21
- import { useScopedBlockVariations, useBlockNameForPatterns } from '../utils';
21
+ import { useScopedBlockVariations } from '../utils';
22
+ import { useBlockPatterns } from './pattern-selection';
22
23
 
23
24
  export default function QueryPlaceholder( {
24
25
  attributes,
@@ -28,31 +29,21 @@ export default function QueryPlaceholder( {
28
29
  } ) {
29
30
  const [ isStartingBlank, setIsStartingBlank ] = useState( false );
30
31
  const blockProps = useBlockProps();
31
- const blockNameForPatterns = useBlockNameForPatterns(
32
- clientId,
33
- attributes
34
- );
35
- const { blockType, activeBlockVariation, hasPatterns } = useSelect(
32
+ const { blockType, activeBlockVariation } = useSelect(
36
33
  ( select ) => {
37
34
  const { getActiveBlockVariation, getBlockType } =
38
35
  select( blocksStore );
39
- const { getBlockRootClientId, getPatternsByBlockTypes } =
40
- select( blockEditorStore );
41
- const rootClientId = getBlockRootClientId( clientId );
42
36
  return {
43
37
  blockType: getBlockType( name ),
44
38
  activeBlockVariation: getActiveBlockVariation(
45
39
  name,
46
40
  attributes
47
41
  ),
48
- hasPatterns: !! getPatternsByBlockTypes(
49
- blockNameForPatterns,
50
- rootClientId
51
- ).length,
52
42
  };
53
43
  },
54
- [ name, blockNameForPatterns, clientId, attributes ]
44
+ [ name, attributes ]
55
45
  );
46
+ const hasPatterns = !! useBlockPatterns( clientId, attributes ).length;
56
47
  const icon =
57
48
  activeBlockVariation?.icon?.src ||
58
49
  activeBlockVariation?.icon ||
@@ -1,30 +1,51 @@
1
1
  /**
2
2
  * WordPress dependencies
3
3
  */
4
- import { ToolbarGroup, ToolbarButton } from '@wordpress/components';
4
+ import {
5
+ ToolbarGroup,
6
+ ToolbarButton,
7
+ Dropdown,
8
+ __experimentalDropdownContentWrapper as DropdownContentWrapper,
9
+ } from '@wordpress/components';
5
10
  import { __ } from '@wordpress/i18n';
6
11
 
7
12
  /**
8
13
  * Internal dependencies
9
14
  */
10
- import { usePatterns } from '../utils';
15
+ import PatternSelection, { useBlockPatterns } from './pattern-selection';
11
16
 
12
- export default function QueryToolbar( {
13
- openPatternSelectionModal,
14
- name,
15
- clientId,
16
- } ) {
17
- const hasPatterns = !! usePatterns( clientId, name ).length;
17
+ export default function QueryToolbar( { clientId, attributes } ) {
18
+ const hasPatterns = useBlockPatterns( clientId, attributes ).length;
19
+ if ( ! hasPatterns ) {
20
+ return null;
21
+ }
18
22
 
19
23
  return (
20
- <>
21
- { hasPatterns && (
22
- <ToolbarGroup className="wp-block-template-part__block-control-group">
23
- <ToolbarButton onClick={ openPatternSelectionModal }>
24
- { __( 'Replace' ) }
25
- </ToolbarButton>
26
- </ToolbarGroup>
27
- ) }
28
- </>
24
+ <ToolbarGroup className="wp-block-template-part__block-control-group">
25
+ <DropdownContentWrapper>
26
+ <Dropdown
27
+ contentClassName="block-editor-block-settings-menu__popover"
28
+ focusOnMount="firstElement"
29
+ expandOnMobile
30
+ renderToggle={ ( { isOpen, onToggle } ) => (
31
+ <ToolbarButton
32
+ aria-haspopup="true"
33
+ aria-expanded={ isOpen }
34
+ onClick={ onToggle }
35
+ >
36
+ { __( 'Change design' ) }
37
+ </ToolbarButton>
38
+ ) }
39
+ renderContent={ () => (
40
+ <PatternSelection
41
+ clientId={ clientId }
42
+ attributes={ attributes }
43
+ showSearch={ false }
44
+ showTitlesAsTooltip
45
+ />
46
+ ) }
47
+ />
48
+ </DropdownContentWrapper>
49
+ </ToolbarGroup>
29
50
  );
30
51
  }
@@ -45,6 +45,12 @@
45
45
  }
46
46
  }
47
47
 
48
+ .block-library-query-toolspanel__design {
49
+ .block-library-query-pattern__selection-content {
50
+ margin-top: $grid-unit-10;
51
+ }
52
+ }
53
+
48
54
  .wp-block-query__enhanced-pagination-modal {
49
55
  @include break-small() {
50
56
  max-width: $break-mobile;
@@ -54,3 +60,27 @@
54
60
  .wp-block-query__enhanced-pagination-notice {
55
61
  margin: 0;
56
62
  }
63
+
64
+ .block-editor-block-settings-menu__popover {
65
+ &.is-expanded {
66
+ overflow-y: scroll;
67
+ }
68
+ .block-library-query-pattern__selection-content {
69
+ height: 100%;
70
+ }
71
+ .block-editor-block-patterns-list {
72
+ display: grid;
73
+ grid-template-columns: 1fr;
74
+ @include break-small() {
75
+ grid-template-columns: 1fr 1fr;
76
+ }
77
+ grid-gap: $grid-unit-15;
78
+ min-width: $break-zoomed-in;
79
+ @include break-small() {
80
+ min-width: $break-mobile;
81
+ }
82
+ }
83
+ .block-editor-block-patterns-list__list-item {
84
+ margin-bottom: 0;
85
+ }
86
+ }
@@ -177,9 +177,9 @@ function render_block_core_search( $attributes ) {
177
177
  )
178
178
  );
179
179
  $form_directives = '
180
- data-wp-interactive="core/search"'
181
- . $form_context .
182
- 'data-wp-class--wp-block-search__searchfield-hidden="!context.isSearchInputVisible"
180
+ data-wp-interactive="core/search"
181
+ ' . $form_context . '
182
+ data-wp-class--wp-block-search__searchfield-hidden="!context.isSearchInputVisible"
183
183
  data-wp-on-async--keydown="actions.handleSearchKeydown"
184
184
  data-wp-on-async--focusout="actions.handleSearchFocusout"
185
185
  ';
@@ -11,6 +11,11 @@
11
11
  "opacity": {
12
12
  "type": "string",
13
13
  "default": "alpha-channel"
14
+ },
15
+ "tagName": {
16
+ "type": "string",
17
+ "enum": [ "hr", "div" ],
18
+ "default": "hr"
14
19
  }
15
20
  },
16
21
  "supports": {
@@ -49,6 +49,7 @@ const v1 = {
49
49
  style: customColor
50
50
  ? { color: { background: customColor } }
51
51
  : undefined,
52
+ tagName: 'hr',
52
53
  };
53
54
  },
54
55
  };
@@ -6,20 +6,28 @@ import clsx from 'clsx';
6
6
  /**
7
7
  * WordPress dependencies
8
8
  */
9
- import { HorizontalRule } from '@wordpress/components';
9
+ import { HorizontalRule, SelectControl } from '@wordpress/components';
10
10
  import {
11
11
  useBlockProps,
12
12
  getColorClassName,
13
13
  __experimentalUseColorProps as useColorProps,
14
+ InspectorControls,
14
15
  } from '@wordpress/block-editor';
16
+ import { __ } from '@wordpress/i18n';
15
17
 
16
18
  /**
17
19
  * Internal dependencies
18
20
  */
19
21
  import useDeprecatedOpacity from './use-deprecated-opacity';
20
22
 
23
+ const htmlElementMessages = {
24
+ div: __(
25
+ 'The <div> element should only be used if the separator is a design element that should not be announced.'
26
+ ),
27
+ };
28
+
21
29
  export default function SeparatorEdit( { attributes, setAttributes } ) {
22
- const { backgroundColor, opacity, style } = attributes;
30
+ const { backgroundColor, opacity, style, tagName } = attributes;
23
31
  const colorProps = useColorProps( attributes );
24
32
  const currentColor = colorProps?.style?.backgroundColor;
25
33
  const hasCustomColor = !! style?.color?.background;
@@ -44,10 +52,27 @@ export default function SeparatorEdit( { attributes, setAttributes } ) {
44
52
  color: currentColor,
45
53
  backgroundColor: currentColor,
46
54
  };
55
+ const Wrapper = tagName === 'hr' ? HorizontalRule : tagName;
47
56
 
48
57
  return (
49
58
  <>
50
- <HorizontalRule
59
+ <InspectorControls group="advanced">
60
+ <SelectControl
61
+ __nextHasNoMarginBottom
62
+ __next40pxDefaultSize
63
+ label={ __( 'HTML element' ) }
64
+ options={ [
65
+ { label: __( 'Default (<hr>)' ), value: 'hr' },
66
+ { label: '<div>', value: 'div' },
67
+ ] }
68
+ value={ tagName }
69
+ onChange={ ( value ) =>
70
+ setAttributes( { tagName: value } )
71
+ }
72
+ help={ htmlElementMessages[ tagName ] }
73
+ />
74
+ </InspectorControls>
75
+ <Wrapper
51
76
  { ...useBlockProps( {
52
77
  className,
53
78
  style: hasCustomColor ? styles : undefined,
@@ -13,7 +13,7 @@ import {
13
13
  } from '@wordpress/block-editor';
14
14
 
15
15
  export default function separatorSave( { attributes } ) {
16
- const { backgroundColor, style, opacity } = attributes;
16
+ const { backgroundColor, style, opacity, tagName: Tag } = attributes;
17
17
  const customColor = style?.color?.background;
18
18
  const colorProps = getColorClassesAndStyles( attributes );
19
19
  // The hr support changing color using border-color, since border-color
@@ -37,5 +37,5 @@ export default function separatorSave( { attributes } ) {
37
37
  backgroundColor: colorProps?.style?.backgroundColor,
38
38
  color: colorClass ? undefined : customColor,
39
39
  };
40
- return <hr { ...useBlockProps.save( { className, style: styles } ) } />;
40
+ return <Tag { ...useBlockProps.save( { className, style: styles } ) } />;
41
41
  }
@@ -23,6 +23,7 @@ const defaultAttributes = {
23
23
  opacity: 'alpha-channel',
24
24
  style: {},
25
25
  className: '',
26
+ tagName: 'hr',
26
27
  };
27
28
  const defaultProps = {
28
29
  attributes: defaultAttributes,
@@ -9,13 +9,15 @@
9
9
  "textdomain": "default",
10
10
  "attributes": {
11
11
  "url": {
12
- "type": "string"
12
+ "type": "string",
13
+ "role": "content"
13
14
  },
14
15
  "service": {
15
16
  "type": "string"
16
17
  },
17
18
  "label": {
18
- "type": "string"
19
+ "type": "string",
20
+ "role": "content"
19
21
  },
20
22
  "rel": {
21
23
  "type": "string"
@@ -10,18 +10,22 @@ import { DELETE, BACKSPACE, ENTER } from '@wordpress/keycodes';
10
10
  import { useDispatch } from '@wordpress/data';
11
11
 
12
12
  import {
13
+ BlockControls,
13
14
  InspectorControls,
14
15
  URLPopover,
15
16
  URLInput,
17
+ useBlockEditingMode,
16
18
  useBlockProps,
17
19
  store as blockEditorStore,
18
20
  } from '@wordpress/block-editor';
19
21
  import { useState, useRef } from '@wordpress/element';
20
22
  import {
21
23
  Button,
24
+ Dropdown,
22
25
  PanelBody,
23
26
  PanelRow,
24
27
  TextControl,
28
+ ToolbarButton,
25
29
  __experimentalInputControlSuffixWrapper as InputControlSuffixWrapper,
26
30
  } from '@wordpress/components';
27
31
  import { useMergeRefs } from '@wordpress/compose';
@@ -130,6 +134,7 @@ const SocialLinkEdit = ( {
130
134
  // Use internal state instead of a ref to make sure that the component
131
135
  // re-renders when the popover's anchor updates.
132
136
  const [ popoverAnchor, setPopoverAnchor ] = useState( null );
137
+ const isContentOnlyMode = useBlockEditingMode() === 'contentOnly';
133
138
 
134
139
  const IconComponent = getIconBySite( service );
135
140
  const socialLinkName = getNameBySite( service );
@@ -154,6 +159,41 @@ const SocialLinkEdit = ( {
154
159
 
155
160
  return (
156
161
  <>
162
+ { isContentOnlyMode && showLabels && (
163
+ // Add an extra control to modify the label attribute when content only mode is active.
164
+ // With content only mode active, the inspector is hidden, so users need another way
165
+ // to edit this attribute.
166
+ <BlockControls group="other">
167
+ <Dropdown
168
+ popoverProps={ { position: 'bottom right' } }
169
+ renderToggle={ ( { isOpen, onToggle } ) => (
170
+ <ToolbarButton
171
+ onClick={ onToggle }
172
+ aria-haspopup="true"
173
+ aria-expanded={ isOpen }
174
+ >
175
+ { __( 'Text' ) }
176
+ </ToolbarButton>
177
+ ) }
178
+ renderContent={ () => (
179
+ <TextControl
180
+ __next40pxDefaultSize
181
+ __nextHasNoMarginBottom
182
+ className="wp-block-social-link__toolbar_content_text"
183
+ label={ __( 'Text' ) }
184
+ help={ __(
185
+ 'Provide a text label or use the default.'
186
+ ) }
187
+ value={ label }
188
+ onChange={ ( value ) =>
189
+ setAttributes( { label: value } )
190
+ }
191
+ placeholder={ socialLinkName }
192
+ />
193
+ ) }
194
+ />
195
+ </BlockControls>
196
+ ) }
157
197
  <InspectorControls>
158
198
  <PanelBody title={ __( 'Settings' ) }>
159
199
  <PanelRow>
@@ -38,3 +38,8 @@
38
38
  :root :where(.wp-block-social-links.is-style-logos-only .wp-social-link button) {
39
39
  padding: 0;
40
40
  }
41
+
42
+ .wp-block-social-link__toolbar_content_text {
43
+ // Corresponds to the size of the text control input in the block inspector.
44
+ width: 250px;
45
+ }
@@ -1 +1 @@
1
- {"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.es2023.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../node_modules/typescript/lib/lib.esnext.string.d.ts","../../node_modules/typescript/lib/lib.esnext.promise.d.ts","../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../node_modules/typescript/lib/lib.esnext.object.d.ts","../../node_modules/typescript/lib/lib.esnext.regexp.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../private-apis/build-types/implementation.d.ts","../private-apis/build-types/index.d.ts","./src/lock-unlock.ts","./src/table-of-contents/utils.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/react/index.d.ts","./src/table-of-contents/list.tsx","../../typings/gutenberg-env/index.d.ts"],"fileInfos":[{"version":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","17edc026abf73c5c2dd508652d63f68ec4efd9d4856e3469890d27598209feb5",{"version":"4af6b0c727b7a2896463d512fafd23634229adf69ac7c00e2ae15a09cb084fad","affectsGlobalScope":true},{"version":"9c00a480825408b6a24c63c1b71362232927247595d7c97659bc24dc68ae0757","affectsGlobalScope":true},{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true},{"version":"ae37d6ccd1560b0203ab88d46987393adaaa78c919e51acf32fb82c86502e98c","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"479553e3779be7d4f68e9f40cdb82d038e5ef7592010100410723ceced22a0f7","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"d3d7b04b45033f57351c8434f60b6be1ea71a2dfec2d0a0c3c83badbb0e3e693","affectsGlobalScope":true},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true},{"version":"d8670852241d4c6e03f2b89d67497a4bbefe29ecaa5a444e2c11a9b05e6fccc6","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true},{"version":"08a58483392df5fcc1db57d782e87734f77ae9eab42516028acbfe46f29a3ef7","affectsGlobalScope":true},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true},{"version":"0b11f3ca66aa33124202c80b70cd203219c3d4460cfc165e0707aa9ec710fc53","affectsGlobalScope":true},{"version":"6a3f5a0129cc80cf439ab71164334d649b47059a4f5afca90282362407d0c87f","affectsGlobalScope":true},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true},{"version":"15b98a533864d324e5f57cd3cfc0579b231df58c1c0f6063ea0fcb13c3c74ff9","affectsGlobalScope":true},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"cb94716c65b36705d8692894c7c125567225cefc271c27a6ec18964e8d503d10","9562b4736c07eaf98388858acff6157eafae0b51df775cbba5bfdf4733de00b3",{"version":"a475a010f54ca9beabd0abe8dcd9c8542222cce13b5357431730430efffdd52e","signature":"adaa2e86e9be27ffd4b2e99be1b626d88fc29f305bfdd57750a704de97bff3f8"},{"version":"c19a5ece4a6877a6afa5e1a9608c3051f9da73e73bcc164386812ef6d5e5f227","signature":"e7b4b5c0a59ac1a764508530d412e75eb0c2867b35a7bc40aac5553b66db508c"},{"version":"55461596dc873b866911ef4e640fae4c39da7ac1fbc7ef5e649cb2f2fb42c349","affectsGlobalScope":true},"4c68749a564a6facdf675416d75789ee5a557afda8960e0803cf6711fa569288","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380",{"version":"8ca4709dbd22a34bcc1ebf93e1877645bdb02ebd3f3d9a211a299a8db2ee4ba1","affectsGlobalScope":true},{"version":"48078133fe59b4596b3bb2b142760e9f5835dd019d3130fc1de473c25ad092d1","signature":"34d225525f477d882cf3151d630cd7a34543561e818a321b673ab1d975f35e20"},{"version":"cd62baba8e325afe998a6537894fcc0420146c242e1b6fdfdaaadfd21dc0d969","affectsGlobalScope":true}],"root":[76,77,82],"options":{"allowJs":true,"allowSyntheticDefaultImports":true,"checkJs":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"rootDir":"./src","skipDefaultLibCheck":true,"strict":true,"strictNullChecks":true,"target":99},"fileIdsList":[[78,79,80],[75],[77,81],[74]],"referencedMap":[[81,1],[76,2],[82,3],[75,4]],"latestChangedDtsFile":"./build-types/table-of-contents/list.d.ts"},"version":"5.5.3"}
1
+ {"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.es2023.d.ts","../../node_modules/typescript/lib/lib.es2024.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../node_modules/typescript/lib/lib.es2024.collection.d.ts","../../node_modules/typescript/lib/lib.es2024.object.d.ts","../../node_modules/typescript/lib/lib.es2024.promise.d.ts","../../node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2024.string.d.ts","../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../node_modules/typescript/lib/lib.esnext.iterator.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../private-apis/build-types/implementation.d.ts","../private-apis/build-types/index.d.ts","./src/lock-unlock.ts","./src/table-of-contents/utils.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/react/index.d.ts","./src/table-of-contents/list.tsx","../../typings/gutenberg-env/index.d.ts"],"fileIdsList":[[83,84,85],[80],[82,86],[79]],"fileInfos":[{"version":"e41c290ef7dd7dab3493e6cbe5909e0148edf4a8dad0271be08edec368a0f7b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"e12a46ce14b817d4c9e6b2b478956452330bf00c9801b79de46f7a1815b5bd40","impliedFormat":1},{"version":"4fd3f3422b2d2a3dfd5cdd0f387b3a8ec45f006c6ea896a4cb41264c2100bb2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"69e65d976bf166ce4a9e6f6c18f94d2424bf116e90837ace179610dbccad9b42","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"62bb211266ee48b2d0edf0d8d1b191f0c24fc379a82bd4c1692a082c540bc6b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"f1e2a172204962276504466a6393426d2ca9c54894b1ad0a6c9dad867a65f876","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"b5ce7a470bc3628408429040c4e3a53a27755022a32fd05e2cb694e7015386c7","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"bab26767638ab3557de12c900f0b91f710c7dc40ee9793d5a27d32c04f0bf646","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1c9319a09485199c1f7b0498f2988d6d2249793ef67edda49d1e584746be9032","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3a2a0cee0f03ffdde24d89660eba2685bfbdeae955a6c67e8c4c9fd28928eeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"61d6a2092f48af66dbfb220e31eea8b10bc02b6932d6e529005fd2d7b3281290","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},"5b9f56c97568e99fab40c05cb5802c6037895e09ff4b9d2c0fb5a0c924dae3a8","9562b4736c07eaf98388858acff6157eafae0b51df775cbba5bfdf4733de00b3",{"version":"a475a010f54ca9beabd0abe8dcd9c8542222cce13b5357431730430efffdd52e","signature":"77c324d351ba141229fc1f5acc7868be9bb38ebdf2304ecd819f0555fbad34fa"},{"version":"c19a5ece4a6877a6afa5e1a9608c3051f9da73e73bcc164386812ef6d5e5f227","signature":"e7b4b5c0a59ac1a764508530d412e75eb0c2867b35a7bc40aac5553b66db508c"},{"version":"55461596dc873b866911ef4e640fae4c39da7ac1fbc7ef5e649cb2f2fb42c349","affectsGlobalScope":true,"impliedFormat":1},{"version":"4c68749a564a6facdf675416d75789ee5a557afda8960e0803cf6711fa569288","impliedFormat":1},{"version":"f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380","impliedFormat":1},{"version":"8ca4709dbd22a34bcc1ebf93e1877645bdb02ebd3f3d9a211a299a8db2ee4ba1","affectsGlobalScope":true,"impliedFormat":1},{"version":"48078133fe59b4596b3bb2b142760e9f5835dd019d3130fc1de473c25ad092d1","signature":"34d225525f477d882cf3151d630cd7a34543561e818a321b673ab1d975f35e20"},{"version":"cd62baba8e325afe998a6537894fcc0420146c242e1b6fdfdaaadfd21dc0d969","affectsGlobalScope":true}],"root":[81,82,87],"options":{"allowJs":true,"allowSyntheticDefaultImports":true,"checkJs":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"rootDir":"./src","skipDefaultLibCheck":true,"strict":true,"strictNullChecks":true,"target":99},"referencedMap":[[86,1],[81,2],[87,3],[80,4]],"latestChangedDtsFile":"./build-types/table-of-contents/list.d.ts","version":"5.7.2"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["_element","require","_data","_components","_blockEditor","_i18n","_utils","_searchPatterns","_jsxRuntime","PatternSelectionModal","clientId","attributes","setIsPatternSelectionModalOpen","searchValue","setSearchValue","useState","replaceBlock","selectBlock","useDispatch","blockEditorStore","onBlockPatternSelect","pattern","blocks","newBlocks","queryClientIds","getTransformedBlocksFromPattern","blockPreviewContext","useMemo","previewPostType","query","postType","blockNameForPatterns","useBlockNameForPatterns","blockPatterns","usePatterns","filteredBlockPatterns","searchPatterns","jsx","Modal","overlayClassName","title","__","onRequestClose","isFullScreen","children","jsxs","className","SearchControl","__nextHasNoMarginBottom","onChange","value","label","placeholder","BlockContextProvider","__experimentalBlockPatternsList","onClickPattern"],"sources":["@wordpress/block-library/src/query/edit/pattern-selection-modal.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState, useMemo } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport { Modal, SearchControl } from '@wordpress/components';\nimport {\n\tBlockContextProvider,\n\tstore as blockEditorStore,\n\t__experimentalBlockPatternsList as BlockPatternsList,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport {\n\tuseBlockNameForPatterns,\n\tgetTransformedBlocksFromPattern,\n\tusePatterns,\n} from '../utils';\nimport { searchPatterns } from '../../utils/search-patterns';\n\nexport default function PatternSelectionModal( {\n\tclientId,\n\tattributes,\n\tsetIsPatternSelectionModalOpen,\n} ) {\n\tconst [ searchValue, setSearchValue ] = useState( '' );\n\tconst { replaceBlock, selectBlock } = useDispatch( blockEditorStore );\n\tconst onBlockPatternSelect = ( pattern, blocks ) => {\n\t\tconst { newBlocks, queryClientIds } = getTransformedBlocksFromPattern(\n\t\t\tblocks,\n\t\t\tattributes\n\t\t);\n\t\treplaceBlock( clientId, newBlocks );\n\t\tif ( queryClientIds[ 0 ] ) {\n\t\t\tselectBlock( queryClientIds[ 0 ] );\n\t\t}\n\t};\n\t// When we preview Query Loop blocks we should prefer the current\n\t// block's postType, which is passed through block context.\n\tconst blockPreviewContext = useMemo(\n\t\t() => ( {\n\t\t\tpreviewPostType: attributes.query.postType,\n\t\t} ),\n\t\t[ attributes.query.postType ]\n\t);\n\tconst blockNameForPatterns = useBlockNameForPatterns(\n\t\tclientId,\n\t\tattributes\n\t);\n\tconst blockPatterns = usePatterns( clientId, blockNameForPatterns );\n\tconst filteredBlockPatterns = useMemo( () => {\n\t\treturn searchPatterns( blockPatterns, searchValue );\n\t}, [ blockPatterns, searchValue ] );\n\n\treturn (\n\t\t<Modal\n\t\t\toverlayClassName=\"block-library-query-pattern__selection-modal\"\n\t\t\ttitle={ __( 'Choose a pattern' ) }\n\t\t\tonRequestClose={ () => setIsPatternSelectionModalOpen( false ) }\n\t\t\tisFullScreen\n\t\t>\n\t\t\t<div className=\"block-library-query-pattern__selection-content\">\n\t\t\t\t<div className=\"block-library-query-pattern__selection-search\">\n\t\t\t\t\t<SearchControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tonChange={ setSearchValue }\n\t\t\t\t\t\tvalue={ searchValue }\n\t\t\t\t\t\tlabel={ __( 'Search' ) }\n\t\t\t\t\t\tplaceholder={ __( 'Search' ) }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<BlockContextProvider value={ blockPreviewContext }>\n\t\t\t\t\t<BlockPatternsList\n\t\t\t\t\t\tblockPatterns={ filteredBlockPatterns }\n\t\t\t\t\t\tonClickPattern={ onBlockPatternSelect }\n\t\t\t\t\t/>\n\t\t\t\t</BlockContextProvider>\n\t\t\t</div>\n\t\t</Modal>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAKA,IAAAI,KAAA,GAAAJ,OAAA;AAKA,IAAAK,MAAA,GAAAL,OAAA;AAKA,IAAAM,eAAA,GAAAN,OAAA;AAA6D,IAAAO,WAAA,GAAAP,OAAA;AArB7D;AACA;AACA;;AAWA;AACA;AACA;;AAQe,SAASQ,qBAAqBA,CAAE;EAC9CC,QAAQ;EACRC,UAAU;EACVC;AACD,CAAC,EAAG;EACH,MAAM,CAAEC,WAAW,EAAEC,cAAc,CAAE,GAAG,IAAAC,iBAAQ,EAAE,EAAG,CAAC;EACtD,MAAM;IAAEC,YAAY;IAAEC;EAAY,CAAC,GAAG,IAAAC,iBAAW,EAAEC,kBAAiB,CAAC;EACrE,MAAMC,oBAAoB,GAAGA,CAAEC,OAAO,EAAEC,MAAM,KAAM;IACnD,MAAM;MAAEC,SAAS;MAAEC;IAAe,CAAC,GAAG,IAAAC,sCAA+B,EACpEH,MAAM,EACNX,UACD,CAAC;IACDK,YAAY,CAAEN,QAAQ,EAAEa,SAAU,CAAC;IACnC,IAAKC,cAAc,CAAE,CAAC,CAAE,EAAG;MAC1BP,WAAW,CAAEO,cAAc,CAAE,CAAC,CAAG,CAAC;IACnC;EACD,CAAC;EACD;EACA;EACA,MAAME,mBAAmB,GAAG,IAAAC,gBAAO,EAClC,OAAQ;IACPC,eAAe,EAAEjB,UAAU,CAACkB,KAAK,CAACC;EACnC,CAAC,CAAE,EACH,CAAEnB,UAAU,CAACkB,KAAK,CAACC,QAAQ,CAC5B,CAAC;EACD,MAAMC,oBAAoB,GAAG,IAAAC,8BAAuB,EACnDtB,QAAQ,EACRC,UACD,CAAC;EACD,MAAMsB,aAAa,GAAG,IAAAC,kBAAW,EAAExB,QAAQ,EAAEqB,oBAAqB,CAAC;EACnE,MAAMI,qBAAqB,GAAG,IAAAR,gBAAO,EAAE,MAAM;IAC5C,OAAO,IAAAS,8BAAc,EAAEH,aAAa,EAAEpB,WAAY,CAAC;EACpD,CAAC,EAAE,CAAEoB,aAAa,EAAEpB,WAAW,CAAG,CAAC;EAEnC,oBACC,IAAAL,WAAA,CAAA6B,GAAA,EAAClC,WAAA,CAAAmC,KAAK;IACLC,gBAAgB,EAAC,8CAA8C;IAC/DC,KAAK,EAAG,IAAAC,QAAE,EAAE,kBAAmB,CAAG;IAClCC,cAAc,EAAGA,CAAA,KAAM9B,8BAA8B,CAAE,KAAM,CAAG;IAChE+B,YAAY;IAAAC,QAAA,eAEZ,IAAApC,WAAA,CAAAqC,IAAA;MAAKC,SAAS,EAAC,gDAAgD;MAAAF,QAAA,gBAC9D,IAAApC,WAAA,CAAA6B,GAAA;QAAKS,SAAS,EAAC,+CAA+C;QAAAF,QAAA,eAC7D,IAAApC,WAAA,CAAA6B,GAAA,EAAClC,WAAA,CAAA4C,aAAa;UACbC,uBAAuB;UACvBC,QAAQ,EAAGnC,cAAgB;UAC3BoC,KAAK,EAAGrC,WAAa;UACrBsC,KAAK,EAAG,IAAAV,QAAE,EAAE,QAAS,CAAG;UACxBW,WAAW,EAAG,IAAAX,QAAE,EAAE,QAAS;QAAG,CAC9B;MAAC,CACE,CAAC,eACN,IAAAjC,WAAA,CAAA6B,GAAA,EAACjC,YAAA,CAAAiD,oBAAoB;QAACH,KAAK,EAAGxB,mBAAqB;QAAAkB,QAAA,eAClD,IAAApC,WAAA,CAAA6B,GAAA,EAACjC,YAAA,CAAAkD,+BAAiB;UACjBrB,aAAa,EAAGE,qBAAuB;UACvCoB,cAAc,EAAGnC;QAAsB,CACvC;MAAC,CACmB,CAAC;IAAA,CACnB;EAAC,CACA,CAAC;AAEV","ignoreList":[]}