@wordpress/block-editor 11.3.6 → 11.5.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 (357) hide show
  1. package/CHANGELOG.md +3 -1
  2. package/build/components/block-lock/modal.js +1 -0
  3. package/build/components/block-lock/modal.js.map +1 -1
  4. package/build/components/block-popover/inbetween.js +10 -33
  5. package/build/components/block-popover/inbetween.js.map +1 -1
  6. package/build/components/block-settings-menu/block-settings-dropdown.js +2 -2
  7. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  8. package/build/components/block-styles/index.js +2 -1
  9. package/build/components/block-styles/index.js.map +1 -1
  10. package/build/components/block-types-list/index.native.js +2 -0
  11. package/build/components/block-types-list/index.native.js.map +1 -1
  12. package/build/components/child-layout-control/index.js +107 -0
  13. package/build/components/child-layout-control/index.js.map +1 -0
  14. package/build/components/colors-gradients/control.js +6 -3
  15. package/build/components/colors-gradients/control.js.map +1 -1
  16. package/build/components/date-format-picker/index.js +3 -3
  17. package/build/components/date-format-picker/index.js.map +1 -1
  18. package/build/components/font-appearance-control/index.js +0 -3
  19. package/build/components/font-appearance-control/index.js.map +1 -1
  20. package/build/components/global-styles/dimensions-panel.js +594 -0
  21. package/build/components/global-styles/dimensions-panel.js.map +1 -0
  22. package/build/components/global-styles/hooks.js +142 -45
  23. package/build/components/global-styles/hooks.js.map +1 -1
  24. package/build/components/global-styles/index.js +38 -0
  25. package/build/components/global-styles/index.js.map +1 -1
  26. package/build/components/global-styles/typography-panel.js +434 -0
  27. package/build/components/global-styles/typography-panel.js.map +1 -0
  28. package/build/components/global-styles/use-global-styles-output.js +7 -3
  29. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  30. package/build/components/global-styles/utils.js +2 -0
  31. package/build/components/global-styles/utils.js.map +1 -1
  32. package/build/components/iframe/index.js +17 -11
  33. package/build/components/iframe/index.js.map +1 -1
  34. package/build/components/image-editor/aspect-ratio-dropdown.js +2 -1
  35. package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  36. package/build/components/image-size-control/index.js +6 -11
  37. package/build/components/image-size-control/index.js.map +1 -1
  38. package/build/components/index.native.js +23 -0
  39. package/build/components/index.native.js.map +1 -1
  40. package/build/components/inserter/block-patterns-tab.js +9 -15
  41. package/build/components/inserter/block-patterns-tab.js.map +1 -1
  42. package/build/components/inserter/block-types-tab.native.js +4 -1
  43. package/build/components/inserter/block-types-tab.native.js.map +1 -1
  44. package/build/components/inserter/reusable-blocks-tab.native.js +4 -1
  45. package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  46. package/build/components/inserter/search-results.native.js +4 -1
  47. package/build/components/inserter/search-results.native.js.map +1 -1
  48. package/build/components/inspector-controls/block-support-tools-panel.js +1 -1
  49. package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  50. package/build/components/inspector-controls/fill.js +38 -9
  51. package/build/components/inspector-controls/fill.js.map +1 -1
  52. package/build/components/link-control/index.js +55 -28
  53. package/build/components/link-control/index.js.map +1 -1
  54. package/build/components/link-control/settings-drawer.js +72 -30
  55. package/build/components/link-control/settings-drawer.js.map +1 -1
  56. package/build/components/link-control/settings.js +53 -0
  57. package/build/components/link-control/settings.js.map +1 -0
  58. package/build/components/list-view/block.js +4 -2
  59. package/build/components/list-view/block.js.map +1 -1
  60. package/build/components/list-view/expander.js +2 -1
  61. package/build/components/list-view/expander.js.map +1 -1
  62. package/build/components/list-view/index.js +6 -1
  63. package/build/components/list-view/index.js.map +1 -1
  64. package/build/components/off-canvas-editor/appender.js +5 -10
  65. package/build/components/off-canvas-editor/appender.js.map +1 -1
  66. package/build/components/off-canvas-editor/block-contents.js +3 -2
  67. package/build/components/off-canvas-editor/block-contents.js.map +1 -1
  68. package/build/components/off-canvas-editor/branch.js +1 -0
  69. package/build/components/off-canvas-editor/branch.js.map +1 -1
  70. package/build/components/off-canvas-editor/index.js +7 -3
  71. package/build/components/off-canvas-editor/index.js.map +1 -1
  72. package/build/components/off-canvas-editor/leaf-more-menu.js +24 -4
  73. package/build/components/off-canvas-editor/leaf-more-menu.js.map +1 -1
  74. package/build/components/off-canvas-editor/link-ui.js +2 -0
  75. package/build/components/off-canvas-editor/link-ui.js.map +1 -1
  76. package/build/components/responsive-block-control/index.js +1 -0
  77. package/build/components/responsive-block-control/index.js.map +1 -1
  78. package/build/components/rich-text/index.js +9 -45
  79. package/build/components/rich-text/index.js.map +1 -1
  80. package/build/components/rich-text/use-delete.js +73 -0
  81. package/build/components/rich-text/use-delete.js.map +1 -0
  82. package/build/components/rich-text/use-input-rules.js +14 -6
  83. package/build/components/rich-text/use-input-rules.js.map +1 -1
  84. package/build/components/url-input/index.js +2 -2
  85. package/build/components/url-input/index.js.map +1 -1
  86. package/build/components/writing-flow/use-selection-observer.js +4 -1
  87. package/build/components/writing-flow/use-selection-observer.js.map +1 -1
  88. package/build/hooks/align.js +3 -1
  89. package/build/hooks/align.js.map +1 -1
  90. package/build/hooks/dimensions.js +78 -190
  91. package/build/hooks/dimensions.js.map +1 -1
  92. package/build/hooks/duotone.js +94 -25
  93. package/build/hooks/duotone.js.map +1 -1
  94. package/build/hooks/font-family.js +2 -76
  95. package/build/hooks/font-family.js.map +1 -1
  96. package/build/hooks/font-size.js +3 -51
  97. package/build/hooks/font-size.js.map +1 -1
  98. package/build/hooks/gap.js +0 -201
  99. package/build/hooks/gap.js.map +1 -1
  100. package/build/hooks/index.js +2 -0
  101. package/build/hooks/index.js.map +1 -1
  102. package/build/hooks/layout.js +14 -5
  103. package/build/hooks/layout.js.map +1 -1
  104. package/build/hooks/line-height.js +0 -42
  105. package/build/hooks/line-height.js.map +1 -1
  106. package/build/hooks/margin.js +7 -163
  107. package/build/hooks/margin.js.map +1 -1
  108. package/build/hooks/padding.js +7 -163
  109. package/build/hooks/padding.js.map +1 -1
  110. package/build/hooks/typography.js +98 -128
  111. package/build/hooks/typography.js.map +1 -1
  112. package/build/hooks/utils.js +75 -0
  113. package/build/hooks/utils.js.map +1 -1
  114. package/build/layouts/flex.js +1 -0
  115. package/build/layouts/flex.js.map +1 -1
  116. package/build/store/actions.js +24 -12
  117. package/build/store/actions.js.map +1 -1
  118. package/build/store/reducer.js +53 -47
  119. package/build/store/reducer.js.map +1 -1
  120. package/build/store/selectors.js +22 -1
  121. package/build/store/selectors.js.map +1 -1
  122. package/build/utils/parse-css-unit-to-px.js +36 -3
  123. package/build/utils/parse-css-unit-to-px.js.map +1 -1
  124. package/build-module/components/block-lock/modal.js +1 -0
  125. package/build-module/components/block-lock/modal.js.map +1 -1
  126. package/build-module/components/block-popover/inbetween.js +10 -33
  127. package/build-module/components/block-popover/inbetween.js.map +1 -1
  128. package/build-module/components/block-settings-menu/block-settings-dropdown.js +2 -2
  129. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  130. package/build-module/components/block-styles/index.js +2 -1
  131. package/build-module/components/block-styles/index.js.map +1 -1
  132. package/build-module/components/block-types-list/index.native.js +2 -0
  133. package/build-module/components/block-types-list/index.native.js.map +1 -1
  134. package/build-module/components/child-layout-control/index.js +98 -0
  135. package/build-module/components/child-layout-control/index.js.map +1 -0
  136. package/build-module/components/colors-gradients/control.js +6 -3
  137. package/build-module/components/colors-gradients/control.js.map +1 -1
  138. package/build-module/components/date-format-picker/index.js +4 -4
  139. package/build-module/components/date-format-picker/index.js.map +1 -1
  140. package/build-module/components/font-appearance-control/index.js +2 -1
  141. package/build-module/components/font-appearance-control/index.js.map +1 -1
  142. package/build-module/components/global-styles/dimensions-panel.js +574 -0
  143. package/build-module/components/global-styles/dimensions-panel.js.map +1 -0
  144. package/build-module/components/global-styles/hooks.js +138 -46
  145. package/build-module/components/global-styles/hooks.js.map +1 -1
  146. package/build-module/components/global-styles/index.js +3 -1
  147. package/build-module/components/global-styles/index.js.map +1 -1
  148. package/build-module/components/global-styles/typography-panel.js +415 -0
  149. package/build-module/components/global-styles/typography-panel.js.map +1 -0
  150. package/build-module/components/global-styles/use-global-styles-output.js +7 -3
  151. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  152. package/build-module/components/global-styles/utils.js +2 -0
  153. package/build-module/components/global-styles/utils.js.map +1 -1
  154. package/build-module/components/iframe/index.js +17 -11
  155. package/build-module/components/iframe/index.js.map +1 -1
  156. package/build-module/components/image-editor/aspect-ratio-dropdown.js +2 -1
  157. package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  158. package/build-module/components/image-size-control/index.js +7 -12
  159. package/build-module/components/image-size-control/index.js.map +1 -1
  160. package/build-module/components/index.native.js +2 -1
  161. package/build-module/components/index.native.js.map +1 -1
  162. package/build-module/components/inserter/block-patterns-tab.js +9 -15
  163. package/build-module/components/inserter/block-patterns-tab.js.map +1 -1
  164. package/build-module/components/inserter/block-types-tab.native.js +3 -1
  165. package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
  166. package/build-module/components/inserter/reusable-blocks-tab.native.js +3 -1
  167. package/build-module/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  168. package/build-module/components/inserter/search-results.native.js +3 -1
  169. package/build-module/components/inserter/search-results.native.js.map +1 -1
  170. package/build-module/components/inspector-controls/block-support-tools-panel.js +1 -1
  171. package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  172. package/build-module/components/inspector-controls/fill.js +39 -9
  173. package/build-module/components/inspector-controls/fill.js.map +1 -1
  174. package/build-module/components/link-control/index.js +56 -28
  175. package/build-module/components/link-control/index.js.map +1 -1
  176. package/build-module/components/link-control/settings-drawer.js +68 -30
  177. package/build-module/components/link-control/settings-drawer.js.map +1 -1
  178. package/build-module/components/link-control/settings.js +44 -0
  179. package/build-module/components/link-control/settings.js.map +1 -0
  180. package/build-module/components/list-view/block.js +4 -2
  181. package/build-module/components/list-view/block.js.map +1 -1
  182. package/build-module/components/list-view/expander.js +2 -1
  183. package/build-module/components/list-view/expander.js.map +1 -1
  184. package/build-module/components/list-view/index.js +6 -1
  185. package/build-module/components/list-view/index.js.map +1 -1
  186. package/build-module/components/off-canvas-editor/appender.js +5 -10
  187. package/build-module/components/off-canvas-editor/appender.js.map +1 -1
  188. package/build-module/components/off-canvas-editor/block-contents.js +3 -2
  189. package/build-module/components/off-canvas-editor/block-contents.js.map +1 -1
  190. package/build-module/components/off-canvas-editor/branch.js +1 -0
  191. package/build-module/components/off-canvas-editor/branch.js.map +1 -1
  192. package/build-module/components/off-canvas-editor/index.js +7 -3
  193. package/build-module/components/off-canvas-editor/index.js.map +1 -1
  194. package/build-module/components/off-canvas-editor/leaf-more-menu.js +27 -7
  195. package/build-module/components/off-canvas-editor/leaf-more-menu.js.map +1 -1
  196. package/build-module/components/off-canvas-editor/link-ui.js +2 -0
  197. package/build-module/components/off-canvas-editor/link-ui.js.map +1 -1
  198. package/build-module/components/responsive-block-control/index.js +1 -0
  199. package/build-module/components/responsive-block-control/index.js.map +1 -1
  200. package/build-module/components/rich-text/index.js +9 -45
  201. package/build-module/components/rich-text/index.js.map +1 -1
  202. package/build-module/components/rich-text/use-delete.js +62 -0
  203. package/build-module/components/rich-text/use-delete.js.map +1 -0
  204. package/build-module/components/rich-text/use-input-rules.js +14 -6
  205. package/build-module/components/rich-text/use-input-rules.js.map +1 -1
  206. package/build-module/components/url-input/index.js +2 -2
  207. package/build-module/components/url-input/index.js.map +1 -1
  208. package/build-module/components/writing-flow/use-selection-observer.js +4 -1
  209. package/build-module/components/writing-flow/use-selection-observer.js.map +1 -1
  210. package/build-module/hooks/align.js +3 -1
  211. package/build-module/hooks/align.js.map +1 -1
  212. package/build-module/hooks/dimensions.js +81 -187
  213. package/build-module/hooks/dimensions.js.map +1 -1
  214. package/build-module/hooks/duotone.js +86 -24
  215. package/build-module/hooks/duotone.js.map +1 -1
  216. package/build-module/hooks/font-family.js +3 -69
  217. package/build-module/hooks/font-family.js.map +1 -1
  218. package/build-module/hooks/font-size.js +6 -47
  219. package/build-module/hooks/font-size.js.map +1 -1
  220. package/build-module/hooks/gap.js +0 -182
  221. package/build-module/hooks/gap.js.map +1 -1
  222. package/build-module/hooks/index.js +1 -0
  223. package/build-module/hooks/index.js.map +1 -1
  224. package/build-module/hooks/layout.js +14 -5
  225. package/build-module/hooks/layout.js.map +1 -1
  226. package/build-module/hooks/line-height.js +0 -38
  227. package/build-module/hooks/line-height.js.map +1 -1
  228. package/build-module/hooks/margin.js +4 -143
  229. package/build-module/hooks/margin.js.map +1 -1
  230. package/build-module/hooks/padding.js +4 -143
  231. package/build-module/hooks/padding.js.map +1 -1
  232. package/build-module/hooks/typography.js +97 -123
  233. package/build-module/hooks/typography.js.map +1 -1
  234. package/build-module/hooks/utils.js +70 -0
  235. package/build-module/hooks/utils.js.map +1 -1
  236. package/build-module/layouts/flex.js +1 -0
  237. package/build-module/layouts/flex.js.map +1 -1
  238. package/build-module/store/actions.js +24 -12
  239. package/build-module/store/actions.js.map +1 -1
  240. package/build-module/store/reducer.js +53 -45
  241. package/build-module/store/reducer.js.map +1 -1
  242. package/build-module/store/selectors.js +22 -1
  243. package/build-module/store/selectors.js.map +1 -1
  244. package/build-module/utils/parse-css-unit-to-px.js +36 -3
  245. package/build-module/utils/parse-css-unit-to-px.js.map +1 -1
  246. package/build-style/style-rtl.css +54 -64
  247. package/build-style/style.css +54 -64
  248. package/package.json +31 -31
  249. package/src/components/block-draggable/test/__snapshots__/index.native.js.snap +24 -24
  250. package/src/components/block-lock/modal.js +1 -0
  251. package/src/components/block-lock/style.scss +0 -9
  252. package/src/components/block-mobile-toolbar/test/__snapshots__/block-actions-menu.native.js.snap +20 -20
  253. package/src/components/block-mover/test/__snapshots__/index.native.js.snap +15 -15
  254. package/src/components/block-popover/inbetween.js +21 -53
  255. package/src/components/block-settings-menu/block-settings-dropdown.js +4 -1
  256. package/src/components/block-styles/index.js +5 -1
  257. package/src/components/block-types-list/index.native.js +2 -0
  258. package/src/components/child-layout-control/index.js +106 -0
  259. package/src/components/color-palette/test/__snapshots__/control.js.snap +1 -1
  260. package/src/components/colors-gradients/control.js +3 -0
  261. package/src/components/date-format-picker/index.js +6 -8
  262. package/src/components/date-format-picker/style.scss +0 -5
  263. package/src/components/font-appearance-control/index.js +1 -1
  264. package/src/components/global-styles/dimensions-panel.js +627 -0
  265. package/src/components/global-styles/hooks.js +229 -66
  266. package/src/components/global-styles/index.js +9 -0
  267. package/src/components/global-styles/typography-panel.js +428 -0
  268. package/src/components/global-styles/use-global-styles-output.js +10 -5
  269. package/src/components/global-styles/utils.js +2 -0
  270. package/src/components/iframe/index.js +20 -18
  271. package/src/components/image-editor/aspect-ratio-dropdown.js +1 -0
  272. package/src/components/image-size-control/index.js +10 -12
  273. package/src/components/image-size-control/style.scss +3 -21
  274. package/src/components/index.native.js +5 -0
  275. package/src/components/inner-blocks/test/__snapshots__/index.js.snap +1 -1
  276. package/src/components/inserter/block-patterns-tab.js +9 -23
  277. package/src/components/inserter/block-types-tab.native.js +2 -0
  278. package/src/components/inserter/reusable-blocks-tab.native.js +2 -0
  279. package/src/components/inserter/search-results.native.js +2 -0
  280. package/src/components/inserter/test/__snapshots__/index.native.js.snap +15 -15
  281. package/src/components/inspector-controls/block-support-tools-panel.js +0 -1
  282. package/src/components/inspector-controls/fill.js +32 -8
  283. package/src/components/link-control/index.js +69 -34
  284. package/src/components/link-control/settings-drawer.js +85 -29
  285. package/src/components/link-control/settings.js +42 -0
  286. package/src/components/link-control/style.scss +63 -37
  287. package/src/components/link-control/test/index.js +347 -9
  288. package/src/components/list-view/block.js +7 -1
  289. package/src/components/list-view/expander.js +1 -0
  290. package/src/components/list-view/index.js +5 -0
  291. package/src/components/media-replace-flow/style.scss +7 -9
  292. package/src/components/media-replace-flow/test/index.js +1 -1
  293. package/src/components/off-canvas-editor/appender.js +13 -16
  294. package/src/components/off-canvas-editor/block-contents.js +2 -1
  295. package/src/components/off-canvas-editor/branch.js +1 -0
  296. package/src/components/off-canvas-editor/index.js +8 -2
  297. package/src/components/off-canvas-editor/leaf-more-menu.js +52 -15
  298. package/src/components/off-canvas-editor/link-ui.js +2 -0
  299. package/src/components/responsive-block-control/index.js +1 -0
  300. package/src/components/rich-text/index.js +8 -46
  301. package/src/components/rich-text/use-delete.js +59 -0
  302. package/src/components/rich-text/use-input-rules.js +13 -5
  303. package/src/components/url-input/index.js +3 -2
  304. package/src/components/url-popover/stories/index.js +1 -0
  305. package/src/components/writing-flow/use-selection-observer.js +5 -1
  306. package/src/hooks/align.js +1 -1
  307. package/src/hooks/dimensions.js +97 -269
  308. package/src/hooks/duotone.js +100 -30
  309. package/src/hooks/font-family.js +0 -58
  310. package/src/hooks/font-size.js +1 -36
  311. package/src/hooks/gap.js +0 -201
  312. package/src/hooks/index.js +1 -0
  313. package/src/hooks/layout.js +19 -6
  314. package/src/hooks/line-height.js +0 -33
  315. package/src/hooks/margin.js +1 -164
  316. package/src/hooks/padding.js +1 -163
  317. package/src/hooks/test/__snapshots__/align.native.js.snap +24 -24
  318. package/src/hooks/test/duotone.js +102 -0
  319. package/src/hooks/typography.js +112 -213
  320. package/src/hooks/utils.js +90 -0
  321. package/src/layouts/flex.js +1 -0
  322. package/src/store/actions.js +12 -4
  323. package/src/store/reducer.js +68 -43
  324. package/src/store/selectors.js +20 -1
  325. package/src/store/test/actions.js +4 -2
  326. package/src/utils/parse-css-unit-to-px.js +35 -5
  327. package/src/utils/test/parse-css-unit-to-px.js +12 -0
  328. package/build/hooks/child-layout.js +0 -213
  329. package/build/hooks/child-layout.js.map +0 -1
  330. package/build/hooks/font-appearance.js +0 -188
  331. package/build/hooks/font-appearance.js.map +0 -1
  332. package/build/hooks/letter-spacing.js +0 -129
  333. package/build/hooks/letter-spacing.js.map +0 -1
  334. package/build/hooks/min-height.js +0 -139
  335. package/build/hooks/min-height.js.map +0 -1
  336. package/build/hooks/text-decoration.js +0 -130
  337. package/build/hooks/text-decoration.js.map +0 -1
  338. package/build/hooks/text-transform.js +0 -130
  339. package/build/hooks/text-transform.js.map +0 -1
  340. package/build-module/hooks/child-layout.js +0 -193
  341. package/build-module/hooks/child-layout.js.map +0 -1
  342. package/build-module/hooks/font-appearance.js +0 -161
  343. package/build-module/hooks/font-appearance.js.map +0 -1
  344. package/build-module/hooks/letter-spacing.js +0 -107
  345. package/build-module/hooks/letter-spacing.js.map +0 -1
  346. package/build-module/hooks/min-height.js +0 -116
  347. package/build-module/hooks/min-height.js.map +0 -1
  348. package/build-module/hooks/text-decoration.js +0 -108
  349. package/build-module/hooks/text-decoration.js.map +0 -1
  350. package/build-module/hooks/text-transform.js +0 -108
  351. package/build-module/hooks/text-transform.js.map +0 -1
  352. package/src/hooks/child-layout.js +0 -195
  353. package/src/hooks/font-appearance.js +0 -146
  354. package/src/hooks/letter-spacing.js +0 -101
  355. package/src/hooks/min-height.js +0 -104
  356. package/src/hooks/text-decoration.js +0 -102
  357. package/src/hooks/text-transform.js +0 -101
