@wordpress/block-editor 16.1.0 → 17.0.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 (2026) hide show
  1. package/CHANGELOG.md +78 -0
  2. package/README.md +13 -1
  3. package/build/autocompleters/block.cjs.map +2 -2
  4. package/build/components/alignment-control/index.cjs.map +2 -2
  5. package/build/components/alignment-control/ui.cjs.map +2 -2
  6. package/build/components/autocomplete/index.cjs.map +2 -2
  7. package/build/components/background-image-control/index.cjs.map +2 -2
  8. package/build/components/block-actions/index.cjs +2 -1
  9. package/build/components/block-actions/index.cjs.map +2 -2
  10. package/build/components/block-alignment-control/constants.cjs.map +2 -2
  11. package/build/components/block-alignment-control/index.cjs.map +2 -2
  12. package/build/components/block-alignment-control/ui.cjs.map +2 -2
  13. package/build/components/block-alignment-control/use-available-alignments.cjs.map +2 -2
  14. package/build/components/block-alignment-matrix-control/index.cjs.map +2 -2
  15. package/build/components/block-allowed-blocks/allowed-blocks-control.cjs.map +2 -2
  16. package/build/components/block-allowed-blocks/modal.cjs.map +2 -2
  17. package/build/components/block-bindings/attribute-control.cjs.map +2 -2
  18. package/build/components/block-bindings/index.cjs.map +2 -2
  19. package/build/components/block-bindings/source-fields-list.cjs.map +2 -2
  20. package/build/components/block-bindings/use-block-bindings-utils.cjs.map +2 -2
  21. package/build/components/block-breadcrumb/index.cjs.map +2 -2
  22. package/build/components/block-canvas/index.cjs.map +2 -2
  23. package/build/components/block-card/index.cjs.map +2 -2
  24. package/build/components/block-compare/block-view.cjs.map +2 -2
  25. package/build/components/block-compare/index.cjs.map +2 -2
  26. package/build/components/block-content-overlay/index.cjs.map +2 -2
  27. package/build/components/block-context/index.cjs.map +2 -2
  28. package/build/components/block-controls/fill.cjs.map +2 -2
  29. package/build/components/block-controls/groups.cjs.map +2 -2
  30. package/build/components/block-controls/hook.cjs.map +2 -2
  31. package/build/components/block-controls/index.cjs.map +2 -2
  32. package/build/components/block-controls/slot.cjs.map +2 -2
  33. package/build/components/block-draggable/draggable-chip.cjs.map +2 -2
  34. package/build/components/block-draggable/index.cjs.map +2 -2
  35. package/build/components/block-draggable/use-scroll-when-dragging.cjs.map +2 -2
  36. package/build/components/block-edit/context.cjs.map +2 -2
  37. package/build/components/block-edit/edit.cjs.map +2 -2
  38. package/build/components/block-edit/index.cjs.map +2 -2
  39. package/build/components/block-edit/multiple-usage-warning.cjs.map +2 -2
  40. package/build/components/block-edit-visually-button/index.cjs.map +2 -2
  41. package/build/components/block-editing-mode/index.cjs.map +2 -2
  42. package/build/components/block-full-height-alignment-control/index.cjs.map +2 -2
  43. package/build/components/block-heading-level-dropdown/heading-level-icon.cjs.map +2 -2
  44. package/build/components/block-heading-level-dropdown/index.cjs.map +2 -2
  45. package/build/components/block-icon/index.cjs.map +2 -2
  46. package/build/components/block-inspector/edit-contents.cjs +48 -40
  47. package/build/components/block-inspector/edit-contents.cjs.map +3 -3
  48. package/build/components/block-inspector/index.cjs +18 -10
  49. package/build/components/block-inspector/index.cjs.map +2 -2
  50. package/build/components/block-inspector/inspector-pre-tabs-slot-fill.cjs.map +2 -2
  51. package/build/components/block-inspector/useBlockInspectorAnimationSettings.cjs.map +2 -2
  52. package/build/components/block-keyboard-shortcuts/index.cjs +201 -0
  53. package/build/components/block-keyboard-shortcuts/index.cjs.map +7 -0
  54. package/build/components/block-list/block-crash-boundary.cjs.map +2 -2
  55. package/build/components/block-list/block-crash-warning.cjs.map +2 -2
  56. package/build/components/block-list/block-html.cjs.map +2 -2
  57. package/build/components/block-list/block-invalid-warning.cjs.map +2 -2
  58. package/build/components/block-list/block.cjs +46 -13
  59. package/build/components/block-list/block.cjs.map +3 -3
  60. package/build/components/block-list/index.cjs +39 -10
  61. package/build/components/block-list/index.cjs.map +2 -2
  62. package/build/components/block-list/layout.cjs.map +2 -2
  63. package/build/components/block-list/private-block-context.cjs.map +2 -2
  64. package/build/components/block-list/subdirectory-icon.cjs.map +2 -2
  65. package/build/components/block-list/use-block-props/index.cjs +36 -2
  66. package/build/components/block-list/use-block-props/index.cjs.map +3 -3
  67. package/build/components/block-list/use-block-props/use-block-refs.cjs.map +2 -2
  68. package/build/components/block-list/use-block-props/use-firefox-draggable-compatibility.cjs.map +2 -2
  69. package/build/components/block-list/use-block-props/use-focus-first-element.cjs +4 -0
  70. package/build/components/block-list/use-block-props/use-focus-first-element.cjs.map +2 -2
  71. package/build/components/block-list/use-block-props/use-focus-handler.cjs.map +2 -2
  72. package/build/components/block-list/use-block-props/use-intersection-observer.cjs.map +2 -2
  73. package/build/components/block-list/use-block-props/use-is-hovered.cjs.map +2 -2
  74. package/build/components/block-list/use-block-props/use-register-block-event-handlers.cjs.map +2 -2
  75. package/build/components/block-list/use-block-props/use-scroll-into-view.cjs.map +2 -2
  76. package/build/components/block-list/use-block-props/use-selected-block-event-handlers.cjs +6 -7
  77. package/build/components/block-list/use-block-props/use-selected-block-event-handlers.cjs.map +2 -2
  78. package/build/components/block-list/use-in-between-inserter.cjs.map +2 -2
  79. package/build/components/block-list/zoom-out-separator.cjs.map +2 -2
  80. package/build/components/block-list-appender/index.cjs.map +2 -2
  81. package/build/components/block-lock/menu-item.cjs.map +2 -2
  82. package/build/components/block-lock/modal.cjs.map +2 -2
  83. package/build/components/block-lock/toolbar.cjs.map +2 -2
  84. package/build/components/block-lock/use-block-lock.cjs.map +2 -2
  85. package/build/components/block-manager/category.cjs.map +2 -2
  86. package/build/components/block-manager/checklist.cjs.map +2 -2
  87. package/build/components/block-manager/index.cjs.map +2 -2
  88. package/build/components/block-mover/button.cjs +15 -9
  89. package/build/components/block-mover/button.cjs.map +2 -2
  90. package/build/components/block-mover/index.cjs.map +2 -2
  91. package/build/components/block-mover/mover-description.cjs.map +2 -2
  92. package/build/components/block-navigation/dropdown.cjs.map +2 -2
  93. package/build/components/block-parent-selector/index.cjs +98 -29
  94. package/build/components/block-parent-selector/index.cjs.map +3 -3
  95. package/build/components/block-pattern-setup/index.cjs.map +2 -2
  96. package/build/components/block-pattern-setup/setup-toolbar.cjs.map +2 -2
  97. package/build/components/block-pattern-setup/use-patterns-setup.cjs.map +2 -2
  98. package/build/components/block-patterns-list/index.cjs.map +2 -2
  99. package/build/components/block-patterns-paging/index.cjs.map +2 -2
  100. package/build/components/block-popover/cover.cjs.map +2 -2
  101. package/build/components/block-popover/drop-zone.cjs.map +2 -2
  102. package/build/components/block-popover/inbetween.cjs +2 -2
  103. package/build/components/block-popover/inbetween.cjs.map +2 -2
  104. package/build/components/block-popover/index.cjs.map +2 -2
  105. package/build/components/block-popover/use-popover-scroll.cjs.map +2 -2
  106. package/build/components/block-preview/async.cjs.map +2 -2
  107. package/build/components/block-preview/auto.cjs.map +2 -2
  108. package/build/components/block-preview/index.cjs +0 -4
  109. package/build/components/block-preview/index.cjs.map +2 -2
  110. package/build/components/block-quick-navigation/index.cjs.map +2 -2
  111. package/build/components/block-removal-warning-modal/index.cjs.map +2 -2
  112. package/build/components/block-rename/modal.cjs.map +2 -2
  113. package/build/components/block-rename/rename-control.cjs.map +2 -2
  114. package/build/components/block-rename/use-block-rename.cjs.map +2 -2
  115. package/build/components/block-selection-clearer/index.cjs.map +2 -2
  116. package/build/components/block-settings-menu/block-html-convert-button.cjs.map +2 -2
  117. package/build/components/block-settings-menu/block-mode-toggle.cjs.map +2 -2
  118. package/build/components/block-settings-menu/block-parent-selector-menu-item.cjs.map +2 -2
  119. package/build/components/block-settings-menu/block-settings-dropdown.cjs +1 -1
  120. package/build/components/block-settings-menu/block-settings-dropdown.cjs.map +2 -2
  121. package/build/components/block-settings-menu/block-settings-menu-first-item.cjs.map +2 -2
  122. package/build/components/block-settings-menu/index.cjs.map +2 -2
  123. package/build/components/block-settings-menu-controls/index.cjs.map +2 -2
  124. package/build/components/block-styles/index.cjs +77 -33
  125. package/build/components/block-styles/index.cjs.map +3 -3
  126. package/build/components/block-styles/menu-items.cjs.map +2 -2
  127. package/build/components/block-styles/use-styles-for-block.cjs.map +2 -2
  128. package/build/components/block-styles/utils.cjs.map +2 -2
  129. package/build/components/block-switcher/block-styles-menu.cjs.map +2 -2
  130. package/build/components/block-switcher/block-transformations-menu.cjs.map +2 -2
  131. package/build/components/block-switcher/block-variation-transformations.cjs.map +2 -2
  132. package/build/components/block-switcher/index.cjs.map +2 -2
  133. package/build/components/block-switcher/pattern-transformations-menu.cjs.map +2 -2
  134. package/build/components/block-switcher/preview-block-popover.cjs.map +2 -2
  135. package/build/components/block-switcher/use-transformed-patterns.cjs.map +2 -2
  136. package/build/components/block-switcher/utils.cjs.map +2 -2
  137. package/build/components/block-title/index.cjs.map +2 -2
  138. package/build/components/block-title/use-block-display-title.cjs.map +2 -2
  139. package/build/components/block-toolbar/block-styles-dropdown.cjs.map +2 -2
  140. package/build/components/block-toolbar/block-toolbar-icon.cjs.map +2 -2
  141. package/build/components/block-toolbar/block-toolbar-last-item.cjs.map +2 -2
  142. package/build/components/block-toolbar/change-design.cjs.map +2 -2
  143. package/build/components/block-toolbar/edit-section-button.cjs.map +2 -2
  144. package/build/components/block-toolbar/index.cjs.map +2 -2
  145. package/build/components/block-toolbar/pattern-overrides-dropdown.cjs.map +2 -2
  146. package/build/components/block-toolbar/switch-section-style.cjs.map +2 -2
  147. package/build/components/block-toolbar/use-has-block-toolbar.cjs.map +2 -2
  148. package/build/components/block-toolbar/utils.cjs.map +2 -2
  149. package/build/components/block-tools/block-toolbar-popover.cjs.map +2 -2
  150. package/build/components/block-tools/empty-block-inserter.cjs.map +2 -2
  151. package/build/components/block-tools/index.cjs +2 -4
  152. package/build/components/block-tools/index.cjs.map +2 -2
  153. package/build/components/block-tools/insertion-point.cjs.map +2 -2
  154. package/build/components/block-tools/use-block-toolbar-popover-props.cjs.map +2 -2
  155. package/build/components/block-tools/use-selected-block-tool-props.cjs.map +2 -2
  156. package/build/components/block-tools/use-show-block-tools.cjs.map +2 -2
  157. package/build/components/block-tools/zoom-out-mode-inserter-button.cjs.map +2 -2
  158. package/build/components/block-tools/zoom-out-mode-inserters.cjs.map +2 -2
  159. package/build/components/block-types-list/index.cjs.map +2 -2
  160. package/build/components/block-variation-picker/index.cjs.map +2 -2
  161. package/build/components/block-variation-transforms/index.cjs.map +2 -2
  162. package/build/components/block-vertical-alignment-control/index.cjs.map +2 -2
  163. package/build/components/block-vertical-alignment-control/ui.cjs.map +2 -2
  164. package/build/components/block-visibility/constants.cjs +1 -1
  165. package/build/components/block-visibility/constants.cjs.map +3 -3
  166. package/build/components/block-visibility/modal.cjs.map +2 -2
  167. package/build/components/block-visibility/use-block-visibility.cjs +15 -17
  168. package/build/components/block-visibility/use-block-visibility.cjs.map +3 -3
  169. package/build/components/block-visibility/utils.cjs.map +2 -2
  170. package/build/components/block-visibility/viewport-menu-item.cjs.map +2 -2
  171. package/build/components/block-visibility/viewport-toolbar.cjs.map +2 -2
  172. package/build/components/block-visibility/viewport-visibility-info.cjs.map +2 -2
  173. package/build/components/border-radius-control/constants.cjs.map +2 -2
  174. package/build/components/border-radius-control/index.cjs.map +2 -2
  175. package/build/components/border-radius-control/linked-button.cjs.map +2 -2
  176. package/build/components/border-radius-control/utils.cjs.map +2 -2
  177. package/build/components/button-block-appender/index.cjs.map +2 -2
  178. package/build/components/child-layout-control/index.cjs.map +3 -3
  179. package/build/components/collab/note-icon-slot.cjs.map +2 -2
  180. package/build/components/collab/note-icon-toolbar-slot.cjs.map +2 -2
  181. package/build/components/color-palette/control.cjs.map +2 -2
  182. package/build/components/color-palette/index.cjs.map +2 -2
  183. package/build/components/color-palette/with-color-context.cjs.map +2 -2
  184. package/build/components/color-style-selector/index.cjs.map +2 -2
  185. package/build/components/colors/utils.cjs +2 -4
  186. package/build/components/colors/utils.cjs.map +3 -3
  187. package/build/components/colors/with-colors.cjs +57 -75
  188. package/build/components/colors/with-colors.cjs.map +3 -3
  189. package/build/components/colors-gradients/control.cjs.map +2 -2
  190. package/build/components/colors-gradients/dropdown.cjs.map +2 -2
  191. package/build/components/colors-gradients/panel-color-gradient-settings.cjs +5 -5
  192. package/build/components/colors-gradients/panel-color-gradient-settings.cjs.map +2 -2
  193. package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.cjs.map +2 -2
  194. package/build/components/contrast-checker/index.cjs.map +2 -2
  195. package/build/components/convert-to-group-buttons/index.cjs +2 -5
  196. package/build/components/convert-to-group-buttons/index.cjs.map +2 -2
  197. package/build/components/convert-to-group-buttons/toolbar.cjs +2 -4
  198. package/build/components/convert-to-group-buttons/toolbar.cjs.map +2 -2
  199. package/build/components/convert-to-group-buttons/use-convert-to-group-button-props.cjs.map +2 -2
  200. package/build/components/copy-handler/index.cjs.map +2 -2
  201. package/build/components/date-format-picker/index.cjs.map +2 -2
  202. package/build/components/default-block-appender/index.cjs.map +2 -2
  203. package/build/components/dimension-control/index.cjs.map +2 -2
  204. package/build/components/dimensions-tool/aspect-ratio-tool.cjs +4 -2
  205. package/build/components/dimensions-tool/aspect-ratio-tool.cjs.map +2 -2
  206. package/build/components/dimensions-tool/index.cjs +18 -16
  207. package/build/components/dimensions-tool/index.cjs.map +2 -2
  208. package/build/components/dimensions-tool/scale-tool.cjs.map +2 -2
  209. package/build/components/dimensions-tool/utils.cjs +61 -0
  210. package/build/components/dimensions-tool/utils.cjs.map +7 -0
  211. package/build/components/dimensions-tool/width-height-tool.cjs.map +2 -2
  212. package/build/components/duotone-control/index.cjs +2 -0
  213. package/build/components/duotone-control/index.cjs.map +2 -2
  214. package/build/components/editable-text/index.cjs.map +2 -2
  215. package/build/components/editor-styles/index.cjs.map +2 -2
  216. package/build/components/fit-text-size-warning/index.cjs.map +2 -2
  217. package/build/components/font-appearance-control/index.cjs.map +2 -2
  218. package/build/components/font-family/index.cjs.map +2 -2
  219. package/build/components/font-sizes/font-size-picker.cjs.map +2 -2
  220. package/build/components/font-sizes/utils.cjs +2 -4
  221. package/build/components/font-sizes/utils.cjs.map +3 -3
  222. package/build/components/font-sizes/with-font-sizes.cjs.map +2 -2
  223. package/build/components/global-styles/advanced-panel.cjs.map +3 -3
  224. package/build/components/global-styles/background-panel.cjs.map +2 -2
  225. package/build/components/global-styles/border-panel.cjs +2 -5
  226. package/build/components/global-styles/border-panel.cjs.map +2 -2
  227. package/build/components/global-styles/color-gradient-dropdown-item.cjs.map +2 -2
  228. package/build/components/global-styles/color-panel.cjs +14 -2
  229. package/build/components/global-styles/color-panel.cjs.map +2 -2
  230. package/build/components/global-styles/dimensions-panel.cjs +9 -5
  231. package/build/components/global-styles/dimensions-panel.cjs.map +2 -2
  232. package/build/components/global-styles/filters-panel.cjs +12 -8
  233. package/build/components/global-styles/filters-panel.cjs.map +2 -2
  234. package/build/components/global-styles/hooks.cjs.map +2 -2
  235. package/build/components/global-styles/image-settings-panel.cjs.map +2 -2
  236. package/build/components/global-styles/inheritance/index.cjs.map +2 -2
  237. package/build/components/global-styles/inherited-value-context.cjs.map +2 -2
  238. package/build/components/global-styles/shadow-panel-components.cjs +16 -11
  239. package/build/components/global-styles/shadow-panel-components.cjs.map +2 -2
  240. package/build/components/global-styles/state-control-badges.cjs.map +2 -2
  241. package/build/components/global-styles/state-control.cjs.map +2 -2
  242. package/build/components/global-styles/typography-panel.cjs.map +2 -2
  243. package/build/components/global-styles/typography-utils.cjs.map +2 -2
  244. package/build/components/global-styles/utils.cjs +9 -0
  245. package/build/components/global-styles/utils.cjs.map +2 -2
  246. package/build/components/gradients/use-gradient.cjs.map +2 -2
  247. package/build/components/grid/grid-item-movers.cjs.map +2 -2
  248. package/build/components/grid/grid-item-resizer.cjs.map +2 -2
  249. package/build/components/grid/grid-visualizer.cjs.map +2 -2
  250. package/build/components/grid/use-get-number-of-blocks-before-cell.cjs.map +2 -2
  251. package/build/components/grid/use-grid-layout-sync.cjs.map +2 -2
  252. package/build/components/height-control/index.cjs.map +2 -2
  253. package/build/components/html-element-control/index.cjs.map +2 -2
  254. package/build/components/html-element-control/messages.cjs.map +2 -2
  255. package/build/components/iframe/index.cjs +19 -24
  256. package/build/components/iframe/index.cjs.map +2 -2
  257. package/build/components/iframe/use-scale-canvas.cjs +20 -6
  258. package/build/components/iframe/use-scale-canvas.cjs.map +2 -2
  259. package/build/components/image-editor/aspect-ratio-dropdown.cjs.map +2 -2
  260. package/build/components/image-editor/context.cjs.map +2 -2
  261. package/build/components/image-editor/cropper.cjs.map +2 -2
  262. package/build/components/image-editor/form-controls.cjs.map +2 -2
  263. package/build/components/image-editor/index.cjs.map +2 -2
  264. package/build/components/image-editor/rotation-button.cjs.map +2 -2
  265. package/build/components/image-editor/use-save-image.cjs.map +2 -2
  266. package/build/components/image-editor/use-transform-image.cjs.map +2 -2
  267. package/build/components/image-editor/zoom-dropdown.cjs.map +2 -2
  268. package/build/components/image-size-control/index.cjs.map +2 -2
  269. package/build/components/image-size-control/use-dimension-handler.cjs.map +2 -2
  270. package/build/components/inner-blocks/button-block-appender.cjs.map +2 -2
  271. package/build/components/inner-blocks/default-block-appender.cjs.map +2 -2
  272. package/build/components/inner-blocks/index.cjs +5 -3
  273. package/build/components/inner-blocks/index.cjs.map +2 -2
  274. package/build/components/inner-blocks/use-block-context.cjs.map +2 -2
  275. package/build/components/inner-blocks/use-inner-block-template-sync.cjs +34 -7
  276. package/build/components/inner-blocks/use-inner-block-template-sync.cjs.map +3 -3
  277. package/build/components/inner-blocks/use-nested-settings-update.cjs.map +2 -2
  278. package/build/components/inner-content/index.cjs.map +2 -2
  279. package/build/components/inserter/block-patterns-explorer/index.cjs +39 -22
  280. package/build/components/inserter/block-patterns-explorer/index.cjs.map +2 -2
  281. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.cjs +21 -55
  282. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.cjs.map +2 -2
  283. package/build/components/inserter/block-patterns-explorer/pattern-list.cjs +19 -44
  284. package/build/components/inserter/block-patterns-explorer/pattern-list.cjs.map +3 -3
  285. package/build/components/inserter/block-patterns-tab/index.cjs.map +2 -2
  286. package/build/components/inserter/block-patterns-tab/pattern-category-previews.cjs.map +2 -2
  287. package/build/components/inserter/block-patterns-tab/patterns-filter.cjs.map +2 -2
  288. package/build/components/inserter/block-patterns-tab/use-pattern-categories.cjs.map +2 -2
  289. package/build/components/inserter/block-patterns-tab/utils.cjs.map +2 -2
  290. package/build/components/inserter/block-types-tab.cjs.map +2 -2
  291. package/build/components/inserter/category-tabs/index.cjs.map +2 -2
  292. package/build/components/inserter/hooks/use-block-types-state.cjs.map +2 -2
  293. package/build/components/inserter/hooks/use-insertion-point.cjs +4 -4
  294. package/build/components/inserter/hooks/use-insertion-point.cjs.map +2 -2
  295. package/build/components/inserter/hooks/use-patterns-paging.cjs.map +2 -2
  296. package/build/components/inserter/hooks/use-patterns-state.cjs.map +2 -2
  297. package/build/components/inserter/index.cjs +4 -13
  298. package/build/components/inserter/index.cjs.map +2 -2
  299. package/build/components/inserter/library.cjs.map +2 -2
  300. package/build/components/inserter/media-tab/hooks.cjs.map +2 -2
  301. package/build/components/inserter/media-tab/media-list.cjs.map +2 -2
  302. package/build/components/inserter/media-tab/media-panel.cjs.map +2 -2
  303. package/build/components/inserter/media-tab/media-preview.cjs.map +2 -2
  304. package/build/components/inserter/media-tab/media-tab.cjs.map +2 -2
  305. package/build/components/inserter/media-tab/utils.cjs.map +2 -2
  306. package/build/components/inserter/menu.cjs +18 -7
  307. package/build/components/inserter/menu.cjs.map +2 -2
  308. package/build/components/inserter/mobile-tab-navigation.cjs.map +2 -2
  309. package/build/components/inserter/no-results.cjs.map +2 -2
  310. package/build/components/inserter/panel.cjs.map +2 -2
  311. package/build/components/inserter/preview-panel.cjs.map +2 -2
  312. package/build/components/inserter/quick-inserter.cjs +30 -27
  313. package/build/components/inserter/quick-inserter.cjs.map +2 -2
  314. package/build/components/inserter/search-items.cjs.map +2 -2
  315. package/build/components/inserter/search-results.cjs.map +2 -2
  316. package/build/components/inserter/tips.cjs.map +2 -2
  317. package/build/components/inserter-draggable-blocks/index.cjs.map +2 -2
  318. package/build/components/inserter-list-item/index.cjs.map +2 -2
  319. package/build/components/inserter-listbox/context.cjs.map +2 -2
  320. package/build/components/inserter-listbox/group.cjs.map +2 -2
  321. package/build/components/inserter-listbox/index.cjs.map +2 -2
  322. package/build/components/inserter-listbox/item.cjs.map +2 -2
  323. package/build/components/inserter-listbox/row.cjs.map +2 -2
  324. package/build/components/inserter-menu-extension/index.cjs.map +2 -2
  325. package/build/components/inspector-controls/block-support-slot-container.cjs.map +2 -2
  326. package/build/components/inspector-controls/block-support-tools-panel.cjs.map +2 -2
  327. package/build/components/inspector-controls/fill.cjs +15 -17
  328. package/build/components/inspector-controls/fill.cjs.map +2 -2
  329. package/build/components/inspector-controls/groups.cjs.map +2 -2
  330. package/build/components/inspector-controls/index.cjs.map +2 -2
  331. package/build/components/inspector-controls/last-item.cjs.map +2 -2
  332. package/build/components/inspector-controls/list-view-content-popover.cjs.map +2 -2
  333. package/build/components/inspector-controls/slot.cjs.map +2 -2
  334. package/build/components/inspector-controls-tabs/advanced-controls-panel.cjs.map +2 -2
  335. package/build/components/inspector-controls-tabs/content-tab.cjs.map +2 -2
  336. package/build/components/inspector-controls-tabs/index.cjs.map +2 -2
  337. package/build/components/inspector-controls-tabs/position-controls-panel.cjs.map +2 -2
  338. package/build/components/inspector-controls-tabs/settings-tab.cjs.map +2 -2
  339. package/build/components/inspector-controls-tabs/styles-tab.cjs +1 -1
  340. package/build/components/inspector-controls-tabs/styles-tab.cjs.map +2 -2
  341. package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.cjs.map +2 -2
  342. package/build/components/inspector-controls-tabs/utils.cjs.map +2 -2
  343. package/build/components/inspector-popover-header/index.cjs.map +2 -2
  344. package/build/components/justify-content-control/index.cjs.map +2 -2
  345. package/build/components/justify-content-control/ui.cjs.map +2 -2
  346. package/build/components/keyboard-shortcuts/index.cjs.map +2 -2
  347. package/build/components/letter-spacing-control/index.cjs.map +2 -2
  348. package/build/components/line-height-control/index.cjs.map +2 -2
  349. package/build/components/link-control/constants.cjs.map +2 -2
  350. package/build/components/link-control/index.cjs.map +2 -2
  351. package/build/components/link-control/is-url-like.cjs.map +2 -2
  352. package/build/components/link-control/link-preview.cjs.map +2 -2
  353. package/build/components/link-control/normalize-url.cjs.map +2 -2
  354. package/build/components/link-control/search-create-button.cjs.map +2 -2
  355. package/build/components/link-control/search-input.cjs.map +2 -2
  356. package/build/components/link-control/search-item.cjs.map +2 -2
  357. package/build/components/link-control/search-results.cjs +1 -1
  358. package/build/components/link-control/search-results.cjs.map +2 -2
  359. package/build/components/link-control/settings-drawer.cjs.map +2 -2
  360. package/build/components/link-control/settings.cjs.map +2 -2
  361. package/build/components/link-control/use-create-page.cjs.map +2 -2
  362. package/build/components/link-control/use-internal-value.cjs.map +2 -2
  363. package/build/components/link-control/use-rich-url-data.cjs +1 -1
  364. package/build/components/link-control/use-rich-url-data.cjs.map +2 -2
  365. package/build/components/link-control/use-search-handler.cjs.map +2 -2
  366. package/build/components/link-control/viewer-slot.cjs.map +2 -2
  367. package/build/components/link-picker/link-picker.cjs.map +2 -2
  368. package/build/components/link-picker/link-preview.cjs.map +2 -2
  369. package/build/components/list-view/appender.cjs +6 -3
  370. package/build/components/list-view/appender.cjs.map +2 -2
  371. package/build/components/list-view/aria-referenced-text.cjs +2 -9
  372. package/build/components/list-view/aria-referenced-text.cjs.map +2 -2
  373. package/build/components/list-view/block-contents.cjs +17 -20
  374. package/build/components/list-view/block-contents.cjs.map +2 -2
  375. package/build/components/list-view/block-select-button.cjs +40 -19
  376. package/build/components/list-view/block-select-button.cjs.map +3 -3
  377. package/build/components/list-view/block.cjs +38 -41
  378. package/build/components/list-view/block.cjs.map +3 -3
  379. package/build/components/list-view/branch.cjs +93 -77
  380. package/build/components/list-view/branch.cjs.map +3 -3
  381. package/build/components/list-view/context.cjs +16 -2
  382. package/build/components/list-view/context.cjs.map +2 -2
  383. package/build/components/list-view/drop-indicator.cjs +4 -3
  384. package/build/components/list-view/drop-indicator.cjs.map +3 -3
  385. package/build/components/list-view/expander.cjs.map +2 -2
  386. package/build/components/list-view/index.cjs +114 -101
  387. package/build/components/list-view/index.cjs.map +3 -3
  388. package/build/components/list-view/leaf.cjs.map +2 -2
  389. package/build/components/list-view/use-block-selection.cjs.map +2 -2
  390. package/build/components/list-view/use-clipboard-handler.cjs.map +2 -2
  391. package/build/components/list-view/use-list-view-block-indexes.cjs.map +2 -2
  392. package/build/components/list-view/use-list-view-client-ids.cjs.map +2 -2
  393. package/build/components/list-view/use-list-view-collapse-items.cjs +3 -4
  394. package/build/components/list-view/use-list-view-collapse-items.cjs.map +2 -2
  395. package/build/components/list-view/use-list-view-drop-zone.cjs +7 -13
  396. package/build/components/list-view/use-list-view-drop-zone.cjs.map +2 -2
  397. package/build/components/list-view/use-list-view-expand-selected-item.cjs +3 -3
  398. package/build/components/list-view/use-list-view-expand-selected-item.cjs.map +2 -2
  399. package/build/components/list-view/use-list-view-images.cjs +4 -3
  400. package/build/components/list-view/use-list-view-images.cjs.map +2 -2
  401. package/build/components/list-view/use-list-view-scroll-into-view.cjs.map +2 -2
  402. package/build/components/list-view/utils.cjs +19 -4
  403. package/build/components/list-view/utils.cjs.map +2 -2
  404. package/build/components/media-placeholder/index.cjs +1 -1
  405. package/build/components/media-placeholder/index.cjs.map +3 -3
  406. package/build/components/media-replace-flow/index.cjs.map +2 -2
  407. package/build/components/media-upload/check.cjs.map +2 -2
  408. package/build/components/media-upload/index.cjs.map +2 -2
  409. package/build/components/multi-selection-inspector/index.cjs +33 -12
  410. package/build/components/multi-selection-inspector/index.cjs.map +3 -3
  411. package/build/components/navigable-toolbar/index.cjs +29 -18
  412. package/build/components/navigable-toolbar/index.cjs.map +2 -2
  413. package/build/components/observe-typing/index.cjs.map +2 -2
  414. package/build/components/panel-color-settings/index.cjs.map +2 -2
  415. package/build/components/plain-text/index.cjs.map +2 -2
  416. package/build/components/preset-input-control/custom-value-controls.cjs.map +2 -2
  417. package/build/components/preset-input-control/index.cjs.map +2 -2
  418. package/build/components/preview-options/index.cjs.map +2 -2
  419. package/build/components/provider/block-refs-provider.cjs.map +2 -2
  420. package/build/components/provider/index.cjs +5 -1
  421. package/build/components/provider/index.cjs.map +3 -3
  422. package/build/components/provider/selection-context.cjs.map +2 -2
  423. package/build/components/provider/use-block-sync.cjs.map +2 -2
  424. package/build/components/provider/use-media-upload-settings.cjs.map +2 -2
  425. package/build/components/provider/with-registry-provider.cjs.map +2 -2
  426. package/build/components/publish-date-time-picker/index.cjs +3 -2
  427. package/build/components/publish-date-time-picker/index.cjs.map +2 -2
  428. package/build/components/recursion-provider/index.cjs.map +2 -2
  429. package/build/components/resizable-box-popover/index.cjs.map +2 -2
  430. package/build/components/resolution-tool/index.cjs.map +2 -2
  431. package/build/components/responsive-block-control/index.cjs.map +2 -2
  432. package/build/components/responsive-block-control/label.cjs.map +2 -2
  433. package/build/components/rich-text/content.cjs.map +2 -2
  434. package/build/components/rich-text/event-listeners/before-input-rules.cjs.map +2 -2
  435. package/build/components/rich-text/event-listeners/delete.cjs.map +2 -2
  436. package/build/components/rich-text/event-listeners/enter.cjs +46 -39
  437. package/build/components/rich-text/event-listeners/enter.cjs.map +2 -2
  438. package/build/components/rich-text/event-listeners/firefox-compat.cjs.map +2 -2
  439. package/build/components/rich-text/event-listeners/index.cjs.map +2 -2
  440. package/build/components/rich-text/event-listeners/input-events.cjs.map +2 -2
  441. package/build/components/rich-text/event-listeners/input-rules.cjs +13 -10
  442. package/build/components/rich-text/event-listeners/input-rules.cjs.map +2 -2
  443. package/build/components/rich-text/event-listeners/insert-replacement-text.cjs.map +2 -2
  444. package/build/components/rich-text/event-listeners/paste-handler.cjs +8 -1
  445. package/build/components/rich-text/event-listeners/paste-handler.cjs.map +2 -2
  446. package/build/components/rich-text/event-listeners/remove-browser-shortcuts.cjs.map +2 -2
  447. package/build/components/rich-text/event-listeners/shortcuts.cjs.map +2 -2
  448. package/build/components/rich-text/event-listeners/undo-automatic-change.cjs.map +2 -2
  449. package/build/components/rich-text/format-edit.cjs.map +2 -2
  450. package/build/components/rich-text/format-toolbar/index.cjs.map +2 -2
  451. package/build/components/rich-text/format-toolbar-container.cjs.map +2 -2
  452. package/build/components/rich-text/get-rich-text-values.cjs.map +2 -2
  453. package/build/components/rich-text/index.cjs +7 -5
  454. package/build/components/rich-text/index.cjs.map +2 -2
  455. package/build/components/rich-text/multiline.cjs +105 -70
  456. package/build/components/rich-text/multiline.cjs.map +3 -3
  457. package/build/components/rich-text/prevent-event-discovery.cjs.map +2 -2
  458. package/build/components/rich-text/toolbar-button.cjs.map +2 -2
  459. package/build/components/rich-text/use-mark-persistent.cjs.map +2 -2
  460. package/build/components/rich-text/utils.cjs.map +2 -2
  461. package/build/components/rich-text/with-deprecations.cjs.map +2 -2
  462. package/build/components/selection-scroll-into-view/index.cjs.map +2 -2
  463. package/build/components/skip-to-selected-block/index.cjs.map +2 -2
  464. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.cjs.map +2 -2
  465. package/build/components/spacing-sizes-control/index.cjs +2 -2
  466. package/build/components/spacing-sizes-control/index.cjs.map +2 -2
  467. package/build/components/spacing-sizes-control/input-controls/axial.cjs.map +2 -2
  468. package/build/components/spacing-sizes-control/input-controls/separated.cjs.map +2 -2
  469. package/build/components/spacing-sizes-control/input-controls/single.cjs.map +2 -2
  470. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.cjs.map +2 -2
  471. package/build/components/spacing-sizes-control/linked-button.cjs.map +2 -2
  472. package/build/components/spacing-sizes-control/utils.cjs.map +2 -2
  473. package/build/components/tabbed-sidebar/index.cjs.map +2 -2
  474. package/build/components/text-alignment-control/index.cjs.map +2 -2
  475. package/build/components/text-decoration-control/index.cjs.map +2 -2
  476. package/build/components/text-indent-control/index.cjs.map +2 -2
  477. package/build/components/text-transform-control/index.cjs.map +2 -2
  478. package/build/components/tool-selector/index.cjs.map +2 -2
  479. package/build/components/typewriter/index.cjs.map +2 -2
  480. package/build/components/unit-control/index.cjs.map +2 -2
  481. package/build/components/url-input/button.cjs.map +2 -2
  482. package/build/components/url-input/index.cjs +28 -46
  483. package/build/components/url-input/index.cjs.map +3 -3
  484. package/build/components/url-popover/image-url-input-ui.cjs +2 -2
  485. package/build/components/url-popover/image-url-input-ui.cjs.map +2 -2
  486. package/build/components/url-popover/index.cjs.map +2 -2
  487. package/build/components/url-popover/link-editor.cjs.map +2 -2
  488. package/build/components/url-popover/link-viewer-url.cjs.map +2 -2
  489. package/build/components/url-popover/link-viewer.cjs.map +2 -2
  490. package/build/components/use-block-commands/index.cjs +2 -1
  491. package/build/components/use-block-commands/index.cjs.map +2 -2
  492. package/build/components/use-block-display-information/index.cjs +6 -1
  493. package/build/components/use-block-display-information/index.cjs.map +2 -2
  494. package/build/components/use-block-drop-zone/index.cjs.map +2 -2
  495. package/build/components/use-flash-editable-blocks/index.cjs.map +2 -2
  496. package/build/components/use-list-view-panel-state/index.cjs.map +2 -2
  497. package/build/components/use-moving-animation/index.cjs +2 -2
  498. package/build/components/use-moving-animation/index.cjs.map +2 -2
  499. package/build/components/use-on-block-drop/index.cjs.map +2 -2
  500. package/build/components/use-paste-styles/index.cjs.map +2 -2
  501. package/build/components/use-resize-canvas/index.cjs.map +2 -2
  502. package/build/components/use-settings/index.cjs.map +2 -2
  503. package/build/components/warning/index.cjs.map +2 -2
  504. package/build/components/writing-flow/index.cjs.map +2 -2
  505. package/build/components/writing-flow/use-arrow-nav.cjs +6 -1
  506. package/build/components/writing-flow/use-arrow-nav.cjs.map +2 -2
  507. package/build/components/writing-flow/use-click-selection.cjs.map +2 -2
  508. package/build/components/writing-flow/use-clipboard-handler.cjs +29 -4
  509. package/build/components/writing-flow/use-clipboard-handler.cjs.map +3 -3
  510. package/build/components/writing-flow/use-drag-selection.cjs.map +2 -2
  511. package/build/components/writing-flow/use-editable-root-event-handlers.cjs.map +2 -2
  512. package/build/components/writing-flow/use-editable-root.cjs.map +2 -2
  513. package/build/components/writing-flow/use-home-end.cjs.map +2 -2
  514. package/build/components/writing-flow/use-input.cjs +65 -13
  515. package/build/components/writing-flow/use-input.cjs.map +3 -3
  516. package/build/components/writing-flow/use-multi-selection.cjs.map +2 -2
  517. package/build/components/writing-flow/use-preview-mode-nav.cjs.map +2 -2
  518. package/build/components/writing-flow/use-select-all.cjs.map +2 -2
  519. package/build/components/writing-flow/use-selection-observer.cjs.map +2 -2
  520. package/build/components/writing-flow/use-tab-nav.cjs +3 -1
  521. package/build/components/writing-flow/use-tab-nav.cjs.map +2 -2
  522. package/build/components/writing-flow/utils.cjs.map +2 -2
  523. package/build/components/writing-mode-control/index.cjs.map +2 -2
  524. package/build/hooks/align.cjs.map +2 -2
  525. package/build/hooks/allowed-blocks.cjs.map +2 -2
  526. package/build/hooks/anchor.cjs.map +2 -2
  527. package/build/hooks/aria-label.cjs.map +2 -2
  528. package/build/hooks/auto-inspector-controls.cjs.map +2 -2
  529. package/build/hooks/background.cjs +1 -4
  530. package/build/hooks/background.cjs.map +2 -2
  531. package/build/hooks/block-bindings.cjs.map +2 -2
  532. package/build/hooks/block-fields/fields-dropdown-menu.cjs.map +2 -2
  533. package/build/hooks/block-fields/index.cjs.map +2 -2
  534. package/build/hooks/block-fields/link/index.cjs.map +2 -2
  535. package/build/hooks/block-fields/media/index.cjs.map +2 -2
  536. package/build/hooks/block-fields/rich-text/index.cjs.map +2 -2
  537. package/build/hooks/block-fields/use-inspector-popover-placement.cjs.map +2 -2
  538. package/build/hooks/block-hooks.cjs.map +2 -2
  539. package/build/hooks/block-renaming.cjs.map +2 -2
  540. package/build/hooks/block-style-state.cjs.map +2 -2
  541. package/build/hooks/block-style-variation.cjs.map +2 -2
  542. package/build/hooks/border.cjs +25 -3
  543. package/build/hooks/border.cjs.map +2 -2
  544. package/build/hooks/color.cjs.map +2 -2
  545. package/build/hooks/compat.cjs.map +2 -2
  546. package/build/hooks/contrast-checker.cjs.map +2 -2
  547. package/build/hooks/custom-class-name.cjs.map +2 -2
  548. package/build/hooks/dimensions.cjs +9 -2
  549. package/build/hooks/dimensions.cjs.map +2 -2
  550. package/build/hooks/duotone.cjs +4 -3
  551. package/build/hooks/duotone.cjs.map +2 -2
  552. package/build/hooks/elements.cjs.map +2 -2
  553. package/build/hooks/fit-text.cjs.map +2 -2
  554. package/build/hooks/font-family.cjs +2 -4
  555. package/build/hooks/font-family.cjs.map +3 -3
  556. package/build/hooks/font-size.cjs.map +2 -2
  557. package/build/hooks/gap.cjs +8 -2
  558. package/build/hooks/gap.cjs.map +2 -2
  559. package/build/hooks/generated-class-name.cjs.map +2 -2
  560. package/build/hooks/grid-visualizer.cjs.map +2 -2
  561. package/build/hooks/index.cjs.map +2 -2
  562. package/build/hooks/layout-child.cjs +35 -13
  563. package/build/hooks/layout-child.cjs.map +2 -2
  564. package/build/hooks/layout.cjs +27 -5
  565. package/build/hooks/layout.cjs.map +3 -3
  566. package/build/hooks/line-height.cjs.map +2 -2
  567. package/build/hooks/list-view.cjs.map +2 -2
  568. package/build/hooks/lock.cjs.map +2 -2
  569. package/build/hooks/metadata.cjs.map +2 -2
  570. package/build/hooks/position.cjs.map +2 -2
  571. package/build/hooks/settings.cjs.map +2 -2
  572. package/build/hooks/spacing-visualizer.cjs.map +2 -2
  573. package/build/hooks/state-utils.cjs.map +2 -2
  574. package/build/hooks/states.cjs +7 -4
  575. package/build/hooks/states.cjs.map +2 -2
  576. package/build/hooks/style.cjs.map +2 -2
  577. package/build/hooks/supports.cjs.map +2 -2
  578. package/build/hooks/text-align.cjs.map +2 -2
  579. package/build/hooks/typography.cjs.map +2 -2
  580. package/build/hooks/use-border-props.cjs.map +2 -2
  581. package/build/hooks/use-cached-truthy.cjs.map +2 -2
  582. package/build/hooks/use-color-props.cjs.map +2 -2
  583. package/build/hooks/use-content-only-section-edit.cjs.map +2 -2
  584. package/build/hooks/use-dimensions-props.cjs.map +2 -2
  585. package/build/hooks/use-shadow-props.cjs.map +2 -2
  586. package/build/hooks/use-spacing-props.cjs.map +2 -2
  587. package/build/hooks/use-typography-props.cjs +2 -4
  588. package/build/hooks/use-typography-props.cjs.map +3 -3
  589. package/build/hooks/use-zoom-out.cjs.map +2 -2
  590. package/build/hooks/utils.cjs.map +2 -2
  591. package/build/index.cjs.map +2 -2
  592. package/build/layouts/constrained.cjs +8 -1
  593. package/build/layouts/constrained.cjs.map +2 -2
  594. package/build/layouts/flex.cjs +9 -0
  595. package/build/layouts/flex.cjs.map +2 -2
  596. package/build/layouts/flow.cjs +4 -1
  597. package/build/layouts/flow.cjs.map +2 -2
  598. package/build/layouts/grid.cjs +5 -1
  599. package/build/layouts/grid.cjs.map +2 -2
  600. package/build/layouts/index.cjs.map +2 -2
  601. package/build/layouts/utils.cjs.map +2 -2
  602. package/build/lock-unlock.cjs.map +2 -2
  603. package/build/private-apis.cjs +3 -1
  604. package/build/private-apis.cjs.map +2 -2
  605. package/build/store/actions.cjs +105 -37
  606. package/build/store/actions.cjs.map +3 -3
  607. package/build/store/defaults.cjs +2 -0
  608. package/build/store/defaults.cjs.map +2 -2
  609. package/build/store/get-block-settings.cjs.map +2 -2
  610. package/build/store/index.cjs.map +2 -2
  611. package/build/store/private-actions.cjs +19 -2
  612. package/build/store/private-actions.cjs.map +2 -2
  613. package/build/store/private-selectors.cjs +28 -10
  614. package/build/store/private-selectors.cjs.map +2 -2
  615. package/build/store/reducer.cjs +3 -1
  616. package/build/store/reducer.cjs.map +2 -2
  617. package/build/store/selectors.cjs +21 -8
  618. package/build/store/selectors.cjs.map +2 -2
  619. package/build/store/utils.cjs.map +2 -2
  620. package/build/utils/fit-text-frontend.cjs.map +2 -2
  621. package/build/utils/format-font-style.cjs.map +2 -2
  622. package/build/utils/format-font-weight.cjs.map +2 -2
  623. package/build/utils/get-font-styles-and-weights.cjs.map +2 -2
  624. package/build/utils/group-blocks.cjs +42 -0
  625. package/build/utils/group-blocks.cjs.map +7 -0
  626. package/build/utils/native-undo.cjs.map +2 -2
  627. package/build/utils/pasting.cjs.map +2 -2
  628. package/build/utils/selection.cjs.map +2 -2
  629. package/build/{components/gradients/with-gradient.cjs → utils/sibling-block-attributes.cjs} +22 -13
  630. package/build/utils/sibling-block-attributes.cjs.map +7 -0
  631. package/build/utils/transform-styles/index.cjs.map +2 -2
  632. package/build/utils/use-notify-copy.cjs.map +2 -2
  633. package/build-module/autocompleters/block.mjs.map +2 -2
  634. package/build-module/components/alignment-control/index.mjs.map +2 -2
  635. package/build-module/components/alignment-control/ui.mjs.map +2 -2
  636. package/build-module/components/autocomplete/index.mjs.map +2 -2
  637. package/build-module/components/background-image-control/index.mjs.map +2 -2
  638. package/build-module/components/block-actions/index.mjs +3 -6
  639. package/build-module/components/block-actions/index.mjs.map +2 -2
  640. package/build-module/components/block-alignment-control/constants.mjs.map +2 -2
  641. package/build-module/components/block-alignment-control/index.mjs.map +2 -2
  642. package/build-module/components/block-alignment-control/ui.mjs.map +2 -2
  643. package/build-module/components/block-alignment-control/use-available-alignments.mjs.map +2 -2
  644. package/build-module/components/block-alignment-matrix-control/index.mjs.map +2 -2
  645. package/build-module/components/block-allowed-blocks/allowed-blocks-control.mjs.map +2 -2
  646. package/build-module/components/block-allowed-blocks/modal.mjs.map +2 -2
  647. package/build-module/components/block-bindings/attribute-control.mjs.map +2 -2
  648. package/build-module/components/block-bindings/index.mjs.map +2 -2
  649. package/build-module/components/block-bindings/source-fields-list.mjs.map +2 -2
  650. package/build-module/components/block-bindings/use-block-bindings-utils.mjs.map +2 -2
  651. package/build-module/components/block-breadcrumb/index.mjs.map +2 -2
  652. package/build-module/components/block-canvas/index.mjs.map +2 -2
  653. package/build-module/components/block-card/index.mjs.map +2 -2
  654. package/build-module/components/block-compare/block-view.mjs.map +2 -2
  655. package/build-module/components/block-compare/index.mjs.map +2 -2
  656. package/build-module/components/block-content-overlay/index.mjs.map +2 -2
  657. package/build-module/components/block-context/index.mjs.map +2 -2
  658. package/build-module/components/block-controls/fill.mjs.map +2 -2
  659. package/build-module/components/block-controls/groups.mjs.map +2 -2
  660. package/build-module/components/block-controls/hook.mjs.map +2 -2
  661. package/build-module/components/block-controls/index.mjs.map +2 -2
  662. package/build-module/components/block-controls/slot.mjs.map +2 -2
  663. package/build-module/components/block-draggable/draggable-chip.mjs.map +2 -2
  664. package/build-module/components/block-draggable/index.mjs.map +2 -2
  665. package/build-module/components/block-draggable/use-scroll-when-dragging.mjs.map +2 -2
  666. package/build-module/components/block-edit/context.mjs.map +2 -2
  667. package/build-module/components/block-edit/edit.mjs.map +2 -2
  668. package/build-module/components/block-edit/index.mjs.map +2 -2
  669. package/build-module/components/block-edit/multiple-usage-warning.mjs.map +2 -2
  670. package/build-module/components/block-edit-visually-button/index.mjs.map +2 -2
  671. package/build-module/components/block-editing-mode/index.mjs.map +2 -2
  672. package/build-module/components/block-full-height-alignment-control/index.mjs.map +2 -2
  673. package/build-module/components/block-heading-level-dropdown/heading-level-icon.mjs.map +2 -2
  674. package/build-module/components/block-heading-level-dropdown/index.mjs.map +2 -2
  675. package/build-module/components/block-icon/index.mjs.map +2 -2
  676. package/build-module/components/block-inspector/edit-contents.mjs +49 -41
  677. package/build-module/components/block-inspector/edit-contents.mjs.map +2 -2
  678. package/build-module/components/block-inspector/index.mjs +18 -10
  679. package/build-module/components/block-inspector/index.mjs.map +2 -2
  680. package/build-module/components/block-inspector/inspector-pre-tabs-slot-fill.mjs.map +2 -2
  681. package/build-module/components/block-inspector/useBlockInspectorAnimationSettings.mjs.map +2 -2
  682. package/build-module/components/block-keyboard-shortcuts/index.mjs +173 -0
  683. package/build-module/components/block-keyboard-shortcuts/index.mjs.map +7 -0
  684. package/build-module/components/block-list/block-crash-boundary.mjs.map +2 -2
  685. package/build-module/components/block-list/block-crash-warning.mjs.map +2 -2
  686. package/build-module/components/block-list/block-html.mjs.map +2 -2
  687. package/build-module/components/block-list/block-invalid-warning.mjs.map +2 -2
  688. package/build-module/components/block-list/block.mjs +46 -13
  689. package/build-module/components/block-list/block.mjs.map +3 -3
  690. package/build-module/components/block-list/index.mjs +40 -11
  691. package/build-module/components/block-list/index.mjs.map +2 -2
  692. package/build-module/components/block-list/layout.mjs.map +2 -2
  693. package/build-module/components/block-list/private-block-context.mjs.map +2 -2
  694. package/build-module/components/block-list/subdirectory-icon.mjs.map +2 -2
  695. package/build-module/components/block-list/use-block-props/index.mjs +36 -2
  696. package/build-module/components/block-list/use-block-props/index.mjs.map +2 -2
  697. package/build-module/components/block-list/use-block-props/use-block-refs.mjs.map +2 -2
  698. package/build-module/components/block-list/use-block-props/use-firefox-draggable-compatibility.mjs.map +2 -2
  699. package/build-module/components/block-list/use-block-props/use-focus-first-element.mjs +4 -0
  700. package/build-module/components/block-list/use-block-props/use-focus-first-element.mjs.map +2 -2
  701. package/build-module/components/block-list/use-block-props/use-focus-handler.mjs.map +2 -2
  702. package/build-module/components/block-list/use-block-props/use-intersection-observer.mjs.map +2 -2
  703. package/build-module/components/block-list/use-block-props/use-is-hovered.mjs.map +2 -2
  704. package/build-module/components/block-list/use-block-props/use-register-block-event-handlers.mjs.map +2 -2
  705. package/build-module/components/block-list/use-block-props/use-scroll-into-view.mjs.map +2 -2
  706. package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.mjs +6 -7
  707. package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.mjs.map +2 -2
  708. package/build-module/components/block-list/use-in-between-inserter.mjs.map +2 -2
  709. package/build-module/components/block-list/zoom-out-separator.mjs.map +2 -2
  710. package/build-module/components/block-list-appender/index.mjs.map +2 -2
  711. package/build-module/components/block-lock/menu-item.mjs.map +2 -2
  712. package/build-module/components/block-lock/modal.mjs.map +2 -2
  713. package/build-module/components/block-lock/toolbar.mjs.map +2 -2
  714. package/build-module/components/block-lock/use-block-lock.mjs.map +2 -2
  715. package/build-module/components/block-manager/category.mjs.map +2 -2
  716. package/build-module/components/block-manager/checklist.mjs.map +2 -2
  717. package/build-module/components/block-manager/index.mjs.map +2 -2
  718. package/build-module/components/block-mover/button.mjs +17 -11
  719. package/build-module/components/block-mover/button.mjs.map +2 -2
  720. package/build-module/components/block-mover/index.mjs.map +2 -2
  721. package/build-module/components/block-mover/mover-description.mjs.map +2 -2
  722. package/build-module/components/block-navigation/dropdown.mjs.map +2 -2
  723. package/build-module/components/block-parent-selector/index.mjs +101 -32
  724. package/build-module/components/block-parent-selector/index.mjs.map +2 -2
  725. package/build-module/components/block-pattern-setup/index.mjs.map +2 -2
  726. package/build-module/components/block-pattern-setup/setup-toolbar.mjs.map +2 -2
  727. package/build-module/components/block-pattern-setup/use-patterns-setup.mjs.map +2 -2
  728. package/build-module/components/block-patterns-list/index.mjs.map +2 -2
  729. package/build-module/components/block-patterns-paging/index.mjs.map +2 -2
  730. package/build-module/components/block-popover/cover.mjs.map +2 -2
  731. package/build-module/components/block-popover/drop-zone.mjs.map +2 -2
  732. package/build-module/components/block-popover/inbetween.mjs +2 -2
  733. package/build-module/components/block-popover/inbetween.mjs.map +2 -2
  734. package/build-module/components/block-popover/index.mjs.map +2 -2
  735. package/build-module/components/block-popover/use-popover-scroll.mjs.map +2 -2
  736. package/build-module/components/block-preview/async.mjs.map +2 -2
  737. package/build-module/components/block-preview/auto.mjs.map +2 -2
  738. package/build-module/components/block-preview/index.mjs +0 -4
  739. package/build-module/components/block-preview/index.mjs.map +2 -2
  740. package/build-module/components/block-quick-navigation/index.mjs.map +2 -2
  741. package/build-module/components/block-removal-warning-modal/index.mjs.map +2 -2
  742. package/build-module/components/block-rename/modal.mjs.map +2 -2
  743. package/build-module/components/block-rename/rename-control.mjs.map +2 -2
  744. package/build-module/components/block-rename/use-block-rename.mjs.map +2 -2
  745. package/build-module/components/block-selection-clearer/index.mjs.map +2 -2
  746. package/build-module/components/block-settings-menu/block-html-convert-button.mjs.map +2 -2
  747. package/build-module/components/block-settings-menu/block-mode-toggle.mjs.map +2 -2
  748. package/build-module/components/block-settings-menu/block-parent-selector-menu-item.mjs.map +2 -2
  749. package/build-module/components/block-settings-menu/block-settings-dropdown.mjs +1 -1
  750. package/build-module/components/block-settings-menu/block-settings-dropdown.mjs.map +2 -2
  751. package/build-module/components/block-settings-menu/block-settings-menu-first-item.mjs.map +2 -2
  752. package/build-module/components/block-settings-menu/index.mjs.map +2 -2
  753. package/build-module/components/block-settings-menu-controls/index.mjs.map +2 -2
  754. package/build-module/components/block-styles/index.mjs +79 -35
  755. package/build-module/components/block-styles/index.mjs.map +2 -2
  756. package/build-module/components/block-styles/menu-items.mjs.map +2 -2
  757. package/build-module/components/block-styles/use-styles-for-block.mjs.map +2 -2
  758. package/build-module/components/block-styles/utils.mjs.map +2 -2
  759. package/build-module/components/block-switcher/block-styles-menu.mjs.map +2 -2
  760. package/build-module/components/block-switcher/block-transformations-menu.mjs.map +2 -2
  761. package/build-module/components/block-switcher/block-variation-transformations.mjs.map +2 -2
  762. package/build-module/components/block-switcher/index.mjs.map +2 -2
  763. package/build-module/components/block-switcher/pattern-transformations-menu.mjs.map +2 -2
  764. package/build-module/components/block-switcher/preview-block-popover.mjs.map +2 -2
  765. package/build-module/components/block-switcher/use-transformed-patterns.mjs.map +2 -2
  766. package/build-module/components/block-switcher/utils.mjs.map +2 -2
  767. package/build-module/components/block-title/index.mjs.map +2 -2
  768. package/build-module/components/block-title/use-block-display-title.mjs.map +2 -2
  769. package/build-module/components/block-toolbar/block-styles-dropdown.mjs.map +2 -2
  770. package/build-module/components/block-toolbar/block-toolbar-icon.mjs.map +2 -2
  771. package/build-module/components/block-toolbar/block-toolbar-last-item.mjs.map +2 -2
  772. package/build-module/components/block-toolbar/change-design.mjs.map +2 -2
  773. package/build-module/components/block-toolbar/edit-section-button.mjs.map +2 -2
  774. package/build-module/components/block-toolbar/index.mjs.map +2 -2
  775. package/build-module/components/block-toolbar/pattern-overrides-dropdown.mjs.map +2 -2
  776. package/build-module/components/block-toolbar/switch-section-style.mjs.map +2 -2
  777. package/build-module/components/block-toolbar/use-has-block-toolbar.mjs.map +2 -2
  778. package/build-module/components/block-toolbar/utils.mjs.map +2 -2
  779. package/build-module/components/block-tools/block-toolbar-popover.mjs.map +2 -2
  780. package/build-module/components/block-tools/empty-block-inserter.mjs.map +2 -2
  781. package/build-module/components/block-tools/index.mjs +3 -9
  782. package/build-module/components/block-tools/index.mjs.map +2 -2
  783. package/build-module/components/block-tools/insertion-point.mjs.map +2 -2
  784. package/build-module/components/block-tools/use-block-toolbar-popover-props.mjs.map +2 -2
  785. package/build-module/components/block-tools/use-selected-block-tool-props.mjs.map +2 -2
  786. package/build-module/components/block-tools/use-show-block-tools.mjs.map +2 -2
  787. package/build-module/components/block-tools/zoom-out-mode-inserter-button.mjs.map +2 -2
  788. package/build-module/components/block-tools/zoom-out-mode-inserters.mjs.map +2 -2
  789. package/build-module/components/block-types-list/index.mjs.map +2 -2
  790. package/build-module/components/block-variation-picker/index.mjs.map +2 -2
  791. package/build-module/components/block-variation-transforms/index.mjs.map +2 -2
  792. package/build-module/components/block-vertical-alignment-control/index.mjs.map +2 -2
  793. package/build-module/components/block-vertical-alignment-control/ui.mjs.map +2 -2
  794. package/build-module/components/block-visibility/constants.mjs +1 -1
  795. package/build-module/components/block-visibility/constants.mjs.map +3 -3
  796. package/build-module/components/block-visibility/modal.mjs.map +2 -2
  797. package/build-module/components/block-visibility/use-block-visibility.mjs +15 -17
  798. package/build-module/components/block-visibility/use-block-visibility.mjs.map +3 -3
  799. package/build-module/components/block-visibility/utils.mjs.map +2 -2
  800. package/build-module/components/block-visibility/viewport-menu-item.mjs.map +2 -2
  801. package/build-module/components/block-visibility/viewport-toolbar.mjs.map +2 -2
  802. package/build-module/components/block-visibility/viewport-visibility-info.mjs.map +2 -2
  803. package/build-module/components/border-radius-control/constants.mjs.map +2 -2
  804. package/build-module/components/border-radius-control/index.mjs.map +2 -2
  805. package/build-module/components/border-radius-control/linked-button.mjs.map +2 -2
  806. package/build-module/components/border-radius-control/utils.mjs.map +2 -2
  807. package/build-module/components/button-block-appender/index.mjs.map +2 -2
  808. package/build-module/components/child-layout-control/index.mjs +5 -5
  809. package/build-module/components/child-layout-control/index.mjs.map +2 -2
  810. package/build-module/components/collab/note-icon-slot.mjs.map +2 -2
  811. package/build-module/components/collab/note-icon-toolbar-slot.mjs.map +2 -2
  812. package/build-module/components/color-palette/control.mjs.map +2 -2
  813. package/build-module/components/color-palette/index.mjs.map +2 -2
  814. package/build-module/components/color-palette/with-color-context.mjs.map +2 -2
  815. package/build-module/components/color-style-selector/index.mjs.map +2 -2
  816. package/build-module/components/colors/utils.mjs +1 -3
  817. package/build-module/components/colors/utils.mjs.map +2 -2
  818. package/build-module/components/colors/with-colors.mjs +57 -75
  819. package/build-module/components/colors/with-colors.mjs.map +2 -2
  820. package/build-module/components/colors-gradients/control.mjs.map +2 -2
  821. package/build-module/components/colors-gradients/dropdown.mjs.map +2 -2
  822. package/build-module/components/colors-gradients/panel-color-gradient-settings.mjs +5 -5
  823. package/build-module/components/colors-gradients/panel-color-gradient-settings.mjs.map +2 -2
  824. package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.mjs.map +2 -2
  825. package/build-module/components/contrast-checker/index.mjs.map +2 -2
  826. package/build-module/components/convert-to-group-buttons/index.mjs +2 -5
  827. package/build-module/components/convert-to-group-buttons/index.mjs.map +2 -2
  828. package/build-module/components/convert-to-group-buttons/toolbar.mjs +3 -5
  829. package/build-module/components/convert-to-group-buttons/toolbar.mjs.map +2 -2
  830. package/build-module/components/convert-to-group-buttons/use-convert-to-group-button-props.mjs.map +2 -2
  831. package/build-module/components/copy-handler/index.mjs.map +2 -2
  832. package/build-module/components/date-format-picker/index.mjs.map +2 -2
  833. package/build-module/components/default-block-appender/index.mjs.map +2 -2
  834. package/build-module/components/dimension-control/index.mjs.map +2 -2
  835. package/build-module/components/dimensions-tool/aspect-ratio-tool.mjs +4 -2
  836. package/build-module/components/dimensions-tool/aspect-ratio-tool.mjs.map +2 -2
  837. package/build-module/components/dimensions-tool/index.mjs +19 -17
  838. package/build-module/components/dimensions-tool/index.mjs.map +2 -2
  839. package/build-module/components/dimensions-tool/scale-tool.mjs.map +2 -2
  840. package/build-module/components/dimensions-tool/utils.mjs +35 -0
  841. package/build-module/components/dimensions-tool/utils.mjs.map +7 -0
  842. package/build-module/components/dimensions-tool/width-height-tool.mjs.map +2 -2
  843. package/build-module/components/duotone-control/index.mjs +2 -0
  844. package/build-module/components/duotone-control/index.mjs.map +2 -2
  845. package/build-module/components/editable-text/index.mjs.map +2 -2
  846. package/build-module/components/editor-styles/index.mjs.map +2 -2
  847. package/build-module/components/fit-text-size-warning/index.mjs.map +2 -2
  848. package/build-module/components/font-appearance-control/index.mjs.map +2 -2
  849. package/build-module/components/font-family/index.mjs.map +2 -2
  850. package/build-module/components/font-sizes/font-size-picker.mjs.map +2 -2
  851. package/build-module/components/font-sizes/utils.mjs +1 -3
  852. package/build-module/components/font-sizes/utils.mjs.map +2 -2
  853. package/build-module/components/font-sizes/with-font-sizes.mjs.map +2 -2
  854. package/build-module/components/global-styles/advanced-panel.mjs +5 -2
  855. package/build-module/components/global-styles/advanced-panel.mjs.map +2 -2
  856. package/build-module/components/global-styles/background-panel.mjs.map +2 -2
  857. package/build-module/components/global-styles/border-panel.mjs +2 -5
  858. package/build-module/components/global-styles/border-panel.mjs.map +2 -2
  859. package/build-module/components/global-styles/color-gradient-dropdown-item.mjs.map +2 -2
  860. package/build-module/components/global-styles/color-panel.mjs +14 -2
  861. package/build-module/components/global-styles/color-panel.mjs.map +2 -2
  862. package/build-module/components/global-styles/dimensions-panel.mjs +9 -5
  863. package/build-module/components/global-styles/dimensions-panel.mjs.map +2 -2
  864. package/build-module/components/global-styles/filters-panel.mjs +16 -9
  865. package/build-module/components/global-styles/filters-panel.mjs.map +2 -2
  866. package/build-module/components/global-styles/hooks.mjs.map +2 -2
  867. package/build-module/components/global-styles/image-settings-panel.mjs.map +2 -2
  868. package/build-module/components/global-styles/inheritance/index.mjs.map +2 -2
  869. package/build-module/components/global-styles/inherited-value-context.mjs.map +2 -2
  870. package/build-module/components/global-styles/shadow-panel-components.mjs +16 -11
  871. package/build-module/components/global-styles/shadow-panel-components.mjs.map +2 -2
  872. package/build-module/components/global-styles/state-control-badges.mjs.map +2 -2
  873. package/build-module/components/global-styles/state-control.mjs.map +2 -2
  874. package/build-module/components/global-styles/typography-panel.mjs.map +2 -2
  875. package/build-module/components/global-styles/typography-utils.mjs.map +2 -2
  876. package/build-module/components/global-styles/utils.mjs +8 -0
  877. package/build-module/components/global-styles/utils.mjs.map +2 -2
  878. package/build-module/components/gradients/use-gradient.mjs.map +2 -2
  879. package/build-module/components/grid/grid-item-movers.mjs.map +2 -2
  880. package/build-module/components/grid/grid-item-resizer.mjs.map +2 -2
  881. package/build-module/components/grid/grid-visualizer.mjs.map +2 -2
  882. package/build-module/components/grid/use-get-number-of-blocks-before-cell.mjs.map +2 -2
  883. package/build-module/components/grid/use-grid-layout-sync.mjs.map +2 -2
  884. package/build-module/components/height-control/index.mjs.map +2 -2
  885. package/build-module/components/html-element-control/index.mjs.map +2 -2
  886. package/build-module/components/html-element-control/messages.mjs.map +2 -2
  887. package/build-module/components/iframe/index.mjs +19 -24
  888. package/build-module/components/iframe/index.mjs.map +2 -2
  889. package/build-module/components/iframe/use-scale-canvas.mjs +21 -7
  890. package/build-module/components/iframe/use-scale-canvas.mjs.map +2 -2
  891. package/build-module/components/image-editor/aspect-ratio-dropdown.mjs.map +2 -2
  892. package/build-module/components/image-editor/context.mjs.map +2 -2
  893. package/build-module/components/image-editor/cropper.mjs.map +2 -2
  894. package/build-module/components/image-editor/form-controls.mjs.map +2 -2
  895. package/build-module/components/image-editor/index.mjs.map +2 -2
  896. package/build-module/components/image-editor/rotation-button.mjs.map +2 -2
  897. package/build-module/components/image-editor/use-save-image.mjs.map +2 -2
  898. package/build-module/components/image-editor/use-transform-image.mjs.map +2 -2
  899. package/build-module/components/image-editor/zoom-dropdown.mjs.map +2 -2
  900. package/build-module/components/image-size-control/index.mjs.map +2 -2
  901. package/build-module/components/image-size-control/use-dimension-handler.mjs.map +2 -2
  902. package/build-module/components/inner-blocks/button-block-appender.mjs.map +2 -2
  903. package/build-module/components/inner-blocks/default-block-appender.mjs.map +2 -2
  904. package/build-module/components/inner-blocks/index.mjs +5 -3
  905. package/build-module/components/inner-blocks/index.mjs.map +2 -2
  906. package/build-module/components/inner-blocks/use-block-context.mjs.map +2 -2
  907. package/build-module/components/inner-blocks/use-inner-block-template-sync.mjs +35 -8
  908. package/build-module/components/inner-blocks/use-inner-block-template-sync.mjs.map +2 -2
  909. package/build-module/components/inner-blocks/use-nested-settings-update.mjs.map +2 -2
  910. package/build-module/components/inner-content/index.mjs.map +2 -2
  911. package/build-module/components/inserter/block-patterns-explorer/index.mjs +39 -22
  912. package/build-module/components/inserter/block-patterns-explorer/index.mjs.map +2 -2
  913. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.mjs +22 -56
  914. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.mjs.map +2 -2
  915. package/build-module/components/inserter/block-patterns-explorer/pattern-list.mjs +20 -45
  916. package/build-module/components/inserter/block-patterns-explorer/pattern-list.mjs.map +2 -2
  917. package/build-module/components/inserter/block-patterns-tab/index.mjs.map +2 -2
  918. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.mjs.map +2 -2
  919. package/build-module/components/inserter/block-patterns-tab/patterns-filter.mjs.map +2 -2
  920. package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.mjs.map +2 -2
  921. package/build-module/components/inserter/block-patterns-tab/utils.mjs.map +2 -2
  922. package/build-module/components/inserter/block-types-tab.mjs.map +2 -2
  923. package/build-module/components/inserter/category-tabs/index.mjs.map +2 -2
  924. package/build-module/components/inserter/hooks/use-block-types-state.mjs.map +2 -2
  925. package/build-module/components/inserter/hooks/use-insertion-point.mjs +4 -4
  926. package/build-module/components/inserter/hooks/use-insertion-point.mjs.map +2 -2
  927. package/build-module/components/inserter/hooks/use-patterns-paging.mjs.map +2 -2
  928. package/build-module/components/inserter/hooks/use-patterns-state.mjs.map +2 -2
  929. package/build-module/components/inserter/index.mjs +4 -13
  930. package/build-module/components/inserter/index.mjs.map +2 -2
  931. package/build-module/components/inserter/library.mjs.map +2 -2
  932. package/build-module/components/inserter/media-tab/hooks.mjs.map +2 -2
  933. package/build-module/components/inserter/media-tab/media-list.mjs.map +2 -2
  934. package/build-module/components/inserter/media-tab/media-panel.mjs.map +2 -2
  935. package/build-module/components/inserter/media-tab/media-preview.mjs.map +2 -2
  936. package/build-module/components/inserter/media-tab/media-tab.mjs.map +2 -2
  937. package/build-module/components/inserter/media-tab/utils.mjs.map +2 -2
  938. package/build-module/components/inserter/menu.mjs +19 -8
  939. package/build-module/components/inserter/menu.mjs.map +2 -2
  940. package/build-module/components/inserter/mobile-tab-navigation.mjs.map +2 -2
  941. package/build-module/components/inserter/no-results.mjs.map +2 -2
  942. package/build-module/components/inserter/panel.mjs.map +2 -2
  943. package/build-module/components/inserter/preview-panel.mjs.map +2 -2
  944. package/build-module/components/inserter/quick-inserter.mjs +30 -27
  945. package/build-module/components/inserter/quick-inserter.mjs.map +2 -2
  946. package/build-module/components/inserter/search-items.mjs.map +2 -2
  947. package/build-module/components/inserter/search-results.mjs.map +2 -2
  948. package/build-module/components/inserter/tips.mjs.map +2 -2
  949. package/build-module/components/inserter-draggable-blocks/index.mjs.map +2 -2
  950. package/build-module/components/inserter-list-item/index.mjs.map +2 -2
  951. package/build-module/components/inserter-listbox/context.mjs.map +2 -2
  952. package/build-module/components/inserter-listbox/group.mjs.map +2 -2
  953. package/build-module/components/inserter-listbox/index.mjs.map +2 -2
  954. package/build-module/components/inserter-listbox/item.mjs.map +2 -2
  955. package/build-module/components/inserter-listbox/row.mjs.map +2 -2
  956. package/build-module/components/inserter-menu-extension/index.mjs.map +2 -2
  957. package/build-module/components/inspector-controls/block-support-slot-container.mjs.map +2 -2
  958. package/build-module/components/inspector-controls/block-support-tools-panel.mjs.map +2 -2
  959. package/build-module/components/inspector-controls/fill.mjs +15 -17
  960. package/build-module/components/inspector-controls/fill.mjs.map +2 -2
  961. package/build-module/components/inspector-controls/groups.mjs.map +2 -2
  962. package/build-module/components/inspector-controls/index.mjs.map +2 -2
  963. package/build-module/components/inspector-controls/last-item.mjs.map +2 -2
  964. package/build-module/components/inspector-controls/list-view-content-popover.mjs.map +2 -2
  965. package/build-module/components/inspector-controls/slot.mjs.map +2 -2
  966. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.mjs.map +2 -2
  967. package/build-module/components/inspector-controls-tabs/content-tab.mjs.map +2 -2
  968. package/build-module/components/inspector-controls-tabs/index.mjs.map +2 -2
  969. package/build-module/components/inspector-controls-tabs/position-controls-panel.mjs.map +2 -2
  970. package/build-module/components/inspector-controls-tabs/settings-tab.mjs.map +2 -2
  971. package/build-module/components/inspector-controls-tabs/styles-tab.mjs +1 -1
  972. package/build-module/components/inspector-controls-tabs/styles-tab.mjs.map +2 -2
  973. package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.mjs.map +2 -2
  974. package/build-module/components/inspector-controls-tabs/utils.mjs.map +2 -2
  975. package/build-module/components/inspector-popover-header/index.mjs.map +2 -2
  976. package/build-module/components/justify-content-control/index.mjs.map +2 -2
  977. package/build-module/components/justify-content-control/ui.mjs.map +2 -2
  978. package/build-module/components/keyboard-shortcuts/index.mjs.map +2 -2
  979. package/build-module/components/letter-spacing-control/index.mjs.map +2 -2
  980. package/build-module/components/line-height-control/index.mjs.map +2 -2
  981. package/build-module/components/link-control/constants.mjs.map +2 -2
  982. package/build-module/components/link-control/index.mjs.map +2 -2
  983. package/build-module/components/link-control/is-url-like.mjs.map +2 -2
  984. package/build-module/components/link-control/link-preview.mjs.map +2 -2
  985. package/build-module/components/link-control/normalize-url.mjs.map +2 -2
  986. package/build-module/components/link-control/search-create-button.mjs.map +2 -2
  987. package/build-module/components/link-control/search-input.mjs.map +2 -2
  988. package/build-module/components/link-control/search-item.mjs.map +2 -2
  989. package/build-module/components/link-control/search-results.mjs +1 -1
  990. package/build-module/components/link-control/search-results.mjs.map +2 -2
  991. package/build-module/components/link-control/settings-drawer.mjs.map +2 -2
  992. package/build-module/components/link-control/settings.mjs.map +2 -2
  993. package/build-module/components/link-control/use-create-page.mjs.map +2 -2
  994. package/build-module/components/link-control/use-internal-value.mjs.map +2 -2
  995. package/build-module/components/link-control/use-rich-url-data.mjs +1 -1
  996. package/build-module/components/link-control/use-rich-url-data.mjs.map +2 -2
  997. package/build-module/components/link-control/use-search-handler.mjs.map +2 -2
  998. package/build-module/components/link-control/viewer-slot.mjs.map +2 -2
  999. package/build-module/components/link-picker/link-picker.mjs.map +2 -2
  1000. package/build-module/components/link-picker/link-preview.mjs.map +2 -2
  1001. package/build-module/components/list-view/appender.mjs +7 -4
  1002. package/build-module/components/list-view/appender.mjs.map +2 -2
  1003. package/build-module/components/list-view/aria-referenced-text.mjs +2 -9
  1004. package/build-module/components/list-view/aria-referenced-text.mjs.map +2 -2
  1005. package/build-module/components/list-view/block-contents.mjs +18 -21
  1006. package/build-module/components/list-view/block-contents.mjs.map +2 -2
  1007. package/build-module/components/list-view/block-select-button.mjs +49 -26
  1008. package/build-module/components/list-view/block-select-button.mjs.map +2 -2
  1009. package/build-module/components/list-view/block.mjs +40 -47
  1010. package/build-module/components/list-view/block.mjs.map +2 -2
  1011. package/build-module/components/list-view/branch.mjs +100 -80
  1012. package/build-module/components/list-view/branch.mjs.map +2 -2
  1013. package/build-module/components/list-view/context.mjs +11 -1
  1014. package/build-module/components/list-view/context.mjs.map +2 -2
  1015. package/build-module/components/list-view/drop-indicator.mjs +6 -6
  1016. package/build-module/components/list-view/drop-indicator.mjs.map +2 -2
  1017. package/build-module/components/list-view/expander.mjs.map +2 -2
  1018. package/build-module/components/list-view/index.mjs +119 -100
  1019. package/build-module/components/list-view/index.mjs.map +3 -3
  1020. package/build-module/components/list-view/leaf.mjs.map +2 -2
  1021. package/build-module/components/list-view/use-block-selection.mjs.map +2 -2
  1022. package/build-module/components/list-view/use-clipboard-handler.mjs.map +2 -2
  1023. package/build-module/components/list-view/use-list-view-block-indexes.mjs.map +2 -2
  1024. package/build-module/components/list-view/use-list-view-client-ids.mjs.map +2 -2
  1025. package/build-module/components/list-view/use-list-view-collapse-items.mjs +3 -4
  1026. package/build-module/components/list-view/use-list-view-collapse-items.mjs.map +2 -2
  1027. package/build-module/components/list-view/use-list-view-drop-zone.mjs +7 -13
  1028. package/build-module/components/list-view/use-list-view-drop-zone.mjs.map +2 -2
  1029. package/build-module/components/list-view/use-list-view-expand-selected-item.mjs +3 -3
  1030. package/build-module/components/list-view/use-list-view-expand-selected-item.mjs.map +2 -2
  1031. package/build-module/components/list-view/use-list-view-images.mjs +4 -3
  1032. package/build-module/components/list-view/use-list-view-images.mjs.map +2 -2
  1033. package/build-module/components/list-view/use-list-view-scroll-into-view.mjs.map +2 -2
  1034. package/build-module/components/list-view/utils.mjs +18 -4
  1035. package/build-module/components/list-view/utils.mjs.map +2 -2
  1036. package/build-module/components/media-placeholder/index.mjs +3 -3
  1037. package/build-module/components/media-placeholder/index.mjs.map +2 -2
  1038. package/build-module/components/media-replace-flow/index.mjs.map +2 -2
  1039. package/build-module/components/media-upload/check.mjs.map +2 -2
  1040. package/build-module/components/media-upload/index.mjs.map +2 -2
  1041. package/build-module/components/multi-selection-inspector/index.mjs +33 -12
  1042. package/build-module/components/multi-selection-inspector/index.mjs.map +2 -2
  1043. package/build-module/components/navigable-toolbar/index.mjs +30 -18
  1044. package/build-module/components/navigable-toolbar/index.mjs.map +2 -2
  1045. package/build-module/components/observe-typing/index.mjs.map +2 -2
  1046. package/build-module/components/panel-color-settings/index.mjs.map +2 -2
  1047. package/build-module/components/plain-text/index.mjs.map +2 -2
  1048. package/build-module/components/preset-input-control/custom-value-controls.mjs.map +2 -2
  1049. package/build-module/components/preset-input-control/index.mjs.map +2 -2
  1050. package/build-module/components/preview-options/index.mjs.map +2 -2
  1051. package/build-module/components/provider/block-refs-provider.mjs.map +2 -2
  1052. package/build-module/components/provider/index.mjs +6 -2
  1053. package/build-module/components/provider/index.mjs.map +2 -2
  1054. package/build-module/components/provider/selection-context.mjs.map +2 -2
  1055. package/build-module/components/provider/use-block-sync.mjs.map +2 -2
  1056. package/build-module/components/provider/use-media-upload-settings.mjs.map +2 -2
  1057. package/build-module/components/provider/with-registry-provider.mjs.map +2 -2
  1058. package/build-module/components/publish-date-time-picker/index.mjs +3 -2
  1059. package/build-module/components/publish-date-time-picker/index.mjs.map +2 -2
  1060. package/build-module/components/recursion-provider/index.mjs.map +2 -2
  1061. package/build-module/components/resizable-box-popover/index.mjs.map +2 -2
  1062. package/build-module/components/resolution-tool/index.mjs.map +2 -2
  1063. package/build-module/components/responsive-block-control/index.mjs.map +2 -2
  1064. package/build-module/components/responsive-block-control/label.mjs.map +2 -2
  1065. package/build-module/components/rich-text/content.mjs.map +2 -2
  1066. package/build-module/components/rich-text/event-listeners/before-input-rules.mjs.map +2 -2
  1067. package/build-module/components/rich-text/event-listeners/delete.mjs.map +2 -2
  1068. package/build-module/components/rich-text/event-listeners/enter.mjs +46 -39
  1069. package/build-module/components/rich-text/event-listeners/enter.mjs.map +2 -2
  1070. package/build-module/components/rich-text/event-listeners/firefox-compat.mjs.map +2 -2
  1071. package/build-module/components/rich-text/event-listeners/index.mjs.map +2 -2
  1072. package/build-module/components/rich-text/event-listeners/input-events.mjs.map +2 -2
  1073. package/build-module/components/rich-text/event-listeners/input-rules.mjs +13 -10
  1074. package/build-module/components/rich-text/event-listeners/input-rules.mjs.map +2 -2
  1075. package/build-module/components/rich-text/event-listeners/insert-replacement-text.mjs.map +2 -2
  1076. package/build-module/components/rich-text/event-listeners/paste-handler.mjs +8 -1
  1077. package/build-module/components/rich-text/event-listeners/paste-handler.mjs.map +2 -2
  1078. package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.mjs.map +2 -2
  1079. package/build-module/components/rich-text/event-listeners/shortcuts.mjs.map +2 -2
  1080. package/build-module/components/rich-text/event-listeners/undo-automatic-change.mjs.map +2 -2
  1081. package/build-module/components/rich-text/format-edit.mjs.map +2 -2
  1082. package/build-module/components/rich-text/format-toolbar/index.mjs.map +2 -2
  1083. package/build-module/components/rich-text/format-toolbar-container.mjs.map +2 -2
  1084. package/build-module/components/rich-text/get-rich-text-values.mjs.map +2 -2
  1085. package/build-module/components/rich-text/index.mjs +7 -5
  1086. package/build-module/components/rich-text/index.mjs.map +2 -2
  1087. package/build-module/components/rich-text/multiline.mjs +112 -72
  1088. package/build-module/components/rich-text/multiline.mjs.map +2 -2
  1089. package/build-module/components/rich-text/prevent-event-discovery.mjs.map +2 -2
  1090. package/build-module/components/rich-text/toolbar-button.mjs.map +2 -2
  1091. package/build-module/components/rich-text/use-mark-persistent.mjs.map +2 -2
  1092. package/build-module/components/rich-text/utils.mjs.map +2 -2
  1093. package/build-module/components/rich-text/with-deprecations.mjs.map +2 -2
  1094. package/build-module/components/selection-scroll-into-view/index.mjs.map +2 -2
  1095. package/build-module/components/skip-to-selected-block/index.mjs.map +2 -2
  1096. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.mjs.map +2 -2
  1097. package/build-module/components/spacing-sizes-control/index.mjs +2 -2
  1098. package/build-module/components/spacing-sizes-control/index.mjs.map +2 -2
  1099. package/build-module/components/spacing-sizes-control/input-controls/axial.mjs.map +2 -2
  1100. package/build-module/components/spacing-sizes-control/input-controls/separated.mjs.map +2 -2
  1101. package/build-module/components/spacing-sizes-control/input-controls/single.mjs.map +2 -2
  1102. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.mjs.map +2 -2
  1103. package/build-module/components/spacing-sizes-control/linked-button.mjs.map +2 -2
  1104. package/build-module/components/spacing-sizes-control/utils.mjs.map +2 -2
  1105. package/build-module/components/tabbed-sidebar/index.mjs.map +2 -2
  1106. package/build-module/components/text-alignment-control/index.mjs.map +2 -2
  1107. package/build-module/components/text-decoration-control/index.mjs.map +2 -2
  1108. package/build-module/components/text-indent-control/index.mjs.map +2 -2
  1109. package/build-module/components/text-transform-control/index.mjs.map +2 -2
  1110. package/build-module/components/tool-selector/index.mjs.map +2 -2
  1111. package/build-module/components/typewriter/index.mjs.map +2 -2
  1112. package/build-module/components/unit-control/index.mjs.map +2 -2
  1113. package/build-module/components/url-input/button.mjs.map +2 -2
  1114. package/build-module/components/url-input/index.mjs +30 -48
  1115. package/build-module/components/url-input/index.mjs.map +2 -2
  1116. package/build-module/components/url-popover/image-url-input-ui.mjs +2 -2
  1117. package/build-module/components/url-popover/image-url-input-ui.mjs.map +2 -2
  1118. package/build-module/components/url-popover/index.mjs.map +2 -2
  1119. package/build-module/components/url-popover/link-editor.mjs.map +2 -2
  1120. package/build-module/components/url-popover/link-viewer-url.mjs.map +2 -2
  1121. package/build-module/components/url-popover/link-viewer.mjs.map +2 -2
  1122. package/build-module/components/use-block-commands/index.mjs +2 -1
  1123. package/build-module/components/use-block-commands/index.mjs.map +2 -2
  1124. package/build-module/components/use-block-display-information/index.mjs +2 -1
  1125. package/build-module/components/use-block-display-information/index.mjs.map +2 -2
  1126. package/build-module/components/use-block-drop-zone/index.mjs.map +2 -2
  1127. package/build-module/components/use-flash-editable-blocks/index.mjs.map +2 -2
  1128. package/build-module/components/use-list-view-panel-state/index.mjs.map +2 -2
  1129. package/build-module/components/use-moving-animation/index.mjs +2 -2
  1130. package/build-module/components/use-moving-animation/index.mjs.map +2 -2
  1131. package/build-module/components/use-on-block-drop/index.mjs.map +2 -2
  1132. package/build-module/components/use-paste-styles/index.mjs.map +2 -2
  1133. package/build-module/components/use-resize-canvas/index.mjs.map +2 -2
  1134. package/build-module/components/use-settings/index.mjs.map +2 -2
  1135. package/build-module/components/warning/index.mjs.map +2 -2
  1136. package/build-module/components/writing-flow/index.mjs.map +2 -2
  1137. package/build-module/components/writing-flow/use-arrow-nav.mjs +11 -2
  1138. package/build-module/components/writing-flow/use-arrow-nav.mjs.map +2 -2
  1139. package/build-module/components/writing-flow/use-click-selection.mjs.map +2 -2
  1140. package/build-module/components/writing-flow/use-clipboard-handler.mjs +31 -5
  1141. package/build-module/components/writing-flow/use-clipboard-handler.mjs.map +2 -2
  1142. package/build-module/components/writing-flow/use-drag-selection.mjs.map +2 -2
  1143. package/build-module/components/writing-flow/use-editable-root-event-handlers.mjs.map +2 -2
  1144. package/build-module/components/writing-flow/use-editable-root.mjs.map +2 -2
  1145. package/build-module/components/writing-flow/use-home-end.mjs.map +2 -2
  1146. package/build-module/components/writing-flow/use-input.mjs +66 -14
  1147. package/build-module/components/writing-flow/use-input.mjs.map +3 -3
  1148. package/build-module/components/writing-flow/use-multi-selection.mjs.map +2 -2
  1149. package/build-module/components/writing-flow/use-preview-mode-nav.mjs.map +2 -2
  1150. package/build-module/components/writing-flow/use-select-all.mjs.map +2 -2
  1151. package/build-module/components/writing-flow/use-selection-observer.mjs.map +2 -2
  1152. package/build-module/components/writing-flow/use-tab-nav.mjs +3 -1
  1153. package/build-module/components/writing-flow/use-tab-nav.mjs.map +2 -2
  1154. package/build-module/components/writing-flow/utils.mjs.map +2 -2
  1155. package/build-module/components/writing-mode-control/index.mjs.map +2 -2
  1156. package/build-module/hooks/align.mjs.map +2 -2
  1157. package/build-module/hooks/allowed-blocks.mjs.map +2 -2
  1158. package/build-module/hooks/anchor.mjs.map +2 -2
  1159. package/build-module/hooks/aria-label.mjs.map +2 -2
  1160. package/build-module/hooks/auto-inspector-controls.mjs.map +2 -2
  1161. package/build-module/hooks/background.mjs +1 -4
  1162. package/build-module/hooks/background.mjs.map +2 -2
  1163. package/build-module/hooks/block-bindings.mjs.map +2 -2
  1164. package/build-module/hooks/block-fields/fields-dropdown-menu.mjs.map +2 -2
  1165. package/build-module/hooks/block-fields/index.mjs.map +2 -2
  1166. package/build-module/hooks/block-fields/link/index.mjs.map +2 -2
  1167. package/build-module/hooks/block-fields/media/index.mjs.map +2 -2
  1168. package/build-module/hooks/block-fields/rich-text/index.mjs.map +2 -2
  1169. package/build-module/hooks/block-fields/use-inspector-popover-placement.mjs.map +2 -2
  1170. package/build-module/hooks/block-hooks.mjs.map +2 -2
  1171. package/build-module/hooks/block-renaming.mjs.map +2 -2
  1172. package/build-module/hooks/block-style-state.mjs.map +2 -2
  1173. package/build-module/hooks/block-style-variation.mjs.map +2 -2
  1174. package/build-module/hooks/border.mjs +26 -8
  1175. package/build-module/hooks/border.mjs.map +2 -2
  1176. package/build-module/hooks/color.mjs.map +2 -2
  1177. package/build-module/hooks/compat.mjs.map +2 -2
  1178. package/build-module/hooks/contrast-checker.mjs.map +2 -2
  1179. package/build-module/hooks/custom-class-name.mjs.map +2 -2
  1180. package/build-module/hooks/dimensions.mjs +9 -2
  1181. package/build-module/hooks/dimensions.mjs.map +2 -2
  1182. package/build-module/hooks/duotone.mjs +8 -4
  1183. package/build-module/hooks/duotone.mjs.map +2 -2
  1184. package/build-module/hooks/elements.mjs.map +2 -2
  1185. package/build-module/hooks/fit-text.mjs.map +2 -2
  1186. package/build-module/hooks/font-family.mjs +1 -3
  1187. package/build-module/hooks/font-family.mjs.map +2 -2
  1188. package/build-module/hooks/font-size.mjs.map +2 -2
  1189. package/build-module/hooks/gap.mjs +6 -1
  1190. package/build-module/hooks/gap.mjs.map +2 -2
  1191. package/build-module/hooks/generated-class-name.mjs.map +2 -2
  1192. package/build-module/hooks/grid-visualizer.mjs.map +2 -2
  1193. package/build-module/hooks/index.mjs.map +2 -2
  1194. package/build-module/hooks/layout-child.mjs +36 -13
  1195. package/build-module/hooks/layout-child.mjs.map +2 -2
  1196. package/build-module/hooks/layout.mjs +24 -4
  1197. package/build-module/hooks/layout.mjs.map +2 -2
  1198. package/build-module/hooks/line-height.mjs.map +2 -2
  1199. package/build-module/hooks/list-view.mjs.map +2 -2
  1200. package/build-module/hooks/lock.mjs.map +2 -2
  1201. package/build-module/hooks/metadata.mjs.map +2 -2
  1202. package/build-module/hooks/position.mjs.map +2 -2
  1203. package/build-module/hooks/settings.mjs.map +2 -2
  1204. package/build-module/hooks/spacing-visualizer.mjs.map +2 -2
  1205. package/build-module/hooks/state-utils.mjs.map +2 -2
  1206. package/build-module/hooks/states.mjs +8 -5
  1207. package/build-module/hooks/states.mjs.map +2 -2
  1208. package/build-module/hooks/style.mjs.map +2 -2
  1209. package/build-module/hooks/supports.mjs.map +2 -2
  1210. package/build-module/hooks/text-align.mjs.map +2 -2
  1211. package/build-module/hooks/typography.mjs.map +2 -2
  1212. package/build-module/hooks/use-border-props.mjs.map +2 -2
  1213. package/build-module/hooks/use-cached-truthy.mjs.map +2 -2
  1214. package/build-module/hooks/use-color-props.mjs.map +2 -2
  1215. package/build-module/hooks/use-content-only-section-edit.mjs.map +2 -2
  1216. package/build-module/hooks/use-dimensions-props.mjs.map +2 -2
  1217. package/build-module/hooks/use-shadow-props.mjs.map +2 -2
  1218. package/build-module/hooks/use-spacing-props.mjs.map +2 -2
  1219. package/build-module/hooks/use-typography-props.mjs +1 -3
  1220. package/build-module/hooks/use-typography-props.mjs.map +2 -2
  1221. package/build-module/hooks/use-zoom-out.mjs.map +2 -2
  1222. package/build-module/hooks/utils.mjs.map +2 -2
  1223. package/build-module/index.mjs.map +2 -2
  1224. package/build-module/layouts/constrained.mjs +8 -1
  1225. package/build-module/layouts/constrained.mjs.map +2 -2
  1226. package/build-module/layouts/flex.mjs +9 -0
  1227. package/build-module/layouts/flex.mjs.map +2 -2
  1228. package/build-module/layouts/flow.mjs +4 -1
  1229. package/build-module/layouts/flow.mjs.map +2 -2
  1230. package/build-module/layouts/grid.mjs +5 -1
  1231. package/build-module/layouts/grid.mjs.map +2 -2
  1232. package/build-module/layouts/index.mjs.map +2 -2
  1233. package/build-module/layouts/utils.mjs.map +2 -2
  1234. package/build-module/lock-unlock.mjs.map +2 -2
  1235. package/build-module/private-apis.mjs +3 -1
  1236. package/build-module/private-apis.mjs.map +2 -2
  1237. package/build-module/store/actions.mjs +105 -37
  1238. package/build-module/store/actions.mjs.map +3 -3
  1239. package/build-module/store/defaults.mjs +2 -0
  1240. package/build-module/store/defaults.mjs.map +2 -2
  1241. package/build-module/store/get-block-settings.mjs.map +2 -2
  1242. package/build-module/store/index.mjs.map +2 -2
  1243. package/build-module/store/private-actions.mjs +19 -2
  1244. package/build-module/store/private-actions.mjs.map +2 -2
  1245. package/build-module/store/private-selectors.mjs +27 -10
  1246. package/build-module/store/private-selectors.mjs.map +2 -2
  1247. package/build-module/store/reducer.mjs +3 -1
  1248. package/build-module/store/reducer.mjs.map +2 -2
  1249. package/build-module/store/selectors.mjs +21 -8
  1250. package/build-module/store/selectors.mjs.map +2 -2
  1251. package/build-module/store/utils.mjs.map +2 -2
  1252. package/build-module/utils/fit-text-frontend.mjs.map +2 -2
  1253. package/build-module/utils/format-font-style.mjs.map +2 -2
  1254. package/build-module/utils/format-font-weight.mjs.map +2 -2
  1255. package/build-module/utils/get-font-styles-and-weights.mjs.map +2 -2
  1256. package/build-module/utils/group-blocks.mjs +21 -0
  1257. package/build-module/utils/group-blocks.mjs.map +7 -0
  1258. package/build-module/utils/native-undo.mjs.map +2 -2
  1259. package/build-module/utils/pasting.mjs.map +2 -2
  1260. package/build-module/utils/selection.mjs.map +2 -2
  1261. package/build-module/utils/sibling-block-attributes.mjs +20 -0
  1262. package/build-module/utils/sibling-block-attributes.mjs.map +7 -0
  1263. package/build-module/utils/transform-styles/index.mjs.map +2 -2
  1264. package/build-module/utils/use-notify-copy.mjs.map +2 -2
  1265. package/build-style/content-rtl.css +2 -2
  1266. package/build-style/content.css +2 -2
  1267. package/build-style/style-rtl.css +145 -76
  1268. package/build-style/style.css +145 -76
  1269. package/build-types/components/block-context/index.d.ts.map +1 -1
  1270. package/build-types/components/block-visibility/constants.d.ts +45 -0
  1271. package/build-types/components/block-visibility/constants.d.ts.map +1 -0
  1272. package/build-types/components/block-visibility/use-block-visibility.d.ts +35 -0
  1273. package/build-types/components/block-visibility/use-block-visibility.d.ts.map +1 -0
  1274. package/build-types/lock-unlock.d.ts +2 -0
  1275. package/build-types/lock-unlock.d.ts.map +1 -0
  1276. package/build-types/utils/fit-text-frontend.d.ts +0 -5
  1277. package/build-types/utils/fit-text-frontend.d.ts.map +1 -1
  1278. package/build-types/utils/format-font-style.d.ts +0 -3
  1279. package/build-types/utils/format-font-style.d.ts.map +1 -1
  1280. package/build-types/utils/format-font-weight.d.ts +0 -3
  1281. package/build-types/utils/format-font-weight.d.ts.map +1 -1
  1282. package/build-types/utils/get-font-styles-and-weights.d.ts.map +1 -1
  1283. package/build-types/utils/pasting.d.ts.map +1 -1
  1284. package/build-types/utils/selection.d.ts.map +1 -1
  1285. package/build-types/utils/transform-styles/index.d.ts +0 -3
  1286. package/build-types/utils/transform-styles/index.d.ts.map +1 -1
  1287. package/package.json +43 -42
  1288. package/src/autocompleters/block.js +0 -7
  1289. package/src/autocompleters/test/block.js +0 -7
  1290. package/src/components/alignment-control/index.js +0 -3
  1291. package/src/components/alignment-control/stories/aliginment-toolbar.story.jsx +0 -7
  1292. package/src/components/alignment-control/stories/index.story.jsx +0 -7
  1293. package/src/components/alignment-control/test/index.js +0 -11
  1294. package/src/components/alignment-control/ui.js +0 -3
  1295. package/src/components/autocomplete/index.js +0 -7
  1296. package/src/components/background-image-control/README.md +122 -0
  1297. package/src/components/background-image-control/index.js +0 -12
  1298. package/src/components/background-image-control/test/index.js +0 -4
  1299. package/src/components/block-actions/README.md +67 -0
  1300. package/src/components/block-actions/index.js +3 -14
  1301. package/src/components/block-alignment-control/constants.js +0 -3
  1302. package/src/components/block-alignment-control/index.js +0 -3
  1303. package/src/components/block-alignment-control/test/index.js +0 -7
  1304. package/src/components/block-alignment-control/ui.js +0 -11
  1305. package/src/components/block-alignment-control/use-available-alignments.js +0 -7
  1306. package/src/components/block-alignment-matrix-control/index.js +0 -3
  1307. package/src/components/block-alignment-matrix-control/stories/index.story.jsx +0 -7
  1308. package/src/components/block-allowed-blocks/allowed-blocks-control.js +0 -7
  1309. package/src/components/block-allowed-blocks/modal.js +0 -7
  1310. package/src/components/block-bindings/attribute-control.js +10 -11
  1311. package/src/components/block-bindings/index.js +0 -3
  1312. package/src/components/block-bindings/source-fields-list.js +0 -11
  1313. package/src/components/block-bindings/test/use-block-bindings-utils.js +1 -12
  1314. package/src/components/block-bindings/use-block-bindings-utils.js +0 -7
  1315. package/src/components/block-breadcrumb/index.js +0 -7
  1316. package/src/components/block-breadcrumb/test/index.js +0 -7
  1317. package/src/components/block-canvas/index.js +0 -7
  1318. package/src/components/block-card/index.js +0 -11
  1319. package/src/components/block-compare/block-view.js +0 -3
  1320. package/src/components/block-compare/index.js +0 -11
  1321. package/src/components/block-compare/test/block-view.js +0 -7
  1322. package/src/components/block-content-overlay/index.js +0 -7
  1323. package/src/components/block-context/README.md +0 -1
  1324. package/src/components/block-context/index.js +0 -3
  1325. package/src/components/block-controls/README.md +0 -3
  1326. package/src/components/block-controls/fill.js +0 -7
  1327. package/src/components/block-controls/groups.js +0 -3
  1328. package/src/components/block-controls/hook.js +0 -7
  1329. package/src/components/block-controls/index.js +0 -3
  1330. package/src/components/block-controls/slot.js +0 -7
  1331. package/src/components/block-controls/test/index.js +0 -11
  1332. package/src/components/block-draggable/draggable-chip.js +0 -7
  1333. package/src/components/block-draggable/index.js +0 -7
  1334. package/src/components/block-draggable/stories/index.story.jsx +0 -3
  1335. package/src/components/block-draggable/use-scroll-when-dragging.js +0 -3
  1336. package/src/components/block-edit/context.js +0 -3
  1337. package/src/components/block-edit/edit.js +0 -11
  1338. package/src/components/block-edit/index.js +0 -7
  1339. package/src/components/block-edit/multiple-usage-warning.js +0 -7
  1340. package/src/components/block-edit/test/edit.js +0 -11
  1341. package/src/components/block-edit-visually-button/README.md +39 -0
  1342. package/src/components/block-edit-visually-button/index.js +0 -7
  1343. package/src/components/block-editing-mode/README.md +72 -0
  1344. package/src/components/block-editing-mode/index.js +0 -7
  1345. package/src/components/block-full-height-alignment-control/index.js +0 -3
  1346. package/src/components/block-heading-level-dropdown/heading-level-icon.js +0 -3
  1347. package/src/components/block-heading-level-dropdown/index.js +0 -7
  1348. package/src/components/block-heading-level-dropdown/stories/index.story.jsx +0 -7
  1349. package/src/components/block-icon/index.js +0 -7
  1350. package/src/components/block-icon/stories/index.story.ts +0 -7
  1351. package/src/components/block-icon/test/index.js +0 -11
  1352. package/src/components/block-inspector/edit-contents.js +27 -32
  1353. package/src/components/block-inspector/index.js +13 -14
  1354. package/src/components/block-inspector/inspector-pre-tabs-slot-fill.js +0 -3
  1355. package/src/components/block-inspector/useBlockInspectorAnimationSettings.js +0 -7
  1356. package/src/components/block-keyboard-shortcuts/index.js +256 -0
  1357. package/src/components/block-list/README.md +98 -0
  1358. package/src/components/block-list/block-crash-boundary.js +0 -3
  1359. package/src/components/block-list/block-crash-warning.js +0 -7
  1360. package/src/components/block-list/block-html.js +0 -11
  1361. package/src/components/block-list/block-invalid-warning.js +0 -7
  1362. package/src/components/block-list/block.js +64 -23
  1363. package/src/components/block-list/index.js +69 -25
  1364. package/src/components/block-list/layout.js +0 -7
  1365. package/src/components/block-list/private-block-context.js +0 -3
  1366. package/src/components/block-list/subdirectory-icon.js +0 -3
  1367. package/src/components/block-list/use-block-props/index.js +57 -12
  1368. package/src/components/block-list/use-block-props/use-block-refs.js +0 -7
  1369. package/src/components/block-list/use-block-props/use-firefox-draggable-compatibility.js +0 -3
  1370. package/src/components/block-list/use-block-props/use-focus-first-element.js +5 -7
  1371. package/src/components/block-list/use-block-props/use-focus-handler.js +0 -7
  1372. package/src/components/block-list/use-block-props/use-intersection-observer.js +0 -7
  1373. package/src/components/block-list/use-block-props/use-is-hovered.js +0 -7
  1374. package/src/components/block-list/use-block-props/use-register-block-event-handlers.js +0 -7
  1375. package/src/components/block-list/use-block-props/use-scroll-into-view.js +0 -3
  1376. package/src/components/block-list/use-block-props/use-selected-block-event-handlers.js +6 -15
  1377. package/src/components/block-list/use-in-between-inserter.js +0 -7
  1378. package/src/components/block-list/zoom-out-separator.js +0 -11
  1379. package/src/components/block-list-appender/index.js +0 -11
  1380. package/src/components/block-lock/README.md +66 -0
  1381. package/src/components/block-lock/menu-item.js +0 -7
  1382. package/src/components/block-lock/modal.js +0 -7
  1383. package/src/components/block-lock/toolbar.js +0 -7
  1384. package/src/components/block-lock/use-block-lock.js +0 -7
  1385. package/src/components/block-manager/category.js +0 -7
  1386. package/src/components/block-manager/checklist.js +0 -7
  1387. package/src/components/block-manager/index.js +0 -7
  1388. package/src/components/block-mover/button.js +17 -26
  1389. package/src/components/block-mover/index.js +0 -12
  1390. package/src/components/block-mover/mover-description.js +0 -3
  1391. package/src/components/block-mover/stories/index.story.jsx +0 -7
  1392. package/src/components/block-mover/test/mover-description.js +0 -3
  1393. package/src/components/block-navigation/dropdown.js +0 -11
  1394. package/src/components/block-parent-selector/index.js +111 -37
  1395. package/src/components/block-pattern-setup/index.js +0 -8
  1396. package/src/components/block-pattern-setup/setup-toolbar.js +0 -7
  1397. package/src/components/block-pattern-setup/use-patterns-setup.js +0 -7
  1398. package/src/components/block-patterns-list/index.js +0 -11
  1399. package/src/components/block-patterns-list/stories/index.story.jsx +3 -10
  1400. package/src/components/block-patterns-paging/index.js +0 -3
  1401. package/src/components/block-popover/README.md +10 -3
  1402. package/src/components/block-popover/cover.js +0 -7
  1403. package/src/components/block-popover/drop-zone.js +0 -7
  1404. package/src/components/block-popover/inbetween.js +8 -13
  1405. package/src/components/block-popover/index.js +0 -11
  1406. package/src/components/block-popover/stories/index.story.jsx +143 -0
  1407. package/src/components/block-popover/use-popover-scroll.js +0 -3
  1408. package/src/components/block-preview/async.js +0 -3
  1409. package/src/components/block-preview/auto.js +0 -7
  1410. package/src/components/block-preview/index.js +0 -13
  1411. package/src/components/block-preview/test/index.js +0 -11
  1412. package/src/components/block-quick-navigation/index.js +0 -7
  1413. package/src/components/block-removal-warning-modal/index.js +0 -7
  1414. package/src/components/block-rename/modal.js +0 -7
  1415. package/src/components/block-rename/rename-control.js +0 -7
  1416. package/src/components/block-rename/use-block-rename.js +0 -3
  1417. package/src/components/block-selection-clearer/index.js +0 -7
  1418. package/src/components/block-selection-clearer/test/index.js +0 -11
  1419. package/src/components/block-settings-menu/block-html-convert-button.js +0 -7
  1420. package/src/components/block-settings-menu/block-mode-toggle.js +0 -7
  1421. package/src/components/block-settings-menu/block-parent-selector-menu-item.js +0 -7
  1422. package/src/components/block-settings-menu/block-settings-dropdown.js +1 -8
  1423. package/src/components/block-settings-menu/block-settings-menu-first-item.js +0 -3
  1424. package/src/components/block-settings-menu/index.js +0 -7
  1425. package/src/components/block-settings-menu/test/block-mode-toggle.js +0 -11
  1426. package/src/components/block-settings-menu-controls/index.js +0 -7
  1427. package/src/components/block-styles/index.js +95 -54
  1428. package/src/components/block-styles/menu-items.js +0 -3
  1429. package/src/components/block-styles/style.scss +5 -34
  1430. package/src/components/block-styles/test/utils.js +0 -3
  1431. package/src/components/block-styles/use-styles-for-block.js +0 -7
  1432. package/src/components/block-styles/utils.js +0 -3
  1433. package/src/components/block-switcher/block-styles-menu.js +0 -7
  1434. package/src/components/block-switcher/block-transformations-menu.js +0 -7
  1435. package/src/components/block-switcher/block-variation-transformations.js +0 -7
  1436. package/src/components/block-switcher/index.js +0 -7
  1437. package/src/components/block-switcher/pattern-transformations-menu.js +0 -8
  1438. package/src/components/block-switcher/preview-block-popover.js +0 -7
  1439. package/src/components/block-switcher/test/index.js +0 -11
  1440. package/src/components/block-switcher/test/use-transformed.patterns.js +0 -7
  1441. package/src/components/block-switcher/test/utils.js +0 -7
  1442. package/src/components/block-switcher/use-transformed-patterns.js +0 -7
  1443. package/src/components/block-switcher/utils.js +0 -3
  1444. package/src/components/block-title/index.js +0 -4
  1445. package/src/components/block-title/stories/index.story.jsx +0 -7
  1446. package/src/components/block-title/test/index.js +0 -11
  1447. package/src/components/block-title/use-block-display-title.js +0 -7
  1448. package/src/components/block-toolbar/block-styles-dropdown.js +0 -7
  1449. package/src/components/block-toolbar/block-toolbar-icon.js +0 -7
  1450. package/src/components/block-toolbar/block-toolbar-last-item.js +0 -3
  1451. package/src/components/block-toolbar/change-design.js +0 -7
  1452. package/src/components/block-toolbar/edit-section-button.js +0 -7
  1453. package/src/components/block-toolbar/index.js +0 -11
  1454. package/src/components/block-toolbar/pattern-overrides-dropdown.js +0 -7
  1455. package/src/components/block-toolbar/switch-section-style.js +0 -7
  1456. package/src/components/block-toolbar/test/block-toolbar-icon.js +0 -11
  1457. package/src/components/block-toolbar/use-has-block-toolbar.js +0 -6
  1458. package/src/components/block-toolbar/utils.js +0 -7
  1459. package/src/components/block-tools/block-toolbar-popover.js +0 -9
  1460. package/src/components/block-tools/empty-block-inserter.js +0 -7
  1461. package/src/components/block-tools/index.js +3 -20
  1462. package/src/components/block-tools/insertion-point.js +0 -11
  1463. package/src/components/block-tools/style.scss +94 -0
  1464. package/src/components/block-tools/use-block-toolbar-popover-props.js +0 -7
  1465. package/src/components/block-tools/use-selected-block-tool-props.js +0 -7
  1466. package/src/components/block-tools/use-show-block-tools.js +0 -7
  1467. package/src/components/block-tools/zoom-out-mode-inserter-button.js +0 -7
  1468. package/src/components/block-tools/zoom-out-mode-inserters.js +0 -7
  1469. package/src/components/block-types-list/index.js +0 -7
  1470. package/src/components/block-variation-picker/index.js +0 -7
  1471. package/src/components/block-variation-transforms/index.js +0 -7
  1472. package/src/components/block-vertical-alignment-control/index.js +0 -3
  1473. package/src/components/block-vertical-alignment-control/test/index.js +0 -7
  1474. package/src/components/block-vertical-alignment-control/ui.js +0 -3
  1475. package/src/components/block-visibility/{constants.js → constants.ts} +14 -7
  1476. package/src/components/block-visibility/modal.js +0 -11
  1477. package/src/components/block-visibility/test/use-block-visibility.js +0 -12
  1478. package/src/components/block-visibility/test/utils.js +0 -3
  1479. package/src/components/block-visibility/use-block-visibility.ts +92 -0
  1480. package/src/components/block-visibility/utils.js +0 -7
  1481. package/src/components/block-visibility/viewport-menu-item.js +0 -7
  1482. package/src/components/block-visibility/viewport-toolbar.js +0 -7
  1483. package/src/components/block-visibility/viewport-visibility-info.js +0 -7
  1484. package/src/components/border-radius-control/README.md +0 -3
  1485. package/src/components/border-radius-control/constants.js +0 -3
  1486. package/src/components/border-radius-control/index.js +0 -7
  1487. package/src/components/border-radius-control/linked-button.js +0 -3
  1488. package/src/components/border-radius-control/stories/index.story.jsx +0 -7
  1489. package/src/components/border-radius-control/test/index.js +0 -12
  1490. package/src/components/border-radius-control/test/utils.js +0 -3
  1491. package/src/components/border-radius-control/utils.js +0 -7
  1492. package/src/components/button-block-appender/index.js +0 -11
  1493. package/src/components/child-layout-control/index.js +5 -12
  1494. package/src/components/child-layout-control/test/index.js +0 -11
  1495. package/src/components/collab/note-icon-slot.js +0 -3
  1496. package/src/components/collab/note-icon-toolbar-slot.js +0 -3
  1497. package/src/components/color-palette/control.js +0 -3
  1498. package/src/components/color-palette/index.js +0 -7
  1499. package/src/components/color-palette/stories/control.story.jsx +0 -7
  1500. package/src/components/color-palette/test/__snapshots__/control.js.snap +3 -29
  1501. package/src/components/color-palette/test/control.js +0 -7
  1502. package/src/components/color-palette/with-color-context.js +0 -7
  1503. package/src/components/color-style-selector/index.js +0 -3
  1504. package/src/components/colors/test/utils.js +0 -3
  1505. package/src/components/colors/test/with-colors.js +6 -14
  1506. package/src/components/colors/utils.js +1 -15
  1507. package/src/components/colors/with-colors.js +84 -120
  1508. package/src/components/colors-gradients/control.js +0 -11
  1509. package/src/components/colors-gradients/dropdown.js +0 -15
  1510. package/src/components/colors-gradients/panel-color-gradient-settings.js +21 -28
  1511. package/src/components/colors-gradients/style.scss +17 -7
  1512. package/src/components/colors-gradients/test/control.js +0 -7
  1513. package/src/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +0 -7
  1514. package/src/components/contrast-checker/index.js +0 -7
  1515. package/src/components/contrast-checker/stories/index.story.ts +0 -3
  1516. package/src/components/contrast-checker/test/index.js +0 -11
  1517. package/src/components/convert-to-group-buttons/index.js +2 -13
  1518. package/src/components/convert-to-group-buttons/toolbar.js +3 -12
  1519. package/src/components/convert-to-group-buttons/use-convert-to-group-button-props.js +0 -7
  1520. package/src/components/copy-handler/index.js +0 -7
  1521. package/src/components/date-format-picker/index.js +0 -3
  1522. package/src/components/date-format-picker/stories/index.story.jsx +0 -7
  1523. package/src/components/default-block-appender/content.scss +6 -3
  1524. package/src/components/default-block-appender/index.js +0 -11
  1525. package/src/components/default-block-appender/test/index.js +0 -7
  1526. package/src/components/dimension-control/index.js +0 -11
  1527. package/src/components/dimension-control/stories/index.story.jsx +0 -7
  1528. package/src/components/dimensions-tool/aspect-ratio-tool.js +16 -10
  1529. package/src/components/dimensions-tool/index.js +34 -29
  1530. package/src/components/dimensions-tool/scale-tool.js +0 -3
  1531. package/src/components/dimensions-tool/stories/aspect-ratio-tool.story.jsx +0 -7
  1532. package/src/components/dimensions-tool/stories/index.story.jsx +0 -7
  1533. package/src/components/dimensions-tool/stories/scale-tool.story.jsx +0 -7
  1534. package/src/components/dimensions-tool/stories/width-height-tool.story.jsx +0 -7
  1535. package/src/components/dimensions-tool/test/index.js +166 -13
  1536. package/src/components/dimensions-tool/test/utils.js +51 -0
  1537. package/src/components/dimensions-tool/utils.js +67 -0
  1538. package/src/components/dimensions-tool/width-height-tool.js +0 -3
  1539. package/src/components/duotone-control/index.js +2 -3
  1540. package/src/components/duotone-control/test/index.js +100 -0
  1541. package/src/components/editable-text/index.js +0 -7
  1542. package/src/components/editor-styles/index.js +0 -11
  1543. package/src/components/fit-text-size-warning/index.js +0 -3
  1544. package/src/components/font-appearance-control/index.js +0 -7
  1545. package/src/components/font-family/index.js +0 -11
  1546. package/src/components/font-family/stories/index.story.jsx +0 -7
  1547. package/src/components/font-sizes/font-size-picker.js +0 -7
  1548. package/src/components/font-sizes/test/fluid-utils.js +0 -7
  1549. package/src/components/font-sizes/test/utils.js +0 -7
  1550. package/src/components/font-sizes/utils.js +1 -11
  1551. package/src/components/font-sizes/with-font-sizes.js +0 -7
  1552. package/src/components/global-styles/advanced-panel.js +5 -9
  1553. package/src/components/global-styles/background-panel.js +0 -7
  1554. package/src/components/global-styles/border-panel.js +11 -16
  1555. package/src/components/global-styles/color-gradient-dropdown-item.js +0 -11
  1556. package/src/components/global-styles/color-panel.js +13 -8
  1557. package/src/components/global-styles/dimensions-panel.js +17 -16
  1558. package/src/components/global-styles/filters-panel.js +24 -21
  1559. package/src/components/global-styles/hooks.js +0 -7
  1560. package/src/components/global-styles/image-settings-panel.js +0 -7
  1561. package/src/components/global-styles/inheritance/index.js +0 -7
  1562. package/src/components/global-styles/inheritance/test/index.js +0 -11
  1563. package/src/components/global-styles/inherited-value-context.js +0 -7
  1564. package/src/components/global-styles/shadow-panel-components.js +38 -23
  1565. package/src/components/global-styles/state-control-badges.js +0 -7
  1566. package/src/components/global-styles/state-control.js +0 -3
  1567. package/src/components/global-styles/test/background-panel.js +0 -8
  1568. package/src/components/global-styles/test/border-panel.js +230 -7
  1569. package/src/components/global-styles/test/color-panel.js +24 -7
  1570. package/src/components/global-styles/test/dimensions-panel.js +98 -14
  1571. package/src/components/global-styles/test/filters-panel.js +84 -7
  1572. package/src/components/global-styles/test/inherited-value-context-core.js +0 -11
  1573. package/src/components/global-styles/test/inherited-value-context.js +0 -12
  1574. package/src/components/global-styles/test/state-control-badges.js +0 -7
  1575. package/src/components/global-styles/test/typography-panel-core.js +0 -7
  1576. package/src/components/global-styles/test/typography-panel.js +0 -7
  1577. package/src/components/global-styles/test/typography-utils.js +0 -3
  1578. package/src/components/global-styles/test/utils.js +30 -0
  1579. package/src/components/global-styles/typography-panel.js +0 -7
  1580. package/src/components/global-styles/typography-utils.js +0 -3
  1581. package/src/components/global-styles/utils.js +23 -3
  1582. package/src/components/gradients/use-gradient.js +0 -7
  1583. package/src/components/grid/grid-item-movers.js +0 -11
  1584. package/src/components/grid/grid-item-resizer.js +0 -7
  1585. package/src/components/grid/grid-visualizer.js +0 -11
  1586. package/src/components/grid/use-get-number-of-blocks-before-cell.js +0 -7
  1587. package/src/components/grid/use-grid-layout-sync.js +0 -7
  1588. package/src/components/height-control/index.js +0 -7
  1589. package/src/components/height-control/stories/index.story.jsx +0 -7
  1590. package/src/components/html-element-control/index.js +0 -7
  1591. package/src/components/html-element-control/messages.js +0 -3
  1592. package/src/components/iframe/index.js +4 -16
  1593. package/src/components/iframe/use-scale-canvas.js +38 -14
  1594. package/src/components/image-editor/aspect-ratio-dropdown.js +0 -7
  1595. package/src/components/image-editor/context.js +0 -7
  1596. package/src/components/image-editor/cropper.js +0 -11
  1597. package/src/components/image-editor/form-controls.js +0 -7
  1598. package/src/components/image-editor/index.js +0 -7
  1599. package/src/components/image-editor/rotation-button.js +0 -8
  1600. package/src/components/image-editor/test/index.js +0 -3
  1601. package/src/components/image-editor/use-save-image.js +0 -7
  1602. package/src/components/image-editor/use-transform-image.js +0 -3
  1603. package/src/components/image-editor/zoom-dropdown.js +0 -7
  1604. package/src/components/image-size-control/index.js +0 -7
  1605. package/src/components/image-size-control/test/index.js +0 -7
  1606. package/src/components/image-size-control/use-dimension-handler.js +0 -3
  1607. package/src/components/inner-blocks/README.md +2 -0
  1608. package/src/components/inner-blocks/button-block-appender.js +0 -7
  1609. package/src/components/inner-blocks/default-block-appender.js +0 -3
  1610. package/src/components/inner-blocks/index.js +11 -13
  1611. package/src/components/inner-blocks/stories/index.story.jsx +246 -0
  1612. package/src/components/inner-blocks/test/index.js +0 -8
  1613. package/src/components/inner-blocks/use-block-context.js +0 -7
  1614. package/src/components/inner-blocks/use-inner-block-template-sync.js +47 -23
  1615. package/src/components/inner-blocks/use-nested-settings-update.js +0 -7
  1616. package/src/components/inner-content/index.js +0 -7
  1617. package/src/components/inner-content/test/index.js +0 -11
  1618. package/src/components/inserter/block-patterns-explorer/index.js +24 -18
  1619. package/src/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +18 -59
  1620. package/src/components/inserter/block-patterns-explorer/pattern-list.js +22 -54
  1621. package/src/components/inserter/block-patterns-tab/index.js +0 -7
  1622. package/src/components/inserter/block-patterns-tab/pattern-category-previews.js +0 -8
  1623. package/src/components/inserter/block-patterns-tab/patterns-filter.js +0 -7
  1624. package/src/components/inserter/block-patterns-tab/use-pattern-categories.js +0 -8
  1625. package/src/components/inserter/block-patterns-tab/utils.js +0 -4
  1626. package/src/components/inserter/block-types-tab.js +0 -7
  1627. package/src/components/inserter/category-tabs/index.js +0 -7
  1628. package/src/components/inserter/hooks/use-block-types-state.js +0 -7
  1629. package/src/components/inserter/hooks/use-insertion-point.js +9 -11
  1630. package/src/components/inserter/hooks/use-patterns-paging.js +0 -3
  1631. package/src/components/inserter/hooks/use-patterns-state.js +0 -7
  1632. package/src/components/inserter/index.js +4 -28
  1633. package/src/components/inserter/library.js +0 -7
  1634. package/src/components/inserter/media-tab/hooks.js +0 -7
  1635. package/src/components/inserter/media-tab/media-list.js +0 -7
  1636. package/src/components/inserter/media-tab/media-panel.js +0 -11
  1637. package/src/components/inserter/media-tab/media-preview.js +0 -12
  1638. package/src/components/inserter/media-tab/media-tab.js +0 -7
  1639. package/src/components/inserter/media-tab/test/hooks.js +0 -7
  1640. package/src/components/inserter/media-tab/test/media-panel.js +0 -7
  1641. package/src/components/inserter/media-tab/utils.js +0 -3
  1642. package/src/components/inserter/menu.js +23 -21
  1643. package/src/components/inserter/mobile-tab-navigation.js +0 -3
  1644. package/src/components/inserter/no-results.js +0 -3
  1645. package/src/components/inserter/panel.js +0 -3
  1646. package/src/components/inserter/preview-panel.js +0 -7
  1647. package/src/components/inserter/quick-inserter.js +15 -24
  1648. package/src/components/inserter/search-items.js +0 -3
  1649. package/src/components/inserter/search-results.js +0 -7
  1650. package/src/components/inserter/stories/index.story.jsx +0 -7
  1651. package/src/components/inserter/style.scss +44 -62
  1652. package/src/components/inserter/test/get-appender-label.js +0 -3
  1653. package/src/components/inserter/test/search-items.js +0 -3
  1654. package/src/components/inserter/tips.js +0 -3
  1655. package/src/components/inserter-draggable-blocks/index.js +0 -7
  1656. package/src/components/inserter-list-item/index.js +0 -11
  1657. package/src/components/inserter-listbox/context.js +0 -3
  1658. package/src/components/inserter-listbox/group.js +0 -3
  1659. package/src/components/inserter-listbox/index.js +0 -8
  1660. package/src/components/inserter-listbox/item.js +0 -3
  1661. package/src/components/inserter-listbox/row.js +0 -3
  1662. package/src/components/inserter-menu-extension/index.js +0 -3
  1663. package/src/components/inspector-controls/block-support-slot-container.js +0 -3
  1664. package/src/components/inspector-controls/block-support-tools-panel.js +0 -7
  1665. package/src/components/inspector-controls/fill.js +22 -37
  1666. package/src/components/inspector-controls/groups.js +0 -3
  1667. package/src/components/inspector-controls/index.js +0 -3
  1668. package/src/components/inspector-controls/last-item.js +0 -7
  1669. package/src/components/inspector-controls/list-view-content-popover.js +0 -7
  1670. package/src/components/inspector-controls/slot.js +0 -7
  1671. package/src/components/inspector-controls-tabs/README.md +92 -0
  1672. package/src/components/inspector-controls-tabs/advanced-controls-panel.js +0 -7
  1673. package/src/components/inspector-controls-tabs/content-tab.js +0 -7
  1674. package/src/components/inspector-controls-tabs/index.js +0 -8
  1675. package/src/components/inspector-controls-tabs/position-controls-panel.js +0 -7
  1676. package/src/components/inspector-controls-tabs/settings-tab.js +0 -7
  1677. package/src/components/inspector-controls-tabs/styles-tab.js +1 -8
  1678. package/src/components/inspector-controls-tabs/use-inspector-controls-tabs.js +0 -7
  1679. package/src/components/inspector-controls-tabs/utils.js +0 -3
  1680. package/src/components/inspector-popover-header/index.js +0 -3
  1681. package/src/components/justify-content-control/index.js +0 -3
  1682. package/src/components/justify-content-control/ui.js +0 -3
  1683. package/src/components/keyboard-shortcuts/index.js +0 -7
  1684. package/src/components/letter-spacing-control/index.js +0 -7
  1685. package/src/components/letter-spacing-control/stories/index.story.jsx +0 -7
  1686. package/src/components/line-height-control/index.js +0 -7
  1687. package/src/components/line-height-control/stories/index.story.jsx +0 -7
  1688. package/src/components/line-height-control/test/index.js +0 -11
  1689. package/src/components/link-control/constants.js +0 -3
  1690. package/src/components/link-control/index.js +0 -11
  1691. package/src/components/link-control/is-url-like.js +0 -3
  1692. package/src/components/link-control/link-preview.js +0 -13
  1693. package/src/components/link-control/normalize-url.js +0 -7
  1694. package/src/components/link-control/search-create-button.js +0 -3
  1695. package/src/components/link-control/search-input.js +0 -7
  1696. package/src/components/link-control/search-item.js +0 -3
  1697. package/src/components/link-control/search-results.js +1 -12
  1698. package/src/components/link-control/settings-drawer.js +0 -3
  1699. package/src/components/link-control/settings.js +0 -3
  1700. package/src/components/link-control/style.scss +1 -1
  1701. package/src/components/link-control/test/index.js +5 -11
  1702. package/src/components/link-control/test/is-url-like.js +0 -3
  1703. package/src/components/link-control/test/url-normalization.test.js +0 -11
  1704. package/src/components/link-control/use-create-page.js +0 -3
  1705. package/src/components/link-control/use-internal-value.js +0 -7
  1706. package/src/components/link-control/use-rich-url-data.js +1 -8
  1707. package/src/components/link-control/use-search-handler.js +0 -7
  1708. package/src/components/link-control/viewer-slot.js +0 -3
  1709. package/src/components/link-picker/link-picker.js +0 -7
  1710. package/src/components/link-picker/link-preview.js +0 -7
  1711. package/src/components/link-picker/test/index.js +0 -11
  1712. package/src/components/list-view/appender.js +7 -11
  1713. package/src/components/list-view/aria-referenced-text.js +12 -19
  1714. package/src/components/list-view/block-contents.js +28 -28
  1715. package/src/components/list-view/block-select-button.js +62 -40
  1716. package/src/components/list-view/block.js +41 -58
  1717. package/src/components/list-view/branch.js +179 -169
  1718. package/src/components/list-view/context.js +24 -3
  1719. package/src/components/list-view/drop-indicator.js +6 -18
  1720. package/src/components/list-view/expander.js +0 -3
  1721. package/src/components/list-view/index.js +145 -117
  1722. package/src/components/list-view/leaf.js +0 -11
  1723. package/src/components/list-view/style.scss +24 -4
  1724. package/src/components/list-view/test/use-list-view-drop-zone.js +0 -3
  1725. package/src/components/list-view/test/utils.js +0 -3
  1726. package/src/components/list-view/use-block-selection.js +0 -7
  1727. package/src/components/list-view/use-clipboard-handler.js +0 -7
  1728. package/src/components/list-view/use-list-view-block-indexes.js +0 -3
  1729. package/src/components/list-view/use-list-view-client-ids.js +0 -8
  1730. package/src/components/list-view/use-list-view-collapse-items.js +3 -11
  1731. package/src/components/list-view/use-list-view-drop-zone.js +11 -28
  1732. package/src/components/list-view/use-list-view-expand-selected-item.js +3 -10
  1733. package/src/components/list-view/use-list-view-images.js +6 -10
  1734. package/src/components/list-view/use-list-view-scroll-into-view.js +0 -3
  1735. package/src/components/list-view/utils.js +23 -7
  1736. package/src/components/media-placeholder/index.js +9 -15
  1737. package/src/components/media-placeholder/test/get-computed-accept-attribute.js +0 -3
  1738. package/src/components/media-placeholder/test/index.js +0 -7
  1739. package/src/components/media-replace-flow/index.js +0 -11
  1740. package/src/components/media-replace-flow/test/index.js +0 -10
  1741. package/src/components/media-upload/check.js +0 -7
  1742. package/src/components/media-upload/index.js +0 -3
  1743. package/src/components/multi-selection-inspector/index.js +42 -21
  1744. package/src/components/multi-selection-inspector/style.scss +5 -0
  1745. package/src/components/navigable-toolbar/index.js +38 -27
  1746. package/src/components/observe-typing/index.js +0 -7
  1747. package/src/components/panel-color-settings/README.md +0 -7
  1748. package/src/components/panel-color-settings/index.js +0 -3
  1749. package/src/components/panel-color-settings/test/index.js +0 -7
  1750. package/src/components/plain-text/index.js +0 -11
  1751. package/src/components/plain-text/stories/index.story.jsx +3 -7
  1752. package/src/components/preset-input-control/custom-value-controls.js +0 -4
  1753. package/src/components/preset-input-control/index.js +0 -7
  1754. package/src/components/preset-input-control/test/index.js +0 -7
  1755. package/src/components/preset-input-control/test/utils.js +0 -3
  1756. package/src/components/preview-options/index.js +0 -3
  1757. package/src/components/provider/block-refs-provider.js +0 -3
  1758. package/src/components/provider/index.js +7 -8
  1759. package/src/components/provider/selection-context.js +0 -3
  1760. package/src/components/provider/test/experimental-provider.js +0 -10
  1761. package/src/components/provider/test/use-block-sync.js +0 -12
  1762. package/src/components/provider/use-block-sync.js +0 -7
  1763. package/src/components/provider/use-media-upload-settings.js +0 -3
  1764. package/src/components/provider/with-registry-provider.js +0 -7
  1765. package/src/components/publish-date-time-picker/README.md +10 -0
  1766. package/src/components/publish-date-time-picker/index.js +17 -21
  1767. package/src/components/recursion-provider/README.md +0 -3
  1768. package/src/components/recursion-provider/index.js +0 -7
  1769. package/src/components/recursion-provider/test/index.js +0 -7
  1770. package/src/components/resizable-box-popover/index.js +0 -7
  1771. package/src/components/resolution-tool/index.js +0 -3
  1772. package/src/components/resolution-tool/stories/index.story.jsx +0 -7
  1773. package/src/components/responsive-block-control/index.js +0 -11
  1774. package/src/components/responsive-block-control/label.js +0 -3
  1775. package/src/components/responsive-block-control/test/index.js +0 -11
  1776. package/src/components/rich-text/content.js +0 -11
  1777. package/src/components/rich-text/event-listeners/before-input-rules.js +0 -7
  1778. package/src/components/rich-text/event-listeners/delete.js +0 -7
  1779. package/src/components/rich-text/event-listeners/enter.js +58 -52
  1780. package/src/components/rich-text/event-listeners/firefox-compat.js +0 -3
  1781. package/src/components/rich-text/event-listeners/index.js +0 -7
  1782. package/src/components/rich-text/event-listeners/input-events.js +0 -8
  1783. package/src/components/rich-text/event-listeners/input-rules.js +15 -20
  1784. package/src/components/rich-text/event-listeners/insert-replacement-text.js +0 -8
  1785. package/src/components/rich-text/event-listeners/paste-handler.js +14 -8
  1786. package/src/components/rich-text/event-listeners/remove-browser-shortcuts.js +0 -8
  1787. package/src/components/rich-text/event-listeners/shortcuts.js +0 -8
  1788. package/src/components/rich-text/event-listeners/undo-automatic-change.js +0 -8
  1789. package/src/components/rich-text/format-edit.js +0 -7
  1790. package/src/components/rich-text/format-toolbar/index.js +0 -11
  1791. package/src/components/rich-text/format-toolbar-container.js +0 -7
  1792. package/src/components/rich-text/get-rich-text-values.js +0 -7
  1793. package/src/components/rich-text/index.js +9 -15
  1794. package/src/components/rich-text/multiline.js +126 -93
  1795. package/src/components/rich-text/prevent-event-discovery.js +0 -3
  1796. package/src/components/rich-text/toolbar-button.js +0 -3
  1797. package/src/components/rich-text/use-mark-persistent.js +0 -7
  1798. package/src/components/rich-text/utils.js +0 -3
  1799. package/src/components/rich-text/with-deprecations.js +0 -7
  1800. package/src/components/selection-scroll-into-view/index.js +0 -3
  1801. package/src/components/skip-to-selected-block/index.js +0 -7
  1802. package/src/components/spacing-sizes-control/hooks/use-spacing-sizes.js +0 -7
  1803. package/src/components/spacing-sizes-control/index.js +2 -9
  1804. package/src/components/spacing-sizes-control/input-controls/axial.js +0 -3
  1805. package/src/components/spacing-sizes-control/input-controls/separated.js +0 -3
  1806. package/src/components/spacing-sizes-control/input-controls/single.js +0 -3
  1807. package/src/components/spacing-sizes-control/input-controls/spacing-input-control.js +0 -7
  1808. package/src/components/spacing-sizes-control/linked-button.js +0 -3
  1809. package/src/components/spacing-sizes-control/test/index.js +0 -12
  1810. package/src/components/spacing-sizes-control/test/utils.js +0 -3
  1811. package/src/components/spacing-sizes-control/utils.js +0 -7
  1812. package/src/components/tabbed-sidebar/index.js +0 -7
  1813. package/src/components/tabbed-sidebar/stories/index.story.jsx +0 -7
  1814. package/src/components/text-alignment-control/index.js +0 -7
  1815. package/src/components/text-alignment-control/stories/index.story.jsx +0 -7
  1816. package/src/components/text-decoration-control/index.js +0 -7
  1817. package/src/components/text-decoration-control/stories/index.story.jsx +0 -7
  1818. package/src/components/text-indent-control/index.js +0 -7
  1819. package/src/components/text-transform-control/index.js +0 -7
  1820. package/src/components/text-transform-control/stories/index.story.jsx +0 -7
  1821. package/src/components/tool-selector/index.js +0 -3
  1822. package/src/components/typewriter/index.js +0 -3
  1823. package/src/components/unit-control/index.js +0 -7
  1824. package/src/components/unit-control/stories/index.story.jsx +0 -7
  1825. package/src/components/url-input/button.js +0 -7
  1826. package/src/components/url-input/index.js +57 -77
  1827. package/src/components/url-input/test/button.js +0 -11
  1828. package/src/components/url-input/test/fixtures/validated-input-control-deprecation.js +27 -0
  1829. package/src/components/url-input/test/index.js +90 -11
  1830. package/src/components/url-popover/README.md +7 -0
  1831. package/src/components/url-popover/image-url-input-ui.js +2 -9
  1832. package/src/components/url-popover/index.js +0 -7
  1833. package/src/components/url-popover/link-editor.js +0 -11
  1834. package/src/components/url-popover/link-viewer-url.js +0 -7
  1835. package/src/components/url-popover/link-viewer.js +0 -11
  1836. package/src/components/url-popover/stories/index.story.jsx +133 -54
  1837. package/src/components/url-popover/style.scss +5 -0
  1838. package/src/components/use-block-commands/index.js +2 -9
  1839. package/src/components/use-block-display-information/index.js +1 -8
  1840. package/src/components/use-block-display-information/test/index.js +0 -11
  1841. package/src/components/use-block-drop-zone/index.js +0 -7
  1842. package/src/components/use-block-drop-zone/test/index.js +0 -3
  1843. package/src/components/use-flash-editable-blocks/index.js +0 -7
  1844. package/src/components/use-list-view-panel-state/index.js +0 -7
  1845. package/src/components/use-moving-animation/index.js +9 -14
  1846. package/src/components/use-on-block-drop/index.js +0 -7
  1847. package/src/components/use-on-block-drop/test/index.js +1 -7
  1848. package/src/components/use-paste-styles/index.js +0 -7
  1849. package/src/components/use-resize-canvas/index.js +0 -3
  1850. package/src/components/use-settings/index.js +0 -7
  1851. package/src/components/warning/index.js +0 -7
  1852. package/src/components/warning/stories/index.story.jsx +0 -7
  1853. package/src/components/warning/test/index.js +0 -7
  1854. package/src/components/writing-flow/index.js +0 -11
  1855. package/src/components/writing-flow/test/index.js +0 -7
  1856. package/src/components/writing-flow/use-arrow-nav.js +23 -16
  1857. package/src/components/writing-flow/use-click-selection.js +0 -7
  1858. package/src/components/writing-flow/use-clipboard-handler.js +65 -11
  1859. package/src/components/writing-flow/use-drag-selection.js +0 -7
  1860. package/src/components/writing-flow/use-editable-root-event-handlers.js +0 -7
  1861. package/src/components/writing-flow/use-editable-root.js +0 -7
  1862. package/src/components/writing-flow/use-home-end.js +0 -7
  1863. package/src/components/writing-flow/use-input.js +105 -22
  1864. package/src/components/writing-flow/use-multi-selection.js +0 -7
  1865. package/src/components/writing-flow/use-preview-mode-nav.js +0 -7
  1866. package/src/components/writing-flow/use-select-all.js +0 -7
  1867. package/src/components/writing-flow/use-selection-observer.js +0 -7
  1868. package/src/components/writing-flow/use-tab-nav.js +7 -8
  1869. package/src/components/writing-flow/utils.js +0 -7
  1870. package/src/components/writing-mode-control/index.js +0 -7
  1871. package/src/components/writing-mode-control/stories/index.story.jsx +0 -7
  1872. package/src/elements/test/index.js +0 -3
  1873. package/src/hooks/align.js +0 -11
  1874. package/src/hooks/allowed-blocks.js +0 -7
  1875. package/src/hooks/anchor.js +0 -7
  1876. package/src/hooks/aria-label.js +0 -7
  1877. package/src/hooks/auto-inspector-controls.js +0 -7
  1878. package/src/hooks/background.js +3 -15
  1879. package/src/hooks/block-bindings.js +0 -7
  1880. package/src/hooks/block-fields/fields-dropdown-menu.js +0 -7
  1881. package/src/hooks/block-fields/index.js +0 -1
  1882. package/src/hooks/block-fields/link/index.js +0 -7
  1883. package/src/hooks/block-fields/media/index.js +0 -7
  1884. package/src/hooks/block-fields/rich-text/index.js +0 -7
  1885. package/src/hooks/block-fields/use-inspector-popover-placement.js +0 -3
  1886. package/src/hooks/block-hooks.js +0 -7
  1887. package/src/hooks/block-renaming.js +0 -3
  1888. package/src/hooks/block-style-state.js +0 -7
  1889. package/src/hooks/block-style-variation.js +0 -7
  1890. package/src/hooks/border.js +27 -19
  1891. package/src/hooks/color.js +0 -11
  1892. package/src/hooks/compat.js +0 -3
  1893. package/src/hooks/contrast-checker.js +0 -8
  1894. package/src/hooks/custom-class-name.js +0 -11
  1895. package/src/hooks/dimensions.js +8 -12
  1896. package/src/hooks/duotone.js +23 -18
  1897. package/src/hooks/elements.js +0 -7
  1898. package/src/hooks/fit-text.js +0 -8
  1899. package/src/hooks/font-family.js +1 -10
  1900. package/src/hooks/font-size.js +0 -7
  1901. package/src/hooks/gap.js +15 -2
  1902. package/src/hooks/generated-class-name.js +0 -3
  1903. package/src/hooks/grid-visualizer.js +0 -7
  1904. package/src/hooks/index.js +0 -3
  1905. package/src/hooks/layout-child.js +41 -16
  1906. package/src/hooks/layout.js +118 -84
  1907. package/src/hooks/line-height.js +0 -7
  1908. package/src/hooks/list-view.js +0 -8
  1909. package/src/hooks/lock.js +0 -3
  1910. package/src/hooks/metadata.js +0 -3
  1911. package/src/hooks/position.js +0 -11
  1912. package/src/hooks/settings.js +0 -3
  1913. package/src/hooks/spacing-visualizer.js +0 -7
  1914. package/src/hooks/state-utils.js +0 -3
  1915. package/src/hooks/states.js +8 -12
  1916. package/src/hooks/style.js +0 -7
  1917. package/src/hooks/supports.js +0 -3
  1918. package/src/hooks/test/align.js +0 -7
  1919. package/src/hooks/test/allowed-blocks.js +0 -7
  1920. package/src/hooks/test/anchor.js +0 -7
  1921. package/src/hooks/test/auto-inspector-controls.js +0 -7
  1922. package/src/hooks/test/background.js +115 -3
  1923. package/src/hooks/test/block-style-state.js +0 -3
  1924. package/src/hooks/test/custom-class-name.js +0 -7
  1925. package/src/hooks/test/dimensions.js +0 -7
  1926. package/src/hooks/test/duotone.js +0 -3
  1927. package/src/hooks/test/font-size.js +0 -11
  1928. package/src/hooks/test/gap.js +31 -4
  1929. package/src/hooks/test/generate-fields-from-attributes.js +0 -3
  1930. package/src/hooks/test/generated-class-name.js +0 -7
  1931. package/src/hooks/test/inherited-value-wiring.js +0 -3
  1932. package/src/hooks/test/layout-child.js +60 -4
  1933. package/src/hooks/test/layout.js +27 -3
  1934. package/src/hooks/test/metadata.js +0 -7
  1935. package/src/hooks/test/preset-round-trip.js +0 -6
  1936. package/src/hooks/test/settings.js +0 -7
  1937. package/src/hooks/test/state-utils.js +0 -7
  1938. package/src/hooks/test/style.js +0 -7
  1939. package/src/hooks/test/text-align.js +0 -7
  1940. package/src/hooks/test/use-typography-props.js +0 -3
  1941. package/src/hooks/test/utils.js +0 -3
  1942. package/src/hooks/text-align.js +0 -11
  1943. package/src/hooks/typography.js +0 -8
  1944. package/src/hooks/use-border-props.js +0 -3
  1945. package/src/hooks/use-cached-truthy.js +0 -3
  1946. package/src/hooks/use-color-props.js +0 -11
  1947. package/src/hooks/use-content-only-section-edit.js +0 -7
  1948. package/src/hooks/use-dimensions-props.js +0 -3
  1949. package/src/hooks/use-shadow-props.js +0 -3
  1950. package/src/hooks/use-spacing-props.js +0 -3
  1951. package/src/hooks/use-typography-props.js +1 -15
  1952. package/src/hooks/use-zoom-out.js +0 -7
  1953. package/src/hooks/utils.js +0 -11
  1954. package/src/index.js +0 -3
  1955. package/src/layouts/constrained.js +9 -8
  1956. package/src/layouts/flex.js +15 -7
  1957. package/src/layouts/flow.js +4 -8
  1958. package/src/layouts/grid.js +9 -9
  1959. package/src/layouts/index.js +0 -3
  1960. package/src/layouts/test/constrained.js +26 -11
  1961. package/src/layouts/test/flex.js +0 -11
  1962. package/src/layouts/test/flow.js +26 -3
  1963. package/src/layouts/test/grid.js +46 -11
  1964. package/src/layouts/test/utils.js +0 -3
  1965. package/src/layouts/utils.js +0 -7
  1966. package/src/lock-unlock.ts +0 -3
  1967. package/src/private-apis.js +2 -7
  1968. package/src/store/actions.js +176 -54
  1969. package/src/store/defaults.js +4 -3
  1970. package/src/store/get-block-settings.js +0 -7
  1971. package/src/store/index.js +0 -7
  1972. package/src/store/private-actions.js +33 -5
  1973. package/src/store/private-selectors.js +43 -17
  1974. package/src/store/reducer.js +8 -12
  1975. package/src/store/selectors.js +44 -21
  1976. package/src/store/test/actions.js +203 -26
  1977. package/src/store/test/array.js +0 -3
  1978. package/src/store/test/get-block-settings.js +0 -7
  1979. package/src/store/test/performance.js +0 -3
  1980. package/src/store/test/private-actions.js +0 -3
  1981. package/src/store/test/private-selectors.js +155 -17
  1982. package/src/store/test/reducer.js +30 -11
  1983. package/src/store/test/registry-selectors.js +0 -7
  1984. package/src/store/test/selectors.js +143 -7
  1985. package/src/store/utils.js +0 -7
  1986. package/src/utils/fit-text-frontend.ts +0 -8
  1987. package/src/utils/format-font-style.ts +0 -7
  1988. package/src/utils/format-font-weight.ts +0 -7
  1989. package/src/utils/get-font-styles-and-weights.ts +0 -7
  1990. package/src/utils/group-blocks.js +36 -0
  1991. package/src/utils/native-undo.js +0 -3
  1992. package/src/utils/pasting.ts +0 -3
  1993. package/src/utils/selection.ts +0 -3
  1994. package/src/utils/sibling-block-attributes.js +30 -0
  1995. package/src/utils/test/block-bindings.js +0 -3
  1996. package/src/utils/test/color-values.js +0 -3
  1997. package/src/utils/test/format-font-style.js +0 -3
  1998. package/src/utils/test/format-font-weight.js +0 -3
  1999. package/src/utils/test/get-font-styles-and-weights.js +0 -3
  2000. package/src/utils/test/math.js +0 -3
  2001. package/src/utils/test/object.js +0 -3
  2002. package/src/utils/test/pasting.js +0 -3
  2003. package/src/utils/test/selection.js +0 -3
  2004. package/src/utils/test/sorting.js +0 -3
  2005. package/src/utils/test/transform-styles.js +0 -3
  2006. package/src/utils/transform-styles/index.ts +0 -8
  2007. package/src/utils/use-notify-copy.js +0 -7
  2008. package/build/components/floating-toolbar/nav-up-icon.cjs +0 -52
  2009. package/build/components/floating-toolbar/nav-up-icon.cjs.map +0 -7
  2010. package/build/components/gradients/with-gradient.cjs.map +0 -7
  2011. package/build/components/inserter-button/sparkles.cjs +0 -36
  2012. package/build/components/inserter-button/sparkles.cjs.map +0 -7
  2013. package/build-module/components/floating-toolbar/nav-up-icon.mjs +0 -31
  2014. package/build-module/components/floating-toolbar/nav-up-icon.mjs.map +0 -7
  2015. package/build-module/components/gradients/with-gradient.mjs +0 -11
  2016. package/build-module/components/gradients/with-gradient.mjs.map +0 -7
  2017. package/build-module/components/inserter-button/sparkles.mjs +0 -15
  2018. package/build-module/components/inserter-button/sparkles.mjs.map +0 -7
  2019. package/build-style/default-editor-styles-rtl.css +0 -68
  2020. package/build-style/default-editor-styles.css +0 -68
  2021. package/src/components/block-visibility/use-block-visibility.js +0 -76
  2022. package/src/components/floating-toolbar/nav-up-icon.js +0 -25
  2023. package/src/components/gradients/with-gradient.js +0 -12
  2024. package/src/components/inserter-button/README.md +0 -62
  2025. package/src/components/inserter-button/sparkles.js +0 -15
  2026. package/src/default-editor-styles.scss +0 -25
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/hooks/duotone.js"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport { extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tgetBlockSupport,\n\tgetBlockType,\n\thasBlockSupport,\n} from '@wordpress/blocks';\nimport { useInstanceId } from '@wordpress/compose';\nimport { addFilter } from '@wordpress/hooks';\nimport { useMemo, useEffect } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tgetBlockSelector,\n\tprivateApis as globalStylesEnginePrivateApis,\n} from '@wordpress/global-styles-engine';\n\n/**\n * Internal dependencies\n */\nimport {\n\tBlockControls,\n\tInspectorControls,\n\t__experimentalDuotoneControl as DuotoneControl,\n\tuseSettings,\n} from '../components';\nimport { scopeSelector } from '../components/global-styles/utils';\nimport {\n\tcleanEmptyObject,\n\tuseBlockSettings,\n\tusePrivateStyleOverride,\n} from './utils';\nimport { unlock } from '../lock-unlock';\nimport { default as StylesFiltersPanel } from '../components/global-styles/filters-panel';\nimport { useResolvedStyle } from '../components/global-styles/inherited-value-context';\nimport { useBlockEditingMode } from '../components/block-editing-mode';\nimport { useBlockElement } from '../components/block-list/use-block-props/use-block-refs';\nimport { store as blockEditorStore } from '../store';\n\nconst { getDuotoneFilter, getDuotoneStylesheet, getDuotoneUnsetStylesheet } =\n\tunlock( globalStylesEnginePrivateApis );\n\nconst EMPTY_ARRAY = [];\n\n// Safari does not always update the duotone filter when the duotone colors\n// are changed. This browser check is later used to force a re-render of the block\n// element to ensure the duotone filter is updated. The check is included at the\n// root of this file as it only needs to be run once per page load.\nconst isSafari =\n\twindow?.navigator.userAgent &&\n\twindow.navigator.userAgent.includes( 'Safari' ) &&\n\t! window.navigator.userAgent.includes( 'Chrome' ) &&\n\t! window.navigator.userAgent.includes( 'Chromium' );\n\nextend( [ namesPlugin ] );\n\nfunction useMultiOriginPresets( { presetSetting, defaultSetting } ) {\n\tconst [ enableDefault, userPresets, themePresets, defaultPresets ] =\n\t\tuseSettings(\n\t\t\tdefaultSetting,\n\t\t\t`${ presetSetting }.custom`,\n\t\t\t`${ presetSetting }.theme`,\n\t\t\t`${ presetSetting }.default`\n\t\t);\n\treturn useMemo(\n\t\t() => [\n\t\t\t...( userPresets || EMPTY_ARRAY ),\n\t\t\t...( themePresets || EMPTY_ARRAY ),\n\t\t\t...( ( enableDefault && defaultPresets ) || EMPTY_ARRAY ),\n\t\t],\n\t\t[ enableDefault, userPresets, themePresets, defaultPresets ]\n\t);\n}\n\nexport function getColorsFromDuotonePreset( duotone, duotonePalette ) {\n\tif ( ! duotone ) {\n\t\treturn;\n\t}\n\tconst preset = duotonePalette?.find( ( { slug } ) => {\n\t\treturn duotone === `var:preset|duotone|${ slug }`;\n\t} );\n\n\treturn preset ? preset.colors : undefined;\n}\n\nexport function getDuotonePresetFromColors( colors, duotonePalette ) {\n\tif ( ! colors || ! Array.isArray( colors ) ) {\n\t\treturn;\n\t}\n\n\tconst preset = duotonePalette?.find( ( duotonePreset ) => {\n\t\treturn duotonePreset?.colors?.every(\n\t\t\t( val, index ) => val === colors[ index ]\n\t\t);\n\t} );\n\n\treturn preset ? `var:preset|duotone|${ preset.slug }` : undefined;\n}\n\nfunction DuotonePanelPure( { style, setAttributes, name, clientId } ) {\n\tconst duotoneStyle = style?.color?.duotone;\n\tconst settings = useBlockSettings( name );\n\tconst blockEditingMode = useBlockEditingMode();\n\n\tconst className = useSelect(\n\t\t( select ) =>\n\t\t\tclientId\n\t\t\t\t? select( blockEditorStore ).getBlockAttributes( clientId )\n\t\t\t\t\t\t?.className\n\t\t\t\t: undefined,\n\t\t[ clientId ]\n\t);\n\tconst { value: inheritedValue } = useResolvedStyle( name, className );\n\n\tconst duotonePalette = useMultiOriginPresets( {\n\t\tpresetSetting: 'color.duotone',\n\t\tdefaultSetting: 'color.defaultDuotone',\n\t} );\n\tconst colorPalette = useMultiOriginPresets( {\n\t\tpresetSetting: 'color.palette',\n\t\tdefaultSetting: 'color.defaultPalette',\n\t} );\n\tconst [ enableCustomColors, enableCustomDuotone ] = useSettings(\n\t\t'color.custom',\n\t\t'color.customDuotone'\n\t);\n\tconst disableCustomColors = ! enableCustomColors;\n\tconst disableCustomDuotone =\n\t\t! enableCustomDuotone ||\n\t\t( colorPalette?.length === 0 && disableCustomColors );\n\n\tif ( duotonePalette?.length === 0 && disableCustomDuotone ) {\n\t\treturn null;\n\t}\n\n\tif ( blockEditingMode !== 'default' ) {\n\t\treturn null;\n\t}\n\n\tconst duotonePresetOrColors =\n\t\tduotoneStyle === 'unset' || Array.isArray( duotoneStyle )\n\t\t\t? duotoneStyle\n\t\t\t: getColorsFromDuotonePreset( duotoneStyle, duotonePalette );\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls group=\"filter\">\n\t\t\t\t<StylesFiltersPanel\n\t\t\t\t\tvalue={ {\n\t\t\t\t\t\tfilter: { duotone: duotonePresetOrColors },\n\t\t\t\t\t} }\n\t\t\t\t\tonChange={ ( newDuotone ) => {\n\t\t\t\t\t\tconst newStyle = {\n\t\t\t\t\t\t\t...style,\n\t\t\t\t\t\t\tcolor: {\n\t\t\t\t\t\t\t\t...newDuotone?.filter,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t};\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tstyle: cleanEmptyObject( newStyle ),\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tinheritedValue={ inheritedValue }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<BlockControls group=\"block\" __experimentalShareWithChildBlocks>\n\t\t\t\t<DuotoneControl\n\t\t\t\t\tduotonePalette={ duotonePalette }\n\t\t\t\t\tcolorPalette={ colorPalette }\n\t\t\t\t\tdisableCustomDuotone={ disableCustomDuotone }\n\t\t\t\t\tdisableCustomColors={ disableCustomColors }\n\t\t\t\t\tvalue={ duotonePresetOrColors }\n\t\t\t\t\tonChange={ ( newDuotone ) => {\n\t\t\t\t\t\tconst maybePreset = getDuotonePresetFromColors(\n\t\t\t\t\t\t\tnewDuotone,\n\t\t\t\t\t\t\tduotonePalette\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tconst newStyle = {\n\t\t\t\t\t\t\t...style,\n\t\t\t\t\t\t\tcolor: {\n\t\t\t\t\t\t\t\t...style?.color,\n\t\t\t\t\t\t\t\tduotone: maybePreset ?? newDuotone, // use preset or fallback to custom colors.\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t};\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tstyle: cleanEmptyObject( newStyle ),\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t</>\n\t);\n}\n\nexport default {\n\tshareWithChildBlocks: true,\n\tedit: DuotonePanelPure,\n\tuseBlockProps,\n\tattributeKeys: [ 'style' ],\n\thasSupport( name ) {\n\t\treturn hasBlockSupport( name, 'filter.duotone' );\n\t},\n};\n\n/**\n * Filters registered block settings, extending attributes to include\n * the `duotone` attribute.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nfunction addDuotoneAttributes( settings ) {\n\t// Previous `color.__experimentalDuotone` support flag is migrated via\n\t// block_type_metadata_settings filter in `lib/block-supports/duotone.php`.\n\tif ( ! hasBlockSupport( settings, 'filter.duotone' ) ) {\n\t\treturn settings;\n\t}\n\n\t// Allow blocks to specify their own attribute definition with default\n\t// values if needed.\n\tif ( ! settings.attributes.style ) {\n\t\tObject.assign( settings.attributes, {\n\t\t\tstyle: {\n\t\t\t\ttype: 'object',\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn settings;\n}\n\nfunction useDuotoneStyles( {\n\tclientId,\n\tid: filterId,\n\tselector: duotoneSelector,\n\tattribute: duotoneAttr,\n} ) {\n\tconst duotonePalette = useMultiOriginPresets( {\n\t\tpresetSetting: 'color.duotone',\n\t\tdefaultSetting: 'color.defaultDuotone',\n\t} );\n\n\t// Possible values for duotone attribute:\n\t// 1. Array of colors - e.g. ['#000000', '#ffffff'].\n\t// 2. Variable for an existing Duotone preset - e.g. 'var:preset|duotone|green-blue' or 'var(--wp--preset--duotone--green-blue)''\n\t// 3. A CSS string - e.g. 'unset' to remove globally applied duotone.\n\tconst isCustom = Array.isArray( duotoneAttr );\n\tconst duotonePreset = isCustom\n\t\t? undefined\n\t\t: getColorsFromDuotonePreset( duotoneAttr, duotonePalette );\n\tconst isPreset = typeof duotoneAttr === 'string' && duotonePreset;\n\tconst isCSS = typeof duotoneAttr === 'string' && ! isPreset;\n\n\t// Match the structure of WP_Duotone_Gutenberg::render_duotone_support() in PHP.\n\tlet colors = null;\n\tif ( isPreset ) {\n\t\t// Array of colors.\n\t\tcolors = duotonePreset;\n\t} else if ( isCSS ) {\n\t\t// CSS filter property string (e.g. 'unset').\n\t\tcolors = duotoneAttr;\n\t} else if ( isCustom ) {\n\t\t// Array of colors.\n\t\tcolors = duotoneAttr;\n\t}\n\n\t// Build the CSS selectors to which the filter will be applied.\n\tconst selectors = duotoneSelector.split( ',' );\n\n\tconst selectorsScoped = selectors.map( ( selectorPart ) => {\n\t\t// Assuming the selector part is a subclass selector (not a tag name)\n\t\t// so we can prepend the filter id class. If we want to support elements\n\t\t// such as `img` or namespaces, we'll need to add a case for that here.\n\t\treturn `.${ filterId }${ selectorPart.trim() }`;\n\t} );\n\n\tconst selector = selectorsScoped.join( ', ' );\n\n\tconst isValidFilter = Array.isArray( colors ) || colors === 'unset';\n\n\tusePrivateStyleOverride(\n\t\tisValidFilter\n\t\t\t? {\n\t\t\t\t\tcss:\n\t\t\t\t\t\tcolors !== 'unset'\n\t\t\t\t\t\t\t? getDuotoneStylesheet( selector, filterId )\n\t\t\t\t\t\t\t: getDuotoneUnsetStylesheet( selector ),\n\t\t\t\t\t__unstableType: 'presets',\n\t\t\t }\n\t\t\t: undefined\n\t);\n\tusePrivateStyleOverride(\n\t\tisValidFilter\n\t\t\t? {\n\t\t\t\t\tassets:\n\t\t\t\t\t\tcolors !== 'unset'\n\t\t\t\t\t\t\t? getDuotoneFilter( filterId, colors )\n\t\t\t\t\t\t\t: '',\n\t\t\t\t\t__unstableType: 'svgs',\n\t\t\t }\n\t\t\t: undefined\n\t);\n\n\tconst blockElement = useBlockElement( clientId );\n\n\tuseEffect( () => {\n\t\tif ( ! isValidFilter ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Safari does not always update the duotone filter when the duotone\n\t\t// colors are changed. When using Safari, force the block element to be\n\t\t// repainted by the browser to ensure any changes are reflected\n\t\t// visually. This logic matches that used on the site frontend in\n\t\t// `block-supports/duotone.php`.\n\t\tif ( blockElement && isSafari ) {\n\t\t\tconst display = blockElement.style.display;\n\t\t\t// Switch to `inline-block` to force a repaint. In the editor,\n\t\t\t// `inline-block` is used instead of `none` to ensure that scroll\n\t\t\t// position is not affected, as `none` results in the editor\n\t\t\t// scrolling to the top of the block.\n\t\t\tblockElement.style.setProperty( 'display', 'inline-block' );\n\t\t\t// Simply accessing el.offsetHeight flushes layout and style changes\n\t\t\t// in WebKit without having to wait for setTimeout.\n\t\t\t// eslint-disable-next-line no-unused-expressions\n\t\t\tblockElement.offsetHeight;\n\t\t\tblockElement.style.setProperty( 'display', display );\n\t\t}\n\t\t// `colors` must be a dependency so this effect runs when the colors\n\t\t// change in Safari.\n\t}, [ isValidFilter, blockElement, colors ] );\n}\n\n// Used for generating the instance ID\nconst DUOTONE_BLOCK_PROPS_REFERENCE = {};\n\nfunction useBlockProps( { clientId, name, style } ) {\n\tconst id = useInstanceId( DUOTONE_BLOCK_PROPS_REFERENCE );\n\tconst selector = useMemo( () => {\n\t\tconst blockType = getBlockType( name );\n\n\t\tif ( blockType ) {\n\t\t\t// Backwards compatibility for `supports.color.__experimentalDuotone`\n\t\t\t// is provided via the `block_type_metadata_settings` filter. If\n\t\t\t// `supports.filter.duotone` has not been set and the\n\t\t\t// experimental property has been, the experimental property\n\t\t\t// value is copied into `supports.filter.duotone`.\n\t\t\tconst duotoneSupport = getBlockSupport(\n\t\t\t\tblockType,\n\t\t\t\t'filter.duotone',\n\t\t\t\tfalse\n\t\t\t);\n\t\t\tif ( ! duotoneSupport ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// If the experimental duotone support was set, that value is\n\t\t\t// to be treated as a selector and requires scoping.\n\t\t\tconst experimentalDuotone = getBlockSupport(\n\t\t\t\tblockType,\n\t\t\t\t'color.__experimentalDuotone',\n\t\t\t\tfalse\n\t\t\t);\n\t\t\tif ( experimentalDuotone ) {\n\t\t\t\tconst rootSelector = getBlockSelector( blockType );\n\t\t\t\treturn typeof experimentalDuotone === 'string'\n\t\t\t\t\t? scopeSelector( rootSelector, experimentalDuotone )\n\t\t\t\t\t: rootSelector;\n\t\t\t}\n\n\t\t\t// Regular filter.duotone support uses filter.duotone selectors with fallbacks.\n\t\t\treturn getBlockSelector( blockType, 'filter.duotone', {\n\t\t\t\tfallback: true,\n\t\t\t} );\n\t\t}\n\t}, [ name ] );\n\n\tconst attribute = style?.color?.duotone;\n\n\tconst filterClass = `wp-duotone-${ id }`;\n\n\tconst shouldRender = selector && attribute;\n\n\tuseDuotoneStyles( {\n\t\tclientId,\n\t\tid: filterClass,\n\t\tselector,\n\t\tattribute,\n\t} );\n\n\treturn {\n\t\tclassName: shouldRender ? filterClass : '',\n\t};\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/editor/duotone/add-attributes',\n\taddDuotoneAttributes\n);\n"],
5
- "mappings": ";AAGA,SAAS,cAAc;AACvB,OAAO,iBAAiB;AAKxB;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,qBAAqB;AAC9B,SAAS,iBAAiB;AAC1B,SAAS,SAAS,iBAAiB;AACnC,SAAS,iBAAiB;AAC1B;AAAA,EACC;AAAA,EACA,eAAe;AAAA,OACT;AAKP;AAAA,EACC;AAAA,EACA;AAAA,EACA,gCAAgC;AAAA,EAChC;AAAA,OACM;AACP,SAAS,qBAAqB;AAC9B;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,cAAc;AACvB,SAAS,WAAW,0BAA0B;AAC9C,SAAS,wBAAwB;AACjC,SAAS,2BAA2B;AACpC,SAAS,uBAAuB;AAChC,SAAS,SAAS,wBAAwB;AA4GxC,mBAEE,KAFF;AA1GF,IAAM,EAAE,kBAAkB,sBAAsB,0BAA0B,IACzE,OAAQ,6BAA8B;AAEvC,IAAM,cAAc,CAAC;AAMrB,IAAM,WACL,QAAQ,UAAU,aAClB,OAAO,UAAU,UAAU,SAAU,QAAS,KAC9C,CAAE,OAAO,UAAU,UAAU,SAAU,QAAS,KAChD,CAAE,OAAO,UAAU,UAAU,SAAU,UAAW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,CAAE;AAAA,IACH;AAAA,EACD,GAAG,CAAE,IAAK,CAAE;AAEZ,QAAM,YAAY,OAAO,OAAO;AAEhC,QAAM,cAAc,cAAe,EAAG;AAEtC,QAAM,eAAe,YAAY;AAEjC,mBAAkB;AAAA,IACjB;AAAA,IACA,IAAI;AAAA,IACJ;AAAA,IACA;AAAA,EACD,CAAE;AAEF,SAAO;AAAA,IACN,WAAW,eAAe,cAAc;AAAA,EACzC;AACD;AAEA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AACD;",
4
+ "sourcesContent": ["import { extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\nimport {\n\tgetBlockSupport,\n\tgetBlockType,\n\thasBlockSupport,\n} from '@wordpress/blocks';\nimport { useInstanceId } from '@wordpress/compose';\nimport { addFilter } from '@wordpress/hooks';\nimport { useMemo, useEffect } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tgetBlockSelector,\n\tprivateApis as globalStylesEnginePrivateApis,\n} from '@wordpress/global-styles-engine';\nimport {\n\tBlockControls,\n\tInspectorControls,\n\t__experimentalDuotoneControl as DuotoneControl,\n\tuseSettings,\n} from '../components';\nimport {\n\tscopeSelector,\n\tgetDuotoneSlugFromPreset,\n} from '../components/global-styles/utils';\nimport {\n\tcleanEmptyObject,\n\tuseBlockSettings,\n\tusePrivateStyleOverride,\n} from './utils';\nimport { unlock } from '../lock-unlock';\nimport { default as StylesFiltersPanel } from '../components/global-styles/filters-panel';\nimport { useResolvedStyle } from '../components/global-styles/inherited-value-context';\nimport { useBlockEditingMode } from '../components/block-editing-mode';\nimport { useBlockElement } from '../components/block-list/use-block-props/use-block-refs';\nimport { store as blockEditorStore } from '../store';\n\nconst { getDuotoneFilter, getDuotoneStylesheet, getDuotoneUnsetStylesheet } =\n\tunlock( globalStylesEnginePrivateApis );\n\nconst EMPTY_ARRAY = [];\n\n// Safari does not always update the duotone filter when the duotone colors\n// are changed. This browser check is later used to force a re-render of the block\n// element to ensure the duotone filter is updated. The check is included at the\n// root of this file as it only needs to be run once per page load.\nconst isSafari =\n\twindow?.navigator.userAgent &&\n\twindow.navigator.userAgent.includes( 'Safari' ) &&\n\t! window.navigator.userAgent.includes( 'Chrome' ) &&\n\t! window.navigator.userAgent.includes( 'Chromium' );\n\nextend( [ namesPlugin ] );\n\nfunction useMultiOriginPresets( { presetSetting, defaultSetting } ) {\n\tconst [ enableDefault, userPresets, themePresets, defaultPresets ] =\n\t\tuseSettings(\n\t\t\tdefaultSetting,\n\t\t\t`${ presetSetting }.custom`,\n\t\t\t`${ presetSetting }.theme`,\n\t\t\t`${ presetSetting }.default`\n\t\t);\n\treturn useMemo(\n\t\t() => [\n\t\t\t...( userPresets || EMPTY_ARRAY ),\n\t\t\t...( themePresets || EMPTY_ARRAY ),\n\t\t\t...( ( enableDefault && defaultPresets ) || EMPTY_ARRAY ),\n\t\t],\n\t\t[ enableDefault, userPresets, themePresets, defaultPresets ]\n\t);\n}\n\nexport function getColorsFromDuotonePreset( duotone, duotonePalette ) {\n\tif ( ! duotone ) {\n\t\treturn;\n\t}\n\tconst preset = duotonePalette?.find( ( { slug } ) => {\n\t\treturn duotone === `var:preset|duotone|${ slug }`;\n\t} );\n\n\treturn preset ? preset.colors : undefined;\n}\n\nexport function getDuotonePresetFromColors( colors, duotonePalette ) {\n\tif ( ! colors || ! Array.isArray( colors ) ) {\n\t\treturn;\n\t}\n\n\tconst preset = duotonePalette?.find( ( duotonePreset ) => {\n\t\treturn duotonePreset?.colors?.every(\n\t\t\t( val, index ) => val === colors[ index ]\n\t\t);\n\t} );\n\n\treturn preset ? `var:preset|duotone|${ preset.slug }` : undefined;\n}\n\nfunction DuotonePanelPure( { style, setAttributes, name, clientId } ) {\n\tconst duotoneStyle = style?.color?.duotone;\n\tconst settings = useBlockSettings( name );\n\tconst blockEditingMode = useBlockEditingMode();\n\n\tconst className = useSelect(\n\t\t( select ) =>\n\t\t\tclientId\n\t\t\t\t? select( blockEditorStore ).getBlockAttributes( clientId )\n\t\t\t\t\t\t?.className\n\t\t\t\t: undefined,\n\t\t[ clientId ]\n\t);\n\tconst { value: inheritedValue } = useResolvedStyle( name, className );\n\n\tconst duotonePalette = useMultiOriginPresets( {\n\t\tpresetSetting: 'color.duotone',\n\t\tdefaultSetting: 'color.defaultDuotone',\n\t} );\n\tconst colorPalette = useMultiOriginPresets( {\n\t\tpresetSetting: 'color.palette',\n\t\tdefaultSetting: 'color.defaultPalette',\n\t} );\n\tconst [ enableCustomColors, enableCustomDuotone ] = useSettings(\n\t\t'color.custom',\n\t\t'color.customDuotone'\n\t);\n\tconst disableCustomColors = ! enableCustomColors;\n\tconst disableCustomDuotone =\n\t\t! enableCustomDuotone ||\n\t\t( colorPalette?.length === 0 && disableCustomColors );\n\n\tif ( duotonePalette?.length === 0 && disableCustomDuotone ) {\n\t\treturn null;\n\t}\n\n\tif ( blockEditingMode !== 'default' ) {\n\t\treturn null;\n\t}\n\n\tconst duotonePresetOrColors =\n\t\tduotoneStyle === 'unset' || Array.isArray( duotoneStyle )\n\t\t\t? duotoneStyle\n\t\t\t: getColorsFromDuotonePreset( duotoneStyle, duotonePalette );\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls group=\"filter\">\n\t\t\t\t<StylesFiltersPanel\n\t\t\t\t\t// The raw value, not the resolved colors. The panel\n\t\t\t\t\t// decodes it for display, but needs the preset reference\n\t\t\t\t\t// to know which preset is applied: two presets can hold\n\t\t\t\t\t// the same pair of colors, and resolving first throws the\n\t\t\t\t\t// slug away.\n\t\t\t\t\tvalue={ {\n\t\t\t\t\t\tfilter: { duotone: duotoneStyle },\n\t\t\t\t\t} }\n\t\t\t\t\tonChange={ ( newDuotone ) => {\n\t\t\t\t\t\tconst newStyle = {\n\t\t\t\t\t\t\t...style,\n\t\t\t\t\t\t\tcolor: {\n\t\t\t\t\t\t\t\t...newDuotone?.filter,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t};\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tstyle: cleanEmptyObject( newStyle ),\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tinheritedValue={ inheritedValue }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<BlockControls group=\"block\" __experimentalShareWithChildBlocks>\n\t\t\t\t<DuotoneControl\n\t\t\t\t\tduotonePalette={ duotonePalette }\n\t\t\t\t\tcolorPalette={ colorPalette }\n\t\t\t\t\tdisableCustomDuotone={ disableCustomDuotone }\n\t\t\t\t\tdisableCustomColors={ disableCustomColors }\n\t\t\t\t\tvalue={ duotonePresetOrColors }\n\t\t\t\t\tselectedSlug={ getDuotoneSlugFromPreset( duotoneStyle ) }\n\t\t\t\t\tonChange={ ( newDuotone, index, slug ) => {\n\t\t\t\t\t\t// A slug means a preset was picked out of the palette,\n\t\t\t\t\t\t// so it identifies the choice exactly. Matching back by\n\t\t\t\t\t\t// color would resolve to whichever preset holding those\n\t\t\t\t\t\t// colors comes first, which is the wrong one whenever\n\t\t\t\t\t\t// two presets share a pair.\n\t\t\t\t\t\tconst maybePreset = slug\n\t\t\t\t\t\t\t? `var:preset|duotone|${ slug }`\n\t\t\t\t\t\t\t: getDuotonePresetFromColors(\n\t\t\t\t\t\t\t\t\tnewDuotone,\n\t\t\t\t\t\t\t\t\tduotonePalette\n\t\t\t\t\t\t\t );\n\n\t\t\t\t\t\tconst newStyle = {\n\t\t\t\t\t\t\t...style,\n\t\t\t\t\t\t\tcolor: {\n\t\t\t\t\t\t\t\t...style?.color,\n\t\t\t\t\t\t\t\tduotone: maybePreset ?? newDuotone, // use preset or fallback to custom colors.\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t};\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tstyle: cleanEmptyObject( newStyle ),\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t</>\n\t);\n}\n\nexport default {\n\tshareWithChildBlocks: true,\n\tedit: DuotonePanelPure,\n\tuseBlockProps,\n\tattributeKeys: [ 'style' ],\n\thasSupport( name ) {\n\t\treturn hasBlockSupport( name, 'filter.duotone' );\n\t},\n};\n\n/**\n * Filters registered block settings, extending attributes to include\n * the `duotone` attribute.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nfunction addDuotoneAttributes( settings ) {\n\t// Previous `color.__experimentalDuotone` support flag is migrated via\n\t// block_type_metadata_settings filter in `lib/block-supports/duotone.php`.\n\tif ( ! hasBlockSupport( settings, 'filter.duotone' ) ) {\n\t\treturn settings;\n\t}\n\n\t// Allow blocks to specify their own attribute definition with default\n\t// values if needed.\n\tif ( ! settings.attributes.style ) {\n\t\tObject.assign( settings.attributes, {\n\t\t\tstyle: {\n\t\t\t\ttype: 'object',\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn settings;\n}\n\nfunction useDuotoneStyles( {\n\tclientId,\n\tid: filterId,\n\tselector: duotoneSelector,\n\tattribute: duotoneAttr,\n} ) {\n\tconst duotonePalette = useMultiOriginPresets( {\n\t\tpresetSetting: 'color.duotone',\n\t\tdefaultSetting: 'color.defaultDuotone',\n\t} );\n\n\t// Possible values for duotone attribute:\n\t// 1. Array of colors - e.g. ['#000000', '#ffffff'].\n\t// 2. Variable for an existing Duotone preset - e.g. 'var:preset|duotone|green-blue' or 'var(--wp--preset--duotone--green-blue)''\n\t// 3. A CSS string - e.g. 'unset' to remove globally applied duotone.\n\tconst isCustom = Array.isArray( duotoneAttr );\n\tconst duotonePreset = isCustom\n\t\t? undefined\n\t\t: getColorsFromDuotonePreset( duotoneAttr, duotonePalette );\n\tconst isPreset = typeof duotoneAttr === 'string' && duotonePreset;\n\tconst isCSS = typeof duotoneAttr === 'string' && ! isPreset;\n\n\t// Match the structure of WP_Duotone_Gutenberg::render_duotone_support() in PHP.\n\tlet colors = null;\n\tif ( isPreset ) {\n\t\t// Array of colors.\n\t\tcolors = duotonePreset;\n\t} else if ( isCSS ) {\n\t\t// CSS filter property string (e.g. 'unset').\n\t\tcolors = duotoneAttr;\n\t} else if ( isCustom ) {\n\t\t// Array of colors.\n\t\tcolors = duotoneAttr;\n\t}\n\n\t// Build the CSS selectors to which the filter will be applied.\n\tconst selectors = duotoneSelector.split( ',' );\n\n\tconst selectorsScoped = selectors.map( ( selectorPart ) => {\n\t\t// Assuming the selector part is a subclass selector (not a tag name)\n\t\t// so we can prepend the filter id class. If we want to support elements\n\t\t// such as `img` or namespaces, we'll need to add a case for that here.\n\t\treturn `.${ filterId }${ selectorPart.trim() }`;\n\t} );\n\n\tconst selector = selectorsScoped.join( ', ' );\n\n\tconst isValidFilter = Array.isArray( colors ) || colors === 'unset';\n\n\tusePrivateStyleOverride(\n\t\tisValidFilter\n\t\t\t? {\n\t\t\t\t\tcss:\n\t\t\t\t\t\tcolors !== 'unset'\n\t\t\t\t\t\t\t? getDuotoneStylesheet( selector, filterId )\n\t\t\t\t\t\t\t: getDuotoneUnsetStylesheet( selector ),\n\t\t\t\t\t__unstableType: 'presets',\n\t\t\t }\n\t\t\t: undefined\n\t);\n\tusePrivateStyleOverride(\n\t\tisValidFilter\n\t\t\t? {\n\t\t\t\t\tassets:\n\t\t\t\t\t\tcolors !== 'unset'\n\t\t\t\t\t\t\t? getDuotoneFilter( filterId, colors )\n\t\t\t\t\t\t\t: '',\n\t\t\t\t\t__unstableType: 'svgs',\n\t\t\t }\n\t\t\t: undefined\n\t);\n\n\tconst blockElement = useBlockElement( clientId );\n\n\tuseEffect( () => {\n\t\tif ( ! isValidFilter ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Safari does not always update the duotone filter when the duotone\n\t\t// colors are changed. When using Safari, force the block element to be\n\t\t// repainted by the browser to ensure any changes are reflected\n\t\t// visually. This logic matches that used on the site frontend in\n\t\t// `block-supports/duotone.php`.\n\t\tif ( blockElement && isSafari ) {\n\t\t\tconst display = blockElement.style.display;\n\t\t\t// Switch to `inline-block` to force a repaint. In the editor,\n\t\t\t// `inline-block` is used instead of `none` to ensure that scroll\n\t\t\t// position is not affected, as `none` results in the editor\n\t\t\t// scrolling to the top of the block.\n\t\t\tblockElement.style.setProperty( 'display', 'inline-block' );\n\t\t\t// Simply accessing el.offsetHeight flushes layout and style changes\n\t\t\t// in WebKit without having to wait for setTimeout.\n\t\t\t// eslint-disable-next-line no-unused-expressions\n\t\t\tblockElement.offsetHeight;\n\t\t\tblockElement.style.setProperty( 'display', display );\n\t\t}\n\t\t// `colors` must be a dependency so this effect runs when the colors\n\t\t// change in Safari.\n\t}, [ isValidFilter, blockElement, colors ] );\n}\n\n// Used for generating the instance ID\nconst DUOTONE_BLOCK_PROPS_REFERENCE = {};\n\nfunction useBlockProps( { clientId, name, style } ) {\n\tconst id = useInstanceId( DUOTONE_BLOCK_PROPS_REFERENCE );\n\tconst selector = useMemo( () => {\n\t\tconst blockType = getBlockType( name );\n\n\t\tif ( blockType ) {\n\t\t\t// Backwards compatibility for `supports.color.__experimentalDuotone`\n\t\t\t// is provided via the `block_type_metadata_settings` filter. If\n\t\t\t// `supports.filter.duotone` has not been set and the\n\t\t\t// experimental property has been, the experimental property\n\t\t\t// value is copied into `supports.filter.duotone`.\n\t\t\tconst duotoneSupport = getBlockSupport(\n\t\t\t\tblockType,\n\t\t\t\t'filter.duotone',\n\t\t\t\tfalse\n\t\t\t);\n\t\t\tif ( ! duotoneSupport ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// If the experimental duotone support was set, that value is\n\t\t\t// to be treated as a selector and requires scoping.\n\t\t\tconst experimentalDuotone = getBlockSupport(\n\t\t\t\tblockType,\n\t\t\t\t'color.__experimentalDuotone',\n\t\t\t\tfalse\n\t\t\t);\n\t\t\tif ( experimentalDuotone ) {\n\t\t\t\tconst rootSelector = getBlockSelector( blockType );\n\t\t\t\treturn typeof experimentalDuotone === 'string'\n\t\t\t\t\t? scopeSelector( rootSelector, experimentalDuotone )\n\t\t\t\t\t: rootSelector;\n\t\t\t}\n\n\t\t\t// Regular filter.duotone support uses filter.duotone selectors with fallbacks.\n\t\t\treturn getBlockSelector( blockType, 'filter.duotone', {\n\t\t\t\tfallback: true,\n\t\t\t} );\n\t\t}\n\t}, [ name ] );\n\n\tconst attribute = style?.color?.duotone;\n\n\tconst filterClass = `wp-duotone-${ id }`;\n\n\tconst shouldRender = selector && attribute;\n\n\tuseDuotoneStyles( {\n\t\tclientId,\n\t\tid: filterClass,\n\t\tselector,\n\t\tattribute,\n\t} );\n\n\treturn {\n\t\tclassName: shouldRender ? filterClass : '',\n\t};\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/editor/duotone/add-attributes',\n\taddDuotoneAttributes\n);\n"],
5
+ "mappings": ";AAAA,SAAS,cAAc;AACvB,OAAO,iBAAiB;AACxB;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,qBAAqB;AAC9B,SAAS,iBAAiB;AAC1B,SAAS,SAAS,iBAAiB;AACnC,SAAS,iBAAiB;AAC1B;AAAA,EACC;AAAA,EACA,eAAe;AAAA,OACT;AACP;AAAA,EACC;AAAA,EACA;AAAA,EACA,gCAAgC;AAAA,EAChC;AAAA,OACM;AACP;AAAA,EACC;AAAA,EACA;AAAA,OACM;AACP;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,cAAc;AACvB,SAAS,WAAW,0BAA0B;AAC9C,SAAS,wBAAwB;AACjC,SAAS,2BAA2B;AACpC,SAAS,uBAAuB;AAChC,SAAS,SAAS,wBAAwB;AA4GxC,mBAEE,KAFF;AA1GF,IAAM,EAAE,kBAAkB,sBAAsB,0BAA0B,IACzE,OAAQ,6BAA8B;AAEvC,IAAM,cAAc,CAAC;AAMrB,IAAM,WACL,QAAQ,UAAU,aAClB,OAAO,UAAU,UAAU,SAAU,QAAS,KAC9C,CAAE,OAAO,UAAU,UAAU,SAAU,QAAS,KAChD,CAAE,OAAO,UAAU,UAAU,SAAU,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AA,MACJ;AAGA,aAAO,iBAAkB,WAAW,kBAAkB;AAAA,QACrD,UAAU;AAAA,MACX,CAAE;AAAA,IACH;AAAA,EACD,GAAG,CAAE,IAAK,CAAE;AAEZ,QAAM,YAAY,OAAO,OAAO;AAEhC,QAAM,cAAc,cAAe,EAAG;AAEtC,QAAM,eAAe,YAAY;AAEjC,mBAAkB;AAAA,IACjB;AAAA,IACA,IAAI;AAAA,IACJ;AAAA,IACA;AAAA,EACD,CAAE;AAEF,SAAO;AAAA,IACN,WAAW,eAAe,cAAc;AAAA,EACzC;AACD;AAEA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AACD;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/hooks/elements.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { getBlockSupport } from '@wordpress/blocks';\nimport { useMemo, useCallback } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport InspectorControls from '../components/inspector-controls';\nimport {\n\tuseHasColorPanel,\n\tdefault as StylesColorPanel,\n} from '../components/global-styles/color-panel';\nimport { useResolvedStyle } from '../components/global-styles/inherited-value-context';\nimport { cleanEmptyObject } from './utils';\nimport { store as blockEditorStore } from '../store';\nimport { COLOR_SUPPORT_KEY } from './color';\nimport useBlockColorContrastWarning from './contrast-checker';\nimport {\n\tgetStyleForState,\n\tisDefaultBlockStyleState,\n\tsetStyleForState,\n\tuseBlockStyleState,\n} from './block-style-state';\n\nfunction ElementsInspectorControl( { children, resetAllFilter } ) {\n\tconst attributesResetAllFilter = useCallback(\n\t\t( attributes ) => {\n\t\t\tconst updatedStyle = resetAllFilter( attributes.style );\n\t\t\treturn {\n\t\t\t\t...attributes,\n\t\t\t\tstyle: cleanEmptyObject( updatedStyle ),\n\t\t\t};\n\t\t},\n\t\t[ resetAllFilter ]\n\t);\n\n\treturn (\n\t\t<InspectorControls\n\t\t\tgroup=\"elements\"\n\t\t\tresetAllFilter={ attributesResetAllFilter }\n\t\t>\n\t\t\t{ children }\n\t\t</InspectorControls>\n\t);\n}\n\nexport function ElementsEdit( {\n\tclientId,\n\tname,\n\tsetAttributes,\n\tsettings,\n\tasWrapper,\n\tlabel,\n\tdefaultControls,\n} ) {\n\tconst selectedState = useBlockStyleState();\n\tconst isEnabled = useHasColorPanel( settings );\n\n\tconst { style, className } = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! isEnabled ) {\n\t\t\t\treturn {};\n\t\t\t}\n\t\t\tconst attributes =\n\t\t\t\tselect( blockEditorStore ).getBlockAttributes( clientId );\n\t\t\treturn {\n\t\t\t\tstyle: attributes?.style,\n\t\t\t\tclassName: attributes?.className,\n\t\t\t};\n\t\t},\n\t\t[ clientId, isEnabled ]\n\t);\n\n\tconst { value: inheritedValue } = useResolvedStyle(\n\t\tname,\n\t\tclassName,\n\t\tselectedState\n\t);\n\n\tconst isStateSelected = ! isDefaultBlockStyleState( selectedState );\n\n\tconst value = useMemo( () => {\n\t\tif ( isStateSelected ) {\n\t\t\treturn getStyleForState( style, selectedState );\n\t\t}\n\t\treturn style;\n\t}, [ isStateSelected, selectedState, style ] );\n\n\tconst onChange = isStateSelected\n\t\t? ( newStyle ) => {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tstyle: setStyleForState( style, selectedState, newStyle ),\n\t\t\t\t} );\n\t\t }\n\t\t: ( newStyle ) => {\n\t\t\t\tsetAttributes( { style: cleanEmptyObject( newStyle ) } );\n\t\t };\n\n\t// Text and background color failures are reported by the Typography and\n\t// Background panels, which own those selections.\n\tconst enableContrastChecking =\n\t\t!! value?.elements?.link?.color?.text &&\n\t\tsettings?.color?.link &&\n\t\tfalse !==\n\t\t\tgetBlockSupport( name, [\n\t\t\t\tCOLOR_SUPPORT_KEY,\n\t\t\t\t'enableContrastChecker',\n\t\t\t] );\n\n\tconst contrastWarning = useBlockColorContrastWarning( {\n\t\tclientId,\n\t\tname,\n\t\tenabled: !! enableContrastChecking,\n\t\tcheckTextColor: false,\n\t\tmessageOverride: __(\n\t\t\t'This link color has poor contrast against the background. Consider increasing contrast.'\n\t\t),\n\t} );\n\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\tdefaultControls = defaultControls\n\t\t? defaultControls\n\t\t: getBlockSupport( name, [\n\t\t\t\tCOLOR_SUPPORT_KEY,\n\t\t\t\t'__experimentalDefaultControls',\n\t\t ] );\n\n\tconst Wrapper = asWrapper || ElementsInspectorControl;\n\n\treturn (\n\t\t<StylesColorPanel\n\t\t\tas={ Wrapper }\n\t\t\tpanelId={ clientId }\n\t\t\tsettings={ settings }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t\tdefaultControls={ defaultControls }\n\t\t\tlabel={ label }\n\t\t\tcontrastWarning={ contrastWarning }\n\t\t\tinheritedValue={ inheritedValue }\n\t\t/>\n\t);\n}\n"],
5
- "mappings": ";AAGA,SAAS,uBAAuB;AAChC,SAAS,SAAS,mBAAmB;AACrC,SAAS,iBAAiB;AAC1B,SAAS,UAAU;AAKnB,OAAO,uBAAuB;AAC9B;AAAA,EACC;AAAA,EACA,WAAW;AAAA,OACL;AACP,SAAS,wBAAwB;AACjC,SAAS,wBAAwB;AACjC,SAAS,SAAS,wBAAwB;AAC1C,SAAS,yBAAyB;AAClC,OAAO,kCAAkC;AACzC;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AAeL;AAbF,SAAS,yBAA0B,EAAE,UAAU,eAAe,GAAI;AACjE,QAAM,2BAA2B;AAAA,IAChC,CAAE,eAAgB;AACjB,YAAM,eAAe,eAAgB,WAAW,KAAM;AACtD,aAAO;AAAA,QACN,GAAG;AAAA,QACH,OAAO,iBAAkB,YAAa;AAAA,MACvC;AAAA,IACD;AAAA,IACA,CAAE,cAAe;AAAA,EAClB;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,OAAM;A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AAAA,IAChB,iBAAiB;AAAA,MAChB;AAAA,IACD;AAAA,EACD,CAAE;AAEF,MAAK,CAAE,WAAY;AAClB,WAAO;AAAA,EACR;AAEA,oBAAkB,kBACf,kBACA,gBAAiB,MAAM;AAAA,IACvB;AAAA,IACA;AAAA,EACA,CAAE;AAEL,QAAM,UAAU,aAAa;AAE7B,SACC;AAAA,IAAC;AAAA;AAAA,MACA,IAAK;AAAA,MACL,SAAU;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,EACD;AAEF;",
4
+ "sourcesContent": ["import { getBlockSupport } from '@wordpress/blocks';\nimport { useMemo, useCallback } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport InspectorControls from '../components/inspector-controls';\nimport {\n\tuseHasColorPanel,\n\tdefault as StylesColorPanel,\n} from '../components/global-styles/color-panel';\nimport { useResolvedStyle } from '../components/global-styles/inherited-value-context';\nimport { cleanEmptyObject } from './utils';\nimport { store as blockEditorStore } from '../store';\nimport { COLOR_SUPPORT_KEY } from './color';\nimport useBlockColorContrastWarning from './contrast-checker';\nimport {\n\tgetStyleForState,\n\tisDefaultBlockStyleState,\n\tsetStyleForState,\n\tuseBlockStyleState,\n} from './block-style-state';\n\nfunction ElementsInspectorControl( { children, resetAllFilter } ) {\n\tconst attributesResetAllFilter = useCallback(\n\t\t( attributes ) => {\n\t\t\tconst updatedStyle = resetAllFilter( attributes.style );\n\t\t\treturn {\n\t\t\t\t...attributes,\n\t\t\t\tstyle: cleanEmptyObject( updatedStyle ),\n\t\t\t};\n\t\t},\n\t\t[ resetAllFilter ]\n\t);\n\n\treturn (\n\t\t<InspectorControls\n\t\t\tgroup=\"elements\"\n\t\t\tresetAllFilter={ attributesResetAllFilter }\n\t\t>\n\t\t\t{ children }\n\t\t</InspectorControls>\n\t);\n}\n\nexport function ElementsEdit( {\n\tclientId,\n\tname,\n\tsetAttributes,\n\tsettings,\n\tasWrapper,\n\tlabel,\n\tdefaultControls,\n} ) {\n\tconst selectedState = useBlockStyleState();\n\tconst isEnabled = useHasColorPanel( settings );\n\n\tconst { style, className } = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! isEnabled ) {\n\t\t\t\treturn {};\n\t\t\t}\n\t\t\tconst attributes =\n\t\t\t\tselect( blockEditorStore ).getBlockAttributes( clientId );\n\t\t\treturn {\n\t\t\t\tstyle: attributes?.style,\n\t\t\t\tclassName: attributes?.className,\n\t\t\t};\n\t\t},\n\t\t[ clientId, isEnabled ]\n\t);\n\n\tconst { value: inheritedValue } = useResolvedStyle(\n\t\tname,\n\t\tclassName,\n\t\tselectedState\n\t);\n\n\tconst isStateSelected = ! isDefaultBlockStyleState( selectedState );\n\n\tconst value = useMemo( () => {\n\t\tif ( isStateSelected ) {\n\t\t\treturn getStyleForState( style, selectedState );\n\t\t}\n\t\treturn style;\n\t}, [ isStateSelected, selectedState, style ] );\n\n\tconst onChange = isStateSelected\n\t\t? ( newStyle ) => {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tstyle: setStyleForState( style, selectedState, newStyle ),\n\t\t\t\t} );\n\t\t }\n\t\t: ( newStyle ) => {\n\t\t\t\tsetAttributes( { style: cleanEmptyObject( newStyle ) } );\n\t\t };\n\n\t// Text and background color failures are reported by the Typography and\n\t// Background panels, which own those selections.\n\tconst enableContrastChecking =\n\t\t!! value?.elements?.link?.color?.text &&\n\t\tsettings?.color?.link &&\n\t\tfalse !==\n\t\t\tgetBlockSupport( name, [\n\t\t\t\tCOLOR_SUPPORT_KEY,\n\t\t\t\t'enableContrastChecker',\n\t\t\t] );\n\n\tconst contrastWarning = useBlockColorContrastWarning( {\n\t\tclientId,\n\t\tname,\n\t\tenabled: !! enableContrastChecking,\n\t\tcheckTextColor: false,\n\t\tmessageOverride: __(\n\t\t\t'This link color has poor contrast against the background. Consider increasing contrast.'\n\t\t),\n\t} );\n\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\tdefaultControls = defaultControls\n\t\t? defaultControls\n\t\t: getBlockSupport( name, [\n\t\t\t\tCOLOR_SUPPORT_KEY,\n\t\t\t\t'__experimentalDefaultControls',\n\t\t ] );\n\n\tconst Wrapper = asWrapper || ElementsInspectorControl;\n\n\treturn (\n\t\t<StylesColorPanel\n\t\t\tas={ Wrapper }\n\t\t\tpanelId={ clientId }\n\t\t\tsettings={ settings }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t\tdefaultControls={ defaultControls }\n\t\t\tlabel={ label }\n\t\t\tcontrastWarning={ contrastWarning }\n\t\t\tinheritedValue={ inheritedValue }\n\t\t/>\n\t);\n}\n"],
5
+ "mappings": ";AAAA,SAAS,uBAAuB;AAChC,SAAS,SAAS,mBAAmB;AACrC,SAAS,iBAAiB;AAC1B,SAAS,UAAU;AACnB,OAAO,uBAAuB;AAC9B;AAAA,EACC;AAAA,EACA,WAAW;AAAA,OACL;AACP,SAAS,wBAAwB;AACjC,SAAS,wBAAwB;AACjC,SAAS,SAAS,wBAAwB;AAC1C,SAAS,yBAAyB;AAClC,OAAO,kCAAkC;AACzC;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AAeL;AAbF,SAAS,yBAA0B,EAAE,UAAU,eAAe,GAAI;AACjE,QAAM,2BAA2B;AAAA,IAChC,CAAE,eAAgB;AACjB,YAAM,eAAe,eAAgB,WAAW,KAAM;AACtD,aAAO;AAAA,QACN,GAAG;AAAA,QACH,OAAO,iBAAkB,YAAa;AAAA,MACvC;AAAA,IACD;AAAA,IACA,CAAE,cAAe;AAAA,EAClB;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,OAAM;AAAA,MACN,gBAAiB;AAAA,MAEf;AAAA;AAAA,EACH;AAEF;AAEO,SAAS,aAAc;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAI;AAC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AA,IACA;AAAA,EACA,CAAE;AAEL,QAAM,UAAU,aAAa;AAE7B,SACC;AAAA,IAAC;AAAA;AAAA,MACA,IAAK;AAAA,MACL,SAAU;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,EACD;AAEF;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/hooks/fit-text.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { hasBlockSupport } from '@wordpress/blocks';\nimport { useEffect, useCallback, useState } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tToggleControl,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { createHigherOrderComponent } from '@wordpress/compose';\n\nconst EMPTY_OBJECT = {};\nconst MIN_FONT_SIZE_FOR_WARNING = 12;\n\n/**\n * Internal dependencies\n */\nimport { optimizeFitText } from '../utils/fit-text-utils';\nimport { store as blockEditorStore } from '../store';\nimport { useBlockElement } from '../components/block-list/use-block-props/use-block-refs';\nimport InspectorControls from '../components/inspector-controls';\nimport FitTextSizeWarning from '../components/fit-text-size-warning';\nimport { unlock } from '../lock-unlock';\n\nexport const FIT_TEXT_SUPPORT_KEY = 'typography.fitText';\n\n/**\n * Filters registered block settings, extending attributes to include\n * the `fitText` attribute.\n *\n * @param {Object} settings Original block settings.\n * @return {Object} Filtered block settings.\n */\nfunction addAttributes( settings ) {\n\tif ( ! hasBlockSupport( settings, FIT_TEXT_SUPPORT_KEY ) ) {\n\t\treturn settings;\n\t}\n\n\t// Allow blocks to specify their own attribute definition.\n\tif ( settings.attributes?.fitText ) {\n\t\treturn settings;\n\t}\n\n\t// Add fitText attribute.\n\treturn {\n\t\t...settings,\n\t\tattributes: {\n\t\t\t...settings.attributes,\n\t\t\tfitText: {\n\t\t\t\ttype: 'boolean',\n\t\t\t},\n\t\t},\n\t};\n}\n\n/**\n * Custom hook to handle fit text functionality in the editor.\n *\n * @param {Object} props Component props.\n * @param {?boolean} props.fitText Fit text attribute.\n * @param {string} props.name Block name.\n * @param {string} props.clientId Block client ID.\n */\nfunction useFitText( { fitText, name, clientId } ) {\n\tconst [ fontSize, setFontSize ] = useState( null );\n\tconst hasFitTextSupport = hasBlockSupport( name, FIT_TEXT_SUPPORT_KEY );\n\tconst blockElement = useBlockElement( clientId );\n\n\t// Monitor block attribute changes, parent changes, and block mode.\n\t// Any attribute or parent change may change the available space.\n\t// Block mode is needed to disable fit text when in HTML editing mode.\n\tconst { blockAttributes, parentId, blockMode } = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! clientId || ! hasFitTextSupport || ! fitText ) {\n\t\t\t\treturn EMPTY_OBJECT;\n\t\t\t}\n\t\t\tconst _blockMode =\n\t\t\t\tselect( blockEditorStore ).getBlockMode( clientId );\n\t\t\tif ( _blockMode === 'html' ) {\n\t\t\t\treturn { blockMode: _blockMode };\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tblockAttributes:\n\t\t\t\t\tselect( blockEditorStore ).getBlockAttributes( clientId ),\n\t\t\t\tparentId:\n\t\t\t\t\tselect( blockEditorStore ).getBlockRootClientId( clientId ),\n\t\t\t\tblockMode: _blockMode,\n\t\t\t};\n\t\t},\n\t\t[ clientId, hasFitTextSupport, fitText ]\n\t);\n\n\tconst applyFitText = useCallback( () => {\n\t\tif ( ! blockElement || ! hasFitTextSupport || ! fitText ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Get or create style element with unique ID\n\t\tconst styleId = `fit-text-${ clientId }`;\n\t\tlet styleElement = blockElement.ownerDocument.getElementById( styleId );\n\t\tif ( ! styleElement ) {\n\t\t\tstyleElement = blockElement.ownerDocument.createElement( 'style' );\n\t\t\tstyleElement.id = styleId;\n\t\t\tblockElement.ownerDocument.head.appendChild( styleElement );\n\t\t}\n\n\t\tconst blockSelector = `#block-${ clientId }`;\n\n\t\tconst applyFontSizeStyle = ( size ) => {\n\t\t\tif ( size === 0 ) {\n\t\t\t\tstyleElement.textContent = '';\n\t\t\t} else {\n\t\t\t\tstyleElement.textContent = `${ blockSelector } { font-size: ${ size }px !important; }`;\n\t\t\t}\n\t\t};\n\n\t\tconst optimalSize = optimizeFitText( blockElement, applyFontSizeStyle );\n\t\tsetFontSize( optimalSize );\n\t}, [ blockElement, clientId, hasFitTextSupport, fitText ] );\n\n\tuseEffect( () => {\n\t\tif (\n\t\t\t! fitText ||\n\t\t\t! blockElement ||\n\t\t\t! clientId ||\n\t\t\t! hasFitTextSupport ||\n\t\t\tblockMode === 'html'\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Store current element value for cleanup\n\t\tconst currentElement = blockElement;\n\t\tconst previousVisibility = currentElement.style.visibility;\n\n\t\t// Store IDs for cleanup\n\t\tlet hideFrameId = null;\n\t\tlet calculateFrameId = null;\n\t\tlet showTimeoutId = null;\n\n\t\t// We are hiding the element doing the calculation of fit text\n\t\t// and then showing it again to avoid the user noticing a flash of potentially\n\t\t// big fitText while the binary search is happening.\n\t\thideFrameId = window.requestAnimationFrame( () => {\n\t\t\tcurrentElement.style.visibility = 'hidden';\n\t\t\t// Wait for browser to render the hidden state\n\t\t\tcalculateFrameId = window.requestAnimationFrame( () => {\n\t\t\t\tapplyFitText();\n\n\t\t\t\t// Using a timeout instead of requestAnimationFrame, because\n\t\t\t\t// with requestAnimationFrame a flash of very high size\n\t\t\t\t// can still occur although rare.\n\t\t\t\tshowTimeoutId = setTimeout( () => {\n\t\t\t\t\tcurrentElement.style.visibility = previousVisibility;\n\t\t\t\t}, 10 );\n\t\t\t} );\n\t\t} );\n\n\t\t// Watch for size changes\n\t\tlet resizeObserver;\n\t\tif ( window.ResizeObserver && currentElement.parentElement ) {\n\t\t\tresizeObserver = new window.ResizeObserver( applyFitText );\n\t\t\tresizeObserver.observe( currentElement.parentElement );\n\t\t\tresizeObserver.observe( currentElement );\n\t\t}\n\n\t\t// Cleanup function\n\t\treturn () => {\n\t\t\t// Cancel pending async operations\n\t\t\tif ( hideFrameId !== null ) {\n\t\t\t\twindow.cancelAnimationFrame( hideFrameId );\n\t\t\t}\n\t\t\tif ( calculateFrameId !== null ) {\n\t\t\t\twindow.cancelAnimationFrame( calculateFrameId );\n\t\t\t}\n\t\t\tif ( showTimeoutId !== null ) {\n\t\t\t\tclearTimeout( showTimeoutId );\n\t\t\t}\n\n\t\t\tif ( resizeObserver ) {\n\t\t\t\tresizeObserver.disconnect();\n\t\t\t}\n\n\t\t\tconst styleId = `fit-text-${ clientId }`;\n\t\t\tconst styleElement =\n\t\t\t\tcurrentElement.ownerDocument.getElementById( styleId );\n\t\t\tif ( styleElement ) {\n\t\t\t\tstyleElement.remove();\n\t\t\t}\n\t\t};\n\t}, [\n\t\tfitText,\n\t\tclientId,\n\t\tparentId,\n\t\tapplyFitText,\n\t\tblockElement,\n\t\thasFitTextSupport,\n\t\tblockMode,\n\t] );\n\n\t// Trigger fit text recalculation when content changes\n\tuseEffect( () => {\n\t\tif (\n\t\t\tfitText &&\n\t\t\tblockElement &&\n\t\t\thasFitTextSupport &&\n\t\t\tblockMode !== 'html'\n\t\t) {\n\t\t\t// Wait for next frame to ensure DOM has updated after content changes\n\t\t\tconst frameId = window.requestAnimationFrame( () => {\n\t\t\t\tif ( blockElement ) {\n\t\t\t\t\tapplyFitText();\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\treturn () => window.cancelAnimationFrame( frameId );\n\t\t}\n\t}, [\n\t\tblockAttributes,\n\t\tfitText,\n\t\tapplyFitText,\n\t\tblockElement,\n\t\thasFitTextSupport,\n\t\tblockMode,\n\t] );\n\n\treturn { fontSize };\n}\n\n/**\n * Fit text control component for the typography panel.\n *\n * @param {Object} props Component props.\n * @param {string} props.clientId Block client ID.\n * @param {Function} props.setAttributes Function to set block attributes.\n * @param {string} props.name Block name.\n * @param {boolean} props.fitText Whether fit text is enabled.\n * @param {string} props.fontSize Font size slug.\n * @param {Object} props.style Block style object.\n */\nexport function FitTextControl( {\n\tclientId,\n\tfitText = false,\n\tsetAttributes,\n\tname,\n\tfontSize,\n\tstyle,\n} ) {\n\tconst hasSelectedStyleState = useSelect(\n\t\t( select ) => {\n\t\t\tconst { hasSelectedStyleState: hasSelectedBlockStyleState } =\n\t\t\t\tunlock( select( blockEditorStore ) );\n\n\t\t\treturn hasSelectedBlockStyleState( clientId );\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tif ( ! hasBlockSupport( name, FIT_TEXT_SUPPORT_KEY ) ) {\n\t\treturn null;\n\t}\n\n\tif ( hasSelectedStyleState ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<ToolsPanelItem\n\t\t\thasValue={ () => fitText }\n\t\t\tlabel={ __( 'Fit text' ) }\n\t\t\tonDeselect={ () => setAttributes( { fitText: undefined } ) }\n\t\t\tresetAllFilter={ () => ( { fitText: undefined } ) }\n\t\t\tpanelId={ clientId }\n\t\t>\n\t\t\t<ToggleControl\n\t\t\t\tlabel={ __( 'Fit text' ) }\n\t\t\t\tchecked={ fitText }\n\t\t\t\tonChange={ () => {\n\t\t\t\t\tconst newFitText = ! fitText || undefined;\n\t\t\t\t\tconst updates = { fitText: newFitText };\n\n\t\t\t\t\t// When enabling fit text, clear font size if it has a value\n\t\t\t\t\tif ( newFitText ) {\n\t\t\t\t\t\tif ( fontSize ) {\n\t\t\t\t\t\t\tupdates.fontSize = undefined;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( style?.typography?.fontSize ) {\n\t\t\t\t\t\t\tupdates.style = {\n\t\t\t\t\t\t\t\t...style,\n\t\t\t\t\t\t\t\ttypography: {\n\t\t\t\t\t\t\t\t\t...style?.typography,\n\t\t\t\t\t\t\t\t\tfontSize: undefined,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tsetAttributes( updates );\n\t\t\t\t} }\n\t\t\t\thelp={\n\t\t\t\t\tfitText\n\t\t\t\t\t\t? __( 'Text will resize to fit its container.' )\n\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t'The text will resize to fit its container, resetting other font size settings.'\n\t\t\t\t\t\t )\n\t\t\t\t}\n\t\t\t/>\n\t\t</ToolsPanelItem>\n\t);\n}\n\n/**\n * Override props applied to the block element on save.\n *\n * @param {Object} props Additional props applied to the block element.\n * @param {Object} blockType Block type.\n * @param {Object} attributes Block attributes.\n * @return {Object} Filtered props applied to the block element.\n */\nfunction addSaveProps( props, blockType, attributes ) {\n\tif ( ! hasBlockSupport( blockType, FIT_TEXT_SUPPORT_KEY ) ) {\n\t\treturn props;\n\t}\n\n\tconst { fitText } = attributes;\n\n\tif ( ! fitText ) {\n\t\treturn props;\n\t}\n\n\t// Add CSS class for frontend detection and styling\n\tconst className = props.className\n\t\t? `${ props.className } has-fit-text`\n\t\t: 'has-fit-text';\n\n\treturn {\n\t\t...props,\n\t\tclassName,\n\t};\n}\n\n/**\n * Override props applied to the block element in the editor.\n *\n * @param {Object} props Component props including block attributes.\n * @param {string} props.name Block name.\n * @param {boolean} props.fitText Whether fit text is enabled.\n * @return {Object} Filtered props applied to the block element.\n */\nfunction useBlockProps( { name, fitText } ) {\n\tif ( fitText && hasBlockSupport( name, FIT_TEXT_SUPPORT_KEY ) ) {\n\t\treturn {\n\t\t\tclassName: 'has-fit-text',\n\t\t};\n\t}\n\treturn {};\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/fit-text/addAttribute',\n\taddAttributes\n);\n\nconst hasFitTextSupport = ( blockNameOrType ) => {\n\treturn hasBlockSupport( blockNameOrType, FIT_TEXT_SUPPORT_KEY );\n};\n\n/**\n * Component that handles the fit text font size and displays a warning\n * if the fit text font size is below a minimum threshold.\n *\n * @param {Object} props Component props.\n * @param {boolean} props.fitText Whether fit text is enabled.\n * @param {string} props.name Block name.\n * @param {string} props.clientId Block client ID.\n * @param {boolean} props.isSelected Whether the block is selected.\n * @return {Element|null} Warning component or null.\n */\nfunction FitTextFontSize( { fitText, name, clientId, isSelected } ) {\n\tconst { fontSize } = useFitText( { fitText, name, clientId } );\n\tif ( isSelected && fontSize && fontSize < MIN_FONT_SIZE_FOR_WARNING ) {\n\t\treturn (\n\t\t\t<InspectorControls group=\"typography\">\n\t\t\t\t<FitTextSizeWarning />\n\t\t\t</InspectorControls>\n\t\t);\n\t}\n\treturn null;\n}\n\n/*\n * Fit-text requires that layout calculations be done even when a block is not\n * currently selected. Therefore, the regular hooking approach using an\n * exported `edit` method is not enough, and we must use this HoC with the\n * `editor.BlockEdit` filter.\n */\nconst addFitTextControl = createHigherOrderComponent( ( BlockEdit ) => {\n\treturn function AddFitTextControl( props ) {\n\t\tconst { name, attributes, clientId, isSelected, setAttributes } = props;\n\t\tconst { fitText } = attributes;\n\t\tconst supportsFitText = hasBlockSupport( name, FIT_TEXT_SUPPORT_KEY );\n\t\tif ( ! supportsFitText ) {\n\t\t\treturn <BlockEdit { ...props } />;\n\t\t}\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<BlockEdit { ...props } />\n\t\t\t\t<InspectorControls group=\"typography\">\n\t\t\t\t\t<FitTextControl\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\tfitText={ fitText }\n\t\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\t\tname={ name }\n\t\t\t\t\t\tfontSize={ attributes.fontSize }\n\t\t\t\t\t\tstyle={ attributes.style }\n\t\t\t\t\t/>\n\t\t\t\t</InspectorControls>\n\t\t\t\t{ fitText && (\n\t\t\t\t\t<FitTextFontSize\n\t\t\t\t\t\tfitText={ fitText }\n\t\t\t\t\t\tname={ name }\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t};\n}, 'addFitTextControl' );\n\naddFilter(\n\t'editor.BlockEdit',\n\t'core/fit-text/add-fit-text-control',\n\taddFitTextControl\n);\n\nexport default {\n\tuseBlockProps,\n\taddSaveProps,\n\tattributeKeys: [ 'fitText', 'fontSize', 'style' ],\n\thasSupport: hasFitTextSupport,\n\tedit: () => null,\n};\n"],
5
- "mappings": ";AAGA,SAAS,iBAAiB;AAC1B,SAAS,uBAAuB;AAChC,SAAS,WAAW,aAAa,gBAAgB;AACjD,SAAS,iBAAiB;AAC1B,SAAS,UAAU;AACnB;AAAA,EACC;AAAA,EACA,gCAAgC;AAAA,OAC1B;AACP,SAAS,kCAAkC;AAQ3C,SAAS,uBAAuB;AAChC,SAAS,SAAS,wBAAwB;AAC1C,SAAS,uBAAuB;AAChC,OAAO,uBAAuB;AAC9B,OAAO,wBAAwB;AAC/B,SAAS,cAAc;AA4PpB,SAoIA,UApIA,KAoIA,YApIA;AAvQH,IAAM,eAAe,CAAC;AACtB,IAAM,4BAA4B;AAY3B,IAAM,uBAAuB;AASpC,SAAS,cAAe,UAAW;AAClC,MAAK,CAAE,gBAAiB,UAAU,oBAAqB,GAAI;AAC1D,WAAO;AAAA,EACR;AAGA,MAAK,SAAS,YAAY,SAAU;AACnC,WAAO;AAAA,EACR;AAGA,SAAO;AAAA,IACN,GAAG;AAAA,IACH,YAAY;AAAA,MACX,GAAG,SAAS;AAAA,MACZ,SAAS;AAAA,QACR,MAAM;AAAA,MACP;AAAA,IACD;AAAA,EACD;AACD;AAUA,SAAS,WAAY,EAAE,SAAS,MAAM,SAAS,GAAI;AAClD,QAAM,CAAE,UAAU,WAAY,IAAI,SAAU,IAAK;AACjD,QAAMA,qBAAoB,gBAAiB,MAAM,oBAAqB;AACtE,QAAM,eAAe,gBAAiB,QAAS;AAK/C,QAAM,EAAE,iBAAiB,UAAU,UAAU,IAAI;AAAA,IAChD,CAAE,WAAY;AACb,UAAK,CAAE,YAAY,CAAEA,sBAAqB,CAAE,SAAU;AACrD,eAAO;AAAA,MACR;AACA,YAAM,aACL,OAAQ,gBAA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ACA;AAAA,UACA;AAAA;AAAA,MACD;AAAA,OAEF;AAAA,EAEF;AACD,GAAG,mBAAoB;AAEvB;AAAA,EACC;AAAA,EACA;AAAA,EACA;AACD;AAEA,IAAO,mBAAQ;AAAA,EACd;AAAA,EACA;AAAA,EACA,eAAe,CAAE,WAAW,YAAY,OAAQ;AAAA,EAChD,YAAY;AAAA,EACZ,MAAM,MAAM;AACb;",
4
+ "sourcesContent": ["import { addFilter } from '@wordpress/hooks';\nimport { hasBlockSupport } from '@wordpress/blocks';\nimport { useEffect, useCallback, useState } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tToggleControl,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nconst EMPTY_OBJECT = {};\nconst MIN_FONT_SIZE_FOR_WARNING = 12;\nimport { optimizeFitText } from '../utils/fit-text-utils';\nimport { store as blockEditorStore } from '../store';\nimport { useBlockElement } from '../components/block-list/use-block-props/use-block-refs';\nimport InspectorControls from '../components/inspector-controls';\nimport FitTextSizeWarning from '../components/fit-text-size-warning';\nimport { unlock } from '../lock-unlock';\n\nexport const FIT_TEXT_SUPPORT_KEY = 'typography.fitText';\n\n/**\n * Filters registered block settings, extending attributes to include\n * the `fitText` attribute.\n *\n * @param {Object} settings Original block settings.\n * @return {Object} Filtered block settings.\n */\nfunction addAttributes( settings ) {\n\tif ( ! hasBlockSupport( settings, FIT_TEXT_SUPPORT_KEY ) ) {\n\t\treturn settings;\n\t}\n\n\t// Allow blocks to specify their own attribute definition.\n\tif ( settings.attributes?.fitText ) {\n\t\treturn settings;\n\t}\n\n\t// Add fitText attribute.\n\treturn {\n\t\t...settings,\n\t\tattributes: {\n\t\t\t...settings.attributes,\n\t\t\tfitText: {\n\t\t\t\ttype: 'boolean',\n\t\t\t},\n\t\t},\n\t};\n}\n\n/**\n * Custom hook to handle fit text functionality in the editor.\n *\n * @param {Object} props Component props.\n * @param {?boolean} props.fitText Fit text attribute.\n * @param {string} props.name Block name.\n * @param {string} props.clientId Block client ID.\n */\nfunction useFitText( { fitText, name, clientId } ) {\n\tconst [ fontSize, setFontSize ] = useState( null );\n\tconst hasFitTextSupport = hasBlockSupport( name, FIT_TEXT_SUPPORT_KEY );\n\tconst blockElement = useBlockElement( clientId );\n\n\t// Monitor block attribute changes, parent changes, and block mode.\n\t// Any attribute or parent change may change the available space.\n\t// Block mode is needed to disable fit text when in HTML editing mode.\n\tconst { blockAttributes, parentId, blockMode } = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! clientId || ! hasFitTextSupport || ! fitText ) {\n\t\t\t\treturn EMPTY_OBJECT;\n\t\t\t}\n\t\t\tconst _blockMode =\n\t\t\t\tselect( blockEditorStore ).getBlockMode( clientId );\n\t\t\tif ( _blockMode === 'html' ) {\n\t\t\t\treturn { blockMode: _blockMode };\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tblockAttributes:\n\t\t\t\t\tselect( blockEditorStore ).getBlockAttributes( clientId ),\n\t\t\t\tparentId:\n\t\t\t\t\tselect( blockEditorStore ).getBlockRootClientId( clientId ),\n\t\t\t\tblockMode: _blockMode,\n\t\t\t};\n\t\t},\n\t\t[ clientId, hasFitTextSupport, fitText ]\n\t);\n\n\tconst applyFitText = useCallback( () => {\n\t\tif ( ! blockElement || ! hasFitTextSupport || ! fitText ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Get or create style element with unique ID\n\t\tconst styleId = `fit-text-${ clientId }`;\n\t\tlet styleElement = blockElement.ownerDocument.getElementById( styleId );\n\t\tif ( ! styleElement ) {\n\t\t\tstyleElement = blockElement.ownerDocument.createElement( 'style' );\n\t\t\tstyleElement.id = styleId;\n\t\t\tblockElement.ownerDocument.head.appendChild( styleElement );\n\t\t}\n\n\t\tconst blockSelector = `#block-${ clientId }`;\n\n\t\tconst applyFontSizeStyle = ( size ) => {\n\t\t\tif ( size === 0 ) {\n\t\t\t\tstyleElement.textContent = '';\n\t\t\t} else {\n\t\t\t\tstyleElement.textContent = `${ blockSelector } { font-size: ${ size }px !important; }`;\n\t\t\t}\n\t\t};\n\n\t\tconst optimalSize = optimizeFitText( blockElement, applyFontSizeStyle );\n\t\tsetFontSize( optimalSize );\n\t}, [ blockElement, clientId, hasFitTextSupport, fitText ] );\n\n\tuseEffect( () => {\n\t\tif (\n\t\t\t! fitText ||\n\t\t\t! blockElement ||\n\t\t\t! clientId ||\n\t\t\t! hasFitTextSupport ||\n\t\t\tblockMode === 'html'\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Store current element value for cleanup\n\t\tconst currentElement = blockElement;\n\t\tconst previousVisibility = currentElement.style.visibility;\n\n\t\t// Store IDs for cleanup\n\t\tlet hideFrameId = null;\n\t\tlet calculateFrameId = null;\n\t\tlet showTimeoutId = null;\n\n\t\t// We are hiding the element doing the calculation of fit text\n\t\t// and then showing it again to avoid the user noticing a flash of potentially\n\t\t// big fitText while the binary search is happening.\n\t\thideFrameId = window.requestAnimationFrame( () => {\n\t\t\tcurrentElement.style.visibility = 'hidden';\n\t\t\t// Wait for browser to render the hidden state\n\t\t\tcalculateFrameId = window.requestAnimationFrame( () => {\n\t\t\t\tapplyFitText();\n\n\t\t\t\t// Using a timeout instead of requestAnimationFrame, because\n\t\t\t\t// with requestAnimationFrame a flash of very high size\n\t\t\t\t// can still occur although rare.\n\t\t\t\tshowTimeoutId = setTimeout( () => {\n\t\t\t\t\tcurrentElement.style.visibility = previousVisibility;\n\t\t\t\t}, 10 );\n\t\t\t} );\n\t\t} );\n\n\t\t// Watch for size changes\n\t\tlet resizeObserver;\n\t\tif ( window.ResizeObserver && currentElement.parentElement ) {\n\t\t\tresizeObserver = new window.ResizeObserver( applyFitText );\n\t\t\tresizeObserver.observe( currentElement.parentElement );\n\t\t\tresizeObserver.observe( currentElement );\n\t\t}\n\n\t\t// Cleanup function\n\t\treturn () => {\n\t\t\t// Cancel pending async operations\n\t\t\tif ( hideFrameId !== null ) {\n\t\t\t\twindow.cancelAnimationFrame( hideFrameId );\n\t\t\t}\n\t\t\tif ( calculateFrameId !== null ) {\n\t\t\t\twindow.cancelAnimationFrame( calculateFrameId );\n\t\t\t}\n\t\t\tif ( showTimeoutId !== null ) {\n\t\t\t\tclearTimeout( showTimeoutId );\n\t\t\t}\n\n\t\t\tif ( resizeObserver ) {\n\t\t\t\tresizeObserver.disconnect();\n\t\t\t}\n\n\t\t\tconst styleId = `fit-text-${ clientId }`;\n\t\t\tconst styleElement =\n\t\t\t\tcurrentElement.ownerDocument.getElementById( styleId );\n\t\t\tif ( styleElement ) {\n\t\t\t\tstyleElement.remove();\n\t\t\t}\n\t\t};\n\t}, [\n\t\tfitText,\n\t\tclientId,\n\t\tparentId,\n\t\tapplyFitText,\n\t\tblockElement,\n\t\thasFitTextSupport,\n\t\tblockMode,\n\t] );\n\n\t// Trigger fit text recalculation when content changes\n\tuseEffect( () => {\n\t\tif (\n\t\t\tfitText &&\n\t\t\tblockElement &&\n\t\t\thasFitTextSupport &&\n\t\t\tblockMode !== 'html'\n\t\t) {\n\t\t\t// Wait for next frame to ensure DOM has updated after content changes\n\t\t\tconst frameId = window.requestAnimationFrame( () => {\n\t\t\t\tif ( blockElement ) {\n\t\t\t\t\tapplyFitText();\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\treturn () => window.cancelAnimationFrame( frameId );\n\t\t}\n\t}, [\n\t\tblockAttributes,\n\t\tfitText,\n\t\tapplyFitText,\n\t\tblockElement,\n\t\thasFitTextSupport,\n\t\tblockMode,\n\t] );\n\n\treturn { fontSize };\n}\n\n/**\n * Fit text control component for the typography panel.\n *\n * @param {Object} props Component props.\n * @param {string} props.clientId Block client ID.\n * @param {Function} props.setAttributes Function to set block attributes.\n * @param {string} props.name Block name.\n * @param {boolean} props.fitText Whether fit text is enabled.\n * @param {string} props.fontSize Font size slug.\n * @param {Object} props.style Block style object.\n */\nexport function FitTextControl( {\n\tclientId,\n\tfitText = false,\n\tsetAttributes,\n\tname,\n\tfontSize,\n\tstyle,\n} ) {\n\tconst hasSelectedStyleState = useSelect(\n\t\t( select ) => {\n\t\t\tconst { hasSelectedStyleState: hasSelectedBlockStyleState } =\n\t\t\t\tunlock( select( blockEditorStore ) );\n\n\t\t\treturn hasSelectedBlockStyleState( clientId );\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tif ( ! hasBlockSupport( name, FIT_TEXT_SUPPORT_KEY ) ) {\n\t\treturn null;\n\t}\n\n\tif ( hasSelectedStyleState ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<ToolsPanelItem\n\t\t\thasValue={ () => fitText }\n\t\t\tlabel={ __( 'Fit text' ) }\n\t\t\tonDeselect={ () => setAttributes( { fitText: undefined } ) }\n\t\t\tresetAllFilter={ () => ( { fitText: undefined } ) }\n\t\t\tpanelId={ clientId }\n\t\t>\n\t\t\t<ToggleControl\n\t\t\t\tlabel={ __( 'Fit text' ) }\n\t\t\t\tchecked={ fitText }\n\t\t\t\tonChange={ () => {\n\t\t\t\t\tconst newFitText = ! fitText || undefined;\n\t\t\t\t\tconst updates = { fitText: newFitText };\n\n\t\t\t\t\t// When enabling fit text, clear font size if it has a value\n\t\t\t\t\tif ( newFitText ) {\n\t\t\t\t\t\tif ( fontSize ) {\n\t\t\t\t\t\t\tupdates.fontSize = undefined;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( style?.typography?.fontSize ) {\n\t\t\t\t\t\t\tupdates.style = {\n\t\t\t\t\t\t\t\t...style,\n\t\t\t\t\t\t\t\ttypography: {\n\t\t\t\t\t\t\t\t\t...style?.typography,\n\t\t\t\t\t\t\t\t\tfontSize: undefined,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tsetAttributes( updates );\n\t\t\t\t} }\n\t\t\t\thelp={\n\t\t\t\t\tfitText\n\t\t\t\t\t\t? __( 'Text will resize to fit its container.' )\n\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t'The text will resize to fit its container, resetting other font size settings.'\n\t\t\t\t\t\t )\n\t\t\t\t}\n\t\t\t/>\n\t\t</ToolsPanelItem>\n\t);\n}\n\n/**\n * Override props applied to the block element on save.\n *\n * @param {Object} props Additional props applied to the block element.\n * @param {Object} blockType Block type.\n * @param {Object} attributes Block attributes.\n * @return {Object} Filtered props applied to the block element.\n */\nfunction addSaveProps( props, blockType, attributes ) {\n\tif ( ! hasBlockSupport( blockType, FIT_TEXT_SUPPORT_KEY ) ) {\n\t\treturn props;\n\t}\n\n\tconst { fitText } = attributes;\n\n\tif ( ! fitText ) {\n\t\treturn props;\n\t}\n\n\t// Add CSS class for frontend detection and styling\n\tconst className = props.className\n\t\t? `${ props.className } has-fit-text`\n\t\t: 'has-fit-text';\n\n\treturn {\n\t\t...props,\n\t\tclassName,\n\t};\n}\n\n/**\n * Override props applied to the block element in the editor.\n *\n * @param {Object} props Component props including block attributes.\n * @param {string} props.name Block name.\n * @param {boolean} props.fitText Whether fit text is enabled.\n * @return {Object} Filtered props applied to the block element.\n */\nfunction useBlockProps( { name, fitText } ) {\n\tif ( fitText && hasBlockSupport( name, FIT_TEXT_SUPPORT_KEY ) ) {\n\t\treturn {\n\t\t\tclassName: 'has-fit-text',\n\t\t};\n\t}\n\treturn {};\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/fit-text/addAttribute',\n\taddAttributes\n);\n\nconst hasFitTextSupport = ( blockNameOrType ) => {\n\treturn hasBlockSupport( blockNameOrType, FIT_TEXT_SUPPORT_KEY );\n};\n\n/**\n * Component that handles the fit text font size and displays a warning\n * if the fit text font size is below a minimum threshold.\n *\n * @param {Object} props Component props.\n * @param {boolean} props.fitText Whether fit text is enabled.\n * @param {string} props.name Block name.\n * @param {string} props.clientId Block client ID.\n * @param {boolean} props.isSelected Whether the block is selected.\n * @return {Element|null} Warning component or null.\n */\nfunction FitTextFontSize( { fitText, name, clientId, isSelected } ) {\n\tconst { fontSize } = useFitText( { fitText, name, clientId } );\n\tif ( isSelected && fontSize && fontSize < MIN_FONT_SIZE_FOR_WARNING ) {\n\t\treturn (\n\t\t\t<InspectorControls group=\"typography\">\n\t\t\t\t<FitTextSizeWarning />\n\t\t\t</InspectorControls>\n\t\t);\n\t}\n\treturn null;\n}\n\n/*\n * Fit-text requires that layout calculations be done even when a block is not\n * currently selected. Therefore, the regular hooking approach using an\n * exported `edit` method is not enough, and we must use this HoC with the\n * `editor.BlockEdit` filter.\n */\nconst addFitTextControl = createHigherOrderComponent( ( BlockEdit ) => {\n\treturn function AddFitTextControl( props ) {\n\t\tconst { name, attributes, clientId, isSelected, setAttributes } = props;\n\t\tconst { fitText } = attributes;\n\t\tconst supportsFitText = hasBlockSupport( name, FIT_TEXT_SUPPORT_KEY );\n\t\tif ( ! supportsFitText ) {\n\t\t\treturn <BlockEdit { ...props } />;\n\t\t}\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<BlockEdit { ...props } />\n\t\t\t\t<InspectorControls group=\"typography\">\n\t\t\t\t\t<FitTextControl\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\tfitText={ fitText }\n\t\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\t\tname={ name }\n\t\t\t\t\t\tfontSize={ attributes.fontSize }\n\t\t\t\t\t\tstyle={ attributes.style }\n\t\t\t\t\t/>\n\t\t\t\t</InspectorControls>\n\t\t\t\t{ fitText && (\n\t\t\t\t\t<FitTextFontSize\n\t\t\t\t\t\tfitText={ fitText }\n\t\t\t\t\t\tname={ name }\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t};\n}, 'addFitTextControl' );\n\naddFilter(\n\t'editor.BlockEdit',\n\t'core/fit-text/add-fit-text-control',\n\taddFitTextControl\n);\n\nexport default {\n\tuseBlockProps,\n\taddSaveProps,\n\tattributeKeys: [ 'f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AAAA,EACA;AACD;AAEA,IAAO,mBAAQ;AAAA,EACd;AAAA,EACA;AAAA,EACA,eAAe,CAAE,WAAW,YAAY,OAAQ;AAAA,EAChD,YAAY;AAAA,EACZ,MAAM,MAAM;AACb;",
6
6
  "names": ["hasFitTextSupport"]
7
7
  }
