@wordpress/block-editor 14.9.0 → 14.10.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 (370) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/LICENSE.md +1 -1
  3. package/README.md +40 -0
  4. package/build/components/audio-player/index.native.js +1 -1
  5. package/build/components/audio-player/index.native.js.map +1 -1
  6. package/build/components/background-image-control/index.js +4 -0
  7. package/build/components/background-image-control/index.js.map +1 -1
  8. package/build/components/block-alignment-matrix-control/index.js +32 -0
  9. package/build/components/block-alignment-matrix-control/index.js.map +1 -1
  10. package/build/components/block-card/index.js +45 -8
  11. package/build/components/block-card/index.js.map +1 -1
  12. package/build/components/block-edit/edit.js +147 -10
  13. package/build/components/block-edit/edit.js.map +1 -1
  14. package/build/components/block-list/index.js +1 -2
  15. package/build/components/block-list/index.js.map +1 -1
  16. package/build/components/block-list/use-block-props/index.js +2 -2
  17. package/build/components/block-list/use-block-props/index.js.map +1 -1
  18. package/build/components/block-list/zoom-out-separator.js +20 -3
  19. package/build/components/block-list/zoom-out-separator.js.map +1 -1
  20. package/build/components/block-settings-menu/block-settings-dropdown.js +5 -8
  21. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  22. package/build/components/block-styles/utils.js +3 -3
  23. package/build/components/block-styles/utils.js.map +1 -1
  24. package/build/components/block-tools/zoom-out-mode-inserters.js +19 -6
  25. package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  26. package/build/components/button-block-appender/index.js +1 -5
  27. package/build/components/button-block-appender/index.js.map +1 -1
  28. package/build/components/child-layout-control/index.js +6 -0
  29. package/build/components/child-layout-control/index.js.map +1 -1
  30. package/build/components/colors-gradients/dropdown.js +51 -11
  31. package/build/components/colors-gradients/dropdown.js.map +1 -1
  32. package/build/components/contrast-checker/index.native.js +1 -1
  33. package/build/components/contrast-checker/index.native.js.map +1 -1
  34. package/build/components/date-format-picker/index.js +7 -16
  35. package/build/components/date-format-picker/index.js.map +1 -1
  36. package/build/components/font-appearance-control/index.js +9 -0
  37. package/build/components/font-appearance-control/index.js.map +1 -1
  38. package/build/components/font-family/index.js +10 -1
  39. package/build/components/font-family/index.js.map +1 -1
  40. package/build/components/global-styles/color-panel.js +3 -0
  41. package/build/components/global-styles/color-panel.js.map +1 -1
  42. package/build/components/global-styles/typography-utils.js +1 -1
  43. package/build/components/global-styles/typography-utils.js.map +1 -1
  44. package/build/components/global-styles/use-global-styles-output.js +2 -2
  45. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  46. package/build/components/grid/grid-visualizer.js +9 -0
  47. package/build/components/grid/grid-visualizer.js.map +1 -1
  48. package/build/components/grid/utils.js +12 -1
  49. package/build/components/grid/utils.js.map +1 -1
  50. package/build/components/iframe/index.js +1 -1
  51. package/build/components/iframe/index.js.map +1 -1
  52. package/build/components/inner-blocks/use-inner-block-template-sync.js +11 -11
  53. package/build/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
  54. package/build/components/inserter/block-patterns-explorer/index.js +1 -1
  55. package/build/components/inserter/block-patterns-explorer/index.js.map +1 -1
  56. package/build/components/inserter/block-patterns-tab/index.js +1 -1
  57. package/build/components/inserter/block-patterns-tab/index.js.map +1 -1
  58. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js +4 -4
  59. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  60. package/build/components/inserter/block-patterns-tab/patterns-filter.js +2 -2
  61. package/build/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  62. package/build/components/inserter/category-tabs/index.js +1 -2
  63. package/build/components/inserter/category-tabs/index.js.map +1 -1
  64. package/build/components/inserter/index.js +6 -15
  65. package/build/components/inserter/index.js.map +1 -1
  66. package/build/components/inserter/quick-inserter.js +2 -13
  67. package/build/components/inserter/quick-inserter.js.map +1 -1
  68. package/build/components/keyboard-shortcuts/index.js +2 -2
  69. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  70. package/build/components/line-height-control/index.js +9 -0
  71. package/build/components/line-height-control/index.js.map +1 -1
  72. package/build/components/media-placeholder/index.js +2 -2
  73. package/build/components/media-placeholder/index.js.map +1 -1
  74. package/build/components/media-replace-flow/index.js +26 -26
  75. package/build/components/media-replace-flow/index.js.map +1 -1
  76. package/build/components/plain-text/index.js +34 -0
  77. package/build/components/plain-text/index.js.map +1 -1
  78. package/build/components/provider/index.js +61 -5
  79. package/build/components/provider/index.js.map +1 -1
  80. package/build/components/provider/use-media-upload-settings.js +28 -0
  81. package/build/components/provider/use-media-upload-settings.js.map +1 -0
  82. package/build/components/resolution-tool/index.js +3 -1
  83. package/build/components/resolution-tool/index.js.map +1 -1
  84. package/build/components/responsive-block-control/index.js +1 -1
  85. package/build/components/responsive-block-control/index.js.map +1 -1
  86. package/build/components/rich-text/event-listeners/delete.js +7 -1
  87. package/build/components/rich-text/event-listeners/delete.js.map +1 -1
  88. package/build/components/rich-text/index.js +2 -2
  89. package/build/components/rich-text/index.js.map +1 -1
  90. package/build/components/use-block-drop-zone/index.js +2 -1
  91. package/build/components/use-block-drop-zone/index.js.map +1 -1
  92. package/build/hooks/background.js +2 -0
  93. package/build/hooks/background.js.map +1 -1
  94. package/build/hooks/block-bindings.js +15 -14
  95. package/build/hooks/block-bindings.js.map +1 -1
  96. package/build/hooks/border.js +3 -3
  97. package/build/hooks/border.js.map +1 -1
  98. package/build/hooks/color.js +1 -1
  99. package/build/hooks/color.js.map +1 -1
  100. package/build/hooks/dimensions.js +2 -2
  101. package/build/hooks/dimensions.js.map +1 -1
  102. package/build/hooks/font-family.js +1 -1
  103. package/build/hooks/font-family.js.map +1 -1
  104. package/build/hooks/gap.js +2 -2
  105. package/build/hooks/gap.js.map +1 -1
  106. package/build/hooks/index.js +0 -1
  107. package/build/hooks/index.js.map +1 -1
  108. package/build/hooks/index.native.js +7 -0
  109. package/build/hooks/index.native.js.map +1 -1
  110. package/build/hooks/style.js +7 -7
  111. package/build/hooks/style.js.map +1 -1
  112. package/build/hooks/supports.js +7 -7
  113. package/build/hooks/supports.js.map +1 -1
  114. package/build/hooks/typography.js +6 -6
  115. package/build/hooks/typography.js.map +1 -1
  116. package/build/hooks/use-zoom-out.js +12 -1
  117. package/build/hooks/use-zoom-out.js.map +1 -1
  118. package/build/hooks/utils.js +1 -1
  119. package/build/hooks/utils.js.map +1 -1
  120. package/build/store/private-actions.js +1 -1
  121. package/build/store/private-actions.js.map +1 -1
  122. package/build/store/private-selectors.js +11 -1
  123. package/build/store/private-selectors.js.map +1 -1
  124. package/build/store/reducer.js +93 -12
  125. package/build/store/reducer.js.map +1 -1
  126. package/build/store/selectors.js +6 -8
  127. package/build/store/selectors.js.map +1 -1
  128. package/build/utils/block-bindings.js +95 -0
  129. package/build/utils/block-bindings.js.map +1 -1
  130. package/build-module/components/audio-player/index.native.js +2 -2
  131. package/build-module/components/audio-player/index.native.js.map +1 -1
  132. package/build-module/components/background-image-control/index.js +5 -1
  133. package/build-module/components/background-image-control/index.js.map +1 -1
  134. package/build-module/components/block-alignment-matrix-control/index.js +32 -0
  135. package/build-module/components/block-alignment-matrix-control/index.js.map +1 -1
  136. package/build-module/components/block-card/index.js +45 -8
  137. package/build-module/components/block-card/index.js.map +1 -1
  138. package/build-module/components/block-edit/edit.js +148 -11
  139. package/build-module/components/block-edit/edit.js.map +1 -1
  140. package/build-module/components/block-list/index.js +2 -3
  141. package/build-module/components/block-list/index.js.map +1 -1
  142. package/build-module/components/block-list/use-block-props/index.js +1 -1
  143. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  144. package/build-module/components/block-list/zoom-out-separator.js +20 -3
  145. package/build-module/components/block-list/zoom-out-separator.js.map +1 -1
  146. package/build-module/components/block-settings-menu/block-settings-dropdown.js +5 -8
  147. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  148. package/build-module/components/block-styles/utils.js +3 -3
  149. package/build-module/components/block-styles/utils.js.map +1 -1
  150. package/build-module/components/block-tools/zoom-out-mode-inserters.js +19 -6
  151. package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  152. package/build-module/components/button-block-appender/index.js +2 -6
  153. package/build-module/components/button-block-appender/index.js.map +1 -1
  154. package/build-module/components/child-layout-control/index.js +7 -1
  155. package/build-module/components/child-layout-control/index.js.map +1 -1
  156. package/build-module/components/colors-gradients/dropdown.js +51 -11
  157. package/build-module/components/colors-gradients/dropdown.js.map +1 -1
  158. package/build-module/components/contrast-checker/index.native.js +2 -2
  159. package/build-module/components/contrast-checker/index.native.js.map +1 -1
  160. package/build-module/components/date-format-picker/index.js +7 -16
  161. package/build-module/components/date-format-picker/index.js.map +1 -1
  162. package/build-module/components/font-appearance-control/index.js +8 -0
  163. package/build-module/components/font-appearance-control/index.js.map +1 -1
  164. package/build-module/components/font-family/index.js +10 -1
  165. package/build-module/components/font-family/index.js.map +1 -1
  166. package/build-module/components/global-styles/color-panel.js +3 -0
  167. package/build-module/components/global-styles/color-panel.js.map +1 -1
  168. package/build-module/components/global-styles/typography-utils.js +1 -1
  169. package/build-module/components/global-styles/typography-utils.js.map +1 -1
  170. package/build-module/components/global-styles/use-global-styles-output.js +2 -2
  171. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  172. package/build-module/components/grid/grid-visualizer.js +9 -0
  173. package/build-module/components/grid/grid-visualizer.js.map +1 -1
  174. package/build-module/components/grid/utils.js +12 -1
  175. package/build-module/components/grid/utils.js.map +1 -1
  176. package/build-module/components/iframe/index.js +1 -1
  177. package/build-module/components/iframe/index.js.map +1 -1
  178. package/build-module/components/inner-blocks/use-inner-block-template-sync.js +12 -12
  179. package/build-module/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
  180. package/build-module/components/inserter/block-patterns-explorer/index.js +1 -1
  181. package/build-module/components/inserter/block-patterns-explorer/index.js.map +1 -1
  182. package/build-module/components/inserter/block-patterns-tab/index.js +1 -1
  183. package/build-module/components/inserter/block-patterns-tab/index.js.map +1 -1
  184. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +4 -4
  185. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  186. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js +2 -2
  187. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  188. package/build-module/components/inserter/category-tabs/index.js +1 -2
  189. package/build-module/components/inserter/category-tabs/index.js.map +1 -1
  190. package/build-module/components/inserter/index.js +6 -15
  191. package/build-module/components/inserter/index.js.map +1 -1
  192. package/build-module/components/inserter/quick-inserter.js +2 -13
  193. package/build-module/components/inserter/quick-inserter.js.map +1 -1
  194. package/build-module/components/keyboard-shortcuts/index.js +2 -2
  195. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  196. package/build-module/components/line-height-control/index.js +8 -0
  197. package/build-module/components/line-height-control/index.js.map +1 -1
  198. package/build-module/components/media-placeholder/index.js +3 -3
  199. package/build-module/components/media-placeholder/index.js.map +1 -1
  200. package/build-module/components/media-replace-flow/index.js +28 -28
  201. package/build-module/components/media-replace-flow/index.js.map +1 -1
  202. package/build-module/components/plain-text/index.js +34 -0
  203. package/build-module/components/plain-text/index.js.map +1 -1
  204. package/build-module/components/provider/index.js +62 -5
  205. package/build-module/components/provider/index.js.map +1 -1
  206. package/build-module/components/provider/use-media-upload-settings.js +22 -0
  207. package/build-module/components/provider/use-media-upload-settings.js.map +1 -0
  208. package/build-module/components/resolution-tool/index.js +3 -1
  209. package/build-module/components/resolution-tool/index.js.map +1 -1
  210. package/build-module/components/responsive-block-control/index.js +1 -1
  211. package/build-module/components/responsive-block-control/index.js.map +1 -1
  212. package/build-module/components/rich-text/event-listeners/delete.js +7 -1
  213. package/build-module/components/rich-text/event-listeners/delete.js.map +1 -1
  214. package/build-module/components/rich-text/index.js +1 -1
  215. package/build-module/components/rich-text/index.js.map +1 -1
  216. package/build-module/components/use-block-drop-zone/index.js +2 -1
  217. package/build-module/components/use-block-drop-zone/index.js.map +1 -1
  218. package/build-module/hooks/background.js +2 -0
  219. package/build-module/hooks/background.js.map +1 -1
  220. package/build-module/hooks/block-bindings.js +13 -12
  221. package/build-module/hooks/block-bindings.js.map +1 -1
  222. package/build-module/hooks/border.js +3 -3
  223. package/build-module/hooks/border.js.map +1 -1
  224. package/build-module/hooks/color.js +1 -1
  225. package/build-module/hooks/color.js.map +1 -1
  226. package/build-module/hooks/dimensions.js +2 -2
  227. package/build-module/hooks/dimensions.js.map +1 -1
  228. package/build-module/hooks/font-family.js +1 -1
  229. package/build-module/hooks/font-family.js.map +1 -1
  230. package/build-module/hooks/gap.js +2 -2
  231. package/build-module/hooks/gap.js.map +1 -1
  232. package/build-module/hooks/index.js +0 -1
  233. package/build-module/hooks/index.js.map +1 -1
  234. package/build-module/hooks/index.native.js +1 -0
  235. package/build-module/hooks/index.native.js.map +1 -1
  236. package/build-module/hooks/style.js +7 -7
  237. package/build-module/hooks/style.js.map +1 -1
  238. package/build-module/hooks/supports.js +7 -7
  239. package/build-module/hooks/supports.js.map +1 -1
  240. package/build-module/hooks/typography.js +6 -6
  241. package/build-module/hooks/typography.js.map +1 -1
  242. package/build-module/hooks/use-zoom-out.js +12 -2
  243. package/build-module/hooks/use-zoom-out.js.map +1 -1
  244. package/build-module/hooks/utils.js +1 -1
  245. package/build-module/hooks/utils.js.map +1 -1
  246. package/build-module/store/private-actions.js +1 -1
  247. package/build-module/store/private-actions.js.map +1 -1
  248. package/build-module/store/private-selectors.js +11 -1
  249. package/build-module/store/private-selectors.js.map +1 -1
  250. package/build-module/store/reducer.js +93 -12
  251. package/build-module/store/reducer.js.map +1 -1
  252. package/build-module/store/selectors.js +6 -8
  253. package/build-module/store/selectors.js.map +1 -1
  254. package/build-module/utils/block-bindings.js +90 -0
  255. package/build-module/utils/block-bindings.js.map +1 -1
  256. package/build-style/style-rtl.css +27 -9
  257. package/build-style/style.css +27 -9
  258. package/package.json +33 -33
  259. package/src/components/audio-player/index.native.js +2 -2
  260. package/src/components/background-image-control/index.js +4 -0
  261. package/src/components/background-image-control/style.scss +4 -2
  262. package/src/components/block-alignment-matrix-control/README.md +29 -6
  263. package/src/components/block-alignment-matrix-control/index.js +31 -0
  264. package/src/components/block-alignment-matrix-control/stories/index.story.js +78 -0
  265. package/src/components/block-card/README.md +7 -0
  266. package/src/components/block-card/index.js +41 -12
  267. package/src/components/block-card/stories/index.story.js +79 -0
  268. package/src/components/block-card/style.scss +9 -1
  269. package/src/components/block-edit/edit.js +218 -11
  270. package/src/components/block-list/index.js +2 -7
  271. package/src/components/block-list/use-block-props/index.js +1 -1
  272. package/src/components/block-list/zoom-out-separator.js +30 -0
  273. package/src/components/block-settings-menu/block-settings-dropdown.js +17 -20
  274. package/src/components/block-styles/utils.js +3 -3
  275. package/src/components/block-title/stories/index.story.js +76 -0
  276. package/src/components/block-tools/style.scss +1 -0
  277. package/src/components/block-tools/zoom-out-mode-inserters.js +21 -3
  278. package/src/components/border-radius-control/README.md +59 -0
  279. package/src/components/border-radius-control/stories/index.story.js +58 -0
  280. package/src/components/button-block-appender/index.js +2 -7
  281. package/src/components/child-layout-control/index.js +14 -0
  282. package/src/components/colors-gradients/dropdown.js +57 -8
  283. package/src/components/colors-gradients/style.scss +5 -0
  284. package/src/components/contrast-checker/index.native.js +2 -2
  285. package/src/components/contrast-checker/stories/index.story.js +117 -0
  286. package/src/components/date-format-picker/README.md +6 -13
  287. package/src/components/date-format-picker/index.js +10 -17
  288. package/src/components/date-format-picker/stories/index.story.js +69 -0
  289. package/src/components/date-format-picker/style.scss +3 -1
  290. package/src/components/default-block-appender/content.scss +1 -0
  291. package/src/components/dimensions-tool/stories/aspect-ratio-tool.story.js +2 -1
  292. package/src/components/dimensions-tool/stories/index.story.js +2 -1
  293. package/src/components/dimensions-tool/stories/scale-tool.story.js +2 -1
  294. package/src/components/dimensions-tool/stories/width-height-tool.story.js +2 -1
  295. package/src/components/font-appearance-control/index.js +15 -0
  296. package/src/components/font-family/README.md +1 -0
  297. package/src/components/font-family/index.js +17 -1
  298. package/src/components/font-family/stories/index.story.js +1 -0
  299. package/src/components/global-styles/color-panel.js +3 -0
  300. package/src/components/global-styles/test/use-global-styles-output.js +1 -1
  301. package/src/components/global-styles/typography-utils.js +1 -1
  302. package/src/components/global-styles/use-global-styles-output.js +2 -2
  303. package/src/components/grid/grid-visualizer.js +11 -0
  304. package/src/components/grid/utils.js +19 -1
  305. package/src/components/iframe/index.js +1 -1
  306. package/src/components/inner-blocks/use-inner-block-template-sync.js +17 -10
  307. package/src/components/inserter/block-patterns-explorer/index.js +2 -3
  308. package/src/components/inserter/block-patterns-tab/index.js +3 -1
  309. package/src/components/inserter/block-patterns-tab/pattern-category-previews.js +4 -4
  310. package/src/components/inserter/block-patterns-tab/patterns-filter.js +2 -2
  311. package/src/components/inserter/category-tabs/index.js +3 -2
  312. package/src/components/inserter/index.js +1 -13
  313. package/src/components/inserter/quick-inserter.js +2 -25
  314. package/src/components/keyboard-shortcuts/index.js +2 -2
  315. package/src/components/line-height-control/README.md +1 -0
  316. package/src/components/line-height-control/index.js +12 -0
  317. package/src/components/line-height-control/stories/index.story.js +1 -0
  318. package/src/components/line-height-control/test/index.js +7 -1
  319. package/src/components/list-view/style.scss +10 -5
  320. package/src/components/media-placeholder/index.js +3 -3
  321. package/src/components/media-replace-flow/README.md +7 -0
  322. package/src/components/media-replace-flow/index.js +28 -36
  323. package/src/components/media-replace-flow/style.scss +6 -6
  324. package/src/components/plain-text/README.md +2 -2
  325. package/src/components/plain-text/index.js +34 -0
  326. package/src/components/plain-text/stories/index.story.js +75 -0
  327. package/src/components/provider/index.js +81 -4
  328. package/src/components/provider/use-media-upload-settings.js +25 -0
  329. package/src/components/resolution-tool/index.js +2 -0
  330. package/src/components/resolution-tool/stories/index.story.js +36 -8
  331. package/src/components/responsive-block-control/index.js +1 -1
  332. package/src/components/rich-text/event-listeners/delete.js +6 -1
  333. package/src/components/rich-text/index.js +1 -1
  334. package/src/components/text-alignment-control/README.md +49 -0
  335. package/src/components/text-alignment-control/stories/index.story.js +56 -18
  336. package/src/components/text-decoration-control/README.md +0 -1
  337. package/src/components/text-decoration-control/stories/index.story.js +51 -16
  338. package/src/components/text-transform-control/README.md +3 -4
  339. package/src/components/text-transform-control/stories/index.story.js +53 -16
  340. package/src/components/use-block-drop-zone/index.js +8 -1
  341. package/src/components/warning/stories/index.story.js +86 -0
  342. package/src/hooks/background.js +6 -0
  343. package/src/hooks/block-bindings.js +17 -18
  344. package/src/hooks/border.js +9 -3
  345. package/src/hooks/color.js +1 -1
  346. package/src/hooks/dimensions.js +2 -2
  347. package/src/hooks/font-family.js +1 -1
  348. package/src/hooks/gap.js +2 -2
  349. package/src/hooks/index.js +0 -1
  350. package/src/hooks/index.native.js +1 -0
  351. package/src/hooks/style.js +13 -7
  352. package/src/hooks/supports.js +7 -7
  353. package/src/hooks/test/style.js +2 -1
  354. package/src/hooks/typography.js +6 -6
  355. package/src/hooks/use-zoom-out.js +10 -2
  356. package/src/hooks/utils.js +1 -1
  357. package/src/store/private-actions.js +1 -0
  358. package/src/store/private-selectors.js +15 -5
  359. package/src/store/reducer.js +112 -19
  360. package/src/store/selectors.js +6 -8
  361. package/src/store/test/private-selectors.js +53 -9
  362. package/src/store/test/reducer.js +172 -166
  363. package/src/store/test/selectors.js +23 -0
  364. package/src/utils/block-bindings.js +95 -0
  365. package/tsconfig.json +2 -5
  366. package/build/hooks/use-bindings-attributes.js +0 -262
  367. package/build/hooks/use-bindings-attributes.js.map +0 -1
  368. package/build-module/hooks/use-bindings-attributes.js +0 -253
  369. package/build-module/hooks/use-bindings-attributes.js.map +0 -1
  370. package/src/hooks/use-bindings-attributes.js +0 -322
