@wordpress/block-editor 17.1.0 → 17.2.1-next.v.202609171837.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 (541) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +214 -214
  3. package/build/autocompleters/block.cjs.map +2 -2
  4. package/build/components/alignment-control/ui.cjs.map +2 -2
  5. package/build/components/background-image-control/index.cjs +1 -1
  6. package/build/components/background-image-control/index.cjs.map +2 -2
  7. package/build/components/block-alignment-control/ui.cjs +21 -7
  8. package/build/components/block-alignment-control/ui.cjs.map +3 -3
  9. package/build/components/block-alignment-control/use-available-alignments.cjs +60 -13
  10. package/build/components/block-alignment-control/use-available-alignments.cjs.map +2 -2
  11. package/build/components/block-allowed-blocks/allowed-blocks-control.cjs.map +2 -2
  12. package/build/components/block-bindings/attribute-control.cjs +30 -30
  13. package/build/components/block-bindings/attribute-control.cjs.map +3 -3
  14. package/build/components/block-bindings/source-fields-list.cjs +27 -32
  15. package/build/components/block-bindings/source-fields-list.cjs.map +3 -3
  16. package/build/components/block-canvas/index.cjs.map +2 -2
  17. package/build/components/block-card/index.cjs +1 -2
  18. package/build/components/block-card/index.cjs.map +3 -3
  19. package/build/components/block-edit/edit.cjs.map +2 -2
  20. package/build/components/block-heading-level-dropdown/index.cjs.map +2 -2
  21. package/build/components/block-icon/index.cjs.map +2 -2
  22. package/build/components/block-inspector/edit-contents.cjs.map +2 -2
  23. package/build/components/block-inspector/index.cjs +27 -8
  24. package/build/components/block-inspector/index.cjs.map +3 -3
  25. package/build/components/block-keyboard-shortcuts/index.cjs.map +2 -2
  26. package/build/components/block-list/block-html.cjs +1 -12
  27. package/build/components/block-list/block-html.cjs.map +3 -3
  28. package/build/components/block-list/block.cjs +2 -4
  29. package/build/components/block-list/block.cjs.map +2 -2
  30. package/build/components/block-list/layout.cjs +1 -1
  31. package/build/components/block-list/layout.cjs.map +2 -2
  32. package/build/components/block-list/use-block-props/index.cjs.map +2 -2
  33. package/build/components/block-lock/modal.cjs +1 -3
  34. package/build/components/block-lock/modal.cjs.map +2 -2
  35. package/build/components/block-parent-selector/index.cjs +8 -5
  36. package/build/components/block-parent-selector/index.cjs.map +2 -2
  37. package/build/components/block-popover/index.cjs.map +2 -2
  38. package/build/components/block-rename/modal.cjs.map +2 -2
  39. package/build/components/block-settings-menu/block-settings-dropdown.cjs.map +2 -2
  40. package/build/components/block-styles/utils.cjs.map +2 -2
  41. package/build/components/block-switcher/index.cjs.map +2 -2
  42. package/build/components/block-toolbar/edit-section-button.cjs.map +2 -2
  43. package/build/components/block-toolbar/index.cjs +6 -4
  44. package/build/components/block-toolbar/index.cjs.map +2 -2
  45. package/build/components/block-toolbar/switch-section-style.cjs.map +2 -2
  46. package/build/components/block-variation-transforms/index.cjs +28 -18
  47. package/build/components/block-variation-transforms/index.cjs.map +3 -3
  48. package/build/components/block-visibility/modal.cjs.map +2 -2
  49. package/build/components/block-visibility/viewport-visibility-info.cjs.map +2 -2
  50. package/build/components/border-radius-control/index.cjs.map +2 -2
  51. package/build/components/color-palette/with-color-context.cjs.map +2 -2
  52. package/build/components/colors/with-colors.cjs.map +2 -2
  53. package/build/components/colors-gradients/control.cjs.map +2 -2
  54. package/build/components/contrast-checker/index.cjs.map +2 -2
  55. package/build/components/date-format-picker/index.cjs.map +2 -2
  56. package/build/components/dimensions-tool/aspect-ratio-tool.cjs.map +3 -3
  57. package/build/components/dimensions-tool/width-height-tool.cjs.map +2 -2
  58. package/build/components/font-sizes/with-font-sizes.cjs.map +2 -2
  59. package/build/components/global-styles/background-panel.cjs +1 -1
  60. package/build/components/global-styles/background-panel.cjs.map +2 -2
  61. package/build/components/global-styles/border-panel.cjs +1 -1
  62. package/build/components/global-styles/border-panel.cjs.map +2 -2
  63. package/build/components/global-styles/color-gradient-dropdown-item.cjs +1 -1
  64. package/build/components/global-styles/color-gradient-dropdown-item.cjs.map +2 -2
  65. package/build/components/global-styles/color-panel.cjs +1 -1
  66. package/build/components/global-styles/color-panel.cjs.map +2 -2
  67. package/build/components/global-styles/dimensions-panel.cjs +1 -1
  68. package/build/components/global-styles/dimensions-panel.cjs.map +2 -2
  69. package/build/components/global-styles/filters-panel.cjs +1 -1
  70. package/build/components/global-styles/filters-panel.cjs.map +2 -2
  71. package/build/components/global-styles/hooks.cjs +1 -0
  72. package/build/components/global-styles/hooks.cjs.map +2 -2
  73. package/build/components/global-styles/inheritance/index.cjs +3 -3
  74. package/build/components/global-styles/inheritance/index.cjs.map +2 -2
  75. package/build/components/global-styles/inherited-value-context.cjs +0 -5
  76. package/build/components/global-styles/inherited-value-context.cjs.map +2 -2
  77. package/build/components/global-styles/state-control-badges.cjs +0 -1
  78. package/build/components/global-styles/state-control-badges.cjs.map +2 -2
  79. package/build/components/global-styles/state-control.cjs +6 -4
  80. package/build/components/global-styles/state-control.cjs.map +2 -2
  81. package/build/components/global-styles/text-shadow-panel.cjs +254 -0
  82. package/build/components/global-styles/text-shadow-panel.cjs.map +7 -0
  83. package/build/components/global-styles/typography-panel.cjs +46 -5
  84. package/build/components/global-styles/typography-panel.cjs.map +2 -2
  85. package/build/components/global-styles/typography-utils.cjs.map +2 -2
  86. package/build/components/global-styles/utils.cjs.map +2 -2
  87. package/build/components/html-element-control/index.cjs.map +3 -3
  88. package/build/components/iframe/index.cjs.map +2 -2
  89. package/build/components/iframe/use-scale-canvas.cjs.map +2 -2
  90. package/build/components/image-size-control/index.cjs.map +3 -3
  91. package/build/components/inner-blocks/index.cjs +6 -1
  92. package/build/components/inner-blocks/index.cjs.map +2 -2
  93. package/build/components/inner-content/index.cjs.map +2 -2
  94. package/build/components/inserter/block-patterns-tab/use-pattern-categories.cjs +4 -23
  95. package/build/components/inserter/block-patterns-tab/use-pattern-categories.cjs.map +2 -2
  96. package/build/components/inserter/block-patterns-tab/utils.cjs +26 -0
  97. package/build/components/inserter/block-patterns-tab/utils.cjs.map +2 -2
  98. package/build/components/inserter/hooks/use-block-types-state.cjs.map +2 -2
  99. package/build/components/inserter/hooks/use-insertion-point.cjs.map +2 -2
  100. package/build/components/inserter/hooks/use-patterns-state.cjs.map +2 -2
  101. package/build/components/inserter/media-tab/media-panel.cjs.map +2 -2
  102. package/build/components/inserter/media-tab/media-preview.cjs.map +2 -2
  103. package/build/components/inserter-list-item/index.cjs.map +2 -2
  104. package/build/components/inspector-controls/list-view-content-popover.cjs.map +2 -2
  105. package/build/components/link-control/search-results.cjs.map +2 -2
  106. package/build/components/link-control/use-search-handler.cjs +3 -0
  107. package/build/components/link-control/use-search-handler.cjs.map +2 -2
  108. package/build/components/list-view/branch.cjs.map +2 -2
  109. package/build/components/list-view/drop-indicator.cjs.map +2 -2
  110. package/build/components/list-view/index.cjs.map +2 -2
  111. package/build/components/list-view/use-list-view-drop-zone.cjs.map +2 -2
  112. package/build/components/list-view/utils.cjs.map +2 -2
  113. package/build/components/media-replace-flow/index.cjs +4 -1
  114. package/build/components/media-replace-flow/index.cjs.map +2 -2
  115. package/build/components/plain-text/index.cjs +1 -2
  116. package/build/components/plain-text/index.cjs.map +3 -3
  117. package/build/components/preset-input-control/index.cjs.map +2 -2
  118. package/build/components/provider/index.cjs +3 -1
  119. package/build/components/provider/index.cjs.map +2 -2
  120. package/build/components/provider/use-block-sync.cjs.map +2 -2
  121. package/build/components/publish-date-time-picker/index.cjs.map +2 -2
  122. package/build/components/resizable-box-popover/index.cjs +1 -1
  123. package/build/components/resizable-box-popover/index.cjs.map +1 -1
  124. package/build/components/resolution-tool/index.cjs.map +3 -3
  125. package/build/components/rich-text/event-listeners/enter.cjs +8 -22
  126. package/build/components/rich-text/event-listeners/enter.cjs.map +2 -2
  127. package/build/components/rich-text/format-edit.cjs.map +2 -2
  128. package/build/components/rich-text/index.cjs +20 -0
  129. package/build/components/rich-text/index.cjs.map +2 -2
  130. package/build/components/rich-text/multiline.cjs +10 -2
  131. package/build/components/rich-text/multiline.cjs.map +2 -2
  132. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.cjs.map +2 -2
  133. package/build/components/typewriter/index.cjs.map +2 -2
  134. package/build/components/use-block-commands/index.cjs.map +2 -2
  135. package/build/components/writing-flow/index.cjs +3 -0
  136. package/build/components/writing-flow/index.cjs.map +2 -2
  137. package/build/components/writing-flow/use-clipboard-handler.cjs.map +2 -2
  138. package/build/components/writing-flow/use-selection-observer.cjs +5 -3
  139. package/build/components/writing-flow/use-selection-observer.cjs.map +2 -2
  140. package/build/hooks/align.cjs +3 -5
  141. package/build/hooks/align.cjs.map +2 -2
  142. package/build/hooks/background.cjs.map +2 -2
  143. package/build/hooks/block-bindings.cjs.map +2 -2
  144. package/build/hooks/border.cjs.map +2 -2
  145. package/build/hooks/contrast-checker.cjs.map +2 -2
  146. package/build/hooks/dimensions.cjs.map +2 -2
  147. package/build/hooks/duotone.cjs.map +2 -2
  148. package/build/hooks/elements.cjs.map +2 -2
  149. package/build/hooks/fit-text.cjs.map +2 -2
  150. package/build/hooks/gap.cjs +2 -1
  151. package/build/hooks/gap.cjs.map +3 -3
  152. package/build/hooks/index.cjs +4 -2
  153. package/build/hooks/index.cjs.map +3 -3
  154. package/build/hooks/layout-child.cjs.map +2 -2
  155. package/build/hooks/layout.cjs +15 -14
  156. package/build/hooks/layout.cjs.map +3 -3
  157. package/build/hooks/position.cjs +3 -31
  158. package/build/hooks/position.cjs.map +2 -2
  159. package/build/hooks/states.cjs +3 -2
  160. package/build/hooks/states.cjs.map +2 -2
  161. package/build/hooks/text-shadow.cjs +100 -0
  162. package/build/hooks/text-shadow.cjs.map +7 -0
  163. package/build/hooks/typography.cjs +30 -6
  164. package/build/hooks/typography.cjs.map +2 -2
  165. package/build/hooks/utils.cjs +24 -2
  166. package/build/hooks/utils.cjs.map +2 -2
  167. package/build/layouts/grid.cjs.map +2 -2
  168. package/build/layouts/utils.cjs +7 -2
  169. package/build/layouts/utils.cjs.map +2 -2
  170. package/build/private-apis.cjs +9 -6
  171. package/build/private-apis.cjs.map +2 -2
  172. package/build/store/actions.cjs +26 -4
  173. package/build/store/actions.cjs.map +3 -3
  174. package/build/store/private-selectors.cjs.map +2 -2
  175. package/build/store/reducer.cjs.map +2 -2
  176. package/build/store/selectors.cjs.map +2 -2
  177. package/build/utils/get-font-styles-and-weights.cjs.map +2 -2
  178. package/build/utils/transform-styles/index.cjs.map +1 -1
  179. package/build-module/autocompleters/block.mjs.map +2 -2
  180. package/build-module/components/alignment-control/ui.mjs.map +2 -2
  181. package/build-module/components/background-image-control/index.mjs +2 -2
  182. package/build-module/components/background-image-control/index.mjs.map +2 -2
  183. package/build-module/components/block-alignment-control/ui.mjs +21 -7
  184. package/build-module/components/block-alignment-control/ui.mjs.map +2 -2
  185. package/build-module/components/block-alignment-control/use-available-alignments.mjs +56 -13
  186. package/build-module/components/block-alignment-control/use-available-alignments.mjs.map +2 -2
  187. package/build-module/components/block-allowed-blocks/allowed-blocks-control.mjs.map +2 -2
  188. package/build-module/components/block-bindings/attribute-control.mjs +31 -32
  189. package/build-module/components/block-bindings/attribute-control.mjs.map +2 -2
  190. package/build-module/components/block-bindings/source-fields-list.mjs +25 -30
  191. package/build-module/components/block-bindings/source-fields-list.mjs.map +2 -2
  192. package/build-module/components/block-canvas/index.mjs.map +2 -2
  193. package/build-module/components/block-card/index.mjs +3 -8
  194. package/build-module/components/block-card/index.mjs.map +2 -2
  195. package/build-module/components/block-edit/edit.mjs.map +2 -2
  196. package/build-module/components/block-heading-level-dropdown/index.mjs.map +2 -2
  197. package/build-module/components/block-icon/index.mjs.map +2 -2
  198. package/build-module/components/block-inspector/edit-contents.mjs.map +2 -2
  199. package/build-module/components/block-inspector/index.mjs +29 -10
  200. package/build-module/components/block-inspector/index.mjs.map +2 -2
  201. package/build-module/components/block-keyboard-shortcuts/index.mjs.map +2 -2
  202. package/build-module/components/block-list/block-html.mjs +1 -2
  203. package/build-module/components/block-list/block-html.mjs.map +2 -2
  204. package/build-module/components/block-list/block.mjs +2 -4
  205. package/build-module/components/block-list/block.mjs.map +2 -2
  206. package/build-module/components/block-list/layout.mjs +1 -1
  207. package/build-module/components/block-list/layout.mjs.map +2 -2
  208. package/build-module/components/block-list/use-block-props/index.mjs.map +2 -2
  209. package/build-module/components/block-lock/modal.mjs +1 -3
  210. package/build-module/components/block-lock/modal.mjs.map +2 -2
  211. package/build-module/components/block-parent-selector/index.mjs +8 -5
  212. package/build-module/components/block-parent-selector/index.mjs.map +2 -2
  213. package/build-module/components/block-popover/index.mjs.map +2 -2
  214. package/build-module/components/block-rename/modal.mjs.map +2 -2
  215. package/build-module/components/block-settings-menu/block-settings-dropdown.mjs.map +2 -2
  216. package/build-module/components/block-styles/utils.mjs.map +2 -2
  217. package/build-module/components/block-switcher/index.mjs.map +2 -2
  218. package/build-module/components/block-toolbar/edit-section-button.mjs.map +2 -2
  219. package/build-module/components/block-toolbar/index.mjs +6 -4
  220. package/build-module/components/block-toolbar/index.mjs.map +2 -2
  221. package/build-module/components/block-toolbar/switch-section-style.mjs.map +2 -2
  222. package/build-module/components/block-variation-transforms/index.mjs +30 -21
  223. package/build-module/components/block-variation-transforms/index.mjs.map +2 -2
  224. package/build-module/components/block-visibility/modal.mjs.map +2 -2
  225. package/build-module/components/block-visibility/viewport-visibility-info.mjs.map +2 -2
  226. package/build-module/components/border-radius-control/index.mjs.map +2 -2
  227. package/build-module/components/color-palette/with-color-context.mjs.map +2 -2
  228. package/build-module/components/colors/with-colors.mjs.map +2 -2
  229. package/build-module/components/colors-gradients/control.mjs.map +2 -2
  230. package/build-module/components/contrast-checker/index.mjs.map +2 -2
  231. package/build-module/components/date-format-picker/index.mjs.map +2 -2
  232. package/build-module/components/dimensions-tool/aspect-ratio-tool.mjs +2 -2
  233. package/build-module/components/dimensions-tool/aspect-ratio-tool.mjs.map +2 -2
  234. package/build-module/components/dimensions-tool/width-height-tool.mjs.map +2 -2
  235. package/build-module/components/font-sizes/with-font-sizes.mjs.map +2 -2
  236. package/build-module/components/global-styles/background-panel.mjs +2 -2
  237. package/build-module/components/global-styles/background-panel.mjs.map +2 -2
  238. package/build-module/components/global-styles/border-panel.mjs +2 -2
  239. package/build-module/components/global-styles/border-panel.mjs.map +2 -2
  240. package/build-module/components/global-styles/color-gradient-dropdown-item.mjs +2 -2
  241. package/build-module/components/global-styles/color-gradient-dropdown-item.mjs.map +2 -2
  242. package/build-module/components/global-styles/color-panel.mjs +2 -2
  243. package/build-module/components/global-styles/color-panel.mjs.map +2 -2
  244. package/build-module/components/global-styles/dimensions-panel.mjs +2 -2
  245. package/build-module/components/global-styles/dimensions-panel.mjs.map +2 -2
  246. package/build-module/components/global-styles/filters-panel.mjs +2 -2
  247. package/build-module/components/global-styles/filters-panel.mjs.map +2 -2
  248. package/build-module/components/global-styles/hooks.mjs +1 -0
  249. package/build-module/components/global-styles/hooks.mjs.map +2 -2
  250. package/build-module/components/global-styles/inheritance/index.mjs +2 -2
  251. package/build-module/components/global-styles/inheritance/index.mjs.map +2 -2
  252. package/build-module/components/global-styles/inherited-value-context.mjs +0 -5
  253. package/build-module/components/global-styles/inherited-value-context.mjs.map +2 -2
  254. package/build-module/components/global-styles/state-control-badges.mjs +0 -1
  255. package/build-module/components/global-styles/state-control-badges.mjs.map +2 -2
  256. package/build-module/components/global-styles/state-control.mjs +6 -4
  257. package/build-module/components/global-styles/state-control.mjs.map +2 -2
  258. package/build-module/components/global-styles/text-shadow-panel.mjs +224 -0
  259. package/build-module/components/global-styles/text-shadow-panel.mjs.map +7 -0
  260. package/build-module/components/global-styles/typography-panel.mjs +47 -6
  261. package/build-module/components/global-styles/typography-panel.mjs.map +2 -2
  262. package/build-module/components/global-styles/typography-utils.mjs.map +2 -2
  263. package/build-module/components/global-styles/utils.mjs.map +2 -2
  264. package/build-module/components/html-element-control/index.mjs +2 -2
  265. package/build-module/components/html-element-control/index.mjs.map +2 -2
  266. package/build-module/components/iframe/index.mjs.map +2 -2
  267. package/build-module/components/iframe/use-scale-canvas.mjs.map +2 -2
  268. package/build-module/components/image-size-control/index.mjs +2 -2
  269. package/build-module/components/image-size-control/index.mjs.map +2 -2
  270. package/build-module/components/inner-blocks/index.mjs +6 -1
  271. package/build-module/components/inner-blocks/index.mjs.map +2 -2
  272. package/build-module/components/inner-content/index.mjs.map +2 -2
  273. package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.mjs +6 -24
  274. package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.mjs.map +2 -2
  275. package/build-module/components/inserter/block-patterns-tab/utils.mjs +25 -0
  276. package/build-module/components/inserter/block-patterns-tab/utils.mjs.map +2 -2
  277. package/build-module/components/inserter/hooks/use-block-types-state.mjs.map +2 -2
  278. package/build-module/components/inserter/hooks/use-insertion-point.mjs.map +2 -2
  279. package/build-module/components/inserter/hooks/use-patterns-state.mjs.map +2 -2
  280. package/build-module/components/inserter/media-tab/media-panel.mjs.map +2 -2
  281. package/build-module/components/inserter/media-tab/media-preview.mjs.map +2 -2
  282. package/build-module/components/inserter-list-item/index.mjs.map +2 -2
  283. package/build-module/components/inspector-controls/list-view-content-popover.mjs.map +2 -2
  284. package/build-module/components/link-control/search-results.mjs.map +2 -2
  285. package/build-module/components/link-control/use-search-handler.mjs +3 -0
  286. package/build-module/components/link-control/use-search-handler.mjs.map +2 -2
  287. package/build-module/components/list-view/branch.mjs.map +2 -2
  288. package/build-module/components/list-view/drop-indicator.mjs.map +2 -2
  289. package/build-module/components/list-view/index.mjs.map +2 -2
  290. package/build-module/components/list-view/use-list-view-drop-zone.mjs.map +2 -2
  291. package/build-module/components/list-view/utils.mjs.map +2 -2
  292. package/build-module/components/media-replace-flow/index.mjs +4 -1
  293. package/build-module/components/media-replace-flow/index.mjs.map +2 -2
  294. package/build-module/components/plain-text/index.mjs +1 -2
  295. package/build-module/components/plain-text/index.mjs.map +2 -2
  296. package/build-module/components/preset-input-control/index.mjs.map +2 -2
  297. package/build-module/components/provider/index.mjs +3 -1
  298. package/build-module/components/provider/index.mjs.map +2 -2
  299. package/build-module/components/provider/use-block-sync.mjs.map +2 -2
  300. package/build-module/components/publish-date-time-picker/index.mjs.map +2 -2
  301. package/build-module/components/resizable-box-popover/index.mjs +1 -1
  302. package/build-module/components/resizable-box-popover/index.mjs.map +1 -1
  303. package/build-module/components/resolution-tool/index.mjs +2 -2
  304. package/build-module/components/resolution-tool/index.mjs.map +2 -2
  305. package/build-module/components/rich-text/event-listeners/enter.mjs +8 -22
  306. package/build-module/components/rich-text/event-listeners/enter.mjs.map +2 -2
  307. package/build-module/components/rich-text/format-edit.mjs.map +2 -2
  308. package/build-module/components/rich-text/index.mjs +21 -0
  309. package/build-module/components/rich-text/index.mjs.map +2 -2
  310. package/build-module/components/rich-text/multiline.mjs +11 -3
  311. package/build-module/components/rich-text/multiline.mjs.map +2 -2
  312. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.mjs.map +2 -2
  313. package/build-module/components/typewriter/index.mjs.map +2 -2
  314. package/build-module/components/use-block-commands/index.mjs.map +2 -2
  315. package/build-module/components/writing-flow/index.mjs +3 -0
  316. package/build-module/components/writing-flow/index.mjs.map +2 -2
  317. package/build-module/components/writing-flow/use-clipboard-handler.mjs.map +2 -2
  318. package/build-module/components/writing-flow/use-selection-observer.mjs +5 -3
  319. package/build-module/components/writing-flow/use-selection-observer.mjs.map +2 -2
  320. package/build-module/hooks/align.mjs +6 -6
  321. package/build-module/hooks/align.mjs.map +2 -2
  322. package/build-module/hooks/background.mjs.map +2 -2
  323. package/build-module/hooks/block-bindings.mjs.map +2 -2
  324. package/build-module/hooks/border.mjs.map +2 -2
  325. package/build-module/hooks/contrast-checker.mjs.map +2 -2
  326. package/build-module/hooks/dimensions.mjs.map +2 -2
  327. package/build-module/hooks/duotone.mjs.map +2 -2
  328. package/build-module/hooks/elements.mjs.map +2 -2
  329. package/build-module/hooks/fit-text.mjs.map +2 -2
  330. package/build-module/hooks/gap.mjs +2 -1
  331. package/build-module/hooks/gap.mjs.map +2 -2
  332. package/build-module/hooks/index.mjs +4 -2
  333. package/build-module/hooks/index.mjs.map +2 -2
  334. package/build-module/hooks/layout-child.mjs.map +2 -2
  335. package/build-module/hooks/layout.mjs +6 -5
  336. package/build-module/hooks/layout.mjs.map +2 -2
  337. package/build-module/hooks/position.mjs +5 -33
  338. package/build-module/hooks/position.mjs.map +2 -2
  339. package/build-module/hooks/states.mjs +3 -2
  340. package/build-module/hooks/states.mjs.map +2 -2
  341. package/build-module/hooks/text-shadow.mjs +65 -0
  342. package/build-module/hooks/text-shadow.mjs.map +7 -0
  343. package/build-module/hooks/typography.mjs +30 -6
  344. package/build-module/hooks/typography.mjs.map +2 -2
  345. package/build-module/hooks/utils.mjs +24 -2
  346. package/build-module/hooks/utils.mjs.map +2 -2
  347. package/build-module/layouts/grid.mjs.map +2 -2
  348. package/build-module/layouts/utils.mjs +5 -1
  349. package/build-module/layouts/utils.mjs.map +2 -2
  350. package/build-module/private-apis.mjs +6 -2
  351. package/build-module/private-apis.mjs.map +2 -2
  352. package/build-module/store/actions.mjs +28 -5
  353. package/build-module/store/actions.mjs.map +3 -3
  354. package/build-module/store/private-selectors.mjs.map +2 -2
  355. package/build-module/store/reducer.mjs.map +2 -2
  356. package/build-module/store/selectors.mjs.map +2 -2
  357. package/build-module/utils/get-font-styles-and-weights.mjs.map +2 -2
  358. package/build-module/utils/transform-styles/index.mjs.map +1 -1
  359. package/build-style/content-rtl.css +7 -2
  360. package/build-style/content.css +7 -2
  361. package/build-style/style-rtl.css +90 -25
  362. package/build-style/style.css +92 -25
  363. package/package.json +42 -43
  364. package/src/autocompleters/block.jsx +4 -4
  365. package/src/components/alignment-control/ui.jsx +1 -1
  366. package/src/components/background-image-control/index.jsx +3 -3
  367. package/src/components/block-alignment-control/test/index.jsdom.test.jsx +267 -0
  368. package/src/components/block-alignment-control/ui.jsx +47 -9
  369. package/src/components/block-alignment-control/use-available-alignments.js +106 -20
  370. package/src/components/block-allowed-blocks/allowed-blocks-control.jsx +1 -1
  371. package/src/components/block-bindings/attribute-control.jsx +27 -29
  372. package/src/components/block-bindings/source-fields-list.jsx +22 -32
  373. package/src/components/block-bindings/test/attribute-control.jsdom.test.jsx +115 -0
  374. package/src/components/block-canvas/index.jsx +1 -1
  375. package/src/components/block-card/index.jsx +5 -11
  376. package/src/components/block-card/style.scss +1 -0
  377. package/src/components/block-edit/edit.jsx +1 -1
  378. package/src/components/block-heading-level-dropdown/index.jsx +1 -1
  379. package/src/components/block-icon/index.jsx +1 -1
  380. package/src/components/block-icon/test/index.browser.test.jsx +74 -0
  381. package/src/components/block-inspector/edit-contents.jsx +2 -2
  382. package/src/components/block-inspector/index.jsx +46 -15
  383. package/src/components/block-inspector/style.scss +16 -0
  384. package/src/components/block-keyboard-shortcuts/index.jsx +2 -2
  385. package/src/components/block-list/block-html.jsx +2 -3
  386. package/src/components/block-list/block.jsx +7 -5
  387. package/src/components/block-list/content.scss +3 -2
  388. package/src/components/block-list/layout.jsx +4 -1
  389. package/src/components/block-list/test/layout.jsdom.test.js +40 -0
  390. package/src/components/block-list/use-block-props/index.js +1 -1
  391. package/src/components/block-lock/modal.jsx +2 -3
  392. package/src/components/block-lock/style.scss +1 -1
  393. package/src/components/block-mover/style.scss +0 -13
  394. package/src/components/block-parent-selector/index.jsx +12 -6
  395. package/src/components/block-patterns-list/style.scss +1 -1
  396. package/src/components/block-popover/index.jsx +1 -1
  397. package/src/components/block-rename/modal.jsx +3 -3
  398. package/src/components/block-settings-menu/block-settings-dropdown.jsx +1 -1
  399. package/src/components/block-styles/utils.js +1 -1
  400. package/src/components/block-switcher/index.jsx +3 -3
  401. package/src/components/block-toolbar/edit-section-button.jsx +2 -2
  402. package/src/components/block-toolbar/index.jsx +8 -4
  403. package/src/components/block-toolbar/switch-section-style.jsx +1 -1
  404. package/src/components/block-variation-transforms/index.jsx +24 -23
  405. package/src/components/block-variation-transforms/test/index.jsdom.test.jsx +93 -0
  406. package/src/components/block-visibility/modal.jsx +7 -7
  407. package/src/components/block-visibility/style.scss +1 -1
  408. package/src/components/block-visibility/viewport-visibility-info.jsx +5 -7
  409. package/src/components/border-radius-control/index.jsx +2 -2
  410. package/src/components/border-radius-control/test/index.jsdom.test.jsx +0 -22
  411. package/src/components/border-radius-control/test/select.browser.test.js +30 -0
  412. package/src/components/color-palette/with-color-context.jsx +1 -1
  413. package/src/components/colors/with-colors.jsx +1 -1
  414. package/src/components/colors-gradients/control.jsx +2 -2
  415. package/src/components/colors-gradients/test/{control.jsdom.test.jsx → control.browser.test.jsx} +6 -9
  416. package/src/components/contrast-checker/index.jsx +2 -2
  417. package/src/components/date-format-picker/index.jsx +2 -2
  418. package/src/components/dimensions-tool/aspect-ratio-tool.jsx +4 -4
  419. package/src/components/dimensions-tool/test/index.jsdom.test.jsx +17 -11
  420. package/src/components/dimensions-tool/width-height-tool.jsx +2 -2
  421. package/src/components/font-sizes/with-font-sizes.jsx +2 -3
  422. package/src/components/global-styles/background-panel.jsx +2 -2
  423. package/src/components/global-styles/border-panel.jsx +2 -2
  424. package/src/components/global-styles/color-gradient-dropdown-item.jsx +3 -3
  425. package/src/components/global-styles/color-panel.jsx +3 -3
  426. package/src/components/global-styles/dimensions-panel.jsx +6 -6
  427. package/src/components/global-styles/filters-panel.jsx +2 -2
  428. package/src/components/global-styles/hooks.js +1 -0
  429. package/src/components/global-styles/inheritance/index.jsx +9 -6
  430. package/src/components/global-styles/inheritance/test/{index.jsdom.test.jsx → index.browser.test.jsx} +34 -28
  431. package/src/components/global-styles/inherited-value-context.js +1 -9
  432. package/src/components/global-styles/state-control-badges.jsx +0 -1
  433. package/src/components/global-styles/state-control.jsx +12 -3
  434. package/src/components/global-styles/style.scss +68 -0
  435. package/src/components/global-styles/test/{color-panel.jsdom.test.jsx → color-panel.browser.test.jsx} +53 -54
  436. package/src/components/global-styles/test/inherited-value-context-core.jsdom.test.js +17 -26
  437. package/src/components/global-styles/test/{typography-panel-core.jsdom.test.jsx → typography-panel-core.browser.test.jsx} +84 -39
  438. package/src/components/global-styles/test/{typography-panel.jsdom.test.jsx → typography-panel.browser.test.jsx} +80 -122
  439. package/src/components/global-styles/text-shadow-panel.tsx +257 -0
  440. package/src/components/global-styles/typography-panel.jsx +52 -13
  441. package/src/components/global-styles/typography-utils.js +2 -2
  442. package/src/components/global-styles/utils.js +1 -1
  443. package/src/components/html-element-control/index.jsx +2 -2
  444. package/src/components/iframe/index.jsx +1 -1
  445. package/src/components/iframe/use-scale-canvas.js +1 -1
  446. package/src/components/image-size-control/index.jsx +2 -2
  447. package/src/components/inner-blocks/index.jsx +9 -1
  448. package/src/components/inner-content/index.jsx +1 -1
  449. package/src/components/inserter/block-patterns-tab/use-pattern-categories.js +7 -33
  450. package/src/components/inserter/block-patterns-tab/utils.js +44 -0
  451. package/src/components/inserter/hooks/use-block-types-state.js +2 -2
  452. package/src/components/inserter/hooks/use-insertion-point.js +1 -1
  453. package/src/components/inserter/hooks/use-patterns-state.js +1 -1
  454. package/src/components/inserter/media-tab/media-panel.jsx +9 -9
  455. package/src/components/inserter/media-tab/media-preview.jsx +1 -1
  456. package/src/components/inserter-list-item/index.jsx +1 -1
  457. package/src/components/inserter-list-item/style.scss +2 -2
  458. package/src/components/inspector-controls/list-view-content-popover.jsx +1 -1
  459. package/src/components/link-control/search-results.jsx +1 -1
  460. package/src/components/link-control/style.scss +1 -1
  461. package/src/components/link-control/test/index.jsdom.test.jsx +38 -110
  462. package/src/components/link-control/test/keyboard-selection.browser.test.js +110 -0
  463. package/src/components/link-control/use-search-handler.js +8 -3
  464. package/src/components/list-view/branch.jsx +1 -1
  465. package/src/components/list-view/drop-indicator.jsx +3 -3
  466. package/src/components/list-view/index.jsx +1 -1
  467. package/src/components/list-view/style.scss +1 -9
  468. package/src/components/list-view/use-list-view-drop-zone.js +1 -1
  469. package/src/components/list-view/utils.js +1 -1
  470. package/src/components/media-replace-flow/index.jsx +4 -1
  471. package/src/components/navigable-toolbar/test/index.browser.test.js +6 -7
  472. package/src/components/plain-text/README.md +3 -2
  473. package/src/components/plain-text/content.scss +0 -1
  474. package/src/components/plain-text/index.jsx +2 -3
  475. package/src/components/plain-text/style.scss +4 -0
  476. package/src/components/preset-input-control/index.jsx +2 -2
  477. package/src/components/preset-input-control/test/index.jsdom.test.jsx +0 -56
  478. package/src/components/preset-input-control/test/interaction.browser.test.js +63 -0
  479. package/src/components/provider/index.jsx +5 -3
  480. package/src/components/provider/use-block-sync.js +5 -5
  481. package/src/components/publish-date-time-picker/index.jsx +1 -1
  482. package/src/components/resizable-box-popover/index.jsx +1 -1
  483. package/src/components/resolution-tool/index.jsx +2 -2
  484. package/src/components/responsive-block-control/style.scss +1 -2
  485. package/src/components/responsive-block-control/test/index.jsdom.test.jsx +2 -2
  486. package/src/components/rich-text/event-listeners/enter.js +16 -23
  487. package/src/components/rich-text/format-edit.jsx +1 -1
  488. package/src/components/rich-text/index.jsx +39 -2
  489. package/src/components/rich-text/multiline.jsx +11 -3
  490. package/src/components/spacing-sizes-control/hooks/use-spacing-sizes.js +1 -1
  491. package/src/components/spacing-sizes-control/test/index.jsdom.test.jsx +0 -21
  492. package/src/components/spacing-sizes-control/test/select.browser.test.js +58 -0
  493. package/src/components/typewriter/index.jsx +1 -1
  494. package/src/components/url-input/test/fixtures/validated-input-control-deprecation.js +1 -1
  495. package/src/components/use-block-commands/index.js +1 -1
  496. package/src/components/use-block-drop-zone/test/index.js +2 -2
  497. package/src/components/writing-flow/index.jsx +8 -0
  498. package/src/components/writing-flow/use-clipboard-handler.js +1 -1
  499. package/src/components/writing-flow/use-selection-observer.js +15 -6
  500. package/src/content.scss +1 -0
  501. package/src/hooks/align.jsx +22 -6
  502. package/src/hooks/background.jsx +1 -1
  503. package/src/hooks/block-bindings.jsx +1 -1
  504. package/src/hooks/block-hooks.scss +0 -6
  505. package/src/hooks/border.jsx +2 -2
  506. package/src/hooks/contrast-checker.js +1 -1
  507. package/src/hooks/dimensions.jsx +2 -2
  508. package/src/hooks/duotone.jsx +3 -3
  509. package/src/hooks/elements.jsx +3 -3
  510. package/src/hooks/fit-text.jsx +1 -1
  511. package/src/hooks/gap.js +2 -4
  512. package/src/hooks/index.js +3 -1
  513. package/src/hooks/layout-child.jsx +3 -4
  514. package/src/hooks/layout.jsx +17 -18
  515. package/src/hooks/position.jsx +5 -36
  516. package/src/hooks/states.jsx +6 -2
  517. package/src/hooks/test/layout.jsdom.test.js +44 -1
  518. package/src/hooks/text-shadow.ts +105 -0
  519. package/src/hooks/typography.jsx +58 -30
  520. package/src/hooks/utils.jsx +23 -1
  521. package/src/layouts/grid.jsx +2 -2
  522. package/src/layouts/test/flex.jsdom.test.jsx +4 -3
  523. package/src/layouts/test/utils.js +48 -1
  524. package/src/layouts/utils.js +19 -0
  525. package/src/private-apis.js +4 -0
  526. package/src/store/actions.js +50 -10
  527. package/src/store/private-selectors.js +5 -5
  528. package/src/store/reducer.js +6 -6
  529. package/src/store/selectors.js +3 -3
  530. package/src/store/test/actions.jsdom.test.js +60 -0
  531. package/src/style.scss +1 -0
  532. package/src/utils/get-font-styles-and-weights.ts +1 -1
  533. package/src/utils/transform-styles/index.ts +1 -1
  534. package/build/hooks/cross-origin-isolation.cjs +0 -56
  535. package/build/hooks/cross-origin-isolation.cjs.map +0 -7
  536. package/build-module/hooks/cross-origin-isolation.mjs +0 -54
  537. package/build-module/hooks/cross-origin-isolation.mjs.map +0 -7
  538. package/src/components/block-icon/test/__snapshots__/index.jsdom.test.jsx.snap +0 -27
  539. package/src/components/block-icon/test/index.jsdom.test.jsx +0 -67
  540. package/src/hooks/cross-origin-isolation.js +0 -73
  541. package/src/hooks/test/cross-origin-isolation.jsdom.test.js +0 -173
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/utils/get-font-styles-and-weights.ts"],
4
- "sourcesContent": ["import { _x, sprintf } from '@wordpress/i18n';\nimport { formatFontStyle } from './format-font-style';\nimport { formatFontWeight } from './format-font-weight';\nimport type {\n\tFontFamilyFace,\n\tFormattedFont,\n\tCombinedStyleAndWeightOption,\n} from './types';\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 fontFamilyFaces font family faces array\n * @return new object with combined and separated font style and weight properties\n */\nexport function getFontStylesAndWeights(\n\tfontFamilyFaces: FontFamilyFace[] | undefined\n) {\n\tlet fontStyles: FormattedFont[] = [];\n\tlet fontWeights: FormattedFont[] = [];\n\tconst combinedStyleAndWeightOptions: CombinedStyleAndWeightOption[] = [];\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\tconst [ startStr, endStr ] = face.fontWeight.split( ' ' );\n\t\t\tconst startValue = parseInt( startStr.slice( 0, 1 ) );\n\t\t\tconst endValue =\n\t\t\t\tendStr === '1000' ? 10 : parseInt( endStr.slice( 0, 1 ) );\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"],
5
- "mappings": ";AAAA,SAAS,IAAI,eAAe;AAC5B,SAAS,uBAAuB;AAChC,SAAS,wBAAwB;AAOjC,IAAM,cAAc;AAAA,EACnB;AAAA,IACC,MAAM,GAAI,WAAW,YAAa;AAAA,I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AA,EACH;AAGA,MAAK,cAAe;AACnB,iBAAa;AACb,kBAAc;AAAA,EACf;AAGA,eAAa,WAAW,WAAW,IAAI,cAAc;AACrD,gBAAc,YAAY,WAAW,IAAI,eAAe;AAGxD,aAAW,QAAS,CAAE,EAAE,MAAM,WAAW,OAAO,WAAW,MAAO;AACjE,gBAAY,QAAS,CAAE,EAAE,MAAM,YAAY,OAAO,YAAY,MAAO;AACpE,YAAM,aACL,eAAe,WACZ,aACA;AAAA;AAAA,QAEA,GAAI,aAAa,MAAO;AAAA,QACxB,cAAc;AAAA,QACd,aAAa;AAAA,MACb;AAEJ,oCAA8B,KAAM;AAAA,QACnC,KAAK,GAAI,UAAW,IAAK,WAAY;AAAA,QACrC,MAAM,cAAc;AAAA,QACpB,OAAO;AAAA,UACN,WAAW;AAAA,UACX,YAAY;AAAA,QACb;AAAA,MACD,CAAE;AAAA,IACH,CAAE;AAAA,EACH,CAAE;AAEF,SAAO;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACD;",
4
+ "sourcesContent": ["import { _x, sprintf } from '@wordpress/i18n';\nimport { formatFontStyle } from './format-font-style';\nimport { formatFontWeight } from './format-font-weight';\nimport type {\n\tFontFamilyFace,\n\tFormattedFont,\n\tCombinedStyleAndWeightOption,\n} from './types';\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 fontFamilyFaces font family faces array\n * @return new object with combined and separated font style and weight properties\n */\nexport function getFontStylesAndWeights(\n\tfontFamilyFaces: FontFamilyFace[] | undefined\n) {\n\tlet fontStyles: FormattedFont[] = [];\n\tlet fontWeights: FormattedFont[] = [];\n\tconst combinedStyleAndWeightOptions: CombinedStyleAndWeightOption[] = [];\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\tconst [ startStr, endStr ] = face.fontWeight.split( ' ' );\n\t\t\tconst startValue = parseInt( startStr.slice( 0, 1 ) );\n\t\t\tconst endValue =\n\t\t\t\tendStr === '1000' ? 10 : parseInt( endStr.slice( 0, 1 ) );\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\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"],
5
+ "mappings": ";AAAA,SAAS,IAAI,eAAe;AAC5B,SAAS,uBAAuB;AAChC,SAAS,wBAAwB;AAOjC,IAAM,cAAc;AAAA,EACnB;AAAA,IACC,MAAM,GAAI,WAAW,YAAa;AAAA,IAClC,OAAO;AAAA,EACR;AAAA,EACA;AAAA,IACC,MAAM,GAAI,UAAU,YAAa;AAAA,IACjC,OAAO;AAAA,EACR;AACD;AAEA,IAAM,eAAe;AAAA,EACpB;AAAA,IACC,MAAM,GAAI,QAAQ,aAAc;AAAA,IAChC,OAAO;AAAA,EACR;AAAA,EACA;AAAA,IACC,MAAM,GAAI,eAAe,aAAc;AAAA,IACvC,OAAO;AAAA,EACR;AAAA,EACA;AAAA,IACC,MAAM,GAAI,SAAS,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GAAI,aAAa,MAAO;AAAA,QACxB,cAAc;AAAA,QACd,aAAa;AAAA,MACd;AAEH,oCAA8B,KAAM;AAAA,QACnC,KAAK,GAAI,UAAW,IAAK,WAAY;AAAA,QACrC,MAAM,cAAc;AAAA,QACpB,OAAO;AAAA,UACN,WAAW;AAAA,UACX,YAAY;AAAA,QACb;AAAA,MACD,CAAE;AAAA,IACH,CAAE;AAAA,EACH,CAAE;AAEF,SAAO;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACD;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/utils/transform-styles/index.ts"],
4
- "sourcesContent": ["/// <reference path=\"./postcss-urlrebase.d.ts\" />\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';\nimport type { EditorStyle, TransformOptions } from './types';\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 prefix The prefix.\n * @param selector The selector.\n *\n * @return The prefixed root selector.\n */\nfunction prefixRootSelector( prefix: string, selector: string ) {\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\tpos: [ 0, 0 ],\n\t\t} as parsel.Token,\n\t\t...tokenizedPrefix\n\t);\n\n\treturn parsel.stringify( tokenized );\n}\n\nfunction transformStyle(\n\t{ css, ignoredSelectors = [], baseURL }: EditorStyle,\n\twrapperSelector = '',\n\ttransformOptions?: TransformOptions\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 ) as import('postcss').AcceptedPlugin[]\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 * 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 styles CSS rules.\n * @param wrapperSelector Wrapper selector.\n * @param transformOptions Additional options for style transformation.\n * @return converted rules.\n */\nconst transformStyles = (\n\tstyles: EditorStyle[],\n\twrapperSelector = '',\n\ttransformOptions?: TransformOptions\n) => {\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"],
4
+ "sourcesContent": ["/// <reference path=\"./postcss-urlrebase.d.ts\" />\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';\nimport type { EditorStyle, TransformOptions } from './types';\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 prefix The prefix.\n * @param selector The selector.\n *\n * @return The prefixed root selector.\n */\nfunction prefixRootSelector( prefix: string, selector: string ) {\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\tpos: [ 0, 0 ],\n\t\t} as parsel.Token,\n\t\t...tokenizedPrefix\n\t);\n\n\treturn parsel.stringify( tokenized );\n}\n\nfunction transformStyle(\n\t{ css, ignoredSelectors = [], baseURL }: EditorStyle,\n\twrapperSelector = '',\n\ttransformOptions?: TransformOptions\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 ) as import( 'postcss' ).AcceptedPlugin[]\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 * 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 styles CSS rules.\n * @param wrapperSelector Wrapper selector.\n * @param transformOptions Additional options for style transformation.\n * @return converted rules.\n */\nconst transformStyles = (\n\tstyles: EditorStyle[],\n\twrapperSelector = '',\n\ttransformOptions?: TransformOptions\n) => {\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"],
5
5
  "mappings": ";AACA,YA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AAM,eAAgB,OAAO,iBAAiB,gBAAiB;AAC/D,YAAM,IAAK,OAAO,GAAI;AAAA,IACvB;AACA,WAAO;AAAA,EACR,CAAE;AACH;AAEA,IAAO,2BAAQ;",