@@ -0,0 +1,428 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import {
5
+ FontSizePicker,
6
+ __experimentalToolsPanel as ToolsPanel,
7
+ __experimentalToolsPanelItem as ToolsPanelItem,
8
+ } from '@wordpress/components';
9
+ import { __ } from '@wordpress/i18n';
10
+ import { useCallback } from '@wordpress/element';
11
+
12
+ /**
13
+ * Internal dependencies
14
+ */
15
+ import FontFamilyControl from '../font-family';
16
+ import FontAppearanceControl from '../font-appearance-control';
17
+ import LineHeightControl from '../line-height-control';
18
+ import LetterSpacingControl from '../letter-spacing-control';
19
+ import TextTransformControl from '../text-transform-control';
20
+ import TextDecorationControl from '../text-decoration-control';
21
+ import { getValueFromVariable } from './utils';
22
+
23
+ export function useHasTypographyPanel( settings ) {
24
+ const hasFontFamily = useHasFontFamilyControl( settings );
25
+ const hasLineHeight = useHasLineHeightControl( settings );
26
+ const hasFontAppearance = useHasAppearanceControl( settings );
27
+ const hasLetterSpacing = useHasLetterSpacingControl( settings );
28
+ const hasTextTransform = useHasTextTransformControl( settings );
29
+ const hasTextDecoration = useHasTextDecorationControl( settings );
30
+ const hasFontSize = useHasFontSizeControl( settings );
31
+
32
+ return (
33
+ hasFontFamily ||
34
+ hasLineHeight ||
35
+ hasFontAppearance ||
36
+ hasLetterSpacing ||
37
+ hasTextTransform ||
38
+ hasFontSize ||
39
+ hasTextDecoration
40
+ );
41
+ }
42
+
43
+ function useHasFontSizeControl( settings ) {
44
+ const disableCustomFontSizes = ! settings?.typography?.customFontSize;
45
+ const fontSizesPerOrigin = settings?.typography?.fontSizes ?? {};
46
+ const fontSizes =
47
+ fontSizesPerOrigin?.custom ??
48
+ fontSizesPerOrigin?.theme ??
49
+ fontSizesPerOrigin.default;
50
+ return !! fontSizes?.length || ! disableCustomFontSizes;
51
+ }
52
+
53
+ function useHasFontFamilyControl( settings ) {
54
+ const fontFamiliesPerOrigin = settings?.typography?.fontFamilies;
55
+ const fontFamilies =
56
+ fontFamiliesPerOrigin?.custom ??
57
+ fontFamiliesPerOrigin?.theme ??
58
+ fontFamiliesPerOrigin?.default;
59
+ return !! fontFamilies?.length;
60
+ }
61
+
62
+ function useHasLineHeightControl( settings ) {
63
+ return settings?.typography?.lineHeight;
64
+ }
65
+
66
+ function useHasAppearanceControl( settings ) {
67
+ const hasFontStyles = settings?.typography?.fontStyle;
68
+ const hasFontWeights = settings?.typography?.fontWeight;
69
+ return hasFontStyles || hasFontWeights;
70
+ }
71
+
72
+ function useAppearanceControlLabel( settings ) {
73
+ const hasFontStyles = settings?.typography?.fontStyle;
74
+ const hasFontWeights = settings?.typography?.fontWeight;
75
+ if ( ! hasFontStyles ) {
76
+ return __( 'Font weight' );
77
+ }
78
+ if ( ! hasFontWeights ) {
79
+ return __( 'Font style' );
80
+ }
81
+ return __( 'Appearance' );
82
+ }
83
+
84
+ function useHasLetterSpacingControl( settings ) {
85
+ return settings?.typography?.letterSpacing;
86
+ }
87
+
88
+ function useHasTextTransformControl( settings ) {
89
+ return settings?.typography?.textTransform;
90
+ }
91
+
92
+ function useHasTextDecorationControl( settings ) {
93
+ return settings?.typography?.textDecoration;
94
+ }
95
+
96
+ function TypographyToolsPanel( {
97
+ resetAllFilter,
98
+ onChange,
99
+ value,
100
+ panelId,
101
+ children,
102
+ } ) {
103
+ const resetAll = () => {
104
+ const updatedValue = resetAllFilter( value );
105
+ onChange( updatedValue );
106
+ };
107
+
108
+ return (
109
+ <ToolsPanel
110
+ label={ __( 'Typography' ) }
111
+ resetAll={ resetAll }
112
+ panelId={ panelId }
113
+ >
114
+ { children }
115
+ </ToolsPanel>
116
+ );
117
+ }
118
+
119
+ const DEFAULT_CONTROLS = {
120
+ fontFamily: true,
121
+ fontSize: true,
122
+ fontAppearance: true,
123
+ lineHeight: true,
124
+ letterSpacing: true,
125
+ textTransform: true,
126
+ textDecoration: true,
127
+ };
128
+
129
+ export default function TypographyPanel( {
130
+ as: Wrapper = TypographyToolsPanel,
131
+ value,
132
+ onChange,
133
+ inheritedValue = value,
134
+ settings,
135
+ panelId,
136
+ defaultControls = DEFAULT_CONTROLS,
137
+ } ) {
138
+ const decodeValue = ( rawValue ) =>
139
+ getValueFromVariable( { settings }, '', rawValue );
140
+
141
+ // Font Family
142
+ const hasFontFamilyEnabled = useHasFontFamilyControl( settings );
143
+ const fontFamiliesPerOrigin = settings?.typography?.fontFamilies;
144
+ const fontFamilies =
145
+ fontFamiliesPerOrigin?.custom ??
146
+ fontFamiliesPerOrigin?.theme ??
147
+ fontFamiliesPerOrigin?.default;
148
+ const fontFamily = decodeValue( inheritedValue?.typography?.fontFamily );
149
+ const setFontFamily = ( newValue ) => {
150
+ const slug = fontFamilies?.find(
151
+ ( { fontFamily: f } ) => f === newValue
152
+ )?.slug;
153
+ onChange( {
154
+ ...value,
155
+ typography: {
156
+ ...value?.typography,
157
+ fontFamily: slug
158
+ ? `var:preset|font-family|${ slug }`
159
+ : newValue,
160
+ },
161
+ } );
162
+ };
163
+ const hasFontFamily = () => !! value?.typography?.fontFamily;
164
+ const resetFontFamily = () => setFontFamily( undefined );
165
+
166
+ // Font Size
167
+ const hasFontSizeEnabled = useHasFontSizeControl( settings );
168
+ const disableCustomFontSizes = ! settings?.typography?.customFontSize;
169
+ const fontSizesPerOrigin = settings?.typography?.fontSizes ?? {};
170
+ const fontSizes =
171
+ fontSizesPerOrigin?.custom ??
172
+ fontSizesPerOrigin?.theme ??
173
+ fontSizesPerOrigin.default;
174
+ const fontSize = decodeValue( inheritedValue?.typography?.fontSize );
175
+ const setFontSize = ( newValue, metadata ) => {
176
+ const actualValue = !! metadata?.slug
177
+ ? `var:preset|font-size|${ metadata?.slug }`
178
+ : newValue;
179
+
180
+ onChange( {
181
+ ...value,
182
+ typography: {
183
+ ...value?.typography,
184
+ fontSize: actualValue,
185
+ },
186
+ } );
187
+ };
188
+ const hasFontSize = () => !! value?.typography?.fontSize;
189
+ const resetFontSize = () => setFontSize( undefined );
190
+
191
+ // Appearance
192
+ const hasAppearanceControl = useHasAppearanceControl( settings );
193
+ const appearanceControlLabel = useAppearanceControlLabel( settings );
194
+ const hasFontStyles = settings?.typography?.fontStyle;
195
+ const hasFontWeights = settings?.typography?.fontWeight;
196
+ const fontStyle = decodeValue( inheritedValue?.typography?.fontStyle );
197
+ const fontWeight = decodeValue( inheritedValue?.typography?.fontWeight );
198
+ const setFontAppearance = ( {
199
+ fontStyle: newFontStyle,
200
+ fontWeight: newFontWeight,
201
+ } ) => {
202
+ onChange( {
203
+ ...value,
204
+ typography: {
205
+ ...value?.typography,
206
+ fontStyle: newFontStyle,
207
+ fontWeight: newFontWeight,
208
+ },
209
+ } );
210
+ };
211
+ const hasFontAppearance = () =>
212
+ !! value?.typography?.fontStyle || !! value?.typography?.fontWeight;
213
+ const resetFontAppearance = () => {
214
+ setFontAppearance( {} );
215
+ };
216
+
217
+ // Line Height
218
+ const hasLineHeightEnabled = useHasLineHeightControl( settings );
219
+ const lineHeight = decodeValue( inheritedValue?.typography?.lineHeight );
220
+ const setLineHeight = ( newValue ) => {
221
+ onChange( {
222
+ ...value,
223
+ typography: {
224
+ ...value?.typography,
225
+ lineHeight: newValue,
226
+ },
227
+ } );
228
+ };
229
+ const hasLineHeight = () => !! value?.typography?.lineHeight;
230
+ const resetLineHeight = () => setLineHeight( undefined );
231
+
232
+ // Letter Spacing
233
+ const hasLetterSpacingControl = useHasLetterSpacingControl( settings );
234
+ const letterSpacing = decodeValue(
235
+ inheritedValue?.typography?.letterSpacing
236
+ );
237
+ const setLetterSpacing = ( newValue ) => {
238
+ onChange( {
239
+ ...value,
240
+ typography: {
241
+ ...value?.typography,
242
+ letterSpacing: newValue,
243
+ },
244
+ } );
245
+ };
246
+ const hasLetterSpacing = () => !! value?.typography?.letterSpacing;
247
+ const resetLetterSpacing = () => setLetterSpacing( undefined );
248
+
249
+ // Text Transform
250
+ const hasTextTransformControl = useHasTextTransformControl( settings );
251
+ const textTransform = decodeValue(
252
+ inheritedValue?.typography?.textTransform
253
+ );
254
+ const setTextTransform = ( newValue ) => {
255
+ onChange( {
256
+ ...value,
257
+ typography: {
258
+ ...value?.typography,
259
+ textTransform: newValue,
260
+ },
261
+ } );
262
+ };
263
+ const hasTextTransform = () => !! value?.typography?.textTransform;
264
+ const resetTextTransform = () => setTextTransform( undefined );
265
+
266
+ // Text Decoration
267
+ const hasTextDecorationControl = useHasTextDecorationControl( settings );
268
+ const textDecoration = decodeValue(
269
+ inheritedValue?.typography?.textDecoration
270
+ );
271
+ const setTextDecoration = ( newValue ) => {
272
+ onChange( {
273
+ ...value,
274
+ typography: {
275
+ ...value?.typography,
276
+ textDecoration: newValue,
277
+ },
278
+ } );
279
+ };
280
+ const hasTextDecoration = () => !! value?.typography?.textDecoration;
281
+ const resetTextDecoration = () => setTextDecoration( undefined );
282
+
283
+ const resetAllFilter = useCallback( ( previousValue ) => {
284
+ return {
285
+ ...previousValue,
286
+ typography: {},
287
+ };
288
+ }, [] );
289
+
290
+ return (
291
+ <Wrapper
292
+ resetAllFilter={ resetAllFilter }
293
+ value={ value }
294
+ onChange={ onChange }
295
+ panelId={ panelId }
296
+ >
297
+ { hasFontFamilyEnabled && (
298
+ <ToolsPanelItem
299
+ label={ __( 'Font family' ) }
300
+ hasValue={ hasFontFamily }
301
+ onDeselect={ resetFontFamily }
302
+ isShownByDefault={ defaultControls.fontFamily }
303
+ panelId={ panelId }
304
+ >
305
+ <FontFamilyControl
306
+ fontFamilies={ fontFamilies }
307
+ value={ fontFamily }
308
+ onChange={ setFontFamily }
309
+ size="__unstable-large"
310
+ __nextHasNoMarginBottom
311
+ />
312
+ </ToolsPanelItem>
313
+ ) }
314
+ { hasFontSizeEnabled && (
315
+ <ToolsPanelItem
316
+ label={ __( 'Font size' ) }
317
+ hasValue={ hasFontSize }
318
+ onDeselect={ resetFontSize }
319
+ isShownByDefault={ defaultControls.fontSize }
320
+ panelId={ panelId }
321
+ >
322
+ <FontSizePicker
323
+ value={ fontSize }
324
+ onChange={ setFontSize }
325
+ fontSizes={ fontSizes }
326
+ disableCustomFontSizes={ disableCustomFontSizes }
327
+ withReset={ false }
328
+ withSlider
329
+ size="__unstable-large"
330
+ __nextHasNoMarginBottom
331
+ />
332
+ </ToolsPanelItem>
333
+ ) }
334
+ { hasAppearanceControl && (
335
+ <ToolsPanelItem
336
+ className="single-column"
337
+ label={ appearanceControlLabel }
338
+ hasValue={ hasFontAppearance }
339
+ onDeselect={ resetFontAppearance }
340
+ isShownByDefault={ defaultControls.fontAppearance }
341
+ panelId={ panelId }
342
+ >
343
+ <FontAppearanceControl
344
+ value={ {
345
+ fontStyle,
346
+ fontWeight,
347
+ } }
348
+ onChange={ setFontAppearance }
349
+ hasFontStyles={ hasFontStyles }
350
+ hasFontWeights={ hasFontWeights }
351
+ size="__unstable-large"
352
+ __nextHasNoMarginBottom
353
+ />
354
+ </ToolsPanelItem>
355
+ ) }
356
+ { hasLineHeightEnabled && (
357
+ <ToolsPanelItem
358
+ className="single-column"
359
+ label={ __( 'Line height' ) }
360
+ hasValue={ hasLineHeight }
361
+ onDeselect={ resetLineHeight }
362
+ isShownByDefault={ defaultControls.lineHeight }
363
+ panelId={ panelId }
364
+ >
365
+ <LineHeightControl
366
+ __nextHasNoMarginBottom
367
+ __unstableInputWidth="auto"
368
+ value={ lineHeight }
369
+ onChange={ setLineHeight }
370
+ size="__unstable-large"
371
+ />
372
+ </ToolsPanelItem>
373
+ ) }
374
+ { hasLetterSpacingControl && (
375
+ <ToolsPanelItem
376
+ className="single-column"
377
+ label={ __( 'Letter spacing' ) }
378
+ hasValue={ hasLetterSpacing }
379
+ onDeselect={ resetLetterSpacing }
380
+ isShownByDefault={ defaultControls.letterSpacing }
381
+ panelId={ panelId }
382
+ >
383
+ <LetterSpacingControl
384
+ value={ letterSpacing }
385
+ onChange={ setLetterSpacing }
386
+ size="__unstable-large"
387
+ __unstableInputWidth="auto"
388
+ />
389
+ </ToolsPanelItem>
390
+ ) }
391
+ { hasTextDecorationControl && (
392
+ <ToolsPanelItem
393
+ className="single-column"
394
+ label={ __( 'Text decoration' ) }
395
+ hasValue={ hasTextDecoration }
396
+ onDeselect={ resetTextDecoration }
397
+ isShownByDefault={ defaultControls.textDecoration }
398
+ panelId={ panelId }
399
+ >
400
+ <TextDecorationControl
401
+ value={ textDecoration }
402
+ onChange={ setTextDecoration }
403
+ size="__unstable-large"
404
+ __unstableInputWidth="auto"
405
+ />
406
+ </ToolsPanelItem>
407
+ ) }
408
+ { hasTextTransformControl && (
409
+ <ToolsPanelItem
410
+ label={ __( 'Letter case' ) }
411
+ hasValue={ hasTextTransform }
412
+ onDeselect={ resetTextTransform }
413
+ isShownByDefault={ defaultControls.textTransform }
414
+ panelId={ panelId }
415
+ >
416
+ <TextTransformControl
417
+ value={ textTransform }
418
+ onChange={ setTextTransform }
419
+ showNone
420
+ isBlock
421
+ size="__unstable-large"
422
+ __nextHasNoMarginBottom
423
+ />
424
+ </ToolsPanelItem>
425
+ ) }
426
+ </Wrapper>
427
+ );
428
+ }
@@ -664,13 +664,17 @@ export const toStyles = (
664
664
  }
