@wordpress/block-editor 11.3.3 → 11.4.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 (192) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/components/block-popover/inbetween.js +10 -33
  3. package/build/components/block-popover/inbetween.js.map +1 -1
  4. package/build/components/block-types-list/index.native.js +2 -0
  5. package/build/components/block-types-list/index.native.js.map +1 -1
  6. package/build/components/colors-gradients/control.js +6 -3
  7. package/build/components/colors-gradients/control.js.map +1 -1
  8. package/build/components/font-appearance-control/index.js +0 -3
  9. package/build/components/font-appearance-control/index.js.map +1 -1
  10. package/build/components/global-styles/hooks.js +106 -45
  11. package/build/components/global-styles/hooks.js.map +1 -1
  12. package/build/components/global-styles/index.js +24 -0
  13. package/build/components/global-styles/index.js.map +1 -1
  14. package/build/components/global-styles/typography-panel.js +421 -0
  15. package/build/components/global-styles/typography-panel.js.map +1 -0
  16. package/build/components/global-styles/use-global-styles-output.js +6 -2
  17. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  18. package/build/components/iframe/index.js +17 -11
  19. package/build/components/iframe/index.js.map +1 -1
  20. package/build/components/image-editor/aspect-ratio-dropdown.js +2 -1
  21. package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  22. package/build/components/image-size-control/index.js +6 -11
  23. package/build/components/image-size-control/index.js.map +1 -1
  24. package/build/components/inserter/block-patterns-tab.js +9 -15
  25. package/build/components/inserter/block-patterns-tab.js.map +1 -1
  26. package/build/components/inserter/block-types-tab.native.js +4 -1
  27. package/build/components/inserter/block-types-tab.native.js.map +1 -1
  28. package/build/components/inserter/reusable-blocks-tab.native.js +4 -1
  29. package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  30. package/build/components/inserter/search-results.native.js +4 -1
  31. package/build/components/inserter/search-results.native.js.map +1 -1
  32. package/build/components/link-control/index.js +15 -15
  33. package/build/components/link-control/index.js.map +1 -1
  34. package/build/components/link-control/settings-drawer.js +72 -30
  35. package/build/components/link-control/settings-drawer.js.map +1 -1
  36. package/build/components/link-control/settings.js +52 -0
  37. package/build/components/link-control/settings.js.map +1 -0
  38. package/build/components/list-view/index.js +6 -1
  39. package/build/components/list-view/index.js.map +1 -1
  40. package/build/components/off-canvas-editor/block-contents.js +3 -2
  41. package/build/components/off-canvas-editor/block-contents.js.map +1 -1
  42. package/build/components/off-canvas-editor/leaf-more-menu.js +116 -0
  43. package/build/components/off-canvas-editor/leaf-more-menu.js.map +1 -0
  44. package/build/components/off-canvas-editor/link-ui.js +1 -0
  45. package/build/components/off-canvas-editor/link-ui.js.map +1 -1
  46. package/build/components/rich-text/index.js +0 -2
  47. package/build/components/rich-text/index.js.map +1 -1
  48. package/build/components/url-input/index.js +2 -2
  49. package/build/components/url-input/index.js.map +1 -1
  50. package/build/hooks/dimensions.js +6 -0
  51. package/build/hooks/dimensions.js.map +1 -1
  52. package/build/hooks/font-family.js +2 -76
  53. package/build/hooks/font-family.js.map +1 -1
  54. package/build/hooks/font-size.js +3 -51
  55. package/build/hooks/font-size.js.map +1 -1
  56. package/build/hooks/gap.js +2 -1
  57. package/build/hooks/gap.js.map +1 -1
  58. package/build/hooks/index.js +2 -0
  59. package/build/hooks/index.js.map +1 -1
  60. package/build/hooks/line-height.js +0 -42
  61. package/build/hooks/line-height.js.map +1 -1
  62. package/build/hooks/typography.js +112 -127
  63. package/build/hooks/typography.js.map +1 -1
  64. package/build/private-apis.js +3 -0
  65. package/build/private-apis.js.map +1 -1
  66. package/build/store/selectors.js +18 -1
  67. package/build/store/selectors.js.map +1 -1
  68. package/build-module/components/block-popover/inbetween.js +10 -33
  69. package/build-module/components/block-popover/inbetween.js.map +1 -1
  70. package/build-module/components/block-types-list/index.native.js +2 -0
  71. package/build-module/components/block-types-list/index.native.js.map +1 -1
  72. package/build-module/components/colors-gradients/control.js +6 -3
  73. package/build-module/components/colors-gradients/control.js.map +1 -1
  74. package/build-module/components/font-appearance-control/index.js +2 -1
  75. package/build-module/components/font-appearance-control/index.js.map +1 -1
  76. package/build-module/components/global-styles/hooks.js +100 -46
  77. package/build-module/components/global-styles/hooks.js.map +1 -1
  78. package/build-module/components/global-styles/index.js +2 -1
  79. package/build-module/components/global-styles/index.js.map +1 -1
  80. package/build-module/components/global-styles/typography-panel.js +400 -0
  81. package/build-module/components/global-styles/typography-panel.js.map +1 -0
  82. package/build-module/components/global-styles/use-global-styles-output.js +6 -2
  83. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  84. package/build-module/components/iframe/index.js +17 -11
  85. package/build-module/components/iframe/index.js.map +1 -1
  86. package/build-module/components/image-editor/aspect-ratio-dropdown.js +2 -1
  87. package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  88. package/build-module/components/image-size-control/index.js +7 -12
  89. package/build-module/components/image-size-control/index.js.map +1 -1
  90. package/build-module/components/inserter/block-patterns-tab.js +9 -15
  91. package/build-module/components/inserter/block-patterns-tab.js.map +1 -1
  92. package/build-module/components/inserter/block-types-tab.native.js +3 -1
  93. package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
  94. package/build-module/components/inserter/reusable-blocks-tab.native.js +3 -1
  95. package/build-module/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  96. package/build-module/components/inserter/search-results.native.js +3 -1
  97. package/build-module/components/inserter/search-results.native.js.map +1 -1
  98. package/build-module/components/link-control/index.js +16 -16
  99. package/build-module/components/link-control/index.js.map +1 -1
  100. package/build-module/components/link-control/settings-drawer.js +68 -30
  101. package/build-module/components/link-control/settings-drawer.js.map +1 -1
  102. package/build-module/components/link-control/settings.js +43 -0
  103. package/build-module/components/link-control/settings.js.map +1 -0
  104. package/build-module/components/list-view/index.js +6 -1
  105. package/build-module/components/list-view/index.js.map +1 -1
  106. package/build-module/components/off-canvas-editor/block-contents.js +3 -2
  107. package/build-module/components/off-canvas-editor/block-contents.js.map +1 -1
  108. package/build-module/components/off-canvas-editor/leaf-more-menu.js +99 -0
  109. package/build-module/components/off-canvas-editor/leaf-more-menu.js.map +1 -0
  110. package/build-module/components/off-canvas-editor/link-ui.js +1 -0
  111. package/build-module/components/off-canvas-editor/link-ui.js.map +1 -1
  112. package/build-module/components/rich-text/index.js +0 -2
  113. package/build-module/components/rich-text/index.js.map +1 -1
  114. package/build-module/components/url-input/index.js +2 -2
  115. package/build-module/components/url-input/index.js.map +1 -1
  116. package/build-module/hooks/dimensions.js +6 -0
  117. package/build-module/hooks/dimensions.js.map +1 -1
  118. package/build-module/hooks/font-family.js +3 -69
  119. package/build-module/hooks/font-family.js.map +1 -1
  120. package/build-module/hooks/font-size.js +6 -47
  121. package/build-module/hooks/font-size.js.map +1 -1
  122. package/build-module/hooks/gap.js +3 -2
  123. package/build-module/hooks/gap.js.map +1 -1
  124. package/build-module/hooks/index.js +1 -0
  125. package/build-module/hooks/index.js.map +1 -1
  126. package/build-module/hooks/line-height.js +0 -38
  127. package/build-module/hooks/line-height.js.map +1 -1
  128. package/build-module/hooks/typography.js +110 -123
  129. package/build-module/hooks/typography.js.map +1 -1
  130. package/build-module/private-apis.js +2 -0
  131. package/build-module/private-apis.js.map +1 -1
  132. package/build-module/store/selectors.js +18 -1
  133. package/build-module/store/selectors.js.map +1 -1
  134. package/build-style/style-rtl.css +35 -22
  135. package/build-style/style.css +35 -22
  136. package/package.json +31 -31
  137. package/src/components/block-popover/inbetween.js +21 -53
  138. package/src/components/block-types-list/index.native.js +2 -0
  139. package/src/components/colors-gradients/control.js +3 -0
  140. package/src/components/font-appearance-control/index.js +1 -1
  141. package/src/components/global-styles/hooks.js +186 -66
  142. package/src/components/global-styles/index.js +5 -0
  143. package/src/components/global-styles/typography-panel.js +403 -0
  144. package/src/components/global-styles/use-global-styles-output.js +6 -2
  145. package/src/components/iframe/index.js +20 -18
  146. package/src/components/image-editor/aspect-ratio-dropdown.js +1 -0
  147. package/src/components/image-size-control/index.js +10 -12
  148. package/src/components/image-size-control/style.scss +3 -21
  149. package/src/components/inserter/block-patterns-tab.js +9 -23
  150. package/src/components/inserter/block-types-tab.native.js +2 -0
  151. package/src/components/inserter/reusable-blocks-tab.native.js +2 -0
  152. package/src/components/inserter/search-results.native.js +2 -0
  153. package/src/components/link-control/index.js +22 -22
  154. package/src/components/link-control/settings-drawer.js +85 -30
  155. package/src/components/link-control/settings.js +41 -0
  156. package/src/components/link-control/style.scss +39 -7
  157. package/src/components/link-control/test/index.js +213 -4
  158. package/src/components/list-view/index.js +5 -0
  159. package/src/components/off-canvas-editor/block-contents.js +2 -1
  160. package/src/components/off-canvas-editor/leaf-more-menu.js +115 -0
  161. package/src/components/off-canvas-editor/link-ui.js +1 -0
  162. package/src/components/rich-text/index.js +0 -2
  163. package/src/components/url-input/index.js +3 -2
  164. package/src/hooks/dimensions.js +12 -0
  165. package/src/hooks/font-family.js +0 -58
  166. package/src/hooks/font-size.js +1 -36
  167. package/src/hooks/gap.js +9 -2
  168. package/src/hooks/index.js +1 -0
  169. package/src/hooks/line-height.js +0 -33
  170. package/src/hooks/typography.js +133 -212
  171. package/src/private-apis.js +2 -0
  172. package/src/store/selectors.js +16 -1
  173. package/build/hooks/font-appearance.js +0 -188
  174. package/build/hooks/font-appearance.js.map +0 -1
  175. package/build/hooks/letter-spacing.js +0 -129
  176. package/build/hooks/letter-spacing.js.map +0 -1
  177. package/build/hooks/text-decoration.js +0 -130
  178. package/build/hooks/text-decoration.js.map +0 -1
  179. package/build/hooks/text-transform.js +0 -130
  180. package/build/hooks/text-transform.js.map +0 -1
  181. package/build-module/hooks/font-appearance.js +0 -161
  182. package/build-module/hooks/font-appearance.js.map +0 -1
  183. package/build-module/hooks/letter-spacing.js +0 -107
  184. package/build-module/hooks/letter-spacing.js.map +0 -1
  185. package/build-module/hooks/text-decoration.js +0 -108
  186. package/build-module/hooks/text-decoration.js.map +0 -1
  187. package/build-module/hooks/text-transform.js +0 -108
  188. package/build-module/hooks/text-transform.js.map +0 -1
  189. package/src/hooks/font-appearance.js +0 -146
  190. package/src/hooks/letter-spacing.js +0 -101
  191. package/src/hooks/text-decoration.js +0 -102
  192. package/src/hooks/text-transform.js +0 -101
