@wordpress/block-editor 11.1.0 → 11.3.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 (765) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/LICENSE.md +1 -1
  3. package/README.md +28 -4
  4. package/build/components/alignment-control/ui.js +1 -1
  5. package/build/components/alignment-control/ui.js.map +1 -1
  6. package/build/components/autocomplete/index.js +2 -7
  7. package/build/components/autocomplete/index.js.map +1 -1
  8. package/build/components/block-actions/index.js +9 -0
  9. package/build/components/block-actions/index.js.map +1 -1
  10. package/build/components/block-alignment-matrix-control/index.js +2 -2
  11. package/build/components/block-alignment-matrix-control/index.js.map +1 -1
  12. package/build/components/block-card/index.js +2 -4
  13. package/build/components/block-card/index.js.map +1 -1
  14. package/build/components/block-edit/index.js +8 -0
  15. package/build/components/block-edit/index.js.map +1 -1
  16. package/build/components/block-inspector/index.js +18 -15
  17. package/build/components/block-inspector/index.js.map +1 -1
  18. package/build/components/block-list/use-in-between-inserter.js +5 -0
  19. package/build/components/block-list/use-in-between-inserter.js.map +1 -1
  20. package/build/components/block-lock/modal.js +0 -1
  21. package/build/components/block-lock/modal.js.map +1 -1
  22. package/build/components/block-mover/mover-description.js +2 -2
  23. package/build/components/block-mover/mover-description.js.map +1 -1
  24. package/build/components/block-navigation/dropdown.js +3 -1
  25. package/build/components/block-navigation/dropdown.js.map +1 -1
  26. package/build/components/block-pattern-setup/index.js +1 -1
  27. package/build/components/block-pattern-setup/index.js.map +1 -1
  28. package/build/components/block-pattern-setup/use-patterns-setup.js +2 -2
  29. package/build/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
  30. package/build/components/block-patterns-list/index.js +31 -3
  31. package/build/components/block-patterns-list/index.js.map +1 -1
  32. package/build/components/block-preview/auto.js +9 -14
  33. package/build/components/block-preview/auto.js.map +1 -1
  34. package/build/components/block-preview/index.js +32 -8
  35. package/build/components/block-preview/index.js.map +1 -1
  36. package/build/components/block-selection-clearer/index.js +1 -1
  37. package/build/components/block-selection-clearer/index.js.map +1 -1
  38. package/build/components/block-settings/container.native.js +7 -33
  39. package/build/components/block-settings/container.native.js.map +1 -1
  40. package/build/components/block-settings-menu/block-settings-dropdown.js +12 -3
  41. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  42. package/build/components/block-settings-menu-controls/index.js +2 -8
  43. package/build/components/block-settings-menu-controls/index.js.map +1 -1
  44. package/build/components/block-styles/index.js +3 -1
  45. package/build/components/block-styles/index.js.map +1 -1
  46. package/build/components/block-switcher/utils.js +1 -1
  47. package/build/components/block-switcher/utils.js.map +1 -1
  48. package/build/components/block-tools/selected-block-popover.js +55 -47
  49. package/build/components/block-tools/selected-block-popover.js.map +1 -1
  50. package/build/components/block-tools/use-block-toolbar-popover-props.js +43 -10
  51. package/build/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
  52. package/build/components/block-vertical-alignment-control/icons.js +15 -1
  53. package/build/components/block-vertical-alignment-control/icons.js.map +1 -1
  54. package/build/components/block-vertical-alignment-control/ui.js +9 -4
  55. package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
  56. package/build/components/color-style-selector/index.js +3 -1
  57. package/build/components/color-style-selector/index.js.map +1 -1
  58. package/build/components/date-format-picker/index.js +3 -4
  59. package/build/components/date-format-picker/index.js.map +1 -1
  60. package/build/components/default-style-picker/index.js +1 -0
  61. package/build/components/default-style-picker/index.js.map +1 -1
  62. package/build/components/font-family/index.js +1 -7
  63. package/build/components/font-family/index.js.map +1 -1
  64. package/build/components/font-sizes/fluid-utils.js +1 -1
  65. package/build/components/font-sizes/fluid-utils.js.map +1 -1
  66. package/build/components/font-sizes/utils.js +1 -1
  67. package/build/components/font-sizes/utils.js.map +1 -1
  68. package/build/components/font-sizes/with-font-sizes.js +5 -8
  69. package/build/components/font-sizes/with-font-sizes.js.map +1 -1
  70. package/build/components/global-styles/context.js +22 -0
  71. package/build/components/global-styles/context.js.map +1 -0
  72. package/build/components/global-styles/hooks.js +142 -0
  73. package/build/components/global-styles/hooks.js.map +1 -0
  74. package/build/components/global-styles/index.js +42 -0
  75. package/build/components/global-styles/index.js.map +1 -0
  76. package/build/components/global-styles/typography-utils.js +92 -0
  77. package/build/components/global-styles/typography-utils.js.map +1 -0
  78. package/build/components/global-styles/use-global-styles-output.js +974 -0
  79. package/build/components/global-styles/use-global-styles-output.js.map +1 -0
  80. package/build/components/global-styles/utils.js +340 -0
  81. package/build/components/global-styles/utils.js.map +1 -0
  82. package/build/components/height-control/index.js +13 -1
  83. package/build/components/height-control/index.js.map +1 -1
  84. package/build/components/iframe/index.js +37 -8
  85. package/build/components/iframe/index.js.map +1 -1
  86. package/build/components/iframe/use-compatibility-styles.js +6 -1
  87. package/build/components/iframe/use-compatibility-styles.js.map +1 -1
  88. package/build/components/image-editor/constants.js +1 -1
  89. package/build/components/image-editor/constants.js.map +1 -1
  90. package/build/components/image-editor/context.js +1 -2
  91. package/build/components/image-editor/context.js.map +1 -1
  92. package/build/components/image-editor/cropper.js +3 -1
  93. package/build/components/image-editor/cropper.js.map +1 -1
  94. package/build/components/image-editor/index.js +13 -9
  95. package/build/components/image-editor/index.js.map +1 -1
  96. package/build/components/image-editor/use-transform-image.js +11 -35
  97. package/build/components/image-editor/use-transform-image.js.map +1 -1
  98. package/build/components/image-size-control/index.js +2 -7
  99. package/build/components/image-size-control/index.js.map +1 -1
  100. package/build/components/index.js +8 -24
  101. package/build/components/index.js.map +1 -1
  102. package/build/components/inner-blocks/index.js +22 -32
  103. package/build/components/inner-blocks/index.js.map +1 -1
  104. package/build/components/inner-blocks/index.native.js +8 -23
  105. package/build/components/inner-blocks/index.native.js.map +1 -1
  106. package/build/components/inner-blocks/use-block-context.js +53 -0
  107. package/build/components/inner-blocks/use-block-context.js.map +1 -0
  108. package/build/components/inserter/block-patterns-explorer/explorer.js +0 -1
  109. package/build/components/inserter/block-patterns-explorer/explorer.js.map +1 -1
  110. package/build/components/inserter/block-patterns-tab.js +11 -5
  111. package/build/components/inserter/block-patterns-tab.js.map +1 -1
  112. package/build/components/inserter/block-types-tab.js +2 -2
  113. package/build/components/inserter/block-types-tab.js.map +1 -1
  114. package/build/components/inserter/hooks/use-patterns-state.js +1 -7
  115. package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
  116. package/build/components/inserter/index.js +8 -6
  117. package/build/components/inserter/index.js.map +1 -1
  118. package/build/components/inserter/media-tab/hooks.js +142 -56
  119. package/build/components/inserter/media-tab/hooks.js.map +1 -1
  120. package/build/components/inserter/media-tab/media-list.js +74 -21
  121. package/build/components/inserter/media-tab/media-list.js.map +1 -1
  122. package/build/components/inserter/media-tab/media-panel.js +11 -13
  123. package/build/components/inserter/media-tab/media-panel.js.map +1 -1
  124. package/build/components/inserter/media-tab/media-tab.js +6 -3
  125. package/build/components/inserter/media-tab/media-tab.js.map +1 -1
  126. package/build/components/inserter/media-tab/utils.js +26 -15
  127. package/build/components/inserter/media-tab/utils.js.map +1 -1
  128. package/build/components/inserter/menu.js +12 -5
  129. package/build/components/inserter/menu.js.map +1 -1
  130. package/build/components/inserter/preview-panel.js +5 -3
  131. package/build/components/inserter/preview-panel.js.map +1 -1
  132. package/build/components/inserter/search-results.js +2 -7
  133. package/build/components/inserter/search-results.js.map +1 -1
  134. package/build/components/inserter-list-item/index.js +1 -9
  135. package/build/components/inserter-list-item/index.js.map +1 -1
  136. package/build/components/inspector-controls/fill.js +15 -2
  137. package/build/components/inspector-controls/fill.js.map +1 -1
  138. package/build/components/inspector-controls/fill.native.js +14 -1
  139. package/build/components/inspector-controls/fill.native.js.map +1 -1
  140. package/build/components/inspector-controls/groups.js +7 -1
  141. package/build/components/inspector-controls/groups.js.map +1 -1
  142. package/build/components/inspector-controls/index.js +2 -2
  143. package/build/components/inspector-controls/index.js.map +1 -1
  144. package/build/components/inspector-controls/slot.js +14 -1
  145. package/build/components/inspector-controls/slot.js.map +1 -1
  146. package/build/components/inspector-controls/slot.native.js +14 -1
  147. package/build/components/inspector-controls/slot.native.js.map +1 -1
  148. package/build/components/inspector-controls-tabs/advanced-controls-panel.js +1 -1
  149. package/build/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
  150. package/build/components/inspector-controls-tabs/index.js +2 -2
  151. package/build/components/inspector-controls-tabs/index.js.map +1 -1
  152. package/build/components/inspector-controls-tabs/position-controls-panel.js +46 -0
  153. package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -0
  154. package/build/components/inspector-controls-tabs/settings-tab.js +3 -1
  155. package/build/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  156. package/build/components/inspector-controls-tabs/styles-tab.js +6 -4
  157. package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  158. package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js +20 -22
  159. package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
  160. package/build/components/justify-content-control/ui.js +8 -1
  161. package/build/components/justify-content-control/ui.js.map +1 -1
  162. package/build/components/link-control/index.js +45 -17
  163. package/build/components/link-control/index.js.map +1 -1
  164. package/build/components/link-control/search-input.js +1 -0
  165. package/build/components/link-control/search-input.js.map +1 -1
  166. package/build/components/list-view/block.js +1 -1
  167. package/build/components/list-view/block.js.map +1 -1
  168. package/build/components/list-view/use-list-view-drop-zone.js +1 -1
  169. package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
  170. package/build/components/media-upload/index.native.js +4 -1
  171. package/build/components/media-upload/index.native.js.map +1 -1
  172. package/build/components/off-canvas-editor/appender.js +49 -38
  173. package/build/components/off-canvas-editor/appender.js.map +1 -1
  174. package/build/components/off-canvas-editor/block-contents.js +38 -5
  175. package/build/components/off-canvas-editor/block-contents.js.map +1 -1
  176. package/build/components/off-canvas-editor/block-select-button.js +10 -4
  177. package/build/components/off-canvas-editor/block-select-button.js.map +1 -1
  178. package/build/components/off-canvas-editor/block.js +13 -52
  179. package/build/components/off-canvas-editor/block.js.map +1 -1
  180. package/build/components/off-canvas-editor/branch.js +25 -10
  181. package/build/components/off-canvas-editor/branch.js.map +1 -1
  182. package/build/components/off-canvas-editor/index.js +15 -17
  183. package/build/components/off-canvas-editor/index.js.map +1 -1
  184. package/build/components/off-canvas-editor/link-ui.js +2 -2
  185. package/build/components/off-canvas-editor/link-ui.js.map +1 -1
  186. package/build/components/off-canvas-editor/use-list-view-drop-zone.js +1 -1
  187. package/build/components/off-canvas-editor/use-list-view-drop-zone.js.map +1 -1
  188. package/build/components/provider/index.js +22 -8
  189. package/build/components/provider/index.js.map +1 -1
  190. package/build/components/provider/index.native.js +5 -6
  191. package/build/components/provider/index.native.js.map +1 -1
  192. package/build/components/rich-text/use-before-input-rules.js +11 -3
  193. package/build/components/rich-text/use-before-input-rules.js.map +1 -1
  194. package/build/components/rich-text/use-enter.js +4 -5
  195. package/build/components/rich-text/use-enter.js.map +1 -1
  196. package/build/components/rich-text/utils.js +1 -1
  197. package/build/components/rich-text/utils.js.map +1 -1
  198. package/build/components/spacing-sizes-control/utils.js +2 -8
  199. package/build/components/spacing-sizes-control/utils.js.map +1 -1
  200. package/build/components/tool-selector/index.js +3 -1
  201. package/build/components/tool-selector/index.js.map +1 -1
  202. package/build/components/url-input/button.js +1 -0
  203. package/build/components/url-input/button.js.map +1 -1
  204. package/build/components/url-input/index.js +15 -1
  205. package/build/components/url-input/index.js.map +1 -1
  206. package/build/components/url-popover/image-url-input-ui.js +7 -8
  207. package/build/components/url-popover/image-url-input-ui.js.map +1 -1
  208. package/build/components/url-popover/link-editor.js +1 -0
  209. package/build/components/url-popover/link-editor.js.map +1 -1
  210. package/build/components/use-block-display-information/index.js +1 -1
  211. package/build/components/use-block-display-information/index.js.map +1 -1
  212. package/build/components/use-paste-styles/index.js +188 -0
  213. package/build/components/use-paste-styles/index.js.map +1 -0
  214. package/build/components/writing-flow/use-arrow-nav.js +22 -29
  215. package/build/components/writing-flow/use-arrow-nav.js.map +1 -1
  216. package/build/experiments.js +45 -0
  217. package/build/experiments.js.map +1 -0
  218. package/build/experiments.native.js +40 -0
  219. package/build/experiments.native.js.map +1 -0
  220. package/build/hooks/anchor.js +2 -1
  221. package/build/hooks/anchor.js.map +1 -1
  222. package/build/hooks/border.js +1 -1
  223. package/build/hooks/border.js.map +1 -1
  224. package/build/hooks/child-layout.js +5 -1
  225. package/build/hooks/child-layout.js.map +1 -1
  226. package/build/hooks/color-panel.js +1 -1
  227. package/build/hooks/color-panel.js.map +1 -1
  228. package/build/hooks/color.js +3 -3
  229. package/build/hooks/color.js.map +1 -1
  230. package/build/hooks/custom-class-name.js +2 -1
  231. package/build/hooks/custom-class-name.js.map +1 -1
  232. package/build/hooks/dimensions.js +7 -5
  233. package/build/hooks/dimensions.js.map +1 -1
  234. package/build/hooks/index.js +2 -0
  235. package/build/hooks/index.js.map +1 -1
  236. package/build/hooks/margin.js +1 -0
  237. package/build/hooks/margin.js.map +1 -1
  238. package/build/hooks/metadata.js +1 -1
  239. package/build/hooks/metadata.js.map +1 -1
  240. package/build/hooks/padding.js +1 -0
  241. package/build/hooks/padding.js.map +1 -1
  242. package/build/hooks/position.js +395 -0
  243. package/build/hooks/position.js.map +1 -0
  244. package/build/hooks/supports.js +328 -0
  245. package/build/hooks/supports.js.map +1 -0
  246. package/build/hooks/typography.js +1 -1
  247. package/build/hooks/typography.js.map +1 -1
  248. package/build/hooks/use-color-props.js +3 -3
  249. package/build/hooks/use-color-props.js.map +1 -1
  250. package/build/hooks/utils.js +69 -3
  251. package/build/hooks/utils.js.map +1 -1
  252. package/build/index.js +10 -1
  253. package/build/index.js.map +1 -1
  254. package/build/layouts/constrained.js +3 -0
  255. package/build/layouts/constrained.js.map +1 -1
  256. package/build/layouts/flex.js +59 -9
  257. package/build/layouts/flex.js.map +1 -1
  258. package/build/layouts/flow.js +0 -18
  259. package/build/layouts/flow.js.map +1 -1
  260. package/build/store/actions.js +3 -30
  261. package/build/store/actions.js.map +1 -1
  262. package/build/store/defaults.js +5 -2
  263. package/build/store/defaults.js.map +1 -1
  264. package/build/store/index.js +11 -2
  265. package/build/store/index.js.map +1 -1
  266. package/build/store/private-actions.js +78 -0
  267. package/build/store/private-actions.js.map +1 -0
  268. package/build/store/private-selectors.js +18 -0
  269. package/build/store/private-selectors.js.map +1 -0
  270. package/build/store/reducer.js +7 -3
  271. package/build/store/reducer.js.map +1 -1
  272. package/build/store/selectors.js +68 -40
  273. package/build/store/selectors.js.map +1 -1
  274. package/build/utils/block-variation-transforms.js +1 -1
  275. package/build/utils/block-variation-transforms.js.map +1 -1
  276. package/build/utils/parse-css-unit-to-px.js +1 -1
  277. package/build/utils/parse-css-unit-to-px.js.map +1 -1
  278. package/build/utils/transform-styles/index.js +1 -7
  279. package/build/utils/transform-styles/index.js.map +1 -1
  280. package/build-module/components/alignment-control/ui.js +1 -1
  281. package/build-module/components/alignment-control/ui.js.map +1 -1
  282. package/build-module/components/autocomplete/index.js +2 -6
  283. package/build-module/components/autocomplete/index.js.map +1 -1
  284. package/build-module/components/block-actions/index.js +6 -0
  285. package/build-module/components/block-actions/index.js.map +1 -1
  286. package/build-module/components/block-alignment-matrix-control/index.js +2 -2
  287. package/build-module/components/block-alignment-matrix-control/index.js.map +1 -1
  288. package/build-module/components/block-card/index.js +2 -4
  289. package/build-module/components/block-card/index.js.map +1 -1
  290. package/build-module/components/block-edit/index.js +7 -0
  291. package/build-module/components/block-edit/index.js.map +1 -1
  292. package/build-module/components/block-inspector/index.js +17 -15
  293. package/build-module/components/block-inspector/index.js.map +1 -1
  294. package/build-module/components/block-list/use-in-between-inserter.js +5 -0
  295. package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
  296. package/build-module/components/block-lock/modal.js +0 -1
  297. package/build-module/components/block-lock/modal.js.map +1 -1
  298. package/build-module/components/block-mover/mover-description.js +2 -2
  299. package/build-module/components/block-mover/mover-description.js.map +1 -1
  300. package/build-module/components/block-navigation/dropdown.js +3 -1
  301. package/build-module/components/block-navigation/dropdown.js.map +1 -1
  302. package/build-module/components/block-pattern-setup/index.js +1 -1
  303. package/build-module/components/block-pattern-setup/index.js.map +1 -1
  304. package/build-module/components/block-pattern-setup/use-patterns-setup.js +2 -2
  305. package/build-module/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
  306. package/build-module/components/block-patterns-list/index.js +32 -3
  307. package/build-module/components/block-patterns-list/index.js.map +1 -1
  308. package/build-module/components/block-preview/auto.js +9 -14
  309. package/build-module/components/block-preview/auto.js.map +1 -1
  310. package/build-module/components/block-preview/index.js +31 -8
  311. package/build-module/components/block-preview/index.js.map +1 -1
  312. package/build-module/components/block-selection-clearer/index.js +1 -1
  313. package/build-module/components/block-selection-clearer/index.js.map +1 -1
  314. package/build-module/components/block-settings/container.native.js +6 -30
  315. package/build-module/components/block-settings/container.native.js.map +1 -1
  316. package/build-module/components/block-settings-menu/block-settings-dropdown.js +12 -3
  317. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  318. package/build-module/components/block-settings-menu-controls/index.js +2 -7
  319. package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
  320. package/build-module/components/block-styles/index.js +2 -1
  321. package/build-module/components/block-styles/index.js.map +1 -1
  322. package/build-module/components/block-switcher/utils.js +1 -1
  323. package/build-module/components/block-switcher/utils.js.map +1 -1
  324. package/build-module/components/block-tools/selected-block-popover.js +55 -48
  325. package/build-module/components/block-tools/selected-block-popover.js.map +1 -1
  326. package/build-module/components/block-tools/use-block-toolbar-popover-props.js +42 -11
  327. package/build-module/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
  328. package/build-module/components/block-vertical-alignment-control/icons.js +12 -0
  329. package/build-module/components/block-vertical-alignment-control/icons.js.map +1 -1
  330. package/build-module/components/block-vertical-alignment-control/ui.js +10 -5
  331. package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
  332. package/build-module/components/color-style-selector/index.js +3 -1
  333. package/build-module/components/color-style-selector/index.js.map +1 -1
  334. package/build-module/components/date-format-picker/index.js +4 -5
  335. package/build-module/components/date-format-picker/index.js.map +1 -1
  336. package/build-module/components/default-style-picker/index.js +1 -0
  337. package/build-module/components/default-style-picker/index.js.map +1 -1
  338. package/build-module/components/font-family/index.js +1 -6
  339. package/build-module/components/font-family/index.js.map +1 -1
  340. package/build-module/components/font-sizes/fluid-utils.js +1 -1
  341. package/build-module/components/font-sizes/fluid-utils.js.map +1 -1
  342. package/build-module/components/font-sizes/utils.js +1 -1
  343. package/build-module/components/font-sizes/utils.js.map +1 -1
  344. package/build-module/components/font-sizes/with-font-sizes.js +5 -7
  345. package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
  346. package/build-module/components/global-styles/context.js +12 -0
  347. package/build-module/components/global-styles/context.js.map +1 -0
  348. package/build-module/components/global-styles/hooks.js +121 -0
  349. package/build-module/components/global-styles/hooks.js.map +1 -0
  350. package/build-module/components/global-styles/index.js +4 -0
  351. package/build-module/components/global-styles/index.js.map +1 -0
  352. package/build-module/components/global-styles/typography-utils.js +84 -0
  353. package/build-module/components/global-styles/typography-utils.js.map +1 -0
  354. package/build-module/components/global-styles/use-global-styles-output.js +930 -0
  355. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -0
  356. package/build-module/components/global-styles/utils.js +321 -0
  357. package/build-module/components/global-styles/utils.js.map +1 -0
  358. package/build-module/components/height-control/index.js +14 -1
  359. package/build-module/components/height-control/index.js.map +1 -1
  360. package/build-module/components/iframe/index.js +36 -9
  361. package/build-module/components/iframe/index.js.map +1 -1
  362. package/build-module/components/iframe/use-compatibility-styles.js +6 -1
  363. package/build-module/components/iframe/use-compatibility-styles.js.map +1 -1
  364. package/build-module/components/image-editor/constants.js +1 -1
  365. package/build-module/components/image-editor/constants.js.map +1 -1
  366. package/build-module/components/image-editor/context.js +1 -2
  367. package/build-module/components/image-editor/context.js.map +1 -1
  368. package/build-module/components/image-editor/cropper.js +3 -1
  369. package/build-module/components/image-editor/cropper.js.map +1 -1
  370. package/build-module/components/image-editor/index.js +13 -3
  371. package/build-module/components/image-editor/index.js.map +1 -1
  372. package/build-module/components/image-editor/use-transform-image.js +12 -37
  373. package/build-module/components/image-editor/use-transform-image.js.map +1 -1
  374. package/build-module/components/image-size-control/index.js +2 -6
  375. package/build-module/components/image-size-control/index.js.map +1 -1
  376. package/build-module/components/index.js +2 -3
  377. package/build-module/components/index.js.map +1 -1
  378. package/build-module/components/inner-blocks/index.js +21 -32
  379. package/build-module/components/inner-blocks/index.js.map +1 -1
  380. package/build-module/components/inner-blocks/index.native.js +9 -22
  381. package/build-module/components/inner-blocks/index.native.js.map +1 -1
  382. package/build-module/components/inner-blocks/use-block-context.js +43 -0
  383. package/build-module/components/inner-blocks/use-block-context.js.map +1 -0
  384. package/build-module/components/inserter/block-patterns-explorer/explorer.js +0 -1
  385. package/build-module/components/inserter/block-patterns-explorer/explorer.js.map +1 -1
  386. package/build-module/components/inserter/block-patterns-tab.js +11 -5
  387. package/build-module/components/inserter/block-patterns-tab.js.map +1 -1
  388. package/build-module/components/inserter/block-types-tab.js +3 -3
  389. package/build-module/components/inserter/block-types-tab.js.map +1 -1
  390. package/build-module/components/inserter/hooks/use-patterns-state.js +1 -6
  391. package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
  392. package/build-module/components/inserter/index.js +8 -6
  393. package/build-module/components/inserter/index.js.map +1 -1
  394. package/build-module/components/inserter/media-tab/hooks.js +145 -56
  395. package/build-module/components/inserter/media-tab/hooks.js.map +1 -1
  396. package/build-module/components/inserter/media-tab/media-list.js +74 -24
  397. package/build-module/components/inserter/media-tab/media-list.js.map +1 -1
  398. package/build-module/components/inserter/media-tab/media-panel.js +14 -14
  399. package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
  400. package/build-module/components/inserter/media-tab/media-tab.js +7 -4
  401. package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
  402. package/build-module/components/inserter/media-tab/utils.js +27 -15
  403. package/build-module/components/inserter/media-tab/utils.js.map +1 -1
  404. package/build-module/components/inserter/menu.js +12 -5
  405. package/build-module/components/inserter/menu.js.map +1 -1
  406. package/build-module/components/inserter/preview-panel.js +5 -3
  407. package/build-module/components/inserter/preview-panel.js.map +1 -1
  408. package/build-module/components/inserter/search-results.js +2 -6
  409. package/build-module/components/inserter/search-results.js.map +1 -1
  410. package/build-module/components/inserter-list-item/index.js +1 -9
  411. package/build-module/components/inserter-list-item/index.js.map +1 -1
  412. package/build-module/components/inspector-controls/fill.js +14 -2
  413. package/build-module/components/inspector-controls/fill.js.map +1 -1
  414. package/build-module/components/inspector-controls/fill.native.js +13 -1
  415. package/build-module/components/inspector-controls/fill.native.js.map +1 -1
  416. package/build-module/components/inspector-controls/groups.js +7 -1
  417. package/build-module/components/inspector-controls/groups.js.map +1 -1
  418. package/build-module/components/inspector-controls/index.js +2 -2
  419. package/build-module/components/inspector-controls/index.js.map +1 -1
  420. package/build-module/components/inspector-controls/slot.js +13 -1
  421. package/build-module/components/inspector-controls/slot.js.map +1 -1
  422. package/build-module/components/inspector-controls/slot.native.js +13 -1
  423. package/build-module/components/inspector-controls/slot.native.js.map +1 -1
  424. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js +1 -1
  425. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
  426. package/build-module/components/inspector-controls-tabs/index.js +2 -2
  427. package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
  428. package/build-module/components/inspector-controls-tabs/position-controls-panel.js +33 -0
  429. package/build-module/components/inspector-controls-tabs/position-controls-panel.js.map +1 -0
  430. package/build-module/components/inspector-controls-tabs/settings-tab.js +2 -1
  431. package/build-module/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  432. package/build-module/components/inspector-controls-tabs/styles-tab.js +6 -4
  433. package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  434. package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js +20 -22
  435. package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
  436. package/build-module/components/justify-content-control/ui.js +9 -2
  437. package/build-module/components/justify-content-control/ui.js.map +1 -1
  438. package/build-module/components/link-control/index.js +45 -16
  439. package/build-module/components/link-control/index.js.map +1 -1
  440. package/build-module/components/link-control/search-input.js +1 -0
  441. package/build-module/components/link-control/search-input.js.map +1 -1
  442. package/build-module/components/list-view/block.js +1 -1
  443. package/build-module/components/list-view/block.js.map +1 -1
  444. package/build-module/components/list-view/use-list-view-drop-zone.js +1 -1
  445. package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
  446. package/build-module/components/media-upload/index.native.js +4 -1
  447. package/build-module/components/media-upload/index.native.js.map +1 -1
  448. package/build-module/components/off-canvas-editor/appender.js +46 -36
  449. package/build-module/components/off-canvas-editor/appender.js.map +1 -1
  450. package/build-module/components/off-canvas-editor/block-contents.js +37 -7
  451. package/build-module/components/off-canvas-editor/block-contents.js.map +1 -1
  452. package/build-module/components/off-canvas-editor/block-select-button.js +9 -4
  453. package/build-module/components/off-canvas-editor/block-select-button.js.map +1 -1
  454. package/build-module/components/off-canvas-editor/block.js +15 -52
  455. package/build-module/components/off-canvas-editor/block.js.map +1 -1
  456. package/build-module/components/off-canvas-editor/branch.js +23 -11
  457. package/build-module/components/off-canvas-editor/branch.js.map +1 -1
  458. package/build-module/components/off-canvas-editor/index.js +15 -16
  459. package/build-module/components/off-canvas-editor/index.js.map +1 -1
  460. package/build-module/components/off-canvas-editor/link-ui.js +2 -2
  461. package/build-module/components/off-canvas-editor/link-ui.js.map +1 -1
  462. package/build-module/components/off-canvas-editor/use-list-view-drop-zone.js +1 -1
  463. package/build-module/components/off-canvas-editor/use-list-view-drop-zone.js.map +1 -1
  464. package/build-module/components/provider/index.js +17 -8
  465. package/build-module/components/provider/index.js.map +1 -1
  466. package/build-module/components/provider/index.native.js +4 -4
  467. package/build-module/components/provider/index.native.js.map +1 -1
  468. package/build-module/components/rich-text/use-before-input-rules.js +10 -2
  469. package/build-module/components/rich-text/use-before-input-rules.js.map +1 -1
  470. package/build-module/components/rich-text/use-enter.js +4 -5
  471. package/build-module/components/rich-text/use-enter.js.map +1 -1
  472. package/build-module/components/rich-text/utils.js +1 -1
  473. package/build-module/components/rich-text/utils.js.map +1 -1
  474. package/build-module/components/spacing-sizes-control/utils.js +2 -7
  475. package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
  476. package/build-module/components/tool-selector/index.js +3 -1
  477. package/build-module/components/tool-selector/index.js.map +1 -1
  478. package/build-module/components/url-input/button.js +1 -0
  479. package/build-module/components/url-input/button.js.map +1 -1
  480. package/build-module/components/url-input/index.js +14 -1
  481. package/build-module/components/url-input/index.js.map +1 -1
  482. package/build-module/components/url-popover/image-url-input-ui.js +8 -8
  483. package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
  484. package/build-module/components/url-popover/link-editor.js +1 -0
  485. package/build-module/components/url-popover/link-editor.js.map +1 -1
  486. package/build-module/components/use-block-display-information/index.js +1 -1
  487. package/build-module/components/use-block-display-information/index.js.map +1 -1
  488. package/build-module/components/use-paste-styles/index.js +174 -0
  489. package/build-module/components/use-paste-styles/index.js.map +1 -0
  490. package/build-module/components/writing-flow/use-arrow-nav.js +22 -29
  491. package/build-module/components/writing-flow/use-arrow-nav.js.map +1 -1
  492. package/build-module/experiments.js +25 -0
  493. package/build-module/experiments.js.map +1 -0
  494. package/build-module/experiments.native.js +23 -0
  495. package/build-module/experiments.native.js.map +1 -0
  496. package/build-module/hooks/anchor.js +2 -1
  497. package/build-module/hooks/anchor.js.map +1 -1
  498. package/build-module/hooks/border.js +1 -1
  499. package/build-module/hooks/border.js.map +1 -1
  500. package/build-module/hooks/child-layout.js +5 -1
  501. package/build-module/hooks/child-layout.js.map +1 -1
  502. package/build-module/hooks/color-panel.js +1 -1
  503. package/build-module/hooks/color-panel.js.map +1 -1
  504. package/build-module/hooks/color.js +3 -3
  505. package/build-module/hooks/color.js.map +1 -1
  506. package/build-module/hooks/custom-class-name.js +2 -1
  507. package/build-module/hooks/custom-class-name.js.map +1 -1
  508. package/build-module/hooks/dimensions.js +6 -5
  509. package/build-module/hooks/dimensions.js.map +1 -1
  510. package/build-module/hooks/index.js +1 -0
  511. package/build-module/hooks/index.js.map +1 -1
  512. package/build-module/hooks/margin.js +1 -0
  513. package/build-module/hooks/margin.js.map +1 -1
  514. package/build-module/hooks/metadata.js +1 -1
  515. package/build-module/hooks/metadata.js.map +1 -1
  516. package/build-module/hooks/padding.js +1 -0
  517. package/build-module/hooks/padding.js.map +1 -1
  518. package/build-module/hooks/position.js +354 -0
  519. package/build-module/hooks/position.js.map +1 -0
  520. package/build-module/hooks/supports.js +257 -0
  521. package/build-module/hooks/supports.js.map +1 -0
  522. package/build-module/hooks/typography.js +1 -1
  523. package/build-module/hooks/typography.js.map +1 -1
  524. package/build-module/hooks/use-color-props.js +3 -3
  525. package/build-module/hooks/use-color-props.js.map +1 -1
  526. package/build-module/hooks/utils.js +70 -4
  527. package/build-module/hooks/utils.js.map +1 -1
  528. package/build-module/index.js +1 -0
  529. package/build-module/index.js.map +1 -1
  530. package/build-module/layouts/constrained.js +3 -0
  531. package/build-module/layouts/constrained.js.map +1 -1
  532. package/build-module/layouts/flex.js +60 -10
  533. package/build-module/layouts/flex.js.map +1 -1
  534. package/build-module/layouts/flow.js +0 -18
  535. package/build-module/layouts/flow.js.map +1 -1
  536. package/build-module/store/actions.js +2 -26
  537. package/build-module/store/actions.js.map +1 -1
  538. package/build-module/store/defaults.js +5 -2
  539. package/build-module/store/defaults.js.map +1 -1
  540. package/build-module/store/index.js +8 -2
  541. package/build-module/store/index.js.map +1 -1
  542. package/build-module/store/private-actions.js +66 -0
  543. package/build-module/store/private-actions.js.map +1 -0
  544. package/build-module/store/private-selectors.js +11 -0
  545. package/build-module/store/private-selectors.js.map +1 -0
  546. package/build-module/store/reducer.js +7 -3
  547. package/build-module/store/reducer.js.map +1 -1
  548. package/build-module/store/selectors.js +55 -30
  549. package/build-module/store/selectors.js.map +1 -1
  550. package/build-module/utils/block-variation-transforms.js +1 -1
  551. package/build-module/utils/block-variation-transforms.js.map +1 -1
  552. package/build-module/utils/parse-css-unit-to-px.js +1 -1
  553. package/build-module/utils/parse-css-unit-to-px.js.map +1 -1
  554. package/build-module/utils/transform-styles/index.js +1 -6
  555. package/build-module/utils/transform-styles/index.js.map +1 -1
  556. package/build-style/content-rtl.css +340 -3
  557. package/build-style/content.css +340 -3
  558. package/build-style/style-rtl.css +125 -272
  559. package/build-style/style.css +125 -272
  560. package/package.json +30 -29
  561. package/src/components/alignment-control/test/__snapshots__/index.js.snap +3 -3
  562. package/src/components/alignment-control/test/index.js +5 -15
  563. package/src/components/alignment-control/ui.js +1 -1
  564. package/src/components/autocomplete/index.js +3 -6
  565. package/src/components/block-actions/index.js +5 -0
  566. package/src/components/block-alignment-control/test/index.js +3 -11
  567. package/src/components/block-alignment-matrix-control/index.js +1 -2
  568. package/src/components/block-card/index.js +1 -4
  569. package/src/components/block-content-overlay/content.scss +4 -4
  570. package/src/components/block-edit/index.js +15 -1
  571. package/src/components/block-icon/content.scss +31 -0
  572. package/src/components/block-inspector/index.js +15 -17
  573. package/src/components/block-list/use-in-between-inserter.js +5 -0
  574. package/src/components/block-lock/modal.js +0 -1
  575. package/src/components/block-mover/mover-description.js +2 -2
  576. package/src/components/block-mover/stories/index.js +3 -3
  577. package/src/components/block-navigation/dropdown.js +1 -1
  578. package/src/components/block-pattern-setup/index.js +1 -4
  579. package/src/components/block-pattern-setup/use-patterns-setup.js +2 -5
  580. package/src/components/block-patterns-list/index.js +29 -3
  581. package/src/components/block-preview/README.md +9 -9
  582. package/src/components/block-preview/auto.js +10 -14
  583. package/src/components/block-preview/content.scss +23 -0
  584. package/src/components/block-preview/index.js +40 -10
  585. package/src/components/block-preview/style.scss +0 -23
  586. package/src/components/block-selection-clearer/index.js +1 -1
  587. package/src/components/block-selection-clearer/test/index.js +6 -6
  588. package/src/components/block-settings/container.native.js +7 -26
  589. package/src/components/block-settings-menu/block-settings-dropdown.js +14 -2
  590. package/src/components/block-settings-menu-controls/index.js +2 -10
  591. package/src/components/block-styles/index.js +4 -1
  592. package/src/components/block-switcher/test/index.js +43 -44
  593. package/src/components/block-switcher/utils.js +1 -1
  594. package/src/components/block-tools/selected-block-popover.js +77 -80
  595. package/src/components/block-tools/style.scss +0 -1
  596. package/src/components/block-tools/use-block-toolbar-popover-props.js +68 -12
  597. package/src/components/block-variation-picker/{style.scss → content.scss} +0 -0
  598. package/src/components/block-vertical-alignment-control/icons.js +12 -0
  599. package/src/components/block-vertical-alignment-control/test/index.js +3 -11
  600. package/src/components/block-vertical-alignment-control/ui.js +16 -6
  601. package/src/components/button-block-appender/{style.scss → content.scss} +0 -0
  602. package/src/components/color-style-selector/index.js +1 -1
  603. package/src/components/colors/test/with-colors.js +2 -8
  604. package/src/components/date-format-picker/index.js +23 -24
  605. package/src/components/date-format-picker/style.scss +0 -6
  606. package/src/components/default-block-appender/content.scss +18 -0
  607. package/src/components/default-block-appender/test/index.js +2 -8
  608. package/src/components/default-style-picker/index.js +1 -0
  609. package/src/components/font-family/index.js +1 -6
  610. package/src/components/font-sizes/fluid-utils.js +1 -1
  611. package/src/components/font-sizes/utils.js +1 -1
  612. package/src/components/font-sizes/with-font-sizes.js +33 -33
  613. package/src/components/global-styles/README.md +77 -0
  614. package/src/components/global-styles/context.js +15 -0
  615. package/src/components/global-styles/hooks.js +145 -0
  616. package/src/components/global-styles/index.js +7 -0
  617. package/src/components/global-styles/test/typography-utils.js +393 -0
  618. package/src/components/global-styles/test/use-global-styles-output.js +814 -0
  619. package/src/components/global-styles/test/utils.js +206 -0
  620. package/src/components/global-styles/typography-utils.js +87 -0
  621. package/src/components/global-styles/use-global-styles-output.js +1088 -0
  622. package/src/components/global-styles/utils.js +373 -0
  623. package/src/components/height-control/README.md +55 -0
  624. package/src/components/height-control/index.js +13 -1
  625. package/src/components/iframe/index.js +52 -19
  626. package/src/components/iframe/use-compatibility-styles.js +6 -0
  627. package/src/components/image-editor/constants.js +1 -1
  628. package/src/components/image-editor/context.js +5 -9
  629. package/src/components/image-editor/cropper.js +3 -1
  630. package/src/components/image-editor/index.js +13 -4
  631. package/src/components/image-editor/use-transform-image.js +14 -55
  632. package/src/components/image-size-control/index.js +2 -6
  633. package/src/components/index.js +2 -6
  634. package/src/components/inner-blocks/index.js +29 -33
  635. package/src/components/inner-blocks/index.native.js +27 -47
  636. package/src/components/inner-blocks/use-block-context.js +47 -0
  637. package/src/components/inserter/block-patterns-explorer/explorer.js +0 -1
  638. package/src/components/inserter/block-patterns-tab.js +14 -4
  639. package/src/components/inserter/block-types-tab.js +3 -4
  640. package/src/components/inserter/hooks/use-patterns-state.js +1 -6
  641. package/src/components/inserter/index.js +46 -42
  642. package/src/components/inserter/media-tab/hooks.js +167 -65
  643. package/src/components/inserter/media-tab/media-list.js +94 -26
  644. package/src/components/inserter/media-tab/media-panel.js +9 -20
  645. package/src/components/inserter/media-tab/media-tab.js +12 -4
  646. package/src/components/inserter/media-tab/utils.js +20 -10
  647. package/src/components/inserter/menu.js +9 -4
  648. package/src/components/inserter/preview-panel.js +4 -2
  649. package/src/components/inserter/search-results.js +2 -6
  650. package/src/components/inserter/stories/index.js +9 -9
  651. package/src/components/inserter/style.scss +58 -11
  652. package/src/components/inserter/test/__snapshots__/index.native.js.snap +117 -0
  653. package/src/components/inserter/test/index.native.js +255 -1
  654. package/src/components/inserter-list-item/index.js +0 -7
  655. package/src/components/inspector-controls/README.md +3 -7
  656. package/src/components/inspector-controls/fill.js +15 -1
  657. package/src/components/inspector-controls/fill.native.js +14 -1
  658. package/src/components/inspector-controls/groups.js +5 -0
  659. package/src/components/inspector-controls/index.js +2 -6
  660. package/src/components/inspector-controls/slot.js +14 -1
  661. package/src/components/inspector-controls/slot.native.js +14 -1
  662. package/src/components/inspector-controls-tabs/advanced-controls-panel.js +1 -1
  663. package/src/components/inspector-controls-tabs/index.js +2 -4
  664. package/src/components/inspector-controls-tabs/position-controls-panel.js +37 -0
  665. package/src/components/inspector-controls-tabs/settings-tab.js +2 -0
  666. package/src/components/inspector-controls-tabs/style.scss +15 -0
  667. package/src/components/inspector-controls-tabs/styles-tab.js +5 -7
  668. package/src/components/inspector-controls-tabs/use-inspector-controls-tabs.js +24 -18
  669. package/src/components/justify-content-control/ui.js +9 -0
  670. package/src/components/link-control/index.js +59 -23
  671. package/src/components/link-control/search-input.js +1 -0
  672. package/src/components/link-control/style.scss +8 -24
  673. package/src/components/link-control/test/index.js +134 -5
  674. package/src/components/list-view/block.js +1 -1
  675. package/src/components/list-view/style.scss +13 -3
  676. package/src/components/list-view/use-list-view-drop-zone.js +1 -1
  677. package/src/components/media-replace-flow/test/index.js +4 -12
  678. package/src/components/media-upload/index.native.js +2 -2
  679. package/src/components/off-canvas-editor/README.md +2 -2
  680. package/src/components/off-canvas-editor/appender.js +82 -76
  681. package/src/components/off-canvas-editor/block-contents.js +84 -23
  682. package/src/components/off-canvas-editor/block-select-button.js +12 -1
  683. package/src/components/off-canvas-editor/block.js +31 -102
  684. package/src/components/off-canvas-editor/branch.js +32 -5
  685. package/src/components/off-canvas-editor/index.js +19 -24
  686. package/src/components/off-canvas-editor/link-ui.js +2 -2
  687. package/src/components/off-canvas-editor/style.scss +5 -1
  688. package/src/components/off-canvas-editor/use-list-view-drop-zone.js +1 -1
  689. package/src/components/provider/index.js +33 -11
  690. package/src/components/provider/index.native.js +4 -3
  691. package/src/components/provider/test/experimental-provider.js +94 -0
  692. package/src/components/provider/test/use-block-sync.js +10 -0
  693. package/src/components/responsive-block-control/test/index.js +1 -5
  694. package/src/components/rich-text/use-before-input-rules.js +10 -2
  695. package/src/components/rich-text/use-enter.js +4 -4
  696. package/src/components/rich-text/utils.js +1 -1
  697. package/src/components/spacing-sizes-control/utils.js +2 -7
  698. package/src/components/tool-selector/index.js +1 -1
  699. package/src/components/url-input/README.md +5 -0
  700. package/src/components/url-input/button.js +1 -0
  701. package/src/components/url-input/index.js +15 -1
  702. package/src/components/url-input/test/button.js +24 -24
  703. package/src/components/url-popover/image-url-input-ui.js +7 -8
  704. package/src/components/url-popover/link-editor.js +1 -0
  705. package/src/components/url-popover/style.scss +0 -10
  706. package/src/components/use-block-display-information/index.js +1 -1
  707. package/src/components/use-paste-styles/index.js +230 -0
  708. package/src/components/warning/{style.scss → content.scss} +0 -0
  709. package/src/components/warning/test/index.js +1 -5
  710. package/src/components/writing-flow/use-arrow-nav.js +20 -28
  711. package/src/content.scss +8 -0
  712. package/src/experiments.js +27 -0
  713. package/src/experiments.native.js +25 -0
  714. package/src/hooks/anchor.js +2 -1
  715. package/src/hooks/border.js +1 -1
  716. package/src/hooks/child-layout.js +6 -1
  717. package/src/hooks/color-panel.js +1 -1
  718. package/src/hooks/color.js +3 -3
  719. package/src/hooks/custom-class-name.js +2 -1
  720. package/src/hooks/dimensions.js +6 -6
  721. package/src/hooks/index.js +1 -0
  722. package/src/hooks/layout.scss +4 -0
  723. package/src/hooks/margin.js +1 -0
  724. package/src/hooks/metadata.js +1 -2
  725. package/src/hooks/padding.js +1 -0
  726. package/src/hooks/position.js +391 -0
  727. package/src/hooks/position.scss +18 -0
  728. package/src/hooks/supports.js +302 -0
  729. package/src/hooks/test/__snapshots__/align.native.js.snap +73 -0
  730. package/src/hooks/test/align.native.js +133 -0
  731. package/src/hooks/test/utils.js +104 -0
  732. package/src/hooks/typography.js +1 -1
  733. package/src/hooks/use-color-props.js +3 -3
  734. package/src/hooks/utils.js +68 -2
  735. package/src/index.js +1 -0
  736. package/src/layouts/constrained.js +3 -0
  737. package/src/layouts/flex.js +66 -14
  738. package/src/layouts/flow.js +0 -9
  739. package/src/store/actions.js +2 -26
  740. package/src/store/defaults.js +7 -2
  741. package/src/store/index.js +8 -2
  742. package/src/store/private-actions.js +65 -0
  743. package/src/store/private-selectors.js +10 -0
  744. package/src/store/reducer.js +8 -3
  745. package/src/store/selectors.js +108 -57
  746. package/src/store/test/actions.js +0 -18
  747. package/src/store/test/private-actions.js +22 -0
  748. package/src/store/test/private-selectors.js +24 -0
  749. package/src/store/test/reducer.js +45 -3
  750. package/src/store/test/selectors.js +64 -39
  751. package/src/style.scss +5 -6
  752. package/src/utils/block-variation-transforms.js +1 -1
  753. package/src/utils/parse-css-unit-to-px.js +3 -1
  754. package/src/utils/test/parse-css-unit-to-px.js +16 -24
  755. package/src/utils/transform-styles/index.js +1 -6
  756. package/build/components/inner-blocks/get-block-context.js +0 -45
  757. package/build/components/inner-blocks/get-block-context.js.map +0 -1
  758. package/build/components/off-canvas-editor/block-edit-button.js +0 -50
  759. package/build/components/off-canvas-editor/block-edit-button.js.map +0 -1
  760. package/build-module/components/inner-blocks/get-block-context.js +0 -37
  761. package/build-module/components/inner-blocks/get-block-context.js.map +0 -1
  762. package/build-module/components/off-canvas-editor/block-edit-button.js +0 -35
  763. package/build-module/components/off-canvas-editor/block-edit-button.js.map +0 -1
  764. package/src/components/inner-blocks/get-block-context.js +0 -39
  765. package/src/components/off-canvas-editor/block-edit-button.js +0 -27