6
6
  "names": []
7
7
  }
@@ -421,7 +421,8 @@ _::-webkit-full-page-media, _:future, :root [data-has-multi-selection=true] .blo
421
421
  box-sizing: border-box;
422
422
  box-shadow: inset 0 0 0 1px #1e1e1e;
423
423
  resize: none;
424
- overflow: hidden;
424
+ field-sizing: content;
425
+ overflow: auto;
425
426
  font-family: Menlo, Consolas, monaco, monospace;
426
427
  font-size: 15px;
427
428
  line-height: 1.5;
@@ -455,7 +456,7 @@ _::-webkit-full-page-media, _:future, :root [data-has-multi-selection=true] .blo
455
456
  font-size: 13px;
456
457
  font-family: -apple-system, system-ui, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
457
458
  color: #000;
458
- font-weight: normal;
459
+ font-weight: 400;
459
460
  }
460
461
  .is-zoomed-out .block-editor-block-list__zoom-out-separator {
461
462
  font-size: calc(13px / var(--wp-block-editor-iframe-zoom-out-scale));
@@ -855,7 +856,11 @@ _::-webkit-full-page-media, _:future, :root [data-has-multi-selection=true] .blo
855
856
  border: none;
856
857
  padding: 0;
857
858
  margin: 0;
859
+ }
860
+
861
+ .block-editor-plain-text {
858
862
  width: 100%;
863
+ field-sizing: content;
859
864
  }
