@wordpress/block-editor 12.16.1-next.79a6196f.0 → 12.18.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 (376) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +32 -0
  3. package/build/components/block-draggable/index.js +11 -3
  4. package/build/components/block-draggable/index.js.map +1 -1
  5. package/build/components/block-edit/context.js +3 -1
  6. package/build/components/block-edit/context.js.map +1 -1
  7. package/build/components/block-edit/index.js +4 -2
  8. package/build/components/block-edit/index.js.map +1 -1
  9. package/build/components/block-editing-mode/index.js +6 -3
  10. package/build/components/block-editing-mode/index.js.map +1 -1
  11. package/build/components/block-inspector/index.js +5 -2
  12. package/build/components/block-inspector/index.js.map +1 -1
  13. package/build/components/block-list/block.js +4 -3
  14. package/build/components/block-list/block.js.map +1 -1
  15. package/build/components/block-list/block.native.js +9 -5
  16. package/build/components/block-list/block.native.js.map +1 -1
  17. package/build/components/block-list/index.js +30 -4
  18. package/build/components/block-list/index.js.map +1 -1
  19. package/build/components/block-list/private-block-context.js +1 -1
  20. package/build/components/block-list/private-block-context.js.map +1 -1
  21. package/build/components/block-list/use-in-between-inserter.js +1 -1
  22. package/build/components/block-list/use-in-between-inserter.js.map +1 -1
  23. package/build/components/block-popover/inbetween.js +15 -3
  24. package/build/components/block-popover/inbetween.js.map +1 -1
  25. package/build/components/block-preview/auto.js +1 -1
  26. package/build/components/block-preview/auto.js.map +1 -1
  27. package/build/components/block-removal-warning-modal/index.js +3 -2
  28. package/build/components/block-removal-warning-modal/index.js.map +1 -1
  29. package/build/components/block-settings-menu/block-settings-dropdown.js +2 -4
  30. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  31. package/build/components/block-switcher/block-transformations-menu.js +12 -1
  32. package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
  33. package/build/components/block-switcher/index.js +119 -90
  34. package/build/components/block-switcher/index.js.map +1 -1
  35. package/build/components/block-tools/insertion-point.js +10 -3
  36. package/build/components/block-tools/insertion-point.js.map +1 -1
  37. package/build/components/font-sizes/fluid-utils.js +7 -1
  38. package/build/components/font-sizes/fluid-utils.js.map +1 -1
  39. package/build/components/global-styles/border-panel.js +5 -14
  40. package/build/components/global-styles/border-panel.js.map +1 -1
  41. package/build/components/global-styles/effects-panel.js +7 -1
  42. package/build/components/global-styles/effects-panel.js.map +1 -1
  43. package/build/components/iframe/get-compatibility-styles.js +99 -0
  44. package/build/components/iframe/get-compatibility-styles.js.map +1 -0
  45. package/build/components/iframe/index.js +2 -3
  46. package/build/components/iframe/index.js.map +1 -1
  47. package/build/components/index.js +16 -2
  48. package/build/components/index.js.map +1 -1
  49. package/build/components/index.native.js +16 -2
  50. package/build/components/index.native.js.map +1 -1
  51. package/build/components/inspector-controls/groups.js +2 -0
  52. package/build/components/inspector-controls/groups.js.map +1 -1
  53. package/build/components/inspector-controls-tabs/styles-tab.js +3 -0
  54. package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  55. package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js +3 -2
  56. package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
  57. package/build/components/link-control/link-preview.js +30 -26
  58. package/build/components/link-control/link-preview.js.map +1 -1
  59. package/build/components/link-control/search-input.js +1 -9
  60. package/build/components/link-control/search-input.js.map +1 -1
  61. package/build/components/list-view/block-contents.js +3 -1
  62. package/build/components/list-view/block-contents.js.map +1 -1
  63. package/build/components/list-view/block.js +10 -1
  64. package/build/components/list-view/block.js.map +1 -1
  65. package/build/components/list-view/branch.js +29 -8
  66. package/build/components/list-view/branch.js.map +1 -1
  67. package/build/components/list-view/drop-indicator.js +100 -32
  68. package/build/components/list-view/drop-indicator.js.map +1 -1
  69. package/build/components/list-view/index.js +52 -4
  70. package/build/components/list-view/index.js.map +1 -1
  71. package/build/components/list-view/leaf.js +2 -2
  72. package/build/components/list-view/leaf.js.map +1 -1
  73. package/build/components/list-view/use-list-view-block-indexes.js +30 -0
  74. package/build/components/list-view/use-list-view-block-indexes.js.map +1 -0
  75. package/build/components/list-view/use-list-view-drop-zone.js +56 -5
  76. package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
  77. package/build/components/list-view/utils.js +92 -0
  78. package/build/components/list-view/utils.js.map +1 -1
  79. package/build/components/provider/index.js +1 -1
  80. package/build/components/provider/index.js.map +1 -1
  81. package/build/components/recursion-provider/index.js +21 -0
  82. package/build/components/recursion-provider/index.js.map +1 -1
  83. package/build/components/rich-text/index.js +30 -6
  84. package/build/components/rich-text/index.js.map +1 -1
  85. package/build/components/rich-text/native/index.native.js +9 -9
  86. package/build/components/rich-text/native/index.native.js.map +1 -1
  87. package/build/components/use-block-drop-zone/index.js +30 -7
  88. package/build/components/use-block-drop-zone/index.js.map +1 -1
  89. package/build/components/use-on-block-drop/index.js +50 -8
  90. package/build/components/use-on-block-drop/index.js.map +1 -1
  91. package/build/hooks/block-hooks.js +5 -14
  92. package/build/hooks/block-hooks.js.map +1 -1
  93. package/build/hooks/content-lock-ui.js +17 -42
  94. package/build/hooks/content-lock-ui.js.map +1 -1
  95. package/build/hooks/effects.js +66 -0
  96. package/build/hooks/effects.js.map +1 -0
  97. package/build/hooks/index.js +14 -0
  98. package/build/hooks/index.js.map +1 -1
  99. package/build/hooks/index.native.js +13 -0
  100. package/build/hooks/index.native.js.map +1 -1
  101. package/build/hooks/style.js +6 -2
  102. package/build/hooks/style.js.map +1 -1
  103. package/build/hooks/supports.js +2 -1
  104. package/build/hooks/supports.js.map +1 -1
  105. package/build/hooks/typography.native.js +2 -2
  106. package/build/hooks/typography.native.js.map +1 -1
  107. package/build/hooks/use-bindings-attributes.js +115 -0
  108. package/build/hooks/use-bindings-attributes.js.map +1 -0
  109. package/build/hooks/use-shadow-props.js +46 -0
  110. package/build/hooks/use-shadow-props.js.map +1 -0
  111. package/build/hooks/utils.js +7 -6
  112. package/build/hooks/utils.js.map +1 -1
  113. package/build/index.js +14 -0
  114. package/build/index.js.map +1 -1
  115. package/build/store/actions.js +10 -6
  116. package/build/store/actions.js.map +1 -1
  117. package/build/store/index.js +2 -0
  118. package/build/store/index.js.map +1 -1
  119. package/build/store/private-actions.js +37 -0
  120. package/build/store/private-actions.js.map +1 -1
  121. package/build/store/private-selectors.js +60 -9
  122. package/build/store/private-selectors.js.map +1 -1
  123. package/build/store/reducer.js +44 -3
  124. package/build/store/reducer.js.map +1 -1
  125. package/build/store/resolvers.js +27 -0
  126. package/build/store/resolvers.js.map +1 -0
  127. package/build/store/selectors.js +94 -56
  128. package/build/store/selectors.js.map +1 -1
  129. package/build/store/utils.js +5 -26
  130. package/build/store/utils.js.map +1 -1
  131. package/build/utils/index.js +0 -16
  132. package/build/utils/index.js.map +1 -1
  133. package/build/utils/math.js +13 -0
  134. package/build/utils/math.js.map +1 -1
  135. package/build/utils/transform-styles/index.js +37 -27
  136. package/build/utils/transform-styles/index.js.map +1 -1
  137. package/build-module/components/block-draggable/index.js +11 -3
  138. package/build-module/components/block-draggable/index.js.map +1 -1
  139. package/build-module/components/block-edit/context.js +1 -0
  140. package/build-module/components/block-edit/context.js.map +1 -1
  141. package/build-module/components/block-edit/index.js +5 -3
  142. package/build-module/components/block-edit/index.js.map +1 -1
  143. package/build-module/components/block-editing-mode/index.js +7 -4
  144. package/build-module/components/block-editing-mode/index.js.map +1 -1
  145. package/build-module/components/block-inspector/index.js +5 -2
  146. package/build-module/components/block-inspector/index.js.map +1 -1
  147. package/build-module/components/block-list/block.js +6 -5
  148. package/build-module/components/block-list/block.js.map +1 -1
  149. package/build-module/components/block-list/block.native.js +11 -7
  150. package/build-module/components/block-list/block.native.js.map +1 -1
  151. package/build-module/components/block-list/index.js +31 -5
  152. package/build-module/components/block-list/index.js.map +1 -1
  153. package/build-module/components/block-list/private-block-context.js +1 -1
  154. package/build-module/components/block-list/private-block-context.js.map +1 -1
  155. package/build-module/components/block-list/use-in-between-inserter.js +1 -1
  156. package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
  157. package/build-module/components/block-popover/inbetween.js +15 -3
  158. package/build-module/components/block-popover/inbetween.js.map +1 -1
  159. package/build-module/components/block-preview/auto.js +3 -3
  160. package/build-module/components/block-preview/auto.js.map +1 -1
  161. package/build-module/components/block-removal-warning-modal/index.js +3 -2
  162. package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
  163. package/build-module/components/block-settings-menu/block-settings-dropdown.js +2 -4
  164. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  165. package/build-module/components/block-switcher/block-transformations-menu.js +12 -1
  166. package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
  167. package/build-module/components/block-switcher/index.js +116 -86
  168. package/build-module/components/block-switcher/index.js.map +1 -1
  169. package/build-module/components/block-tools/insertion-point.js +10 -3
  170. package/build-module/components/block-tools/insertion-point.js.map +1 -1
  171. package/build-module/components/font-sizes/fluid-utils.js +7 -1
  172. package/build-module/components/font-sizes/fluid-utils.js.map +1 -1
  173. package/build-module/components/global-styles/border-panel.js +5 -14
  174. package/build-module/components/global-styles/border-panel.js.map +1 -1
  175. package/build-module/components/global-styles/effects-panel.js +7 -1
  176. package/build-module/components/global-styles/effects-panel.js.map +1 -1
  177. package/build-module/components/iframe/get-compatibility-styles.js +93 -0
  178. package/build-module/components/iframe/get-compatibility-styles.js.map +1 -0
  179. package/build-module/components/iframe/index.js +2 -3
  180. package/build-module/components/iframe/index.js.map +1 -1
  181. package/build-module/components/index.js +1 -1
  182. package/build-module/components/index.js.map +1 -1
  183. package/build-module/components/index.native.js +1 -1
  184. package/build-module/components/index.native.js.map +1 -1
  185. package/build-module/components/inspector-controls/groups.js +2 -0
  186. package/build-module/components/inspector-controls/groups.js.map +1 -1
  187. package/build-module/components/inspector-controls-tabs/styles-tab.js +3 -0
  188. package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  189. package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js +3 -2
  190. package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
  191. package/build-module/components/link-control/link-preview.js +32 -28
  192. package/build-module/components/link-control/link-preview.js.map +1 -1
  193. package/build-module/components/link-control/search-input.js +1 -8
  194. package/build-module/components/link-control/search-input.js.map +1 -1
  195. package/build-module/components/list-view/block-contents.js +3 -1
  196. package/build-module/components/list-view/block-contents.js.map +1 -1
  197. package/build-module/components/list-view/block.js +10 -1
  198. package/build-module/components/list-view/block.js.map +1 -1
  199. package/build-module/components/list-view/branch.js +30 -9
  200. package/build-module/components/list-view/branch.js.map +1 -1
  201. package/build-module/components/list-view/drop-indicator.js +99 -32
  202. package/build-module/components/list-view/drop-indicator.js.map +1 -1
  203. package/build-module/components/list-view/index.js +54 -6
  204. package/build-module/components/list-view/index.js.map +1 -1
  205. package/build-module/components/list-view/leaf.js +2 -2
  206. package/build-module/components/list-view/leaf.js.map +1 -1
  207. package/build-module/components/list-view/use-list-view-block-indexes.js +23 -0
  208. package/build-module/components/list-view/use-list-view-block-indexes.js.map +1 -0
  209. package/build-module/components/list-view/use-list-view-drop-zone.js +58 -7
  210. package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
  211. package/build-module/components/list-view/utils.js +91 -0
  212. package/build-module/components/list-view/utils.js.map +1 -1
  213. package/build-module/components/provider/index.js +1 -1
  214. package/build-module/components/provider/index.js.map +1 -1
  215. package/build-module/components/recursion-provider/index.js +17 -0
  216. package/build-module/components/recursion-provider/index.js.map +1 -1
  217. package/build-module/components/rich-text/index.js +30 -6
  218. package/build-module/components/rich-text/index.js.map +1 -1
  219. package/build-module/components/rich-text/native/index.native.js +9 -9
  220. package/build-module/components/rich-text/native/index.native.js.map +1 -1
  221. package/build-module/components/use-block-drop-zone/index.js +31 -8
  222. package/build-module/components/use-block-drop-zone/index.js.map +1 -1
  223. package/build-module/components/use-on-block-drop/index.js +51 -9
  224. package/build-module/components/use-on-block-drop/index.js.map +1 -1
  225. package/build-module/hooks/block-hooks.js +5 -14
  226. package/build-module/hooks/block-hooks.js.map +1 -1
  227. package/build-module/hooks/content-lock-ui.js +19 -43
  228. package/build-module/hooks/content-lock-ui.js.map +1 -1
  229. package/build-module/hooks/effects.js +51 -0
  230. package/build-module/hooks/effects.js.map +1 -0
  231. package/build-module/hooks/index.js +2 -0
  232. package/build-module/hooks/index.js.map +1 -1
  233. package/build-module/hooks/index.native.js +1 -0
  234. package/build-module/hooks/index.native.js.map +1 -1
  235. package/build-module/hooks/style.js +6 -2
  236. package/build-module/hooks/style.js.map +1 -1
  237. package/build-module/hooks/supports.js +2 -1
  238. package/build-module/hooks/supports.js.map +1 -1
  239. package/build-module/hooks/typography.native.js +2 -2
  240. package/build-module/hooks/typography.native.js.map +1 -1
  241. package/build-module/hooks/use-bindings-attributes.js +112 -0
  242. package/build-module/hooks/use-bindings-attributes.js.map +1 -0
  243. package/build-module/hooks/use-shadow-props.js +39 -0
  244. package/build-module/hooks/use-shadow-props.js.map +1 -0
  245. package/build-module/hooks/utils.js +9 -8
  246. package/build-module/hooks/utils.js.map +1 -1
  247. package/build-module/index.js +1 -1
  248. package/build-module/index.js.map +1 -1
  249. package/build-module/store/actions.js +10 -6
  250. package/build-module/store/actions.js.map +1 -1
  251. package/build-module/store/index.js +2 -0
  252. package/build-module/store/index.js.map +1 -1
  253. package/build-module/store/private-actions.js +35 -0
  254. package/build-module/store/private-actions.js.map +1 -1
  255. package/build-module/store/private-selectors.js +53 -8
  256. package/build-module/store/private-selectors.js.map +1 -1
  257. package/build-module/store/reducer.js +43 -3
  258. package/build-module/store/reducer.js.map +1 -1
  259. package/build-module/store/resolvers.js +20 -0
  260. package/build-module/store/resolvers.js.map +1 -0
  261. package/build-module/store/selectors.js +89 -52
  262. package/build-module/store/selectors.js.map +1 -1
  263. package/build-module/store/utils.js +3 -23
  264. package/build-module/store/utils.js.map +1 -1
  265. package/build-module/utils/index.js +0 -1
  266. package/build-module/utils/index.js.map +1 -1
  267. package/build-module/utils/math.js +12 -0
  268. package/build-module/utils/math.js.map +1 -1
  269. package/build-module/utils/transform-styles/index.js +36 -27
  270. package/build-module/utils/transform-styles/index.js.map +1 -1
  271. package/build-style/content-rtl.css +33 -16
  272. package/build-style/content.css +33 -16
  273. package/build-style/default-editor-styles-rtl.css +1 -1
  274. package/build-style/default-editor-styles.css +1 -1
  275. package/build-style/style-rtl.css +169 -114
  276. package/build-style/style.css +169 -114
  277. package/package.json +31 -31
  278. package/src/components/block-canvas/style.scss +8 -1
  279. package/src/components/block-draggable/index.js +16 -5
  280. package/src/components/block-edit/context.js +1 -0
  281. package/src/components/block-edit/index.js +4 -0
  282. package/src/components/block-editing-mode/index.js +12 -7
  283. package/src/components/block-inspector/index.js +5 -2
  284. package/src/components/block-list/block.js +5 -4
  285. package/src/components/block-list/block.native.js +13 -3
  286. package/src/components/block-list/content.scss +34 -5
  287. package/src/components/block-list/index.js +52 -16
  288. package/src/components/block-list/private-block-context.js +1 -1
  289. package/src/components/block-list/use-in-between-inserter.js +1 -2
  290. package/src/components/block-popover/inbetween.js +22 -2
  291. package/src/components/block-preview/auto.js +3 -3
  292. package/src/components/block-removal-warning-modal/index.js +3 -2
  293. package/src/components/block-settings-menu/block-settings-dropdown.js +2 -7
  294. package/src/components/block-switcher/block-transformations-menu.js +18 -1
  295. package/src/components/block-switcher/index.js +133 -111
  296. package/src/components/block-switcher/style.scss +6 -4
  297. package/src/components/block-switcher/test/index.js +113 -230
  298. package/src/components/block-toolbar/style.scss +22 -18
  299. package/src/components/block-tools/insertion-point.js +15 -2
  300. package/src/components/block-tools/style.scss +8 -7
  301. package/src/components/font-sizes/fluid-utils.js +8 -2
  302. package/src/components/font-sizes/test/fluid-utils.js +9 -0
  303. package/src/components/global-styles/border-panel.js +7 -17
  304. package/src/components/global-styles/effects-panel.js +16 -1
  305. package/src/components/iframe/get-compatibility-styles.js +120 -0
  306. package/src/components/iframe/index.js +2 -3
  307. package/src/components/index.js +4 -2
  308. package/src/components/index.native.js +4 -2
  309. package/src/components/inspector-controls/groups.js +2 -0
  310. package/src/components/inspector-controls-tabs/styles-tab.js +1 -0
  311. package/src/components/inspector-controls-tabs/use-inspector-controls-tabs.js +2 -0
  312. package/src/components/link-control/link-preview.js +31 -55
  313. package/src/components/link-control/search-input.js +1 -9
  314. package/src/components/link-control/style.scss +31 -85
  315. package/src/components/link-control/test/index.js +2 -1
  316. package/src/components/list-view/block-contents.js +5 -1
  317. package/src/components/list-view/block.js +9 -0
  318. package/src/components/list-view/branch.js +30 -10
  319. package/src/components/list-view/drop-indicator.js +139 -46
  320. package/src/components/list-view/index.js +74 -3
  321. package/src/components/list-view/leaf.js +2 -2
  322. package/src/components/list-view/style.scss +102 -13
  323. package/src/components/list-view/test/use-list-view-drop-zone.js +4 -0
  324. package/src/components/list-view/test/utils.js +218 -1
  325. package/src/components/list-view/use-list-view-block-indexes.js +29 -0
  326. package/src/components/list-view/use-list-view-drop-zone.js +78 -6
  327. package/src/components/list-view/utils.js +116 -0
  328. package/src/components/provider/index.js +3 -1
  329. package/src/components/recursion-provider/README.md +2 -2
  330. package/src/components/recursion-provider/index.js +17 -0
  331. package/src/components/rich-text/index.js +48 -10
  332. package/src/components/rich-text/native/index.native.js +10 -10
  333. package/src/components/use-block-drop-zone/index.js +60 -19
  334. package/src/components/use-block-drop-zone/test/index.js +32 -61
  335. package/src/components/use-on-block-drop/index.js +92 -11
  336. package/src/hooks/block-hooks.js +5 -17
  337. package/src/hooks/content-lock-ui.js +15 -55
  338. package/src/hooks/effects.js +57 -0
  339. package/src/hooks/index.js +2 -0
  340. package/src/hooks/index.native.js +1 -0
  341. package/src/hooks/style.js +8 -0
  342. package/src/hooks/supports.js +2 -0
  343. package/src/hooks/test/effects.js +39 -0
  344. package/src/hooks/typography.native.js +2 -2
  345. package/src/hooks/use-bindings-attributes.js +148 -0
  346. package/src/hooks/use-shadow-props.js +37 -0
  347. package/src/hooks/utils.js +10 -6
  348. package/src/index.js +2 -0
  349. package/src/store/actions.js +9 -4
  350. package/src/store/index.js +2 -0
  351. package/src/store/private-actions.js +32 -0
  352. package/src/store/private-selectors.js +78 -21
  353. package/src/store/reducer.js +49 -2
  354. package/src/store/resolvers.js +17 -0
  355. package/src/store/selectors.js +169 -161
  356. package/src/store/test/registry-selectors.js +431 -0
  357. package/src/store/test/selectors.js +14 -400
  358. package/src/store/utils.js +10 -33
  359. package/src/style.scss +0 -1
  360. package/src/utils/index.js +0 -1
  361. package/src/utils/math.js +12 -0
  362. package/src/utils/transform-styles/index.js +52 -37
  363. package/tsconfig.tsbuildinfo +1 -1
  364. package/build/components/iframe/use-compatibility-styles.js +0 -100
  365. package/build/components/iframe/use-compatibility-styles.js.map +0 -1
  366. package/build/utils/block-variation-transforms.js +0 -42
  367. package/build/utils/block-variation-transforms.js.map +0 -1
  368. package/build-module/components/iframe/use-compatibility-styles.js +0 -94
  369. package/build-module/components/iframe/use-compatibility-styles.js.map +0 -1
  370. package/build-module/utils/block-variation-transforms.js +0 -35
  371. package/build-module/utils/block-variation-transforms.js.map +0 -1
  372. package/src/components/block-switcher/test/__snapshots__/index.js.snap +0 -116
  373. package/src/components/contrast-checker/style.scss +0 -3
  374. package/src/components/iframe/use-compatibility-styles.js +0 -122
  375. package/src/utils/block-variation-transforms.js +0 -38
  376. package/src/utils/test/block-variation-transforms.js +0 -94
