@wordpress/block-editor 14.8.1-next.cd6172eb0.0 → 14.9.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 (954) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +8 -0
  3. package/build/autocompleters/block.js +1 -0
  4. package/build/autocompleters/block.js.map +1 -1
  5. package/build/autocompleters/link.js +1 -0
  6. package/build/autocompleters/link.js.map +1 -1
  7. package/build/components/alignment-control/ui.js +1 -0
  8. package/build/components/alignment-control/ui.js.map +1 -1
  9. package/build/components/autocomplete/index.js +1 -0
  10. package/build/components/autocomplete/index.js.map +1 -1
  11. package/build/components/background-image-control/index.js +1 -0
  12. package/build/components/background-image-control/index.js.map +1 -1
  13. package/build/components/block-actions/index.js +1 -0
  14. package/build/components/block-actions/index.js.map +1 -1
  15. package/build/components/block-alignment-control/ui.js +1 -0
  16. package/build/components/block-alignment-control/ui.js.map +1 -1
  17. package/build/components/block-alignment-control/ui.native.js +1 -0
  18. package/build/components/block-alignment-control/ui.native.js.map +1 -1
  19. package/build/components/block-alignment-control/use-available-alignments.js +1 -0
  20. package/build/components/block-alignment-control/use-available-alignments.js.map +1 -1
  21. package/build/components/block-breadcrumb/index.js +1 -0
  22. package/build/components/block-breadcrumb/index.js.map +1 -1
  23. package/build/components/block-compare/index.js +1 -0
  24. package/build/components/block-compare/index.js.map +1 -1
  25. package/build/components/block-controls/fill.js +1 -0
  26. package/build/components/block-controls/fill.js.map +1 -1
  27. package/build/components/block-edit/edit.js +1 -0
  28. package/build/components/block-edit/edit.js.map +1 -1
  29. package/build/components/block-edit/edit.native.js +1 -0
  30. package/build/components/block-edit/edit.native.js.map +1 -1
  31. package/build/components/block-heading-level-dropdown/index.js +1 -0
  32. package/build/components/block-heading-level-dropdown/index.js.map +1 -1
  33. package/build/components/block-heading-level-dropdown/index.native.js +1 -0
  34. package/build/components/block-heading-level-dropdown/index.native.js.map +1 -1
  35. package/build/components/block-inspector/index.js +1 -0
  36. package/build/components/block-inspector/index.js.map +1 -1
  37. package/build/components/block-list/block-invalid-warning.js +1 -0
  38. package/build/components/block-list/block-invalid-warning.js.map +1 -1
  39. package/build/components/block-list/block-list-context.native.js +1 -0
  40. package/build/components/block-list/block-list-context.native.js.map +1 -1
  41. package/build/components/block-list/block.js +1 -0
  42. package/build/components/block-list/block.js.map +1 -1
  43. package/build/components/block-list/block.native.js +1 -0
  44. package/build/components/block-list/block.native.js.map +1 -1
  45. package/build/components/block-list/index.js +1 -0
  46. package/build/components/block-list/index.js.map +1 -1
  47. package/build/components/block-list/index.native.js +1 -0
  48. package/build/components/block-list/index.native.js.map +1 -1
  49. package/build/components/block-list/use-block-props/index.js +2 -3
  50. package/build/components/block-list/use-block-props/index.js.map +1 -1
  51. package/build/components/block-list/use-block-props/use-firefox-draggable-compatibility.js +61 -8
  52. package/build/components/block-list/use-block-props/use-firefox-draggable-compatibility.js.map +1 -1
  53. package/build/components/block-list/use-block-props/use-focus-first-element.js +1 -0
  54. package/build/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  55. package/build/components/block-list/use-in-between-inserter.js +1 -0
  56. package/build/components/block-list/use-in-between-inserter.js.map +1 -1
  57. package/build/components/block-lock/modal.js +5 -4
  58. package/build/components/block-lock/modal.js.map +1 -1
  59. package/build/components/block-manager/category.js +1 -0
  60. package/build/components/block-manager/category.js.map +1 -1
  61. package/build/components/block-manager/checklist.js +1 -0
  62. package/build/components/block-manager/checklist.js.map +1 -1
  63. package/build/components/block-manager/index.js +1 -0
  64. package/build/components/block-manager/index.js.map +1 -1
  65. package/build/components/block-media-update-progress/index.native.js +1 -0
  66. package/build/components/block-media-update-progress/index.native.js.map +1 -1
  67. package/build/components/block-mover/index.native.js +1 -0
  68. package/build/components/block-mover/index.native.js.map +1 -1
  69. package/build/components/block-mover/mover-description.native.js +1 -0
  70. package/build/components/block-mover/mover-description.native.js.map +1 -1
  71. package/build/components/block-parent-selector/index.js +2 -15
  72. package/build/components/block-parent-selector/index.js.map +1 -1
  73. package/build/components/block-pattern-setup/index.js +1 -0
  74. package/build/components/block-pattern-setup/index.js.map +1 -1
  75. package/build/components/block-pattern-setup/use-patterns-setup.js +1 -0
  76. package/build/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
  77. package/build/components/block-patterns-list/index.js +1 -0
  78. package/build/components/block-patterns-list/index.js.map +1 -1
  79. package/build/components/block-quick-navigation/index.js +1 -0
  80. package/build/components/block-quick-navigation/index.js.map +1 -1
  81. package/build/components/block-rename/rename-control.js +1 -0
  82. package/build/components/block-rename/rename-control.js.map +1 -1
  83. package/build/components/block-settings-menu/block-settings-dropdown.js +1 -0
  84. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  85. package/build/components/block-styles/index.js +1 -0
  86. package/build/components/block-styles/index.js.map +1 -1
  87. package/build/components/block-styles/index.native.js +1 -0
  88. package/build/components/block-styles/index.native.js.map +1 -1
  89. package/build/components/block-styles/menu-items.js +1 -0
  90. package/build/components/block-styles/menu-items.js.map +1 -1
  91. package/build/components/block-styles/preview.native.js +1 -0
  92. package/build/components/block-styles/preview.native.js.map +1 -1
  93. package/build/components/block-switcher/block-transformations-menu.js +1 -0
  94. package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
  95. package/build/components/block-switcher/block-transformations-menu.native.js +1 -0
  96. package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  97. package/build/components/block-switcher/block-variation-transformations.js +1 -0
  98. package/build/components/block-switcher/block-variation-transformations.js.map +1 -1
  99. package/build/components/block-switcher/index.js +1 -0
  100. package/build/components/block-switcher/index.js.map +1 -1
  101. package/build/components/block-switcher/pattern-transformations-menu.js +1 -0
  102. package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  103. package/build/components/block-switcher/use-transformed-patterns.js +1 -0
  104. package/build/components/block-switcher/use-transformed-patterns.js.map +1 -1
  105. package/build/components/block-switcher/utils.js +1 -0
  106. package/build/components/block-switcher/utils.js.map +1 -1
  107. package/build/components/block-toolbar/block-toolbar-menu.native.js +1 -0
  108. package/build/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  109. package/build/components/block-toolbar/change-design.js +1 -0
  110. package/build/components/block-toolbar/change-design.js.map +1 -1
  111. package/build/components/block-toolbar/index.js +2 -1
  112. package/build/components/block-toolbar/index.js.map +1 -1
  113. package/build/components/block-tools/use-selected-block-tool-props.js +1 -0
  114. package/build/components/block-tools/use-selected-block-tool-props.js.map +1 -1
  115. package/build/components/block-types-list/index.js +1 -0
  116. package/build/components/block-types-list/index.js.map +1 -1
  117. package/build/components/block-variation-picker/index.js +1 -0
  118. package/build/components/block-variation-picker/index.js.map +1 -1
  119. package/build/components/block-variation-picker/index.native.js +1 -0
  120. package/build/components/block-variation-picker/index.native.js.map +1 -1
  121. package/build/components/block-variation-transforms/index.js +1 -0
  122. package/build/components/block-variation-transforms/index.js.map +1 -1
  123. package/build/components/block-vertical-alignment-control/ui.js +1 -0
  124. package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
  125. package/build/components/border-radius-control/index.js +1 -0
  126. package/build/components/border-radius-control/index.js.map +1 -1
  127. package/build/components/border-radius-control/input-controls.js +1 -0
  128. package/build/components/border-radius-control/input-controls.js.map +1 -1
  129. package/build/components/border-radius-control/utils.js +1 -0
  130. package/build/components/border-radius-control/utils.js.map +1 -1
  131. package/build/components/colors/utils.js +1 -0
  132. package/build/components/colors/utils.js.map +1 -1
  133. package/build/components/colors/with-colors.js +1 -0
  134. package/build/components/colors/with-colors.js.map +1 -1
  135. package/build/components/colors-gradients/dropdown.js +1 -0
  136. package/build/components/colors-gradients/dropdown.js.map +1 -1
  137. package/build/components/colors-gradients/panel-color-gradient-settings.js +1 -0
  138. package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  139. package/build/components/colors-gradients/panel-color-gradient-settings.native.js +1 -0
  140. package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  141. package/build/components/convert-to-group-buttons/toolbar.js +1 -0
  142. package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
  143. package/build/components/date-format-picker/index.js +1 -0
  144. package/build/components/date-format-picker/index.js.map +1 -1
  145. package/build/components/dimensions-tool/scale-tool.js +1 -0
  146. package/build/components/dimensions-tool/scale-tool.js.map +1 -1
  147. package/build/components/duotone/utils.js +1 -0
  148. package/build/components/duotone/utils.js.map +1 -1
  149. package/build/components/editor-styles/index.js +1 -0
  150. package/build/components/editor-styles/index.js.map +1 -1
  151. package/build/components/font-appearance-control/index.js +1 -0
  152. package/build/components/font-appearance-control/index.js.map +1 -1
  153. package/build/components/font-family/index.js +1 -0
  154. package/build/components/font-family/index.js.map +1 -1
  155. package/build/components/font-sizes/with-font-sizes.js +1 -0
  156. package/build/components/font-sizes/with-font-sizes.js.map +1 -1
  157. package/build/components/global-styles/border-panel.js +1 -0
  158. package/build/components/global-styles/border-panel.js.map +1 -1
  159. package/build/components/global-styles/color-panel.js +25 -8
  160. package/build/components/global-styles/color-panel.js.map +1 -1
  161. package/build/components/global-styles/color-panel.native.js +1 -0
  162. package/build/components/global-styles/color-panel.native.js.map +1 -1
  163. package/build/components/global-styles/dimensions-panel.js +1 -0
  164. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  165. package/build/components/global-styles/filters-panel.js +3 -2
  166. package/build/components/global-styles/filters-panel.js.map +1 -1
  167. package/build/components/global-styles/get-global-styles-changes.js +1 -0
  168. package/build/components/global-styles/get-global-styles-changes.js.map +1 -1
  169. package/build/components/global-styles/shadow-panel-components.js +1 -0
  170. package/build/components/global-styles/shadow-panel-components.js.map +1 -1
  171. package/build/components/global-styles/typography-utils.js +1 -0
  172. package/build/components/global-styles/typography-utils.js.map +1 -1
  173. package/build/components/global-styles/use-global-styles-context.native.js +1 -0
  174. package/build/components/global-styles/use-global-styles-context.native.js.map +1 -1
  175. package/build/components/global-styles/use-global-styles-output.js +2 -1
  176. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  177. package/build/components/global-styles/utils.js +1 -0
  178. package/build/components/global-styles/utils.js.map +1 -1
  179. package/build/components/grid/grid-visualizer.js +1 -0
  180. package/build/components/grid/grid-visualizer.js.map +1 -1
  181. package/build/components/grid/use-grid-layout-sync.js +1 -0
  182. package/build/components/grid/use-grid-layout-sync.js.map +1 -1
  183. package/build/components/grid/utils.js +1 -0
  184. package/build/components/grid/utils.js.map +1 -1
  185. package/build/components/iframe/get-compatibility-styles.js +1 -0
  186. package/build/components/iframe/get-compatibility-styles.js.map +1 -1
  187. package/build/components/image-editor/aspect-ratio-dropdown.js +1 -0
  188. package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  189. package/build/components/index.js +15 -8
  190. package/build/components/index.js.map +1 -1
  191. package/build/components/inner-blocks/use-block-context.js +1 -0
  192. package/build/components/inner-blocks/use-block-context.js.map +1 -1
  193. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +1 -0
  194. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  195. package/build/components/inserter/block-patterns-explorer/pattern-list.js +1 -0
  196. package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  197. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js +1 -0
  198. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  199. package/build/components/inserter/block-patterns-tab/use-pattern-categories.js +1 -0
  200. package/build/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
  201. package/build/components/inserter/block-types-tab.js +2 -1
  202. package/build/components/inserter/block-types-tab.js.map +1 -1
  203. package/build/components/inserter/block-types-tab.native.js +1 -0
  204. package/build/components/inserter/block-types-tab.native.js.map +1 -1
  205. package/build/components/inserter/category-tabs/index.js +1 -0
  206. package/build/components/inserter/category-tabs/index.js.map +1 -1
  207. package/build/components/inserter/hooks/use-block-type-impressions.native.js +1 -0
  208. package/build/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  209. package/build/components/inserter/hooks/use-patterns-state.js +1 -0
  210. package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
  211. package/build/components/inserter/index.js +1 -0
  212. package/build/components/inserter/index.js.map +1 -1
  213. package/build/components/inserter/index.native.js +1 -0
  214. package/build/components/inserter/index.native.js.map +1 -1
  215. package/build/components/inserter/media-tab/hooks.js +1 -0
  216. package/build/components/inserter/media-tab/hooks.js.map +1 -1
  217. package/build/components/inserter/media-tab/media-list.js +1 -0
  218. package/build/components/inserter/media-tab/media-list.js.map +1 -1
  219. package/build/components/inserter/media-tab/media-tab.js +1 -0
  220. package/build/components/inserter/media-tab/media-tab.js.map +1 -1
  221. package/build/components/inserter/menu.js +1 -0
  222. package/build/components/inserter/menu.js.map +1 -1
  223. package/build/components/inserter/mobile-tab-navigation.js +1 -0
  224. package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
  225. package/build/components/inserter/search-items.js +1 -0
  226. package/build/components/inserter/search-items.js.map +1 -1
  227. package/build/components/inserter/search-results.js +1 -0
  228. package/build/components/inserter/search-results.js.map +1 -1
  229. package/build/components/inserter/tabs.native.js +1 -0
  230. package/build/components/inserter/tabs.native.js.map +1 -1
  231. package/build/components/inserter/utils.native.js +1 -0
  232. package/build/components/inserter/utils.native.js.map +1 -1
  233. package/build/components/inspector-controls/block-support-tools-panel.js +1 -0
  234. package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  235. package/build/components/inspector-controls/fill.js +1 -0
  236. package/build/components/inspector-controls/fill.js.map +1 -1
  237. package/build/components/inspector-controls/slot.js +2 -13
  238. package/build/components/inspector-controls/slot.js.map +1 -1
  239. package/build/components/inspector-controls-tabs/index.js +1 -0
  240. package/build/components/inspector-controls-tabs/index.js.map +1 -1
  241. package/build/components/inspector-controls-tabs/position-controls-panel.js +1 -0
  242. package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  243. package/build/components/inspector-popover-header/index.js +1 -0
  244. package/build/components/inspector-popover-header/index.js.map +1 -1
  245. package/build/components/justify-content-control/ui.js +1 -0
  246. package/build/components/justify-content-control/ui.js.map +1 -1
  247. package/build/components/link-control/index.js +13 -1
  248. package/build/components/link-control/index.js.map +1 -1
  249. package/build/components/link-control/search-input.js +11 -1
  250. package/build/components/link-control/search-input.js.map +1 -1
  251. package/build/components/link-control/search-item.js +12 -1
  252. package/build/components/link-control/search-item.js.map +1 -1
  253. package/build/components/link-control/search-results.js +13 -1
  254. package/build/components/link-control/search-results.js.map +1 -1
  255. package/build/components/link-control/settings.js +1 -0
  256. package/build/components/link-control/settings.js.map +1 -1
  257. package/build/components/link-control/use-internal-value.js +1 -0
  258. package/build/components/link-control/use-internal-value.js.map +1 -1
  259. package/build/components/link-control/use-search-handler.js +1 -0
  260. package/build/components/link-control/use-search-handler.js.map +1 -1
  261. package/build/components/list-view/block-select-button.js +1 -0
  262. package/build/components/list-view/block-select-button.js.map +1 -1
  263. package/build/components/list-view/block.js +1 -0
  264. package/build/components/list-view/block.js.map +1 -1
  265. package/build/components/list-view/branch.js +1 -0
  266. package/build/components/list-view/branch.js.map +1 -1
  267. package/build/components/list-view/index.js +1 -0
  268. package/build/components/list-view/index.js.map +1 -1
  269. package/build/components/list-view/use-block-selection.js +1 -0
  270. package/build/components/list-view/use-block-selection.js.map +1 -1
  271. package/build/components/list-view/use-clipboard-handler.js +1 -0
  272. package/build/components/list-view/use-clipboard-handler.js.map +1 -1
  273. package/build/components/list-view/use-list-view-block-indexes.js +1 -0
  274. package/build/components/list-view/use-list-view-block-indexes.js.map +1 -1
  275. package/build/components/list-view/use-list-view-drop-zone.js +1 -0
  276. package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
  277. package/build/components/list-view/utils.js +1 -0
  278. package/build/components/list-view/utils.js.map +1 -1
  279. package/build/components/media-placeholder/index.js +1 -0
  280. package/build/components/media-placeholder/index.js.map +1 -1
  281. package/build/components/media-placeholder/index.native.js +1 -0
  282. package/build/components/media-placeholder/index.native.js.map +1 -1
  283. package/build/components/media-replace-flow/index.js +1 -0
  284. package/build/components/media-replace-flow/index.js.map +1 -1
  285. package/build/components/media-upload/index.native.js +1 -0
  286. package/build/components/media-upload/index.native.js.map +1 -1
  287. package/build/components/multi-selection-inspector/index.js +9 -25
  288. package/build/components/multi-selection-inspector/index.js.map +1 -1
  289. package/build/components/navigable-toolbar/index.js +1 -0
  290. package/build/components/navigable-toolbar/index.js.map +1 -1
  291. package/build/components/panel-color-settings/index.js +1 -0
  292. package/build/components/panel-color-settings/index.js.map +1 -1
  293. package/build/components/provider/use-block-sync.js +1 -0
  294. package/build/components/provider/use-block-sync.js.map +1 -1
  295. package/build/components/responsive-block-control/index.js +1 -0
  296. package/build/components/responsive-block-control/index.js.map +1 -1
  297. package/build/components/rich-text/embed-handler-picker.native.js +1 -0
  298. package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
  299. package/build/components/rich-text/event-listeners/before-input-rules.js +1 -0
  300. package/build/components/rich-text/event-listeners/before-input-rules.js.map +1 -1
  301. package/build/components/rich-text/event-listeners/index.js +1 -0
  302. package/build/components/rich-text/event-listeners/index.js.map +1 -1
  303. package/build/components/rich-text/event-listeners/input-rules.js +1 -0
  304. package/build/components/rich-text/event-listeners/input-rules.js.map +1 -1
  305. package/build/components/rich-text/event-listeners/paste-handler.js +1 -0
  306. package/build/components/rich-text/event-listeners/paste-handler.js.map +1 -1
  307. package/build/components/rich-text/file-paste-handler.native.js +1 -0
  308. package/build/components/rich-text/file-paste-handler.native.js.map +1 -1
  309. package/build/components/rich-text/format-edit.js +1 -0
  310. package/build/components/rich-text/format-edit.js.map +1 -1
  311. package/build/components/rich-text/format-toolbar/index.js +1 -0
  312. package/build/components/rich-text/format-toolbar/index.js.map +1 -1
  313. package/build/components/rich-text/index.js +1 -0
  314. package/build/components/rich-text/index.js.map +1 -1
  315. package/build/components/rich-text/index.native.js +1 -0
  316. package/build/components/rich-text/index.native.js.map +1 -1
  317. package/build/components/rich-text/multiline.js +1 -0
  318. package/build/components/rich-text/multiline.js.map +1 -1
  319. package/build/components/rich-text/native/format-edit.js +1 -0
  320. package/build/components/rich-text/native/format-edit.js.map +1 -1
  321. package/build/components/rich-text/native/get-format-colors.native.js +1 -0
  322. package/build/components/rich-text/native/get-format-colors.native.js.map +1 -1
  323. package/build/components/rich-text/native/index.native.js +1 -0
  324. package/build/components/rich-text/native/index.native.js.map +1 -1
  325. package/build/components/rich-text/native/toolbar-button-with-options.native.js +1 -0
  326. package/build/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  327. package/build/components/rich-text/native/use-format-types.js +1 -0
  328. package/build/components/rich-text/native/use-format-types.js.map +1 -1
  329. package/build/components/rich-text/use-format-types.js +1 -0
  330. package/build/components/rich-text/use-format-types.js.map +1 -1
  331. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js +1 -0
  332. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
  333. package/build/components/spacing-sizes-control/input-controls/axial.js +1 -0
  334. package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  335. package/build/components/spacing-sizes-control/input-controls/separated.js +1 -0
  336. package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  337. package/build/components/spacing-sizes-control/input-controls/single.js +1 -0
  338. package/build/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  339. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +1 -0
  340. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  341. package/build/components/spacing-sizes-control/utils.js +1 -0
  342. package/build/components/spacing-sizes-control/utils.js.map +1 -1
  343. package/build/components/tabbed-sidebar/index.js +1 -0
  344. package/build/components/tabbed-sidebar/index.js.map +1 -1
  345. package/build/components/text-alignment-control/index.js +1 -0
  346. package/build/components/text-alignment-control/index.js.map +1 -1
  347. package/build/components/text-decoration-control/index.js +1 -0
  348. package/build/components/text-decoration-control/index.js.map +1 -1
  349. package/build/components/text-transform-control/index.js +1 -0
  350. package/build/components/text-transform-control/index.js.map +1 -1
  351. package/build/components/unsupported-block-details/index.native.js +1 -0
  352. package/build/components/unsupported-block-details/index.native.js.map +1 -1
  353. package/build/components/url-input/index.js +1 -0
  354. package/build/components/url-input/index.js.map +1 -1
  355. package/build/components/url-popover/image-url-input-ui.js +1 -0
  356. package/build/components/url-popover/image-url-input-ui.js.map +1 -1
  357. package/build/components/use-block-commands/index.js +1 -0
  358. package/build/components/use-block-commands/index.js.map +1 -1
  359. package/build/components/use-block-drop-zone/index.js +1 -0
  360. package/build/components/use-block-drop-zone/index.js.map +1 -1
  361. package/build/components/use-block-drop-zone/index.native.js +1 -0
  362. package/build/components/use-block-drop-zone/index.native.js.map +1 -1
  363. package/build/components/use-flash-editable-blocks/index.js +1 -0
  364. package/build/components/use-flash-editable-blocks/index.js.map +1 -1
  365. package/build/components/use-on-block-drop/index.js +1 -0
  366. package/build/components/use-on-block-drop/index.js.map +1 -1
  367. package/build/components/use-on-block-drop/index.native.js +1 -0
  368. package/build/components/use-on-block-drop/index.native.js.map +1 -1
  369. package/build/components/use-paste-styles/index.js +1 -0
  370. package/build/components/use-paste-styles/index.js.map +1 -1
  371. package/build/components/warning/index.js +3 -3
  372. package/build/components/warning/index.js.map +1 -1
  373. package/build/components/writing-flow/use-arrow-nav.js +1 -0
  374. package/build/components/writing-flow/use-arrow-nav.js.map +1 -1
  375. package/build/components/writing-flow/use-clipboard-handler.js +1 -0
  376. package/build/components/writing-flow/use-clipboard-handler.js.map +1 -1
  377. package/build/components/writing-flow/use-input.js +1 -0
  378. package/build/components/writing-flow/use-input.js.map +1 -1
  379. package/build/components/writing-flow/use-tab-nav.js +1 -0
  380. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  381. package/build/components/writing-flow/utils.js +1 -0
  382. package/build/components/writing-flow/utils.js.map +1 -1
  383. package/build/components/writing-mode-control/index.js +1 -0
  384. package/build/components/writing-mode-control/index.js.map +1 -1
  385. package/build/hooks/align.js +1 -0
  386. package/build/hooks/align.js.map +1 -1
  387. package/build/hooks/align.native.js +1 -0
  388. package/build/hooks/align.native.js.map +1 -1
  389. package/build/hooks/block-bindings.js +1 -0
  390. package/build/hooks/block-bindings.js.map +1 -1
  391. package/build/hooks/block-hooks.js +1 -0
  392. package/build/hooks/block-hooks.js.map +1 -1
  393. package/build/hooks/block-style-variation.js +1 -0
  394. package/build/hooks/block-style-variation.js.map +1 -1
  395. package/build/hooks/border.js +1 -0
  396. package/build/hooks/border.js.map +1 -1
  397. package/build/hooks/duotone.js +1 -0
  398. package/build/hooks/duotone.js.map +1 -1
  399. package/build/hooks/index.js +1 -0
  400. package/build/hooks/index.js.map +1 -1
  401. package/build/hooks/layout.js +1 -0
  402. package/build/hooks/layout.js.map +1 -1
  403. package/build/hooks/position.js +1 -0
  404. package/build/hooks/position.js.map +1 -1
  405. package/build/hooks/style.js +2 -1
  406. package/build/hooks/style.js.map +1 -1
  407. package/build/hooks/supports.js +1 -0
  408. package/build/hooks/supports.js.map +1 -1
  409. package/build/hooks/text-align.js +1 -0
  410. package/build/hooks/text-align.js.map +1 -1
  411. package/build/hooks/typography.js +1 -0
  412. package/build/hooks/typography.js.map +1 -1
  413. package/build/hooks/use-bindings-attributes.js +1 -0
  414. package/build/hooks/use-bindings-attributes.js.map +1 -1
  415. package/build/hooks/use-zoom-out.js +47 -14
  416. package/build/hooks/use-zoom-out.js.map +1 -1
  417. package/build/hooks/utils.js +1 -0
  418. package/build/hooks/utils.js.map +1 -1
  419. package/build/layouts/constrained.js +1 -0
  420. package/build/layouts/constrained.js.map +1 -1
  421. package/build/layouts/flex.js +1 -0
  422. package/build/layouts/flex.js.map +1 -1
  423. package/build/layouts/flow.js +1 -0
  424. package/build/layouts/flow.js.map +1 -1
  425. package/build/layouts/index.js +1 -0
  426. package/build/layouts/index.js.map +1 -1
  427. package/build/layouts/utils.js +1 -0
  428. package/build/layouts/utils.js.map +1 -1
  429. package/build/store/actions.js +1 -0
  430. package/build/store/actions.js.map +1 -1
  431. package/build/store/get-block-settings.js +1 -0
  432. package/build/store/get-block-settings.js.map +1 -1
  433. package/build/store/private-actions.js +1 -0
  434. package/build/store/private-actions.js.map +1 -1
  435. package/build/store/private-selectors.js +1 -0
  436. package/build/store/private-selectors.js.map +1 -1
  437. package/build/store/reducer.js +1 -0
  438. package/build/store/reducer.js.map +1 -1
  439. package/build/store/selectors.js +13 -15
  440. package/build/store/selectors.js.map +1 -1
  441. package/build/store/utils.js +1 -0
  442. package/build/store/utils.js.map +1 -1
  443. package/build/utils/block-bindings.js +1 -0
  444. package/build/utils/block-bindings.js.map +1 -1
  445. package/build/utils/get-editor-region.js +1 -0
  446. package/build/utils/get-editor-region.js.map +1 -1
  447. package/build/utils/get-font-styles-and-weights.js +1 -0
  448. package/build/utils/get-font-styles-and-weights.js.map +1 -1
  449. package/build/utils/math.js +1 -0
  450. package/build/utils/math.js.map +1 -1
  451. package/build/utils/object.js +1 -0
  452. package/build/utils/object.js.map +1 -1
  453. package/build/utils/selection.js +1 -0
  454. package/build/utils/selection.js.map +1 -1
  455. package/build/utils/transform-styles/index.js +1 -0
  456. package/build/utils/transform-styles/index.js.map +1 -1
  457. package/build-module/autocompleters/block.js +1 -0
  458. package/build-module/autocompleters/block.js.map +1 -1
  459. package/build-module/autocompleters/link.js +1 -0
  460. package/build-module/autocompleters/link.js.map +1 -1
  461. package/build-module/components/alignment-control/ui.js +1 -0
  462. package/build-module/components/alignment-control/ui.js.map +1 -1
  463. package/build-module/components/autocomplete/index.js +1 -0
  464. package/build-module/components/autocomplete/index.js.map +1 -1
  465. package/build-module/components/background-image-control/index.js +1 -0
  466. package/build-module/components/background-image-control/index.js.map +1 -1
  467. package/build-module/components/block-actions/index.js +1 -0
  468. package/build-module/components/block-actions/index.js.map +1 -1
  469. package/build-module/components/block-alignment-control/ui.js +1 -0
  470. package/build-module/components/block-alignment-control/ui.js.map +1 -1
  471. package/build-module/components/block-alignment-control/ui.native.js +1 -0
  472. package/build-module/components/block-alignment-control/ui.native.js.map +1 -1
  473. package/build-module/components/block-alignment-control/use-available-alignments.js +1 -0
  474. package/build-module/components/block-alignment-control/use-available-alignments.js.map +1 -1
  475. package/build-module/components/block-breadcrumb/index.js +1 -0
  476. package/build-module/components/block-breadcrumb/index.js.map +1 -1
  477. package/build-module/components/block-compare/index.js +1 -0
  478. package/build-module/components/block-compare/index.js.map +1 -1
  479. package/build-module/components/block-controls/fill.js +1 -0
  480. package/build-module/components/block-controls/fill.js.map +1 -1
  481. package/build-module/components/block-edit/edit.js +1 -0
  482. package/build-module/components/block-edit/edit.js.map +1 -1
  483. package/build-module/components/block-edit/edit.native.js +1 -0
  484. package/build-module/components/block-edit/edit.native.js.map +1 -1
  485. package/build-module/components/block-heading-level-dropdown/index.js +1 -0
  486. package/build-module/components/block-heading-level-dropdown/index.js.map +1 -1
  487. package/build-module/components/block-heading-level-dropdown/index.native.js +1 -0
  488. package/build-module/components/block-heading-level-dropdown/index.native.js.map +1 -1
  489. package/build-module/components/block-inspector/index.js +1 -0
  490. package/build-module/components/block-inspector/index.js.map +1 -1
  491. package/build-module/components/block-list/block-invalid-warning.js +1 -0
  492. package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
  493. package/build-module/components/block-list/block-list-context.native.js +1 -0
  494. package/build-module/components/block-list/block-list-context.native.js.map +1 -1
  495. package/build-module/components/block-list/block.js +1 -0
  496. package/build-module/components/block-list/block.js.map +1 -1
  497. package/build-module/components/block-list/block.native.js +1 -0
  498. package/build-module/components/block-list/block.native.js.map +1 -1
  499. package/build-module/components/block-list/index.js +1 -0
  500. package/build-module/components/block-list/index.js.map +1 -1
  501. package/build-module/components/block-list/index.native.js +1 -0
  502. package/build-module/components/block-list/index.native.js.map +1 -1
  503. package/build-module/components/block-list/use-block-props/index.js +2 -3
  504. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  505. package/build-module/components/block-list/use-block-props/use-firefox-draggable-compatibility.js +60 -8
  506. package/build-module/components/block-list/use-block-props/use-firefox-draggable-compatibility.js.map +1 -1
  507. package/build-module/components/block-list/use-block-props/use-focus-first-element.js +1 -0
  508. package/build-module/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  509. package/build-module/components/block-list/use-in-between-inserter.js +1 -0
  510. package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
  511. package/build-module/components/block-lock/modal.js +5 -4
  512. package/build-module/components/block-lock/modal.js.map +1 -1
  513. package/build-module/components/block-manager/category.js +1 -0
  514. package/build-module/components/block-manager/category.js.map +1 -1
  515. package/build-module/components/block-manager/checklist.js +1 -0
  516. package/build-module/components/block-manager/checklist.js.map +1 -1
  517. package/build-module/components/block-manager/index.js +1 -0
  518. package/build-module/components/block-manager/index.js.map +1 -1
  519. package/build-module/components/block-media-update-progress/index.native.js +1 -0
  520. package/build-module/components/block-media-update-progress/index.native.js.map +1 -1
  521. package/build-module/components/block-mover/index.native.js +1 -0
  522. package/build-module/components/block-mover/index.native.js.map +1 -1
  523. package/build-module/components/block-mover/mover-description.native.js +1 -0
  524. package/build-module/components/block-mover/mover-description.native.js.map +1 -1
  525. package/build-module/components/block-parent-selector/index.js +2 -15
  526. package/build-module/components/block-parent-selector/index.js.map +1 -1
  527. package/build-module/components/block-pattern-setup/index.js +1 -0
  528. package/build-module/components/block-pattern-setup/index.js.map +1 -1
  529. package/build-module/components/block-pattern-setup/use-patterns-setup.js +1 -0
  530. package/build-module/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
  531. package/build-module/components/block-patterns-list/index.js +1 -0
  532. package/build-module/components/block-patterns-list/index.js.map +1 -1
  533. package/build-module/components/block-quick-navigation/index.js +1 -0
  534. package/build-module/components/block-quick-navigation/index.js.map +1 -1
  535. package/build-module/components/block-rename/rename-control.js +1 -0
  536. package/build-module/components/block-rename/rename-control.js.map +1 -1
  537. package/build-module/components/block-settings-menu/block-settings-dropdown.js +1 -0
  538. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  539. package/build-module/components/block-styles/index.js +1 -0
  540. package/build-module/components/block-styles/index.js.map +1 -1
  541. package/build-module/components/block-styles/index.native.js +1 -0
  542. package/build-module/components/block-styles/index.native.js.map +1 -1
  543. package/build-module/components/block-styles/menu-items.js +1 -0
  544. package/build-module/components/block-styles/menu-items.js.map +1 -1
  545. package/build-module/components/block-styles/preview.native.js +1 -0
  546. package/build-module/components/block-styles/preview.native.js.map +1 -1
  547. package/build-module/components/block-switcher/block-transformations-menu.js +1 -0
  548. package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
  549. package/build-module/components/block-switcher/block-transformations-menu.native.js +1 -0
  550. package/build-module/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  551. package/build-module/components/block-switcher/block-variation-transformations.js +1 -0
  552. package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -1
  553. package/build-module/components/block-switcher/index.js +1 -0
  554. package/build-module/components/block-switcher/index.js.map +1 -1
  555. package/build-module/components/block-switcher/pattern-transformations-menu.js +1 -0
  556. package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  557. package/build-module/components/block-switcher/use-transformed-patterns.js +1 -0
  558. package/build-module/components/block-switcher/use-transformed-patterns.js.map +1 -1
  559. package/build-module/components/block-switcher/utils.js +1 -0
  560. package/build-module/components/block-switcher/utils.js.map +1 -1
  561. package/build-module/components/block-toolbar/block-toolbar-menu.native.js +1 -0
  562. package/build-module/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  563. package/build-module/components/block-toolbar/change-design.js +1 -0
  564. package/build-module/components/block-toolbar/change-design.js.map +1 -1
  565. package/build-module/components/block-toolbar/index.js +2 -1
  566. package/build-module/components/block-toolbar/index.js.map +1 -1
  567. package/build-module/components/block-tools/use-selected-block-tool-props.js +1 -0
  568. package/build-module/components/block-tools/use-selected-block-tool-props.js.map +1 -1
  569. package/build-module/components/block-types-list/index.js +1 -0
  570. package/build-module/components/block-types-list/index.js.map +1 -1
  571. package/build-module/components/block-variation-picker/index.js +1 -0
  572. package/build-module/components/block-variation-picker/index.js.map +1 -1
  573. package/build-module/components/block-variation-picker/index.native.js +1 -0
  574. package/build-module/components/block-variation-picker/index.native.js.map +1 -1
  575. package/build-module/components/block-variation-transforms/index.js +1 -0
  576. package/build-module/components/block-variation-transforms/index.js.map +1 -1
  577. package/build-module/components/block-vertical-alignment-control/ui.js +1 -0
  578. package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
  579. package/build-module/components/border-radius-control/index.js +1 -0
  580. package/build-module/components/border-radius-control/index.js.map +1 -1
  581. package/build-module/components/border-radius-control/input-controls.js +1 -0
  582. package/build-module/components/border-radius-control/input-controls.js.map +1 -1
  583. package/build-module/components/border-radius-control/utils.js +1 -0
  584. package/build-module/components/border-radius-control/utils.js.map +1 -1
  585. package/build-module/components/colors/utils.js +1 -0
  586. package/build-module/components/colors/utils.js.map +1 -1
  587. package/build-module/components/colors/with-colors.js +1 -0
  588. package/build-module/components/colors/with-colors.js.map +1 -1
  589. package/build-module/components/colors-gradients/dropdown.js +1 -0
  590. package/build-module/components/colors-gradients/dropdown.js.map +1 -1
  591. package/build-module/components/colors-gradients/panel-color-gradient-settings.js +1 -0
  592. package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  593. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js +1 -0
  594. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  595. package/build-module/components/convert-to-group-buttons/toolbar.js +1 -0
  596. package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
  597. package/build-module/components/date-format-picker/index.js +1 -0
  598. package/build-module/components/date-format-picker/index.js.map +1 -1
  599. package/build-module/components/dimensions-tool/scale-tool.js +1 -0
  600. package/build-module/components/dimensions-tool/scale-tool.js.map +1 -1
  601. package/build-module/components/duotone/utils.js +1 -0
  602. package/build-module/components/duotone/utils.js.map +1 -1
  603. package/build-module/components/editor-styles/index.js +1 -0
  604. package/build-module/components/editor-styles/index.js.map +1 -1
  605. package/build-module/components/font-appearance-control/index.js +1 -0
  606. package/build-module/components/font-appearance-control/index.js.map +1 -1
  607. package/build-module/components/font-family/index.js +1 -0
  608. package/build-module/components/font-family/index.js.map +1 -1
  609. package/build-module/components/font-sizes/with-font-sizes.js +1 -0
  610. package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
  611. package/build-module/components/global-styles/border-panel.js +1 -0
  612. package/build-module/components/global-styles/border-panel.js.map +1 -1
  613. package/build-module/components/global-styles/color-panel.js +27 -10
  614. package/build-module/components/global-styles/color-panel.js.map +1 -1
  615. package/build-module/components/global-styles/color-panel.native.js +1 -0
  616. package/build-module/components/global-styles/color-panel.native.js.map +1 -1
  617. package/build-module/components/global-styles/dimensions-panel.js +1 -0
  618. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  619. package/build-module/components/global-styles/filters-panel.js +4 -3
  620. package/build-module/components/global-styles/filters-panel.js.map +1 -1
  621. package/build-module/components/global-styles/get-global-styles-changes.js +1 -0
  622. package/build-module/components/global-styles/get-global-styles-changes.js.map +1 -1
  623. package/build-module/components/global-styles/shadow-panel-components.js +1 -0
  624. package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
  625. package/build-module/components/global-styles/typography-utils.js +1 -0
  626. package/build-module/components/global-styles/typography-utils.js.map +1 -1
  627. package/build-module/components/global-styles/use-global-styles-context.native.js +1 -0
  628. package/build-module/components/global-styles/use-global-styles-context.native.js.map +1 -1
  629. package/build-module/components/global-styles/use-global-styles-output.js +2 -1
  630. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  631. package/build-module/components/global-styles/utils.js +1 -0
  632. package/build-module/components/global-styles/utils.js.map +1 -1
  633. package/build-module/components/grid/grid-visualizer.js +1 -0
  634. package/build-module/components/grid/grid-visualizer.js.map +1 -1
  635. package/build-module/components/grid/use-grid-layout-sync.js +1 -0
  636. package/build-module/components/grid/use-grid-layout-sync.js.map +1 -1
  637. package/build-module/components/grid/utils.js +1 -0
  638. package/build-module/components/grid/utils.js.map +1 -1
  639. package/build-module/components/iframe/get-compatibility-styles.js +1 -0
  640. package/build-module/components/iframe/get-compatibility-styles.js.map +1 -1
  641. package/build-module/components/image-editor/aspect-ratio-dropdown.js +1 -0
  642. package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  643. package/build-module/components/index.js +4 -4
  644. package/build-module/components/index.js.map +1 -1
  645. package/build-module/components/inner-blocks/use-block-context.js +1 -0
  646. package/build-module/components/inner-blocks/use-block-context.js.map +1 -1
  647. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +1 -0
  648. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  649. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js +1 -0
  650. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  651. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +1 -0
  652. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  653. package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js +1 -0
  654. package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
  655. package/build-module/components/inserter/block-types-tab.js +2 -1
  656. package/build-module/components/inserter/block-types-tab.js.map +1 -1
  657. package/build-module/components/inserter/block-types-tab.native.js +1 -0
  658. package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
  659. package/build-module/components/inserter/category-tabs/index.js +1 -0
  660. package/build-module/components/inserter/category-tabs/index.js.map +1 -1
  661. package/build-module/components/inserter/hooks/use-block-type-impressions.native.js +1 -0
  662. package/build-module/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  663. package/build-module/components/inserter/hooks/use-patterns-state.js +1 -0
  664. package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
  665. package/build-module/components/inserter/index.js +1 -0
  666. package/build-module/components/inserter/index.js.map +1 -1
  667. package/build-module/components/inserter/index.native.js +1 -0
  668. package/build-module/components/inserter/index.native.js.map +1 -1
  669. package/build-module/components/inserter/media-tab/hooks.js +1 -0
  670. package/build-module/components/inserter/media-tab/hooks.js.map +1 -1
  671. package/build-module/components/inserter/media-tab/media-list.js +1 -0
  672. package/build-module/components/inserter/media-tab/media-list.js.map +1 -1
  673. package/build-module/components/inserter/media-tab/media-tab.js +1 -0
  674. package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
  675. package/build-module/components/inserter/menu.js +1 -0
  676. package/build-module/components/inserter/menu.js.map +1 -1
  677. package/build-module/components/inserter/mobile-tab-navigation.js +1 -0
  678. package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
  679. package/build-module/components/inserter/search-items.js +1 -0
  680. package/build-module/components/inserter/search-items.js.map +1 -1
  681. package/build-module/components/inserter/search-results.js +1 -0
  682. package/build-module/components/inserter/search-results.js.map +1 -1
  683. package/build-module/components/inserter/tabs.native.js +1 -0
  684. package/build-module/components/inserter/tabs.native.js.map +1 -1
  685. package/build-module/components/inserter/utils.native.js +1 -0
  686. package/build-module/components/inserter/utils.native.js.map +1 -1
  687. package/build-module/components/inspector-controls/block-support-tools-panel.js +1 -0
  688. package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  689. package/build-module/components/inspector-controls/fill.js +1 -0
  690. package/build-module/components/inspector-controls/fill.js.map +1 -1
  691. package/build-module/components/inspector-controls/slot.js +3 -14
  692. package/build-module/components/inspector-controls/slot.js.map +1 -1
  693. package/build-module/components/inspector-controls-tabs/index.js +1 -0
  694. package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
  695. package/build-module/components/inspector-controls-tabs/position-controls-panel.js +1 -0
  696. package/build-module/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  697. package/build-module/components/inspector-popover-header/index.js +1 -0
  698. package/build-module/components/inspector-popover-header/index.js.map +1 -1
  699. package/build-module/components/justify-content-control/ui.js +1 -0
  700. package/build-module/components/justify-content-control/ui.js.map +1 -1
  701. package/build-module/components/link-control/index.js +11 -0
  702. package/build-module/components/link-control/index.js.map +1 -1
  703. package/build-module/components/link-control/search-input.js +9 -0
  704. package/build-module/components/link-control/search-input.js.map +1 -1
  705. package/build-module/components/link-control/search-item.js +9 -0
  706. package/build-module/components/link-control/search-item.js.map +1 -1
  707. package/build-module/components/link-control/search-results.js +12 -1
  708. package/build-module/components/link-control/search-results.js.map +1 -1
  709. package/build-module/components/link-control/settings.js +1 -0
  710. package/build-module/components/link-control/settings.js.map +1 -1
  711. package/build-module/components/link-control/use-internal-value.js +1 -0
  712. package/build-module/components/link-control/use-internal-value.js.map +1 -1
  713. package/build-module/components/link-control/use-search-handler.js +1 -0
  714. package/build-module/components/link-control/use-search-handler.js.map +1 -1
  715. package/build-module/components/list-view/block-select-button.js +1 -0
  716. package/build-module/components/list-view/block-select-button.js.map +1 -1
  717. package/build-module/components/list-view/block.js +1 -0
  718. package/build-module/components/list-view/block.js.map +1 -1
  719. package/build-module/components/list-view/branch.js +1 -0
  720. package/build-module/components/list-view/branch.js.map +1 -1
  721. package/build-module/components/list-view/index.js +1 -0
  722. package/build-module/components/list-view/index.js.map +1 -1
  723. package/build-module/components/list-view/use-block-selection.js +1 -0
  724. package/build-module/components/list-view/use-block-selection.js.map +1 -1
  725. package/build-module/components/list-view/use-clipboard-handler.js +1 -0
  726. package/build-module/components/list-view/use-clipboard-handler.js.map +1 -1
  727. package/build-module/components/list-view/use-list-view-block-indexes.js +1 -0
  728. package/build-module/components/list-view/use-list-view-block-indexes.js.map +1 -1
  729. package/build-module/components/list-view/use-list-view-drop-zone.js +1 -0
  730. package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
  731. package/build-module/components/list-view/utils.js +1 -0
  732. package/build-module/components/list-view/utils.js.map +1 -1
  733. package/build-module/components/media-placeholder/index.js +1 -0
  734. package/build-module/components/media-placeholder/index.js.map +1 -1
  735. package/build-module/components/media-placeholder/index.native.js +1 -0
  736. package/build-module/components/media-placeholder/index.native.js.map +1 -1
  737. package/build-module/components/media-replace-flow/index.js +1 -0
  738. package/build-module/components/media-replace-flow/index.js.map +1 -1
  739. package/build-module/components/media-upload/index.native.js +1 -0
  740. package/build-module/components/media-upload/index.native.js.map +1 -1
  741. package/build-module/components/multi-selection-inspector/index.js +9 -25
  742. package/build-module/components/multi-selection-inspector/index.js.map +1 -1
  743. package/build-module/components/navigable-toolbar/index.js +1 -0
  744. package/build-module/components/navigable-toolbar/index.js.map +1 -1
  745. package/build-module/components/panel-color-settings/index.js +1 -0
  746. package/build-module/components/panel-color-settings/index.js.map +1 -1
  747. package/build-module/components/provider/use-block-sync.js +1 -0
  748. package/build-module/components/provider/use-block-sync.js.map +1 -1
  749. package/build-module/components/responsive-block-control/index.js +1 -0
  750. package/build-module/components/responsive-block-control/index.js.map +1 -1
  751. package/build-module/components/rich-text/embed-handler-picker.native.js +1 -0
  752. package/build-module/components/rich-text/embed-handler-picker.native.js.map +1 -1
  753. package/build-module/components/rich-text/event-listeners/before-input-rules.js +1 -0
  754. package/build-module/components/rich-text/event-listeners/before-input-rules.js.map +1 -1
  755. package/build-module/components/rich-text/event-listeners/index.js +1 -0
  756. package/build-module/components/rich-text/event-listeners/index.js.map +1 -1
  757. package/build-module/components/rich-text/event-listeners/input-rules.js +1 -0
  758. package/build-module/components/rich-text/event-listeners/input-rules.js.map +1 -1
  759. package/build-module/components/rich-text/event-listeners/paste-handler.js +1 -0
  760. package/build-module/components/rich-text/event-listeners/paste-handler.js.map +1 -1
  761. package/build-module/components/rich-text/file-paste-handler.native.js +1 -0
  762. package/build-module/components/rich-text/file-paste-handler.native.js.map +1 -1
  763. package/build-module/components/rich-text/format-edit.js +1 -0
  764. package/build-module/components/rich-text/format-edit.js.map +1 -1
  765. package/build-module/components/rich-text/format-toolbar/index.js +1 -0
  766. package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
  767. package/build-module/components/rich-text/index.js +1 -0
  768. package/build-module/components/rich-text/index.js.map +1 -1
  769. package/build-module/components/rich-text/index.native.js +1 -0
  770. package/build-module/components/rich-text/index.native.js.map +1 -1
  771. package/build-module/components/rich-text/multiline.js +1 -0
  772. package/build-module/components/rich-text/multiline.js.map +1 -1
  773. package/build-module/components/rich-text/native/format-edit.js +1 -0
  774. package/build-module/components/rich-text/native/format-edit.js.map +1 -1
  775. package/build-module/components/rich-text/native/get-format-colors.native.js +1 -0
  776. package/build-module/components/rich-text/native/get-format-colors.native.js.map +1 -1
  777. package/build-module/components/rich-text/native/index.native.js +1 -0
  778. package/build-module/components/rich-text/native/index.native.js.map +1 -1
  779. package/build-module/components/rich-text/native/toolbar-button-with-options.native.js +1 -0
  780. package/build-module/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  781. package/build-module/components/rich-text/native/use-format-types.js +1 -0
  782. package/build-module/components/rich-text/native/use-format-types.js.map +1 -1
  783. package/build-module/components/rich-text/use-format-types.js +1 -0
  784. package/build-module/components/rich-text/use-format-types.js.map +1 -1
  785. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js +1 -0
  786. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
  787. package/build-module/components/spacing-sizes-control/input-controls/axial.js +1 -0
  788. package/build-module/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  789. package/build-module/components/spacing-sizes-control/input-controls/separated.js +1 -0
  790. package/build-module/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  791. package/build-module/components/spacing-sizes-control/input-controls/single.js +1 -0
  792. package/build-module/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  793. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +1 -0
  794. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  795. package/build-module/components/spacing-sizes-control/utils.js +1 -0
  796. package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
  797. package/build-module/components/tabbed-sidebar/index.js +1 -0
  798. package/build-module/components/tabbed-sidebar/index.js.map +1 -1
  799. package/build-module/components/text-alignment-control/index.js +1 -0
  800. package/build-module/components/text-alignment-control/index.js.map +1 -1
  801. package/build-module/components/text-decoration-control/index.js +1 -0
  802. package/build-module/components/text-decoration-control/index.js.map +1 -1
  803. package/build-module/components/text-transform-control/index.js +1 -0
  804. package/build-module/components/text-transform-control/index.js.map +1 -1
  805. package/build-module/components/unsupported-block-details/index.native.js +1 -0
  806. package/build-module/components/unsupported-block-details/index.native.js.map +1 -1
  807. package/build-module/components/url-input/index.js +1 -0
  808. package/build-module/components/url-input/index.js.map +1 -1
  809. package/build-module/components/url-popover/image-url-input-ui.js +1 -0
  810. package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
  811. package/build-module/components/use-block-commands/index.js +1 -0
  812. package/build-module/components/use-block-commands/index.js.map +1 -1
  813. package/build-module/components/use-block-drop-zone/index.js +1 -0
  814. package/build-module/components/use-block-drop-zone/index.js.map +1 -1
  815. package/build-module/components/use-block-drop-zone/index.native.js +1 -0
  816. package/build-module/components/use-block-drop-zone/index.native.js.map +1 -1
  817. package/build-module/components/use-flash-editable-blocks/index.js +1 -0
  818. package/build-module/components/use-flash-editable-blocks/index.js.map +1 -1
  819. package/build-module/components/use-on-block-drop/index.js +1 -0
  820. package/build-module/components/use-on-block-drop/index.js.map +1 -1
  821. package/build-module/components/use-on-block-drop/index.native.js +1 -0
  822. package/build-module/components/use-on-block-drop/index.native.js.map +1 -1
  823. package/build-module/components/use-paste-styles/index.js +1 -0
  824. package/build-module/components/use-paste-styles/index.js.map +1 -1
  825. package/build-module/components/warning/index.js +3 -3
  826. package/build-module/components/warning/index.js.map +1 -1
  827. package/build-module/components/writing-flow/use-arrow-nav.js +1 -0
  828. package/build-module/components/writing-flow/use-arrow-nav.js.map +1 -1
  829. package/build-module/components/writing-flow/use-clipboard-handler.js +1 -0
  830. package/build-module/components/writing-flow/use-clipboard-handler.js.map +1 -1
  831. package/build-module/components/writing-flow/use-input.js +1 -0
  832. package/build-module/components/writing-flow/use-input.js.map +1 -1
  833. package/build-module/components/writing-flow/use-tab-nav.js +1 -0
  834. package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
  835. package/build-module/components/writing-flow/utils.js +1 -0
  836. package/build-module/components/writing-flow/utils.js.map +1 -1
  837. package/build-module/components/writing-mode-control/index.js +1 -0
  838. package/build-module/components/writing-mode-control/index.js.map +1 -1
  839. package/build-module/hooks/align.js +1 -0
  840. package/build-module/hooks/align.js.map +1 -1
  841. package/build-module/hooks/align.native.js +1 -0
  842. package/build-module/hooks/align.native.js.map +1 -1
  843. package/build-module/hooks/block-bindings.js +1 -0
  844. package/build-module/hooks/block-bindings.js.map +1 -1
  845. package/build-module/hooks/block-hooks.js +1 -0
  846. package/build-module/hooks/block-hooks.js.map +1 -1
  847. package/build-module/hooks/block-style-variation.js +1 -0
  848. package/build-module/hooks/block-style-variation.js.map +1 -1
  849. package/build-module/hooks/border.js +1 -0
  850. package/build-module/hooks/border.js.map +1 -1
  851. package/build-module/hooks/duotone.js +1 -0
  852. package/build-module/hooks/duotone.js.map +1 -1
  853. package/build-module/hooks/index.js +1 -0
  854. package/build-module/hooks/index.js.map +1 -1
  855. package/build-module/hooks/layout.js +1 -0
  856. package/build-module/hooks/layout.js.map +1 -1
  857. package/build-module/hooks/position.js +1 -0
  858. package/build-module/hooks/position.js.map +1 -1
  859. package/build-module/hooks/style.js +2 -1
  860. package/build-module/hooks/style.js.map +1 -1
  861. package/build-module/hooks/supports.js +1 -0
  862. package/build-module/hooks/supports.js.map +1 -1
  863. package/build-module/hooks/text-align.js +1 -0
  864. package/build-module/hooks/text-align.js.map +1 -1
  865. package/build-module/hooks/typography.js +1 -0
  866. package/build-module/hooks/typography.js.map +1 -1
  867. package/build-module/hooks/use-bindings-attributes.js +1 -0
  868. package/build-module/hooks/use-bindings-attributes.js.map +1 -1
  869. package/build-module/hooks/use-zoom-out.js +48 -15
  870. package/build-module/hooks/use-zoom-out.js.map +1 -1
  871. package/build-module/hooks/utils.js +1 -0
  872. package/build-module/hooks/utils.js.map +1 -1
  873. package/build-module/layouts/constrained.js +1 -0
  874. package/build-module/layouts/constrained.js.map +1 -1
  875. package/build-module/layouts/flex.js +1 -0
  876. package/build-module/layouts/flex.js.map +1 -1
  877. package/build-module/layouts/flow.js +1 -0
  878. package/build-module/layouts/flow.js.map +1 -1
  879. package/build-module/layouts/index.js +1 -0
  880. package/build-module/layouts/index.js.map +1 -1
  881. package/build-module/layouts/utils.js +1 -0
  882. package/build-module/layouts/utils.js.map +1 -1
  883. package/build-module/store/actions.js +1 -0
  884. package/build-module/store/actions.js.map +1 -1
  885. package/build-module/store/get-block-settings.js +1 -0
  886. package/build-module/store/get-block-settings.js.map +1 -1
  887. package/build-module/store/private-actions.js +1 -0
  888. package/build-module/store/private-actions.js.map +1 -1
  889. package/build-module/store/private-selectors.js +1 -0
  890. package/build-module/store/private-selectors.js.map +1 -1
  891. package/build-module/store/reducer.js +1 -0
  892. package/build-module/store/reducer.js.map +1 -1
  893. package/build-module/store/selectors.js +13 -15
  894. package/build-module/store/selectors.js.map +1 -1
  895. package/build-module/store/utils.js +1 -0
  896. package/build-module/store/utils.js.map +1 -1
  897. package/build-module/utils/block-bindings.js +1 -0
  898. package/build-module/utils/block-bindings.js.map +1 -1
  899. package/build-module/utils/get-editor-region.js +1 -0
  900. package/build-module/utils/get-editor-region.js.map +1 -1
  901. package/build-module/utils/get-font-styles-and-weights.js +1 -0
  902. package/build-module/utils/get-font-styles-and-weights.js.map +1 -1
  903. package/build-module/utils/math.js +1 -0
  904. package/build-module/utils/math.js.map +1 -1
  905. package/build-module/utils/object.js +1 -0
  906. package/build-module/utils/object.js.map +1 -1
  907. package/build-module/utils/selection.js +1 -0
  908. package/build-module/utils/selection.js.map +1 -1
  909. package/build-module/utils/transform-styles/index.js +1 -0
  910. package/build-module/utils/transform-styles/index.js.map +1 -1
  911. package/build-style/content-rtl.css +1 -1
  912. package/build-style/content.css +1 -1
  913. package/build-style/style-rtl.css +26 -48
  914. package/build-style/style.css +26 -48
  915. package/package.json +32 -32
  916. package/src/components/alignment-control/stories/aliginment-toolbar.story.js +2 -2
  917. package/src/components/alignment-control/stories/index.story.js +2 -2
  918. package/src/components/block-heading-level-dropdown/stories/index.story.js +61 -0
  919. package/src/components/block-list/use-block-props/index.js +2 -4
  920. package/src/components/block-list/use-block-props/use-firefox-draggable-compatibility.js +64 -6
  921. package/src/components/block-lock/modal.js +4 -6
  922. package/src/components/block-parent-selector/index.js +1 -19
  923. package/src/components/block-patterns-list/stories/fixtures.js +1 -0
  924. package/src/components/block-toolbar/index.js +1 -0
  925. package/src/components/colors-gradients/style.scss +21 -0
  926. package/src/components/dimensions-tool/stories/aspect-ratio-tool.story.js +1 -1
  927. package/src/components/dimensions-tool/stories/index.story.js +1 -1
  928. package/src/components/dimensions-tool/stories/scale-tool.story.js +1 -1
  929. package/src/components/dimensions-tool/stories/width-height-tool.story.js +1 -1
  930. package/src/components/global-styles/color-panel.js +26 -7
  931. package/src/components/global-styles/filters-panel.js +3 -6
  932. package/src/components/global-styles/use-global-styles-output.js +1 -1
  933. package/src/components/index.js +7 -4
  934. package/src/components/inserter/block-types-tab.js +1 -1
  935. package/src/components/inserter/menu.js +2 -0
  936. package/src/components/inspector-controls/slot.js +3 -22
  937. package/src/components/link-control/index.js +10 -0
  938. package/src/components/link-control/search-input.js +9 -0
  939. package/src/components/link-control/search-item.js +9 -0
  940. package/src/components/link-control/search-results.js +12 -1
  941. package/src/components/multi-selection-inspector/index.js +17 -27
  942. package/src/components/multi-selection-inspector/style.scss +0 -12
  943. package/src/components/resolution-tool/stories/index.story.js +1 -1
  944. package/src/components/spacing-sizes-control/style.scss +0 -29
  945. package/src/components/text-alignment-control/stories/index.story.js +1 -1
  946. package/src/components/warning/index.js +3 -4
  947. package/src/components/warning/test/index.js +3 -1
  948. package/src/components/writing-mode-control/stories/index.story.js +56 -0
  949. package/src/hooks/style.js +1 -1
  950. package/src/hooks/test/font-size.js +15 -12
  951. package/src/hooks/use-zoom-out.js +48 -16
  952. package/src/store/selectors.js +26 -24
  953. package/src/store/test/selectors.js +1 -1
  954. package/tsconfig.tsbuildinfo +1 -1
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  /**
2
3
  * WordPress dependencies
3
4
  */