860
865
 
861
866
  .rich-text [data-rich-text-placeholder] {
@@ -421,7 +421,8 @@ _::-webkit-full-page-media, _:future, :root [data-has-multi-selection=true] .blo
421
421
  box-sizing: border-box;
422
422
  box-shadow: inset 0 0 0 1px #1e1e1e;
423
423
  resize: none;
424
- overflow: hidden;
424
+ field-sizing: content;
425
+ overflow: auto;
425
426
  font-family: Menlo, Consolas, monaco, monospace;
426
427
  font-size: 15px;
427
428
  line-height: 1.5;
@@ -456,7 +457,7 @@ _::-webkit-full-page-media, _:future, :root [data-has-multi-selection=true] .blo
456
457
  font-size: 13px;
457
458
  font-family: -apple-system, system-ui, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
458
459
  color: #000;
459
- font-weight: normal;
460
+ font-weight: 400;
460
461
  }
461
462
  .is-zoomed-out .block-editor-block-list__zoom-out-separator {
462
463
  font-size: calc(13px / var(--wp-block-editor-iframe-zoom-out-scale));
@@ -856,7 +857,11 @@ _::-webkit-full-page-media, _:future, :root [data-has-multi-selection=true] .blo
856
857
  border: none;
857
858
  padding: 0;
858
859
  margin: 0;
860
+ }
861
+
862
+ .block-editor-plain-text {
859
863
  width: 100%;
864
+ field-sizing: content;
860
865
  }