@@ -0,0 +1,115 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { createBlock } from '@wordpress/blocks';
5
+ import { addSubmenu, moreVertical } from '@wordpress/icons';
6
+ import { DropdownMenu, MenuItem, MenuGroup } from '@wordpress/components';
7
+ import { useDispatch } from '@wordpress/data';
8
+ import { __, sprintf } from '@wordpress/i18n';
9
+
10
+ /**
11
+ * Internal dependencies
12
+ */
13
+ import { store as blockEditorStore } from '../../store';
14
+ import BlockTitle from '../block-title';
15
+
16
+ const POPOVER_PROPS = {
17
+ className: 'block-editor-block-settings-menu__popover',
18
+ position: 'bottom right',
19
+ variant: 'toolbar',
20
+ };
21
+
22
+ const BLOCKS_THAT_CAN_BE_CONVERTED_TO_SUBMENU = [
23
+ 'core/navigation-link',
24
+ 'core/navigation-submenu',
25
+ ];
26
+
27
+ function AddSubmenuItem( { block, onClose } ) {
28
+ const { insertBlock, replaceBlock, replaceInnerBlocks } =
29
+ useDispatch( blockEditorStore );
30
+
31
+ const clientId = block.clientId;
32
+ const isDisabled = ! BLOCKS_THAT_CAN_BE_CONVERTED_TO_SUBMENU.includes(
33
+ block.name
34
+ );
35
+ return (
36
+ <MenuItem
37
+ icon={ addSubmenu }
38
+ disabled={ isDisabled }
39
+ onClick={ () => {
40
+ const updateSelectionOnInsert = false;
41
+ const newLink = createBlock( 'core/navigation-link' );
42
+
43
+ if ( block.name === 'core/navigation-submenu' ) {
44
+ insertBlock(
45
+ newLink,
46
+ block.innerBlocks.length,
47
+ clientId,
48
+ updateSelectionOnInsert
49
+ );
50
+ } else {
51
+ // Convert to a submenu if the block currently isn't one.
52
+ const newSubmenu = createBlock(
53
+ 'core/navigation-submenu',
54
+ block.attributes,
55
+ block.innerBlocks
56
+ );
57
+
58
+ // The following must happen as two independent actions.
59
+ // Why? Because the offcanvas editor relies on the getLastInsertedBlocksClientIds
60
+ // selector to determine which block is "active". As the UX needs the newLink to be
61
+ // the "active" block it must be the last block to be inserted.
62
+ // Therefore the Submenu is first created and **then** the newLink is inserted
63
+ // thus ensuring it is the last inserted block.
64
+ replaceBlock( clientId, newSubmenu );
65
+
66
+ replaceInnerBlocks(
67
+ newSubmenu.clientId,
68
+ [ newLink ],
69
+ updateSelectionOnInsert
70
+ );
71
+ }
72
+ onClose();
73
+ } }
74
+ >
75
+ { __( 'Add submenu link' ) }
76
+ </MenuItem>
77
+ );
78
+ }
79
+
80
+ export default function LeafMoreMenu( props ) {
81
+ const { clientId, block } = props;
82
+
83
+ const { removeBlocks } = useDispatch( blockEditorStore );
84
+
85
+ const label = sprintf(
86
+ /* translators: %s: block name */
87
+ __( 'Remove %s' ),
88
+ BlockTitle( { clientId, maximumLength: 25 } )
89
+ );
90
+
91
+ return (
92
+ <DropdownMenu
93
+ icon={ moreVertical }
94
+ label={ __( 'Options' ) }
95
+ className="block-editor-block-settings-menu"
96
+ popoverProps={ POPOVER_PROPS }
97
+ noIcons
98
+ { ...props }
99
+ >
100
+ { ( { onClose } ) => (
101
+ <MenuGroup>
102
+ <AddSubmenuItem block={ block } onClose={ onClose } />
103
+ <MenuItem
104
+ onClick={ () => {
105
+ removeBlocks( [ clientId ], false );
106
+ onClose();
107
+ } }
108
+ >
109
+ { label }
110
+ </MenuItem>
111
+ </MenuGroup>
112
+ ) }
113
+ </DropdownMenu>
114
+ );
115
+ }
@@ -151,6 +151,7 @@ export function LinkUI( props ) {
151
151
  suggestionsQuery={ getSuggestionsQuery( type, kind ) }
152
152
  onChange={ props.onChange }
153
153
  onRemove={ props.onRemove }
154
+ onCancel={ props.onCancel }
154
155
  renderControlBottom={
155
156
  ! url
156
157
  ? () => (
@@ -110,7 +110,6 @@ function RichTextWrapper(
110
110
  __unstableEmbedURLOnPaste,
111
111
  __unstableDisableFormats: disableFormats,
112
112
  disableLineBreaks,
113
- unstableOnFocus,
114
113
  __unstableAllowPrefixTransformations,
115
114
  ...props
116
115
  },
@@ -449,7 +448,6 @@ function RichTextWrapper(
449
448
  props.className,
450
449
  'rich-text'
451
450
  ) }
452
- onFocus={ unstableOnFocus }
453
451
  onKeyDown={ onKeyDown }
454
452
  />
455
453
  </>
@@ -468,7 +468,7 @@ class URLInput extends Component {
468
468
  'aria-label': label ? undefined : __( 'URL' ), // Ensure input always has an accessible label
469
469
  'aria-expanded': showSuggestions,
470
470
  'aria-autocomplete': 'list',
471
- 'aria-controls': suggestionsListboxId,
471
+ 'aria-owns': suggestionsListboxId,
472
472
  'aria-activedescendant':
473
473
  selectedSuggestion !== null
474
474
  ? `${ suggestionOptionIdPrefix }-${ selectedSuggestion }`
@@ -531,7 +531,8 @@ class URLInput extends Component {
531
531
  tabIndex: '-1',
532
532
  id: `${ suggestionOptionIdPrefix }-${ index }`,
533
533
  ref: this.bindSuggestionNode( index ),
534
- 'aria-selected': index === selectedSuggestion,
534
+ 'aria-selected':
535
+ index === selectedSuggestion ? true : undefined,
535
536
  };
536
537
  };
537
538
 
@@ -347,5 +347,17 @@ export function useIsDimensionsSupportValid( blockName, feature ) {
347
347
  return false;
348
348
  }
349
349
 
350
+ if (
351
+ sides?.length &&
352
+ feature === 'blockGap' &&
353
+ ! AXIAL_SIDES.every( ( side ) => sides.includes( side ) )
354
+ ) {
355
+ // eslint-disable-next-line no-console
356
+ console.warn(
357
+ `The ${ feature } support for the "${ blockName }" block can not be configured to support arbitrary sides.`
358
+ );
359
+ return false;
360
+ }
361
+
350
362
  return true;
351
363
  }
@@ -13,8 +13,6 @@ import TokenList from '@wordpress/token-list';
13
13
  /**
14
14
  * Internal dependencies
15
15
  */
16
- import useSetting from '../components/use-setting';
17
- import FontFamilyControl from '../components/font-family';
18
16
  import { shouldSkipSerialization } from './utils';
19
17
  import { TYPOGRAPHY_SUPPORT_KEY } from './typography';
20
18
 
@@ -105,62 +103,6 @@ function addEditProps( settings ) {
105
103
  return settings;
106
104
  }
107
105
 
108
- export function FontFamilyEdit( {
109
- setAttributes,
110
- attributes: { fontFamily },
111
- } ) {
112
- const fontFamilies = useSetting( 'typography.fontFamilies' );
113
-
114
- const value = fontFamilies?.find(
115
- ( { slug } ) => fontFamily === slug
116
- )?.fontFamily;
117
-
118
- function onChange( newValue ) {
119
- const predefinedFontFamily = fontFamilies?.find(
120
- ( { fontFamily: f } ) => f === newValue
121
- );
122
- setAttributes( {
123
- fontFamily: predefinedFontFamily?.slug,
124
- } );
125
- }
126
-
127
- return (
128
- <FontFamilyControl
129
- className="block-editor-hooks-font-family-control"
130
- fontFamilies={ fontFamilies }
131
- value={ value }
132
- onChange={ onChange }
133
- size="__unstable-large"
134
- __nextHasNoMarginBottom
135
- />
136
- );
137
- }
138
-
139
- /**
140
- * Custom hook that checks if font-family functionality is disabled.
141
- *
142
- * @param {string} name The name of the block.
143
- * @return {boolean} Whether setting is disabled.
144
- */
145
- export function useIsFontFamilyDisabled( { name } ) {
146
- const fontFamilies = useSetting( 'typography.fontFamilies' );
147
- return (
148
- ! fontFamilies ||
149
- fontFamilies.length === 0 ||
150
- ! hasBlockSupport( name, FONT_FAMILY_SUPPORT_KEY )
151
- );
152
- }
153
-
154
- /**
155
- * Checks if there is a current value set for the font family block support.
156
- *
157
- * @param {Object} props Block props.
158
- * @return {boolean} Whether or not the block has a font family value set.
159
- */
160
- export function hasFontFamilyValue( props ) {
161
- return !! props.attributes.fontFamily;
162
- }
163
-
164
106
  /**
165
107
  * Resets the font family block support attribute. This can be used when
166
108
  * disabling the font family support controls for a block via a progressive
@@ -157,41 +157,6 @@ export function FontSizeEdit( props ) {
157
157
  );
158
158
  }
159
159
 
160
- /**
161
- * Checks if there is a current value set for the font size block support.
162
- *
163
- * @param {Object} props Block props.
164
- * @return {boolean} Whether or not the block has a font size value set.
165
- */
166
- export function hasFontSizeValue( props ) {
167
- const { fontSize, style } = props.attributes;
168
- return !! fontSize || !! style?.typography?.fontSize;
169
- }
170
-
171
- /**
172
- * Resets the font size block support attribute. This can be used when
173
- * disabling the font size support controls for a block via a progressive
174
- * discovery panel.
175
- *
176
- * @param {Object} props Block props.
177
- * @param {Object} props.attributes Block's attributes.
178
- * @param {Object} props.setAttributes Function to set block's attributes.
179
- */
180
- export function resetFontSize( { attributes = {}, setAttributes } ) {
181
- const { style } = attributes;
182
-
183
- setAttributes( {
184
- fontSize: undefined,
185
- style: cleanEmptyObject( {
186
- ...style,
187
- typography: {
188
- ...style?.typography,
189
- fontSize: undefined,
190
- },
191
- } ),
192
- } );
193
- }
194
-
195
160
  /**
196
161
  * Custom hook that checks if font-size settings have been disabled.
197
162
  *
@@ -268,7 +233,7 @@ const MIGRATION_PATHS = {
268
233
  fontSize: [ [ 'fontSize' ], [ 'style', 'typography', 'fontSize' ] ],
269
234
  };
270
235
 
271
- export function addTransforms( result, source, index, results ) {
236
+ function addTransforms( result, source, index, results ) {
272
237
  const destinationBlockType = result.name;
273
238
  const activeSupports = {
274
239
  fontSize: hasBlockSupport(
package/src/hooks/gap.js CHANGED
@@ -17,7 +17,12 @@ import { __unstableUseBlockRef as useBlockRef } from '../components/block-list/u
17
17
  import { getSpacingPresetCssVar } from '../components/spacing-sizes-control/utils';
18
18
  import SpacingSizesControl from '../components/spacing-sizes-control';
19
19
  import useSetting from '../components/use-setting';
20
- import { AXIAL_SIDES, SPACING_SUPPORT_KEY, useCustomSides } from './dimensions';
20
+ import {
21
+ AXIAL_SIDES,
22
+ SPACING_SUPPORT_KEY,
23
+ useCustomSides,
24
+ useIsDimensionsSupportValid,
25
+ } from './dimensions';
21
26
  import { cleanEmptyObject } from './utils';
22
27
 
23
28
  /**
@@ -113,7 +118,9 @@ export function resetGap( { attributes = {}, setAttributes } ) {
113
118
  */
114
119
  export function useIsGapDisabled( { name: blockName } = {} ) {
115
120
  const isDisabled = ! useSetting( 'spacing.blockGap' );
116
- return ! hasGapSupport( blockName ) || isDisabled;
121
+ const isInvalid = ! useIsDimensionsSupportValid( blockName, 'blockGap' );
122
+
123
+ return ! hasGapSupport( blockName ) || isDisabled || isInvalid;
117
124
  }
118
125
 
119
126
  /**
@@ -12,6 +12,7 @@ import './style';
12
12
  import './settings';
13
13
  import './color';
14
14
  import './duotone';
15
+ import './font-family';
15
16
  import './font-size';
16
17
  import './border';
17
18
  import './position';
@@ -60,36 +60,3 @@ export function useIsLineHeightDisabled( { name: blockName } = {} ) {
60
60
  ! hasBlockSupport( blockName, LINE_HEIGHT_SUPPORT_KEY ) || isDisabled
61
61
  );
62
62
  }
63
-
64
- /**
65
- * Checks if there is a current value set for the line height block support.
66
- *
67
- * @param {Object} props Block props.
68
- * @return {boolean} Whether or not the block has a line height value set.
69
- */
70
- export function hasLineHeightValue( props ) {
71
- return !! props.attributes.style?.typography?.lineHeight;
72
- }
73
-
74
- /**
75
- * Resets the line height block support attribute. This can be used when
76
- * disabling the line height support controls for a block via a progressive
77
- * discovery panel.
78
- *
79
- * @param {Object} props Block props.
80
- * @param {Object} props.attributes Block's attributes.
81
- * @param {Object} props.setAttributes Function to set block's attributes.
82
- */
83
- export function resetLineHeight( { attributes = {}, setAttributes } ) {
84
- const { style } = attributes;
85
-
86
- setAttributes( {
87
- style: cleanEmptyObject( {
88
- ...style,
89
- typography: {
90
- ...style?.typography,
91
- lineHeight: undefined,
92
- },
93
- } ),
94
- } );
95
- }