@@ -1 +1 @@
1
- {"version":3,"names":["parse","grammarParse","selectBlockPatternsKey","unlock","STORE_NAME","getSectionRootClientId","isFiltered","Symbol","parsedPatternCache","WeakMap","grammarMapCache","parsePattern","pattern","blocks","content","__unstableSkipMigrationLogs","length","attributes","metadata","categories","patternName","name","title","getParsedPattern","parsedPattern","get","set","getGrammar","grammarMap","filter","block","blockName","checkAllowList","list","item","defaultResult","Array","isArray","includes","checkAllowListRecursive","allowedBlockTypes","blocksQueue","shift","isAllowed","innerBlocks","forEach","innerBlock","push","getAllPatternsDependants","select","state","settings","__experimentalBlockPatterns","__experimentalUserPatternCategories","__experimentalReusableBlocks","blockPatterns","getReusableBlocks","getInsertBlockTypeDependants","rootClientId","blockListSettings","byClientId","templateLock","blockEditingModes","__unstableGetEditorMode"],"sources":["@wordpress/block-editor/src/store/utils.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { parse } from '@wordpress/blocks';\nimport { parse as grammarParse } from '@wordpress/block-serialization-default-parser';\n\n/**\n * Internal dependencies\n */\nimport { selectBlockPatternsKey } from './private-keys';\nimport { unlock } from '../lock-unlock';\nimport { STORE_NAME } from './constants';\nimport { getSectionRootClientId } from './private-selectors';\n\nexport const isFiltered = Symbol( 'isFiltered' );\nconst parsedPatternCache = new WeakMap();\nconst grammarMapCache = new WeakMap();\n\nfunction parsePattern( pattern ) {\n\tconst blocks = parse( pattern.content, {\n\t\t__unstableSkipMigrationLogs: true,\n\t} );\n\tif ( blocks.length === 1 ) {\n\t\tblocks[ 0 ].attributes = {\n\t\t\t...blocks[ 0 ].attributes,\n\t\t\tmetadata: {\n\t\t\t\t...( blocks[ 0 ].attributes.metadata || {} ),\n\t\t\t\tcategories: pattern.categories,\n\t\t\t\tpatternName: pattern.name,\n\t\t\t\tname: blocks[ 0 ].attributes.metadata?.name || pattern.title,\n\t\t\t},\n\t\t};\n\t}\n\treturn {\n\t\t...pattern,\n\t\tblocks,\n\t};\n}\n\nexport function getParsedPattern( pattern ) {\n\tlet parsedPattern = parsedPatternCache.get( pattern );\n\tif ( ! parsedPattern ) {\n\t\tparsedPattern = parsePattern( pattern );\n\t\tparsedPatternCache.set( pattern, parsedPattern );\n\t}\n\treturn parsedPattern;\n}\n\nexport function getGrammar( pattern ) {\n\tlet grammarMap = grammarMapCache.get( pattern );\n\tif ( ! grammarMap ) {\n\t\tgrammarMap = grammarParse( pattern.content );\n\t\t// Block names are null only at the top level for whitespace.\n\t\tgrammarMap = grammarMap.filter( ( block ) => block.blockName !== null );\n\t\tgrammarMapCache.set( pattern, grammarMap );\n\t}\n\treturn grammarMap;\n}\n\nexport const checkAllowList = ( list, item, defaultResult = null ) => {\n\tif ( typeof list === 'boolean' ) {\n\t\treturn list;\n\t}\n\tif ( Array.isArray( list ) ) {\n\t\t// TODO: when there is a canonical way to detect that we are editing a post\n\t\t// the following check should be changed to something like:\n\t\t// if ( list.includes( 'core/post-content' ) && getEditorMode() === 'post-content' && item === null )\n\t\tif ( list.includes( 'core/post-content' ) && item === null ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn list.includes( item );\n\t}\n\treturn defaultResult;\n};\n\nexport const checkAllowListRecursive = ( blocks, allowedBlockTypes ) => {\n\tif ( typeof allowedBlockTypes === 'boolean' ) {\n\t\treturn allowedBlockTypes;\n\t}\n\n\tconst blocksQueue = [ ...blocks ];\n\twhile ( blocksQueue.length > 0 ) {\n\t\tconst block = blocksQueue.shift();\n\n\t\tconst isAllowed = checkAllowList(\n\t\t\tallowedBlockTypes,\n\t\t\tblock.name || block.blockName,\n\t\t\ttrue\n\t\t);\n\t\tif ( ! isAllowed ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tblock.innerBlocks?.forEach( ( innerBlock ) => {\n\t\t\tblocksQueue.push( innerBlock );\n\t\t} );\n\t}\n\n\treturn true;\n};\n\nexport const getAllPatternsDependants = ( select ) => ( state ) => {\n\treturn [\n\t\tstate.settings.__experimentalBlockPatterns,\n\t\tstate.settings.__experimentalUserPatternCategories,\n\t\tstate.settings.__experimentalReusableBlocks,\n\t\tstate.settings[ selectBlockPatternsKey ]?.( select ),\n\t\tstate.blockPatterns,\n\t\tunlock( select( STORE_NAME ) ).getReusableBlocks(),\n\t];\n};\n\nexport const getInsertBlockTypeDependants =\n\t( select ) => ( state, rootClientId ) => {\n\t\treturn [\n\t\t\tstate.blockListSettings[ rootClientId ],\n\t\t\tstate.blocks.byClientId.get( rootClientId ),\n\t\t\tstate.settings.allowedBlockTypes,\n\t\t\tstate.settings.templateLock,\n\t\t\tstate.blockEditingModes,\n\t\t\tselect( STORE_NAME ).__unstableGetEditorMode( state ),\n\t\t\tgetSectionRootClientId( state ),\n\t\t];\n\t};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,QAAQ,mBAAmB;AACzC,SAASA,KAAK,IAAIC,YAAY,QAAQ,+CAA+C;;AAErF;AACA;AACA;AACA,SAASC,sBAAsB,QAAQ,gBAAgB;AACvD,SAASC,MAAM,QAAQ,gBAAgB;AACvC,SAASC,UAAU,QAAQ,aAAa;AACxC,SAASC,sBAAsB,QAAQ,qBAAqB;AAE5D,OAAO,MAAMC,UAAU,GAAGC,MAAM,CAAE,YAAa,CAAC;AAChD,MAAMC,kBAAkB,GAAG,IAAIC,OAAO,CAAC,CAAC;AACxC,MAAMC,eAAe,GAAG,IAAID,OAAO,CAAC,CAAC;AAErC,SAASE,YAAYA,CAAEC,OAAO,EAAG;EAChC,MAAMC,MAAM,GAAGb,KAAK,CAAEY,OAAO,CAACE,OAAO,EAAE;IACtCC,2BAA2B,EAAE;EAC9B,CAAE,CAAC;EACH,IAAKF,MAAM,CAACG,MAAM,KAAK,CAAC,EAAG;IAC1BH,MAAM,CAAE,CAAC,CAAE,CAACI,UAAU,GAAG;MACxB,GAAGJ,MAAM,CAAE,CAAC,CAAE,CAACI,UAAU;MACzBC,QAAQ,EAAE;QACT,IAAKL,MAAM,CAAE,CAAC,CAAE,CAACI,UAAU,CAACC,QAAQ,IAAI,CAAC,CAAC,CAAE;QAC5CC,UAAU,EAAEP,OAAO,CAACO,UAA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AACS,iBAAiB,CAAED,YAAY,CAAE,EACvCR,KAAK,CAACrC,MAAM,CAAC+C,UAAU,CAACnC,GAAG,CAAEiC,YAAa,CAAC,EAC3CR,KAAK,CAACC,QAAQ,CAACX,iBAAiB,EAChCU,KAAK,CAACC,QAAQ,CAACU,YAAY,EAC3BX,KAAK,CAACY,iBAAiB,EACvBb,MAAM,CAAE7C,UAAW,CAAC,CAAC2D,uBAAuB,CAAEb,KAAM,CAAC,EACrD7C,sBAAsB,CAAE6C,KAAM,CAAC,CAC/B;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["parse","grammarParse","selectBlockPatternsKey","unlock","STORE_NAME","getSectionRootClientId","isFiltered","Symbol","parsedPatternCache","WeakMap","grammarMapCache","parsePattern","pattern","blocks","content","__unstableSkipMigrationLogs","length","attributes","metadata","categories","patternName","name","title","getParsedPattern","parsedPattern","get","set","getGrammar","grammarMap","filter","block","blockName","checkAllowList","list","item","defaultResult","Array","isArray","includes","checkAllowListRecursive","allowedBlockTypes","blocksQueue","shift","isAllowed","innerBlocks","forEach","innerBlock","push","getAllPatternsDependants","select","state","settings","__experimentalBlockPatterns","__experimentalUserPatternCategories","__experimentalReusableBlocks","blockPatterns","getReusableBlocks","getInsertBlockTypeDependants","rootClientId","blockListSettings","byClientId","templateLock","blockEditingModes","__unstableGetEditorMode"],"sources":["@wordpress/block-editor/src/store/utils.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { parse } from '@wordpress/blocks';\nimport { parse as grammarParse } from '@wordpress/block-serialization-default-parser';\n\n/**\n * Internal dependencies\n */\nimport { selectBlockPatternsKey } from './private-keys';\nimport { unlock } from '../lock-unlock';\nimport { STORE_NAME } from './constants';\nimport { getSectionRootClientId } from './private-selectors';\n\nexport const isFiltered = Symbol( 'isFiltered' );\nconst parsedPatternCache = new WeakMap();\nconst grammarMapCache = new WeakMap();\n\nfunction parsePattern( pattern ) {\n\tconst blocks = parse( pattern.content, {\n\t\t__unstableSkipMigrationLogs: true,\n\t} );\n\tif ( blocks.length === 1 ) {\n\t\tblocks[ 0 ].attributes = {\n\t\t\t...blocks[ 0 ].attributes,\n\t\t\tmetadata: {\n\t\t\t\t...( blocks[ 0 ].attributes.metadata || {} ),\n\t\t\t\tcategories: pattern.categories,\n\t\t\t\tpatternName: pattern.name,\n\t\t\t\tname: blocks[ 0 ].attributes.metadata?.name || pattern.title,\n\t\t\t},\n\t\t};\n\t}\n\treturn {\n\t\t...pattern,\n\t\tblocks,\n\t};\n}\n\nexport function getParsedPattern( pattern ) {\n\tlet parsedPattern = parsedPatternCache.get( pattern );\n\tif ( ! parsedPattern ) {\n\t\tparsedPattern = parsePattern( pattern );\n\t\tparsedPatternCache.set( pattern, parsedPattern );\n\t}\n\treturn parsedPattern;\n}\n\nexport function getGrammar( pattern ) {\n\tlet grammarMap = grammarMapCache.get( pattern );\n\tif ( ! grammarMap ) {\n\t\tgrammarMap = grammarParse( pattern.content );\n\t\t// Block names are null only at the top level for whitespace.\n\t\tgrammarMap = grammarMap.filter( ( block ) => block.blockName !== null );\n\t\tgrammarMapCache.set( pattern, grammarMap );\n\t}\n\treturn grammarMap;\n}\n\nexport const checkAllowList = ( list, item, defaultResult = null ) => {\n\tif ( typeof list === 'boolean' ) {\n\t\treturn list;\n\t}\n\tif ( Array.isArray( list ) ) {\n\t\t// TODO: when there is a canonical way to detect that we are editing a post\n\t\t// the following check should be changed to something like:\n\t\t// if ( list.includes( 'core/post-content' ) && getEditorMode() === 'post-content' && item === null )\n\t\tif ( list.includes( 'core/post-content' ) && item === null ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn list.includes( item );\n\t}\n\treturn defaultResult;\n};\n\nexport const checkAllowListRecursive = ( blocks, allowedBlockTypes ) => {\n\tif ( typeof allowedBlockTypes === 'boolean' ) {\n\t\treturn allowedBlockTypes;\n\t}\n\n\tconst blocksQueue = [ ...blocks ];\n\twhile ( blocksQueue.length > 0 ) {\n\t\tconst block = blocksQueue.shift();\n\n\t\tconst isAllowed = checkAllowList(\n\t\t\tallowedBlockTypes,\n\t\t\tblock.name || block.blockName,\n\t\t\ttrue\n\t\t);\n\t\tif ( ! isAllowed ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tblock.innerBlocks?.forEach( ( innerBlock ) => {\n\t\t\tblocksQueue.push( innerBlock );\n\t\t} );\n\t}\n\n\treturn true;\n};\n\nexport const getAllPatternsDependants = ( select ) => ( state ) => {\n\treturn [\n\t\tstate.settings.__experimentalBlockPatterns,\n\t\tstate.settings.__experimentalUserPatternCategories,\n\t\tstate.settings.__experimentalReusableBlocks,\n\t\tstate.settings[ selectBlockPatternsKey ]?.( select ),\n\t\tstate.blockPatterns,\n\t\tunlock( select( STORE_NAME ) ).getReusableBlocks(),\n\t];\n};\n\nexport const getInsertBlockTypeDependants =\n\t( select ) => ( state, rootClientId ) => {\n\t\treturn [\n\t\t\tstate.blockListSettings[ rootClientId ],\n\t\t\tstate.blocks.byClientId.get( rootClientId ),\n\t\t\tstate.settings.allowedBlockTypes,\n\t\t\tstate.settings.templateLock,\n\t\t\tstate.blockEditingModes,\n\t\t\tselect( STORE_NAME ).__unstableGetEditorMode( state ),\n\t\t\tgetSectionRootClientId( state ),\n\t\t];\n\t};\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,KAAK,QAAQ,mBAAmB;AACzC,SAASA,KAAK,IAAIC,YAAY,QAAQ,+CAA+C;;AAErF;AACA;AACA;AACA,SAASC,sBAAsB,QAAQ,gBAAgB;AACvD,SAASC,MAAM,QAAQ,gBAAgB;AACvC,SAASC,UAAU,QAAQ,aAAa;AACxC,SAASC,sBAAsB,QAAQ,qBAAqB;AAE5D,OAAO,MAAMC,UAAU,GAAGC,MAAM,CAAE,YAAa,CAAC;AAChD,MAAMC,kBAAkB,GAAG,IAAIC,OAAO,CAAC,CAAC;AACxC,MAAMC,eAAe,GAAG,IAAID,OAAO,CAAC,CAAC;AAErC,SAASE,YAAYA,CAAEC,OAAO,EAAG;EAChC,MAAMC,MAAM,G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KAAK,CAACC,QAAQ,CAACE,mCAAmC,EAClDH,KAAK,CAACC,QAAQ,CAACG,4BAA4B,EAC3CJ,KAAK,CAACC,QAAQ,CAAEjD,sBAAsB,CAAE,GAAI+C,MAAO,CAAC,EACpDC,KAAK,CAACK,aAAa,EACnBpD,MAAM,CAAE8C,MAAM,CAAE7C,UAAW,CAAE,CAAC,CAACoD,iBAAiB,CAAC,CAAC,CAClD;AACF,CAAC;AAED,OAAO,MAAMC,4BAA4B,GACtCR,MAAM,IAAM,CAAEC,KAAK,EAAEQ,YAAY,KAAM;EACxC,OAAO,CACNR,KAAK,CAACS,iBAAiB,CAAED,YAAY,CAAE,EACvCR,KAAK,CAACrC,MAAM,CAAC+C,UAAU,CAACnC,GAAG,CAAEiC,YAAa,CAAC,EAC3CR,KAAK,CAACC,QAAQ,CAACX,iBAAiB,EAChCU,KAAK,CAACC,QAAQ,CAACU,YAAY,EAC3BX,KAAK,CAACY,iBAAiB,EACvBb,MAAM,CAAE7C,UAAW,CAAC,CAAC2D,uBAAuB,CAAEb,KAAM,CAAC,EACrD7C,sBAAsB,CAAE6C,KAAM,CAAC,CAC/B;AACF,CAAC","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  /**
2
3
  * WordPress dependencies
3
4
  */
@@ -1 +1 @@
1
- {"version":3,"names":["useDispatch","useRegistry","store","blockEditorStore","useBlockEditContext","isObjectEmpty","object","Object","keys","length","useBlockBindingsUtils","clientId","contextClientId","blockClientId","updateBlockAttributes","getBlockAttributes","select","updateBlockBindings","bindings","metadata","currentBindings","newBindings","entries","forEach","attribute","binding","newMetadata","undefined","removeAllBlockBindings"],"sources":["@wordpress/block-editor/src/utils/block-bindings.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch, useRegistry } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../store';\nimport { useBlockEditContext } from '../components/block-edit';\n\nfunction isObjectEmpty( object ) {\n\treturn ! object || Object.keys( object ).length === 0;\n}\n\n/**\n * Contains utils to update the block `bindings` metadata.\n *\n * @typedef {Object} WPBlockBindingsUtils\n *\n * @property {Function} updateBlockBindings Updates the value of the bindings connected to block attributes.\n * @property {Function} removeAllBlockBindings Removes the bindings property of the `metadata` attribute.\n */\n\n/**\n * Retrieves the existing utils needed to update the block `bindings` metadata.\n * They can be used to create, modify, or remove connections from the existing block attributes.\n *\n * It contains the following utils:\n * - `updateBlockBindings`: Updates the value of the bindings connected to block attributes. It can be used to remove a specific binding by setting the value to `undefined`.\n * - `removeAllBlockBindings`: Removes the bindings property of the `metadata` attribute.\n *\n * @since 6.7.0 Introduced in WordPress core.\n *\n * @param {?string} clientId Optional block client ID. If not set, it will use the current block client ID from the context.\n *\n * @return {?WPBlockBindingsUtils} Object containing the block bindings utils.\n *\n * @example\n * ```js\n * import { useBlockBindingsUtils } from '@wordpress/block-editor'\n * const { updateBlockBindings, removeAllBlockBindings } = useBlockBindingsUtils();\n *\n * // Update url and alt attributes.\n * updateBlockBindings( {\n * url: {\n * source: 'core/post-meta',\n * args: {\n * key: 'url_custom_field',\n * },\n * },\n * alt: {\n * source: 'core/post-meta',\n * args: {\n * key: 'text_custom_field',\n * },\n * },\n * } );\n *\n * // Remove binding from url attribute.\n * updateBlockBindings( { url: undefined } );\n *\n * // Remove bindings from all attributes.\n * removeAllBlockBindings();\n * ```\n */\nexport function useBlockBindingsUtils( clientId ) {\n\tconst { clientId: contextClientId } = useBlockEditContext();\n\tconst blockClientId = clientId || contextClientId;\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\tconst { getBlockAttributes } = useRegistry().select( blockEditorStore );\n\n\t/**\n\t * Updates the value of the bindings connected to block attributes.\n\t * It removes the binding when the new value is `undefined`.\n\t *\n\t * @param {Object} bindings Bindings including the attributes to update and the new object.\n\t * @param {string} bindings.source The source name to connect to.\n\t * @param {Object} [bindings.args] Object containing the arguments needed by the source.\n\t *\n\t * @example\n\t * ```js\n\t * import { useBlockBindingsUtils } from '@wordpress/block-editor'\n\t *\n\t * const { updateBlockBindings } = useBlockBindingsUtils();\n\t * updateBlockBindings( {\n\t * url: {\n\t * source: 'core/post-meta',\n\t * args: {\n\t * key: 'url_custom_field',\n\t * },\n\t * \t },\n\t * alt: {\n\t * source: 'core/post-meta',\n\t * args: {\n\t * key: 'text_custom_field',\n\t * },\n\t * \t }\n\t * } );\n\t * ```\n\t */\n\tconst updateBlockBindings = ( bindings ) => {\n\t\tconst { metadata: { bindings: currentBindings, ...metadata } = {} } =\n\t\t\tgetBlockAttributes( blockClientId );\n\t\tconst newBindings = { ...currentBindings };\n\n\t\tObject.entries( bindings ).forEach( ( [ attribute, binding ] ) => {\n\t\t\tif ( ! binding && newBindings[ attribute ] ) {\n\t\t\t\tdelete newBindings[ attribute ];\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tnewBindings[ attribute ] = binding;\n\t\t} );\n\n\t\tconst newMetadata = {\n\t\t\t...metadata,\n\t\t\tbindings: newBindings,\n\t\t};\n\n\t\tif ( isObjectEmpty( newMetadata.bindings ) ) {\n\t\t\tdelete newMetadata.bindings;\n\t\t}\n\n\t\tupdateBlockAttributes( blockClientId, {\n\t\t\tmetadata: isObjectEmpty( newMetadata ) ? undefined : newMetadata,\n\t\t} );\n\t};\n\n\t/**\n\t * Removes the bindings property of the `metadata` attribute.\n\t *\n\t * @example\n\t * ```js\n\t * import { useBlockBindingsUtils } from '@wordpress/block-editor'\n\t *\n\t * const { removeAllBlockBindings } = useBlockBindingsUtils();\n\t * removeAllBlockBindings();\n\t * ```\n\t */\n\tconst removeAllBlockBindings = () => {\n\t\tconst { metadata: { bindings, ...metadata } = {} } =\n\t\t\tgetBlockAttributes( blockClientId );\n\t\tupdateBlockAttributes( blockClientId, {\n\t\t\tmetadata: isObjectEmpty( metadata ) ? undefined : metadata,\n\t\t} );\n\t};\n\n\treturn { updateBlockBindings, removeAllBlockBindings };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA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IAE1Cb,MAAM,CAACe,OAAO,CAAEJ,QAAS,CAAC,CAACK,OAAO,CAAE,CAAE,CAAEC,SAAS,EAAEC,OAAO,CAAE,KAAM;MACjE,IAAK,CAAEA,OAAO,IAAIJ,WAAW,CAAEG,SAAS,CAAE,EAAG;QAC5C,OAAOH,WAAW,CAAEG,SAAS,CAAE;QAC/B;MACD;MACAH,WAAW,CAAEG,SAAS,CAAE,GAAGC,OAAO;IACnC,CAAE,CAAC;IAEH,MAAMC,WAAW,GAAG;MACnB,GAAGP,QAAQ;MACXD,QAAQ,EAAEG;IACX,CAAC;IAED,IAAKhB,aAAa,CAAEqB,WAAW,CAACR,QAAS,CAAC,EAAG;MAC5C,OAAOQ,WAAW,CAACR,QAAQ;IAC5B;IAEAJ,qBAAqB,CAAED,aAAa,EAAE;MACrCM,QAAQ,EAAEd,aAAa,CAAEqB,WAAY,CAAC,GAAGC,SAAS,GAAGD;IACtD,CAAE,CAAC;EACJ,CAAC;;EAED;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACC,MAAME,sBAAsB,GAAGA,CAAA,KAAM;IACpC,MAAM;MAAET,QAAQ,EAAE;QAAED,QAAQ;QAAE,GAAGC;MAAS,CAAC,GAAG,CAAC;IAAE,CAAC,GACjDJ,kBAAkB,CAAEF,aAAc,CAAC;IACpCC,qBAAqB,CAAED,aAAa,EAAE;MACrCM,QAAQ,EAAEd,aAAa,CAAEc,QAAS,CAAC,GAAGQ,SAAS,GAAGR;IACnD,CAAE,CAAC;EACJ,CAAC;EAED,OAAO;IAAEF,mBAAmB;IAAEW;EAAuB,CAAC;AACvD","ignoreList":[]}
1
+ {"version":3,"names":["useDispatch","useRegistry","store","blockEditorStore","useBlockEditContext","isObjectEmpty","object","Object","keys","length","useBlockBindingsUtils","clientId","contextClientId","blockClientId","updateBlockAttributes","getBlockAttributes","select","updateBlockBindings","bindings","metadata","currentBindings","newBindings","entries","forEach","attribute","binding","newMetadata","undefined","removeAllBlockBindings"],"sources":["@wordpress/block-editor/src/utils/block-bindings.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch, useRegistry } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../store';\nimport { useBlockEditContext } from '../components/block-edit';\n\nfunction isObjectEmpty( object ) {\n\treturn ! object || Object.keys( object ).length === 0;\n}\n\n/**\n * Contains utils to update the block `bindings` metadata.\n *\n * @typedef {Object} WPBlockBindingsUtils\n *\n * @property {Function} updateBlockBindings Updates the value of the bindings connected to block attributes.\n * @property {Function} removeAllBlockBindings Removes the bindings property of the `metadata` attribute.\n */\n\n/**\n * Retrieves the existing utils needed to update the block `bindings` metadata.\n * They can be used to create, modify, or remove connections from the existing block attributes.\n *\n * It contains the following utils:\n * - `updateBlockBindings`: Updates the value of the bindings connected to block attributes. It can be used to remove a specific binding by setting the value to `undefined`.\n * - `removeAllBlockBindings`: Removes the bindings property of the `metadata` attribute.\n *\n * @since 6.7.0 Introduced in WordPress core.\n *\n * @param {?string} clientId Optional block client ID. If not set, it will use the current block client ID from the context.\n *\n * @return {?WPBlockBindingsUtils} Object containing the block bindings utils.\n *\n * @example\n * ```js\n * import { useBlockBindingsUtils } from '@wordpress/block-editor'\n * const { updateBlockBindings, removeAllBlockBindings } = useBlockBindingsUtils();\n *\n * // Update url and alt attributes.\n * updateBlockBindings( {\n * url: {\n * source: 'core/post-meta',\n * args: {\n * key: 'url_custom_field',\n * },\n * },\n * alt: {\n * source: 'core/post-meta',\n * args: {\n * key: 'text_custom_field',\n * },\n * },\n * } );\n *\n * // Remove binding from url attribute.\n * updateBlockBindings( { url: undefined } );\n *\n * // Remove bindings from all attributes.\n * removeAllBlockBindings();\n * ```\n */\nexport function useBlockBindingsUtils( clientId ) {\n\tconst { clientId: contextClientId } = useBlockEditContext();\n\tconst blockClientId = clientId || contextClientId;\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\tconst { getBlockAttributes } = useRegistry().select( blockEditorStore );\n\n\t/**\n\t * Updates the value of the bindings connected to block attributes.\n\t * It removes the binding when the new value is `undefined`.\n\t *\n\t * @param {Object} bindings Bindings including the attributes to update and the new object.\n\t * @param {string} bindings.source The source name to connect to.\n\t * @param {Object} [bindings.args] Object containing the arguments needed by the source.\n\t *\n\t * @example\n\t * ```js\n\t * import { useBlockBindingsUtils } from '@wordpress/block-editor'\n\t *\n\t * const { updateBlockBindings } = useBlockBindingsUtils();\n\t * updateBlockBindings( {\n\t * url: {\n\t * source: 'core/post-meta',\n\t * args: {\n\t * key: 'url_custom_field',\n\t * },\n\t * \t },\n\t * alt: {\n\t * source: 'core/post-meta',\n\t * args: {\n\t * key: 'text_custom_field',\n\t * },\n\t * \t }\n\t * } );\n\t * ```\n\t */\n\tconst updateBlockBindings = ( bindings ) => {\n\t\tconst { metadata: { bindings: currentBindings, ...metadata } = {} } =\n\t\t\tgetBlockAttributes( blockClientId );\n\t\tconst newBindings = { ...currentBindings };\n\n\t\tObject.entries( bindings ).forEach( ( [ attribute, binding ] ) => {\n\t\t\tif ( ! binding && newBindings[ attribute ] ) {\n\t\t\t\tdelete newBindings[ attribute ];\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tnewBindings[ attribute ] = binding;\n\t\t} );\n\n\t\tconst newMetadata = {\n\t\t\t...metadata,\n\t\t\tbindings: newBindings,\n\t\t};\n\n\t\tif ( isObjectEmpty( newMetadata.bindings ) ) {\n\t\t\tdelete newMetadata.bindings;\n\t\t}\n\n\t\tupdateBlockAttributes( blockClientId, {\n\t\t\tmetadata: isObjectEmpty( newMetadata ) ? undefined : newMetadata,\n\t\t} );\n\t};\n\n\t/**\n\t * Removes the bindings property of the `metadata` attribute.\n\t *\n\t * @example\n\t * ```js\n\t * import { useBlockBindingsUtils } from '@wordpress/block-editor'\n\t *\n\t * const { removeAllBlockBindings } = useBlockBindingsUtils();\n\t * removeAllBlockBindings();\n\t * ```\n\t */\n\tconst removeAllBlockBindings = () => {\n\t\tconst { metadata: { bindings, ...metadata } = {} } =\n\t\t\tgetBlockAttributes( blockClientId );\n\t\tupdateBlockAttributes( blockClientId, {\n\t\t\tmetadata: isObjectEmpty( metadata ) ? undefined : metadata,\n\t\t} );\n\t};\n\n\treturn { updateBlockBindings, removeAllBlockBindings };\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,WAAW,EAAEC,WAAW,QAAQ,iBAAiB;;AAE1D;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,UAAU;AACpD,SAASC,mBAAmB,QAAQ,0BAA0B;AAE9D,SAASC,aAAaA,CAAEC,MAAM,EAAG;EAChC,OAAO,CAAEA,MAAM,IAAIC,MAAM,CAACC,IAAI,CAAEF,MAAO,CAAC,CAACG,MAAM,KAAK,CAAC;AACtD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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,OAAO,SAASC,qBAAqBA,CAAEC,QAAQ,EAAG;EACjD,MAAM;IAAEA,QAAQ,EAAEC;EAAgB,CAAC,GAAGR,mBAAmB,CAAC,CAAC;EAC3D,MAAMS,aAAa,GAAGF,QAAQ,IAAIC,eAAe;EACjD,MAAM;IAAEE;EAAsB,CAAC,GAAGd,WAAW,CAAEG,gBAAiB,CAAC;EACjE,MAAM;IAAEY;EAAmB,CAAC,GAAGd,WAAW,CAAC,CAAC,CAACe,MAAM,CAAEb,gBAAiB,CAAC;;EAEvE;AACD;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;EACC,MAAMc,mBAAmB,GAAKC,QAAQ,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3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  /**
2
3
  * Gets the editor region for a given editor canvas element or
3
4
  * returns the passed element if no region is found
@@ -1 +1 @@
1
- {"version":3,"names":["getEditorRegion","editor","_Array$from$find","_editorCanvas$closest","editorCanvas","Array","from","document","querySelectorAll","values","find","iframe","iframeDocument","contentDocument","contentWindow","ownerDocument","closest"],"sources":["@wordpress/block-editor/src/utils/get-editor-region.js"],"sourcesContent":["/**\n * Gets the editor region for a given editor canvas element or\n * returns the passed element if no region is found\n *\n * @param { Object } editor The editor canvas element.\n * @return { Object } The editor region or given editor element\n */\nexport default function getEditorRegion( editor ) {\n\tif ( ! editor ) {\n\t\treturn null;\n\t}\n\n\t// If there are multiple editors, we need to find the iframe that contains our contentRef to make sure\n\t// we're focusing the region that contains this editor.\n\tconst editorCanvas =\n\t\tArray.from(\n\t\t\tdocument.querySelectorAll( 'iframe[name=\"editor-canvas\"]' ).values()\n\t\t).find( ( iframe ) => {\n\t\t\t// Find the iframe that contains our contentRef\n\t\t\tconst iframeDocument =\n\t\t\t\tiframe.contentDocument || iframe.contentWindow.document;\n\n\t\t\treturn iframeDocument === editor.ownerDocument;\n\t\t} ) ?? editor;\n\n\t// The region is provided by the editor, not the block-editor.\n\t// We should send focus to the region if one is available to reuse the\n\t// same interface for navigating landmarks. If no region is available,\n\t// use the canvas instead.\n\treturn editorCanvas?.closest( '[role=\"region\"]' ) ?? editorCanvas;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASA,eAAeA,CAAEC,MAAM,EAAG;EAAA,IAAAC,gBAAA,EAAAC,qBAAA;EACjD,IAAK,CAAEF,MAAM,EAAG;IACf,OAAO,IAAI;EACZ;;EAEA;EACA;EACA,MAAMG,YAAY,IAAAF,gBAAA,GACjBG,KAAK,CAACC,IAAI,CACTC,QAAQ,CAACC,gBAAgB,CAAE,8BAA+B,CAAC,CAACC,MAAM,CAAC,CACpE,CAAC,CAACC,IAAI,CAAIC,MAAM,IAAM;IACrB;IACA,MAAMC,cAAc,GACnBD,MAAM,CAACE,eAAe,IAAIF,MAAM,CAACG,aAAa,CAACP,QAAQ;IAExD,OAAOK,cAAc,KAAKX,MAAM,CAACc,aAAa;EAC/C,CAAE,CAAC,cAAAb,gBAAA,cAAAA,gBAAA,GAAID,MAAM;;EAEd;EACA;EACA;EACA;EACA,QAAAE,qBAAA,GAAOC,YAAY,EAAEY,OAAO,CAAE,iBAAkB,CAAC,cAAAb,qBAAA,cAAAA,qBAAA,GAAIC,YAAY;AAClE","ignoreList":[]}
1
+ {"version":3,"names":["getEditorRegion","editor","_Array$from$find","_editorCanvas$closest","editorCanvas","Array","from","document","querySelectorAll","values","find","iframe","iframeDocument","contentDocument","contentWindow","ownerDocument","closest"],"sources":["@wordpress/block-editor/src/utils/get-editor-region.js"],"sourcesContent":["/**\n * Gets the editor region for a given editor canvas element or\n * returns the passed element if no region is found\n *\n * @param { Object } editor The editor canvas element.\n * @return { Object } The editor region or given editor element\n */\nexport default function getEditorRegion( editor ) {\n\tif ( ! editor ) {\n\t\treturn null;\n\t}\n\n\t// If there are multiple editors, we need to find the iframe that contains our contentRef to make sure\n\t// we're focusing the region that contains this editor.\n\tconst editorCanvas =\n\t\tArray.from(\n\t\t\tdocument.querySelectorAll( 'iframe[name=\"editor-canvas\"]' ).values()\n\t\t).find( ( iframe ) => {\n\t\t\t// Find the iframe that contains our contentRef\n\t\t\tconst iframeDocument =\n\t\t\t\tiframe.contentDocument || iframe.contentWindow.document;\n\n\t\t\treturn iframeDocument === editor.ownerDocument;\n\t\t} ) ?? editor;\n\n\t// The region is provided by the editor, not the block-editor.\n\t// We should send focus to the region if one is available to reuse the\n\t// same interface for navigating landmarks. If no region is available,\n\t// use the canvas instead.\n\treturn editorCanvas?.closest( '[role=\"region\"]' ) ?? editorCanvas;\n}\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASA,eAAeA,CAAEC,MAAM,EAAG;EAAA,IAAAC,gBAAA,EAAAC,qBAAA;EACjD,IAAK,CAAEF,MAAM,EAAG;IACf,OAAO,IAAI;EACZ;;EAEA;EACA;EACA,MAAMG,YAAY,IAAAF,gBAAA,GACjBG,KAAK,CAACC,IAAI,CACTC,QAAQ,CAACC,gBAAgB,CAAE,8BAA+B,CAAC,CAACC,MAAM,CAAC,CACpE,CAAC,CAACC,IAAI,CAAIC,MAAM,IAAM;IACrB;IACA,MAAMC,cAAc,GACnBD,MAAM,CAACE,eAAe,IAAIF,MAAM,CAACG,aAAa,CAACP,QAAQ;IAExD,OAAOK,cAAc,KAAKX,MAAM,CAACc,aAAa;EAC/C,CAAE,CAAC,cAAAb,gBAAA,cAAAA,gBAAA,GAAID,MAAM;;EAEd;EACA;EACA;EACA;EACA,QAAAE,qBAAA,GAAOC,YAAY,EAAEY,OAAO,CAAE,iBAAkB,CAAC,cAAAb,qBAAA,cAAAA,qBAAA,GAAIC,YAAY;AAClE","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  /**
2
3
  * WordPress dependencies
3
4
  */
@@ -1 +1 @@
1
- {"version":3,"names":["_x","sprintf","formatFontStyle","formatFontWeight","FONT_STYLES","name","value","FONT_WEIGHTS","getFontStylesAndWeights","fontFamilyFaces","fontStyles","fontWeights","combinedStyleAndWeightOptions","isSystemFont","length","isVariableFont","forEach","face","fontWeight","test","trim","startValue","endValue","split","parseInt","slice","i","fontWeightValue","toString","some","weight","push","fontStyle","Object","keys","style","styleName","styleValue","weightName","weightValue","optionName","key"],"sources":["@wordpress/block-editor/src/utils/get-font-styles-and-weights.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { _x, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { formatFontStyle } from './format-font-style';\nimport { formatFontWeight } from './format-font-weight';\n\nconst FONT_STYLES = [\n\t{\n\t\tname: _x( 'Regular', 'font style' ),\n\t\tvalue: 'normal',\n\t},\n\t{\n\t\tname: _x( 'Italic', 'font style' ),\n\t\tvalue: 'italic',\n\t},\n];\n\nconst FONT_WEIGHTS = [\n\t{\n\t\tname: _x( 'Thin', 'font weight' ),\n\t\tvalue: '100',\n\t},\n\t{\n\t\tname: _x( 'Extra Light', 'font weight' ),\n\t\tvalue: '200',\n\t},\n\t{\n\t\tname: _x( 'Light', 'font weight' ),\n\t\tvalue: '300',\n\t},\n\t{\n\t\tname: _x( 'Regular', 'font weight' ),\n\t\tvalue: '400',\n\t},\n\t{\n\t\tname: _x( 'Medium', 'font weight' ),\n\t\tvalue: '500',\n\t},\n\t{\n\t\tname: _x( 'Semi Bold', 'font weight' ),\n\t\tvalue: '600',\n\t},\n\t{\n\t\tname: _x( 'Bold', 'font weight' ),\n\t\tvalue: '700',\n\t},\n\t{\n\t\tname: _x( 'Extra Bold', 'font weight' ),\n\t\tvalue: '800',\n\t},\n\t{\n\t\tname: _x( 'Black', 'font weight' ),\n\t\tvalue: '900',\n\t},\n\t{\n\t\tname: _x( 'Extra Black', 'font weight' ),\n\t\tvalue: '1000',\n\t},\n];\n\n/**\n * Builds a list of font style and weight options based on font family faces.\n * Defaults to the standard font styles and weights if no font family faces are provided.\n *\n * @param {Array} fontFamilyFaces font family faces array\n * @return {Object} new object with combined and separated font style and weight properties\n */\nexport function getFontStylesAndWeights( fontFamilyFaces ) {\n\tlet fontStyles = [];\n\tlet fontWeights = [];\n\tconst combinedStyleAndWeightOptions = [];\n\tconst isSystemFont = ! fontFamilyFaces || fontFamilyFaces?.length === 0;\n\tlet isVariableFont = false;\n\n\tfontFamilyFaces?.forEach( ( face ) => {\n\t\t// Check for variable font by looking for a space in the font weight value. e.g. \"100 900\"\n\t\tif (\n\t\t\t'string' === typeof face.fontWeight &&\n\t\t\t/\\s/.test( face.fontWeight.trim() )\n\t\t) {\n\t\t\tisVariableFont = true;\n\n\t\t\t// Find font weight start and end values.\n\t\t\tlet [ startValue, endValue ] = face.fontWeight.split( ' ' );\n\t\t\tstartValue = parseInt( startValue.slice( 0, 1 ) );\n\t\t\tif ( endValue === '1000' ) {\n\t\t\t\tendValue = 10;\n\t\t\t} else {\n\t\t\t\tendValue = parseInt( endValue.slice( 0, 1 ) );\n\t\t\t}\n\n\t\t\t// Create font weight options for available variable weights.\n\t\t\tfor ( let i = startValue; i <= endValue; i++ ) {\n\t\t\t\tconst fontWeightValue = `${ i.toString() }00`;\n\t\t\t\tif (\n\t\t\t\t\t! fontWeights.some(\n\t\t\t\t\t\t( weight ) => weight.value === fontWeightValue\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tfontWeights.push( formatFontWeight( fontWeightValue ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Format font style and weight values.\n\t\tconst fontWeight = formatFontWeight(\n\t\t\t'number' === typeof face.fontWeight\n\t\t\t\t? face.fontWeight.toString()\n\t\t\t\t: face.fontWeight\n\t\t);\n\t\tconst fontStyle = formatFontStyle( face.fontStyle );\n\n\t\t// Create font style and font weight lists without duplicates.\n\t\tif ( fontStyle && Object.keys( fontStyle ).length ) {\n\t\t\tif (\n\t\t\t\t! fontStyles.some(\n\t\t\t\t\t( style ) => style.value === fontStyle.value\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tfontStyles.push( fontStyle );\n\t\t\t}\n\t\t}\n\n\t\tif ( fontWeight && Object.keys( fontWeight ).length ) {\n\t\t\tif (\n\t\t\t\t! fontWeights.some(\n\t\t\t\t\t( weight ) => weight.value === fontWeight.value\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tif ( ! isVariableFont ) {\n\t\t\t\t\tfontWeights.push( fontWeight );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} );\n\n\t// If there is no font weight of 600 or above, then include faux bold as an option.\n\tif ( ! fontWeights.some( ( weight ) => weight.value >= '600' ) ) {\n\t\tfontWeights.push( {\n\t\t\tname: _x( 'Bold', 'font weight' ),\n\t\t\tvalue: '700',\n\t\t} );\n\t}\n\n\t// If there is no italic font style, then include faux italic as an option.\n\tif ( ! fontStyles.some( ( style ) => style.value === 'italic' ) ) {\n\t\tfontStyles.push( {\n\t\t\tname: _x( 'Italic', 'font style' ),\n\t\t\tvalue: 'italic',\n\t\t} );\n\t}\n\n\t// Use default font styles and weights for system fonts.\n\tif ( isSystemFont ) {\n\t\tfontStyles = FONT_STYLES;\n\t\tfontWeights = FONT_WEIGHTS;\n\t}\n\n\t// Use default styles and weights if there are no available styles or weights from the provided font faces.\n\tfontStyles = fontStyles.length === 0 ? FONT_STYLES : fontStyles;\n\tfontWeights = fontWeights.length === 0 ? FONT_WEIGHTS : fontWeights;\n\n\t// Generate combined font style and weight options for available fonts.\n\tfontStyles.forEach( ( { name: styleName, value: styleValue } ) => {\n\t\tfontWeights.forEach( ( { name: weightName, value: weightValue } ) => {\n\t\t\tconst optionName =\n\t\t\t\tstyleValue === 'normal'\n\t\t\t\t\t? weightName\n\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t/* translators: 1: Font weight name. 2: Font style name. */\n\t\t\t\t\t\t\t_x( '%1$s %2$s', 'font' ),\n\t\t\t\t\t\t\tweightName,\n\t\t\t\t\t\t\tstyleName\n\t\t\t\t\t );\n\n\t\t\tcombinedStyleAndWeightOptions.push( {\n\t\t\t\tkey: `${ styleValue }-${ weightValue }`,\n\t\t\t\tname: optionName,\n\t\t\t\tstyle: {\n\t\t\t\t\tfontStyle: styleValue,\n\t\t\t\t\tfontWeight: weightValue,\n\t\t\t\t},\n\t\t\t} );\n\t\t} );\n\t} );\n\n\treturn {\n\t\tfontStyles,\n\t\tfontWeights,\n\t\tcombinedStyleAndWeightOptions,\n\t\tisSystemFont,\n\t\tisVariableFont,\n\t};\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;;AAE7C;AACA;AACA;AACA,SAASC,eAAe,QAAQ,qBAAqB;AACrD,SAASC,gBAAgB,QAAQ,sBAAsB;AAEvD,MAAMC,WAAW,GAAG,CACnB;EAC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BO,WAAW,GAAGJ,YAAY;EAC3B;;EAEA;EACAG,UAAU,GAAGA,UAAU,CAACI,MAAM,KAAK,CAAC,GAAGV,WAAW,GAAGM,UAAU;EAC/DC,WAAW,GAAGA,WAAW,CAACG,MAAM,KAAK,CAAC,GAAGP,YAAY,GAAGI,WAAW;;EAEnE;EACAD,UAAU,CAACM,OAAO,CAAE,CAAE;IAAEX,IAAI,EAAE+B,SAAS;IAAE9B,KAAK,EAAE+B;EAAW,CAAC,KAAM;IACjE1B,WAAW,CAACK,OAAO,CAAE,CAAE;MAAEX,IAAI,EAAEiC,UAAU;MAAEhC,KAAK,EAAEiC;IAAY,CAAC,KAAM;MACpE,MAAMC,UAAU,GACfH,UAAU,KAAK,QAAQ,GACpBC,UAAU,GACVrC,OAAO,CACP;MACAD,EAAE,CAAE,WAAW,EAAE,MAAO,CAAC,EACzBsC,UAAU,EACVF,SACA,CAAC;MAELxB,6BAA6B,CAACmB,IAAI,CAAE;QACnCU,GAAG,EAAE,GAAIJ,UAAU,IAAME,WAAW,EAAG;QACvClC,IAAI,EAAEmC,UAAU;QAChBL,KAAK,EAAE;UACNH,SAAS,EAAEK,UAAU;UACrBnB,UAAU,EAAEqB;QACb;MACD,CAAE,CAAC;IACJ,CAAE,CAAC;EACJ,CAAE,CAAC;EAEH,OAAO;IACN7B,UAAU;IACVC,WAAW;IACXC,6BAA6B;IAC7BC,YAAY;IACZE;EACD,CAAC;AACF","ignoreList":[]}
1
+ {"version":3,"names":["_x","sprintf","formatFontStyle","formatFontWeight","FONT_STYLES","name","value","FONT_WEIGHTS","getFontStylesAndWeights","fontFamilyFaces","fontStyles","fontWeights","combinedStyleAndWeightOptions","isSystemFont","length","isVariableFont","forEach","face","fontWeight","test","trim","startValue","endValue","split","parseInt","slice","i","fontWeightValue","toString","some","weight","push","fontStyle","Object","keys","style","styleName","styleValue","weightName","weightValue","optionName","key"],"sources":["@wordpress/block-editor/src/utils/get-font-styles-and-weights.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { _x, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { formatFontStyle } from './format-font-style';\nimport { formatFontWeight } from './format-font-weight';\n\nconst FONT_STYLES = [\n\t{\n\t\tname: _x( 'Regular', 'font style' ),\n\t\tvalue: 'normal',\n\t},\n\t{\n\t\tname: _x( 'Italic', 'font style' ),\n\t\tvalue: 'italic',\n\t},\n];\n\nconst FONT_WEIGHTS = [\n\t{\n\t\tname: _x( 'Thin', 'font weight' ),\n\t\tvalue: '100',\n\t},\n\t{\n\t\tname: _x( 'Extra Light', 'font weight' ),\n\t\tvalue: '200',\n\t},\n\t{\n\t\tname: _x( 'Light', 'font weight' ),\n\t\tvalue: '300',\n\t},\n\t{\n\t\tname: _x( 'Regular', 'font weight' ),\n\t\tvalue: '400',\n\t},\n\t{\n\t\tname: _x( 'Medium', 'font weight' ),\n\t\tvalue: '500',\n\t},\n\t{\n\t\tname: _x( 'Semi Bold', 'font weight' ),\n\t\tvalue: '600',\n\t},\n\t{\n\t\tname: _x( 'Bold', 'font weight' ),\n\t\tvalue: '700',\n\t},\n\t{\n\t\tname: _x( 'Extra Bold', 'font weight' ),\n\t\tvalue: '800',\n\t},\n\t{\n\t\tname: _x( 'Black', 'font weight' ),\n\t\tvalue: '900',\n\t},\n\t{\n\t\tname: _x( 'Extra Black', 'font weight' ),\n\t\tvalue: '1000',\n\t},\n];\n\n/**\n * Builds a list of font style and weight options based on font family faces.\n * Defaults to the standard font styles and weights if no font family faces are provided.\n *\n * @param {Array} fontFamilyFaces font family faces array\n * @return {Object} new object with combined and separated font style and weight properties\n */\nexport function getFontStylesAndWeights( fontFamilyFaces ) {\n\tlet fontStyles = [];\n\tlet fontWeights = [];\n\tconst combinedStyleAndWeightOptions = [];\n\tconst isSystemFont = ! fontFamilyFaces || fontFamilyFaces?.length === 0;\n\tlet isVariableFont = false;\n\n\tfontFamilyFaces?.forEach( ( face ) => {\n\t\t// Check for variable font by looking for a space in the font weight value. e.g. \"100 900\"\n\t\tif (\n\t\t\t'string' === typeof face.fontWeight &&\n\t\t\t/\\s/.test( face.fontWeight.trim() )\n\t\t) {\n\t\t\tisVariableFont = true;\n\n\t\t\t// Find font weight start and end values.\n\t\t\tlet [ startValue, endValue ] = face.fontWeight.split( ' ' );\n\t\t\tstartValue = parseInt( startValue.slice( 0, 1 ) );\n\t\t\tif ( endValue === '1000' ) {\n\t\t\t\tendValue = 10;\n\t\t\t} else {\n\t\t\t\tendValue = parseInt( endValue.slice( 0, 1 ) );\n\t\t\t}\n\n\t\t\t// Create font weight options for available variable weights.\n\t\t\tfor ( let i = startValue; i <= endValue; i++ ) {\n\t\t\t\tconst fontWeightValue = `${ i.toString() }00`;\n\t\t\t\tif (\n\t\t\t\t\t! fontWeights.some(\n\t\t\t\t\t\t( weight ) => weight.value === fontWeightValue\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tfontWeights.push( formatFontWeight( fontWeightValue ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Format font style and weight values.\n\t\tconst fontWeight = formatFontWeight(\n\t\t\t'number' === typeof face.fontWeight\n\t\t\t\t? face.fontWeight.toString()\n\t\t\t\t: face.fontWeight\n\t\t);\n\t\tconst fontStyle = formatFontStyle( face.fontStyle );\n\n\t\t// Create font style and font weight lists without duplicates.\n\t\tif ( fontStyle && Object.keys( fontStyle ).length ) {\n\t\t\tif (\n\t\t\t\t! fontStyles.some(\n\t\t\t\t\t( style ) => style.value === fontStyle.value\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tfontStyles.push( fontStyle );\n\t\t\t}\n\t\t}\n\n\t\tif ( fontWeight && Object.keys( fontWeight ).length ) {\n\t\t\tif (\n\t\t\t\t! fontWeights.some(\n\t\t\t\t\t( weight ) => weight.value === fontWeight.value\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tif ( ! isVariableFont ) {\n\t\t\t\t\tfontWeights.push( fontWeight );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} );\n\n\t// If there is no font weight of 600 or above, then include faux bold as an option.\n\tif ( ! fontWeights.some( ( weight ) => weight.value >= '600' ) ) {\n\t\tfontWeights.push( {\n\t\t\tname: _x( 'Bold', 'font weight' ),\n\t\t\tvalue: '700',\n\t\t} );\n\t}\n\n\t// If there is no italic font style, then include faux italic as an option.\n\tif ( ! fontStyles.some( ( style ) => style.value === 'italic' ) ) {\n\t\tfontStyles.push( {\n\t\t\tname: _x( 'Italic', 'font style' ),\n\t\t\tvalue: 'italic',\n\t\t} );\n\t}\n\n\t// Use default font styles and weights for system fonts.\n\tif ( isSystemFont ) {\n\t\tfontStyles = FONT_STYLES;\n\t\tfontWeights = FONT_WEIGHTS;\n\t}\n\n\t// Use default styles and weights if there are no available styles or weights from the provided font faces.\n\tfontStyles = fontStyles.length === 0 ? FONT_STYLES : fontStyles;\n\tfontWeights = fontWeights.length === 0 ? FONT_WEIGHTS : fontWeights;\n\n\t// Generate combined font style and weight options for available fonts.\n\tfontStyles.forEach( ( { name: styleName, value: styleValue } ) => {\n\t\tfontWeights.forEach( ( { name: weightName, value: weightValue } ) => {\n\t\t\tconst optionName =\n\t\t\t\tstyleValue === 'normal'\n\t\t\t\t\t? weightName\n\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t/* translators: 1: Font weight name. 2: Font style name. */\n\t\t\t\t\t\t\t_x( '%1$s %2$s', 'font' ),\n\t\t\t\t\t\t\tweightName,\n\t\t\t\t\t\t\tstyleName\n\t\t\t\t\t );\n\n\t\t\tcombinedStyleAndWeightOptions.push( {\n\t\t\t\tkey: `${ styleValue }-${ weightValue }`,\n\t\t\t\tname: optionName,\n\t\t\t\tstyle: {\n\t\t\t\t\tfontStyle: styleValue,\n\t\t\t\t\tfontWeight: weightValue,\n\t\t\t\t},\n\t\t\t} );\n\t\t} );\n\t} );\n\n\treturn {\n\t\tfontStyles,\n\t\tfontWeights,\n\t\tcombinedStyleAndWeightOptions,\n\t\tisSystemFont,\n\t\tisVariableFont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AAC,EAAG;IACjEI,UAAU,CAACqB,IAAI,CAAE;MAChB1B,IAAI,EAAEL,EAAE,CAAE,QAAQ,EAAE,YAAa,CAAC;MAClCM,KAAK,EAAE;IACR,CAAE,CAAC;EACJ;;EAEA;EACA,IAAKO,YAAY,EAAG;IACnBH,UAAU,GAAGN,WAAW;IACxBO,WAAW,GAAGJ,YAAY;EAC3B;;EAEA;EACAG,UAAU,GAAGA,UAAU,CAACI,MAAM,KAAK,CAAC,GAAGV,WAAW,GAAGM,UAAU;EAC/DC,WAAW,GAAGA,WAAW,CAACG,MAAM,KAAK,CAAC,GAAGP,YAAY,GAAGI,WAAW;;EAEnE;EACAD,UAAU,CAACM,OAAO,CAAE,CAAE;IAAEX,IAAI,EAAE+B,SAAS;IAAE9B,KAAK,EAAE+B;EAAW,CAAC,KAAM;IACjE1B,WAAW,CAACK,OAAO,CAAE,CAAE;MAAEX,IAAI,EAAEiC,UAAU;MAAEhC,KAAK,EAAEiC;IAAY,CAAC,KAAM;MACpE,MAAMC,UAAU,GACfH,UAAU,KAAK,QAAQ,GACpBC,UAAU,GACVrC,OAAO,CACP;MACAD,EAAE,CAAE,WAAW,EAAE,MAAO,CAAC,EACzBsC,UAAU,EACVF,SACA,CAAC;MAELxB,6BAA6B,CAACmB,IAAI,CAAE;QACnCU,GAAG,EAAE,GAAIJ,UAAU,IAAME,WAAW,EAAG;QACvClC,IAAI,EAAEmC,UAAU;QAChBL,KAAK,EAAE;UACNH,SAAS,EAAEK,UAAU;UACrBnB,UAAU,EAAEqB;QACb;MACD,CAAE,CAAC;IACJ,CAAE,CAAC;EACJ,CAAE,CAAC;EAEH,OAAO;IACN7B,UAAU;IACVC,WAAW;IACXC,6BAA6B;IAC7BC,YAAY;IACZE;EACD,CAAC;AACF","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  /**
2
3
  * A string representing the name of an edge.
3
4
  *
@@ -1 +1 @@
1
- {"version":3,"names":["getDistanceFromPointToEdge","point","rect","edge","isHorizontal","x","y","pointLateralPosition","pointForwardPosition","edgeStart","left","top","edgeEnd","right","bottom","edgeForwardPosition","edgeLateralPosition","Math","sqrt","getDistanceToNearestEdge","allowedEdges","candidateDistance","candidateEdge","forEach","distance","undefined","isPointContainedByRect","isPointWithinTopAndBottomBoundariesOfRect"],"sources":["@wordpress/block-editor/src/utils/math.js"],"sourcesContent":["/**\n * A string representing the name of an edge.\n *\n * @typedef {'top'|'right'|'bottom'|'left'} WPEdgeName\n */\n\n/**\n * @typedef {Object} WPPoint\n * @property {number} x The horizontal position.\n * @property {number} y The vertical position.\n */\n\n/**\n * Given a point, a DOMRect and the name of an edge, returns the distance to\n * that edge of the rect.\n *\n * This function works for edges that are horizontal or vertical (e.g. not\n * rotated), the following terms are used so that the function works in both\n * orientations:\n *\n * - Forward, meaning the axis running horizontally when an edge is vertical\n * and vertically when an edge is horizontal.\n * - Lateral, meaning the axis running vertically when an edge is vertical\n * and horizontally when an edge is horizontal.\n *\n * @param {WPPoint} point The point to measure distance from.\n * @param {DOMRect} rect A DOM Rect containing edge positions.\n * @param {WPEdgeName} edge The edge to measure to.\n */\nexport function getDistanceFromPointToEdge( point, rect, edge ) {\n\tconst isHorizontal = edge === 'top' || edge === 'bottom';\n\tconst { x, y } = point;\n\tconst pointLateralPosition = isHorizontal ? x : y;\n\tconst pointForwardPosition = isHorizontal ? y : x;\n\tconst edgeStart = isHorizontal ? rect.left : rect.top;\n\tconst edgeEnd = isHorizontal ? rect.right : rect.bottom;\n\tconst edgeForwardPosition = rect[ edge ];\n\n\t// Measure the straight line distance to the edge of the rect, when the\n\t// point is adjacent to the edge.\n\t// Else, if the point is positioned diagonally to the edge of the rect,\n\t// measure diagonally to the nearest corner that the edge meets.\n\tlet edgeLateralPosition;\n\tif (\n\t\tpointLateralPosition >= edgeStart &&\n\t\tpointLateralPosition <= edgeEnd\n\t) {\n\t\tedgeLateralPosition = pointLateralPosition;\n\t} else if ( pointLateralPosition < edgeEnd ) {\n\t\tedgeLateralPosition = edgeStart;\n\t} else {\n\t\tedgeLateralPosition = edgeEnd;\n\t}\n\n\treturn Math.sqrt(\n\t\t( pointLateralPosition - edgeLateralPosition ) ** 2 +\n\t\t\t( pointForwardPosition - edgeForwardPosition ) ** 2\n\t);\n}\n\n/**\n * Given a point, a DOMRect and a list of allowed edges returns the name of and\n * distance to the nearest edge.\n *\n * @param {WPPoint} point The point to measure distance from.\n * @param {DOMRect} rect A DOM Rect containing edge positions.\n * @param {WPEdgeName[]} allowedEdges A list of the edges included in the\n * calculation. Defaults to all edges.\n *\n * @return {[number, string]} An array where the first value is the distance\n * and a second is the edge name.\n */\nexport function getDistanceToNearestEdge(\n\tpoint,\n\trect,\n\tallowedEdges = [ 'top', 'bottom', 'left', 'right' ]\n) {\n\tlet candidateDistance;\n\tlet candidateEdge;\n\n\tallowedEdges.forEach( ( edge ) => {\n\t\tconst distance = getDistanceFromPointToEdge( point, rect, edge );\n\n\t\tif ( candidateDistance === undefined || distance < candidateDistance ) {\n\t\t\tcandidateDistance = distance;\n\t\t\tcandidateEdge = edge;\n\t\t}\n\t} );\n\n\treturn [ candidateDistance, candidateEdge ];\n}\n\n/**\n * Is the point contained by the rectangle.\n *\n * @param {WPPoint} point The point.\n * @param {DOMRect} rect The rectangle.\n *\n * @return {boolean} True if the point is contained by the rectangle, false otherwise.\n */\nexport function isPointContainedByRect( point, rect ) {\n\treturn (\n\t\trect.left <= point.x &&\n\t\trect.right >= point.x &&\n\t\trect.top <= point.y &&\n\t\trect.bottom >= point.y\n\t);\n}\n\n/**\n * Is the point within the top and bottom boundaries of the rectangle.\n *\n * @param {WPPoint} point The point.\n * @param {DOMRect} rect The rectangle.\n *\n * @return {boolean} True if the point is within top and bottom of rectangle, false otherwise.\n */\nexport function isPointWithinTopAndBottomBoundariesOfRect( point, rect ) {\n\treturn rect.top <= point.y && rect.bottom >= point.y;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;A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,EAClD;EACD,IAAIC,iBAAiB;EACrB,IAAIC,aAAa;EAEjBF,YAAY,CAACG,OAAO,CAAIpB,IAAI,IAAM;IACjC,MAAMqB,QAAQ,GAAGxB,0BAA0B,CAAEC,KAAK,EAAEC,IAAI,EAAEC,IAAK,CAAC;IAEhE,IAAKkB,iBAAiB,KAAKI,SAAS,IAAID,QAAQ,GAAGH,iBAAiB,EAAG;MACtEA,iBAAiB,GAAGG,QAAQ;MAC5BF,aAAa,GAAGnB,IAAI;IACrB;EACD,CAAE,CAAC;EAEH,OAAO,CAAEkB,iBAAiB,EAAEC,aAAa,CAAE;AAC5C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASI,sBAAsBA,CAAEzB,KAAK,EAAEC,IAAI,EAAG;EACrD,OACCA,IAAI,CAACQ,IAAI,IAAIT,KAAK,CAACI,CAAC,IACpBH,IAAI,CAACW,KAAK,IAAIZ,KAAK,CAACI,CAAC,IACrBH,IAAI,CAACS,GAAG,IAAIV,KAAK,CAACK,CAAC,IACnBJ,IAAI,CAACY,MAAM,IAAIb,KAAK,CAACK,CAAC;AAExB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASqB,yCAAyCA,CAAE1B,KAAK,EAAEC,IAAI,EAAG;EACxE,OAAOA,IAAI,CAACS,GAAG,IAAIV,KAAK,CAACK,CAAC,IAAIJ,IAAI,CAACY,MAAM,IAAIb,KAAK,CAACK,CAAC;AACrD","ignoreList":[]}
1
+ {"version":3,"names":["getDistanceFromPointToEdge","point","rect","edge","isHorizontal","x","y","pointLateralPosition","pointForwardPosition","edgeStart","left","top","edgeEnd","right","bottom","edgeForwardPosition","edgeLateralPosition","Math","sqrt","getDistanceToNearestEdge","allowedEdges","candidateDistance","candidateEdge","forEach","distance","undefined","isPointContainedByRect","isPointWithinTopAndBottomBoundariesOfRect"],"sources":["@wordpress/block-editor/src/utils/math.js"],"sourcesContent":["/**\n * A string representing the name of an edge.\n *\n * @typedef {'top'|'right'|'bottom'|'left'} WPEdgeName\n */\n\n/**\n * @typedef {Object} WPPoint\n * @property {number} x The horizontal position.\n * @property {number} y The vertical position.\n */\n\n/**\n * Given a point, a DOMRect and the name of an edge, returns the distance to\n * that edge of the rect.\n *\n * This function works for edges that are horizontal or vertical (e.g. not\n * rotated), the following terms are used so that the function works in both\n * orientations:\n *\n * - Forward, meaning the axis running horizontally when an edge is vertical\n * and vertically when an edge is horizontal.\n * - Lateral, meaning the axis running vertically when an edge is vertical\n * and horizontally when an edge is horizontal.\n *\n * @param {WPPoint} point The point to measure distance from.\n * @param {DOMRect} rect A DOM Rect containing edge positions.\n * @param {WPEdgeName} edge The edge to measure to.\n */\nexport function getDistanceFromPointToEdge( point, rect, edge ) {\n\tconst isHorizontal = edge === 'top' || edge === 'bottom';\n\tconst { x, y } = point;\n\tconst pointLateralPosition = isHorizontal ? x : y;\n\tconst pointForwardPosition = isHorizontal ? y : x;\n\tconst edgeStart = isHorizontal ? rect.left : rect.top;\n\tconst edgeEnd = isHorizontal ? rect.right : rect.bottom;\n\tconst edgeForwardPosition = rect[ edge ];\n\n\t// Measure the straight line distance to the edge of the rect, when the\n\t// point is adjacent to the edge.\n\t// Else, if the point is positioned diagonally to the edge of the rect,\n\t// measure diagonally to the nearest corner that the edge meets.\n\tlet edgeLateralPosition;\n\tif (\n\t\tpointLateralPosition >= edgeStart &&\n\t\tpointLateralPosition <= edgeEnd\n\t) {\n\t\tedgeLateralPosition = pointLateralPosition;\n\t} else if ( pointLateralPosition < edgeEnd ) {\n\t\tedgeLateralPosition = edgeStart;\n\t} else {\n\t\tedgeLateralPosition = edgeEnd;\n\t}\n\n\treturn Math.sqrt(\n\t\t( pointLateralPosition - edgeLateralPosition ) ** 2 +\n\t\t\t( pointForwardPosition - edgeForwardPosition ) ** 2\n\t);\n}\n\n/**\n * Given a point, a DOMRect and a list of allowed edges returns the name of and\n * distance to the nearest edge.\n *\n * @param {WPPoint} point The point to measure distance from.\n * @param {DOMRect} rect A DOM Rect containing edge positions.\n * @param {WPEdgeName[]} allowedEdges A list of the edges included in the\n * calculation. Defaults to all edges.\n *\n * @return {[number, string]} An array where the first value is the distance\n * and a second is the edge name.\n */\nexport function getDistanceToNearestEdge(\n\tpoint,\n\trect,\n\tallowedEdges = [ 'top', 'bottom', 'left', 'right' ]\n) {\n\tlet candidateDistance;\n\tlet candidateEdge;\n\n\tallowedEdges.forEach( ( edge ) => {\n\t\tconst distance = getDistanceFromPointToEdge( point, rect, edge );\n\n\t\tif ( candidateDistance === undefined || distance < candidateDistance ) {\n\t\t\tcandidateDistance = distance;\n\t\t\tcandidateEdge = edge;\n\t\t}\n\t} );\n\n\treturn [ candidateDistance, candidateEdge ];\n}\n\n/**\n * Is the point contained by the rectangle.\n *\n * @param {WPPoint} point The point.\n * @param {DOMRect} rect The rectangle.\n *\n * @return {boolean} True if the point is contained by the rectangle, false otherwise.\n */\nexport function isPointContainedByRect( point, rect ) {\n\treturn (\n\t\trect.left <= point.x &&\n\t\trect.right >= point.x &&\n\t\trect.top <= point.y &&\n\t\trect.bottom >= point.y\n\t);\n}\n\n/**\n * Is the point within the top and bottom boundaries of the rectangle.\n *\n * @param {WPPoint} point The point.\n * @param {DOMRect} rect The rectangle.\n *\n * @return {boolean} True if the point is within top and bottom of rectangle, false otherwise.\n */\nexport function isPointWithinTopAndBottomBoundariesOfRect( point, rect ) {\n\treturn rect.top <= point.y && rect.bottom >= point.y;\n}\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,0BAA0BA,CAAEC,KAAK,EAAEC,IAAI,EAAEC,IAAI,EAAG;EAC/D,MAAMC,YAAY,GAAGD,IAAI,KAAK,KAAK,IAAIA,IAAI,KAAK,QAAQ;EACxD,MAAM;IAAEE,CAAC;IAAEC;EAAE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B,GAAGG,QAAQ;MAC5BF,aAAa,GAAGnB,IAAI;IACrB;EACD,CAAE,CAAC;EAEH,OAAO,CAAEkB,iBAAiB,EAAEC,aAAa,CAAE;AAC5C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASI,sBAAsBA,CAAEzB,KAAK,EAAEC,IAAI,EAAG;EACrD,OACCA,IAAI,CAACQ,IAAI,IAAIT,KAAK,CAACI,CAAC,IACpBH,IAAI,CAACW,KAAK,IAAIZ,KAAK,CAACI,CAAC,IACrBH,IAAI,CAACS,GAAG,IAAIV,KAAK,CAACK,CAAC,IACnBJ,IAAI,CAACY,MAAM,IAAIb,KAAK,CAACK,CAAC;AAExB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASqB,yCAAyCA,CAAE1B,KAAK,EAAEC,IAAI,EAAG;EACxE,OAAOA,IAAI,CAACS,GAAG,IAAIV,KAAK,CAACK,CAAC,IAAIJ,IAAI,CAACY,MAAM,IAAIb,KAAK,CAACK,CAAC;AACrD","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  /**
2
3
  * Immutably sets a value inside an object. Like `lodash#set`, but returning a
3
4
  * new object. Treats nullish initial values as empty objects. Clones any
@@ -1 +1 @@
1
- {"version":3,"names":["setImmutably","object","path","value","Array","isArray","leaf","pop","prev","key","lvl","getValueFromObjectPath","defaultValue","_value","arrayPath","split","forEach","fieldName","uniqByProperty","array","property","seen","Set","filter","item","has","add"],"sources":["@wordpress/block-editor/src/utils/object.js"],"sourcesContent":["/**\n * Immutably sets a value inside an object. Like `lodash#set`, but returning a\n * new object. Treats nullish initial values as empty objects. Clones any\n * nested objects. Supports arrays, too.\n *\n * @param {Object} object Object to set a value in.\n * @param {number|string|Array} path Path in the object to modify.\n * @param {*} value New value to set.\n * @return {Object} Cloned object with the new value set.\n */\nexport function setImmutably( object, path, value ) {\n\t// Normalize path\n\tpath = Array.isArray( path ) ? [ ...path ] : [ path ];\n\n\t// Shallowly clone the base of the object\n\tobject = Array.isArray( object ) ? [ ...object ] : { ...object };\n\n\tconst leaf = path.pop();\n\n\t// Traverse object from root to leaf, shallowly cloning at each level\n\tlet prev = object;\n\tfor ( const key of path ) {\n\t\tconst lvl = prev[ key ];\n\t\tprev = prev[ key ] = Array.isArray( lvl ) ? [ ...lvl ] : { ...lvl };\n\t}\n\n\tprev[ leaf ] = value;\n\n\treturn object;\n}\n\n/**\n * Helper util to return a value from a certain path of the object.\n * Path is specified as either:\n * - a string of properties, separated by dots, for example: \"x.y\".\n * - an array of properties, for example `[ 'x', 'y' ]`.\n * You can also specify a default value in case the result is nullish.\n *\n * @param {Object} object Input object.\n * @param {string|Array} path Path to the object property.\n * @param {*} defaultValue Default value if the value at the specified path is nullish.\n * @return {*} Value of the object property at the specified path.\n */\nexport const getValueFromObjectPath = ( object, path, defaultValue ) => {\n\tconst arrayPath = Array.isArray( path ) ? path : path.split( '.' );\n\tlet value = object;\n\tarrayPath.forEach( ( fieldName ) => {\n\t\tvalue = value?.[ fieldName ];\n\t} );\n\treturn value ?? defaultValue;\n};\n\n/**\n * Helper util to filter out objects with duplicate values for a given property.\n *\n * @param {Object[]} array Array of objects to filter.\n * @param {string} property Property to filter unique values by.\n *\n * @return {Object[]} Array of objects with unique values for the specified property.\n */\nexport function uniqByProperty( array, property ) {\n\tconst seen = new Set();\n\treturn array.filter( ( item ) => {\n\t\tconst value = item[ property ];\n\t\treturn seen.has( value ) ? false : seen.add( value );\n\t} );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,YAAYA,CAAEC,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAG;EACnD;EACAD,IAAI,GAAGE,KAAK,CAACC,OAAO,CAAEH,IAAK,CAAC,GAAG,CAAE,GAAGA,IAAI,CAAE,GAAG,CAAEA,IAAI,CAAE;;EAErD;EACAD,MAAM,GAAGG,KAAK,CA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AAMrB,KAAK,GAAGqB,IAAI,CAAEJ,QAAQ,CAAE;IAC9B,OAAOC,IAAI,CAACI,GAAG,CAAEtB,KAAM,CAAC,GAAG,KAAK,GAAGkB,IAAI,CAACK,GAAG,CAAEvB,KAAM,CAAC;EACrD,CAAE,CAAC;AACJ","ignoreList":[]}
1
+ {"version":3,"names":["setImmutably","object","path","value","Array","isArray","leaf","pop","prev","key","lvl","getValueFromObjectPath","defaultValue","_value","arrayPath","split","forEach","fieldName","uniqByProperty","array","property","seen","Set","filter","item","has","add"],"sources":["@wordpress/block-editor/src/utils/object.js"],"sourcesContent":["/**\n * Immutably sets a value inside an object. Like `lodash#set`, but returning a\n * new object. Treats nullish initial values as empty objects. Clones any\n * nested objects. Supports arrays, too.\n *\n * @param {Object} object Object to set a value in.\n * @param {number|string|Array} path Path in the object to modify.\n * @param {*} value New value to set.\n * @return {Object} Cloned object with the new value set.\n */\nexport function setImmutably( object, path, value ) {\n\t// Normalize path\n\tpath = Array.isArray( path ) ? [ ...path ] : [ path ];\n\n\t// Shallowly clone the base of the object\n\tobject = Array.isArray( object ) ? [ ...object ] : { ...object };\n\n\tconst leaf = path.pop();\n\n\t// Traverse object from root to leaf, shallowly cloning at each level\n\tlet prev = object;\n\tfor ( const key of path ) {\n\t\tconst lvl = prev[ key ];\n\t\tprev = prev[ key ] = Array.isArray( lvl ) ? [ ...lvl ] : { ...lvl };\n\t}\n\n\tprev[ leaf ] = value;\n\n\treturn object;\n}\n\n/**\n * Helper util to return a value from a certain path of the object.\n * Path is specified as either:\n * - a string of properties, separated by dots, for example: \"x.y\".\n * - an array of properties, for example `[ 'x', 'y' ]`.\n * You can also specify a default value in case the result is nullish.\n *\n * @param {Object} object Input object.\n * @param {string|Array} path Path to the object property.\n * @param {*} defaultValue Default value if the value at the specified path is nullish.\n * @return {*} Value of the object property at the specified path.\n */\nexport const getValueFromObjectPath = ( object, path, defaultValue ) => {\n\tconst arrayPath = Array.isArray( path ) ? path : path.split( '.' );\n\tlet value = object;\n\tarrayPath.forEach( ( fieldName ) => {\n\t\tvalue = value?.[ fieldName ];\n\t} );\n\treturn value ?? defaultValue;\n};\n\n/**\n * Helper util to filter out objects with duplicate values for a given property.\n *\n * @param {Object[]} array Array of objects to filter.\n * @param {string} property Property to filter unique values by.\n *\n * @return {Object[]} Array of objects with unique values for the specified property.\n */\nexport function uniqByProperty( array, property ) {\n\tconst seen = new Set();\n\treturn array.filter( ( item ) => {\n\t\tconst value = item[ property ];\n\t\treturn seen.has( value ) ? false : seen.add( value );\n\t} );\n}\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,YAAYA,CAAEC,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAG;EACnD;EACAD,IAAI,GAAGE,KAAK,CAACC,OAAO,CAAEH,IAAK,CAAC,GAAG,CAAE,GAAGA,IAAI,CAAE,GAAG,CAAEA,IAAI,CAAE;;EAErD;EACAD,MAAM,GAAGG,KAAK,CAACC,OAAO,CAAEJ,MAAO,CAAC,GAAG,CAAE,GAAGA,MAAM,CAAE,GAAG;IAAE,GAAGA;EAAO,CAAC;EAEhE,MAAMK,IAAI,GAAGJ,IAAI,CAACK,GAAG,CAAC,CAAC;;EAEvB;EACA,IAAIC,IAAI,GAAGP,MAAM;EACjB,KAAM,MAAMQ,GAAG,IAAIP,IAAI,EAAG;IACzB,MAAMQ,GAAG,GAAGF,IAAI,CAAEC,GAAG,CAAE;IACvBD,IAAI,GAAGA,IAAI,CAAEC,GAAG,CAAE,GAAGL,KAAK,CAACC,OAAO,CAAEK,GAAI,CAAC,GAAG,CAAE,GAAGA,GAAG,CAAE,GAAG;MAAE,GAAGA;IAAI,CAAC;EACpE;EAEAF,IAAI,CAAEF,IAAI,CAAE,GAAGH,KAAK;EAEpB,OAAOF,MAAM;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMU,sBAAsB,GAAGA,CAAEV,MAAM,EAAEC,IAAI,EAAEU,YAAY,KAAM;EAAA,IAAAC,MAAA;EACvE,MAAMC,SAAS,GAAGV,KAAK,CAACC,OAAO,CAAEH,IAAK,CAAC,GAAGA,IAAI,GAAGA,IAAI,CAACa,KAAK,CAAE,GAAI,CAAC;EAClE,IAAIZ,KAAK,GAAGF,MAAM;EAClBa,SAAS,CAACE,OAAO,CAAIC,SAAS,IAAM;IACnCd,KAAK,GAAGA,KAAK,GAAIc,SAAS,CAAE;EAC7B,CAAE,CAAC;EACH,QAAAJ,MAAA,GAAOV,KAAK,cAAAU,MAAA,cAAAA,MAAA,GAAID,YAAY;AAC7B,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASM,cAAcA,CAAEC,KAAK,EAAEC,QAAQ,EAAG;EACjD,MAAMC,IAAI,GAAG,IAAIC,GAAG,CAAC,CAAC;EACtB,OAAOH,KAAK,CAACI,MAAM,CAAIC,IAAI,IAAM;IAChC,MAAMrB,KAAK,GAAGqB,IAAI,CAAEJ,QAAQ,CAAE;IAC9B,OAAOC,IAAI,CAACI,GAAG,CAAEtB,KAAM,CAAC,GAAG,KAAK,GAAGkB,IAAI,CAACK,GAAG,CAAEvB,KAAM,CAAC;EACrD,CAAE,CAAC;AACJ","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  /**
2
3
  * WordPress dependencies
3
4
  */
@@ -1 +1 @@
1
- {"version":3,"names":["RichTextData","START_OF_SELECTED_AREA","retrieveSelectedAttribute","blockAttributes","Object","keys","find","name","value","toString","indexOf","findRichTextAttributeKey","blockType","key","entries","attributes","source"],"sources":["@wordpress/block-editor/src/utils/selection.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { RichTextData } from '@wordpress/rich-text';\n\n/**\n * A robust way to retain selection position through various\n * transforms is to insert a special character at the position and\n * then recover it.\n */\nexport const START_OF_SELECTED_AREA = '\\u0086';\n\n/**\n * Retrieve the block attribute that contains the selection position.\n *\n * @param {Object} blockAttributes Block attributes.\n * @return {string|void} The name of the block attribute that was previously selected.\n */\nexport function retrieveSelectedAttribute( blockAttributes ) {\n\tif ( ! blockAttributes ) {\n\t\treturn;\n\t}\n\n\treturn Object.keys( blockAttributes ).find( ( name ) => {\n\t\tconst value = blockAttributes[ name ];\n\t\treturn (\n\t\t\t( typeof value === 'string' || value instanceof RichTextData ) &&\n\t\t\t// To do: refactor this to use rich text's selection instead, so we\n\t\t\t// no longer have to use on this hack inserting a special character.\n\t\t\tvalue.toString().indexOf( START_OF_SELECTED_AREA ) !== -1\n\t\t);\n\t} );\n}\n\nexport function findRichTextAttributeKey( blockType ) {\n\tfor ( const [ key, value ] of Object.entries( blockType.attributes ) ) {\n\t\tif ( value.source === 'rich-text' || value.source === 'html' ) {\n\t\t\treturn key;\n\t\t}\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,YAAY,QAAQ,sBAAsB;;AAEnD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAG,QAAQ;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,yBAAyBA,CAAEC,eAAe,EAAG;EAC5D,IAAK,CAAEA,eAAe,EAAG;IACxB;EACD;EAEA,OAAOC,MAAM,CAACC,IAAI,CAAEF,eAAgB,CAAC,CAACG,IAAI,CAAIC,IAAI,IAAM;IACvD,MAAMC,KAAK,GAAGL,eAAe,CAAEI,IAAI,CAAE;IACrC,OACC,CAAE,OAAOC,KAAK,KAAK,QAAQ,IAAIA,KAAK,YAAYR,YAAY;IAC5D;IACA;IACAQ,KAAK,CAACC,QAAQ,CAAC,CAAC,CAACC,OAAO,CAAET,sBAAuB,CAAC,KAAK,CAAC,CAAC;EAE3D,CAAE,CAAC;AACJ;AAEA,OAAO,SAASU,wBAAwBA,CAAEC,SAAS,EAAG;EACrD,KAAM,MAAM,CAAEC,GAAG,EAAEL,KAAK,CAAE,IAAIJ,MAAM,CAACU,OAAO,CAAEF,SAAS,CAACG,UAAW,CAAC,EAAG;IACtE,IAAKP,KAAK,CAACQ,MAAM,KAAK,WAAW,IAAIR,KAAK,CAACQ,MAAM,KAAK,MAAM,EAAG;MAC9D,OAAOH,GAAG;IACX;EACD;AACD","ignoreList":[]}
1
+ {"version":3,"names":["RichTextData","START_OF_SELECTED_AREA","retrieveSelectedAttribute","blockAttributes","Object","keys","find","name","value","toString","indexOf","findRichTextAttributeKey","blockType","key","entries","attributes","source"],"sources":["@wordpress/block-editor/src/utils/selection.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { RichTextData } from '@wordpress/rich-text';\n\n/**\n * A robust way to retain selection position through various\n * transforms is to insert a special character at the position and\n * then recover it.\n */\nexport const START_OF_SELECTED_AREA = '\\u0086';\n\n/**\n * Retrieve the block attribute that contains the selection position.\n *\n * @param {Object} blockAttributes Block attributes.\n * @return {string|void} The name of the block attribute that was previously selected.\n */\nexport function retrieveSelectedAttribute( blockAttributes ) {\n\tif ( ! blockAttributes ) {\n\t\treturn;\n\t}\n\n\treturn Object.keys( blockAttributes ).find( ( name ) => {\n\t\tconst value = blockAttributes[ name ];\n\t\treturn (\n\t\t\t( typeof value === 'string' || value instanceof RichTextData ) &&\n\t\t\t// To do: refactor this to use rich text's selection instead, so we\n\t\t\t// no longer have to use on this hack inserting a special character.\n\t\t\tvalue.toString().indexOf( START_OF_SELECTED_AREA ) !== -1\n\t\t);\n\t} );\n}\n\nexport function findRichTextAttributeKey( blockType ) {\n\tfor ( const [ key, value ] of Object.entries( blockType.attributes ) ) {\n\t\tif ( value.source === 'rich-text' || value.source === 'html' ) {\n\t\t\treturn key;\n\t\t}\n\t}\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,YAAY,QAAQ,sBAAsB;;AAEnD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAG,QAAQ;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,yBAAyBA,CAAEC,eAAe,EAAG;EAC5D,IAAK,CAAEA,eAAe,EAAG;IACxB;EACD;EAEA,OAAOC,MAAM,CAACC,IAAI,CAAEF,eAAgB,CAAC,CAACG,IAAI,CAAIC,IAAI,IAAM;IACvD,MAAMC,KAAK,GAAGL,eAAe,CAAEI,IAAI,CAAE;IACrC,OACC,CAAE,OAAOC,KAAK,KAAK,QAAQ,IAAIA,KAAK,YAAYR,YAAY;IAC5D;IACA;IACAQ,KAAK,CAACC,QAAQ,CAAC,CAAC,CAACC,OAAO,CAAET,sBAAuB,CAAC,KAAK,CAAC,CAAC;EAE3D,CAAE,CAAC;AACJ;AAEA,OAAO,SAASU,wBAAwBA,CAAEC,SAAS,EAAG;EACrD,KAAM,MAAM,CAAEC,GAAG,EAAEL,KAAK,CAAE,IAAIJ,MAAM,CAACU,OAAO,CAAEF,SAAS,CAACG,UAAW,CAAC,EAAG;IACtE,IAAKP,KAAK,CAACQ,MAAM,KAAK,WAAW,IAAIR,KAAK,CAACQ,MAAM,KAAK,MAAM,EAAG;MAC9D,OAAOH,GAAG;IACX;EACD;AACD","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  /**
2
3
  * External dependencies
3
4
  */
@@ -1 +1 @@
1
- {"version":3,"names":["parsel","Processor","CssSyntaxError","prefixSelector","rebaseUrl","cacheByWrapperSelector","Map","ROOT_SELECTOR_TOKENS","type","content","prefixRootSelector","prefix","selector","tokenized","tokenize","lastRootIndex","findLastIndex","some","rootSelector","insertionPoint","i","length","tokenizedPrefix","splice","stringify","transformStyle","css","ignoredSelectors","baseURL","wrapperSelector","transformOptions","_transformOptions$ign","excludedSelectors","transform","prefixedSelector","excludedSelector","RegExp","match","includes","hasRootSelector","startsWith","rootUrl","filter","Boolean","process","error","console","warn","message","showSourceCode","transformStyles","styles","cache","get","WeakMap","set","map","style"],"sources":["@wordpress/block-editor/src/utils/transform-styles/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport * as parsel from 'parsel-js';\nimport Processor from 'postcss/lib/processor';\nimport CssSyntaxError from 'postcss/lib/css-syntax-error';\nimport prefixSelector from 'postcss-prefix-selector';\nimport rebaseUrl from 'postcss-urlrebase';\n\nconst cacheByWrapperSelector = new Map();\n\nconst ROOT_SELECTOR_TOKENS = [\n\t{ type: 'type', content: 'body' },\n\t{ type: 'type', content: 'html' },\n\t{ type: 'pseudo-class', content: ':root' },\n\t{ type: 'pseudo-class', content: ':where(body)' },\n\t{ type: 'pseudo-class', content: ':where(:root)' },\n\t{ type: 'pseudo-class', content: ':where(html)' },\n];\n\n/**\n * Prefixes root selectors in a way that ensures consistent specificity.\n * This requires special handling, since prefixing a classname before\n * html, body, or :root will generally result in an invalid selector.\n *\n * Some libraries will simply replace the root selector with the prefix\n * instead, but this results in inconsistent specificity.\n *\n * This function instead inserts the prefix after the root tags but before\n * any other part of the selector. This results in consistent specificity:\n * - If a `:where()` selector is used for the prefix, all selectors output\n * by `transformStyles` will have no specificity increase.\n * - If a classname, id, or something else is used as the prefix, all selectors\n * will have the same specificity bump when transformed.\n *\n * @param {string} prefix The prefix.\n * @param {string} selector The selector.\n *\n * @return {string} The prefixed root selector.\n */\nfunction prefixRootSelector( prefix, selector ) {\n\t// Use a tokenizer, since regular expressions are unreliable.\n\tconst tokenized = parsel.tokenize( selector );\n\n\t// Find the last token that contains a root selector by walking back\n\t// through the tokens.\n\tconst lastRootIndex = tokenized.findLastIndex( ( { content, type } ) => {\n\t\treturn ROOT_SELECTOR_TOKENS.some(\n\t\t\t( rootSelector ) =>\n\t\t\t\tcontent === rootSelector.content && type === rootSelector.type\n\t\t);\n\t} );\n\n\t// Walk forwards to find the combinator after the last root.\n\t// This is where the root ends and the rest of the selector begins,\n\t// and the index to insert before.\n\t// Doing it this way takes into account that a root selector like\n\t// 'body' may have additional id/class/pseudo-class/attribute-selector\n\t// parts chained to it, which is difficult to quantify using a regex.\n\tlet insertionPoint = -1;\n\tfor ( let i = lastRootIndex + 1; i < tokenized.length; i++ ) {\n\t\tif ( tokenized[ i ].type === 'combinator' ) {\n\t\t\tinsertionPoint = i;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Tokenize and insert the prefix with a ' ' combinator before it.\n\tconst tokenizedPrefix = parsel.tokenize( prefix );\n\ttokenized.splice(\n\t\t// Insert at the insertion point, or the end.\n\t\tinsertionPoint === -1 ? tokenized.length : insertionPoint,\n\t\t0,\n\t\t{\n\t\t\ttype: 'combinator',\n\t\t\tcontent: ' ',\n\t\t},\n\t\t...tokenizedPrefix\n\t);\n\n\treturn parsel.stringify( tokenized );\n}\n\nfunction transformStyle(\n\t{ css, ignoredSelectors = [], baseURL },\n\twrapperSelector = '',\n\ttransformOptions\n) {\n\t// When there is no wrapper selector and no base URL, there is no need\n\t// to transform the CSS. This is most cases because in the default\n\t// iframed editor, no wrapping is needed, and not many styles\n\t// provide a base URL.\n\tif ( ! wrapperSelector && ! baseURL ) {\n\t\treturn css;\n\t}\n\n\ttry {\n\t\tconst excludedSelectors = [\n\t\t\t...ignoredSelectors,\n\t\t\t...( transformOptions?.ignoredSelectors ?? [] ),\n\t\t\twrapperSelector,\n\t\t];\n\n\t\treturn new Processor(\n\t\t\t[\n\t\t\t\twrapperSelector &&\n\t\t\t\t\tprefixSelector( {\n\t\t\t\t\t\tprefix: wrapperSelector,\n\t\t\t\t\t\ttransform( prefix, selector, prefixedSelector ) {\n\t\t\t\t\t\t\t// For backwards compatibility, don't use the `exclude` option\n\t\t\t\t\t\t\t// of postcss-prefix-selector, instead handle it here to match\n\t\t\t\t\t\t\t// the behavior of the old library (postcss-prefix-wrap) that\n\t\t\t\t\t\t\t// `transformStyle` previously used.\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\texcludedSelectors.some( ( excludedSelector ) =>\n\t\t\t\t\t\t\t\t\texcludedSelector instanceof RegExp\n\t\t\t\t\t\t\t\t\t\t? selector.match( excludedSelector )\n\t\t\t\t\t\t\t\t\t\t: selector.includes( excludedSelector )\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\treturn selector;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconst hasRootSelector = ROOT_SELECTOR_TOKENS.some(\n\t\t\t\t\t\t\t\t( rootSelector ) =>\n\t\t\t\t\t\t\t\t\tselector.startsWith( rootSelector.content )\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t// Reorganize root selectors such that the root part comes before the prefix,\n\t\t\t\t\t\t\t// but the prefix still comes before the remaining part of the selector.\n\t\t\t\t\t\t\tif ( hasRootSelector ) {\n\t\t\t\t\t\t\t\treturn prefixRootSelector( prefix, selector );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn prefixedSelector;\n\t\t\t\t\t\t},\n\t\t\t\t\t} ),\n\t\t\t\tbaseURL && rebaseUrl( { rootUrl: baseURL } ),\n\t\t\t].filter( Boolean )\n\t\t).process( css, {} ).css; // use sync PostCSS API\n\t} catch ( error ) {\n\t\tif ( error instanceof CssSyntaxError ) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.warn(\n\t\t\t\t'wp.blockEditor.transformStyles Failed to transform CSS.',\n\t\t\t\terror.message + '\\n' + error.showSourceCode( false )\n\t\t\t);\n\t\t} else {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.warn(\n\t\t\t\t'wp.blockEditor.transformStyles Failed to transform CSS.',\n\t\t\t\terror\n\t\t\t);\n\t\t}\n\n\t\treturn null;\n\t}\n}\n\n/**\n * @typedef {Object} EditorStyle\n * @property {string} css the CSS block(s), as a single string.\n * @property {?string} baseURL the base URL to be used as the reference when rewritting urls.\n * @property {?string[]} ignoredSelectors the selectors not to wrap.\n */\n\n/**\n * @typedef {Object} TransformOptions\n * @property {?string[]} ignoredSelectors the selectors not to wrap.\n */\n\n/**\n * Applies a series of CSS rule transforms to wrap selectors inside a given class and/or rewrite URLs depending on the parameters passed.\n *\n * @param {EditorStyle[]} styles CSS rules.\n * @param {string} wrapperSelector Wrapper selector.\n * @param {TransformOptions} transformOptions Additional options for style transformation.\n * @return {Array} converted rules.\n */\nconst transformStyles = ( styles, wrapperSelector = '', transformOptions ) => {\n\tlet cache = cacheByWrapperSelector.get( wrapperSelector );\n\tif ( ! cache ) {\n\t\tcache = new WeakMap();\n\t\tcacheByWrapperSelector.set( wrapperSelector, cache );\n\t}\n\treturn styles.map( ( style ) => {\n\t\tlet css = cache.get( style );\n\t\tif ( ! css ) {\n\t\t\tcss = transformStyle( style, wrapperSelector, transformOptions );\n\t\t\tcache.set( style, css );\n\t\t}\n\t\treturn css;\n\t} );\n};\n\nexport default transformStyles;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,KAAKA,MAAM,MAAM,WAAW;AACnC,OAAOC,SAAS,MAAM,uBAAuB;AAC7C,OAAOC,cAAc,MAAM,8BAA8B;AACzD,OAAOC,cAAc,MAAM,yBAAyB;AACpD,OAAOC,SAAS,MAAM,mBAAmB;AAEzC,MAAMC,sBAAsB,GAAG,IAAIC,GAAG,CAAC,CAAC;AAExC,MAAMC,oBAAoB,GAAG,CAC5B;EAAEC,IAAI,EAAE,MAAM;EAAEC,OAAO,EAAE;AAAO,CAAC,EACjC;EAAED,IAAI,EAAE,MAAM;EAAEC,OAAO,EAAE;AAAO,CAAC,EACjC;EAAED,IAAI,EAAE,cAAc;EAAEC,OAAO,EAAE;AAAQ,CAAC,EAC1C;EAAED,IAAI,EAAE,cAAc;EAAEC,OAAO,EAAE;AAAe,CAAC,EACjD;EAAED,IAAI,EAAE,cAAc;EAAEC,OAAO,EAAE;AAAgB,CAAC,EAClD;EAAED,IAAI,EAAE,cAAc;EAAEC,OAAO,EAAE;AAAe,CAAC,CACjD;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,kBAAkBA,CAAEC,MAAM,EAAEC,QAAQ,EAAG;EAC/C;EACA,MAAMC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IAAI,CACX,yDAAyD,EACzDF,KACD,CAAC;IACF;IAEA,OAAO,IAAI;EACZ;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMK,eAAe,GAAGA,CAAEC,MAAM,EAAEtB,eAAe,GAAG,EAAE,EAAEC,gBAAgB,KAAM;EAC7E,IAAIsB,KAAK,GAAG/C,sBAAsB,CAACgD,GAAG,CAAExB,eAAgB,CAAC;EACzD,IAAK,CAAEuB,KAAK,EAAG;IACdA,KAAK,GAAG,IAAIE,OAAO,CAAC,CAAC;IACrBjD,sBAAsB,CAACkD,GAAG,CAAE1B,eAAe,EAAEuB,KAAM,CAAC;EACrD;EACA,OAAOD,MAAM,CAACK,GAAG,CAAIC,KAAK,IAAM;IAC/B,IAAI/B,GAAG,GAAG0B,KAAK,CAACC,GAAG,CAAEI,KAAM,CAAC;IAC5B,IAAK,CAAE/B,GAAG,EAAG;MACZA,GAAG,GAAGD,cAAc,CAAEgC,KAAK,EAAE5B,eAAe,EAAEC,gBAAiB,CAAC;MAChEsB,KAAK,CAACG,GAAG,CAAEE,KAAK,EAAE/B,GAAI,CAAC;IACxB;IACA,OAAOA,GAAG;EACX,CAAE,CAAC;AACJ,CAAC;AAED,eAAewB,eAAe","ignoreList":[]}
1
+ {"version":3,"names":["parsel","Processor","CssSyntaxError","prefixSelector","rebaseUrl","cacheByWrapperSelector","Map","ROOT_SELECTOR_TOKENS","type","content","prefixRootSelector","prefix","selector","tokenized","tokenize","lastRootIndex","findLastIndex","some","rootSelector","insertionPoint","i","length","tokenizedPrefix","splice","stringify","transformStyle","css","ignoredSelectors","baseURL","wrapperSelector","transformOptions","_transformOptions$ign","excludedSelectors","transform","prefixedSelector","excludedSelector","RegExp","match","includes","hasRootSelector","startsWith","rootUrl","filter","Boolean","process","error","console","warn","message","showSourceCode","transformStyles","styles","cache","get","WeakMap","set","map","style"],"sources":["@wordpress/block-editor/src/utils/transform-styles/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport * as parsel from 'parsel-js';\nimport Processor from 'postcss/lib/processor';\nimport CssSyntaxError from 'postcss/lib/css-syntax-error';\nimport prefixSelector from 'postcss-prefix-selector';\nimport rebaseUrl from 'postcss-urlrebase';\n\nconst cacheByWrapperSelector = new Map();\n\nconst ROOT_SELECTOR_TOKENS = [\n\t{ type: 'type', content: 'body' },\n\t{ type: 'type', content: 'html' },\n\t{ type: 'pseudo-class', content: ':root' },\n\t{ type: 'pseudo-class', content: ':where(body)' },\n\t{ type: 'pseudo-class', content: ':where(:root)' },\n\t{ type: 'pseudo-class', content: ':where(html)' },\n];\n\n/**\n * Prefixes root selectors in a way that ensures consistent specificity.\n * This requires special handling, since prefixing a classname before\n * html, body, or :root will generally result in an invalid selector.\n *\n * Some libraries will simply replace the root selector with the prefix\n * instead, but this results in inconsistent specificity.\n *\n * This function instead inserts the prefix after the root tags but before\n * any other part of the selector. This results in consistent specificity:\n * - If a `:where()` selector is used for the prefix, all selectors output\n * by `transformStyles` will have no specificity increase.\n * - If a classname, id, or something else is used as the prefix, all selectors\n * will have the same specificity bump when transformed.\n *\n * @param {string} prefix The prefix.\n * @param {string} selector The selector.\n *\n * @return {string} The prefixed root selector.\n */\nfunction prefixRootSelector( prefix, selector ) {\n\t// Use a tokenizer, since regular expressions are unreliable.\n\tconst tokenized = parsel.tokenize( selector );\n\n\t// Find the last token that contains a root selector by walking back\n\t// through the tokens.\n\tconst lastRootIndex = tokenized.findLastIndex( ( { content, type } ) => {\n\t\treturn ROOT_SELECTOR_TOKENS.some(\n\t\t\t( rootSelector ) =>\n\t\t\t\tcontent === rootSelector.content && type === rootSelector.type\n\t\t);\n\t} );\n\n\t// Walk forwards to find the combinator after the last root.\n\t// This is where the root ends and the rest of the selector begins,\n\t// and the index to insert before.\n\t// Doing it this way takes into account that a root selector like\n\t// 'body' may have additional id/class/pseudo-class/attribute-selector\n\t// parts chained to it, which is difficult to quantify using a regex.\n\tlet insertionPoint = -1;\n\tfor ( let i = lastRootIndex + 1; i < tokenized.length; i++ ) {\n\t\tif ( tokenized[ i ].type === 'combinator' ) {\n\t\t\tinsertionPoint = i;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Tokenize and insert the prefix with a ' ' combinator before it.\n\tconst tokenizedPrefix = parsel.tokenize( prefix );\n\ttokenized.splice(\n\t\t// Insert at the insertion point, or the end.\n\t\tinsertionPoint === -1 ? tokenized.length : insertionPoint,\n\t\t0,\n\t\t{\n\t\t\ttype: 'combinator',\n\t\t\tcontent: ' ',\n\t\t},\n\t\t...tokenizedPrefix\n\t);\n\n\treturn parsel.stringify( tokenized );\n}\n\nfunction transformStyle(\n\t{ css, ignoredSelectors = [], baseURL },\n\twrapperSelector = '',\n\ttransformOptions\n) {\n\t// When there is no wrapper selector and no base URL, there is no need\n\t// to transform the CSS. This is most cases because in the default\n\t// iframed editor, no wrapping is needed, and not many styles\n\t// provide a base URL.\n\tif ( ! wrapperSelector && ! baseURL ) {\n\t\treturn css;\n\t}\n\n\ttry {\n\t\tconst excludedSelectors = [\n\t\t\t...ignoredSelectors,\n\t\t\t...( transformOptions?.ignoredSelectors ?? [] ),\n\t\t\twrapperSelector,\n\t\t];\n\n\t\treturn new Processor(\n\t\t\t[\n\t\t\t\twrapperSelector &&\n\t\t\t\t\tprefixSelector( {\n\t\t\t\t\t\tprefix: wrapperSelector,\n\t\t\t\t\t\ttransform( prefix, selector, prefixedSelector ) {\n\t\t\t\t\t\t\t// For backwards compatibility, don't use the `exclude` option\n\t\t\t\t\t\t\t// of postcss-prefix-selector, instead handle it here to match\n\t\t\t\t\t\t\t// the behavior of the old library (postcss-prefix-wrap) that\n\t\t\t\t\t\t\t// `transformStyle` previously used.\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\texcludedSelectors.some( ( excludedSelector ) =>\n\t\t\t\t\t\t\t\t\texcludedSelector instanceof RegExp\n\t\t\t\t\t\t\t\t\t\t? selector.match( excludedSelector )\n\t\t\t\t\t\t\t\t\t\t: selector.includes( excludedSelector )\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\treturn selector;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconst hasRootSelector = ROOT_SELECTOR_TOKENS.some(\n\t\t\t\t\t\t\t\t( rootSelector ) =>\n\t\t\t\t\t\t\t\t\tselector.startsWith( rootSelector.content )\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t// Reorganize root selectors such that the root part comes before the prefix,\n\t\t\t\t\t\t\t// but the prefix still comes before the remaining part of the selector.\n\t\t\t\t\t\t\tif ( hasRootSelector ) {\n\t\t\t\t\t\t\t\treturn prefixRootSelector( prefix, selector );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn prefixedSelector;\n\t\t\t\t\t\t},\n\t\t\t\t\t} ),\n\t\t\t\tbaseURL && rebaseUrl( { rootUrl: baseURL } ),\n\t\t\t].filter( Boolean )\n\t\t).process( css, {} ).css; // use sync PostCSS API\n\t} catch ( error ) {\n\t\tif ( error instanceof CssSyntaxError ) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.warn(\n\t\t\t\t'wp.blockEditor.transformStyles Failed to transform CSS.',\n\t\t\t\terror.message + '\\n' + error.showSourceCode( false )\n\t\t\t);\n\t\t} else {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.warn(\n\t\t\t\t'wp.blockEditor.transformStyles Failed to transform CSS.',\n\t\t\t\terror\n\t\t\t);\n\t\t}\n\n\t\treturn null;\n\t}\n}\n\n/**\n * @typedef {Object} EditorStyle\n * @property {string} css the CSS block(s), as a single string.\n * @property {?string} baseURL the base URL to be used as the reference when rewritting urls.\n * @property {?string[]} ignoredSelectors the selectors not to wrap.\n */\n\n/**\n * @typedef {Object} TransformOptions\n * @property {?string[]} ignoredSelectors the selectors not to wrap.\n */\n\n/**\n * Applies a series of CSS rule transforms to wrap selectors inside a given class and/or rewrite URLs depending on the parameters passed.\n *\n * @param {EditorStyle[]} styles CSS rules.\n * @param {string} wrapperSelector Wrapper selector.\n * @param {TransformOptions} transformOptions Additional options for style transformation.\n * @return {Array} converted rules.\n */\nconst transformStyles = ( styles, wrapperSelector = '', transformOptions ) => {\n\tlet cache = cacheByWrapperSelector.get( wrapperSelector );\n\tif ( ! cache ) {\n\t\tcache = new WeakMap();\n\t\tcacheByWrapperSelector.set( wrapperSelector, cache );\n\t}\n\treturn styles.map( ( style ) => {\n\t\tlet css = cache.get( style );\n\t\tif ( ! css ) {\n\t\t\tcss = transformStyle( style, wrapperSelector, transformOptions );\n\t\t\tcache.set( style, css );\n\t\t}\n\t\treturn css;\n\t} );\n};\n\nexport default transformStyles;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAO,KAAKA,MAAM,MAAM,WAAW;AACnC,OAAOC,SAAS,MAAM,uBAAuB;AAC7C,OAAOC,cAAc,MAAM,8BAA8B;AACzD,OAAOC,cAAc,MAAM,yBAAyB;AACpD,OAAOC,SAAS,MAAM,mBAAmB;AAEzC,MAAMC,sBAAsB,GAAG,IAAIC,GAAG,CAAC,CAAC;AAExC,MAAMC,oBAAoB,GAAG,CAC5B;EAAEC,IAAI,EAAE,MAAM;EAAEC,OAAO,EAAE;AAAO,CAAC,EACjC;EAAED,IAAI,EAAE,MAAM;EAAEC,OAAO,EAAE;AAAO,CAAC,EACjC;EAAED,IAAI,EAAE,cAAc;EAAEC,OAAO,EAAE;AAAQ,CAAC,EAC1C;EAAED,IAAI,EAAE,cAAc;EAAEC,OAAO,EAAE;AAAe,CAAC,EACjD;EAAED,IAAI,EAAE,cAAc;EAAEC,OAAO,EAAE;AAAgB,CAAC,EAClD;EAAED,IAAI,EAAE,cAAc;EAAEC,OAAO,EAAE;AAAe,CAAC,CACjD;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,S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c,CAAE,KAAM,CACpD,CAAC;IACF,CAAC,MAAM;MACN;MACAH,OAAO,CAACC,IAAI,CACX,yDAAyD,EACzDF,KACD,CAAC;IACF;IAEA,OAAO,IAAI;EACZ;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMK,eAAe,GAAGA,CAAEC,MAAM,EAAEtB,eAAe,GAAG,EAAE,EAAEC,gBAAgB,KAAM;EAC7E,IAAIsB,KAAK,GAAG/C,sBAAsB,CAACgD,GAAG,CAAExB,eAAgB,CAAC;EACzD,IAAK,CAAEuB,KAAK,EAAG;IACdA,KAAK,GAAG,IAAIE,OAAO,CAAC,CAAC;IACrBjD,sBAAsB,CAACkD,GAAG,CAAE1B,eAAe,EAAEuB,KAAM,CAAC;EACrD;EACA,OAAOD,MAAM,CAACK,GAAG,CAAIC,KAAK,IAAM;IAC/B,IAAI/B,GAAG,GAAG0B,KAAK,CAACC,GAAG,CAAEI,KAAM,CAAC;IAC5B,IAAK,CAAE/B,GAAG,EAAG;MACZA,GAAG,GAAGD,cAAc,CAAEgC,KAAK,EAAE5B,eAAe,EAAEC,gBAAiB,CAAC;MAChEsB,KAAK,CAACG,GAAG,CAAEE,KAAK,EAAE/B,GAAI,CAAC;IACxB;IACA,OAAOA,GAAG;EACX,CAAE,CAAC;AACJ,CAAC;AAED,eAAewB,eAAe","ignoreList":[]}
@@ -875,7 +875,7 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
875
875
  }
876
876
  [data-rich-text-script]::before {
877
877
  content: "</>";
878
- background: yellow;
878
+ background: rgb(255, 255, 0);
879
879
  }
880
880
 
881
881
  [data-rich-text-comment],
@@ -875,7 +875,7 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
875
875
  }
876
876
  [data-rich-text-script]::before {
877
877
  content: "</>";
878
- background: yellow;
878
+ background: rgb(255, 255, 0);
879
879
  }
880
880
 
881
881
  [data-rich-text-comment],
@@ -1588,6 +1588,7 @@ iframe[name=editor-canvas] {
1588
1588
  .block-editor-tools-panel-color-gradient-settings__item {
1589
1589
  padding: 0;
1590
1590
  max-width: 100%;
1591
+ position: relative;
1591
1592
  border-right: 1px solid #ddd;
1592
1593
  border-left: 1px solid #ddd;
1593
1594
  border-bottom: 1px solid #ddd;
@@ -1634,6 +1635,27 @@ iframe[name=editor-canvas] {
1634
1635
  flex-shrink: 0;
1635
1636
  }
1636
1637
 
1638
+ .block-editor-panel-color-gradient-settings__reset {
1639
+ position: absolute;
1640
+ left: 0;
1641
+ top: 8px;
1642
+ margin: auto 8px auto;
1643
+ opacity: 0;
1644
+ transition: opacity 0.1s ease-in-out;
1645
+ }
1646
+ @media (prefers-reduced-motion: reduce) {
1647
+ .block-editor-panel-color-gradient-settings__reset {
1648
+ transition-duration: 0s;
1649
+ transition-delay: 0s;
1650
+ }
1651
+ }
1652
+ .block-editor-panel-color-gradient-settings__reset.block-editor-panel-color-gradient-settings__reset {
1653
+ border-radius: 2px;
1654
+ }
1655
+ .block-editor-panel-color-gradient-settings__dropdown:hover + .block-editor-panel-color-gradient-settings__reset, .block-editor-panel-color-gradient-settings__reset:focus, .block-editor-panel-color-gradient-settings__reset:hover {
1656
+ opacity: 1;
1657
+ }
1658
+
1637
1659
  .block-editor-date-format-picker {
1638
1660
  margin-bottom: 16px;
1639
1661
  }
@@ -1767,7 +1789,7 @@ iframe[name=editor-canvas] {
1767
1789
  overflow: hidden;
1768
1790
  }
1769
1791
  .block-editor-grid-visualizer__cell .block-editor-inserter .block-editor-grid-visualizer__appender {
1770
- box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 20%, #0000);
1792
+ box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 20%, rgba(0, 0, 0, 0));
1771
1793
  color: inherit;
1772
1794
  overflow: hidden;
1773
1795
  height: 100%;
@@ -1782,7 +1804,7 @@ iframe[name=editor-canvas] {
1782
1804
  .block-editor-grid-visualizer__cell:hover .block-editor-grid-visualizer__appender,
1783
1805
  .block-editor-grid-visualizer__cell .block-editor-grid-visualizer__appender:focus {
1784
1806
  opacity: 1;
1785
- background-color: color-mix(in srgb, currentColor 20%, #0000);
1807
+ background-color: color-mix(in srgb, currentColor 20%, rgba(0, 0, 0, 0));
1786
1808
  }
1787
1809
 
1788
1810
  .block-editor-grid-visualizer__drop-zone {
@@ -2602,7 +2624,7 @@ iframe[name=editor-canvas] {
2602
2624
  }
2603
2625
  .block-editor-list-view-leaf.is-after-dragged-blocks.is-displacement-down {
2604
2626
  transition: transform 0.2s;
2605
- transform: translateY(calc(32px + var(--wp-admin--list-view-dragged-items-height, 32px) * -1));
2627
+ transform: translateY(calc(32px + var(--wp-admin--list-view-dragged-items-height, 32px) * -1));
2606
2628
  }
2607
2629
  @media (prefers-reduced-motion: reduce) {
2608
2630
  .block-editor-list-view-leaf.is-after-dragged-blocks.is-displacement-down {
@@ -3018,27 +3040,15 @@ iframe[name=editor-canvas] {
3018
3040
  }
3019
3041
 
3020
3042
  .block-editor-multi-selection-inspector__card {
3021
- display: flex;
3022
- align-items: flex-start;
3023
3043
  padding: 16px;
3024
3044
  }
3025
3045
 
3026
- .block-editor-multi-selection-inspector__card-content {
3027
- flex-grow: 1;
3028
- }
3029
-
3030
3046
  .block-editor-multi-selection-inspector__card-title {
3031
3047
  font-weight: 500;
3032
- margin-bottom: 5px;
3033
- }
3034
-
3035
- .block-editor-multi-selection-inspector__card-description {
3036
- font-size: 13px;
3037
3048
  }
3038
3049
 
3039
3050
  .block-editor-multi-selection-inspector__card .block-editor-block-icon {
3040
3051
  margin-right: -2px;
3041
- margin-left: 10px;
3042
3052
  padding: 0 3px;
3043
3053
  width: 36px;
3044
3054
  height: 24px;
@@ -4232,7 +4242,7 @@ div.block-editor-bindings__panel button:hover .block-editor-bindings__item span
4232
4242
  .block-editor-inserter__media-list__item:focus .block-editor-inserter__media-list__item-preview > * {
4233
4243
  outline-color: var(--wp-admin-theme-color);
4234
4244
  outline-width: var(--wp-admin-border-width-focus);
4235
- outline-offset: calc((-1 * var(--wp-admin-border-width-focus)));
4245
+ outline-offset: calc(-1 * var(--wp-admin-border-width-focus));
4236
4246
  transition: outline 0.1s linear;
4237
4247
  }
4238
4248
  @media (prefers-reduced-motion: reduce) {
@@ -4312,43 +4322,11 @@ div.block-editor-bindings__panel button:hover .block-editor-bindings__item span
4312
4322
  .spacing-sizes-control .spacing-sizes-control__label {
4313
4323
  margin-bottom: 0;
4314
4324
  }
4315
- .spacing-sizes-control .is-marked .components-range-control__track {
4316
- transition: width ease 0.1s;
4317
- }
4318
- @media (prefers-reduced-motion: reduce) {
4319
- .spacing-sizes-control .is-marked .components-range-control__track {
4320
- transition-duration: 0s;
4321
- transition-delay: 0s;
4322
- }
4323
- }
4324
- .spacing-sizes-control .is-marked .components-range-control__thumb-wrapper {
4325
- transition: right ease 0.1s;
4326
- }
4327
- @media (prefers-reduced-motion: reduce) {
4328
- .spacing-sizes-control .is-marked .components-range-control__thumb-wrapper {
4329
- transition-duration: 0s;
4330
- transition-delay: 0s;
4331
- }
4332
- }
4333
4325
  .spacing-sizes-control .spacing-sizes-control__range-control,
4334
4326
  .spacing-sizes-control .spacing-sizes-control__custom-value-range {
4335
4327
  flex: 1;
4336
4328
  margin-bottom: 0;
4337
4329
  }
4338
- .spacing-sizes-control .components-range-control__mark {
4339
- transform: translateX(50%);
4340
- height: 4px;
4341
- width: 2px;
4342
- background-color: #fff;
4343
- z-index: 1;
4344
- top: -4px;
4345
- }
4346
- .spacing-sizes-control .components-range-control__marks {
4347
- margin-top: 17px;
4348
- }
4349
- .spacing-sizes-control .components-range-control__thumb-wrapper {
4350
- z-index: 3;
4351
- }
4352
4330
 
4353
4331
  .spacing-sizes-control__header {
4354
4332
  height: 16px;