861
866
 
862
867
  .rich-text [data-rich-text-placeholder] {
@@ -340,6 +340,19 @@ iframe[name=editor-canvas] {
340
340
  text-align: center;
341
341
  }
342
342
 
343
+ .block-editor-block-inspector__state-badges {
344
+ display: flex;
345
+ align-items: center;
346
+ flex-wrap: wrap;
347
+ gap: 8px;
348
+ padding: 8px 16px;
349
+ margin-top: -16px;
350
+ }
351
+
352
+ .block-editor-block-inspector__state-badges-text {
353
+ white-space: nowrap;
354
+ }
355
+
343
356
  .block-editor-block-inspector__no-block-tools {
344
357
  border-top: 1px solid #ddd;
345
358
  }
@@ -636,7 +649,7 @@ iframe[name=editor-canvas] {
636
649
  .block-editor-block-lock-modal__checklist-item .block-editor-block-lock-modal__lock-icon {
637
650
  flex-shrink: 0;
638
651
  margin-left: 12px;
639
- fill: #1e1e1e;
652
+ color: #1e1e1e;
640
653
  }
641
654
  .block-editor-block-lock-modal__checklist-item:hover {
642
655
  background-color: #f0f0f0;
@@ -746,6 +759,7 @@ iframe[name=editor-canvas] {
746
759
  align-items: center;
747
760
  flex-wrap: wrap;
748
761
  gap: 4px 8px;
762
+ overflow-wrap: anywhere;
749
763
  }
750
764
  .block-editor-block-card__title.block-editor-block-card__title {
751
765
  font-size: 13px;
@@ -1044,14 +1058,6 @@ iframe[name=editor-canvas] {
1044
1058
  animation-fill-mode: forwards;
1045
1059
  }
1046
1060
  }
1047
- .components-button.block-editor-block-mover-button:focus, .components-button.block-editor-block-mover-button:focus:enabled, .components-button.block-editor-block-mover-button:focus::before {
1048
- box-shadow: none;
1049
- outline: none;
1050
- }
1051
- .components-button.block-editor-block-mover-button:focus-visible::before {
1052
- box-shadow: inset 0 0 0 1px #fff, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
1053
- outline: 2px solid transparent;
1054
- }
1055
1061
 
1056
1062
  .block-editor-block-navigation__container {
1057
1063
  min-width: 280px;
@@ -1126,7 +1132,7 @@ iframe[name=editor-canvas] {
1126
1132
  height: 24px;
1127
1133
  }
1128
1134
  .block-editor-block-patterns-list__item .block-editor-patterns__pattern-icon-wrapper .block-editor-patterns__pattern-icon {
1129
- fill: var(--wp-block-synced-color);
1135
+ color: var(--wp-block-synced-color);
1130
1136
  }
1131
1137
 
1132
1138
  .block-editor-patterns__grid-pagination-wrapper .block-editor-patterns__grid-pagination {
@@ -1853,6 +1859,70 @@ iframe[name=editor-canvas] {
1853
1859
  }
1854
1860
  }
1855
1861
 
1862
+ .block-editor-global-styles__text-shadow {
1863
+ width: 260px;
1864
+ padding: 8px;
1865
+ }
1866
+
1867
+ .block-editor-global-styles__text-shadow-preview {
1868
+ display: flex;
1869
+ align-items: center;
1870
+ justify-content: center;
1871
+ height: 80px;
1872
+ border: #ddd 1px solid;
1873
+ border-radius: 2px;
1874
+ font-size: 24px;
1875
+ margin-bottom: 16px;
1876
+ background-image: repeating-linear-gradient(45deg, #e0e0e0 25%, transparent 25%, transparent 75%, #e0e0e0 75%, #e0e0e0), repeating-linear-gradient(45deg, #e0e0e0 25%, transparent 25%, transparent 75%, #e0e0e0 75%, #e0e0e0);
1877
+ background-position: 0 0, 8px 8px;
1878
+ background-size: 16px 16px;
1879
+ }
1880
+
1881
+ .block-editor-global-styles__text-shadow-list-item {
1882
+ justify-content: space-between;
1883
+ gap: 8px;
1884
+ width: 100%;
1885
+ }
1886
+ .block-editor-global-styles__text-shadow-list-item:not(.is-active) svg {
1887
+ opacity: 0;
1888
+ }
1889
+
1890
+ .block-editor-global-styles__text-shadow-dropdown {
1891
+ display: block;
1892
+ padding: 0;
1893
+ position: relative;
1894
+ border: 1px solid #ddd;
1895
+ border-radius: 2px;
1896
+ }
1897
+
1898
+ .block-editor-global-styles__text-shadow-dropdown-toggle {
1899
+ width: 100%;
1900
+ padding: 8px;
1901
+ }
1902
+ .block-editor-global-styles__text-shadow-dropdown-toggle.is-open {
1903
+ background-color: #f0f0f0;
1904
+ }
1905
+
1906
+ .block-editor-global-styles__text-shadow-remove-button {
1907
+ position: absolute;
1908
+ left: 8px;
1909
+ top: 8px;
1910
+ opacity: 0;
1911
+ }
1912
+ @media not (prefers-reduced-motion) {
1913
+ .block-editor-global-styles__text-shadow-remove-button {
1914
+ transition: opacity 0.1s ease-in-out;
1915
+ }
1916
+ }
1917
+ .block-editor-global-styles__text-shadow-dropdown:hover .block-editor-global-styles__text-shadow-remove-button, .block-editor-global-styles__text-shadow-remove-button:focus, .block-editor-global-styles__text-shadow-remove-button:hover {
1918
+ opacity: 1;
1919
+ }
1920
+ @media (hover: none) {
1921
+ .block-editor-global-styles__text-shadow-remove-button {
1922
+ opacity: 1;
1923
+ }
1924
+ }
1925
+
1856
1926
  .is-inherited-from-global-styles .components-base-control__label,
1857
1927
  .is-inherited-from-global-styles .components-input-control__label {
1858
1928
  text-decoration-line: underline;
@@ -2239,7 +2309,8 @@ iframe[name=editor-canvas] {
2239
2309
  justify-content: center;
2240
2310
  cursor: var(--wpds-cursor-control, pointer);
2241
2311
  background: transparent;
2242
- word-break: break-word;
2312
+ word-break: normal;
2313
+ overflow-wrap: break-word;
2243
2314
  }
2244
2315
  @media not (prefers-reduced-motion) {
2245
2316
  .components-button.block-editor-block-types-list__item {
@@ -2512,7 +2583,7 @@ iframe[name=editor-canvas] {
2512
2583
  background-color: transparent;
2513
2584
  }
2514
2585
  .block-editor-link-control__preview .block-editor-link-control__preview-title span {
2515
- font-weight: normal;
2586
+ font-weight: 400;
2516
2587
  }
2517
2588
  .block-editor-link-control__preview .block-editor-link-control__preview-title .components-external-link__icon {
2518
2589
  position: absolute;
@@ -3021,12 +3092,6 @@ iframe[name=editor-canvas] {
3021
3092
  .block-editor-list-view-leaf .block-editor-block-mover-button.is-down-button svg {
3022
3093
  top: -4px;
3023
3094
  }
3024
- .block-editor-list-view-leaf .block-editor-block-mover-button::before {
3025
- height: 16px;
3026
- min-width: 100%;
3027
- right: 0;
3028
- left: 0;
3029
- }
3030
3095
  .block-editor-list-view-leaf .block-editor-inserter__toggle {
3031
3096
  background: #1e1e1e;
3032
3097
  color: #fff;
@@ -3333,6 +3398,11 @@ iframe[name=editor-canvas] {
3333
3398
  height: 24px;
3334
3399
  }
3335
3400
 
3401
+ .block-editor-plain-text {
3402
+ width: 100%;
3403
+ field-sizing: content;
3404
+ }
3405
+
3336
3406
  .block-editor-responsive-block-control {
3337
3407
  margin-bottom: 28px;
3338
3408
  border-bottom: 1px solid #ccc;
@@ -3372,7 +3442,7 @@ iframe[name=editor-canvas] {
3372
3442
  padding: 0;
3373
3443
  position: absolute;
3374
3444
  width: 1px;
3375
- word-wrap: normal !important;
3445
+ overflow-wrap: normal !important;
3376
3446
  word-break: normal !important;
3377
3447
  }
3378
3448
 
@@ -3692,11 +3762,6 @@ iframe[name=editor-canvas] {
3692
3762
  margin-bottom: 16px;
3693
3763
  }
3694
3764
 
3695
- .block-editor-hooks__position-control-item-hint {
3696
- color: var(--wpds-color-foreground-content-neutral-weak, #707070);
3697
- margin-block-start: 4px;
3698
- }
3699
-
3700
3765
  div.block-editor-bindings__panel {
3701
3766
  grid-template-columns: repeat(auto-fit, minmax(100%, 1fr));
3702
3767
  }
@@ -4742,7 +4807,7 @@ div.block-editor-bindings__panel button:hover .block-editor-bindings__item span
4742
4807
  font-weight: var(--wpds-typography-font-weight-emphasis, 600);
4743
4808
  }
4744
4809
  .block-editor-block-visibility-modal__options-icon--checked {
4745
- fill: #ddd;
4810
+ color: #ddd;
4746
4811
  }
4747
4812
  .block-editor-block-visibility-modal__sub-options {
4748
4813
  width: 100%;
@@ -340,6 +340,19 @@ iframe[name=editor-canvas] {
340
340
  text-align: center;
341
341
  }
342
342
 
343
+ .block-editor-block-inspector__state-badges {
344
+ display: flex;
345
+ align-items: center;
346
+ flex-wrap: wrap;
347
+ gap: 8px;
348
+ padding: 8px 16px;
349
+ margin-top: -16px;
350
+ }
351
+
352
+ .block-editor-block-inspector__state-badges-text {
353
+ white-space: nowrap;
354
+ }
355
+
343
356
  .block-editor-block-inspector__no-block-tools {
344
357
  border-top: 1px solid #ddd;
345
358
  }
@@ -636,7 +649,7 @@ iframe[name=editor-canvas] {
636
649
  .block-editor-block-lock-modal__checklist-item .block-editor-block-lock-modal__lock-icon {
637
650
  flex-shrink: 0;
638
651
  margin-right: 12px;
639
- fill: #1e1e1e;
652
+ color: #1e1e1e;
640
653
  }
641
654
  .block-editor-block-lock-modal__checklist-item:hover {
642
655
  background-color: #f0f0f0;
@@ -746,6 +759,7 @@ iframe[name=editor-canvas] {
746
759
  align-items: center;
747
760
  flex-wrap: wrap;
748
761
  gap: 4px 8px;
762
+ overflow-wrap: anywhere;
749
763
  }
750
764
  .block-editor-block-card__title.block-editor-block-card__title {
751
765
  font-size: 13px;
@@ -1044,14 +1058,6 @@ iframe[name=editor-canvas] {
1044
1058
  animation-fill-mode: forwards;
1045
1059
  }
1046
1060
  }
1047
- .components-button.block-editor-block-mover-button:focus, .components-button.block-editor-block-mover-button:focus:enabled, .components-button.block-editor-block-mover-button:focus::before {
1048
- box-shadow: none;
1049
- outline: none;
1050
- }
1051
- .components-button.block-editor-block-mover-button:focus-visible::before {
1052
- box-shadow: inset 0 0 0 1px #fff, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
1053
- outline: 2px solid transparent;
1054
- }
1055
1061
 
1056
1062
  .block-editor-block-navigation__container {
1057
1063
  min-width: 280px;
@@ -1126,7 +1132,7 @@ iframe[name=editor-canvas] {
1126
1132
  height: 24px;
1127
1133
  }
1128
1134
  .block-editor-block-patterns-list__item .block-editor-patterns__pattern-icon-wrapper .block-editor-patterns__pattern-icon {
1129
- fill: var(--wp-block-synced-color);
1135
+ color: var(--wp-block-synced-color);
1130
1136
  }
1131
1137
 
1132
1138
  .block-editor-patterns__grid-pagination-wrapper .block-editor-patterns__grid-pagination {
@@ -1854,6 +1860,72 @@ iframe[name=editor-canvas] {
1854
1860
  }
1855
1861
  }
1856
1862
 
1863
+ .block-editor-global-styles__text-shadow {
1864
+ width: 260px;
1865
+ padding: 8px;
1866
+ }
1867
+
1868
+ .block-editor-global-styles__text-shadow-preview {
1869
+ display: flex;
1870
+ align-items: center;
1871
+ justify-content: center;
1872
+ height: 80px;
1873
+ border: #ddd 1px solid;
1874
+ border-radius: 2px;
1875
+ font-size: 24px;
1876
+ margin-bottom: 16px;
1877
+ /*rtl:begin:ignore*/
1878
+ background-image: repeating-linear-gradient(45deg, #e0e0e0 25%, transparent 25%, transparent 75%, #e0e0e0 75%, #e0e0e0), repeating-linear-gradient(45deg, #e0e0e0 25%, transparent 25%, transparent 75%, #e0e0e0 75%, #e0e0e0);
1879
+ background-position: 0 0, 8px 8px;
1880
+ /*rtl:end:ignore*/
1881
+ background-size: 16px 16px;
1882
+ }
1883
+
1884
+ .block-editor-global-styles__text-shadow-list-item {
1885
+ justify-content: space-between;
1886
+ gap: 8px;
1887
+ width: 100%;
1888
+ }
1889
+ .block-editor-global-styles__text-shadow-list-item:not(.is-active) svg {
1890
+ opacity: 0;
1891
+ }
1892
+
1893
+ .block-editor-global-styles__text-shadow-dropdown {
1894
+ display: block;
1895
+ padding: 0;
1896
+ position: relative;
1897
+ border: 1px solid #ddd;
1898
+ border-radius: 2px;
1899
+ }
1900
+
1901
+ .block-editor-global-styles__text-shadow-dropdown-toggle {
1902
+ width: 100%;
1903
+ padding: 8px;
1904
+ }
1905
+ .block-editor-global-styles__text-shadow-dropdown-toggle.is-open {
1906
+ background-color: #f0f0f0;
1907
+ }
1908
+
1909
+ .block-editor-global-styles__text-shadow-remove-button {
1910
+ position: absolute;
1911
+ right: 8px;
1912
+ top: 8px;
1913
+ opacity: 0;
1914
+ }
1915
+ @media not (prefers-reduced-motion) {
1916
+ .block-editor-global-styles__text-shadow-remove-button {
1917
+ transition: opacity 0.1s ease-in-out;
1918
+ }
1919
+ }
1920
+ .block-editor-global-styles__text-shadow-dropdown:hover .block-editor-global-styles__text-shadow-remove-button, .block-editor-global-styles__text-shadow-remove-button:focus, .block-editor-global-styles__text-shadow-remove-button:hover {
1921
+ opacity: 1;
1922
+ }
1923
+ @media (hover: none) {
1924
+ .block-editor-global-styles__text-shadow-remove-button {
1925
+ opacity: 1;
1926
+ }
1927
+ }
1928
+
1857
1929
  .is-inherited-from-global-styles .components-base-control__label,
1858
1930
  .is-inherited-from-global-styles .components-input-control__label {
1859
1931
  text-decoration-line: underline;
@@ -2240,7 +2312,8 @@ iframe[name=editor-canvas] {
2240
2312
  justify-content: center;
2241
2313
  cursor: var(--wpds-cursor-control, pointer);
2242
2314
  background: transparent;
2243
- word-break: break-word;
2315
+ word-break: normal;
2316
+ overflow-wrap: break-word;
2244
2317
  }
2245
2318
  @media not (prefers-reduced-motion) {
2246
2319
  .components-button.block-editor-block-types-list__item {
@@ -2513,7 +2586,7 @@ iframe[name=editor-canvas] {
2513
2586
  background-color: transparent;
2514
2587
  }
2515
2588
  .block-editor-link-control__preview .block-editor-link-control__preview-title span {
2516
- font-weight: normal;
2589
+ font-weight: 400;
2517
2590
  }
2518
2591
  .block-editor-link-control__preview .block-editor-link-control__preview-title .components-external-link__icon {
2519
2592
  position: absolute;
@@ -3022,12 +3095,6 @@ iframe[name=editor-canvas] {
3022
3095
  .block-editor-list-view-leaf .block-editor-block-mover-button.is-down-button svg {
3023
3096
  top: -4px;
3024
3097
  }
3025
- .block-editor-list-view-leaf .block-editor-block-mover-button::before {
3026
- height: 16px;
3027
- min-width: 100%;
3028
- left: 0;
3029
- right: 0;
3030
- }
3031
3098
  .block-editor-list-view-leaf .block-editor-inserter__toggle {
3032
3099
  background: #1e1e1e;
3033
3100
  color: #fff;
@@ -3335,6 +3402,11 @@ iframe[name=editor-canvas] {
3335
3402
  height: 24px;
3336
3403
  }
3337
3404
 
3405
+ .block-editor-plain-text {
3406
+ width: 100%;
3407
+ field-sizing: content;
3408
+ }
3409
+
3338
3410
  .block-editor-responsive-block-control {
3339
3411
  margin-bottom: 28px;
3340
3412
  border-bottom: 1px solid #ccc;
@@ -3374,7 +3446,7 @@ iframe[name=editor-canvas] {
3374
3446
  padding: 0;
3375
3447
  position: absolute;
3376
3448
  width: 1px;
3377
- word-wrap: normal !important;
3449
+ overflow-wrap: normal !important;
3378
3450
  word-break: normal !important;
3379
3451
  }
3380
3452
 
@@ -3694,11 +3766,6 @@ iframe[name=editor-canvas] {
3694
3766
  margin-bottom: 16px;
3695
3767
  }
3696
3768
 
3697
- .block-editor-hooks__position-control-item-hint {
3698
- color: var(--wpds-color-foreground-content-neutral-weak, #707070);
3699
- margin-block-start: 4px;
3700
- }
3701
-
3702
3769
  div.block-editor-bindings__panel {
3703
3770
  grid-template-columns: repeat(auto-fit, minmax(100%, 1fr));
3704
3771
  }
@@ -4744,7 +4811,7 @@ div.block-editor-bindings__panel button:hover .block-editor-bindings__item span
4744
4811
  font-weight: var(--wpds-typography-font-weight-emphasis, 600);
4745
4812
  }
4746
4813
  .block-editor-block-visibility-modal__options-icon--checked {
4747
- fill: #ddd;
4814
+ color: #ddd;
4748
4815
  }
4749
4816
  .block-editor-block-visibility-modal__sub-options {
4750
4817
  width: 100%;