@@ -2,12 +2,10 @@
2
2
  import { addFilter } from "@wordpress/hooks";
3
3
  import { hasBlockSupport } from "@wordpress/blocks";
4
4
  import TokenList from "@wordpress/token-list";
5
- import { privateApis as componentsPrivateApis } from "@wordpress/components";
5
+ import { kebabCase } from "@wordpress/kebab-case";
6
6
  import { shouldSkipSerialization } from "./utils.mjs";
7
7
  import { TYPOGRAPHY_SUPPORT_KEY } from "./typography.mjs";
8
- import { unlock } from "../lock-unlock.mjs";
9
8
  var FONT_FAMILY_SUPPORT_KEY = "typography.__experimentalFontFamily";
10
- var { kebabCase } = unlock(componentsPrivateApis);
11
9
  function addAttributes(settings) {
12
10
  if (!hasBlockSupport(settings, FONT_FAMILY_SUPPORT_KEY)) {
13
11
  return settings;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/hooks/font-family.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { hasBlockSupport } from '@wordpress/blocks';\nimport TokenList from '@wordpress/token-list';\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { shouldSkipSerialization } from './utils';\nimport { TYPOGRAPHY_SUPPORT_KEY } from './typography';\nimport { unlock } from '../lock-unlock';\n\nexport const FONT_FAMILY_SUPPORT_KEY = 'typography.__experimentalFontFamily';\nconst { kebabCase } = unlock( componentsPrivateApis );\n\n/**\n * Filters registered block settings, extending attributes to include\n * the `fontFamily` attribute.\n *\n * @param {Object} settings Original block settings\n * @return {Object} Filtered block settings\n */\nfunction addAttributes( settings ) {\n\tif ( ! hasBlockSupport( settings, FONT_FAMILY_SUPPORT_KEY ) ) {\n\t\treturn settings;\n\t}\n\n\t// Allow blocks to specify a default value if needed.\n\tif ( ! settings.attributes.fontFamily ) {\n\t\tObject.assign( settings.attributes, {\n\t\t\tfontFamily: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn settings;\n}\n\n/**\n * Override props assigned to save component to inject font family.\n *\n * @param {Object} props Additional props applied to save element\n * @param {Object} blockType Block type\n * @param {Object} attributes Block attributes\n * @return {Object} Filtered props applied to save element\n */\nfunction addSaveProps( props, blockType, attributes ) {\n\tif ( ! hasBlockSupport( blockType, FONT_FAMILY_SUPPORT_KEY ) ) {\n\t\treturn props;\n\t}\n\n\tif (\n\t\tshouldSkipSerialization(\n\t\t\tblockType,\n\t\t\tTYPOGRAPHY_SUPPORT_KEY,\n\t\t\t'fontFamily'\n\t\t)\n\t) {\n\t\treturn props;\n\t}\n\n\tif ( ! attributes?.fontFamily ) {\n\t\treturn props;\n\t}\n\n\t// Use TokenList to dedupe classes.\n\tconst classes = new TokenList( props.className );\n\tclasses.add( `has-${ kebabCase( attributes?.fontFamily ) }-font-family` );\n\tconst newClassName = classes.value;\n\tprops.className = newClassName ? newClassName : undefined;\n\n\treturn props;\n}\n\nfunction useBlockProps( { name, fontFamily } ) {\n\treturn addSaveProps( {}, name, { fontFamily } );\n}\n\nexport default {\n\tuseBlockProps,\n\taddSaveProps,\n\tattributeKeys: [ 'fontFamily' ],\n\thasSupport( name ) {\n\t\treturn hasBlockSupport( name, FONT_FAMILY_SUPPORT_KEY );\n\t},\n};\n\n/**\n * Resets the font family block support attribute. This can be used when\n * disabling the font family support controls for a block via a progressive\n * discovery panel.\n *\n * @param {Object} props Block props.\n * @param {Object} props.setAttributes Function to set block's attributes.\n */\nexport function resetFontFamily( { setAttributes } ) {\n\tsetAttributes( { fontFamily: undefined } );\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/fontFamily/addAttribute',\n\taddAttributes\n);\n"],
5
- "mappings": ";AAGA,SAAS,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A;AAAA,EACA;AACD;",
4
+ "sourcesContent": ["import { addFilter } from '@wordpress/hooks';\nimport { hasBlockSupport } from '@wordpress/blocks';\nimport TokenList from '@wordpress/token-list';\nimport { kebabCase } from '@wordpress/kebab-case';\nimport { shouldSkipSerialization } from './utils';\nimport { TYPOGRAPHY_SUPPORT_KEY } from './typography';\n\nexport const FONT_FAMILY_SUPPORT_KEY = 'typography.__experimentalFontFamily';\n\n/**\n * Filters registered block settings, extending attributes to include\n * the `fontFamily` attribute.\n *\n * @param {Object} settings Original block settings\n * @return {Object} Filtered block settings\n */\nfunction addAttributes( settings ) {\n\tif ( ! hasBlockSupport( settings, FONT_FAMILY_SUPPORT_KEY ) ) {\n\t\treturn settings;\n\t}\n\n\t// Allow blocks to specify a default value if needed.\n\tif ( ! settings.attributes.fontFamily ) {\n\t\tObject.assign( settings.attributes, {\n\t\t\tfontFamily: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn settings;\n}\n\n/**\n * Override props assigned to save component to inject font family.\n *\n * @param {Object} props Additional props applied to save element\n * @param {Object} blockType Block type\n * @param {Object} attributes Block attributes\n * @return {Object} Filtered props applied to save element\n */\nfunction addSaveProps( props, blockType, attributes ) {\n\tif ( ! hasBlockSupport( blockType, FONT_FAMILY_SUPPORT_KEY ) ) {\n\t\treturn props;\n\t}\n\n\tif (\n\t\tshouldSkipSerialization(\n\t\t\tblockType,\n\t\t\tTYPOGRAPHY_SUPPORT_KEY,\n\t\t\t'fontFamily'\n\t\t)\n\t) {\n\t\treturn props;\n\t}\n\n\tif ( ! attributes?.fontFamily ) {\n\t\treturn props;\n\t}\n\n\t// Use TokenList to dedupe classes.\n\tconst classes = new TokenList( props.className );\n\tclasses.add( `has-${ kebabCase( attributes?.fontFamily ) }-font-family` );\n\tconst newClassName = classes.value;\n\tprops.className = newClassName ? newClassName : undefined;\n\n\treturn props;\n}\n\nfunction useBlockProps( { name, fontFamily } ) {\n\treturn addSaveProps( {}, name, { fontFamily } );\n}\n\nexport default {\n\tuseBlockProps,\n\taddSaveProps,\n\tattributeKeys: [ 'fontFamily' ],\n\thasSupport( name ) {\n\t\treturn hasBlockSupport( name, FONT_FAMILY_SUPPORT_KEY );\n\t},\n};\n\n/**\n * Resets the font family block support attribute. This can be used when\n * disabling the font family support controls for a block via a progressive\n * discovery panel.\n *\n * @param {Object} props Block props.\n * @param {Object} props.setAttributes Function to set block's attributes.\n */\nexport function resetFontFamily( { setAttributes } ) {\n\tsetAttributes( { fontFamily: undefined } );\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/fontFamily/addAttribute',\n\taddAttributes\n);\n"],
5
+ "mappings": ";AAAA,SAAS,iBAAiB;AAC1B,SAAS,uBAAuB;AAChC,OAAO,eAAe;AACtB,SAAS,iBAAiB;AAC1B,SAAS,+BAA+B;AACxC,SAAS,8BAA8B;AAEhC,IAAM,0BAA0B;AASvC,SAAS,cAAe,UAAW;AAClC,MAAK,CAAE,gBAAiB,UAAU,uBAAwB,GAAI;AAC7D,WAAO;AAAA,EACR;AAGA,MAAK,CAAE,SAAS,WAAW,YAAa;AACvC,WAAO,OAAQ,SAAS,YAAY;AAAA,MACnC,YAAY;AAAA,QACX,MAAM;AAAA,MACP;AAAA,IACD,CAAE;AAAA,EACH;AAEA,SAAO;AACR;AAUA,SAAS,aAAc,OAAO,WAAW,YAAa;AACrD,MAAK,CAAE,gBAAiB,WAAW,uBAAwB,GAAI;AAC9D,WAAO;AAAA,EACR;AAEA,MACC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,EACD,GACC;AACD,WAAO;AAAA,EACR;AAEA,MAAK,CAAE,YAAY,YAAa;AAC/B,WAAO;AAAA,EACR;AAGA,QAAM,UAAU,IAAI,UAAW,MAAM,SAAU;AAC/C,UAAQ,IAAK,OAAQ,UAAW,YAAY,UAAW,CAAE,cAAe;AACxE,QAAM,eAAe,QAAQ;AAC7B,QAAM,YAAY,eAAe,eAAe;AAEhD,SAAO;AACR;AAEA,SAAS,cAAe,EAAE,MAAM,WAAW,GAAI;AAC9C,SAAO,aAAc,CAAC,GAAG,MAAM,EAAE,WAAW,CAAE;AAC/C;AAEA,IAAO,sBAAQ;AAAA,EACd;AAAA,EACA;AAAA,EACA,eAAe,CAAE,YAAa;AAAA,EAC9B,WAAY,MAAO;AAClB,WAAO,gBAAiB,MAAM,uBAAwB;AAAA,EACvD;AACD;AAUO,SAAS,gBAAiB,EAAE,cAAc,GAAI;AACpD,gBAAe,EAAE,YAAY,OAAU,CAAE;AAC1C;AAEA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AACD;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/hooks/font-size.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { hasBlockSupport } from '@wordpress/blocks';\nimport TokenList from '@wordpress/token-list';\nimport { getTypographyFontSizeValue } from '@wordpress/global-styles-engine';\n\n/**\n * Internal dependencies\n */\nimport {\n\tgetFontSize,\n\tgetFontSizeClass,\n\tgetFontSizeObjectByValue,\n\tFontSizePicker,\n} from '../components/font-sizes';\nimport { TYPOGRAPHY_SUPPORT_KEY } from './typography';\nimport {\n\tcleanEmptyObject,\n\ttransformStyles,\n\tshouldSkipSerialization,\n} from './utils';\nimport { useSettings } from '../components/use-settings';\n\nexport const FONT_SIZE_SUPPORT_KEY = 'typography.fontSize';\n\n/**\n * Filters registered block settings, extending attributes to include\n * `fontSize` and `fontWeight` attributes.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nfunction addAttributes( settings ) {\n\tif ( ! hasBlockSupport( settings, FONT_SIZE_SUPPORT_KEY ) ) {\n\t\treturn settings;\n\t}\n\n\t// Allow blocks to specify a default value if needed.\n\tif ( ! settings.attributes.fontSize ) {\n\t\tObject.assign( settings.attributes, {\n\t\t\tfontSize: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn settings;\n}\n\n/**\n * Override props assigned to save component to inject font size.\n *\n * @param {Object} props Additional props applied to save element.\n * @param {Object} blockNameOrType Block type.\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} Filtered props applied to save element.\n */\nfunction addSaveProps( props, blockNameOrType, attributes ) {\n\tif ( ! hasBlockSupport( blockNameOrType, FONT_SIZE_SUPPORT_KEY ) ) {\n\t\treturn props;\n\t}\n\n\tif (\n\t\tshouldSkipSerialization(\n\t\t\tblockNameOrType,\n\t\t\tTYPOGRAPHY_SUPPORT_KEY,\n\t\t\t'fontSize'\n\t\t)\n\t) {\n\t\treturn props;\n\t}\n\n\t// Use TokenList to dedupe classes.\n\tconst classes = new TokenList( props.className );\n\tclasses.add( getFontSizeClass( attributes.fontSize ) );\n\tconst newClassName = classes.value;\n\tprops.className = newClassName ? newClassName : undefined;\n\n\treturn props;\n}\n\n/**\n * Inspector control panel containing the font size related configuration\n *\n * @param {Object} props\n *\n * @return {Element} Font size edit element.\n */\nexport function FontSizeEdit( props ) {\n\tconst {\n\t\tattributes: { fontSize, style },\n\t\tsetAttributes,\n\t} = props;\n\tconst [ fontSizes ] = useSettings( 'typography.fontSizes' );\n\n\tconst onChange = ( value, selectedItem ) => {\n\t\t// Use the selectedItem's slug if available, otherwise fall back to finding by value\n\t\tconst fontSizeSlug =\n\t\t\tselectedItem?.slug ||\n\t\t\tgetFontSizeObjectByValue( fontSizes, value ).slug;\n\n\t\tsetAttributes( {\n\t\t\tstyle: cleanEmptyObject( {\n\t\t\t\t...style,\n\t\t\t\ttypography: {\n\t\t\t\t\t...style?.typography,\n\t\t\t\t\tfontSize: fontSizeSlug ? undefined : value,\n\t\t\t\t},\n\t\t\t} ),\n\t\t\tfontSize: fontSizeSlug,\n\t\t} );\n\t};\n\n\tconst fontSizeObject = getFontSize(\n\t\tfontSizes,\n\t\tfontSize,\n\t\tstyle?.typography?.fontSize\n\t);\n\n\tconst fontSizeValue =\n\t\tfontSizeObject?.size || style?.typography?.fontSize || fontSize;\n\n\treturn (\n\t\t<FontSizePicker\n\t\t\tonChange={ onChange }\n\t\t\tvalue={ fontSize || fontSizeValue }\n\t\t\tvalueMode={ fontSize ? 'slug' : 'literal' }\n\t\t\twithReset={ false }\n\t\t\twithSlider\n\t\t/>\n\t);\n}\n\n/**\n * Custom hook that checks if font-size settings have been disabled.\n *\n * @param {string} name The name of the block.\n * @return {boolean} Whether setting is disabled.\n */\nexport function useIsFontSizeDisabled( { name: blockName } = {} ) {\n\tconst [ fontSizes ] = useSettings( 'typography.fontSizes' );\n\tconst hasFontSizes = !! fontSizes?.length;\n\n\treturn (\n\t\t! hasBlockSupport( blockName, FONT_SIZE_SUPPORT_KEY ) || ! hasFontSizes\n\t);\n}\n\nfunction useBlockProps( { name, fontSize, style } ) {\n\tconst [ fontSizes, fluidTypographySettings, layoutSettings ] = useSettings(\n\t\t'typography.fontSizes',\n\t\t'typography.fluid',\n\t\t'layout'\n\t);\n\n\t/*\n\t * Only add inline styles if the block supports font sizes,\n\t * doesn't skip serialization of font sizes,\n\t * and has either a custom font size or a preset font size.\n\t */\n\tif (\n\t\t! hasBlockSupport( name, FONT_SIZE_SUPPORT_KEY ) ||\n\t\tshouldSkipSerialization( name, TYPOGRAPHY_SUPPORT_KEY, 'fontSize' ) ||\n\t\t( ! fontSize && ! style?.typography?.fontSize )\n\t) {\n\t\treturn;\n\t}\n\n\tlet props;\n\n\tif ( style?.typography?.fontSize ) {\n\t\tprops = {\n\t\t\tstyle: {\n\t\t\t\tfontSize: getTypographyFontSizeValue(\n\t\t\t\t\t{ size: style.typography.fontSize },\n\t\t\t\t\t{\n\t\t\t\t\t\ttypography: {\n\t\t\t\t\t\t\tfluid: fluidTypographySettings,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tlayout: layoutSettings,\n\t\t\t\t\t}\n\t\t\t\t),\n\t\t\t},\n\t\t};\n\t}\n\n\tif ( fontSize ) {\n\t\tprops = {\n\t\t\tstyle: {\n\t\t\t\tfontSize: getFontSize(\n\t\t\t\t\tfontSizes,\n\t\t\t\t\tfontSize,\n\t\t\t\t\tstyle?.typography?.fontSize\n\t\t\t\t).size,\n\t\t\t},\n\t\t};\n\t}\n\n\tif ( ! props ) {\n\t\treturn;\n\t}\n\n\treturn addSaveProps( props, name, { fontSize } );\n}\n\nexport default {\n\tuseBlockProps,\n\taddSaveProps,\n\tattributeKeys: [ 'fontSize', 'style' ],\n\thasSupport( name ) {\n\t\treturn hasBlockSupport( name, FONT_SIZE_SUPPORT_KEY );\n\t},\n};\n\nconst MIGRATION_PATHS = {\n\tfontSize: [ [ 'fontSize' ], [ 'style', 'typography', 'fontSize' ] ],\n};\n\nfunction addTransforms( result, source, index, results ) {\n\tconst destinationBlockType = result.name;\n\tconst activeSupports = {\n\t\tfontSize: hasBlockSupport(\n\t\t\tdestinationBlockType,\n\t\t\tFONT_SIZE_SUPPORT_KEY\n\t\t),\n\t};\n\treturn transformStyles(\n\t\tactiveSupports,\n\t\tMIGRATION_PATHS,\n\t\tresult,\n\t\tsource,\n\t\tindex,\n\t\tresults\n\t);\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/font/addAttribute',\n\taddAttributes\n);\n\naddFilter(\n\t'blocks.switchToBlockType.transformedBlock',\n\t'core/font-size/addTransforms',\n\taddTransforms\n);\n"],
5
- "mappings": ";AAGA,SAAS,iBAAiB;AAC1B,SAAS,uBAAuB;AAChC,OAAO,eAAe;AACtB,SAAS,kCAAkC;AAK3C;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,8BAA8B;AACvC;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,mBAAmB;AAwG1B;AAtGK,IAAM,wBAAwB;AAUrC,SAAS,cAAe,UAAW;AAClC,MAAK,CAAE,gBAAiB,UAAU,qBAAsB,GAAI;AAC3D,WAAO;AAAA,EACR;AAGA,MAAK,CAAE,SAAS,WAAW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AAQ,QAAQ,OAAO,SAAU;AACxD,QAAM,uBAAuB,OAAO;AACpC,QAAM,iBAAiB;AAAA,IACtB,UAAU;AAAA,MACT;AAAA,MACA;AAAA,IACD;AAAA,EACD;AACA,SAAO;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACD;AAEA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AACD;AAEA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AACD;",
4
+ "sourcesContent": ["import { addFilter } from '@wordpress/hooks';\nimport { hasBlockSupport } from '@wordpress/blocks';\nimport TokenList from '@wordpress/token-list';\nimport { getTypographyFontSizeValue } from '@wordpress/global-styles-engine';\nimport {\n\tgetFontSize,\n\tgetFontSizeClass,\n\tgetFontSizeObjectByValue,\n\tFontSizePicker,\n} from '../components/font-sizes';\nimport { TYPOGRAPHY_SUPPORT_KEY } from './typography';\nimport {\n\tcleanEmptyObject,\n\ttransformStyles,\n\tshouldSkipSerialization,\n} from './utils';\nimport { useSettings } from '../components/use-settings';\n\nexport const FONT_SIZE_SUPPORT_KEY = 'typography.fontSize';\n\n/**\n * Filters registered block settings, extending attributes to include\n * `fontSize` and `fontWeight` attributes.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nfunction addAttributes( settings ) {\n\tif ( ! hasBlockSupport( settings, FONT_SIZE_SUPPORT_KEY ) ) {\n\t\treturn settings;\n\t}\n\n\t// Allow blocks to specify a default value if needed.\n\tif ( ! settings.attributes.fontSize ) {\n\t\tObject.assign( settings.attributes, {\n\t\t\tfontSize: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn settings;\n}\n\n/**\n * Override props assigned to save component to inject font size.\n *\n * @param {Object} props Additional props applied to save element.\n * @param {Object} blockNameOrType Block type.\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} Filtered props applied to save element.\n */\nfunction addSaveProps( props, blockNameOrType, attributes ) {\n\tif ( ! hasBlockSupport( blockNameOrType, FONT_SIZE_SUPPORT_KEY ) ) {\n\t\treturn props;\n\t}\n\n\tif (\n\t\tshouldSkipSerialization(\n\t\t\tblockNameOrType,\n\t\t\tTYPOGRAPHY_SUPPORT_KEY,\n\t\t\t'fontSize'\n\t\t)\n\t) {\n\t\treturn props;\n\t}\n\n\t// Use TokenList to dedupe classes.\n\tconst classes = new TokenList( props.className );\n\tclasses.add( getFontSizeClass( attributes.fontSize ) );\n\tconst newClassName = classes.value;\n\tprops.className = newClassName ? newClassName : undefined;\n\n\treturn props;\n}\n\n/**\n * Inspector control panel containing the font size related configuration\n *\n * @param {Object} props\n *\n * @return {Element} Font size edit element.\n */\nexport function FontSizeEdit( props ) {\n\tconst {\n\t\tattributes: { fontSize, style },\n\t\tsetAttributes,\n\t} = props;\n\tconst [ fontSizes ] = useSettings( 'typography.fontSizes' );\n\n\tconst onChange = ( value, selectedItem ) => {\n\t\t// Use the selectedItem's slug if available, otherwise fall back to finding by value\n\t\tconst fontSizeSlug =\n\t\t\tselectedItem?.slug ||\n\t\t\tgetFontSizeObjectByValue( fontSizes, value ).slug;\n\n\t\tsetAttributes( {\n\t\t\tstyle: cleanEmptyObject( {\n\t\t\t\t...style,\n\t\t\t\ttypography: {\n\t\t\t\t\t...style?.typography,\n\t\t\t\t\tfontSize: fontSizeSlug ? undefined : value,\n\t\t\t\t},\n\t\t\t} ),\n\t\t\tfontSize: fontSizeSlug,\n\t\t} );\n\t};\n\n\tconst fontSizeObject = getFontSize(\n\t\tfontSizes,\n\t\tfontSize,\n\t\tstyle?.typography?.fontSize\n\t);\n\n\tconst fontSizeValue =\n\t\tfontSizeObject?.size || style?.typography?.fontSize || fontSize;\n\n\treturn (\n\t\t<FontSizePicker\n\t\t\tonChange={ onChange }\n\t\t\tvalue={ fontSize || fontSizeValue }\n\t\t\tvalueMode={ fontSize ? 'slug' : 'literal' }\n\t\t\twithReset={ false }\n\t\t\twithSlider\n\t\t/>\n\t);\n}\n\n/**\n * Custom hook that checks if font-size settings have been disabled.\n *\n * @param {string} name The name of the block.\n * @return {boolean} Whether setting is disabled.\n */\nexport function useIsFontSizeDisabled( { name: blockName } = {} ) {\n\tconst [ fontSizes ] = useSettings( 'typography.fontSizes' );\n\tconst hasFontSizes = !! fontSizes?.length;\n\n\treturn (\n\t\t! hasBlockSupport( blockName, FONT_SIZE_SUPPORT_KEY ) || ! hasFontSizes\n\t);\n}\n\nfunction useBlockProps( { name, fontSize, style } ) {\n\tconst [ fontSizes, fluidTypographySettings, layoutSettings ] = useSettings(\n\t\t'typography.fontSizes',\n\t\t'typography.fluid',\n\t\t'layout'\n\t);\n\n\t/*\n\t * Only add inline styles if the block supports font sizes,\n\t * doesn't skip serialization of font sizes,\n\t * and has either a custom font size or a preset font size.\n\t */\n\tif (\n\t\t! hasBlockSupport( name, FONT_SIZE_SUPPORT_KEY ) ||\n\t\tshouldSkipSerialization( name, TYPOGRAPHY_SUPPORT_KEY, 'fontSize' ) ||\n\t\t( ! fontSize && ! style?.typography?.fontSize )\n\t) {\n\t\treturn;\n\t}\n\n\tlet props;\n\n\tif ( style?.typography?.fontSize ) {\n\t\tprops = {\n\t\t\tstyle: {\n\t\t\t\tfontSize: getTypographyFontSizeValue(\n\t\t\t\t\t{ size: style.typography.fontSize },\n\t\t\t\t\t{\n\t\t\t\t\t\ttypography: {\n\t\t\t\t\t\t\tfluid: fluidTypographySettings,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tlayout: layoutSettings,\n\t\t\t\t\t}\n\t\t\t\t),\n\t\t\t},\n\t\t};\n\t}\n\n\tif ( fontSize ) {\n\t\tprops = {\n\t\t\tstyle: {\n\t\t\t\tfontSize: getFontSize(\n\t\t\t\t\tfontSizes,\n\t\t\t\t\tfontSize,\n\t\t\t\t\tstyle?.typography?.fontSize\n\t\t\t\t).size,\n\t\t\t},\n\t\t};\n\t}\n\n\tif ( ! props ) {\n\t\treturn;\n\t}\n\n\treturn addSaveProps( props, name, { fontSize } );\n}\n\nexport default {\n\tuseBlockProps,\n\taddSaveProps,\n\tattributeKeys: [ 'fontSize', 'style' ],\n\thasSupport( name ) {\n\t\treturn hasBlockSupport( name, FONT_SIZE_SUPPORT_KEY );\n\t},\n};\n\nconst MIGRATION_PATHS = {\n\tfontSize: [ [ 'fontSize' ], [ 'style', 'typography', 'fontSize' ] ],\n};\n\nfunction addTransforms( result, source, index, results ) {\n\tconst destinationBlockType = result.name;\n\tconst activeSupports = {\n\t\tfontSize: hasBlockSupport(\n\t\t\tdestinationBlockType,\n\t\t\tFONT_SIZE_SUPPORT_KEY\n\t\t),\n\t};\n\treturn transformStyles(\n\t\tactiveSupports,\n\t\tMIGRATION_PATHS,\n\t\tresult,\n\t\tsource,\n\t\tindex,\n\t\tresults\n\t);\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/font/addAttribute',\n\taddAttributes\n);\n\naddFilter(\n\t'blocks.switchToBlockType.transformedBlock',\n\t'core/font-size/addTransforms',\n\taddTransforms\n);\n"],
5
+ "mappings": ";AAAA,SAAS,iBAAiB;AAC1B,SAAS,uBAAuB;AAChC,OAAO,eAAe;AACtB,SAAS,kCAAkC;AAC3C;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,8BAA8B;AACvC;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,mBAAmB;AAwG1B;AAtGK,IAAM,wBAAwB;AAUrC,SAAS,cAAe,UAAW;AAClC,MAAK,CAAE,gBAAiB,UAAU,qBAAsB,GAAI;AAC3D,WAAO;AAAA,EACR;AAGA,MAAK,CAAE,SAAS,WAAW,UAAW;AACrC,WAAO,OAAQ,SAAS,YAAY;AAAA,MACnC,UAAU;AAAA,QACT,MAAM;AAAA,MACP;AAAA,IACD,CAAE;AAAA,EACH;AAEA,SAAO;AACR;AAWA,SAAS,aAAc,OAAO,iBAAiB,YAAa;AAC3D,MAAK,CAAE,gBAAiB,iBAAiB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A,IACA;AAAA,EACD;AACD;AAEA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AACD;AAEA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AACD;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,9 @@
1
1
  // packages/block-editor/src/hooks/gap.js
2
2
  import { getSpacingPresetCssVar } from "../components/spacing-sizes-control/utils.mjs";
3
+ function isAxialBlockGapAllowed(layout, defaultLayout) {
4
+ const usedLayout = layout?.inherit || layout?.contentSize || layout?.wideSize ? { ...layout, type: "constrained" } : layout || defaultLayout || {};
5
+ return ["flex", "grid"].includes(usedLayout?.type);
6
+ }
3
7
  function getGapBoxControlValueFromStyle(blockGapValue) {
4
8
  if (!blockGapValue) {
5
9
  return null;
@@ -21,6 +25,7 @@ function getGapCSSValue(blockGapValue, defaultValue = "0") {
21
25
  }
22
26
  export {
23
27
  getGapBoxControlValueFromStyle,
24
- getGapCSSValue
28
+ getGapCSSValue,
29
+ isAxialBlockGapAllowed
25
30
  };
26
31
  //# sourceMappingURL=gap.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/hooks/gap.js"],
4
- "sourcesContent": ["/**\n * Internal dependencies\n */\nimport { getSpacingPresetCssVar } from '../components/spacing-sizes-control/utils';\n\n/**\n * Returns a BoxControl object value from a given blockGap style value.\n * The string check is for backwards compatibility before Gutenberg supported\n * split gap values (row and column) and the value was a string n + unit.\n *\n * @param {?string | ?Object} blockGapValue A block gap string or axial object value, e.g., '10px' or { top: '10px', left: '10px'}.\n * @return {Object|null} A value to pass to the BoxControl component.\n */\nexport function getGapBoxControlValueFromStyle( blockGapValue ) {\n\tif ( ! blockGapValue ) {\n\t\treturn null;\n\t}\n\n\tconst isValueString = typeof blockGapValue === 'string';\n\treturn {\n\t\ttop: isValueString ? blockGapValue : blockGapValue?.top,\n\t\tleft: isValueString ? blockGapValue : blockGapValue?.left,\n\t};\n}\n\n/**\n * Returns a CSS value for the `gap` property from a given blockGap style.\n *\n * @param {?string | ?Object} blockGapValue A block gap string or axial object value, e.g., '10px' or { top: '10px', left: '10px'}.\n * @param {?string} defaultValue A default gap value.\n * @return {string|null} The concatenated gap value (row and column).\n */\nexport function getGapCSSValue( blockGapValue, defaultValue = '0' ) {\n\tconst blockGapBoxControlValue =\n\t\tgetGapBoxControlValueFromStyle( blockGapValue );\n\tif ( ! blockGapBoxControlValue ) {\n\t\treturn null;\n\t}\n\n\tconst row =\n\t\tgetSpacingPresetCssVar( blockGapBoxControlValue?.top ) || defaultValue;\n\tconst column =\n\t\tgetSpacingPresetCssVar( blockGapBoxControlValue?.left ) || defaultValue;\n\n\treturn row === column ? row : `${ row } ${ column }`;\n}\n"],
5
- "mappings": ";AAGA,SAAS,8BAA8B;AAUhC,SAAS,+BAAgC,eAAgB;AAC/D,MAAK,CAAE,eAAgB;AACtB,WAAO;AAAA,EACR;AAEA,QAAM,gBAAgB,OAAO,kBAAkB;AAC/C,SAAO;AAAA,IACN,KAAK,gBAAgB,gBAAgB,eAAe;AAAA,IACpD,MAAM,gBAAgB,gBAAgB,eAAe;AAAA,EACtD;AACD;AASO,SAAS,eAAgB,eAAe,eAAe,KAAM;AACnE,QAAM,0BACL,+BAAgC,aAAc;AAC/C,MAAK,CAAE,yBAA0B;AAChC,WAAO;AAAA,EACR;AAEA,QAAM,MACL,uBAAwB,yBAAyB,GAAI,KAAK;AAC3D,QAAM,SACL,uBAAwB,yBAAyB,IAAK,KAAK;AAE5D,SAAO,QAAQ,SAAS,MAAM,GAAI,GAAI,IAAK,MAAO;AACnD;",
4
+ "sourcesContent": ["import { getSpacingPresetCssVar } from '../components/spacing-sizes-control/utils';\n\n/**\n * Returns whether the current layout can use separate row and column gaps.\n *\n * @param {?Object} layout The block instance's layout attribute.\n * @param {?Object} defaultLayout The block's default supported layout.\n * @return {boolean} Whether axial block gap controls should be available.\n */\nexport function isAxialBlockGapAllowed( layout, defaultLayout ) {\n\tconst usedLayout =\n\t\tlayout?.inherit || layout?.contentSize || layout?.wideSize\n\t\t\t? { ...layout, type: 'constrained' }\n\t\t\t: layout || defaultLayout || {};\n\n\treturn [ 'flex', 'grid' ].includes( usedLayout?.type );\n}\n\n/**\n * Returns a BoxControl object value from a given blockGap style value.\n * The string check is for backwards compatibility before Gutenberg supported\n * split gap values (row and column) and the value was a string n + unit.\n *\n * @param {?string | ?Object} blockGapValue A block gap string or axial object value, e.g., '10px' or { top: '10px', left: '10px'}.\n * @return {Object|null} A value to pass to the BoxControl component.\n */\nexport function getGapBoxControlValueFromStyle( blockGapValue ) {\n\tif ( ! blockGapValue ) {\n\t\treturn null;\n\t}\n\n\tconst isValueString = typeof blockGapValue === 'string';\n\treturn {\n\t\ttop: isValueString ? blockGapValue : blockGapValue?.top,\n\t\tleft: isValueString ? blockGapValue : blockGapValue?.left,\n\t};\n}\n\n/**\n * Returns a CSS value for the `gap` property from a given blockGap style.\n *\n * @param {?string | ?Object} blockGapValue A block gap string or axial object value, e.g., '10px' or { top: '10px', left: '10px'}.\n * @param {?string} defaultValue A default gap value.\n * @return {string|null} The concatenated gap value (row and column).\n */\nexport function getGapCSSValue( blockGapValue, defaultValue = '0' ) {\n\tconst blockGapBoxControlValue =\n\t\tgetGapBoxControlValueFromStyle( blockGapValue );\n\tif ( ! blockGapBoxControlValue ) {\n\t\treturn null;\n\t}\n\n\tconst row =\n\t\tgetSpacingPresetCssVar( blockGapBoxControlValue?.top ) || defaultValue;\n\tconst column =\n\t\tgetSpacingPresetCssVar( blockGapBoxControlValue?.left ) || defaultValue;\n\n\treturn row === column ? row : `${ row } ${ column }`;\n}\n"],
5
+ "mappings": ";AAAA,SAAS,8BAA8B;AAShC,SAAS,uBAAwB,QAAQ,eAAgB;AAC/D,QAAM,aACL,QAAQ,WAAW,QAAQ,eAAe,QAAQ,WAC/C,EAAE,GAAG,QAAQ,MAAM,cAAc,IACjC,UAAU,iBAAiB,CAAC;AAEhC,SAAO,CAAE,QAAQ,MAAO,EAAE,SAAU,YAAY,IAAK;AACtD;AAUO,SAAS,+BAAgC,eAAgB;AAC/D,MAAK,CAAE,eAAgB;AACtB,WAAO;AAAA,EACR;AAEA,QAAM,gBAAgB,OAAO,kBAAkB;AAC/C,SAAO;AAAA,IACN,KAAK,gBAAgB,gBAAgB,eAAe;AAAA,IACpD,MAAM,gBAAgB,gBAAgB,eAAe;AAAA,EACtD;AACD;AASO,SAAS,eAAgB,eAAe,eAAe,KAAM;AACnE,QAAM,0BACL,+BAAgC,aAAc;AAC/C,MAAK,CAAE,yBAA0B;AAChC,WAAO;AAAA,EACR;AAEA,QAAM,MACL,uBAAwB,yBAAyB,GAAI,KAAK;AAC3D,QAAM,SACL,uBAAwB,yBAAyB,IAAK,KAAK;AAE5D,SAAO,QAAQ,SAAS,MAAM,GAAI,GAAI,IAAK,MAAO;AACnD;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/hooks/generated-class-name.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { hasBlockSupport, getBlockDefaultClassName } from '@wordpress/blocks';\n\n/**\n * Override props assigned to save component to inject generated className if\n * block supports it. This is only applied if the block's save result is an\n * element and not a markup string.\n *\n * @param {Object} extraProps Additional props applied to save element.\n * @param {Object} blockType Block type.\n *\n * @return {Object} Filtered props applied to save element.\n */\nexport function addGeneratedClassName( extraProps, blockType ) {\n\t// Adding the generated className.\n\tif ( hasBlockSupport( blockType, 'className', true ) ) {\n\t\tif ( typeof extraProps.className === 'string' ) {\n\t\t\t// We have some extra classes and want to add the default classname\n\t\t\t// We use uniq to prevent duplicate classnames.\n\n\t\t\textraProps.className = [\n\t\t\t\t...new Set( [\n\t\t\t\t\tgetBlockDefaultClassName( blockType.name ),\n\t\t\t\t\t...extraProps.className.split( ' ' ),\n\t\t\t\t] ),\n\t\t\t]\n\t\t\t\t.join( ' ' )\n\t\t\t\t.trim();\n\t\t} else {\n\t\t\t// There is no string in the className variable,\n\t\t\t// so we just dump the default name in there.\n\t\t\textraProps.className = getBlockDefaultClassName( blockType.name );\n\t\t}\n\t}\n\treturn extraProps;\n}\n\naddFilter(\n\t'blocks.getSaveContent.extraProps',\n\t'core/generated-class-name/save-props',\n\taddGeneratedClassName\n);\n"],
5
- "mappings": ";AAGA,SAAS,iBAAiB;AAC1B,SAAS,iBAAiB,gCAAgC;AAYnD,SAAS,sBAAuB,YAAY,WAAY;AAE9D,MAAK,gBAAiB,WAAW,aAAa,IAAK,GAAI;AACtD,QAAK,OAAO,WAAW,cAAc,UAAW;AAI/C,iBAAW,YAAY;AAAA,QACtB,GAAG,oBAAI,IAAK;AAAA,UACX,yBAA0B,UAAU,IAAK;AAAA,UACzC,GAAG,WAAW,UAAU,MAAO,GAAI;AAAA,QACpC,CAAE;AAAA,MACH,EACE,KAAM,GAAI,EACV,KAAK;AAAA,IACR,OAAO;AAGN,iBAAW,YAAY,yBAA0B,UAAU,IAAK;AAAA,IACjE;AAAA,EACD;AACA,SAAO;AACR;AAEA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AACD;",
4
+ "sourcesContent": ["import { addFilter } from '@wordpress/hooks';\nimport { hasBlockSupport, getBlockDefaultClassName } from '@wordpress/blocks';\n\n/**\n * Override props assigned to save component to inject generated className if\n * block supports it. This is only applied if the block's save result is an\n * element and not a markup string.\n *\n * @param {Object} extraProps Additional props applied to save element.\n * @param {Object} blockType Block type.\n *\n * @return {Object} Filtered props applied to save element.\n */\nexport function addGeneratedClassName( extraProps, blockType ) {\n\t// Adding the generated className.\n\tif ( hasBlockSupport( blockType, 'className', true ) ) {\n\t\tif ( typeof extraProps.className === 'string' ) {\n\t\t\t// We have some extra classes and want to add the default classname\n\t\t\t// We use uniq to prevent duplicate classnames.\n\n\t\t\textraProps.className = [\n\t\t\t\t...new Set( [\n\t\t\t\t\tgetBlockDefaultClassName( blockType.name ),\n\t\t\t\t\t...extraProps.className.split( ' ' ),\n\t\t\t\t] ),\n\t\t\t]\n\t\t\t\t.join( ' ' )\n\t\t\t\t.trim();\n\t\t} else {\n\t\t\t// There is no string in the className variable,\n\t\t\t// so we just dump the default name in there.\n\t\t\textraProps.className = getBlockDefaultClassName( blockType.name );\n\t\t}\n\t}\n\treturn extraProps;\n}\n\naddFilter(\n\t'blocks.getSaveContent.extraProps',\n\t'core/generated-class-name/save-props',\n\taddGeneratedClassName\n);\n"],
5
+ "mappings": ";AAAA,SAAS,iBAAiB;AAC1B,SAAS,iBAAiB,gCAAgC;AAYnD,SAAS,sBAAuB,YAAY,WAAY;AAE9D,MAAK,gBAAiB,WAAW,aAAa,IAAK,GAAI;AACtD,QAAK,OAAO,WAAW,cAAc,UAAW;AAI/C,iBAAW,YAAY;AAAA,QACtB,GAAG,oBAAI,IAAK;AAAA,UACX,yBAA0B,UAAU,IAAK;AAAA,UACzC,GAAG,WAAW,UAAU,MAAO,GAAI;AAAA,QACpC,CAAE;AAAA,MACH,EACE,KAAM,GAAI,EACV,KAAK;AAAA,IACR,OAAO;AAGN,iBAAW,YAAY,yBAA0B,UAAU,IAAK;AAAA,IACjE;AAAA,EACD;AACA,SAAO;AACR;AAEA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AACD;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/hooks/grid-visualizer.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { addFilter } from '@wordpress/hooks';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { GridVisualizer, useGridLayoutSync } from '../components/grid';\nimport { store as blockEditorStore } from '../store';\nimport { unlock } from '../lock-unlock';\nimport { useBlockElement } from '../components/block-list/use-block-props/use-block-refs';\nimport useBlockVisibility from '../components/block-visibility/use-block-visibility';\nimport { deviceTypeKey } from '../store/private-keys';\nimport { BLOCK_VISIBILITY_VIEWPORTS } from '../components/block-visibility/constants';\n\nfunction GridLayoutSync( props ) {\n\tuseGridLayoutSync( props );\n}\n\nfunction GridTools( { clientId, layout } ) {\n\tconst { isVisible, blockVisibility, deviceType, viewportSettings } =\n\t\tuseSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst {\n\t\t\t\t\tisBlockSelected,\n\t\t\t\t\thasSelectedInnerBlock,\n\t\t\t\t\tisDraggingBlocks,\n\t\t\t\t\tgetTemplateLock,\n\t\t\t\t\tgetBlockEditingMode,\n\t\t\t\t\tgetBlockAttributes,\n\t\t\t\t\tgetSettings,\n\t\t\t\t} = select( blockEditorStore );\n\n\t\t\t\t// These calls are purposely ordered from least expensive to most expensive.\n\t\t\t\t// Hides the visualizer in cases where the user is not or cannot interact with it.\n\t\t\t\t// Also hide if a child block is selected, because layout-child.js will render\n\t\t\t\t// the visualizer in that case (with proper childGridClientId handling).\n\t\t\t\tif (\n\t\t\t\t\t( ! isDraggingBlocks() && ! isBlockSelected( clientId ) ) ||\n\t\t\t\t\tgetTemplateLock( clientId ) ||\n\t\t\t\t\tgetBlockEditingMode( clientId ) !== 'default' ||\n\t\t\t\t\thasSelectedInnerBlock( clientId )\n\t\t\t\t) {\n\t\t\t\t\treturn { isVisible: false };\n\t\t\t\t}\n\n\t\t\t\tconst attributes = getBlockAttributes( clientId );\n\t\t\t\tconst settings = getSettings();\n\t\t\t\tconst currentDeviceType =\n\t\t\t\t\tsettings?.[ deviceTypeKey ]?.toLowerCase() ||\n\t\t\t\t\tBLOCK_VISIBILITY_VIEWPORTS.desktop.key;\n\n\t\t\t\treturn {\n\t\t\t\t\tisVisible: true,\n\t\t\t\t\tblockVisibility: attributes?.metadata?.blockVisibility,\n\t\t\t\t\tdeviceType: currentDeviceType,\n\t\t\t\t\tviewportSettings:\n\t\t\t\t\t\tsettings?.__experimentalFeatures?.viewport,\n\t\t\t\t};\n\t\t\t},\n\t\t\t[ clientId ]\n\t\t);\n\n\t// Get the block's DOM element to derive the canvas iframe window,\n\t// so viewport detection matches the actual block rendering context\n\tconst blockElement = useBlockElement( clientId );\n\tconst rawCanvasView = blockElement?.ownerDocument?.defaultView;\n\tconst canvasView = rawCanvasView === null ? undefined : rawCanvasView;\n\n\tconst { isBlockCurrentlyHidden, currentViewport } = useBlockVisibility( {\n\t\tblockVisibility,\n\t\tdeviceType,\n\t\tview: canvasView,\n\t\tviewportSettings,\n\t} );\n\n\t// Check whether any ancestor is hidden at the viewport actually detected\n\t// from the canvas, so it stays consistent with how blocks are hidden.\n\tconst isAnyAncestorHidden = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! isVisible ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tconst { isBlockParentHiddenAtViewport } = unlock(\n\t\t\t\tselect( blockEditorStore )\n\t\t\t);\n\t\t\treturn isBlockParentHiddenAtViewport( clientId, currentViewport );\n\t\t},\n\t\t[ clientId, currentViewport, isVisible ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<GridLayoutSync clientId={ clientId } />\n\t\t\t{ isVisible &&\n\t\t\t\t! isBlockCurrentlyHidden &&\n\t\t\t\t! isAnyAncestorHidden && (\n\t\t\t\t\t<GridVisualizer\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\tparentLayout={ layout }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t</>\n\t);\n}\n\nconst addGridVisualizerToBlockEdit = createHigherOrderComponent(\n\t( BlockEdit ) =>\n\t\tfunction AddGridVisualizerToBlockEdit( props ) {\n\t\t\tif ( props.attributes.layout?.type !== 'grid' ) {\n\t\t\t\treturn <BlockEdit key=\"edit\" { ...props } />;\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t<>\n\t\t\t\t\t<GridTools\n\t\t\t\t\t\tclientId={ props.clientId }\n\t\t\t\t\t\tlayout={ props.attributes.layout }\n\t\t\t\t\t/>\n\t\t\t\t\t<BlockEdit key=\"edit\" { ...props } />\n\t\t\t\t</>\n\t\t\t);\n\t\t},\n\t'addGridVisualizerToBl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,gBAAgB,IAAI,mBAAoB;AAAA,IACvE;AAAA,IACA;AAAA,IACA,MAAM;AAAA,IACN;AAAA,EACD,CAAE;AAIF,QAAM,sBAAsB;AAAA,IAC3B,CAAE,WAAY;AACb,UAAK,CAAE,WAAY;AAClB,eAAO;AAAA,MACR;AACA,YAAM,EAAE,8BAA8B,IAAI;AAAA,QACzC,OAAQ,gBAAiB;AAAA,MAC1B;AACA,aAAO,8BAA+B,UAAU,eAAgB;AAAA,IACjE;AAAA,IACA,CAAE,UAAU,iBAAiB,SAAU;AAAA,EACxC;AAEA,SACC,iCACC;AAAA,wBAAC,kBAAe,UAAsB;AAAA,IACpC,aACD,CAAE,0BACF,CAAE,uBACD;AAAA,MAAC;AAAA;AAAA,QACA;AAAA,QACA,cAAe;AAAA;AAAA,IAChB;AAAA,KAEH;AAEF;AAEA,IAAM,+BAA+B;AAAA,EACpC,CAAE,cACD,SAAS,6BAA8B,OAAQ;AAC9C,QAAK,MAAM,WAAW,QAAQ,SAAS,QAAS;AAC/C,aAAO,oBAAC,aAAuB,GAAG,SAAZ,MAAoB;AAAA,IAC3C;AAEA,WACC,iCACC;AAAA;AAAA,QAAC;AAAA;AAAA,UACA,UAAW,MAAM;AAAA,UACjB,QAAS,MAAM,WAAW;AAAA;AAAA,MAC3B;AAAA,MACA,oBAAC,aAAuB,GAAG,SAAZ,MAAoB;AAAA,OACpC;AAAA,EAEF;AAAA,EACD;AACD;AAEA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AACD;",
4
+ "sourcesContent": ["import { createHigherOrderComponent } from '@wordpress/compose';\nimport { addFilter } from '@wordpress/hooks';\nimport { useSelect } from '@wordpress/data';\nimport { GridVisualizer, useGridLayoutSync } from '../components/grid';\nimport { store as blockEditorStore } from '../store';\nimport { unlock } from '../lock-unlock';\nimport { useBlockElement } from '../components/block-list/use-block-props/use-block-refs';\nimport useBlockVisibility from '../components/block-visibility/use-block-visibility';\nimport { deviceTypeKey } from '../store/private-keys';\nimport { BLOCK_VISIBILITY_VIEWPORTS } from '../components/block-visibility/constants';\n\nfunction GridLayoutSync( props ) {\n\tuseGridLayoutSync( props );\n}\n\nfunction GridTools( { clientId, layout } ) {\n\tconst { isVisible, blockVisibility, deviceType, viewportSettings } =\n\t\tuseSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst {\n\t\t\t\t\tisBlockSelected,\n\t\t\t\t\thasSelectedInnerBlock,\n\t\t\t\t\tisDraggingBlocks,\n\t\t\t\t\tgetTemplateLock,\n\t\t\t\t\tgetBlockEditingMode,\n\t\t\t\t\tgetBlockAttributes,\n\t\t\t\t\tgetSettings,\n\t\t\t\t} = select( blockEditorStore );\n\n\t\t\t\t// These calls are purposely ordered from least expensive to most expensive.\n\t\t\t\t// Hides the visualizer in cases where the user is not or cannot interact with it.\n\t\t\t\t// Also hide if a child block is selected, because layout-child.js will render\n\t\t\t\t// the visualizer in that case (with proper childGridClientId handling).\n\t\t\t\tif (\n\t\t\t\t\t( ! isDraggingBlocks() && ! isBlockSelected( clientId ) ) ||\n\t\t\t\t\tgetTemplateLock( clientId ) ||\n\t\t\t\t\tgetBlockEditingMode( clientId ) !== 'default' ||\n\t\t\t\t\thasSelectedInnerBlock( clientId )\n\t\t\t\t) {\n\t\t\t\t\treturn { isVisible: false };\n\t\t\t\t}\n\n\t\t\t\tconst attributes = getBlockAttributes( clientId );\n\t\t\t\tconst settings = getSettings();\n\t\t\t\tconst currentDeviceType =\n\t\t\t\t\tsettings?.[ deviceTypeKey ]?.toLowerCase() ||\n\t\t\t\t\tBLOCK_VISIBILITY_VIEWPORTS.desktop.key;\n\n\t\t\t\treturn {\n\t\t\t\t\tisVisible: true,\n\t\t\t\t\tblockVisibility: attributes?.metadata?.blockVisibility,\n\t\t\t\t\tdeviceType: currentDeviceType,\n\t\t\t\t\tviewportSettings:\n\t\t\t\t\t\tsettings?.__experimentalFeatures?.viewport,\n\t\t\t\t};\n\t\t\t},\n\t\t\t[ clientId ]\n\t\t);\n\n\t// Get the block's DOM element to derive the canvas iframe window,\n\t// so viewport detection matches the actual block rendering context\n\tconst blockElement = useBlockElement( clientId );\n\tconst rawCanvasView = blockElement?.ownerDocument?.defaultView;\n\tconst canvasView = rawCanvasView === null ? undefined : rawCanvasView;\n\n\tconst { isBlockCurrentlyHidden, currentViewport } = useBlockVisibility( {\n\t\tblockVisibility,\n\t\tdeviceType,\n\t\tview: canvasView,\n\t\tviewportSettings,\n\t} );\n\n\t// Check whether any ancestor is hidden at the viewport actually detected\n\t// from the canvas, so it stays consistent with how blocks are hidden.\n\tconst isAnyAncestorHidden = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! isVisible ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tconst { isBlockParentHiddenAtViewport } = unlock(\n\t\t\t\tselect( blockEditorStore )\n\t\t\t);\n\t\t\treturn isBlockParentHiddenAtViewport( clientId, currentViewport );\n\t\t},\n\t\t[ clientId, currentViewport, isVisible ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<GridLayoutSync clientId={ clientId } />\n\t\t\t{ isVisible &&\n\t\t\t\t! isBlockCurrentlyHidden &&\n\t\t\t\t! isAnyAncestorHidden && (\n\t\t\t\t\t<GridVisualizer\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\tparentLayout={ layout }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t</>\n\t);\n}\n\nconst addGridVisualizerToBlockEdit = createHigherOrderComponent(\n\t( BlockEdit ) =>\n\t\tfunction AddGridVisualizerToBlockEdit( props ) {\n\t\t\tif ( props.attributes.layout?.type !== 'grid' ) {\n\t\t\t\treturn <BlockEdit key=\"edit\" { ...props } />;\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t<>\n\t\t\t\t\t<GridTools\n\t\t\t\t\t\tclientId={ props.clientId }\n\t\t\t\t\t\tlayout={ props.attributes.layout }\n\t\t\t\t\t/>\n\t\t\t\t\t<BlockEdit key=\"edit\" { ...props } />\n\t\t\t\t</>\n\t\t\t);\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Y;AAExD,QAAM,EAAE,wBAAwB,gBAAgB,IAAI,mBAAoB;AAAA,IACvE;AAAA,IACA;AAAA,IACA,MAAM;AAAA,IACN;AAAA,EACD,CAAE;AAIF,QAAM,sBAAsB;AAAA,IAC3B,CAAE,WAAY;AACb,UAAK,CAAE,WAAY;AAClB,eAAO;AAAA,MACR;AACA,YAAM,EAAE,8BAA8B,IAAI;AAAA,QACzC,OAAQ,gBAAiB;AAAA,MAC1B;AACA,aAAO,8BAA+B,UAAU,eAAgB;AAAA,IACjE;AAAA,IACA,CAAE,UAAU,iBAAiB,SAAU;AAAA,EACxC;AAEA,SACC,iCACC;AAAA,wBAAC,kBAAe,UAAsB;AAAA,IACpC,aACD,CAAE,0BACF,CAAE,uBACD;AAAA,MAAC;AAAA;AAAA,QACA;AAAA,QACA,cAAe;AAAA;AAAA,IAChB;AAAA,KAEH;AAEF;AAEA,IAAM,+BAA+B;AAAA,EACpC,CAAE,cACD,SAAS,6BAA8B,OAAQ;AAC9C,QAAK,MAAM,WAAW,QAAQ,SAAS,QAAS;AAC/C,aAAO,oBAAC,aAAuB,GAAG,SAAZ,MAAoB;AAAA,IAC3C;AAEA,WACC,iCACC;AAAA;AAAA,QAAC;AAAA;AAAA,UACA,UAAW,MAAM;AAAA,UACjB,QAAS,MAAM,WAAW;AAAA;AAAA,MAC3B;AAAA,MACA,oBAAC,aAAuB,GAAG,SAAZ,MAAoB;AAAA,OACpC;AAAA,EAEF;AAAA,EACD;AACD;AAEA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AACD;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/hooks/index.js"],
4
- "sourcesContent": ["/**\n * Internal dependencies\n */\nimport {\n\tcreateBlockEditFilter,\n\tcreateBlockListBlockFilter,\n\tcreateBlockSaveFilter,\n} from './utils';\nimport './compat';\nimport './cross-origin-isolation';\nimport align from './align';\nimport background from './background';\nimport './lock';\nimport allowedBlocks from './allowed-blocks';\nimport anchor from './anchor';\nimport ariaLabel from './aria-label';\nimport blockFields from './block-fields';\nimport customClassName from './custom-class-name';\nimport './generated-class-name';\nimport style from './style';\nimport './settings';\nimport color from './color';\nimport dimensions from './dimensions';\nimport duotone from './duotone';\nimport fontFamily from './font-family';\nimport fontSize from './font-size';\nimport textAlign from './text-align';\nimport fitText from './fit-text';\nimport border from './border';\nimport customCSS from './custom-css';\nimport position from './position';\nimport blockStyleVariation from './block-style-variation';\nimport layout from './layout';\nimport childLayout from './layout-child';\nimport './metadata';\nimport blockHooks from './block-hooks';\nimport blockBindingsPanel from './block-bindings';\nimport listView from './list-view';\nimport './block-renaming';\nimport './grid-visualizer';\nimport AutoRegisterControls from './auto-inspector-controls';\n\ncreateBlockEditFilter(\n\t[\n\t\talign,\n\t\ttextAlign,\n\t\tanchor,\n\t\tcustomClassName,\n\t\tstyle,\n\t\tcustomCSS,\n\t\tduotone,\n\t\tfitText,\n\t\tposition,\n\t\tlayout,\n\t\tblockHooks,\n\t\tblockBindingsPanel,\n\t\tchildLayout,\n\t\tallowedBlocks,\n\t\tblockFields,\n\t\tlistView,\n\t\tAutoRegisterControls,\n\t].filter( Boolean )\n);\ncreateBlockListBlockFilter( [\n\talign,\n\ttextAlign,\n\tbackground,\n\tstyle,\n\tcolor,\n\tdimensions,\n\tduotone,\n\tfontFamily,\n\tfontSize,\n\tfitText,\n\tborder,\n\tcustomCSS,\n\tposition,\n\tblockStyleVariation,\n\tchildLayout,\n] );\ncreateBlockSaveFilter( [\n\talign,\n\ttextAlign,\n\tanchor,\n\tariaLabel,\n\tcustomClassName,\n\tborder,\n\tcustomCSS,\n\tfitText,\n\tcolor,\n\tstyle,\n\tfontFamily,\n\tfontSize,\n] );\n\nexport { useCustomSides } from './dimensions';\nexport { getDimensionsClassesAndStyles } from './use-dimensions-props';\nexport { useLayoutClasses, useLayoutStyles } from './layout';\nexport { getBorderClassesAndStyles, useBorderProps } from './use-border-props';\nexport { getShadowClassesAndStyles } from './use-shadow-props';\nexport { getColorClassesAndStyles, useColorProps } from './use-color-props';\nexport { getSpacingClassesAndStyles } from './use-spacing-props';\nexport { getTypographyClassesAndStyles } from './use-typography-props';\nexport { getGapCSSValue } from './gap';\nexport { useCachedTruthy } from './use-cached-truthy';\nexport { setBackgroundStyleDefaults } from './background';\nexport { useZoomOut } from './use-zoom-out';\nexport { BlockStyleVariationOverridesWithConfig } from './block-style-variation';\nexport { useStyleOverride } from './utils';\n"],
5
- "mappings": ";AAGA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,OAAO;AACP,OAAO;AACP,OAAO,WAAW;AAClB,OAAO,gBAAgB;AACvB,OAAO;AACP,OAAO,mBAAmB;AAC1B,OAAO,YAAY;AACnB,OAAO,eAAe;AACtB,OAAO,iBAAiB;AACxB,OAAO,qBAAqB;AAC5B,OAAO;AACP,OAAO,WAAW;AAClB,OAAO;AACP,OAAO,WAAW;AAClB,OAAO,gBAAgB;AACvB,OAAO,aAAa;AACpB,OAAO,gBAAgB;AACvB,OAAO,cAAc;AACrB,OAAO,eAAe;AACtB,OAAO,aAAa;AACpB,OAAO,YAAY;AACnB,OAAO,eAAe;AACtB,OAAO,cAAc;AACrB,OAAO,yBAAyB;AAChC,OAAO,YAAY;AACnB,OAAO,iBAAiB;AACxB,OAAO;AACP,OAAO,gBAAgB;AACvB,OAAO,wBAAwB;AAC/B,OAAO,cAAc;AACrB,OAAO;AACP,OAAO;AACP,OAAO,0BAA0B;AAuDjC,SAAS,sBAAsB;AAC/B,SAAS,qCAAqC;AAC9C,SAAS,kBAAkB,uBAAuB;AAClD,SAAS,2BAA2B,sBAAsB;AAC1D,SAAS,iCAAiC;AAC1C,SAAS,0BAA0B,qBAAqB;AACxD,SAAS,kCAAkC;AAC3C,SAAS,qCAAqC;AAC9C,SAAS,sBAAsB;AAC/B,SAAS,uBAAuB;AAChC,SAAS,kCAAkC;AAC3C,SAAS,kBAAkB;AAC3B,SAAS,8CAA8C;AACvD,SAAS,wBAAwB;AAlEjC;AAAA,EACC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,EAAE,OAAQ,OAAQ;AACnB;AACA,2BAA4B;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,CAAE;AACF,sBAAuB;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,CAAE;",
4
+ "sourcesContent": ["import {\n\tcreateBlockEditFilter,\n\tcreateBlockListBlockFilter,\n\tcreateBlockSaveFilter,\n} from './utils';\nimport './compat';\nimport './cross-origin-isolation';\nimport align from './align';\nimport background from './background';\nimport './lock';\nimport allowedBlocks from './allowed-blocks';\nimport anchor from './anchor';\nimport ariaLabel from './aria-label';\nimport blockFields from './block-fields';\nimport customClassName from './custom-class-name';\nimport './generated-class-name';\nimport style from './style';\nimport './settings';\nimport color from './color';\nimport dimensions from './dimensions';\nimport duotone from './duotone';\nimport fontFamily from './font-family';\nimport fontSize from './font-size';\nimport textAlign from './text-align';\nimport fitText from './fit-text';\nimport border from './border';\nimport customCSS from './custom-css';\nimport position from './position';\nimport blockStyleVariation from './block-style-variation';\nimport layout from './layout';\nimport childLayout from './layout-child';\nimport './metadata';\nimport blockHooks from './block-hooks';\nimport blockBindingsPanel from './block-bindings';\nimport listView from './list-view';\nimport './block-renaming';\nimport './grid-visualizer';\nimport AutoRegisterControls from './auto-inspector-controls';\n\ncreateBlockEditFilter(\n\t[\n\t\talign,\n\t\ttextAlign,\n\t\tanchor,\n\t\tcustomClassName,\n\t\tstyle,\n\t\tcustomCSS,\n\t\tduotone,\n\t\tfitText,\n\t\tposition,\n\t\tlayout,\n\t\tblockHooks,\n\t\tblockBindingsPanel,\n\t\tchildLayout,\n\t\tallowedBlocks,\n\t\tblockFields,\n\t\tlistView,\n\t\tAutoRegisterControls,\n\t].filter( Boolean )\n);\ncreateBlockListBlockFilter( [\n\talign,\n\ttextAlign,\n\tbackground,\n\tstyle,\n\tcolor,\n\tdimensions,\n\tduotone,\n\tfontFamily,\n\tfontSize,\n\tfitText,\n\tborder,\n\tcustomCSS,\n\tposition,\n\tblockStyleVariation,\n\tchildLayout,\n] );\ncreateBlockSaveFilter( [\n\talign,\n\ttextAlign,\n\tanchor,\n\tariaLabel,\n\tcustomClassName,\n\tborder,\n\tcustomCSS,\n\tfitText,\n\tcolor,\n\tstyle,\n\tfontFamily,\n\tfontSize,\n] );\n\nexport { useCustomSides } from './dimensions';\nexport { getDimensionsClassesAndStyles } from './use-dimensions-props';\nexport { useLayoutClasses, useLayoutStyles } from './layout';\nexport { getBorderClassesAndStyles, useBorderProps } from './use-border-props';\nexport { getShadowClassesAndStyles } from './use-shadow-props';\nexport { getColorClassesAndStyles, useColorProps } from './use-color-props';\nexport { getSpacingClassesAndStyles } from './use-spacing-props';\nexport { getTypographyClassesAndStyles } from './use-typography-props';\nexport { getGapCSSValue } from './gap';\nexport { useCachedTruthy } from './use-cached-truthy';\nexport { setBackgroundStyleDefaults } from './background';\nexport { useZoomOut } from './use-zoom-out';\nexport { BlockStyleVariationOverridesWithConfig } from './block-style-variation';\nexport { useStyleOverride } from './utils';\n"],
5
+ "mappings": ";AAAA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,OAAO;AACP,OAAO;AACP,OAAO,WAAW;AAClB,OAAO,gBAAgB;AACvB,OAAO;AACP,OAAO,mBAAmB;AAC1B,OAAO,YAA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,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,CAAE;",
6
6
  "names": []
7
7
  }
@@ -18,7 +18,9 @@ import { deviceTypeKey } from "../store/private-keys.mjs";
18
18
  import { BLOCK_VISIBILITY_VIEWPORTS } from "../components/block-visibility/constants.mjs";
19
19
  import {
20
20
  DEFAULT_BLOCK_STYLE_STATE,
21
- getStyleForState
21
+ getStyleForState,
22
+ hasViewportBlockStyleState,
23
+ setStyleForState
22
24
  } from "./block-style-state.mjs";
23
25
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
24
26
  var { getResponsiveMediaQueries } = unlock(globalStylesEnginePrivateApis);
@@ -190,6 +192,29 @@ function getResponsiveChildLayoutStyles({
190
192
  return css ? `${mediaQuery}{${css}}` : "";
191
193
  }).filter(Boolean).join("");
192
194
  }
195
+ function getUpdatedChildLayoutStyle(style, layout, selectedState) {
196
+ if (!hasViewportBlockStyleState(selectedState)) {
197
+ return {
198
+ ...style,
199
+ layout: {
200
+ ...style?.layout,
201
+ ...layout
202
+ }
203
+ };
204
+ }
205
+ const layoutState = {
206
+ viewport: selectedState.viewport,
207
+ pseudo: DEFAULT_BLOCK_STYLE_STATE.pseudo
208
+ };
209
+ const stateStyle = getStyleForState(style, layoutState);
210
+ return setStyleForState(style, layoutState, {
211
+ ...stateStyle,
212
+ layout: {
213
+ ...stateStyle?.layout,
214
+ ...layout
215
+ }
216
+ });
217
+ }
193
218
  function useBlockPropsChildLayoutStyles({ style }) {
194
219
  const { shouldRenderChildLayoutStyles, viewportSettings } = useSelect(
195
220
  (select) => {
@@ -278,7 +303,8 @@ function GridTools({
278
303
  blockBlockVisibility,
279
304
  deviceType,
280
305
  viewportSettings,
281
- isChildBlockAGrid
306
+ isChildBlockAGrid,
307
+ selectedState
282
308
  } = useSelect(
283
309
  (select) => {
284
310
  const {
@@ -286,8 +312,9 @@ function GridTools({
286
312
  getBlockEditingMode,
287
313
  getTemplateLock,
288
314
  getBlockAttributes,
289
- getSettings
290
- } = select(blockEditorStore);
315
+ getSettings,
316
+ getSelectedBlockStyleState
317
+ } = unlock(select(blockEditorStore));
291
318
  const _rootClientId = getBlockRootClientId(clientId);
292
319
  if (getTemplateLock(_rootClientId) || getBlockEditingMode(_rootClientId) !== "default") {
293
320
  return {
@@ -307,7 +334,8 @@ function GridTools({
307
334
  deviceType: currentDeviceType,
308
335
  viewportSettings: settings?.__experimentalFeatures?.viewport,
309
336
  // Check if the selected child block is itself a grid.
310
- isChildBlockAGrid: blockAttributes?.layout?.type === "grid"
337
+ isChildBlockAGrid: blockAttributes?.layout?.type === "grid",
338
+ selectedState: getSelectedBlockStyleState(clientId)
311
339
  };
312
340
  },
313
341
  [clientId]
@@ -353,13 +381,7 @@ function GridTools({
353
381
  const showResizer = allowSizingOnChildren && !isBlockItselfCurrentlyHidden;
354
382
  function updateLayout(layout) {
355
383
  setAttributes({
356
- style: {
357
- ...style,
358
- layout: {
359
- ...style?.layout,
360
- ...layout
361
- }
362
- }
384
+ style: getUpdatedChildLayoutStyle(style, layout, selectedState)
363
385
  });
364
386
  }
365
387
  return /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -405,6 +427,7 @@ export {
405
427
  layout_child_default as default,
406
428
  getChildLayoutStyleRules,
407
429
  getChildLayoutStyles,
408
- getResponsiveChildLayoutStyles
430
+ getResponsiveChildLayoutStyles,
431
+ getUpdatedChildLayoutStyle
409
432
  };
410
433
  //# sourceMappingURL=layout-child.mjs.map