@@ -1,8 +1,3 @@
1
- /**
2
- * External dependencies
3
- */
4
- import { isEmpty } from 'lodash';
5
-
6
1
  /**
7
2
  * WordPress dependencies
8
3
  */
@@ -75,7 +70,7 @@ export function getPresetValueFromCustomValue( value, spacingSizes ) {
75
70
  *
76
71
  * @param {string} value Value to convert.
77
72
  *
78
- * @return {string} CSS var string for given spacing preset value.
73
+ * @return {string | undefined} CSS var string for given spacing preset value.
79
74
  */
80
75
  export function getSpacingPresetCssVar( value ) {
81
76
  if ( ! value ) {
@@ -211,5 +206,5 @@ export function isValuesDefined( values ) {
211
206
  if ( values === undefined || values === null ) {
212
207
  return false;
213
208
  }
214
- return ! isEmpty( Object.values( values ).filter( ( value ) => !! value ) );
209
+ return Object.values( values ).filter( ( value ) => !! value ).length > 0;
215
210
  }
@@ -51,7 +51,7 @@ function ToolSelector( props, ref ) {
51
51
  label={ __( 'Tools' ) }
52
52
  />
53
53
  ) }
54
- position="bottom right"
54
+ popoverProps={ { placement: 'bottom-start' } }
55
55
  renderContent={ () => (
56
56
  <>
57
57
  <NavigableMenu role="menu" aria-label={ __( 'Tools' ) }>
@@ -160,6 +160,10 @@ When hiding the URLInput using CSS (as is sometimes done for accessibility purpo
160
160
 
161
161
  This prop allows the suggestions list to be programmatically not rendered by passing a boolean—it can be `true` to make sure suggestions aren't rendered, or `false`/`undefined` to fall back to the default behaviour of showing suggestions when matching autocompletion items are found.
162
162
 
163
+ ### `__nextHasNoMarginBottom: Boolean`
164
+
165
+ Start opting into the new margin-free styles that will become the default in a future version, currently scheduled to be WordPress 6.4. (The prop can be safely removed once this happens.)
166
+
163
167
  ## Example
164
168
 
165
169
  {% codetabs %}
@@ -217,6 +221,7 @@ registerBlockType( /* ... */, {
217
221
  edit( { className, attributes, setAttributes } ) {
218
222
  return (
219
223
  <URLInput
224
+ __nextHasNoMarginBottom
220
225
  className={ className }
221
226
  value={ attributes.url }
222
227
  onChange={ ( url, post ) => setAttributes( { url, text: (post && post.title) || 'Click here' } ) }
@@ -57,6 +57,7 @@ class URLInputButton extends Component {
57
57
  onClick={ this.toggle }
58
58
  />
59
59
  <URLInput
60
+ __nextHasNoMarginBottom
60
61
  value={ url || '' }
61
62
  onChange={ onChange }
62
63
  />
@@ -7,6 +7,7 @@ import scrollIntoView from 'dom-scroll-into-view';
7
7
  /**
8
8
  * WordPress dependencies
9
9
  */
10
+ import deprecated from '@wordpress/deprecated';
10
11
  import { __, sprintf, _n } from '@wordpress/i18n';
11
12
  import { Component, createRef } from '@wordpress/element';
12
13
  import { UP, DOWN, ENTER, TAB } from '@wordpress/keycodes';
@@ -424,6 +425,8 @@ class URLInput extends Component {
424
425
 
425
426
  renderControl() {
426
427
  const {
428
+ /** Start opting into the new margin-free styles that will become the default in a future version. */
429
+ __nextHasNoMarginBottom = false,
427
430
  label = null,
428
431
  className,
429
432
  isFullWidth,
@@ -477,8 +480,19 @@ class URLInput extends Component {
477
480
  return renderControl( controlProps, inputProps, loading );
478
481
  }
479
482
 
483
+ if ( ! __nextHasNoMarginBottom ) {
484
+ deprecated( 'Bottom margin styles for wp.blockEditor.URLInput', {
485
+ since: '6.2',
486
+ version: '6.5',
487
+ hint: 'Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version',
488
+ } );
489
+ }
490
+
480
491
  return (
481
- <BaseControl { ...controlProps }>
492
+ <BaseControl
493
+ __nextHasNoMarginBottom={ __nextHasNoMarginBottom }
494
+ { ...controlProps }
495
+ >
482
496
  <input { ...inputProps } />
483
497
  { loading && <Spinner /> }
484
498
  </BaseControl>
@@ -4,13 +4,16 @@
4
4
  import { render, screen } from '@testing-library/react';
5
5
  import userEvent from '@testing-library/user-event';
6
6
 
7
+ /**
8
+ * WordPress dependencies
9
+ */
10
+ import { useState } from '@wordpress/element';
11
+
7
12
  /**
8
13
  * Internal dependencies
9
14
  */
10
15
  import URLInputButton from '../button';
11
16
 
12
- jest.useFakeTimers();
13
-
14
17
  describe( 'URLInputButton', () => {
15
18
  it( 'should render a `Insert link` button and not be pressed when `url` is not provided', () => {
16
19
  render( <URLInputButton /> );
@@ -57,9 +60,7 @@ describe( 'URLInputButton', () => {
57
60
  } );
58
61
 
59
62
  it( 'should render a form when `Insert link` button is clicked', async () => {
60
- const user = userEvent.setup( {
61
- advanceTimers: jest.advanceTimersByTime,
62
- } );
63
+ const user = userEvent.setup();
63
64
  render( <URLInputButton /> );
64
65
 
65
66
  // Click the button to insert a link.
@@ -76,9 +77,7 @@ describe( 'URLInputButton', () => {
76
77
  } );
77
78
 
78
79
  it( 'should call `onChange` function once per each value change', async () => {
79
- const user = userEvent.setup( {
80
- advanceTimers: jest.advanceTimersByTime,
81
- } );
80
+ const user = userEvent.setup();
82
81
  const onChangeMock = jest.fn();
83
82
 
84
83
  render( <URLInputButton onChange={ onChangeMock } /> );
@@ -104,9 +103,7 @@ describe( 'URLInputButton', () => {
104
103
  } );
105
104
 
106
105
  it( 'should close the form when the user clicks the `Close` button', async () => {
107
- const user = userEvent.setup( {
108
- advanceTimers: jest.advanceTimersByTime,
109
- } );
106
+ const user = userEvent.setup();
110
107
 
111
108
  render( <URLInputButton /> );
112
109
 
@@ -135,12 +132,15 @@ describe( 'URLInputButton', () => {
135
132
  } );
136
133
 
137
134
  it( 'should close the form when user submits it', async () => {
138
- const user = userEvent.setup( {
139
- advanceTimers: jest.advanceTimersByTime,
140
- } );
141
- const onChangeMock = jest.fn();
135
+ const user = userEvent.setup();
142
136
 
143
- render( <URLInputButton onChange={ onChangeMock } /> );
137
+ function TestURLInputButton() {
138
+ // maintain state for the controlled component and process value changes
139
+ const [ url, setUrl ] = useState( '' );
140
+ return <URLInputButton url={ url } onChange={ setUrl } />;
141
+ }
142
+
143
+ render( <TestURLInputButton /> );
144
144
 
145
145
  // Click the button to insert a link.
146
146
  await user.click(
@@ -153,15 +153,15 @@ describe( 'URLInputButton', () => {
153
153
  // Type something into the URL field.
154
154
  await user.type( screen.getByRole( 'combobox' ), 'foo' );
155
155
 
156
+ const submitButton = screen.getByRole( 'button', {
157
+ name: 'Submit',
158
+ } );
159
+
160
+ expect( submitButton ).toBeInTheDocument();
161
+
156
162
  // Submit the form.
157
- await user.click(
158
- screen.getByRole( 'button', {
159
- name: 'Submit',
160
- } )
161
- );
163
+ await user.click( submitButton );
162
164
 
163
- expect(
164
- screen.queryByRole( 'button', { name: 'Submit' } )
165
- ).not.toBeInTheDocument();
165
+ expect( submitButton ).not.toBeInTheDocument();
166
166
  } );
167
167
  } );
@@ -1,8 +1,3 @@
1
- /**
2
- * External dependencies
3
- */
4
- import { map } from 'lodash';
5
-
6
1
  /**
7
2
  * WordPress dependencies
8
3
  */
@@ -17,6 +12,7 @@ import {
17
12
  TextControl,
18
13
  SVG,
19
14
  Path,
15
+ __experimentalVStack as VStack,
20
16
  } from '@wordpress/components';
21
17
  import { link as linkIcon, close } from '@wordpress/icons';
22
18
 
@@ -214,23 +210,26 @@ const ImageURLInputUI = ( {
214
210
  };
215
211
 
216
212
  const advancedOptions = (
217
- <>
213
+ <VStack spacing="3">
218
214
  <ToggleControl
215
+ __nextHasNoMarginBottom
219
216
  label={ __( 'Open in new tab' ) }
220
217
  onChange={ onSetNewTab }
221
218
  checked={ linkTarget === '_blank' }
222
219
  />
223
220
  <TextControl
221
+ __nextHasNoMarginBottom
224
222
  label={ __( 'Link rel' ) }
225
223
  value={ rel ?? '' }
226
224
  onChange={ onSetLinkRel }
227
225
  />
228
226
  <TextControl
227
+ __nextHasNoMarginBottom
229
228
  label={ __( 'Link CSS Class' ) }
230
229
  value={ linkClass || '' }
231
230
  onChange={ onSetLinkClass }
232
231
  />
233
- </>
232
+ </VStack>
234
233
  );
235
234
 
236
235
  const linkEditorValue = urlInput !== null ? urlInput : url;
@@ -260,7 +259,7 @@ const ImageURLInputUI = ( {
260
259
  additionalControls={
261
260
  ! linkEditorValue && (
262
261
  <NavigableMenu>
263
- { map( getLinkDestinations(), ( link ) => (
262
+ { getLinkDestinations().map( ( link ) => (
264
263
  <MenuItem
265
264
  key={ link.linkDestination }
266
265
  icon={ link.icon }
@@ -31,6 +31,7 @@ export default function LinkEditor( {
31
31
  { ...props }
32
32
  >
33
33
  <URLInput
34
+ __nextHasNoMarginBottom
34
35
  value={ value }
35
36
  onChange={ onChangeInputValue }
36
37
  autocompleteRef={ autocompleteRef }
@@ -52,12 +52,6 @@
52
52
  transform: rotate(180deg);
53
53
  }
54
54
  }
55
- .block-editor-url-popover__input-container {
56
- .components-base-control:last-child,
57
- .components-base-control:last-child .components-base-control__field {
58
- margin-bottom: 0;
59
- }
60
- }
61
55
 
62
56
  .block-editor-url-popover__settings {
63
57
  display: block;
@@ -68,10 +62,6 @@
68
62
  .block-editor-url-popover__link-editor,
69
63
  .block-editor-url-popover__link-viewer {
70
64
  display: flex;
71
-
72
- .block-editor-url-input .components-base-control__field {
73
- margin-bottom: 0;
74
- }
75
65
  }
76
66
 
77
67
  .block-editor-url-popover__link-viewer-url {
@@ -34,7 +34,7 @@ import { store as blockEditorStore } from '../../store';
34
34
  * 1. Block's client id to extract it's current attributes.
35
35
  * 2. A block variation should have set `isActive` prop to a proper function.
36
36
  *
37
- * If for any reason a block variaton match cannot be found,
37
+ * If for any reason a block variation match cannot be found,
38
38
  * the returned information come from the Block Type.
39
39
  * If no blockType is found with the provided clientId, returns null.
40
40
  *
@@ -0,0 +1,230 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { useCallback } from '@wordpress/element';
5
+ import { getBlockType, parse } from '@wordpress/blocks';
6
+ import { useDispatch, useRegistry } from '@wordpress/data';
7
+ import { store as noticesStore } from '@wordpress/notices';
8
+ import { __, sprintf } from '@wordpress/i18n';
9
+
10
+ /**
11
+ * Internal dependencies
12
+ */
13
+ import { store as blockEditorStore } from '../../store';
14
+ import {
15
+ hasAlignSupport,
16
+ hasBorderSupport,
17
+ hasBackgroundColorSupport,
18
+ hasTextColorSupport,
19
+ hasGradientSupport,
20
+ hasCustomClassNameSupport,
21
+ hasFontFamilySupport,
22
+ hasFontSizeSupport,
23
+ hasLayoutSupport,
24
+ hasStyleSupport,
25
+ } from '../../hooks/supports';
26
+
27
+ /**
28
+ * Determine if the copied text looks like serialized blocks or not.
29
+ * Since plain text will always get parsed into a freeform block,
30
+ * we check that if the parsed blocks is anything other than that.
31
+ *
32
+ * @param {string} text The copied text.
33
+ * @return {boolean} True if the text looks like serialized blocks, false otherwise.
34
+ */
35
+ function hasSerializedBlocks( text ) {
36
+ try {
37
+ const blocks = parse( text, {
38
+ __unstableSkipMigrationLogs: true,
39
+ __unstableSkipAutop: true,
40
+ } );
41
+ if ( blocks.length === 1 && blocks[ 0 ].name === 'core/freeform' ) {
42
+ // It's likely that the text is just plain text and not serialized blocks.
43
+ return false;
44
+ }
45
+ return true;
46
+ } catch ( err ) {
47
+ // Parsing error, the text is not serialized blocks.
48
+ // (Even though that it technically won't happen)
49
+ return false;
50
+ }
51
+ }
52
+
53
+ /**
54
+ * Style attributes are attributes being added in `block-editor/src/hooks/*`.
55
+ * (Except for some unrelated to style like `anchor` or `settings`.)
56
+ * They generally represent the default block supports.
57
+ */
58
+ const STYLE_ATTRIBUTES = {
59
+ align: hasAlignSupport,
60
+ borderColor: ( nameOrType ) => hasBorderSupport( nameOrType, 'color' ),
61
+ backgroundColor: hasBackgroundColorSupport,
62
+ textColor: hasTextColorSupport,
63
+ gradient: hasGradientSupport,
64
+ className: hasCustomClassNameSupport,
65
+ fontFamily: hasFontFamilySupport,
66
+ fontSize: hasFontSizeSupport,
67
+ layout: hasLayoutSupport,
68
+ style: hasStyleSupport,
69
+ };
70
+
71
+ /**
72
+ * Get the "style attributes" from a given block to a target block.
73
+ *
74
+ * @param {WPBlock} sourceBlock The source block.
75
+ * @param {WPBlock} targetBlock The target block.
76
+ * @return {Object} the filtered attributes object.
77
+ */
78
+ function getStyleAttributes( sourceBlock, targetBlock ) {
79
+ return Object.entries( STYLE_ATTRIBUTES ).reduce(
80
+ ( attributes, [ attributeKey, hasSupport ] ) => {
81
+ // Only apply the attribute if both blocks support it.
82
+ if (
83
+ hasSupport( sourceBlock.name ) &&
84
+ hasSupport( targetBlock.name )
85
+ ) {
86
+ // Override attributes that are not present in the block to their defaults.
87
+ attributes[ attributeKey ] =
88
+ sourceBlock.attributes[ attributeKey ];
89
+ }
90
+ return attributes;
91
+ },
92
+ {}
93
+ );
94
+ }
95
+
96
+ /**
97
+ * Update the target blocks with style attributes recursively.
98
+ *
99
+ * @param {WPBlock[]} targetBlocks The target blocks to be updated.
100
+ * @param {WPBlock[]} sourceBlocks The source blocks to get th style attributes from.
101
+ * @param {Function} updateBlockAttributes The function to update the attributes.
102
+ */
103
+ function recursivelyUpdateBlockAttributes(
104
+ targetBlocks,
105
+ sourceBlocks,
106
+ updateBlockAttributes
107
+ ) {
108
+ for (
109
+ let index = 0;
110
+ index < Math.min( sourceBlocks.length, targetBlocks.length );
111
+ index += 1
112
+ ) {
113
+ updateBlockAttributes(
114
+ targetBlocks[ index ].clientId,
115
+ getStyleAttributes( sourceBlocks[ index ], targetBlocks[ index ] )
116
+ );
117
+
118
+ recursivelyUpdateBlockAttributes(
119
+ targetBlocks[ index ].innerBlocks,
120
+ sourceBlocks[ index ].innerBlocks,
121
+ updateBlockAttributes
122
+ );
123
+ }
124
+ }
125
+
126
+ /**
127
+ * A hook to return a pasteStyles event function for handling pasting styles to blocks.
128
+ *
129
+ * @return {Function} A function to update the styles to the blocks.
130
+ */
131
+ export default function usePasteStyles() {
132
+ const registry = useRegistry();
133
+ const { updateBlockAttributes } = useDispatch( blockEditorStore );
134
+ const { createSuccessNotice, createWarningNotice, createErrorNotice } =
135
+ useDispatch( noticesStore );
136
+
137
+ return useCallback(
138
+ async ( targetBlocks ) => {
139
+ let html = '';
140
+ try {
141
+ // `http:` sites won't have the clipboard property on navigator.
142
+ // (with the exception of localhost.)
143
+ if ( ! window.navigator.clipboard ) {
144
+ createErrorNotice(
145
+ __(
146
+ 'Unable to paste styles. This feature is only available on secure (https) sites in supporting browsers.'
147
+ ),
148
+ { type: 'snackbar' }
149
+ );
150
+ return;
151
+ }
152
+
153
+ html = await window.navigator.clipboard.readText();
154
+ } catch ( error ) {
155
+ // Possibly the permission is denied.
156
+ createErrorNotice(
157
+ __(
158
+ 'Unable to paste styles. Please allow browser clipboard permissions before continuing.'
159
+ ),
160
+ {
161
+ type: 'snackbar',
162
+ }
163
+ );
164
+ return;
165
+ }
166
+
167
+ // Abort if the copied text is empty or doesn't look like serialized blocks.
168
+ if ( ! html || ! hasSerializedBlocks( html ) ) {
169
+ createWarningNotice(
170
+ __(
171
+ "Unable to paste styles. Block styles couldn't be found within the copied content."
172
+ ),
173
+ {
174
+ type: 'snackbar',
175
+ }
176
+ );
177
+ return;
178
+ }
179
+
180
+ const copiedBlocks = parse( html );
181
+
182
+ if ( copiedBlocks.length === 1 ) {
183
+ // Apply styles of the block to all the target blocks.
184
+ registry.batch( () => {
185
+ recursivelyUpdateBlockAttributes(
186
+ targetBlocks,
187
+ targetBlocks.map( () => copiedBlocks[ 0 ] ),
188
+ updateBlockAttributes
189
+ );
190
+ } );
191
+ } else {
192
+ registry.batch( () => {
193
+ recursivelyUpdateBlockAttributes(
194
+ targetBlocks,
195
+ copiedBlocks,
196
+ updateBlockAttributes
197
+ );
198
+ } );
199
+ }
200
+
201
+ if ( targetBlocks.length === 1 ) {
202
+ const title = getBlockType( targetBlocks[ 0 ].name )?.title;
203
+ createSuccessNotice(
204
+ sprintf(
205
+ // Translators: Name of the block being pasted, e.g. "Paragraph".
206
+ __( 'Pasted styles to %s.' ),
207
+ title
208
+ ),
209
+ { type: 'snackbar' }
210
+ );
211
+ } else {
212
+ createSuccessNotice(
213
+ sprintf(
214
+ // Translators: The number of the blocks.
215
+ __( 'Pasted styles to %d blocks.' ),
216
+ targetBlocks.length
217
+ ),
218
+ { type: 'snackbar' }
219
+ );
220
+ }
221
+ },
222
+ [
223
+ registry.batch,
224
+ updateBlockAttributes,
225
+ createSuccessNotice,
226
+ createWarningNotice,
227
+ createErrorNotice,
228
+ ]
229
+ );
230
+ }
@@ -9,8 +9,6 @@ import userEvent from '@testing-library/user-event';
9
9
  */
10
10
  import Warning from '../index';
11
11
 
12
- jest.useFakeTimers();
13
-
14
12
  describe( 'Warning', () => {
15
13
  it( 'should match snapshot', () => {
16
14
  const { container } = render( <Warning>error</Warning> );
@@ -33,9 +31,7 @@ describe( 'Warning', () => {
33
31
  } );
34
32
 
35
33
  it( 'should show hidden secondary actions', async () => {
36
- const user = userEvent.setup( {
37
- advanceTimers: jest.advanceTimersByTime,
38
- } );
34
+ const user = userEvent.setup();
39
35
 
40
36
  render(
41
37
  <Warning secondaryActions={ [ { title: 'test', onClick: null } ] }>
@@ -167,6 +167,12 @@ export default function useArrowNav() {
167
167
  }
168
168
 
169
169
  function onKeyDown( event ) {
170
+ // Abort if navigation has already been handled (e.g. RichText
171
+ // inline boundaries).
172
+ if ( event.defaultPrevented ) {
173
+ return;
174
+ }
175
+
170
176
  const { keyCode, target, shiftKey, ctrlKey, altKey, metaKey } =
171
177
  event;
172
178
  const isUp = keyCode === UP;
@@ -182,24 +188,20 @@ export default function useArrowNav() {
182
188
  const { ownerDocument } = node;
183
189
  const { defaultView } = ownerDocument;
184
190
 
191
+ if ( ! isNav ) {
192
+ return;
193
+ }
194
+
185
195
  // If there is a multi-selection, the arrow keys should collapse the
186
196
  // selection to the start or end of the selection.
187
197
  if ( hasMultiSelection() ) {
188
- // Only handle if we have a full selection (not a native partial
189
- // selection).
190
- if ( ! __unstableIsFullySelected() ) {
191
- return;
192
- }
193
-
194
- if ( event.defaultPrevented ) {
195
- return;
196
- }
197
-
198
- if ( ! isNav ) {
198
+ if ( shiftKey ) {
199
199
  return;
200
200
  }
201
201
 
202
- if ( shiftKey ) {
202
+ // Only handle if we have a full selection (not a native partial
203
+ // selection).
204
+ if ( ! __unstableIsFullySelected() ) {
203
205
  return;
204
206
  }
205
207
 
@@ -214,6 +216,12 @@ export default function useArrowNav() {
214
216
  return;
215
217
  }
216
218
 
219
+ // Abort if our current target is not a candidate for navigation
220
+ // (e.g. preserve native input behaviors).
221
+ if ( ! isNavigationCandidate( target, keyCode, hasModifier ) ) {
222
+ return;
223
+ }
224
+
217
225
  // When presing any key other than up or down, the initial vertical
218
226
  // position must ALWAYS be reset. The vertical position is saved so
219
227
  // it can be restored as well as possible on sebsequent vertical
@@ -227,22 +235,6 @@ export default function useArrowNav() {
227
235
  verticalRect = computeCaretRect( defaultView );
228
236
  }
229
237
 
230
- // Abort if navigation has already been handled (e.g. RichText
231
- // inline boundaries).
232
- if ( event.defaultPrevented ) {
233
- return;
234
- }
235
-
236
- if ( ! isNav ) {
237
- return;
238
- }
239
-
240
- // Abort if our current target is not a candidate for navigation
241
- // (e.g. preserve native input behaviors).
242
- if ( ! isNavigationCandidate( target, keyCode, hasModifier ) ) {
243
- return;
244
- }
245
-
246
238
  // In the case of RTL scripts, right means previous and left means
247
239
  // next, which is the exact reverse of LTR.
248
240
  const isReverseDir = isRTL( target ) ? ! isReverse : isReverse;
package/src/content.scss CHANGED
@@ -1,10 +1,18 @@
1
+ @import "./components/block-icon/content.scss";
1
2
  @import "./components/block-list/content.scss";
2
3
  @import "./components/block-list-appender/content.scss";
3
4
  @import "./components/block-content-overlay/content.scss";
4
5
  @import "./components/block-draggable/content.scss";
5
6
  @import "./components/block-preview/content.scss";
7
+ @import "./components/block-variation-picker/content.scss";
8
+ @import "./components/button-block-appender/content.scss";
6
9
  @import "./components/default-block-appender/content.scss";
7
10
  @import "./components/inner-blocks/content.scss";
8
11
  @import "./components/media-placeholder/content.scss";
9
12
  @import "./components/plain-text/content.scss";
10
13
  @import "./components/rich-text/content.scss";
14
+ @import "./components/warning/content.scss";
15
+
16
+ // To do: ideally the iframe does not contain UI, but there's still the block
17
+ // placeholders that will be moved to shadow DOM in the future.
18
+ @include wordpress-admin-schemes();
@@ -0,0 +1,27 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/experiments';
5
+
6
+ /**
7
+ * Internal dependencies
8
+ */
9
+ import * as globalStyles from './components/global-styles';
10
+ import { ExperimentalBlockEditorProvider } from './components/provider';
11
+ import OffCanvasEditor from './components/off-canvas-editor';
12
+
13
+ export const { lock, unlock } =
14
+ __dangerousOptInToUnstableAPIsOnlyForCoreModules(
15
+ 'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.',
16
+ '@wordpress/block-editor'
17
+ );
18
+
19
+ /**
20
+ * Experimental @wordpress/block-editor APIs.
21
+ */
22
+ export const experiments = {};
23
+ lock( experiments, {
24
+ ...globalStyles,
25
+ ExperimentalBlockEditorProvider,
26
+ OffCanvasEditor,
27
+ } );