@@ -1 +1 @@
1
- {"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.es2023.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/scheduler/tracing.d.ts","../../node_modules/@types/react/index.d.ts","../element/build-types/create-interpolate-element.d.ts","../element/build-types/react.d.ts","../../node_modules/@types/react-dom/index.d.ts","../../node_modules/@types/react-dom/client.d.ts","../element/build-types/react-platform.d.ts","../element/build-types/utils.d.ts","../element/build-types/platform.d.ts","../element/build-types/serialize.d.ts","../element/build-types/raw-html.d.ts","../element/build-types/index.d.ts","./src/components/block-context/index.js","./src/utils/dom.js"],"fileInfos":[{"version":"f59215c5f1d886b05395ee7aca73e0ac69ddfad2843aa88530e797879d511bad","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","f4e736d6c8d69ae5b3ab0ddfcaa3dc365c3e76909d6660af5b4e979b3934ac20","eeeb3aca31fbadef8b82502484499dfd1757204799a6f5b33116201c810676ec",{"version":"3dda5344576193a4ae48b8d03f105c86f20b2f2aff0a1d1fd7935f5d68649654","affectsGlobalScope":true},{"version":"9d9885c728913c1d16e0d2831b40341d6ad9a0ceecaabc55209b306ad9c736a5","affectsGlobalScope":true},{"version":"17bea081b9c0541f39dd1ae9bc8c78bdd561879a682e60e2f25f688c0ecab248","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true},{"version":"f06948deb2a51aae25184561c9640fb66afeddb34531a9212d011792b1d19e0a","affectsGlobalScope":true},{"version":"01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e","affectsGlobalScope":true},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"9cc66b0513ad41cb5f5372cca86ef83a0d37d1c1017580b7dace3ea5661836df","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"709efdae0cb5df5f49376cde61daacc95cdd44ae4671da13a540da5088bf3f30","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"61ed9b6d07af959e745fb11f9593ecd743b279418cc8a99448ea3cd5f3b3eb22","affectsGlobalScope":true},{"version":"038a2f66a34ee7a9c2fbc3584c8ab43dff2995f8c68e3f566f4c300d2175e31e","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"f5c92f2c27b06c1a41b88f6db8299205aee52c2a2943f7ed29bd585977f254e8","affectsGlobalScope":true},{"version":"930b0e15811f84e203d3c23508674d5ded88266df4b10abee7b31b2ac77632d2","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"b9ea5778ff8b50d7c04c9890170db34c26a5358cccba36844fe319f50a43a61a","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true},{"version":"25de46552b782d43cb7284df22fe2a265de387cf0248b747a7a1b647d81861f6","affectsGlobalScope":true},{"version":"307c8b7ebbd7f23a92b73a4c6c0a697beca05b06b036c23a34553e5fe65e4fdc","affectsGlobalScope":true},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"bbdf156fea2fabed31a569445835aeedcc33643d404fcbaa54541f06c109df3f","affectsGlobalScope":true},"4c68749a564a6facdf675416d75789ee5a557afda8960e0803cf6711fa569288","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"5917af4ff931b050dba49a1dedd9c00f15f7b3dc4345ad8491bfacd2ec68ed32","affectsGlobalScope":true},"0c1c79ce1b4c085adce94f17891812ee1a8b76fc1de63dd0d9d80ea34034f389","470509b95e55f314470599d05bd8600eaf3c7bd10d35c94eea5f1ae3139a2bae","e4dd91dd4789a109aab51d8a0569a282369fcda9ba6f2b2297bc61bacfb1a042","83e27bbd7304ea67f9afa1535f1d4fdb15866089f0d893c784cbb5b1c6fb3386","472c14cdec534a465e866b6e1feee2d4e0d89c15fdc33ba80ff034fa0e80f3c1","4d807d55c784b72f71c092c34c84d09b95c29500c30252538fd5cf9a0a788c0e","df43a3968118d4b16618d7a0ac8ba89337fcce3c39e39984087ac34bf0cf250c","7f2497d56947331a6705c6c8d099b173d6fa7b90f5110c190cbca5cae1f3a09c","582f001c48a6204fd6bb5c6c71b36adc5256078c0ac3686b99db59cbb724ca73","af88a0b0f808a6721401550621bfe67c46c6fd55000305058e7c73600d119a9b",{"version":"0a41b61ddcb640fa2a07cb7a04ecddf540b8199f70d3cf5f2d8903be722529eb","signature":"4b7a879cde76a92dc90518ea30784dc4737a9088b19ce8b3e6e52ca88d79fdd9"},{"version":"4e8c59b6c243b9148b72d7428c71592176a520225ee91b718f4a655a5baf6624","signature":"5120315643470468a3955abbc6f5669c5314f62f237825a2930ede632739ff58"}],"root":[76,77],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"rootDir":"./src","strict":true,"target":99},"fileIdsList":[[65],[61,62,63,64],[65,75],[66,67,70,71,72,73,74],[68,69]],"referencedMap":[[69,1],[68,1],[65,2],[76,3],[66,1],[75,4],[74,1],[70,5],[67,1],[73,1]],"exportedModulesMap":[[69,1],[68,1],[65,2],[76,1],[66,1],[75,4],[74,1],[70,5],[67,1],[73,1]],"semanticDiagnosticsPerFile":[63,69,68,61,65,64,62,59,60,12,14,13,2,15,16,17,18,19,20,21,22,3,4,26,23,24,25,27,28,29,5,30,31,32,33,6,37,34,35,36,38,7,39,44,45,40,41,42,43,8,49,46,47,48,50,9,51,52,53,56,54,55,57,10,1,11,58,76,77,66,75,72,74,70,67,73,71],"latestChangedDtsFile":"./build-types/utils/dom.d.ts"},"version":"5.1.6"}
1
+ {"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.es2023.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/scheduler/tracing.d.ts","../../node_modules/@types/react/index.d.ts","../element/build-types/create-interpolate-element.d.ts","../element/build-types/react.d.ts","../../node_modules/@types/react-dom/index.d.ts","../../node_modules/@types/react-dom/client.d.ts","../element/build-types/react-platform.d.ts","../element/build-types/utils.d.ts","../element/build-types/platform.d.ts","../element/build-types/serialize.d.ts","../element/build-types/raw-html.d.ts","../element/build-types/index.d.ts","./src/components/block-context/index.js","./src/utils/dom.js"],"fileInfos":[{"version":"f59215c5f1d886b05395ee7aca73e0ac69ddfad2843aa88530e797879d511bad","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","f4e736d6c8d69ae5b3ab0ddfcaa3dc365c3e76909d6660af5b4e979b3934ac20","eeeb3aca31fbadef8b82502484499dfd1757204799a6f5b33116201c810676ec",{"version":"3dda5344576193a4ae48b8d03f105c86f20b2f2aff0a1d1fd7935f5d68649654","affectsGlobalScope":true},{"version":"9d9885c728913c1d16e0d2831b40341d6ad9a0ceecaabc55209b306ad9c736a5","affectsGlobalScope":true},{"version":"17bea081b9c0541f39dd1ae9bc8c78bdd561879a682e60e2f25f688c0ecab248","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true},{"version":"f06948deb2a51aae25184561c9640fb66afeddb34531a9212d011792b1d19e0a","affectsGlobalScope":true},{"version":"01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e","affectsGlobalScope":true},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"9cc66b0513ad41cb5f5372cca86ef83a0d37d1c1017580b7dace3ea5661836df","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"709efdae0cb5df5f49376cde61daacc95cdd44ae4671da13a540da5088bf3f30","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"61ed9b6d07af959e745fb11f9593ecd743b279418cc8a99448ea3cd5f3b3eb22","affectsGlobalScope":true},{"version":"038a2f66a34ee7a9c2fbc3584c8ab43dff2995f8c68e3f566f4c300d2175e31e","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"f5c92f2c27b06c1a41b88f6db8299205aee52c2a2943f7ed29bd585977f254e8","affectsGlobalScope":true},{"version":"930b0e15811f84e203d3c23508674d5ded88266df4b10abee7b31b2ac77632d2","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"b9ea5778ff8b50d7c04c9890170db34c26a5358cccba36844fe319f50a43a61a","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true},{"version":"25de46552b782d43cb7284df22fe2a265de387cf0248b747a7a1b647d81861f6","affectsGlobalScope":true},{"version":"307c8b7ebbd7f23a92b73a4c6c0a697beca05b06b036c23a34553e5fe65e4fdc","affectsGlobalScope":true},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"bbdf156fea2fabed31a569445835aeedcc33643d404fcbaa54541f06c109df3f","affectsGlobalScope":true},"4c68749a564a6facdf675416d75789ee5a557afda8960e0803cf6711fa569288","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"5917af4ff931b050dba49a1dedd9c00f15f7b3dc4345ad8491bfacd2ec68ed32","affectsGlobalScope":true},"0c1c79ce1b4c085adce94f17891812ee1a8b76fc1de63dd0d9d80ea34034f389","85abb794f600fbd798f9bc50e51771a9152b7e5ad611a95fceac020efd0a0bd4","e4dd91dd4789a109aab51d8a0569a282369fcda9ba6f2b2297bc61bacfb1a042","83e27bbd7304ea67f9afa1535f1d4fdb15866089f0d893c784cbb5b1c6fb3386","472c14cdec534a465e866b6e1feee2d4e0d89c15fdc33ba80ff034fa0e80f3c1","4d807d55c784b72f71c092c34c84d09b95c29500c30252538fd5cf9a0a788c0e","df43a3968118d4b16618d7a0ac8ba89337fcce3c39e39984087ac34bf0cf250c","7f2497d56947331a6705c6c8d099b173d6fa7b90f5110c190cbca5cae1f3a09c","582f001c48a6204fd6bb5c6c71b36adc5256078c0ac3686b99db59cbb724ca73","af88a0b0f808a6721401550621bfe67c46c6fd55000305058e7c73600d119a9b",{"version":"0a41b61ddcb640fa2a07cb7a04ecddf540b8199f70d3cf5f2d8903be722529eb","signature":"4b7a879cde76a92dc90518ea30784dc4737a9088b19ce8b3e6e52ca88d79fdd9"},{"version":"4e8c59b6c243b9148b72d7428c71592176a520225ee91b718f4a655a5baf6624","signature":"5120315643470468a3955abbc6f5669c5314f62f237825a2930ede632739ff58"}],"root":[76,77],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"rootDir":"./src","strict":true,"target":99},"fileIdsList":[[65],[61,62,63,64],[65,75],[66,67,70,71,72,73,74],[68,69]],"referencedMap":[[69,1],[68,1],[65,2],[76,3],[66,1],[75,4],[74,1],[70,5],[67,1],[73,1]],"exportedModulesMap":[[69,1],[68,1],[65,2],[76,1],[66,1],[75,4],[74,1],[70,5],[67,1],[73,1]],"semanticDiagnosticsPerFile":[63,69,68,61,65,64,62,59,60,12,14,13,2,15,16,17,18,19,20,21,22,3,4,26,23,24,25,27,28,29,5,30,31,32,33,6,37,34,35,36,38,7,39,44,45,40,41,42,43,8,49,46,47,48,50,9,51,52,53,56,54,55,57,10,1,11,58,76,77,66,75,72,74,70,67,73,71],"latestChangedDtsFile":"./build-types/utils/dom.d.ts"},"version":"5.1.6"}
@@ -1,100 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useCompatibilityStyles = useCompatibilityStyles;
7
- var _element = require("@wordpress/element");
8
- /**
9
- * WordPress dependencies
10
- */
11
-
12
- /**
13
- * Returns a list of stylesheets that target the editor canvas. A stylesheet is
14
- * considered targetting the editor a canvas if it contains the
15
- * `editor-styles-wrapper`, `wp-block`, or `wp-block-*` class selectors.
16
- *
17
- * Ideally, this hook should be removed in the future and styles should be added
18
- * explicitly as editor styles.
19
- */
20
- function useCompatibilityStyles() {
21
- // Only memoize the result once on load, since these stylesheets should not
22
- // change.
23
- return (0, _element.useMemo)(() => {
24
- // Search the document for stylesheets targetting the editor canvas.
25
- return Array.from(document.styleSheets).reduce((accumulator, styleSheet) => {
26
- try {
27
- // May fail for external styles.
28
- // eslint-disable-next-line no-unused-expressions
29
- styleSheet.cssRules;
30
- } catch (e) {
31
- return accumulator;
32
- }
33
- const {
34
- ownerNode,
35
- cssRules
36
- } = styleSheet;
37
-
38
- // Stylesheet is added by another stylesheet. See
39
- // https://developer.mozilla.org/en-US/docs/Web/API/StyleSheet/ownerNode#notes.
40
- if (ownerNode === null) {
41
- return accumulator;
42
- }
43
- if (!cssRules) {
44
- return accumulator;
45
- }
46
-
47
- // Don't try to add the reset styles, which were removed as a dependency
48
- // from `edit-blocks` for the iframe since we don't need to reset admin
49
- // styles.
50
- if (ownerNode.id === 'wp-reset-editor-styles-css') {
51
- return accumulator;
52
- }
53
-
54
- // Don't try to add styles without ID. Styles enqueued via the WP dependency system will always have IDs.
55
- if (!ownerNode.id) {
56
- return accumulator;
57
- }
58
- function matchFromRules(_cssRules) {
59
- return Array.from(_cssRules).find(({
60
- selectorText,
61
- conditionText,
62
- cssRules: __cssRules
63
- }) => {
64
- // If the rule is conditional then it will not have selector text.
65
- // Recurse into child CSS ruleset to determine selector eligibility.
66
- if (conditionText) {
67
- return matchFromRules(__cssRules);
68
- }
69
- return selectorText && (selectorText.includes('.editor-styles-wrapper') || selectorText.includes('.wp-block'));
70
- });
71
- }
72
- if (matchFromRules(cssRules)) {
73
- const isInline = ownerNode.tagName === 'STYLE';
74
- if (isInline) {
75
- // If the current target is inline,
76
- // it could be a dependency of an existing stylesheet.
77
- // Look for that dependency and add it BEFORE the current target.
78
- const mainStylesCssId = ownerNode.id.replace('-inline-css', '-css');
79
- const mainStylesElement = document.getElementById(mainStylesCssId);
80
- if (mainStylesElement) {
81
- accumulator.push(mainStylesElement.cloneNode(true));
82
- }
83
- }
84
- accumulator.push(ownerNode.cloneNode(true));
85
- if (!isInline) {
86
- // If the current target is not inline,
87
- // we still look for inline styles that could be relevant for the current target.
88
- // If they exist, add them AFTER the current target.
89
- const inlineStylesCssId = ownerNode.id.replace('-css', '-inline-css');
90
- const inlineStylesElement = document.getElementById(inlineStylesCssId);
91
- if (inlineStylesElement) {
92
- accumulator.push(inlineStylesElement.cloneNode(true));
93
- }
94
- }
95
- }
96
- return accumulator;
97
- }, []);
98
- }, []);
99
- }
100
- //# sourceMappingURL=use-compatibility-styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_element","require","useCompatibilityStyles","useMemo","Array","from","document","styleSheets","reduce","accumulator","styleSheet","cssRules","e","ownerNode","id","matchFromRules","_cssRules","find","selectorText","conditionText","__cssRules","includes","isInline","tagName","mainStylesCssId","replace","mainStylesElement","getElementById","push","cloneNode","inlineStylesCssId","inlineStylesElement"],"sources":["@wordpress/block-editor/src/components/iframe/use-compatibility-styles.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Returns a list of stylesheets that target the editor canvas. A stylesheet is\n * considered targetting the editor a canvas if it contains the\n * `editor-styles-wrapper`, `wp-block`, or `wp-block-*` class selectors.\n *\n * Ideally, this hook should be removed in the future and styles should be added\n * explicitly as editor styles.\n */\nexport function useCompatibilityStyles() {\n\t// Only memoize the result once on load, since these stylesheets should not\n\t// change.\n\treturn useMemo( () => {\n\t\t// Search the document for stylesheets targetting the editor canvas.\n\t\treturn Array.from( document.styleSheets ).reduce(\n\t\t\t( accumulator, styleSheet ) => {\n\t\t\t\ttry {\n\t\t\t\t\t// May fail for external styles.\n\t\t\t\t\t// eslint-disable-next-line no-unused-expressions\n\t\t\t\t\tstyleSheet.cssRules;\n\t\t\t\t} catch ( e ) {\n\t\t\t\t\treturn accumulator;\n\t\t\t\t}\n\n\t\t\t\tconst { ownerNode, cssRules } = styleSheet;\n\n\t\t\t\t// Stylesheet is added by another stylesheet. See\n\t\t\t\t// https://developer.mozilla.org/en-US/docs/Web/API/StyleSheet/ownerNode#notes.\n\t\t\t\tif ( ownerNode === null ) {\n\t\t\t\t\treturn accumulator;\n\t\t\t\t}\n\n\t\t\t\tif ( ! cssRules ) {\n\t\t\t\t\treturn accumulator;\n\t\t\t\t}\n\n\t\t\t\t// Don't try to add the reset styles, which were removed as a dependency\n\t\t\t\t// from `edit-blocks` for the iframe since we don't need to reset admin\n\t\t\t\t// styles.\n\t\t\t\tif ( ownerNode.id === 'wp-reset-editor-styles-css' ) {\n\t\t\t\t\treturn accumulator;\n\t\t\t\t}\n\n\t\t\t\t// Don't try to add styles without ID. Styles enqueued via the WP dependency system will always have IDs.\n\t\t\t\tif ( ! ownerNode.id ) {\n\t\t\t\t\treturn accumulator;\n\t\t\t\t}\n\n\t\t\t\tfunction matchFromRules( _cssRules ) {\n\t\t\t\t\treturn Array.from( _cssRules ).find(\n\t\t\t\t\t\t( {\n\t\t\t\t\t\t\tselectorText,\n\t\t\t\t\t\t\tconditionText,\n\t\t\t\t\t\t\tcssRules: __cssRules,\n\t\t\t\t\t\t} ) => {\n\t\t\t\t\t\t\t// If the rule is conditional then it will not have selector text.\n\t\t\t\t\t\t\t// Recurse into child CSS ruleset to determine selector eligibility.\n\t\t\t\t\t\t\tif ( conditionText ) {\n\t\t\t\t\t\t\t\treturn matchFromRules( __cssRules );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\tselectorText &&\n\t\t\t\t\t\t\t\t( selectorText.includes(\n\t\t\t\t\t\t\t\t\t'.editor-styles-wrapper'\n\t\t\t\t\t\t\t\t) ||\n\t\t\t\t\t\t\t\t\tselectorText.includes( '.wp-block' ) )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif ( matchFromRules( cssRules ) ) {\n\t\t\t\t\tconst isInline = ownerNode.tagName === 'STYLE';\n\n\t\t\t\t\tif ( isInline ) {\n\t\t\t\t\t\t// If the current target is inline,\n\t\t\t\t\t\t// it could be a dependency of an existing stylesheet.\n\t\t\t\t\t\t// Look for that dependency and add it BEFORE the current target.\n\t\t\t\t\t\tconst mainStylesCssId = ownerNode.id.replace(\n\t\t\t\t\t\t\t'-inline-css',\n\t\t\t\t\t\t\t'-css'\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst mainStylesElement =\n\t\t\t\t\t\t\tdocument.getElementById( mainStylesCssId );\n\t\t\t\t\t\tif ( mainStylesElement ) {\n\t\t\t\t\t\t\taccumulator.push(\n\t\t\t\t\t\t\t\tmainStylesElement.cloneNode( true )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\taccumulator.push( ownerNode.cloneNode( true ) );\n\n\t\t\t\t\tif ( ! isInline ) {\n\t\t\t\t\t\t// If the current target is not inline,\n\t\t\t\t\t\t// we still look for inline styles that could be relevant for the current target.\n\t\t\t\t\t\t// If they exist, add them AFTER the current target.\n\t\t\t\t\t\tconst inlineStylesCssId = ownerNode.id.replace(\n\t\t\t\t\t\t\t'-css',\n\t\t\t\t\t\t\t'-inline-css'\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst inlineStylesElement =\n\t\t\t\t\t\t\tdocument.getElementById( inlineStylesCssId );\n\t\t\t\t\t\tif ( inlineStylesElement ) {\n\t\t\t\t\t\t\taccumulator.push(\n\t\t\t\t\t\t\t\tinlineStylesElement.cloneNode( true )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn accumulator;\n\t\t\t},\n\t\t\t[]\n\t\t);\n\t}, [] );\n}\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,sBAAsBA,CAAA,EAAG;EACxC;EACA;EACA,OAAO,IAAAC,gBAAO,EAAE,MAAM;IACrB;IACA,OAAOC,KAAK,CAACC,IAAI,CAAEC,QAAQ,CAACC,WAAY,CAAC,CAACC,MAAM,CAC/C,CAAEC,WAAW,EAAEC,UAAU,KAAM;MAC9B,IAAI;QACH;QACA;QACAA,UAAU,CAACC,QAAQ;MACpB,CAAC,CAAC,OAAQC,CAAC,EAAG;QACb,OAAOH,WAAW;MACnB;MAEA,MAAM;QAAEI,SAAS;QAAEF;MAAS,CAAC,GAAGD,UAAU;;MAE1C;MACA;MACA,IAAKG,SAAS,KAAK,IAAI,EAAG;QACzB,OAAOJ,WAAW;MACnB;MAEA,IAAK,CAAEE,QAAQ,EAAG;QACjB,OAAOF,WAAW;MACnB;;MAEA;MACA;MACA;MACA,IAAKI,SAAS,CAACC,EAAE,KAAK,4BAA4B,EAAG;QACpD,OAAOL,WAAW;MACnB;;MAEA;MACA,IAAK,CAAEI,SAAS,CAACC,EAAE,EAAG;QACrB,OAAOL,WAAW;MACnB;MAEA,SAASM,cAAcA,CAAEC,SAAS,EAAG;QACpC,OAAOZ,KAAK,CAACC,IAAI,CAAEW,SAAU,CAAC,CAACC,IAAI,CAClC,CAAE;UACDC,YAAY;UACZC,aAAa;UACbR,QAAQ,EAAES;QACX,CAAC,KAAM;UACN;UACA;UACA,IAAKD,aAAa,EAAG;YACpB,OAAOJ,cAAc,CAAEK,UAAW,CAAC;UACpC;UAEA,OACCF,YAAY,KACVA,YAAY,CAACG,QAAQ,CACtB,wBACD,CAAC,IACAH,YAAY,CAACG,QAAQ,CAAE,WAAY,CAAC,CAAE;QAEzC,CACD,CAAC;MACF;MAEA,IAAKN,cAAc,CAAEJ,QAAS,CAAC,EAAG;QACjC,MAAMW,QAAQ,GAAGT,SAAS,CAACU,OAAO,KAAK,OAAO;QAE9C,IAAKD,QAAQ,EAAG;UACf;UACA;UACA;UACA,MAAME,eAAe,GAAGX,SAAS,CAACC,EAAE,CAACW,OAAO,CAC3C,aAAa,EACb,MACD,CAAC;UACD,MAAMC,iBAAiB,GACtBpB,QAAQ,CAACqB,cAAc,CAAEH,eAAgB,CAAC;UAC3C,IAAKE,iBAAiB,EAAG;YACxBjB,WAAW,CAACmB,IAAI,CACfF,iBAAiB,CAACG,SAAS,CAAE,IAAK,CACnC,CAAC;UACF;QACD;QAEApB,WAAW,CAACmB,IAAI,CAAEf,SAAS,CAACgB,SAAS,CAAE,IAAK,CAAE,CAAC;QAE/C,IAAK,CAAEP,QAAQ,EAAG;UACjB;UACA;UACA;UACA,MAAMQ,iBAAiB,GAAGjB,SAAS,CAACC,EAAE,CAACW,OAAO,CAC7C,MAAM,EACN,aACD,CAAC;UACD,MAAMM,mBAAmB,GACxBzB,QAAQ,CAACqB,cAAc,CAAEG,iBAAkB,CAAC;UAC7C,IAAKC,mBAAmB,EAAG;YAC1BtB,WAAW,CAACmB,IAAI,CACfG,mBAAmB,CAACF,SAAS,CAAE,IAAK,CACrC,CAAC;UACF;QACD;MACD;MAEA,OAAOpB,WAAW;IACnB,CAAC,EACD,EACD,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;AACR"}
@@ -1,42 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.__experimentalGetMatchingVariation = void 0;
7
- /** @typedef {import('@wordpress/blocks').WPBlockVariation} WPBlockVariation */
8
-
9
- function matchesAttributes(blockAttributes, variation) {
10
- return Object.entries(variation).every(([key, value]) => {
11
- if (typeof value === 'object' && typeof blockAttributes[key] === 'object') {
12
- return matchesAttributes(blockAttributes[key], value);
13
- }
14
- return blockAttributes[key] === value;
15
- });
16
- }
17
-
18
- /**
19
- * Matches the provided block variations with a block's attributes. If no match
20
- * or more than one matches are found it returns `undefined`. If a single match is
21
- * found it returns it.
22
- *
23
- * This is a simple implementation for now as it takes into account only the attributes
24
- * of a block variation and not `InnerBlocks`.
25
- *
26
- * @param {Object} blockAttributes - The block attributes to try to find a match.
27
- * @param {WPBlockVariation[]} variations - A list of block variations to test for a match.
28
- * @return {WPBlockVariation | undefined} - If a match is found returns it. If not or more than one matches are found returns `undefined`.
29
- */
30
- const __experimentalGetMatchingVariation = (blockAttributes, variations) => {
31
- if (!variations || !blockAttributes) return;
32
- const matches = variations.filter(({
33
- attributes
34
- }) => {
35
- if (!attributes || !Object.keys(attributes).length) return false;
36
- return matchesAttributes(blockAttributes, attributes);
37
- });
38
- if (matches.length !== 1) return;
39
- return matches[0];
40
- };
41
- exports.__experimentalGetMatchingVariation = __experimentalGetMatchingVariation;
42
- //# sourceMappingURL=block-variation-transforms.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["matchesAttributes","blockAttributes","variation","Object","entries","every","key","value","__experimentalGetMatchingVariation","variations","matches","filter","attributes","keys","length","exports"],"sources":["@wordpress/block-editor/src/utils/block-variation-transforms.js"],"sourcesContent":["/** @typedef {import('@wordpress/blocks').WPBlockVariation} WPBlockVariation */\n\nfunction matchesAttributes( blockAttributes, variation ) {\n\treturn Object.entries( variation ).every( ( [ key, value ] ) => {\n\t\tif (\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof blockAttributes[ key ] === 'object'\n\t\t) {\n\t\t\treturn matchesAttributes( blockAttributes[ key ], value );\n\t\t}\n\t\treturn blockAttributes[ key ] === value;\n\t} );\n}\n\n/**\n * Matches the provided block variations with a block's attributes. If no match\n * or more than one matches are found it returns `undefined`. If a single match is\n * found it returns it.\n *\n * This is a simple implementation for now as it takes into account only the attributes\n * of a block variation and not `InnerBlocks`.\n *\n * @param {Object} blockAttributes - The block attributes to try to find a match.\n * @param {WPBlockVariation[]} variations - A list of block variations to test for a match.\n * @return {WPBlockVariation | undefined} - If a match is found returns it. If not or more than one matches are found returns `undefined`.\n */\nexport const __experimentalGetMatchingVariation = (\n\tblockAttributes,\n\tvariations\n) => {\n\tif ( ! variations || ! blockAttributes ) return;\n\tconst matches = variations.filter( ( { attributes } ) => {\n\t\tif ( ! attributes || ! Object.keys( attributes ).length ) return false;\n\t\treturn matchesAttributes( blockAttributes, attributes );\n\t} );\n\tif ( matches.length !== 1 ) return;\n\treturn matches[ 0 ];\n};\n"],"mappings":";;;;;;AAAA;;AAEA,SAASA,iBAAiBA,CAAEC,eAAe,EAAEC,SAAS,EAAG;EACxD,OAAOC,MAAM,CAACC,OAAO,CAAEF,SAAU,CAAC,CAACG,KAAK,CAAE,CAAE,CAAEC,GAAG,EAAEC,KAAK,CAAE,KAAM;IAC/D,IACC,OAAOA,KAAK,KAAK,QAAQ,IACzB,OAAON,eAAe,CAAEK,GAAG,CAAE,KAAK,QAAQ,EACzC;MACD,OAAON,iBAAiB,CAAEC,eAAe,CAAEK,GAAG,CAAE,EAAEC,KAAM,CAAC;IAC1D;IACA,OAAON,eAAe,CAAEK,GAAG,CAAE,KAAKC,KAAK;EACxC,CAAE,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,kCAAkC,GAAGA,CACjDP,eAAe,EACfQ,UAAU,KACN;EACJ,IAAK,CAAEA,UAAU,IAAI,CAAER,eAAe,EAAG;EACzC,MAAMS,OAAO,GAAGD,UAAU,CAACE,MAAM,CAAE,CAAE;IAAEC;EAAW,CAAC,KAAM;IACxD,IAAK,CAAEA,UAAU,IAAI,CAAET,MAAM,CAACU,IAAI,CAAED,UAAW,CAAC,CAACE,MAAM,EAAG,OAAO,KAAK;IACtE,OAAOd,iBAAiB,CAAEC,eAAe,EAAEW,UAAW,CAAC;EACxD,CAAE,CAAC;EACH,IAAKF,OAAO,CAACI,MAAM,KAAK,CAAC,EAAG;EAC5B,OAAOJ,OAAO,CAAE,CAAC,CAAE;AACpB,CAAC;AAACK,OAAA,CAAAP,kCAAA,GAAAA,kCAAA"}
@@ -1,94 +0,0 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { useMemo } from '@wordpress/element';
5
-
6
- /**
7
- * Returns a list of stylesheets that target the editor canvas. A stylesheet is
8
- * considered targetting the editor a canvas if it contains the
9
- * `editor-styles-wrapper`, `wp-block`, or `wp-block-*` class selectors.
10
- *
11
- * Ideally, this hook should be removed in the future and styles should be added
12
- * explicitly as editor styles.
13
- */
14
- export function useCompatibilityStyles() {
15
- // Only memoize the result once on load, since these stylesheets should not
16
- // change.
17
- return useMemo(() => {
18
- // Search the document for stylesheets targetting the editor canvas.
19
- return Array.from(document.styleSheets).reduce((accumulator, styleSheet) => {
20
- try {
21
- // May fail for external styles.
22
- // eslint-disable-next-line no-unused-expressions
23
- styleSheet.cssRules;
24
- } catch (e) {
25
- return accumulator;
26
- }
27
- const {
28
- ownerNode,
29
- cssRules
30
- } = styleSheet;
31
-
32
- // Stylesheet is added by another stylesheet. See
33
- // https://developer.mozilla.org/en-US/docs/Web/API/StyleSheet/ownerNode#notes.
34
- if (ownerNode === null) {
35
- return accumulator;
36
- }
37
- if (!cssRules) {
38
- return accumulator;
39
- }
40
-
41
- // Don't try to add the reset styles, which were removed as a dependency
42
- // from `edit-blocks` for the iframe since we don't need to reset admin
43
- // styles.
44
- if (ownerNode.id === 'wp-reset-editor-styles-css') {
45
- return accumulator;
46
- }
47
-
48
- // Don't try to add styles without ID. Styles enqueued via the WP dependency system will always have IDs.
49
- if (!ownerNode.id) {
50
- return accumulator;
51
- }
52
- function matchFromRules(_cssRules) {
53
- return Array.from(_cssRules).find(({
54
- selectorText,
55
- conditionText,
56
- cssRules: __cssRules
57
- }) => {
58
- // If the rule is conditional then it will not have selector text.
59
- // Recurse into child CSS ruleset to determine selector eligibility.
60
- if (conditionText) {
61
- return matchFromRules(__cssRules);
62
- }
63
- return selectorText && (selectorText.includes('.editor-styles-wrapper') || selectorText.includes('.wp-block'));
64
- });
65
- }
66
- if (matchFromRules(cssRules)) {
67
- const isInline = ownerNode.tagName === 'STYLE';
68
- if (isInline) {
69
- // If the current target is inline,
70
- // it could be a dependency of an existing stylesheet.
71
- // Look for that dependency and add it BEFORE the current target.
72
- const mainStylesCssId = ownerNode.id.replace('-inline-css', '-css');
73
- const mainStylesElement = document.getElementById(mainStylesCssId);
74
- if (mainStylesElement) {
75
- accumulator.push(mainStylesElement.cloneNode(true));
76
- }
77
- }
78
- accumulator.push(ownerNode.cloneNode(true));
79
- if (!isInline) {
80
- // If the current target is not inline,
81
- // we still look for inline styles that could be relevant for the current target.
82
- // If they exist, add them AFTER the current target.
83
- const inlineStylesCssId = ownerNode.id.replace('-css', '-inline-css');
84
- const inlineStylesElement = document.getElementById(inlineStylesCssId);
85
- if (inlineStylesElement) {
86
- accumulator.push(inlineStylesElement.cloneNode(true));
87
- }
88
- }
89
- }
90
- return accumulator;
91
- }, []);
92
- }, []);
93
- }
94
- //# sourceMappingURL=use-compatibility-styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useMemo","useCompatibilityStyles","Array","from","document","styleSheets","reduce","accumulator","styleSheet","cssRules","e","ownerNode","id","matchFromRules","_cssRules","find","selectorText","conditionText","__cssRules","includes","isInline","tagName","mainStylesCssId","replace","mainStylesElement","getElementById","push","cloneNode","inlineStylesCssId","inlineStylesElement"],"sources":["@wordpress/block-editor/src/components/iframe/use-compatibility-styles.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Returns a list of stylesheets that target the editor canvas. A stylesheet is\n * considered targetting the editor a canvas if it contains the\n * `editor-styles-wrapper`, `wp-block`, or `wp-block-*` class selectors.\n *\n * Ideally, this hook should be removed in the future and styles should be added\n * explicitly as editor styles.\n */\nexport function useCompatibilityStyles() {\n\t// Only memoize the result once on load, since these stylesheets should not\n\t// change.\n\treturn useMemo( () => {\n\t\t// Search the document for stylesheets targetting the editor canvas.\n\t\treturn Array.from( document.styleSheets ).reduce(\n\t\t\t( accumulator, styleSheet ) => {\n\t\t\t\ttry {\n\t\t\t\t\t// May fail for external styles.\n\t\t\t\t\t// eslint-disable-next-line no-unused-expressions\n\t\t\t\t\tstyleSheet.cssRules;\n\t\t\t\t} catch ( e ) {\n\t\t\t\t\treturn accumulator;\n\t\t\t\t}\n\n\t\t\t\tconst { ownerNode, cssRules } = styleSheet;\n\n\t\t\t\t// Stylesheet is added by another stylesheet. See\n\t\t\t\t// https://developer.mozilla.org/en-US/docs/Web/API/StyleSheet/ownerNode#notes.\n\t\t\t\tif ( ownerNode === null ) {\n\t\t\t\t\treturn accumulator;\n\t\t\t\t}\n\n\t\t\t\tif ( ! cssRules ) {\n\t\t\t\t\treturn accumulator;\n\t\t\t\t}\n\n\t\t\t\t// Don't try to add the reset styles, which were removed as a dependency\n\t\t\t\t// from `edit-blocks` for the iframe since we don't need to reset admin\n\t\t\t\t// styles.\n\t\t\t\tif ( ownerNode.id === 'wp-reset-editor-styles-css' ) {\n\t\t\t\t\treturn accumulator;\n\t\t\t\t}\n\n\t\t\t\t// Don't try to add styles without ID. Styles enqueued via the WP dependency system will always have IDs.\n\t\t\t\tif ( ! ownerNode.id ) {\n\t\t\t\t\treturn accumulator;\n\t\t\t\t}\n\n\t\t\t\tfunction matchFromRules( _cssRules ) {\n\t\t\t\t\treturn Array.from( _cssRules ).find(\n\t\t\t\t\t\t( {\n\t\t\t\t\t\t\tselectorText,\n\t\t\t\t\t\t\tconditionText,\n\t\t\t\t\t\t\tcssRules: __cssRules,\n\t\t\t\t\t\t} ) => {\n\t\t\t\t\t\t\t// If the rule is conditional then it will not have selector text.\n\t\t\t\t\t\t\t// Recurse into child CSS ruleset to determine selector eligibility.\n\t\t\t\t\t\t\tif ( conditionText ) {\n\t\t\t\t\t\t\t\treturn matchFromRules( __cssRules );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\tselectorText &&\n\t\t\t\t\t\t\t\t( selectorText.includes(\n\t\t\t\t\t\t\t\t\t'.editor-styles-wrapper'\n\t\t\t\t\t\t\t\t) ||\n\t\t\t\t\t\t\t\t\tselectorText.includes( '.wp-block' ) )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif ( matchFromRules( cssRules ) ) {\n\t\t\t\t\tconst isInline = ownerNode.tagName === 'STYLE';\n\n\t\t\t\t\tif ( isInline ) {\n\t\t\t\t\t\t// If the current target is inline,\n\t\t\t\t\t\t// it could be a dependency of an existing stylesheet.\n\t\t\t\t\t\t// Look for that dependency and add it BEFORE the current target.\n\t\t\t\t\t\tconst mainStylesCssId = ownerNode.id.replace(\n\t\t\t\t\t\t\t'-inline-css',\n\t\t\t\t\t\t\t'-css'\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst mainStylesElement =\n\t\t\t\t\t\t\tdocument.getElementById( mainStylesCssId );\n\t\t\t\t\t\tif ( mainStylesElement ) {\n\t\t\t\t\t\t\taccumulator.push(\n\t\t\t\t\t\t\t\tmainStylesElement.cloneNode( true )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\taccumulator.push( ownerNode.cloneNode( true ) );\n\n\t\t\t\t\tif ( ! isInline ) {\n\t\t\t\t\t\t// If the current target is not inline,\n\t\t\t\t\t\t// we still look for inline styles that could be relevant for the current target.\n\t\t\t\t\t\t// If they exist, add them AFTER the current target.\n\t\t\t\t\t\tconst inlineStylesCssId = ownerNode.id.replace(\n\t\t\t\t\t\t\t'-css',\n\t\t\t\t\t\t\t'-inline-css'\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst inlineStylesElement =\n\t\t\t\t\t\t\tdocument.getElementById( inlineStylesCssId );\n\t\t\t\t\t\tif ( inlineStylesElement ) {\n\t\t\t\t\t\t\taccumulator.push(\n\t\t\t\t\t\t\t\tinlineStylesElement.cloneNode( true )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn accumulator;\n\t\t\t},\n\t\t\t[]\n\t\t);\n\t}, [] );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,oBAAoB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,sBAAsBA,CAAA,EAAG;EACxC;EACA;EACA,OAAOD,OAAO,CAAE,MAAM;IACrB;IACA,OAAOE,KAAK,CAACC,IAAI,CAAEC,QAAQ,CAACC,WAAY,CAAC,CAACC,MAAM,CAC/C,CAAEC,WAAW,EAAEC,UAAU,KAAM;MAC9B,IAAI;QACH;QACA;QACAA,UAAU,CAACC,QAAQ;MACpB,CAAC,CAAC,OAAQC,CAAC,EAAG;QACb,OAAOH,WAAW;MACnB;MAEA,MAAM;QAAEI,SAAS;QAAEF;MAAS,CAAC,GAAGD,UAAU;;MAE1C;MACA;MACA,IAAKG,SAAS,KAAK,IAAI,EAAG;QACzB,OAAOJ,WAAW;MACnB;MAEA,IAAK,CAAEE,QAAQ,EAAG;QACjB,OAAOF,WAAW;MACnB;;MAEA;MACA;MACA;MACA,IAAKI,SAAS,CAACC,EAAE,KAAK,4BAA4B,EAAG;QACpD,OAAOL,WAAW;MACnB;;MAEA;MACA,IAAK,CAAEI,SAAS,CAACC,EAAE,EAAG;QACrB,OAAOL,WAAW;MACnB;MAEA,SAASM,cAAcA,CAAEC,SAAS,EAAG;QACpC,OAAOZ,KAAK,CAACC,IAAI,CAAEW,SAAU,CAAC,CAACC,IAAI,CAClC,CAAE;UACDC,YAAY;UACZC,aAAa;UACbR,QAAQ,EAAES;QACX,CAAC,KAAM;UACN;UACA;UACA,IAAKD,aAAa,EAAG;YACpB,OAAOJ,cAAc,CAAEK,UAAW,CAAC;UACpC;UAEA,OACCF,YAAY,KACVA,YAAY,CAACG,QAAQ,CACtB,wBACD,CAAC,IACAH,YAAY,CAACG,QAAQ,CAAE,WAAY,CAAC,CAAE;QAEzC,CACD,CAAC;MACF;MAEA,IAAKN,cAAc,CAAEJ,QAAS,CAAC,EAAG;QACjC,MAAMW,QAAQ,GAAGT,SAAS,CAACU,OAAO,KAAK,OAAO;QAE9C,IAAKD,QAAQ,EAAG;UACf;UACA;UACA;UACA,MAAME,eAAe,GAAGX,SAAS,CAACC,EAAE,CAACW,OAAO,CAC3C,aAAa,EACb,MACD,CAAC;UACD,MAAMC,iBAAiB,GACtBpB,QAAQ,CAACqB,cAAc,CAAEH,eAAgB,CAAC;UAC3C,IAAKE,iBAAiB,EAAG;YACxBjB,WAAW,CAACmB,IAAI,CACfF,iBAAiB,CAACG,SAAS,CAAE,IAAK,CACnC,CAAC;UACF;QACD;QAEApB,WAAW,CAACmB,IAAI,CAAEf,SAAS,CAACgB,SAAS,CAAE,IAAK,CAAE,CAAC;QAE/C,IAAK,CAAEP,QAAQ,EAAG;UACjB;UACA;UACA;UACA,MAAMQ,iBAAiB,GAAGjB,SAAS,CAACC,EAAE,CAACW,OAAO,CAC7C,MAAM,EACN,aACD,CAAC;UACD,MAAMM,mBAAmB,GACxBzB,QAAQ,CAACqB,cAAc,CAAEG,iBAAkB,CAAC;UAC7C,IAAKC,mBAAmB,EAAG;YAC1BtB,WAAW,CAACmB,IAAI,CACfG,mBAAmB,CAACF,SAAS,CAAE,IAAK,CACrC,CAAC;UACF;QACD;MACD;MAEA,OAAOpB,WAAW;IACnB,CAAC,EACD,EACD,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;AACR"}
@@ -1,35 +0,0 @@
1
- /** @typedef {import('@wordpress/blocks').WPBlockVariation} WPBlockVariation */
2
-
3
- function matchesAttributes(blockAttributes, variation) {
4
- return Object.entries(variation).every(([key, value]) => {
5
- if (typeof value === 'object' && typeof blockAttributes[key] === 'object') {
6
- return matchesAttributes(blockAttributes[key], value);
7
- }
8
- return blockAttributes[key] === value;
9
- });
10
- }
11
-
12
- /**
13
- * Matches the provided block variations with a block's attributes. If no match
14
- * or more than one matches are found it returns `undefined`. If a single match is
15
- * found it returns it.
16
- *
17
- * This is a simple implementation for now as it takes into account only the attributes
18
- * of a block variation and not `InnerBlocks`.
19
- *
20
- * @param {Object} blockAttributes - The block attributes to try to find a match.
21
- * @param {WPBlockVariation[]} variations - A list of block variations to test for a match.
22
- * @return {WPBlockVariation | undefined} - If a match is found returns it. If not or more than one matches are found returns `undefined`.
23
- */
24
- export const __experimentalGetMatchingVariation = (blockAttributes, variations) => {
25
- if (!variations || !blockAttributes) return;
26
- const matches = variations.filter(({
27
- attributes
28
- }) => {
29
- if (!attributes || !Object.keys(attributes).length) return false;
30
- return matchesAttributes(blockAttributes, attributes);
31
- });
32
- if (matches.length !== 1) return;
33
- return matches[0];
34
- };
35
- //# sourceMappingURL=block-variation-transforms.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["matchesAttributes","blockAttributes","variation","Object","entries","every","key","value","__experimentalGetMatchingVariation","variations","matches","filter","attributes","keys","length"],"sources":["@wordpress/block-editor/src/utils/block-variation-transforms.js"],"sourcesContent":["/** @typedef {import('@wordpress/blocks').WPBlockVariation} WPBlockVariation */\n\nfunction matchesAttributes( blockAttributes, variation ) {\n\treturn Object.entries( variation ).every( ( [ key, value ] ) => {\n\t\tif (\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof blockAttributes[ key ] === 'object'\n\t\t) {\n\t\t\treturn matchesAttributes( blockAttributes[ key ], value );\n\t\t}\n\t\treturn blockAttributes[ key ] === value;\n\t} );\n}\n\n/**\n * Matches the provided block variations with a block's attributes. If no match\n * or more than one matches are found it returns `undefined`. If a single match is\n * found it returns it.\n *\n * This is a simple implementation for now as it takes into account only the attributes\n * of a block variation and not `InnerBlocks`.\n *\n * @param {Object} blockAttributes - The block attributes to try to find a match.\n * @param {WPBlockVariation[]} variations - A list of block variations to test for a match.\n * @return {WPBlockVariation | undefined} - If a match is found returns it. If not or more than one matches are found returns `undefined`.\n */\nexport const __experimentalGetMatchingVariation = (\n\tblockAttributes,\n\tvariations\n) => {\n\tif ( ! variations || ! blockAttributes ) return;\n\tconst matches = variations.filter( ( { attributes } ) => {\n\t\tif ( ! attributes || ! Object.keys( attributes ).length ) return false;\n\t\treturn matchesAttributes( blockAttributes, attributes );\n\t} );\n\tif ( matches.length !== 1 ) return;\n\treturn matches[ 0 ];\n};\n"],"mappings":"AAAA;;AAEA,SAASA,iBAAiBA,CAAEC,eAAe,EAAEC,SAAS,EAAG;EACxD,OAAOC,MAAM,CAACC,OAAO,CAAEF,SAAU,CAAC,CAACG,KAAK,CAAE,CAAE,CAAEC,GAAG,EAAEC,KAAK,CAAE,KAAM;IAC/D,IACC,OAAOA,KAAK,KAAK,QAAQ,IACzB,OAAON,eAAe,CAAEK,GAAG,CAAE,KAAK,QAAQ,EACzC;MACD,OAAON,iBAAiB,CAAEC,eAAe,CAAEK,GAAG,CAAE,EAAEC,KAAM,CAAC;IAC1D;IACA,OAAON,eAAe,CAAEK,GAAG,CAAE,KAAKC,KAAK;EACxC,CAAE,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,kCAAkC,GAAGA,CACjDP,eAAe,EACfQ,UAAU,KACN;EACJ,IAAK,CAAEA,UAAU,IAAI,CAAER,eAAe,EAAG;EACzC,MAAMS,OAAO,GAAGD,UAAU,CAACE,MAAM,CAAE,CAAE;IAAEC;EAAW,CAAC,KAAM;IACxD,IAAK,CAAEA,UAAU,IAAI,CAAET,MAAM,CAACU,IAAI,CAAED,UAAW,CAAC,CAACE,MAAM,EAAG,OAAO,KAAK;IACtE,OAAOd,iBAAiB,CAAEC,eAAe,EAAEW,UAAW,CAAC;EACxD,CAAE,CAAC;EACH,IAAKF,OAAO,CAACI,MAAM,KAAK,CAAC,EAAG;EAC5B,OAAOJ,OAAO,CAAE,CAAC,CAAE;AACpB,CAAC"}
@@ -1,116 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`BlockSwitcherDropdownMenu should render disabled block switcher with multi block of different types when no transforms 1`] = `
4
- <div>
5
- <div
6
- class="components-toolbar"
7
- >
8
- <div>
9
- <button
10
- aria-label="Block Name"
11
- class="components-button components-toolbar__control block-editor-block-switcher__no-switcher-icon has-icon"
12
- data-toolbar-item="true"
13
- disabled=""
14
- type="button"
15
- >
16
- <span
17
- class="block-editor-block-icon has-colors"
18
- >
19
- <svg
20
- aria-hidden="true"
21
- focusable="false"
22
- height="24"
23
- viewBox="0 0 24 24"
24
- width="24"
25
- xmlns="http://www.w3.org/2000/svg"
26
- >
27
- <path
28
- clip-rule="evenodd"
29
- d="M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z"
30
- fill-rule="evenodd"
31
- />
32
- </svg>
33
- </span>
34
- </button>
35
- </div>
36
- </div>
37
- </div>
38
- `;
39
-
40
- exports[`BlockSwitcherDropdownMenu should render enabled block switcher with multi block when transforms exist 1`] = `
41
- <div>
42
- <div
43
- class="components-toolbar"
44
- >
45
- <div
46
- class="components-dropdown components-dropdown-menu block-editor-block-switcher"
47
- tabindex="-1"
48
- >
49
- <button
50
- aria-describedby="components-button__description-2"
51
- aria-expanded="false"
52
- aria-haspopup="true"
53
- aria-label="Multiple blocks selected"
54
- class="components-button components-dropdown-menu__toggle has-icon"
55
- data-toolbar-item="true"
56
- type="button"
57
- >
58
- <span
59
- class="block-editor-block-icon block-editor-block-switcher__toggle has-colors"
60
- />
61
- </button>
62
- <div
63
- class="components-visually-hidden emotion-0 emotion-1"
64
- data-wp-c16t="true"
65
- data-wp-component="VisuallyHidden"
66
- style="border: 0px; clip: rect(1px, 1px, 1px, 1px); clip-path: inset( 50% ); height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-wrap: normal;"
67
- >
68
- <span
69
- id="components-button__description-2"
70
- >
71
- Change type of 2 blocks
72
- </span>
73
- </div>
74
- </div>
75
- </div>
76
- </div>
77
- `;
78
-
79
- exports[`BlockSwitcherDropdownMenu should render switcher with blocks 1`] = `
80
- <div>
81
- <div
82
- class="components-toolbar"
83
- >
84
- <div
85
- class="components-dropdown components-dropdown-menu block-editor-block-switcher"
86
- tabindex="-1"
87
- >
88
- <button
89
- aria-describedby="components-button__description-0"
90
- aria-expanded="false"
91
- aria-haspopup="true"
92
- aria-label="Block Name"
93
- class="components-button components-dropdown-menu__toggle has-icon"
94
- data-toolbar-item="true"
95
- type="button"
96
- >
97
- <span
98
- class="block-editor-block-icon block-editor-block-switcher__toggle has-colors"
99
- />
100
- </button>
101
- <div
102
- class="components-visually-hidden emotion-0 emotion-1"
103
- data-wp-c16t="true"
104
- data-wp-component="VisuallyHidden"
105
- style="border: 0px; clip: rect(1px, 1px, 1px, 1px); clip-path: inset( 50% ); height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-wrap: normal;"
106
- >
107
- <span
108
- id="components-button__description-0"
109
- >
110
- Change block type or style
111
- </span>
112
- </div>
113
- </div>
114
- </div>
115
- </div>
116
- `;
@@ -1,3 +0,0 @@
1
- .block-editor-contrast-checker > .components-notice {
2
- margin: 0;
3
- }
@@ -1,122 +0,0 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { useMemo } from '@wordpress/element';
5
-
6
- /**
7
- * Returns a list of stylesheets that target the editor canvas. A stylesheet is
8
- * considered targetting the editor a canvas if it contains the
9
- * `editor-styles-wrapper`, `wp-block`, or `wp-block-*` class selectors.
10
- *
11
- * Ideally, this hook should be removed in the future and styles should be added
12
- * explicitly as editor styles.
13
- */
14
- export function useCompatibilityStyles() {
15
- // Only memoize the result once on load, since these stylesheets should not
16
- // change.
17
- return useMemo( () => {
18
- // Search the document for stylesheets targetting the editor canvas.
19
- return Array.from( document.styleSheets ).reduce(
20
- ( accumulator, styleSheet ) => {
21
- try {
22
- // May fail for external styles.
23
- // eslint-disable-next-line no-unused-expressions
24
- styleSheet.cssRules;
25
- } catch ( e ) {
26
- return accumulator;
27
- }
28
-
29
- const { ownerNode, cssRules } = styleSheet;
30
-
31
- // Stylesheet is added by another stylesheet. See
32
- // https://developer.mozilla.org/en-US/docs/Web/API/StyleSheet/ownerNode#notes.
33
- if ( ownerNode === null ) {
34
- return accumulator;
35
- }
36
-
37
- if ( ! cssRules ) {
38
- return accumulator;
39
- }
40
-
41
- // Don't try to add the reset styles, which were removed as a dependency
42
- // from `edit-blocks` for the iframe since we don't need to reset admin
43
- // styles.
44
- if ( ownerNode.id === 'wp-reset-editor-styles-css' ) {
45
- return accumulator;
46
- }
47
-
48
- // Don't try to add styles without ID. Styles enqueued via the WP dependency system will always have IDs.
49
- if ( ! ownerNode.id ) {
50
- return accumulator;
51
- }
52
-
53
- function matchFromRules( _cssRules ) {
54
- return Array.from( _cssRules ).find(
55
- ( {
56
- selectorText,
57
- conditionText,
58
- cssRules: __cssRules,
59
- } ) => {
60
- // If the rule is conditional then it will not have selector text.
61
- // Recurse into child CSS ruleset to determine selector eligibility.
62
- if ( conditionText ) {
63
- return matchFromRules( __cssRules );
64
- }
65
-
66
- return (
67
- selectorText &&
68
- ( selectorText.includes(
69
- '.editor-styles-wrapper'
70
- ) ||
71
- selectorText.includes( '.wp-block' ) )
72
- );
73
- }
74
- );
75
- }
76
-
77
- if ( matchFromRules( cssRules ) ) {
78
- const isInline = ownerNode.tagName === 'STYLE';
79
-
80
- if ( isInline ) {
81
- // If the current target is inline,
82
- // it could be a dependency of an existing stylesheet.
83
- // Look for that dependency and add it BEFORE the current target.
84
- const mainStylesCssId = ownerNode.id.replace(
85
- '-inline-css',
86
- '-css'
87
- );
88
- const mainStylesElement =
89
- document.getElementById( mainStylesCssId );
90
- if ( mainStylesElement ) {
91
- accumulator.push(
92
- mainStylesElement.cloneNode( true )
93
- );
94
- }
95
- }
96
-
97
- accumulator.push( ownerNode.cloneNode( true ) );
98
-
99
- if ( ! isInline ) {
100
- // If the current target is not inline,
101
- // we still look for inline styles that could be relevant for the current target.
102
- // If they exist, add them AFTER the current target.
103
- const inlineStylesCssId = ownerNode.id.replace(
104
- '-css',
105
- '-inline-css'
106
- );
107
- const inlineStylesElement =
108
- document.getElementById( inlineStylesCssId );
109
- if ( inlineStylesElement ) {
110
- accumulator.push(
111
- inlineStylesElement.cloneNode( true )
112
- );
113
- }
114
- }
115
- }
116
-
117
- return accumulator;
118
- },
119
- []
120
- );
121
- }, [] );
122
- }