@@ -28,6 +28,12 @@ Object.defineProperty(exports, "getSpacingClassesAndStyles", {
28
28
  return _useSpacingProps.getSpacingClassesAndStyles;
29
29
  }
30
30
  });
31
+ Object.defineProperty(exports, "getTypographyClassesAndStyles", {
32
+ enumerable: true,
33
+ get: function () {
34
+ return _useTypographyProps.getTypographyClassesAndStyles;
35
+ }
36
+ });
31
37
  Object.defineProperty(exports, "useBorderProps", {
32
38
  enumerable: true,
33
39
  get: function () {
@@ -68,6 +74,7 @@ var _useColorProps = require("./use-color-props");
68
74
  var _useSpacingProps = require("./use-spacing-props");
69
75
  var _useCachedTruthy = require("./use-cached-truthy");
70
76
  var _useEditorWrapperStyles = require("./use-editor-wrapper-styles");
77
+ var _useTypographyProps = require("./use-typography-props");
71
78
  /**
72
79
  * Internal dependencies
73
80
  */
@@ -1 +1 @@
1
- {"version":3,"names":["_utils","require","_align","_interopRequireDefault","_anchor","_customClassName","_style","_color","_fontSize","_useBorderProps","_useShadowProps","_useColorProps","_useSpacingProps","_useCachedTruthy","_useEditorWrapperStyles","createBlockEditFilter","align","anchor","style","createBlockListBlockFilter","color","fontSize","createBlockSaveFilter","customClassName"],"sources":["@wordpress/block-editor/src/hooks/index.native.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport {\n\tcreateBlockEditFilter,\n\tcreateBlockListBlockFilter,\n\tcreateBlockSaveFilter,\n} from './utils';\nimport './compat';\nimport align from './align';\nimport anchor from './anchor';\nimport customClassName from './custom-class-name';\nimport './generated-class-name';\nimport style from './style';\nimport color from './color';\nimport fontSize from './font-size';\nimport './layout';\n\ncreateBlockEditFilter( [ align, anchor, style ] );\ncreateBlockListBlockFilter( [ align, style, color, fontSize ] );\ncreateBlockSaveFilter( [\n\talign,\n\tanchor,\n\tcustomClassName,\n\tcolor,\n\tstyle,\n\tfontSize,\n] );\n\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 { useCachedTruthy } from './use-cached-truthy';\nexport { useEditorWrapperStyles } from './use-editor-wrapper-styles';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAKAA,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,gBAAA,GAAAF,sBAAA,CAAAF,OAAA;AACAA,OAAA;AACA,IAAAK,MAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,MAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,SAAA,GAAAL,sBAAA,CAAAF,OAAA;AACAA,OAAA;AAaA,IAAAQ,eAAA,GAAAR,OAAA;AACA,IAAAS,eAAA,GAAAT,OAAA;AACA,IAAAU,cAAA,GAAAV,OAAA;AACA,IAAAW,gBAAA,GAAAX,OAAA;AACA,IAAAY,gBAAA,GAAAZ,OAAA;AACA,IAAAa,uBAAA,GAAAb,OAAA;AAlCA;AACA;AACA;;AAgBA,IAAAc,4BAAqB,EAAE,CAAEC,cAAK,EAAEC,eAAM,EAAEC,cAAK,CAAG,CAAC;AACjD,IAAAC,iCAA0B,EAAE,CAAEH,cAAK,EAAEE,cAAK,EAAEE,cAAK,EAAEC,iBAAQ,CAAG,CAAC;AAC/D,IAAAC,4BAAqB,EAAE,CACtBN,cAAK,EACLC,eAAM,EACNM,wBAAe,EACfH,cAAK,EACLF,cAAK,EACLG,iBAAQ,CACP,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_utils","require","_align","_interopRequireDefault","_anchor","_customClassName","_style","_color","_fontSize","_useBorderProps","_useShadowProps","_useColorProps","_useSpacingProps","_useCachedTruthy","_useEditorWrapperStyles","_useTypographyProps","createBlockEditFilter","align","anchor","style","createBlockListBlockFilter","color","fontSize","createBlockSaveFilter","customClassName"],"sources":["@wordpress/block-editor/src/hooks/index.native.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport {\n\tcreateBlockEditFilter,\n\tcreateBlockListBlockFilter,\n\tcreateBlockSaveFilter,\n} from './utils';\nimport './compat';\nimport align from './align';\nimport anchor from './anchor';\nimport customClassName from './custom-class-name';\nimport './generated-class-name';\nimport style from './style';\nimport color from './color';\nimport fontSize from './font-size';\nimport './layout';\n\ncreateBlockEditFilter( [ align, anchor, style ] );\ncreateBlockListBlockFilter( [ align, style, color, fontSize ] );\ncreateBlockSaveFilter( [\n\talign,\n\tanchor,\n\tcustomClassName,\n\tcolor,\n\tstyle,\n\tfontSize,\n] );\n\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 { useCachedTruthy } from './use-cached-truthy';\nexport { useEditorWrapperStyles } from './use-editor-wrapper-styles';\nexport { getTypographyClassesAndStyles } from './use-typography-props';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAKAA,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,gBAAA,GAAAF,sBAAA,CAAAF,OAAA;AACAA,OAAA;AACA,IAAAK,MAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,MAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,SAAA,GAAAL,sBAAA,CAAAF,OAAA;AACAA,OAAA;AAaA,IAAAQ,eAAA,GAAAR,OAAA;AACA,IAAAS,eAAA,GAAAT,OAAA;AACA,IAAAU,cAAA,GAAAV,OAAA;AACA,IAAAW,gBAAA,GAAAX,OAAA;AACA,IAAAY,gBAAA,GAAAZ,OAAA;AACA,IAAAa,uBAAA,GAAAb,OAAA;AACA,IAAAc,mBAAA,GAAAd,OAAA;AAnCA;AACA;AACA;;AAgBA,IAAAe,4BAAqB,EAAE,CAAEC,cAAK,EAAEC,eAAM,EAAEC,cAAK,CAAG,CAAC;AACjD,IAAAC,iCAA0B,EAAE,CAAEH,cAAK,EAAEE,cAAK,EAAEE,cAAK,EAAEC,iBAAQ,CAAG,CAAC;AAC/D,IAAAC,4BAAqB,EAAE,CACtBN,cAAK,EACLC,eAAM,EACNM,wBAAe,EACfH,cAAK,EACLF,cAAK,EACLG,iBAAQ,CACP,CAAC","ignoreList":[]}
@@ -81,12 +81,12 @@ function addAttribute(settings) {
81
81
  * @type {Record<string, string[]>}
82
82
  */
83
83
  const skipSerializationPathsEdit = {
84
- [`${_border.BORDER_SUPPORT_KEY}.skipSerialization`]: ['border'],
85
- [`${_color.COLOR_SUPPORT_KEY}.skipSerialization`]: [_color.COLOR_SUPPORT_KEY],
86
- [`${_typography.TYPOGRAPHY_SUPPORT_KEY}.skipSerialization`]: [_typography.TYPOGRAPHY_SUPPORT_KEY],
87
- [`${_dimensions.DIMENSIONS_SUPPORT_KEY}.skipSerialization`]: [_dimensions.DIMENSIONS_SUPPORT_KEY],
88
- [`${_dimensions.SPACING_SUPPORT_KEY}.skipSerialization`]: [_dimensions.SPACING_SUPPORT_KEY],
89
- [`${_border.SHADOW_SUPPORT_KEY}.skipSerialization`]: [_border.SHADOW_SUPPORT_KEY]
84
+ [`${_border.BORDER_SUPPORT_KEY}.__experimentalSkipSerialization`]: ['border'],
85
+ [`${_color.COLOR_SUPPORT_KEY}.__experimentalSkipSerialization`]: [_color.COLOR_SUPPORT_KEY],
86
+ [`${_typography.TYPOGRAPHY_SUPPORT_KEY}.__experimentalSkipSerialization`]: [_typography.TYPOGRAPHY_SUPPORT_KEY],
87
+ [`${_dimensions.DIMENSIONS_SUPPORT_KEY}.__experimentalSkipSerialization`]: [_dimensions.DIMENSIONS_SUPPORT_KEY],
88
+ [`${_dimensions.SPACING_SUPPORT_KEY}.__experimentalSkipSerialization`]: [_dimensions.SPACING_SUPPORT_KEY],
89
+ [`${_border.SHADOW_SUPPORT_KEY}.__experimentalSkipSerialization`]: [_border.SHADOW_SUPPORT_KEY]
90
90
  };
91
91
 
92
92
  /**
@@ -223,7 +223,7 @@ function omitStyle(style, paths, preserveReference = false) {
223
223
  }
224
224
  let newStyle = style;
225
225
  if (!preserveReference) {
226
- newStyle = structuredClone(style);
226
+ newStyle = JSON.parse(JSON.stringify(style));
227
227
  }
228
228
  if (!Array.isArray(paths)) {
229
229
  paths = [paths];
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_hooks","_blocks","_compose","_styleEngine","_background","_border","_color","_typography","_dimensions","_utils","_utils2","_blockEditingMode","_jsxRuntime","styleSupportKeys","TYPOGRAPHY_SUPPORT_KEYS","BORDER_SUPPORT_KEY","COLOR_SUPPORT_KEY","DIMENSIONS_SUPPORT_KEY","BACKGROUND_SUPPORT_KEY","SPACING_SUPPORT_KEY","SHADOW_SUPPORT_KEY","hasStyleSupport","nameOrType","some","key","hasBlockSupport","getInlineStyles","styles","output","getCSSRules","forEach","rule","value","addAttribute","settings","attributes","style","Object","assign","type","skipSerializationPathsEdit","TYPOGRAPHY_SUPPORT_KEY","skipSerializationPathsSave","skipSerializationPathsSaveChecks","renamedFeatures","gradients","omitStyle","paths","preserveReference","newStyle","structuredClone","Array","isArray","path","split","length","firstSubpath","restPath","addSaveProps","props","blockNameOrType","skipPaths","entries","indicator","skipSerialization","getBlockSupport","featureName","feature","BlockStyleControls","clientId","name","setAttributes","__unstableParentLayout","useBlockSettings","blockEditingMode","useBlockEditingMode","passedProps","typography","textAlign","jsxs","Fragment","children","jsx","ColorEdit","BackgroundImagePanel","TypographyPanel","BorderPanel","DimensionsPanel","_default","exports","default","edit","hasSupport","attributeKeys","useBlockProps","elementTypes","elementType","pseudo","elements","STYLE_BLOCK_PROPS_REFERENCE","blockElementsContainerIdentifier","useInstanceId","baseElementSelector","blockElementStyles","useMemo","elementCSSRules","shouldSkipSerialization","elementStyles","selector","scopeSelector","ELEMENTS","push","compileCSS","pseudoSelector","element","join","undefined","useStyleOverride","css","className","addFilter"],"sources":["@wordpress/block-editor/src/hooks/style.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { addFilter } from '@wordpress/hooks';\nimport {\n\tgetBlockSupport,\n\thasBlockSupport,\n\t__EXPERIMENTAL_ELEMENTS as ELEMENTS,\n} from '@wordpress/blocks';\nimport { useInstanceId } from '@wordpress/compose';\nimport { getCSSRules, compileCSS } from '@wordpress/style-engine';\n\n/**\n * Internal dependencies\n */\nimport { BACKGROUND_SUPPORT_KEY, BackgroundImagePanel } from './background';\nimport { BORDER_SUPPORT_KEY, BorderPanel, SHADOW_SUPPORT_KEY } from './border';\nimport { COLOR_SUPPORT_KEY, ColorEdit } from './color';\nimport {\n\tTypographyPanel,\n\tTYPOGRAPHY_SUPPORT_KEY,\n\tTYPOGRAPHY_SUPPORT_KEYS,\n} from './typography';\nimport {\n\tDIMENSIONS_SUPPORT_KEY,\n\tSPACING_SUPPORT_KEY,\n\tDimensionsPanel,\n} from './dimensions';\nimport {\n\tshouldSkipSerialization,\n\tuseStyleOverride,\n\tuseBlockSettings,\n} from './utils';\nimport { scopeSelector } from '../components/global-styles/utils';\nimport { useBlockEditingMode } from '../components/block-editing-mode';\n\nconst styleSupportKeys = [\n\t...TYPOGRAPHY_SUPPORT_KEYS,\n\tBORDER_SUPPORT_KEY,\n\tCOLOR_SUPPORT_KEY,\n\tDIMENSIONS_SUPPORT_KEY,\n\tBACKGROUND_SUPPORT_KEY,\n\tSPACING_SUPPORT_KEY,\n\tSHADOW_SUPPORT_KEY,\n];\n\nconst hasStyleSupport = ( nameOrType ) =>\n\tstyleSupportKeys.some( ( key ) => hasBlockSupport( nameOrType, key ) );\n\n/**\n * Returns the inline styles to add depending on the style object\n *\n * @param {Object} styles Styles configuration.\n *\n * @return {Object} Flattened CSS variables declaration.\n */\nexport function getInlineStyles( styles = {} ) {\n\tconst output = {};\n\t// The goal is to move everything to server side generated engine styles\n\t// This is temporary as we absorb more and more styles into the engine.\n\tgetCSSRules( styles ).forEach( ( rule ) => {\n\t\toutput[ rule.key ] = rule.value;\n\t} );\n\n\treturn output;\n}\n\n/**\n * Filters registered block settings, extending attributes to include `style` attribute.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nfunction addAttribute( settings ) {\n\tif ( ! hasStyleSupport( settings ) ) {\n\t\treturn settings;\n\t}\n\n\t// Allow blocks to specify their own attribute definition with default 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\n/**\n * A dictionary of paths to flag skipping block support serialization as the key,\n * with values providing the style paths to be omitted from serialization.\n *\n * @constant\n * @type {Record<string, string[]>}\n */\nconst skipSerializationPathsEdit = {\n\t[ `${ BORDER_SUPPORT_KEY }.skipSerialization` ]: [ 'border' ],\n\t[ `${ COLOR_SUPPORT_KEY }.skipSerialization` ]: [ COLOR_SUPPORT_KEY ],\n\t[ `${ TYPOGRAPHY_SUPPORT_KEY }.skipSerialization` ]: [\n\t\tTYPOGRAPHY_SUPPORT_KEY,\n\t],\n\t[ `${ DIMENSIONS_SUPPORT_KEY }.skipSerialization` ]: [\n\t\tDIMENSIONS_SUPPORT_KEY,\n\t],\n\t[ `${ SPACING_SUPPORT_KEY }.skipSerialization` ]: [ SPACING_SUPPORT_KEY ],\n\t[ `${ SHADOW_SUPPORT_KEY }.skipSerialization` ]: [ SHADOW_SUPPORT_KEY ],\n};\n\n/**\n * A dictionary of paths to flag skipping block support serialization as the key,\n * with values providing the style paths to be omitted from serialization.\n *\n * Extends the Edit skip paths to enable skipping additional paths in just\n * the Save component. This allows a block support to be serialized within the\n * editor, while using an alternate approach, such as server-side rendering, when\n * the support is saved.\n *\n * @constant\n * @type {Record<string, string[]>}\n */\nconst skipSerializationPathsSave = {\n\t...skipSerializationPathsEdit,\n\t[ `${ DIMENSIONS_SUPPORT_KEY }.aspectRatio` ]: [\n\t\t`${ DIMENSIONS_SUPPORT_KEY }.aspectRatio`,\n\t], // Skip serialization of aspect ratio in save mode.\n\t[ `${ BACKGROUND_SUPPORT_KEY }` ]: [ BACKGROUND_SUPPORT_KEY ], // Skip serialization of background support in save mode.\n};\n\nconst skipSerializationPathsSaveChecks = {\n\t[ `${ DIMENSIONS_SUPPORT_KEY }.aspectRatio` ]: true,\n\t[ `${ BACKGROUND_SUPPORT_KEY }` ]: true,\n};\n\n/**\n * A dictionary used to normalize feature names between support flags, style\n * object properties and __experimentSkipSerialization configuration arrays.\n *\n * This allows not having to provide a migration for a support flag and possible\n * backwards compatibility bridges, while still achieving consistency between\n * the support flag and the skip serialization array.\n *\n * @constant\n * @type {Record<string, string>}\n */\nconst renamedFeatures = { gradients: 'gradient' };\n\n/**\n * A utility function used to remove one or more paths from a style object.\n * Works in a way similar to Lodash's `omit()`. See unit tests and examples below.\n *\n * It supports a single string path:\n *\n * ```\n * omitStyle( { color: 'red' }, 'color' ); // {}\n * ```\n *\n * or an array of paths:\n *\n * ```\n * omitStyle( { color: 'red', background: '#fff' }, [ 'color', 'background' ] ); // {}\n * ```\n *\n * It also allows you to specify paths at multiple levels in a string.\n *\n * ```\n * omitStyle( { typography: { textDecoration: 'underline' } }, 'typography.textDecoration' ); // {}\n * ```\n *\n * You can remove multiple paths at the same time:\n *\n * ```\n * omitStyle(\n * \t\t{\n * \t\t\ttypography: {\n * \t\t\t\ttextDecoration: 'underline',\n * \t\t\t\ttextTransform: 'uppercase',\n * \t\t\t}\n *\t\t},\n *\t\t[\n * \t\t\t'typography.textDecoration',\n * \t\t\t'typography.textTransform',\n *\t\t]\n * );\n * // {}\n * ```\n *\n * You can also specify nested paths as arrays:\n *\n * ```\n * omitStyle(\n * \t\t{\n * \t\t\ttypography: {\n * \t\t\t\ttextDecoration: 'underline',\n * \t\t\t\ttextTransform: 'uppercase',\n * \t\t\t}\n *\t\t},\n *\t\t[\n * \t\t\t[ 'typography', 'textDecoration' ],\n * \t\t\t[ 'typography', 'textTransform' ],\n *\t\t]\n * );\n * // {}\n * ```\n *\n * With regards to nesting of styles, infinite depth is supported:\n *\n * ```\n * omitStyle(\n * \t\t{\n * \t\t\tborder: {\n * \t\t\t\tradius: {\n * \t\t\t\t\ttopLeft: '10px',\n * \t\t\t\t\ttopRight: '0.5rem',\n * \t\t\t\t}\n * \t\t\t}\n *\t\t},\n *\t\t[\n * \t\t\t[ 'border', 'radius', 'topRight' ],\n *\t\t]\n * );\n * // { border: { radius: { topLeft: '10px' } } }\n * ```\n *\n * The third argument, `preserveReference`, defines how to treat the input style object.\n * It is mostly necessary to properly handle mutation when recursively handling the style object.\n * Defaulting to `false`, this will always create a new object, avoiding to mutate `style`.\n * However, when recursing, we change that value to `true` in order to work with a single copy\n * of the original style object.\n *\n * @see https://lodash.com/docs/4.17.15#omit\n *\n * @param {Object} style Styles object.\n * @param {Array|string} paths Paths to remove.\n * @param {boolean} preserveReference True to mutate the `style` object, false otherwise.\n * @return {Object} Styles object with the specified paths removed.\n */\nexport function omitStyle( style, paths, preserveReference = false ) {\n\tif ( ! style ) {\n\t\treturn style;\n\t}\n\n\tlet newStyle = style;\n\tif ( ! preserveReference ) {\n\t\tnewStyle = structuredClone( style );\n\t}\n\n\tif ( ! Array.isArray( paths ) ) {\n\t\tpaths = [ paths ];\n\t}\n\n\tpaths.forEach( ( path ) => {\n\t\tif ( ! Array.isArray( path ) ) {\n\t\t\tpath = path.split( '.' );\n\t\t}\n\n\t\tif ( path.length > 1 ) {\n\t\t\tconst [ firstSubpath, ...restPath ] = path;\n\t\t\tomitStyle( newStyle[ firstSubpath ], [ restPath ], true );\n\t\t} else if ( path.length === 1 ) {\n\t\t\tdelete newStyle[ path[ 0 ] ];\n\t\t}\n\t} );\n\n\treturn newStyle;\n}\n\n/**\n * Override props assigned to save component to inject the CSS variables definition.\n *\n * @param {Object} props Additional props applied to save element.\n * @param {Object|string} blockNameOrType Block type.\n * @param {Object} attributes Block attributes.\n * @param {?Record<string, string[]>} skipPaths An object of keys and paths to skip serialization.\n *\n * @return {Object} Filtered props applied to save element.\n */\nexport function addSaveProps(\n\tprops,\n\tblockNameOrType,\n\tattributes,\n\tskipPaths = skipSerializationPathsSave\n) {\n\tif ( ! hasStyleSupport( blockNameOrType ) ) {\n\t\treturn props;\n\t}\n\n\tlet { style } = attributes;\n\tObject.entries( skipPaths ).forEach( ( [ indicator, path ] ) => {\n\t\tconst skipSerialization =\n\t\t\tskipSerializationPathsSaveChecks[ indicator ] ||\n\t\t\tgetBlockSupport( blockNameOrType, indicator );\n\n\t\tif ( skipSerialization === true ) {\n\t\t\tstyle = omitStyle( style, path );\n\t\t}\n\n\t\tif ( Array.isArray( skipSerialization ) ) {\n\t\t\tskipSerialization.forEach( ( featureName ) => {\n\t\t\t\tconst feature = renamedFeatures[ featureName ] || featureName;\n\t\t\t\tstyle = omitStyle( style, [ [ ...path, feature ] ] );\n\t\t\t} );\n\t\t}\n\t} );\n\n\tprops.style = {\n\t\t...getInlineStyles( style ),\n\t\t...props.style,\n\t};\n\n\treturn props;\n}\n\nfunction BlockStyleControls( {\n\tclientId,\n\tname,\n\tsetAttributes,\n\t__unstableParentLayout,\n} ) {\n\tconst settings = useBlockSettings( name, __unstableParentLayout );\n\tconst blockEditingMode = useBlockEditingMode();\n\tconst passedProps = {\n\t\tclientId,\n\t\tname,\n\t\tsetAttributes,\n\t\tsettings: {\n\t\t\t...settings,\n\t\t\ttypography: {\n\t\t\t\t...settings.typography,\n\t\t\t\t// The text alignment UI for individual blocks is rendered in\n\t\t\t\t// the block toolbar, so disable it here.\n\t\t\t\ttextAlign: false,\n\t\t\t},\n\t\t},\n\t};\n\tif ( blockEditingMode !== 'default' ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<>\n\t\t\t<ColorEdit { ...passedProps } />\n\t\t\t<BackgroundImagePanel { ...passedProps } />\n\t\t\t<TypographyPanel { ...passedProps } />\n\t\t\t<BorderPanel { ...passedProps } />\n\t\t\t<DimensionsPanel { ...passedProps } />\n\t\t</>\n\t);\n}\n\nexport default {\n\tedit: BlockStyleControls,\n\thasSupport: hasStyleSupport,\n\taddSaveProps,\n\tattributeKeys: [ 'style' ],\n\tuseBlockProps,\n};\n\n// Defines which element types are supported, including their hover styles or\n// any other elements that have been included under a single element type\n// e.g. heading and h1-h6.\nconst elementTypes = [\n\t{ elementType: 'button' },\n\t{ elementType: 'link', pseudo: [ ':hover' ] },\n\t{\n\t\telementType: 'heading',\n\t\telements: [ 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ],\n\t},\n];\n\n// Used for generating the instance ID\nconst STYLE_BLOCK_PROPS_REFERENCE = {};\n\nfunction useBlockProps( { name, style } ) {\n\tconst blockElementsContainerIdentifier = useInstanceId(\n\t\tSTYLE_BLOCK_PROPS_REFERENCE,\n\t\t'wp-elements'\n\t);\n\n\tconst baseElementSelector = `.${ blockElementsContainerIdentifier }`;\n\tconst blockElementStyles = style?.elements;\n\n\tconst styles = useMemo( () => {\n\t\tif ( ! blockElementStyles ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst elementCSSRules = [];\n\n\t\telementTypes.forEach( ( { elementType, pseudo, elements } ) => {\n\t\t\tconst skipSerialization = shouldSkipSerialization(\n\t\t\t\tname,\n\t\t\t\tCOLOR_SUPPORT_KEY,\n\t\t\t\telementType\n\t\t\t);\n\n\t\t\tif ( skipSerialization ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst elementStyles = blockElementStyles?.[ elementType ];\n\n\t\t\t// Process primary element type styles.\n\t\t\tif ( elementStyles ) {\n\t\t\t\tconst selector = scopeSelector(\n\t\t\t\t\tbaseElementSelector,\n\t\t\t\t\tELEMENTS[ elementType ]\n\t\t\t\t);\n\n\t\t\t\telementCSSRules.push(\n\t\t\t\t\tcompileCSS( elementStyles, { selector } )\n\t\t\t\t);\n\n\t\t\t\t// Process any interactive states for the element type.\n\t\t\t\tif ( pseudo ) {\n\t\t\t\t\tpseudo.forEach( ( pseudoSelector ) => {\n\t\t\t\t\t\tif ( elementStyles[ pseudoSelector ] ) {\n\t\t\t\t\t\t\telementCSSRules.push(\n\t\t\t\t\t\t\t\tcompileCSS( elementStyles[ pseudoSelector ], {\n\t\t\t\t\t\t\t\t\tselector: scopeSelector(\n\t\t\t\t\t\t\t\t\t\tbaseElementSelector,\n\t\t\t\t\t\t\t\t\t\t`${ ELEMENTS[ elementType ] }${ pseudoSelector }`\n\t\t\t\t\t\t\t\t\t),\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\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Process related elements e.g. h1-h6 for headings\n\t\t\tif ( elements ) {\n\t\t\t\telements.forEach( ( element ) => {\n\t\t\t\t\tif ( blockElementStyles[ element ] ) {\n\t\t\t\t\t\telementCSSRules.push(\n\t\t\t\t\t\t\tcompileCSS( blockElementStyles[ element ], {\n\t\t\t\t\t\t\t\tselector: scopeSelector(\n\t\t\t\t\t\t\t\t\tbaseElementSelector,\n\t\t\t\t\t\t\t\t\tELEMENTS[ element ]\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\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\treturn elementCSSRules.length > 0\n\t\t\t? elementCSSRules.join( '' )\n\t\t\t: undefined;\n\t}, [ baseElementSelector, blockElementStyles, name ] );\n\n\tuseStyleOverride( { css: styles } );\n\n\treturn addSaveProps(\n\t\t{ className: blockElementsContainerIdentifier },\n\t\tname,\n\t\t{ style },\n\t\tskipSerializationPathsEdit\n\t);\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/style/addAttribute',\n\taddAttribute\n);\n"],"mappings":";;;;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAKA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAKA,IAAAK,WAAA,GAAAL,OAAA;AACA,IA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AQ,CAAEd,WAAW,CAAE,GAAKiB,cAAc,EAC/C;cACD,CAAE,CACH,CAAC;YACF;UACD,CAAE,CAAC;QACJ;MACD;;MAEA;MACA,IAAKf,QAAQ,EAAG;QACfA,QAAQ,CAACpE,OAAO,CAAIoF,OAAO,IAAM;UAChC,IAAKX,kBAAkB,CAAEW,OAAO,CAAE,EAAG;YACpCT,eAAe,CAACM,IAAI,CACnB,IAAAC,uBAAU,EAAET,kBAAkB,CAAEW,OAAO,CAAE,EAAE;cAC1CN,QAAQ,EAAE,IAAAC,qBAAa,EACtBP,mBAAmB,EACnBQ,+BAAQ,CAAEI,OAAO,CAClB;YACD,CAAE,CACH,CAAC;UACF;QACD,CAAE,CAAC;MACJ;IACD,CAAE,CAAC;IAEH,OAAOT,eAAe,CAAClD,MAAM,GAAG,CAAC,GAC9BkD,eAAe,CAACU,IAAI,CAAE,EAAG,CAAC,GAC1BC,SAAS;EACb,CAAC,EAAE,CAAEd,mBAAmB,EAAEC,kBAAkB,EAAEjC,IAAI,CAAG,CAAC;EAEtD,IAAA+C,uBAAgB,EAAE;IAAEC,GAAG,EAAE3F;EAAO,CAAE,CAAC;EAEnC,OAAO+B,YAAY,CAClB;IAAE6D,SAAS,EAAEnB;EAAiC,CAAC,EAC/C9B,IAAI,EACJ;IAAElC;EAAM,CAAC,EACTI,0BACD,CAAC;AACF;AAEA,IAAAgF,gBAAS,EACR,0BAA0B,EAC1B,yBAAyB,EACzBvF,YACD,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_element","require","_hooks","_blocks","_compose","_styleEngine","_background","_border","_color","_typography","_dimensions","_utils","_utils2","_blockEditingMode","_jsxRuntime","styleSupportKeys","TYPOGRAPHY_SUPPORT_KEYS","BORDER_SUPPORT_KEY","COLOR_SUPPORT_KEY","DIMENSIONS_SUPPORT_KEY","BACKGROUND_SUPPORT_KEY","SPACING_SUPPORT_KEY","SHADOW_SUPPORT_KEY","hasStyleSupport","nameOrType","some","key","hasBlockSupport","getInlineStyles","styles","output","getCSSRules","forEach","rule","value","addAttribute","settings","attributes","style","Object","assign","type","skipSerializationPathsEdit","TYPOGRAPHY_SUPPORT_KEY","skipSerializationPathsSave","skipSerializationPathsSaveChecks","renamedFeatures","gradients","omitStyle","paths","preserveReference","newStyle","JSON","parse","stringify","Array","isArray","path","split","length","firstSubpath","restPath","addSaveProps","props","blockNameOrType","skipPaths","entries","indicator","skipSerialization","getBlockSupport","featureName","feature","BlockStyleControls","clientId","name","setAttributes","__unstableParentLayout","useBlockSettings","blockEditingMode","useBlockEditingMode","passedProps","typography","textAlign","jsxs","Fragment","children","jsx","ColorEdit","BackgroundImagePanel","TypographyPanel","BorderPanel","DimensionsPanel","_default","exports","default","edit","hasSupport","attributeKeys","useBlockProps","elementTypes","elementType","pseudo","elements","STYLE_BLOCK_PROPS_REFERENCE","blockElementsContainerIdentifier","useInstanceId","baseElementSelector","blockElementStyles","useMemo","elementCSSRules","shouldSkipSerialization","elementStyles","selector","scopeSelector","ELEMENTS","push","compileCSS","pseudoSelector","element","join","undefined","useStyleOverride","css","className","addFilter"],"sources":["@wordpress/block-editor/src/hooks/style.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { addFilter } from '@wordpress/hooks';\nimport {\n\tgetBlockSupport,\n\thasBlockSupport,\n\t__EXPERIMENTAL_ELEMENTS as ELEMENTS,\n} from '@wordpress/blocks';\nimport { useInstanceId } from '@wordpress/compose';\nimport { getCSSRules, compileCSS } from '@wordpress/style-engine';\n\n/**\n * Internal dependencies\n */\nimport { BACKGROUND_SUPPORT_KEY, BackgroundImagePanel } from './background';\nimport { BORDER_SUPPORT_KEY, BorderPanel, SHADOW_SUPPORT_KEY } from './border';\nimport { COLOR_SUPPORT_KEY, ColorEdit } from './color';\nimport {\n\tTypographyPanel,\n\tTYPOGRAPHY_SUPPORT_KEY,\n\tTYPOGRAPHY_SUPPORT_KEYS,\n} from './typography';\nimport {\n\tDIMENSIONS_SUPPORT_KEY,\n\tSPACING_SUPPORT_KEY,\n\tDimensionsPanel,\n} from './dimensions';\nimport {\n\tshouldSkipSerialization,\n\tuseStyleOverride,\n\tuseBlockSettings,\n} from './utils';\nimport { scopeSelector } from '../components/global-styles/utils';\nimport { useBlockEditingMode } from '../components/block-editing-mode';\n\nconst styleSupportKeys = [\n\t...TYPOGRAPHY_SUPPORT_KEYS,\n\tBORDER_SUPPORT_KEY,\n\tCOLOR_SUPPORT_KEY,\n\tDIMENSIONS_SUPPORT_KEY,\n\tBACKGROUND_SUPPORT_KEY,\n\tSPACING_SUPPORT_KEY,\n\tSHADOW_SUPPORT_KEY,\n];\n\nconst hasStyleSupport = ( nameOrType ) =>\n\tstyleSupportKeys.some( ( key ) => hasBlockSupport( nameOrType, key ) );\n\n/**\n * Returns the inline styles to add depending on the style object\n *\n * @param {Object} styles Styles configuration.\n *\n * @return {Object} Flattened CSS variables declaration.\n */\nexport function getInlineStyles( styles = {} ) {\n\tconst output = {};\n\t// The goal is to move everything to server side generated engine styles\n\t// This is temporary as we absorb more and more styles into the engine.\n\tgetCSSRules( styles ).forEach( ( rule ) => {\n\t\toutput[ rule.key ] = rule.value;\n\t} );\n\n\treturn output;\n}\n\n/**\n * Filters registered block settings, extending attributes to include `style` attribute.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nfunction addAttribute( settings ) {\n\tif ( ! hasStyleSupport( settings ) ) {\n\t\treturn settings;\n\t}\n\n\t// Allow blocks to specify their own attribute definition with default 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\n/**\n * A dictionary of paths to flag skipping block support serialization as the key,\n * with values providing the style paths to be omitted from serialization.\n *\n * @constant\n * @type {Record<string, string[]>}\n */\nconst skipSerializationPathsEdit = {\n\t[ `${ BORDER_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [ 'border' ],\n\t[ `${ COLOR_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tCOLOR_SUPPORT_KEY,\n\t],\n\t[ `${ TYPOGRAPHY_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tTYPOGRAPHY_SUPPORT_KEY,\n\t],\n\t[ `${ DIMENSIONS_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tDIMENSIONS_SUPPORT_KEY,\n\t],\n\t[ `${ SPACING_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tSPACING_SUPPORT_KEY,\n\t],\n\t[ `${ SHADOW_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tSHADOW_SUPPORT_KEY,\n\t],\n};\n\n/**\n * A dictionary of paths to flag skipping block support serialization as the key,\n * with values providing the style paths to be omitted from serialization.\n *\n * Extends the Edit skip paths to enable skipping additional paths in just\n * the Save component. This allows a block support to be serialized within the\n * editor, while using an alternate approach, such as server-side rendering, when\n * the support is saved.\n *\n * @constant\n * @type {Record<string, string[]>}\n */\nconst skipSerializationPathsSave = {\n\t...skipSerializationPathsEdit,\n\t[ `${ DIMENSIONS_SUPPORT_KEY }.aspectRatio` ]: [\n\t\t`${ DIMENSIONS_SUPPORT_KEY }.aspectRatio`,\n\t], // Skip serialization of aspect ratio in save mode.\n\t[ `${ BACKGROUND_SUPPORT_KEY }` ]: [ BACKGROUND_SUPPORT_KEY ], // Skip serialization of background support in save mode.\n};\n\nconst skipSerializationPathsSaveChecks = {\n\t[ `${ DIMENSIONS_SUPPORT_KEY }.aspectRatio` ]: true,\n\t[ `${ BACKGROUND_SUPPORT_KEY }` ]: true,\n};\n\n/**\n * A dictionary used to normalize feature names between support flags, style\n * object properties and __experimentSkipSerialization configuration arrays.\n *\n * This allows not having to provide a migration for a support flag and possible\n * backwards compatibility bridges, while still achieving consistency between\n * the support flag and the skip serialization array.\n *\n * @constant\n * @type {Record<string, string>}\n */\nconst renamedFeatures = { gradients: 'gradient' };\n\n/**\n * A utility function used to remove one or more paths from a style object.\n * Works in a way similar to Lodash's `omit()`. See unit tests and examples below.\n *\n * It supports a single string path:\n *\n * ```\n * omitStyle( { color: 'red' }, 'color' ); // {}\n * ```\n *\n * or an array of paths:\n *\n * ```\n * omitStyle( { color: 'red', background: '#fff' }, [ 'color', 'background' ] ); // {}\n * ```\n *\n * It also allows you to specify paths at multiple levels in a string.\n *\n * ```\n * omitStyle( { typography: { textDecoration: 'underline' } }, 'typography.textDecoration' ); // {}\n * ```\n *\n * You can remove multiple paths at the same time:\n *\n * ```\n * omitStyle(\n * \t\t{\n * \t\t\ttypography: {\n * \t\t\t\ttextDecoration: 'underline',\n * \t\t\t\ttextTransform: 'uppercase',\n * \t\t\t}\n *\t\t},\n *\t\t[\n * \t\t\t'typography.textDecoration',\n * \t\t\t'typography.textTransform',\n *\t\t]\n * );\n * // {}\n * ```\n *\n * You can also specify nested paths as arrays:\n *\n * ```\n * omitStyle(\n * \t\t{\n * \t\t\ttypography: {\n * \t\t\t\ttextDecoration: 'underline',\n * \t\t\t\ttextTransform: 'uppercase',\n * \t\t\t}\n *\t\t},\n *\t\t[\n * \t\t\t[ 'typography', 'textDecoration' ],\n * \t\t\t[ 'typography', 'textTransform' ],\n *\t\t]\n * );\n * // {}\n * ```\n *\n * With regards to nesting of styles, infinite depth is supported:\n *\n * ```\n * omitStyle(\n * \t\t{\n * \t\t\tborder: {\n * \t\t\t\tradius: {\n * \t\t\t\t\ttopLeft: '10px',\n * \t\t\t\t\ttopRight: '0.5rem',\n * \t\t\t\t}\n * \t\t\t}\n *\t\t},\n *\t\t[\n * \t\t\t[ 'border', 'radius', 'topRight' ],\n *\t\t]\n * );\n * // { border: { radius: { topLeft: '10px' } } }\n * ```\n *\n * The third argument, `preserveReference`, defines how to treat the input style object.\n * It is mostly necessary to properly handle mutation when recursively handling the style object.\n * Defaulting to `false`, this will always create a new object, avoiding to mutate `style`.\n * However, when recursing, we change that value to `true` in order to work with a single copy\n * of the original style object.\n *\n * @see https://lodash.com/docs/4.17.15#omit\n *\n * @param {Object} style Styles object.\n * @param {Array|string} paths Paths to remove.\n * @param {boolean} preserveReference True to mutate the `style` object, false otherwise.\n * @return {Object} Styles object with the specified paths removed.\n */\nexport function omitStyle( style, paths, preserveReference = false ) {\n\tif ( ! style ) {\n\t\treturn style;\n\t}\n\n\tlet newStyle = style;\n\tif ( ! preserveReference ) {\n\t\tnewStyle = JSON.parse( JSON.stringify( style ) );\n\t}\n\n\tif ( ! Array.isArray( paths ) ) {\n\t\tpaths = [ paths ];\n\t}\n\n\tpaths.forEach( ( path ) => {\n\t\tif ( ! Array.isArray( path ) ) {\n\t\t\tpath = path.split( '.' );\n\t\t}\n\n\t\tif ( path.length > 1 ) {\n\t\t\tconst [ firstSubpath, ...restPath ] = path;\n\t\t\tomitStyle( newStyle[ firstSubpath ], [ restPath ], true );\n\t\t} else if ( path.length === 1 ) {\n\t\t\tdelete newStyle[ path[ 0 ] ];\n\t\t}\n\t} );\n\n\treturn newStyle;\n}\n\n/**\n * Override props assigned to save component to inject the CSS variables definition.\n *\n * @param {Object} props Additional props applied to save element.\n * @param {Object|string} blockNameOrType Block type.\n * @param {Object} attributes Block attributes.\n * @param {?Record<string, string[]>} skipPaths An object of keys and paths to skip serialization.\n *\n * @return {Object} Filtered props applied to save element.\n */\nexport function addSaveProps(\n\tprops,\n\tblockNameOrType,\n\tattributes,\n\tskipPaths = skipSerializationPathsSave\n) {\n\tif ( ! hasStyleSupport( blockNameOrType ) ) {\n\t\treturn props;\n\t}\n\n\tlet { style } = attributes;\n\tObject.entries( skipPaths ).forEach( ( [ indicator, path ] ) => {\n\t\tconst skipSerialization =\n\t\t\tskipSerializationPathsSaveChecks[ indicator ] ||\n\t\t\tgetBlockSupport( blockNameOrType, indicator );\n\n\t\tif ( skipSerialization === true ) {\n\t\t\tstyle = omitStyle( style, path );\n\t\t}\n\n\t\tif ( Array.isArray( skipSerialization ) ) {\n\t\t\tskipSerialization.forEach( ( featureName ) => {\n\t\t\t\tconst feature = renamedFeatures[ featureName ] || featureName;\n\t\t\t\tstyle = omitStyle( style, [ [ ...path, feature ] ] );\n\t\t\t} );\n\t\t}\n\t} );\n\n\tprops.style = {\n\t\t...getInlineStyles( style ),\n\t\t...props.style,\n\t};\n\n\treturn props;\n}\n\nfunction BlockStyleControls( {\n\tclientId,\n\tname,\n\tsetAttributes,\n\t__unstableParentLayout,\n} ) {\n\tconst settings = useBlockSettings( name, __unstableParentLayout );\n\tconst blockEditingMode = useBlockEditingMode();\n\tconst passedProps = {\n\t\tclientId,\n\t\tname,\n\t\tsetAttributes,\n\t\tsettings: {\n\t\t\t...settings,\n\t\t\ttypography: {\n\t\t\t\t...settings.typography,\n\t\t\t\t// The text alignment UI for individual blocks is rendered in\n\t\t\t\t// the block toolbar, so disable it here.\n\t\t\t\ttextAlign: false,\n\t\t\t},\n\t\t},\n\t};\n\tif ( blockEditingMode !== 'default' ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<>\n\t\t\t<ColorEdit { ...passedProps } />\n\t\t\t<BackgroundImagePanel { ...passedProps } />\n\t\t\t<TypographyPanel { ...passedProps } />\n\t\t\t<BorderPanel { ...passedProps } />\n\t\t\t<DimensionsPanel { ...passedProps } />\n\t\t</>\n\t);\n}\n\nexport default {\n\tedit: BlockStyleControls,\n\thasSupport: hasStyleSupport,\n\taddSaveProps,\n\tattributeKeys: [ 'style' ],\n\tuseBlockProps,\n};\n\n// Defines which element types are supported, including their hover styles or\n// any other elements that have been included under a single element type\n// e.g. heading and h1-h6.\nconst elementTypes = [\n\t{ elementType: 'button' },\n\t{ elementType: 'link', pseudo: [ ':hover' ] },\n\t{\n\t\telementType: 'heading',\n\t\telements: [ 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ],\n\t},\n];\n\n// Used for generating the instance ID\nconst STYLE_BLOCK_PROPS_REFERENCE = {};\n\nfunction useBlockProps( { name, style } ) {\n\tconst blockElementsContainerIdentifier = useInstanceId(\n\t\tSTYLE_BLOCK_PROPS_REFERENCE,\n\t\t'wp-elements'\n\t);\n\n\tconst baseElementSelector = `.${ blockElementsContainerIdentifier }`;\n\tconst blockElementStyles = style?.elements;\n\n\tconst styles = useMemo( () => {\n\t\tif ( ! blockElementStyles ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst elementCSSRules = [];\n\n\t\telementTypes.forEach( ( { elementType, pseudo, elements } ) => {\n\t\t\tconst skipSerialization = shouldSkipSerialization(\n\t\t\t\tname,\n\t\t\t\tCOLOR_SUPPORT_KEY,\n\t\t\t\telementType\n\t\t\t);\n\n\t\t\tif ( skipSerialization ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst elementStyles = blockElementStyles?.[ elementType ];\n\n\t\t\t// Process primary element type styles.\n\t\t\tif ( elementStyles ) {\n\t\t\t\tconst selector = scopeSelector(\n\t\t\t\t\tbaseElementSelector,\n\t\t\t\t\tELEMENTS[ elementType ]\n\t\t\t\t);\n\n\t\t\t\telementCSSRules.push(\n\t\t\t\t\tcompileCSS( elementStyles, { selector } )\n\t\t\t\t);\n\n\t\t\t\t// Process any interactive states for the element type.\n\t\t\t\tif ( pseudo ) {\n\t\t\t\t\tpseudo.forEach( ( pseudoSelector ) => {\n\t\t\t\t\t\tif ( elementStyles[ pseudoSelector ] ) {\n\t\t\t\t\t\t\telementCSSRules.push(\n\t\t\t\t\t\t\t\tcompileCSS( elementStyles[ pseudoSelector ], {\n\t\t\t\t\t\t\t\t\tselector: scopeSelector(\n\t\t\t\t\t\t\t\t\t\tbaseElementSelector,\n\t\t\t\t\t\t\t\t\t\t`${ ELEMENTS[ elementType ] }${ pseudoSelector }`\n\t\t\t\t\t\t\t\t\t),\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\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Process related elements e.g. h1-h6 for headings\n\t\t\tif ( elements ) {\n\t\t\t\telements.forEach( ( element ) => {\n\t\t\t\t\tif ( blockElementStyles[ element ] ) {\n\t\t\t\t\t\telementCSSRules.push(\n\t\t\t\t\t\t\tcompileCSS( blockElementStyles[ element ], {\n\t\t\t\t\t\t\t\tselector: scopeSelector(\n\t\t\t\t\t\t\t\t\tbaseElementSelector,\n\t\t\t\t\t\t\t\t\tELEMENTS[ element ]\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\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\treturn elementCSSRules.length > 0\n\t\t\t? elementCSSRules.join( '' )\n\t\t\t: undefined;\n\t}, [ baseElementSelector, blockElementStyles, name ] );\n\n\tuseStyleOverride( { css: styles } );\n\n\treturn addSaveProps(\n\t\t{ className: blockElementsContainerIdentifier },\n\t\tname,\n\t\t{ style },\n\t\tskipSerializationPathsEdit\n\t);\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/style/addAttribute',\n\taddAttribute\n);\n"],"mappings":";;;;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAKA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAKA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AAKA,IAAAS,WAAA,GAAAT,OAAA;AAKA,IAAAU,MAAA,GAAAV,OAAA;AAKA,IAAAW,OAAA,GAAAX,OAAA;AACA,IAAAY,iBAAA,GAAAZ,OAAA;AAAuE,IAAAa,WAAA,GAAAb,OAAA;AAnCvE;AACA;AACA;;AAWA;AACA;AACA;;AAsBA,MAAMc,gBAAgB,GAAG,CACxB,GAAGC,mCAAuB,EAC1BC,0BAAkB,EAClBC,wBAAiB,EACjBC,kCAAsB,EAC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CAC/DA,+BAAmB,CACnB;EACD,CAAE,GAAIC,0BAAkB,kCAAmC,GAAI,CAC9DA,0BAAkB;AAEpB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMsB,0BAA0B,GAAG;EAClC,GAAGF,0BAA0B;EAC7B,CAAE,GAAIvB,kCAAsB,cAAe,GAAI,CAC9C,GAAIA,kCAAsB,cAAe,CACzC;EAAE;EACH,CAAE,GAAIC,kCAAsB,EAAG,GAAI,CAAEA,kCAAsB,CAAE,CAAE;AAChE,CAAC;AAED,MAAMyB,gCAAgC,GAAG;EACxC,CAAE,GAAI1B,kCAAsB,cAAe,GAAI,IAAI;EACnD,CAAE,GAAIC,kCAAsB,EAAG,GAAI;AACpC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM0B,eAAe,GAAG;EAAEC,SAAS,EAAE;AAAW,CAAC;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,SAASA,CAAEV,KAAK,EAAEW,KAAK,EAAEC,iBAAiB,GAAG,KAAK,EAAG;EACpE,IAAK,CAAEZ,KAAK,EAAG;IACd,OAAOA,KAAK;EACb;EAEA,IAAIa,QAAQ,GAAGb,KAAK;EACpB,IAAK,CAAEY,iBAAiB,E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Aa,EACtBP,mBAAmB,EACnBQ,+BAAQ,CAAEI,OAAO,CAClB;YACD,CAAE,CACH,CAAC;UACF;QACD,CAAE,CAAC;MACJ;IACD,CAAE,CAAC;IAEH,OAAOT,eAAe,CAAClD,MAAM,GAAG,CAAC,GAC9BkD,eAAe,CAACU,IAAI,CAAE,EAAG,CAAC,GAC1BC,SAAS;EACb,CAAC,EAAE,CAAEd,mBAAmB,EAAEC,kBAAkB,EAAEjC,IAAI,CAAG,CAAC;EAEtD,IAAA+C,uBAAgB,EAAE;IAAEC,GAAG,EAAE7F;EAAO,CAAE,CAAC;EAEnC,OAAOiC,YAAY,CAClB;IAAE6D,SAAS,EAAEnB;EAAiC,CAAC,EAC/C9B,IAAI,EACJ;IAAEpC;EAAM,CAAC,EACTI,0BACD,CAAC;AACF;AAEA,IAAAkF,gBAAS,EACR,0BAA0B,EAC1B,yBAAyB,EACzBzF,YACD,CAAC","ignoreList":[]}
@@ -15,20 +15,20 @@ var _element = require("@wordpress/element");
15
15
 
16
16
  const ALIGN_SUPPORT_KEY = 'align';
17
17
  const ALIGN_WIDE_SUPPORT_KEY = 'alignWide';
18
- const BORDER_SUPPORT_KEY = 'border';
18
+ const BORDER_SUPPORT_KEY = '__experimentalBorder';
19
19
  const COLOR_SUPPORT_KEY = 'color';
20
20
  const CUSTOM_CLASS_NAME_SUPPORT_KEY = 'customClassName';
21
- const FONT_FAMILY_SUPPORT_KEY = 'typography.fontFamily';
21
+ const FONT_FAMILY_SUPPORT_KEY = 'typography.__experimentalFontFamily';
22
22
  const FONT_SIZE_SUPPORT_KEY = 'typography.fontSize';
23
23
  const LINE_HEIGHT_SUPPORT_KEY = 'typography.lineHeight';
24
24
  /**
25
25
  * Key within block settings' support array indicating support for font style.
26
26
  */
27
- const FONT_STYLE_SUPPORT_KEY = 'typography.fontStyle';
27
+ const FONT_STYLE_SUPPORT_KEY = 'typography.__experimentalFontStyle';
28
28
  /**
29
29
  * Key within block settings' support array indicating support for font weight.
30
30
  */
31
- const FONT_WEIGHT_SUPPORT_KEY = 'typography.fontWeight';
31
+ const FONT_WEIGHT_SUPPORT_KEY = 'typography.__experimentalFontWeight';
32
32
  /**
33
33
  * Key within block settings' supports array indicating support for text
34
34
  * align e.g. settings found in `block.json`.
@@ -43,7 +43,7 @@ const TEXT_COLUMNS_SUPPORT_KEY = 'typography.textColumns';
43
43
  * Key within block settings' supports array indicating support for text
44
44
  * decorations e.g. settings found in `block.json`.
45
45
  */
46
- const TEXT_DECORATION_SUPPORT_KEY = 'typography.textDecoration';
46
+ const TEXT_DECORATION_SUPPORT_KEY = 'typography.__experimentalTextDecoration';
47
47
  /**
48
48
  * Key within block settings' supports array indicating support for writing mode
49
49
  * e.g. settings found in `block.json`.
@@ -53,13 +53,13 @@ const WRITING_MODE_SUPPORT_KEY = 'typography.__experimentalWritingMode';
53
53
  * Key within block settings' supports array indicating support for text
54
54
  * transforms e.g. settings found in `block.json`.
55
55
  */
56
- const TEXT_TRANSFORM_SUPPORT_KEY = 'typography.textTransform';
56
+ const TEXT_TRANSFORM_SUPPORT_KEY = 'typography.__experimentalTextTransform';
57
57
 
58
58
  /**
59
59
  * Key within block settings' supports array indicating support for letter-spacing
60
60
  * e.g. settings found in `block.json`.
61
61
  */
62
- const LETTER_SPACING_SUPPORT_KEY = 'typography.letterSpacing';
62
+ const LETTER_SPACING_SUPPORT_KEY = 'typography.__experimentalLetterSpacing';
63
63
  const LAYOUT_SUPPORT_KEY = 'layout';
64
64
  const TYPOGRAPHY_SUPPORT_KEYS = [LINE_HEIGHT_SUPPORT_KEY, FONT_SIZE_SUPPORT_KEY, FONT_STYLE_SUPPORT_KEY, FONT_WEIGHT_SUPPORT_KEY, FONT_FAMILY_SUPPORT_KEY, TEXT_ALIGN_SUPPORT_KEY, TEXT_COLUMNS_SUPPORT_KEY, TEXT_DECORATION_SUPPORT_KEY, TEXT_TRANSFORM_SUPPORT_KEY, WRITING_MODE_SUPPORT_KEY, LETTER_SPACING_SUPPORT_KEY];
65
65
  const EFFECTS_SUPPORT_KEYS = ['shadow'];
@@ -1 +1 @@
1
- {"version":3,"names":["_blocks","require","_element","ALIGN_SUPPORT_KEY","ALIGN_WIDE_SUPPORT_KEY","BORDER_SUPPORT_KEY","COLOR_SUPPORT_KEY","CUSTOM_CLASS_NAME_SUPPORT_KEY","FONT_FAMILY_SUPPORT_KEY","FONT_SIZE_SUPPORT_KEY","LINE_HEIGHT_SUPPORT_KEY","FONT_STYLE_SUPPORT_KEY","FONT_WEIGHT_SUPPORT_KEY","TEXT_ALIGN_SUPPORT_KEY","TEXT_COLUMNS_SUPPORT_KEY","TEXT_DECORATION_SUPPORT_KEY","WRITING_MODE_SUPPORT_KEY","TEXT_TRANSFORM_SUPPORT_KEY","LETTER_SPACING_SUPPORT_KEY","LAYOUT_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEYS","EFFECTS_SUPPORT_KEYS","SPACING_SUPPORT_KEY","styleSupportKeys","hasAlignSupport","nameOrType","hasBlockSupport","exports","getAlignSupport","getBlockSupport","hasAlignWideSupport","getAlignWideSupport","hasBorderSupport","feature","Platform","OS","support","color","radius","width","style","getBorderSupport","hasColorSupport","colorSupport","link","gradient","background","text","hasLinkColorSupport","hasGradientSupport","gradients","hasBackgroundColorSupport","hasTextAlignSupport","getTextAlignSupport","hasTextColorSupport","getColorSupport","hasCustomClassNameSupport","getCustomClassNameSupport","hasFontFamilySupport","getFontFamilySupport","hasFontSizeSupport","getFontSizeSupport","hasLayoutSupport","getLayoutSupport","hasStyleSupport","some","key"],"sources":["@wordpress/block-editor/src/hooks/supports.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { Platform } from '@wordpress/element';\n\nconst ALIGN_SUPPORT_KEY = 'align';\nconst ALIGN_WIDE_SUPPORT_KEY = 'alignWide';\nconst BORDER_SUPPORT_KEY = 'border';\nconst COLOR_SUPPORT_KEY = 'color';\nconst CUSTOM_CLASS_NAME_SUPPORT_KEY = 'customClassName';\nconst FONT_FAMILY_SUPPORT_KEY = 'typography.fontFamily';\nconst FONT_SIZE_SUPPORT_KEY = 'typography.fontSize';\nconst LINE_HEIGHT_SUPPORT_KEY = 'typography.lineHeight';\n/**\n * Key within block settings' support array indicating support for font style.\n */\nconst FONT_STYLE_SUPPORT_KEY = 'typography.fontStyle';\n/**\n * Key within block settings' support array indicating support for font weight.\n */\nconst FONT_WEIGHT_SUPPORT_KEY = 'typography.fontWeight';\n/**\n * Key within block settings' supports array indicating support for text\n * align e.g. settings found in `block.json`.\n */\nconst TEXT_ALIGN_SUPPORT_KEY = 'typography.textAlign';\n/**\n * Key within block settings' supports array indicating support for text\n * columns e.g. settings found in `block.json`.\n */\nconst TEXT_COLUMNS_SUPPORT_KEY = 'typography.textColumns';\n/**\n * Key within block settings' supports array indicating support for text\n * decorations e.g. settings found in `block.json`.\n */\nconst TEXT_DECORATION_SUPPORT_KEY = 'typography.textDecoration';\n/**\n * Key within block settings' supports array indicating support for writing mode\n * e.g. settings found in `block.json`.\n */\nconst WRITING_MODE_SUPPORT_KEY = 'typography.__experimentalWritingMode';\n/**\n * Key within block settings' supports array indicating support for text\n * transforms e.g. settings found in `block.json`.\n */\nconst TEXT_TRANSFORM_SUPPORT_KEY = 'typography.textTransform';\n\n/**\n * Key within block settings' supports array indicating support for letter-spacing\n * e.g. settings found in `block.json`.\n */\nconst LETTER_SPACING_SUPPORT_KEY = 'typography.letterSpacing';\nconst LAYOUT_SUPPORT_KEY = 'layout';\nconst TYPOGRAPHY_SUPPORT_KEYS = [\n\tLINE_HEIGHT_SUPPORT_KEY,\n\tFONT_SIZE_SUPPORT_KEY,\n\tFONT_STYLE_SUPPORT_KEY,\n\tFONT_WEIGHT_SUPPORT_KEY,\n\tFONT_FAMILY_SUPPORT_KEY,\n\tTEXT_ALIGN_SUPPORT_KEY,\n\tTEXT_COLUMNS_SUPPORT_KEY,\n\tTEXT_DECORATION_SUPPORT_KEY,\n\tTEXT_TRANSFORM_SUPPORT_KEY,\n\tWRITING_MODE_SUPPORT_KEY,\n\tLETTER_SPACING_SUPPORT_KEY,\n];\nconst EFFECTS_SUPPORT_KEYS = [ 'shadow' ];\nconst SPACING_SUPPORT_KEY = 'spacing';\nconst styleSupportKeys = [\n\t...EFFECTS_SUPPORT_KEYS,\n\t...TYPOGRAPHY_SUPPORT_KEYS,\n\tBORDER_SUPPORT_KEY,\n\tCOLOR_SUPPORT_KEY,\n\tSPACING_SUPPORT_KEY,\n];\n\n/**\n * Returns true if the block defines support for align.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasAlignSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, ALIGN_SUPPORT_KEY );\n\n/**\n * Returns the block support value for align, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getAlignSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, ALIGN_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for align wide.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasAlignWideSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, ALIGN_WIDE_SUPPORT_KEY );\n\n/**\n * Returns the block support value for align wide, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getAlignWideSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, ALIGN_WIDE_SUPPORT_KEY );\n\n/**\n * Determine whether there is block support for border properties.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @param {string} feature Border feature to check support for.\n *\n * @return {boolean} Whether there is support.\n */\nexport function hasBorderSupport( nameOrType, feature = 'any' ) {\n\tif ( Platform.OS !== 'web' ) {\n\t\treturn false;\n\t}\n\n\tconst support = getBlockSupport( nameOrType, BORDER_SUPPORT_KEY );\n\n\tif ( support === true ) {\n\t\treturn true;\n\t}\n\n\tif ( feature === 'any' ) {\n\t\treturn !! (\n\t\t\tsupport?.color ||\n\t\t\tsupport?.radius ||\n\t\t\tsupport?.width ||\n\t\t\tsupport?.style\n\t\t);\n\t}\n\n\treturn !! support?.[ feature ];\n}\n\n/**\n * Get block support for border properties.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @param {string} feature Border feature to get.\n *\n * @return {unknown} The block support.\n */\nexport const getBorderSupport = ( nameOrType, feature ) =>\n\tgetBlockSupport( nameOrType, [ BORDER_SUPPORT_KEY, feature ] );\n\n/**\n * Returns true if the block defines support for color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasColorSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\treturn (\n\t\tcolorSupport &&\n\t\t( colorSupport.link === true ||\n\t\t\tcolorSupport.gradient === true ||\n\t\t\tcolorSupport.background !== false ||\n\t\t\tcolorSupport.text !== false )\n\t);\n};\n\n/**\n * Returns true if the block defines support for link color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasLinkColorSupport = ( nameOrType ) => {\n\tif ( Platform.OS !== 'web' ) {\n\t\treturn false;\n\t}\n\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn (\n\t\tcolorSupport !== null &&\n\t\ttypeof colorSupport === 'object' &&\n\t\t!! colorSupport.link\n\t);\n};\n\n/**\n * Returns true if the block defines support for gradient color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasGradientSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn (\n\t\tcolorSupport !== null &&\n\t\ttypeof colorSupport === 'object' &&\n\t\t!! colorSupport.gradients\n\t);\n};\n\n/**\n * Returns true if the block defines support for background color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasBackgroundColorSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn colorSupport && colorSupport.background !== false;\n};\n\n/**\n * Returns true if the block defines support for text-align.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasTextAlignSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, TEXT_ALIGN_SUPPORT_KEY );\n\n/**\n * Returns the block support value for text-align, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getTextAlignSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, TEXT_ALIGN_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for background color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasTextColorSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn colorSupport && colorSupport.text !== false;\n};\n\n/**\n * Get block support for color properties.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @param {string} feature Color feature to get.\n *\n * @return {unknown} The block support.\n */\nexport const getColorSupport = ( nameOrType, feature ) =>\n\tgetBlockSupport( nameOrType, [ COLOR_SUPPORT_KEY, feature ] );\n\n/**\n * Returns true if the block defines support for custom class name.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasCustomClassNameSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, CUSTOM_CLASS_NAME_SUPPORT_KEY, true );\n\n/**\n * Returns the block support value for custom class name, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getCustomClassNameSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, CUSTOM_CLASS_NAME_SUPPORT_KEY, true );\n\n/**\n * Returns true if the block defines support for font family.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasFontFamilySupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, FONT_FAMILY_SUPPORT_KEY );\n\n/**\n * Returns the block support value for font family, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getFontFamilySupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, FONT_FAMILY_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for font size.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasFontSizeSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, FONT_SIZE_SUPPORT_KEY );\n\n/**\n * Returns the block support value for font size, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getFontSizeSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, FONT_SIZE_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for layout.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasLayoutSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, LAYOUT_SUPPORT_KEY );\n\n/**\n * Returns the block support value for layout, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getLayoutSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, LAYOUT_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for style.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasStyleSupport = ( nameOrType ) =>\n\tstyleSupportKeys.some( ( key ) => hasBlockSupport( nameOrType, key ) );\n"],"mappings":";;;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAJA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A,gBAAA;AAMO,MAAMC,eAAe,GAAKvC,UAAU,IAC1CF,gBAAgB,CAAC0C,IAAI,CAAIC,GAAG,IAAM,IAAAxC,uBAAe,EAAED,UAAU,EAAEyC,GAAI,CAAE,CAAC;AAACvC,OAAA,CAAAqC,eAAA,GAAAA,eAAA","ignoreList":[]}
1
+ {"version":3,"names":["_blocks","require","_element","ALIGN_SUPPORT_KEY","ALIGN_WIDE_SUPPORT_KEY","BORDER_SUPPORT_KEY","COLOR_SUPPORT_KEY","CUSTOM_CLASS_NAME_SUPPORT_KEY","FONT_FAMILY_SUPPORT_KEY","FONT_SIZE_SUPPORT_KEY","LINE_HEIGHT_SUPPORT_KEY","FONT_STYLE_SUPPORT_KEY","FONT_WEIGHT_SUPPORT_KEY","TEXT_ALIGN_SUPPORT_KEY","TEXT_COLUMNS_SUPPORT_KEY","TEXT_DECORATION_SUPPORT_KEY","WRITING_MODE_SUPPORT_KEY","TEXT_TRANSFORM_SUPPORT_KEY","LETTER_SPACING_SUPPORT_KEY","LAYOUT_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEYS","EFFECTS_SUPPORT_KEYS","SPACING_SUPPORT_KEY","styleSupportKeys","hasAlignSupport","nameOrType","hasBlockSupport","exports","getAlignSupport","getBlockSupport","hasAlignWideSupport","getAlignWideSupport","hasBorderSupport","feature","Platform","OS","support","color","radius","width","style","getBorderSupport","hasColorSupport","colorSupport","link","gradient","background","text","hasLinkColorSupport","hasGradientSupport","gradients","hasBackgroundColorSupport","hasTextAlignSupport","getTextAlignSupport","hasTextColorSupport","getColorSupport","hasCustomClassNameSupport","getCustomClassNameSupport","hasFontFamilySupport","getFontFamilySupport","hasFontSizeSupport","getFontSizeSupport","hasLayoutSupport","getLayoutSupport","hasStyleSupport","some","key"],"sources":["@wordpress/block-editor/src/hooks/supports.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { Platform } from '@wordpress/element';\n\nconst ALIGN_SUPPORT_KEY = 'align';\nconst ALIGN_WIDE_SUPPORT_KEY = 'alignWide';\nconst BORDER_SUPPORT_KEY = '__experimentalBorder';\nconst COLOR_SUPPORT_KEY = 'color';\nconst CUSTOM_CLASS_NAME_SUPPORT_KEY = 'customClassName';\nconst FONT_FAMILY_SUPPORT_KEY = 'typography.__experimentalFontFamily';\nconst FONT_SIZE_SUPPORT_KEY = 'typography.fontSize';\nconst LINE_HEIGHT_SUPPORT_KEY = 'typography.lineHeight';\n/**\n * Key within block settings' support array indicating support for font style.\n */\nconst FONT_STYLE_SUPPORT_KEY = 'typography.__experimentalFontStyle';\n/**\n * Key within block settings' support array indicating support for font weight.\n */\nconst FONT_WEIGHT_SUPPORT_KEY = 'typography.__experimentalFontWeight';\n/**\n * Key within block settings' supports array indicating support for text\n * align e.g. settings found in `block.json`.\n */\nconst TEXT_ALIGN_SUPPORT_KEY = 'typography.textAlign';\n/**\n * Key within block settings' supports array indicating support for text\n * columns e.g. settings found in `block.json`.\n */\nconst TEXT_COLUMNS_SUPPORT_KEY = 'typography.textColumns';\n/**\n * Key within block settings' supports array indicating support for text\n * decorations e.g. settings found in `block.json`.\n */\nconst TEXT_DECORATION_SUPPORT_KEY = 'typography.__experimentalTextDecoration';\n/**\n * Key within block settings' supports array indicating support for writing mode\n * e.g. settings found in `block.json`.\n */\nconst WRITING_MODE_SUPPORT_KEY = 'typography.__experimentalWritingMode';\n/**\n * Key within block settings' supports array indicating support for text\n * transforms e.g. settings found in `block.json`.\n */\nconst TEXT_TRANSFORM_SUPPORT_KEY = 'typography.__experimentalTextTransform';\n\n/**\n * Key within block settings' supports array indicating support for letter-spacing\n * e.g. settings found in `block.json`.\n */\nconst LETTER_SPACING_SUPPORT_KEY = 'typography.__experimentalLetterSpacing';\nconst LAYOUT_SUPPORT_KEY = 'layout';\nconst TYPOGRAPHY_SUPPORT_KEYS = [\n\tLINE_HEIGHT_SUPPORT_KEY,\n\tFONT_SIZE_SUPPORT_KEY,\n\tFONT_STYLE_SUPPORT_KEY,\n\tFONT_WEIGHT_SUPPORT_KEY,\n\tFONT_FAMILY_SUPPORT_KEY,\n\tTEXT_ALIGN_SUPPORT_KEY,\n\tTEXT_COLUMNS_SUPPORT_KEY,\n\tTEXT_DECORATION_SUPPORT_KEY,\n\tTEXT_TRANSFORM_SUPPORT_KEY,\n\tWRITING_MODE_SUPPORT_KEY,\n\tLETTER_SPACING_SUPPORT_KEY,\n];\nconst EFFECTS_SUPPORT_KEYS = [ 'shadow' ];\nconst SPACING_SUPPORT_KEY = 'spacing';\nconst styleSupportKeys = [\n\t...EFFECTS_SUPPORT_KEYS,\n\t...TYPOGRAPHY_SUPPORT_KEYS,\n\tBORDER_SUPPORT_KEY,\n\tCOLOR_SUPPORT_KEY,\n\tSPACING_SUPPORT_KEY,\n];\n\n/**\n * Returns true if the block defines support for align.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasAlignSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, ALIGN_SUPPORT_KEY );\n\n/**\n * Returns the block support value for align, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getAlignSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, ALIGN_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for align wide.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasAlignWideSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, ALIGN_WIDE_SUPPORT_KEY );\n\n/**\n * Returns the block support value for align wide, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getAlignWideSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, ALIGN_WIDE_SUPPORT_KEY );\n\n/**\n * Determine whether there is block support for border properties.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @param {string} feature Border feature to check support for.\n *\n * @return {boolean} Whether there is support.\n */\nexport function hasBorderSupport( nameOrType, feature = 'any' ) {\n\tif ( Platform.OS !== 'web' ) {\n\t\treturn false;\n\t}\n\n\tconst support = getBlockSupport( nameOrType, BORDER_SUPPORT_KEY );\n\n\tif ( support === true ) {\n\t\treturn true;\n\t}\n\n\tif ( feature === 'any' ) {\n\t\treturn !! (\n\t\t\tsupport?.color ||\n\t\t\tsupport?.radius ||\n\t\t\tsupport?.width ||\n\t\t\tsupport?.style\n\t\t);\n\t}\n\n\treturn !! support?.[ feature ];\n}\n\n/**\n * Get block support for border properties.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @param {string} feature Border feature to get.\n *\n * @return {unknown} The block support.\n */\nexport const getBorderSupport = ( nameOrType, feature ) =>\n\tgetBlockSupport( nameOrType, [ BORDER_SUPPORT_KEY, feature ] );\n\n/**\n * Returns true if the block defines support for color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasColorSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\treturn (\n\t\tcolorSupport &&\n\t\t( colorSupport.link === true ||\n\t\t\tcolorSupport.gradient === true ||\n\t\t\tcolorSupport.background !== false ||\n\t\t\tcolorSupport.text !== false )\n\t);\n};\n\n/**\n * Returns true if the block defines support for link color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasLinkColorSupport = ( nameOrType ) => {\n\tif ( Platform.OS !== 'web' ) {\n\t\treturn false;\n\t}\n\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn (\n\t\tcolorSupport !== null &&\n\t\ttypeof colorSupport === 'object' &&\n\t\t!! colorSupport.link\n\t);\n};\n\n/**\n * Returns true if the block defines support for gradient color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasGradientSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn (\n\t\tcolorSupport !== null &&\n\t\ttypeof colorSupport === 'object' &&\n\t\t!! colorSupport.gradients\n\t);\n};\n\n/**\n * Returns true if the block defines support for background color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasBackgroundColorSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn colorSupport && colorSupport.background !== false;\n};\n\n/**\n * Returns true if the block defines support for text-align.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasTextAlignSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, TEXT_ALIGN_SUPPORT_KEY );\n\n/**\n * Returns the block support value for text-align, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getTextAlignSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, TEXT_ALIGN_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for background color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasTextColorSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn colorSupport && colorSupport.text !== false;\n};\n\n/**\n * Get block support for color properties.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @param {string} feature Color feature to get.\n *\n * @return {unknown} The block support.\n */\nexport const getColorSupport = ( nameOrType, feature ) =>\n\tgetBlockSupport( nameOrType, [ COLOR_SUPPORT_KEY, feature ] );\n\n/**\n * Returns true if the block defines support for custom class name.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasCustomClassNameSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, CUSTOM_CLASS_NAME_SUPPORT_KEY, true );\n\n/**\n * Returns the block support value for custom class name, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getCustomClassNameSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, CUSTOM_CLASS_NAME_SUPPORT_KEY, true );\n\n/**\n * Returns true if the block defines support for font family.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasFontFamilySupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, FONT_FAMILY_SUPPORT_KEY );\n\n/**\n * Returns the block support value for font family, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getFontFamilySupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, FONT_FAMILY_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for font size.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasFontSizeSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, FONT_SIZE_SUPPORT_KEY );\n\n/**\n * Returns the block support value for font size, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getFontSizeSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, FONT_SIZE_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for layout.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasLayoutSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, LAYOUT_SUPPORT_KEY );\n\n/**\n * Returns the block support value for layout, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getLayoutSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, LAYOUT_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for style.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasStyleSupport = ( nameOrType ) =>\n\tstyleSupportKeys.some( ( key ) => hasBlockSupport( nameOrType, key ) );\n"],"mappings":";;;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIA,MAAME,iBAAiB,GAAG,OAAO;AACjC,MAAMC,sBAAsB,GAAG,WAAW;AAC1C,MAAMC,kBAAkB,GAAG,sBAAsB;AACjD,MAAMC,iBAAiB,GAAG,OAAO;AACjC,MAAMC,6BAA6B,GAAG,iBAAiB;AACvD,MAAMC,uBAAuB,GAAG,qCAAqC;AACrE,MAAMC,qBAAqB,GAAG,qBAAqB;AACnD,MAAMC,uBAAuB,GAAG,uBAAuB;AACvD;AACA;AACA;AACA,MAAMC,sBAAsB,GAAG,oCAAoC;AACnE;AACA;AACA;AACA,MAAMC,uBAAuB,GAAG,qCAAqC;AACrE;AACA;AACA;AACA;AACA,MAAMC,sBAAsB,GAAG,sBAAsB;AACrD;AACA;AACA;AACA;AACA,MAAMC,wBAAwB,GAAG,wBAAwB;AACzD;AACA;AACA;AACA;AACA,MAAMC,2BAA2B,GAAG,yCAAyC;AAC7E;AACA;AACA;AACA;AACA,MAAMC,wBAAwB,GAAG,sCAAsC;AACvE;AACA;AACA;AACA;AACA,MAAMC,0BAA0B,GAAG,wCAAwC;;AAE3E;AACA;AACA;AACA;AACA,MAAMC,0BAA0B,GAAG,wCAAwC;AAC3E,MAAMC,kBAAkB,GAAG,QAAQ;AACnC,MAAMC,uBAAuB,GAAG,CAC/BV,uBAAuB,EACvBD,qBAAqB,EACrBE,sBAAsB,EACtBC,uBAAuB,EACvBJ,uBAAuB,EACvBK,sBAAsB,EACtBC,wBAAwB,EACxBC,2BAA2B,EAC3BE,0BAA0B,EAC1BD,wBAAwB,EACxBE,0BAA0B,CAC1B;AACD,MAAMG,oBAAoB,GAAG,CAAE,QAAQ,CAAE;AACzC,MAA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AQ,OAAA,CAAAmC,gBAAA,GAAAA,gBAAA;AAMO,MAAMC,gBAAgB,GAAKtC,UAAU,IAC3C,IAAAI,uBAAe,EAAEJ,UAAU,EAAEN,kBAAmB,CAAC;;AAElD;AACA;AACA;AACA;AACA;AACA;AALAQ,OAAA,CAAAoC,gBAAA,GAAAA,gBAAA;AAMO,MAAMC,eAAe,GAAKvC,UAAU,IAC1CF,gBAAgB,CAAC0C,IAAI,CAAIC,GAAG,IAAM,IAAAxC,uBAAe,EAAED,UAAU,EAAEyC,GAAI,CAAE,CAAC;AAACvC,OAAA,CAAAqC,eAAA,GAAAA,eAAA","ignoreList":[]}
@@ -33,12 +33,12 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
33
33
  function omit(object, keys) {
34
34
  return Object.fromEntries(Object.entries(object).filter(([key]) => !keys.includes(key)));
35
35
  }
36
- const LETTER_SPACING_SUPPORT_KEY = 'typography.letterSpacing';
37
- const TEXT_TRANSFORM_SUPPORT_KEY = 'typography.textTransform';
38
- const TEXT_DECORATION_SUPPORT_KEY = 'typography.textDecoration';
36
+ const LETTER_SPACING_SUPPORT_KEY = 'typography.__experimentalLetterSpacing';
37
+ const TEXT_TRANSFORM_SUPPORT_KEY = 'typography.__experimentalTextTransform';
38
+ const TEXT_DECORATION_SUPPORT_KEY = 'typography.__experimentalTextDecoration';
39
39
  const TEXT_COLUMNS_SUPPORT_KEY = 'typography.textColumns';
40
- const FONT_STYLE_SUPPORT_KEY = 'typography.fontStyle';
41
- const FONT_WEIGHT_SUPPORT_KEY = 'typography.fontWeight';
40
+ const FONT_STYLE_SUPPORT_KEY = 'typography.__experimentalFontStyle';
41
+ const FONT_WEIGHT_SUPPORT_KEY = 'typography.__experimentalFontWeight';
42
42
  const WRITING_MODE_SUPPORT_KEY = 'typography.__experimentalWritingMode';
43
43
  const TYPOGRAPHY_SUPPORT_KEY = exports.TYPOGRAPHY_SUPPORT_KEY = 'typography';
44
44
  const TYPOGRAPHY_SUPPORT_KEYS = exports.TYPOGRAPHY_SUPPORT_KEYS = [_lineHeight.LINE_HEIGHT_SUPPORT_KEY, _fontSize.FONT_SIZE_SUPPORT_KEY, FONT_STYLE_SUPPORT_KEY, FONT_WEIGHT_SUPPORT_KEY, _fontFamily.FONT_FAMILY_SUPPORT_KEY, _textAlign.TEXT_ALIGN_SUPPORT_KEY, TEXT_COLUMNS_SUPPORT_KEY, TEXT_DECORATION_SUPPORT_KEY, WRITING_MODE_SUPPORT_KEY, TEXT_TRANSFORM_SUPPORT_KEY, LETTER_SPACING_SUPPORT_KEY];
@@ -123,7 +123,7 @@ function TypographyPanel({
123
123
  if (!isEnabled) {
124
124
  return null;
125
125
  }
126
- const defaultControls = (0, _blocks.getBlockSupport)(name, [TYPOGRAPHY_SUPPORT_KEY, 'defaultControls']);
126
+ const defaultControls = (0, _blocks.getBlockSupport)(name, [TYPOGRAPHY_SUPPORT_KEY, '__experimentalDefaultControls']);
127
127
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_typographyPanel.default, {
128
128
  as: TypographyInspectorControl,
129
129
  panelId: clientId,
@@ -1 +1 @@
1
- {"version":3,"names":["_blocks","require","_element","_data","_inspectorControls","_interopRequireDefault","_typographyPanel","_interopRequireWildcard","_lineHeight","_fontFamily","_fontSize","_textAlign","_utils","_store","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","omit","object","keys","fromEntries","entries","filter","key","includes","LETTER_SPACING_SUPPORT_KEY","TEXT_TRANSFORM_SUPPORT_KEY","TEXT_DECORATION_SUPPORT_KEY","TEXT_COLUMNS_SUPPORT_KEY","FONT_STYLE_SUPPORT_KEY","FONT_WEIGHT_SUPPORT_KEY","WRITING_MODE_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEY","exports","TYPOGRAPHY_SUPPORT_KEYS","LINE_HEIGHT_SUPPORT_KEY","FONT_SIZE_SUPPORT_KEY","FONT_FAMILY_SUPPORT_KEY","TEXT_ALIGN_SUPPORT_KEY","styleToAttributes","style","updatedStyle","fontSizeValue","typography","fontSize","fontFamilyValue","fontFamily","fontSizeSlug","startsWith","substring","length","undefined","fontFamilySlug","cleanEmptyObject","attributesToStyle","attributes","TypographyInspectorControl","children","resetAllFilter","attributesResetAllFilter","useCallback","existingStyle","jsx","group","TypographyPanel","clientId","name","setAttributes","settings","selector","select","blockEditorStore","getBlockAttributes","useSelect","isEnabled","useHasTypographyPanel","value","useMemo","onChange","newStyle","defaultControls","getBlockSupport","as","panelId","hasTypographySupport","blockName","some","hasBlockSupport"],"sources":["@wordpress/block-editor/src/hooks/typography.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { useMemo, useCallback } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport InspectorControls from '../components/inspector-controls';\nimport {\n\tdefault as StylesTypographyPanel,\n\tuseHasTypographyPanel,\n} from '../components/global-styles/typography-panel';\n\nimport { LINE_HEIGHT_SUPPORT_KEY } from './line-height';\nimport { FONT_FAMILY_SUPPORT_KEY } from './font-family';\nimport { FONT_SIZE_SUPPORT_KEY } from './font-size';\nimport { TEXT_ALIGN_SUPPORT_KEY } from './text-align';\nimport { cleanEmptyObject } from './utils';\nimport { store as blockEditorStore } from '../store';\n\nfunction omit( object, keys ) {\n\treturn Object.fromEntries(\n\t\tObject.entries( object ).filter( ( [ key ] ) => ! keys.includes( key ) )\n\t);\n}\n\nconst LETTER_SPACING_SUPPORT_KEY = 'typography.letterSpacing';\nconst TEXT_TRANSFORM_SUPPORT_KEY = 'typography.textTransform';\nconst TEXT_DECORATION_SUPPORT_KEY = 'typography.textDecoration';\nconst TEXT_COLUMNS_SUPPORT_KEY = 'typography.textColumns';\nconst FONT_STYLE_SUPPORT_KEY = 'typography.fontStyle';\nconst FONT_WEIGHT_SUPPORT_KEY = 'typography.fontWeight';\nconst WRITING_MODE_SUPPORT_KEY = 'typography.__experimentalWritingMode';\nexport const TYPOGRAPHY_SUPPORT_KEY = 'typography';\nexport const TYPOGRAPHY_SUPPORT_KEYS = [\n\tLINE_HEIGHT_SUPPORT_KEY,\n\tFONT_SIZE_SUPPORT_KEY,\n\tFONT_STYLE_SUPPORT_KEY,\n\tFONT_WEIGHT_SUPPORT_KEY,\n\tFONT_FAMILY_SUPPORT_KEY,\n\tTEXT_ALIGN_SUPPORT_KEY,\n\tTEXT_COLUMNS_SUPPORT_KEY,\n\tTEXT_DECORATION_SUPPORT_KEY,\n\tWRITING_MODE_SUPPORT_KEY,\n\tTEXT_TRANSFORM_SUPPORT_KEY,\n\tLETTER_SPACING_SUPPORT_KEY,\n];\n\nfunction styleToAttributes( style ) {\n\tconst updatedStyle = { ...omit( style, [ 'fontFamily' ] ) };\n\tconst fontSizeValue = style?.typography?.fontSize;\n\tconst fontFamilyValue = style?.typography?.fontFamily;\n\tconst fontSizeSlug = fontSizeValue?.startsWith( 'var:preset|font-size|' )\n\t\t? fontSizeValue.substring( 'var:preset|font-size|'.length )\n\t\t: undefined;\n\tconst fontFamilySlug = fontFamilyValue?.startsWith(\n\t\t'var:preset|font-family|'\n\t)\n\t\t? fontFamilyValue.substring( 'var:preset|font-family|'.length )\n\t\t: undefined;\n\tupdatedStyle.typography = {\n\t\t...omit( updatedStyle.typography, [ 'fontFamily' ] ),\n\t\tfontSize: fontSizeSlug ? undefined : fontSizeValue,\n\t};\n\treturn {\n\t\tstyle: cleanEmptyObject( updatedStyle ),\n\t\tfontFamily: fontFamilySlug,\n\t\tfontSize: fontSizeSlug,\n\t};\n}\n\nfunction attributesToStyle( attributes ) {\n\treturn {\n\t\t...attributes.style,\n\t\ttypography: {\n\t\t\t...attributes.style?.typography,\n\t\t\tfontFamily: attributes.fontFamily\n\t\t\t\t? 'var:preset|font-family|' + attributes.fontFamily\n\t\t\t\t: undefined,\n\t\t\tfontSize: attributes.fontSize\n\t\t\t\t? 'var:preset|font-size|' + attributes.fontSize\n\t\t\t\t: attributes.style?.typography?.fontSize,\n\t\t},\n\t};\n}\n\nfunction TypographyInspectorControl( { children, resetAllFilter } ) {\n\tconst attributesResetAllFilter = useCallback(\n\t\t( attributes ) => {\n\t\t\tconst existingStyle = attributesToStyle( attributes );\n\t\t\tconst updatedStyle = resetAllFilter( existingStyle );\n\t\t\treturn {\n\t\t\t\t...attributes,\n\t\t\t\t...styleToAttributes( 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=\"typography\"\n\t\t\tresetAllFilter={ attributesResetAllFilter }\n\t\t>\n\t\t\t{ children }\n\t\t</InspectorControls>\n\t);\n}\n\nexport function TypographyPanel( { clientId, name, setAttributes, settings } ) {\n\tfunction selector( select ) {\n\t\tconst { style, fontFamily, fontSize } =\n\t\t\tselect( blockEditorStore ).getBlockAttributes( clientId ) || {};\n\t\treturn { style, fontFamily, fontSize };\n\t}\n\tconst { style, fontFamily, fontSize } = useSelect( selector, [ clientId ] );\n\tconst isEnabled = useHasTypographyPanel( settings );\n\tconst value = useMemo(\n\t\t() => attributesToStyle( { style, fontFamily, fontSize } ),\n\t\t[ style, fontSize, fontFamily ]\n\t);\n\n\tconst onChange = ( newStyle ) => {\n\t\tsetAttributes( styleToAttributes( newStyle ) );\n\t};\n\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\tconst defaultControls = getBlockSupport( name, [\n\t\tTYPOGRAPHY_SUPPORT_KEY,\n\t\t'defaultControls',\n\t] );\n\n\treturn (\n\t\t<StylesTypographyPanel\n\t\t\tas={ TypographyInspectorControl }\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/>\n\t);\n}\n\nexport const hasTypographySupport = ( blockName ) => {\n\treturn TYPOGRAPH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AAiB,CAAEwC,QAAS,CAAE,CAAC;EAC/C,CAAC;EAED,IAAK,CAAEL,SAAS,EAAG;IAClB,OAAO,IAAI;EACZ;EAEA,MAAMM,eAAe,GAAG,IAAAC,uBAAe,EAAEf,IAAI,EAAE,CAC9ClC,sBAAsB,EACtB,iBAAiB,CAChB,CAAC;EAEH,oBACC,IAAApC,WAAA,CAAAkE,GAAA,EAAC1E,gBAAA,CAAAe,OAAqB;IACrB+E,EAAE,EAAG1B,0BAA4B;IACjC2B,OAAO,EAAGlB,QAAU;IACpBG,QAAQ,EAAGA,QAAU;IACrBQ,KAAK,EAAGA,KAAO;IACfE,QAAQ,EAAGA,QAAU;IACrBE,eAAe,EAAGA;EAAiB,CACnC,CAAC;AAEJ;AAEO,MAAMI,oBAAoB,GAAKC,SAAS,IAAM;EACpD,OAAOnD,uBAAuB,CAACoD,IAAI,CAAI/D,GAAG,IACzC,IAAAgE,uBAAe,EAAEF,SAAS,EAAE9D,GAAI,CACjC,CAAC;AACF,CAAC;AAACU,OAAA,CAAAmD,oBAAA,GAAAA,oBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_blocks","require","_element","_data","_inspectorControls","_interopRequireDefault","_typographyPanel","_interopRequireWildcard","_lineHeight","_fontFamily","_fontSize","_textAlign","_utils","_store","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","omit","object","keys","fromEntries","entries","filter","key","includes","LETTER_SPACING_SUPPORT_KEY","TEXT_TRANSFORM_SUPPORT_KEY","TEXT_DECORATION_SUPPORT_KEY","TEXT_COLUMNS_SUPPORT_KEY","FONT_STYLE_SUPPORT_KEY","FONT_WEIGHT_SUPPORT_KEY","WRITING_MODE_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEY","exports","TYPOGRAPHY_SUPPORT_KEYS","LINE_HEIGHT_SUPPORT_KEY","FONT_SIZE_SUPPORT_KEY","FONT_FAMILY_SUPPORT_KEY","TEXT_ALIGN_SUPPORT_KEY","styleToAttributes","style","updatedStyle","fontSizeValue","typography","fontSize","fontFamilyValue","fontFamily","fontSizeSlug","startsWith","substring","length","undefined","fontFamilySlug","cleanEmptyObject","attributesToStyle","attributes","TypographyInspectorControl","children","resetAllFilter","attributesResetAllFilter","useCallback","existingStyle","jsx","group","TypographyPanel","clientId","name","setAttributes","settings","selector","select","blockEditorStore","getBlockAttributes","useSelect","isEnabled","useHasTypographyPanel","value","useMemo","onChange","newStyle","defaultControls","getBlockSupport","as","panelId","hasTypographySupport","blockName","some","hasBlockSupport"],"sources":["@wordpress/block-editor/src/hooks/typography.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { useMemo, useCallback } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport InspectorControls from '../components/inspector-controls';\nimport {\n\tdefault as StylesTypographyPanel,\n\tuseHasTypographyPanel,\n} from '../components/global-styles/typography-panel';\n\nimport { LINE_HEIGHT_SUPPORT_KEY } from './line-height';\nimport { FONT_FAMILY_SUPPORT_KEY } from './font-family';\nimport { FONT_SIZE_SUPPORT_KEY } from './font-size';\nimport { TEXT_ALIGN_SUPPORT_KEY } from './text-align';\nimport { cleanEmptyObject } from './utils';\nimport { store as blockEditorStore } from '../store';\n\nfunction omit( object, keys ) {\n\treturn Object.fromEntries(\n\t\tObject.entries( object ).filter( ( [ key ] ) => ! keys.includes( key ) )\n\t);\n}\n\nconst LETTER_SPACING_SUPPORT_KEY = 'typography.__experimentalLetterSpacing';\nconst TEXT_TRANSFORM_SUPPORT_KEY = 'typography.__experimentalTextTransform';\nconst TEXT_DECORATION_SUPPORT_KEY = 'typography.__experimentalTextDecoration';\nconst TEXT_COLUMNS_SUPPORT_KEY = 'typography.textColumns';\nconst FONT_STYLE_SUPPORT_KEY = 'typography.__experimentalFontStyle';\nconst FONT_WEIGHT_SUPPORT_KEY = 'typography.__experimentalFontWeight';\nconst WRITING_MODE_SUPPORT_KEY = 'typography.__experimentalWritingMode';\nexport const TYPOGRAPHY_SUPPORT_KEY = 'typography';\nexport const TYPOGRAPHY_SUPPORT_KEYS = [\n\tLINE_HEIGHT_SUPPORT_KEY,\n\tFONT_SIZE_SUPPORT_KEY,\n\tFONT_STYLE_SUPPORT_KEY,\n\tFONT_WEIGHT_SUPPORT_KEY,\n\tFONT_FAMILY_SUPPORT_KEY,\n\tTEXT_ALIGN_SUPPORT_KEY,\n\tTEXT_COLUMNS_SUPPORT_KEY,\n\tTEXT_DECORATION_SUPPORT_KEY,\n\tWRITING_MODE_SUPPORT_KEY,\n\tTEXT_TRANSFORM_SUPPORT_KEY,\n\tLETTER_SPACING_SUPPORT_KEY,\n];\n\nfunction styleToAttributes( style ) {\n\tconst updatedStyle = { ...omit( style, [ 'fontFamily' ] ) };\n\tconst fontSizeValue = style?.typography?.fontSize;\n\tconst fontFamilyValue = style?.typography?.fontFamily;\n\tconst fontSizeSlug = fontSizeValue?.startsWith( 'var:preset|font-size|' )\n\t\t? fontSizeValue.substring( 'var:preset|font-size|'.length )\n\t\t: undefined;\n\tconst fontFamilySlug = fontFamilyValue?.startsWith(\n\t\t'var:preset|font-family|'\n\t)\n\t\t? fontFamilyValue.substring( 'var:preset|font-family|'.length )\n\t\t: undefined;\n\tupdatedStyle.typography = {\n\t\t...omit( updatedStyle.typography, [ 'fontFamily' ] ),\n\t\tfontSize: fontSizeSlug ? undefined : fontSizeValue,\n\t};\n\treturn {\n\t\tstyle: cleanEmptyObject( updatedStyle ),\n\t\tfontFamily: fontFamilySlug,\n\t\tfontSize: fontSizeSlug,\n\t};\n}\n\nfunction attributesToStyle( attributes ) {\n\treturn {\n\t\t...attributes.style,\n\t\ttypography: {\n\t\t\t...attributes.style?.typography,\n\t\t\tfontFamily: attributes.fontFamily\n\t\t\t\t? 'var:preset|font-family|' + attributes.fontFamily\n\t\t\t\t: undefined,\n\t\t\tfontSize: attributes.fontSize\n\t\t\t\t? 'var:preset|font-size|' + attributes.fontSize\n\t\t\t\t: attributes.style?.typography?.fontSize,\n\t\t},\n\t};\n}\n\nfunction TypographyInspectorControl( { children, resetAllFilter } ) {\n\tconst attributesResetAllFilter = useCallback(\n\t\t( attributes ) => {\n\t\t\tconst existingStyle = attributesToStyle( attributes );\n\t\t\tconst updatedStyle = resetAllFilter( existingStyle );\n\t\t\treturn {\n\t\t\t\t...attributes,\n\t\t\t\t...styleToAttributes( 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=\"typography\"\n\t\t\tresetAllFilter={ attributesResetAllFilter }\n\t\t>\n\t\t\t{ children }\n\t\t</InspectorControls>\n\t);\n}\n\nexport function TypographyPanel( { clientId, name, setAttributes, settings } ) {\n\tfunction selector( select ) {\n\t\tconst { style, fontFamily, fontSize } =\n\t\t\tselect( blockEditorStore ).getBlockAttributes( clientId ) || {};\n\t\treturn { style, fontFamily, fontSize };\n\t}\n\tconst { style, fontFamily, fontSize } = useSelect( selector, [ clientId ] );\n\tconst isEnabled = useHasTypographyPanel( settings );\n\tconst value = useMemo(\n\t\t() => attributesToStyle( { style, fontFamily, fontSize } ),\n\t\t[ style, fontSize, fontFamily ]\n\t);\n\n\tconst onChange = ( newStyle ) => {\n\t\tsetAttributes( styleToAttributes( newStyle ) );\n\t};\n\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\tconst defaultControls = getBlockSupport( name, [\n\t\tTYPOGRAPHY_SUPPORT_KEY,\n\t\t'__experimentalDefaultControls',\n\t] );\n\n\treturn (\n\t\t<StylesTypographyPanel\n\t\t\tas={ TypographyInspectorControl }\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/>\n\t);\n}\n\nexport const hasTypographySupport =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AM;IAChCZ,aAAa,CAAE5B,iBAAiB,CAAEwC,QAAS,CAAE,CAAC;EAC/C,CAAC;EAED,IAAK,CAAEL,SAAS,EAAG;IAClB,OAAO,IAAI;EACZ;EAEA,MAAMM,eAAe,GAAG,IAAAC,uBAAe,EAAEf,IAAI,EAAE,CAC9ClC,sBAAsB,EACtB,+BAA+B,CAC9B,CAAC;EAEH,oBACC,IAAApC,WAAA,CAAAkE,GAAA,EAAC1E,gBAAA,CAAAe,OAAqB;IACrB+E,EAAE,EAAG1B,0BAA4B;IACjC2B,OAAO,EAAGlB,QAAU;IACpBG,QAAQ,EAAGA,QAAU;IACrBQ,KAAK,EAAGA,KAAO;IACfE,QAAQ,EAAGA,QAAU;IACrBE,eAAe,EAAGA;EAAiB,CACnC,CAAC;AAEJ;AAEO,MAAMI,oBAAoB,GAAKC,SAAS,IAAM;EACpD,OAAOnD,uBAAuB,CAACoD,IAAI,CAAI/D,GAAG,IACzC,IAAAgE,uBAAe,EAAEF,SAAS,EAAE9D,GAAI,CACjC,CAAC;AACF,CAAC;AAACU,OAAA,CAAAmD,oBAAA,GAAAA,oBAAA","ignoreList":[]}
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
@@ -8,6 +9,7 @@ var _data = require("@wordpress/data");
8
9
  var _element = require("@wordpress/element");
9
10
  var _store = require("../store");
10
11
  var _lockUnlock = require("../lock-unlock");
12
+ var _blockContext = _interopRequireDefault(require("../components/block-context"));
11
13
  /**
12
14
  * WordPress dependencies
13
15
  */
@@ -25,6 +27,9 @@ var _lockUnlock = require("../lock-unlock");
25
27
  * @param {boolean} enabled If we should enter into zoomOut mode or not
26
28
  */
27
29
  function useZoomOut(enabled = true) {
30
+ const {
31
+ postId
32
+ } = (0, _element.useContext)(_blockContext.default);
28
33
  const {
29
34
  setZoomLevel,
30
35
  resetZoomLevel
@@ -48,6 +53,7 @@ function useZoomOut(enabled = true) {
48
53
  }, []);
49
54
  const controlZoomLevelRef = (0, _element.useRef)(false);
50
55
  const isEnabledRef = (0, _element.useRef)(enabled);
56
+ const postIdRef = (0, _element.useRef)(postId);
51
57
 
52
58
  /**
53
59
  * This hook tracks if the zoom state was changed manually by the user via clicking
@@ -64,6 +70,11 @@ function useZoomOut(enabled = true) {
64
70
  }, [isZoomedOut]);
65
71
  (0, _element.useEffect)(() => {
66
72
  isEnabledRef.current = enabled;
73
+
74
+ // If the user created a new post/page, we should take control of the zoom level.
75
+ if (postIdRef.current !== postId) {
76
+ controlZoomLevelRef.current = true;
77
+ }
67
78
  if (enabled !== isZoomOut()) {
68
79
  controlZoomLevelRef.current = true;
69
80
  if (enabled) {
@@ -78,6 +89,6 @@ function useZoomOut(enabled = true) {
78
89
  resetZoomLevel();
79
90
  }
80
91
  };
81
- }, [enabled, isZoomOut, resetZoomLevel, setZoomLevel]);
92
+ }, [enabled, isZoomOut, postId, resetZoomLevel, setZoomLevel]);
82
93
  }
83
94
  //# sourceMappingURL=use-zoom-out.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_element","_store","_lockUnlock","useZoomOut","enabled","setZoomLevel","resetZoomLevel","unlock","useDispatch","blockEditorStore","isZoomedOut","isZoomOut","useSelect","select","_isZoomOut","controlZoomLevelRef","useRef","isEnabledRef","useEffect","current"],"sources":["@wordpress/block-editor/src/hooks/use-zoom-out.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useEffect, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../store';\nimport { unlock } from '../lock-unlock';\n\n/**\n * A hook used to set the editor mode to zoomed out mode, invoking the hook sets the mode.\n * Concepts:\n * - If we most recently changed the zoom level for them (in or out), we always resetZoomLevel() level when unmounting.\n * - If the user most recently changed the zoom level (manually toggling), we do nothing when unmounting.\n *\n * @param {boolean} enabled If we should enter into zoomOut mode or not\n */\nexport function useZoomOut( enabled = true ) {\n\tconst { setZoomLevel, resetZoomLevel } = unlock(\n\t\tuseDispatch( blockEditorStore )\n\t);\n\n\t/**\n\t * We need access to both the value and the function. The value is to trigger a useEffect hook\n\t * and the function is to check zoom out within another hook without triggering a re-render.\n\t */\n\tconst { isZoomedOut, isZoomOut } = useSelect( ( select ) => {\n\t\tconst { isZoomOut: _isZoomOut } = unlock( select( blockEditorStore ) );\n\t\treturn {\n\t\t\tisZoomedOut: _isZoomOut(),\n\t\t\tisZoomOut: _isZoomOut,\n\t\t};\n\t}, [] );\n\n\tconst controlZoomLevelRef = useRef( false );\n\tconst isEnabledRef = useRef( enabled );\n\n\t/**\n\t * This hook tracks if the zoom state was changed manually by the user via clicking\n\t * the zoom out button. We only want this to run when isZoomedOut changes, so we use\n\t * a ref to track the enabled state.\n\t */\n\tuseEffect( () => {\n\t\t// If the zoom state changed (isZoomOut) and it does not match the requested zoom\n\t\t// state (zoomOut), then it means the user manually changed the zoom state while\n\t\t// this hook was mounted, and we should no longer control the zoom state.\n\t\tif ( isZoomedOut !== isEnabledRef.current ) {\n\t\t\tcontrolZoomLevelRef.current = false;\n\t\t}\n\t}, [ isZoomedOut ] );\n\n\tuseEffect( () => {\n\t\tisEnabledRef.current = enabled;\n\n\t\tif ( enabled !== isZoomOut() ) {\n\t\t\tcontrolZoomLevelRef.current = true;\n\n\t\t\tif ( enabled ) {\n\t\t\t\tsetZoomLevel( 'auto-scaled' );\n\t\t\t} else {\n\t\t\t\tresetZoomLevel();\n\t\t\t}\n\t\t}\n\n\t\treturn () => {\n\t\t\t// If we are controlling zoom level and are zoomed out, reset the zoom level.\n\t\t\tif ( controlZoomLevelRef.current && isZoomOut() ) {\n\t\t\t\tresetZoomLevel();\n\t\t\t}\n\t\t};\n\t}, [ enabled, isZoomOut, resetZoomLevel, setZoomLevel ] );\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;A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cAAc,CAAC,CAAC;MACjB;IACD;IAEA,OAAO,MAAM;MACZ;MACA,IAAKS,mBAAmB,CAACI,OAAO,IAAIR,SAAS,CAAC,CAAC,EAAG;QACjDL,cAAc,CAAC,CAAC;MACjB;IACD,CAAC;EACF,CAAC,EAAE,CAAEF,OAAO,EAAEO,SAAS,EAAEL,cAAc,EAAED,YAAY,CAAG,CAAC;AAC1D","ignoreList":[]}
1
+ {"version":3,"names":["_data","require","_element","_store","_lockUnlock","_blockContext","_interopRequireDefault","useZoomOut","enabled","postId","useContext","BlockContext","setZoomLevel","resetZoomLevel","unlock","useDispatch","blockEditorStore","isZoomedOut","isZoomOut","useSelect","select","_isZoomOut","controlZoomLevelRef","useRef","isEnabledRef","postIdRef","useEffect","current"],"sources":["@wordpress/block-editor/src/hooks/use-zoom-out.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useEffect, useRef, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../store';\nimport { unlock } from '../lock-unlock';\nimport BlockContext from '../components/block-context';\n\n/**\n * A hook used to set the editor mode to zoomed out mode, invoking the hook sets the mode.\n * Concepts:\n * - If we most recently changed the zoom level for them (in or out), we always resetZoomLevel() level when unmounting.\n * - If the user most recently changed the zoom level (manually toggling), we do nothing when unmounting.\n *\n * @param {boolean} enabled If we should enter into zoomOut mode or not\n */\nexport function useZoomOut( enabled = true ) {\n\tconst { postId } = useContext( BlockContext );\n\tconst { setZoomLevel, resetZoomLevel } = unlock(\n\t\tuseDispatch( blockEditorStore )\n\t);\n\n\t/**\n\t * We need access to both the value and the function. The value is to trigger a useEffect hook\n\t * and the function is to check zoom out within another hook without triggering a re-render.\n\t */\n\tconst { isZoomedOut, isZoomOut } = useSelect( ( select ) => {\n\t\tconst { isZoomOut: _isZoomOut } = unlock( select( blockEditorStore ) );\n\t\treturn {\n\t\t\tisZoomedOut: _isZoomOut(),\n\t\t\tisZoomOut: _isZoomOut,\n\t\t};\n\t}, [] );\n\n\tconst controlZoomLevelRef = useRef( false );\n\tconst isEnabledRef = useRef( enabled );\n\tconst postIdRef = useRef( postId );\n\n\t/**\n\t * This hook tracks if the zoom state was changed manually by the user via clicking\n\t * the zoom out button. We only want this to run when isZoomedOut changes, so we use\n\t * a ref to track the enabled state.\n\t */\n\tuseEffect( () => {\n\t\t// If the zoom state changed (isZoomOut) and it does not match the requested zoom\n\t\t// state (zoomOut), then it means the user manually changed the zoom state while\n\t\t// this hook was mounted, and we should no longer control the zoom state.\n\t\tif ( isZoomedOut !== isEnabledRef.current ) {\n\t\t\tcontrolZoomLevelRef.current = false;\n\t\t}\n\t}, [ isZoomedOut ] );\n\n\tuseEffect( () => {\n\t\tisEnabledRef.current = enabled;\n\n\t\t// If the user created a new post/page, we should take control of the zoom level.\n\t\tif ( postIdRef.current !== postId ) {\n\t\t\tcontrolZoomLevelRef.current = true;\n\t\t}\n\n\t\tif ( enabled !== isZoomOut() ) {\n\t\t\tcontrolZoomLevelRef.current = true;\n\n\t\t\tif ( enabled ) {\n\t\t\t\tsetZoomLevel( 'auto-scaled' );\n\t\t\t} else {\n\t\t\t\tresetZoomLevel();\n\t\t\t}\n\t\t}\n\n\t\treturn () => {\n\t\t\t// If we are controlling zoom level and are zoomed out, reset the zoom level.\n\t\t\tif ( controlZoomLevelRef.current && isZoomOut() ) {\n\t\t\t\tresetZoomLevel();\n\t\t\t}\n\t\t};\n\t}, [ enabled, isZoomOut, postId, resetZoomLevel, setZoomLevel ] );\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAC,sBAAA,CAAAL,OAAA;AAXA;AACA;AACA;;AAIA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS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,EAAG;QACdI,YAAY,CAAE,aAAc,CAAC;MAC9B,CAAC,MAAM;QACNC,cAAc,CAAC,CAAC;MACjB;IACD;IAEA,OAAO,MAAM;MACZ;MACA,IAAKS,mBAAmB,CAACK,OAAO,IAAIT,SAAS,CAAC,CAAC,EAAG;QACjDL,cAAc,CAAC,CAAC;MACjB;IACD,CAAC;EACF,CAAC,EAAE,CAAEL,OAAO,EAAEU,SAAS,EAAET,MAAM,EAAEI,cAAc,EAAED,YAAY,CAAG,CAAC;AAClE","ignoreList":[]}
@@ -107,7 +107,7 @@ function transformStyles(activeSupports, migrationPaths, result, source, index,
107
107
  */
108
108
  function shouldSkipSerialization(blockNameOrType, featureSet, feature) {
109
109
  const support = (0, _blocks.getBlockSupport)(blockNameOrType, featureSet);
110
- const skipSerialization = support?.skipSerialization;
110
+ const skipSerialization = support?.__experimentalSkipSerialization;
111
111
  if (Array.isArray(skipSerialization)) {
112
112
  return skipSerialization.includes(feature);
113
113
  }