665
665
 
666
666
  if ( useRootPaddingAlign ) {
667
+ /*
668
+ * These rules reproduce the ones from https://github.com/WordPress/gutenberg/blob/79103f124925d1f457f627e154f52a56228ed5ad/lib/class-wp-theme-json-gutenberg.php#L2508
669
+ * almost exactly, but for the selectors that target block wrappers in the front end. This code only runs in the editor, so it doesn't need those selectors.
670
+ */
667
671
  ruleset += `padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }
668
672
  .has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }
669
673
  .has-global-padding :where(.has-global-padding) { padding-right: 0; padding-left: 0; }
670
674
  .has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }
671
675
  .has-global-padding :where(.has-global-padding) > .alignfull { margin-right: 0; margin-left: 0; }
672
- .has-global-padding > .alignfull:where(:not(.has-global-padding)) > :where([class*="wp-block-"]:not(.alignfull):not([class*="__"]),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }
673
- .has-global-padding :where(.has-global-padding) > .alignfull:where(:not(.has-global-padding)) > :where([class*="wp-block-"]:not(.alignfull):not([class*="__"]),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: 0; padding-left: 0;`;
676
+ .has-global-padding > .alignfull:where(:not(.has-global-padding)) > :where(.wp-block:not(.alignfull),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }
677
+ .has-global-padding :where(.has-global-padding) > .alignfull:where(:not(.has-global-padding)) > :where(.wp-block:not(.alignfull),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: 0; padding-left: 0;`;
674
678
  }
675
679
 
676
680
  ruleset += '}';
@@ -786,9 +790,10 @@ export const toStyles = (
786
790
  if ( duotoneDeclarations.length > 0 ) {
787
791
  ruleset =
788
792
  ruleset +
789
- `${ duotoneSelector }{${ duotoneDeclarations.join(
790
- ';'
791
- ) };}`;
793
+ `${ scopeSelector(
794
+ selector,
795
+ duotoneSelector
796
+ ) }{${ duotoneDeclarations.join( ';' ) };}`;
792
797
  }
793
798
  }
794
799
 
@@ -57,6 +57,7 @@ export const PRESET_METADATA = [
57
57
  },
58
58
  {
59
59
  path: [ 'color', 'duotone' ],
60
+ valueKey: 'colors',
60
61
  cssVarInfix: 'duotone',
61
62
  valueFunc: ( { slug } ) => `url( '#wp-duotone-${ slug }' )`,
62
63
  classes: [],
@@ -95,6 +96,7 @@ export const PRESET_METADATA = [
95
96
  export const STYLE_PATH_TO_CSS_VAR_INFIX = {
96
97
  'color.background': 'color',
97
98
  'color.text': 'color',
99
+ 'filter.duotone': 'duotone',
98
100
  'elements.link.color.text': 'color',
99
101
  'elements.link.:hover.color.text': 'color',
100
102
  'elements.link.typography.fontFamily': 'font-family',
@@ -108,6 +108,7 @@ function Iframe( {
108
108
  tabIndex = 0,
109
109
  scale = 1,
110
110
  frameSize = 0,
111
+ expand = false,
111
112
  readonly,
112
113
  forwardedRef: ref,
113
114
  ...props
@@ -246,11 +247,30 @@ function Iframe( {
246
247
  return '<!doctype html>' + renderToString( styleAssets );
247
248
  }, [] );
248
249
 
250
+ // We need to counter the margin created by scaling the iframe. If the scale
251
+ // is e.g. 0.45, then the top + bottom margin is 0.55 (1 - scale). Just the
252
+ // top or bottom margin is 0.55 / 2 ((1 - scale) / 2).
253
+ const marginFromScaling = ( contentHeight * ( 1 - scale ) ) / 2;
254
+
249
255
  return (
250
256
  <>
251
257
  { tabIndex >= 0 && before }
252
258
  <iframe
253
259
  { ...props }
260
+ style={ {
261
+ ...props.style,
262
+ height: expand ? contentHeight : props.style?.height,
263
+ marginTop: scale
264
+ ? -marginFromScaling + frameSize
265
+ : props.style?.marginTop,
266
+ marginBottom: scale
267
+ ? -marginFromScaling + frameSize
268
+ : props.style?.marginBottom,
269
+ transform: scale
270
+ ? `scale( ${ scale } )`
271
+ : props.style?.transform,
272
+ transition: 'all .3s',
273
+ } }
254
274
  ref={ useMergeRefs( [ ref, setRef ] ) }
255
275
  tabIndex={ tabIndex }
256
276
  // Correct doctype is required to enable rendering in standards
@@ -265,13 +285,6 @@ function Iframe( {
265
285
  <head ref={ headRef }>
266
286
  { styleAssets }
267
287
  { head }
268
- <style>
269
- { `html { transition: background 5s; ${
270
- frameSize
271
- ? 'background: #2f2f2f; transition: background 0s;'
272
- : ''
273
- } }` }
274
- </style>
275
288
  </head>
276
289
  <body
277
290
  ref={ bodyRef }
@@ -280,17 +293,6 @@ function Iframe( {
280
293
  'editor-styles-wrapper',
281
294
  ...bodyClasses
282
295
  ) }
283
- style={ {
284
- // This is the remaining percentage from the scaling down
285
- // of the iframe body(`scale(0.45)`). We also need to subtract
286
- // the body's bottom margin.
287
- marginBottom: `-${
288
- contentHeight * ( 1 - scale ) -
289
- frameSize
290
- }px`,
291
- marginTop: frameSize,
292
- transform: `scale( ${ scale } )`,
293
- } }
294
296
  >
295
297
  { contentResizeListener }
296
298
  <StyleProvider document={ iframeDocument }>
@@ -54,6 +54,7 @@ export default function AspectRatioDropdown( { toggleProps } ) {
54
54
  } }
55
55
  value={ aspect }
56
56
  aspectRatios={ [
57
+ // All ratios should be mirrored in PostFeaturedImage in @wordpress/block-library
57
58
  {
58
59
  title: __( 'Original' ),
59
60
  aspect: defaultAspect,
@@ -5,7 +5,8 @@ import {
5
5
  Button,
6
6
  ButtonGroup,
7
7
  SelectControl,
8
- TextControl,
8
+ __experimentalNumberControl as NumberControl,
9
+ __experimentalHStack as HStack,
9
10
  } from '@wordpress/components';
10
11
  import { __ } from '@wordpress/i18n';
11
12
 
@@ -46,12 +47,10 @@ export default function ImageSizeControl( {
46
47
  ) }
47
48
  { isResizable && (
48
49
  <div className="block-editor-image-size-control">
49
- <p className="block-editor-image-size-control__row">
50
- { __( 'Image dimensions' ) }
51
- </p>
52
- <div className="block-editor-image-size-control__row">
53
- <TextControl
54
- type="number"
50
+ <p>{ __( 'Image dimensions' ) }</p>
51
+
52
+ <HStack align="baseline" spacing="3">
53
+ <NumberControl
55
54
  className="block-editor-image-size-control__width"
56
55
  label={ __( 'Width' ) }
57
56
  value={ currentWidth }
@@ -60,8 +59,7 @@ export default function ImageSizeControl( {
60
59
  updateDimension( 'width', value )
61
60
  }
62
61
  />
63
- <TextControl
64
- type="number"
62
+ <NumberControl
65
63
  className="block-editor-image-size-control__height"
66
64
  label={ __( 'Height' ) }
67
65
  value={ currentHeight }
@@ -70,8 +68,8 @@ export default function ImageSizeControl( {
70
68
  updateDimension( 'height', value )
71
69
  }
72
70
  />
73
- </div>
74
- <div className="block-editor-image-size-control__row">
71
+ </HStack>
72
+ <HStack>
75
73
  <ButtonGroup aria-label={ __( 'Image size presets' ) }>
76
74
  { IMAGE_SIZE_PRESETS.map( ( scale ) => {
77
75
  const scaledWidth = Math.round(
@@ -108,7 +106,7 @@ export default function ImageSizeControl( {
108
106
  <Button isSmall onClick={ () => updateDimensions() }>
109
107
  { __( 'Reset' ) }
110
108
  </Button>
111
- </div>
109
+ </HStack>
112
110
  </div>
113
111
  ) }
114
112
  </>
@@ -1,26 +1,8 @@
1
1
  .block-editor-image-size-control {
2
2
  margin-bottom: 1em;
3
3
 
4
- .block-editor-image-size-control__row {
5
- display: flex;
6
- justify-content: space-between;
7
-
8
- .block-editor-image-size-control__width,
9
- .block-editor-image-size-control__height {
10
- margin-bottom: 0.5em;
11
-
12
- // Fix the text and placeholder text being misaligned in Safari
13
- input {
14
- line-height: 1.25;
15
- }
16
- }
17
-
18
- .block-editor-image-size-control__width {
19
- margin-right: 5px;
20
- }
21
-
22
- .block-editor-image-size-control__height {
23
- margin-left: 5px;
24
- }
4
+ .block-editor-image-size-control__width,
5
+ .block-editor-image-size-control__height {
6
+ margin-bottom: 1.115em;
25
7
  }
26
8
  }
@@ -74,6 +74,11 @@ export {
74
74
  } from './block-settings';
75
75
  export { default as VideoPlayer, VIDEO_ASPECT_RATIO } from './video-player';
76
76
 
77
+ export {
78
+ getSpacingPresetCssVar,
79
+ getCustomValueFromPreset,
80
+ isValueSpacingPreset,
81
+ } from './spacing-sizes-control/utils';
77
82
  // Content Related Components.
78
83
  export { default as BlockList } from './block-list';
79
84
  export { default as BlockMover } from './block-mover';
@@ -9,7 +9,7 @@ exports[`InnerBlocks should force serialize for invalid block with inner blocks
9
9
  `;
10
10
 
11
11
  exports[`InnerBlocks should return element as string, with inner blocks 1`] = `
12
- "<div>Bananas<!-- wp:fruit {\\"fruit\\":\\"Apples\\"} -->
12
+ "<div>Bananas<!-- wp:fruit {"fruit":"Apples"} -->
13
13
  <div>Apples</div>
14
14
  <!-- /wp:fruit --></div>"
15
15
  `;