@wordpress/block-library 8.10.0 → 8.11.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 (278) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/block/edit.native.js +17 -10
  3. package/build/block/edit.native.js.map +1 -1
  4. package/build/code/index.js +1 -0
  5. package/build/code/index.js.map +1 -1
  6. package/build/column/index.js +1 -1
  7. package/build/columns/transforms.js +1 -5
  8. package/build/columns/transforms.js.map +1 -1
  9. package/build/cover/edit/resizable-cover-popover.js +3 -3
  10. package/build/cover/edit/resizable-cover-popover.js.map +1 -1
  11. package/build/file/interactivity.js +19 -0
  12. package/build/file/interactivity.js.map +1 -0
  13. package/build/file/{utils.js → utils/index.js} +1 -1
  14. package/build/file/utils/index.js.map +1 -0
  15. package/build/freeform/modal.js +20 -17
  16. package/build/freeform/modal.js.map +1 -1
  17. package/build/gallery/v1/edit.js +1 -7
  18. package/build/gallery/v1/edit.js.map +1 -1
  19. package/build/gallery/v1/gallery-image.native.js +1 -3
  20. package/build/gallery/v1/gallery-image.native.js.map +1 -1
  21. package/build/group/transforms.js +0 -5
  22. package/build/group/transforms.js.map +1 -1
  23. package/build/image/deprecated.js +2 -4
  24. package/build/image/deprecated.js.map +1 -1
  25. package/build/image/edit.js +13 -11
  26. package/build/image/edit.js.map +1 -1
  27. package/build/image/image.js +7 -12
  28. package/build/image/image.js.map +1 -1
  29. package/build/image/index.js +3 -0
  30. package/build/image/index.js.map +1 -1
  31. package/build/image/interactivity.js +102 -0
  32. package/build/image/interactivity.js.map +1 -0
  33. package/build/image/save.js +2 -4
  34. package/build/image/save.js.map +1 -1
  35. package/build/image/utils.js +10 -18
  36. package/build/image/utils.js.map +1 -1
  37. package/build/latest-posts/edit.native.js +1 -3
  38. package/build/latest-posts/edit.native.js.map +1 -1
  39. package/build/list/edit.js +1 -1
  40. package/build/list/edit.js.map +1 -1
  41. package/build/list-item/edit.native.js +1 -1
  42. package/build/list-item/edit.native.js.map +1 -1
  43. package/build/list-item/transforms.js +4 -1
  44. package/build/list-item/transforms.js.map +1 -1
  45. package/build/media-text/deprecated.js +4 -6
  46. package/build/media-text/deprecated.js.map +1 -1
  47. package/build/media-text/edit.js +13 -11
  48. package/build/media-text/edit.js.map +1 -1
  49. package/build/media-text/media-container.js +3 -3
  50. package/build/media-text/media-container.js.map +1 -1
  51. package/build/media-text/save.js +1 -3
  52. package/build/media-text/save.js.map +1 -1
  53. package/build/navigation/constants.js +3 -1
  54. package/build/navigation/constants.js.map +1 -1
  55. package/build/navigation/edit/inner-blocks.js +1 -0
  56. package/build/navigation/edit/inner-blocks.js.map +1 -1
  57. package/build/navigation/edit/leaf-more-menu.js +148 -0
  58. package/build/navigation/edit/leaf-more-menu.js.map +1 -0
  59. package/build/navigation/edit/menu-inspector-controls.js +53 -8
  60. package/build/navigation/edit/menu-inspector-controls.js.map +1 -1
  61. package/build/navigation/edit/navigation-menu-delete-control.js +6 -6
  62. package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  63. package/build/navigation/edit/unsaved-inner-blocks.js +8 -19
  64. package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  65. package/build/navigation/interactivity.js +24 -6
  66. package/build/navigation/interactivity.js.map +1 -1
  67. package/build/navigation-link/edit.js +6 -4
  68. package/build/navigation-link/edit.js.map +1 -1
  69. package/build/navigation-link/update-attributes.js +5 -5
  70. package/build/navigation-link/update-attributes.js.map +1 -1
  71. package/build/navigation-submenu/edit.js +6 -4
  72. package/build/navigation-submenu/edit.js.map +1 -1
  73. package/build/pattern/edit.js +42 -8
  74. package/build/pattern/edit.js.map +1 -1
  75. package/build/pattern/index.js +12 -5
  76. package/build/pattern/index.js.map +1 -1
  77. package/build/pattern/v1/edit.js +57 -0
  78. package/build/pattern/v1/edit.js.map +1 -0
  79. package/build/post-title/edit.js +10 -3
  80. package/build/post-title/edit.js.map +1 -1
  81. package/build/quote/transforms.js +9 -12
  82. package/build/quote/transforms.js.map +1 -1
  83. package/build/social-link/edit.js +21 -4
  84. package/build/social-link/edit.js.map +1 -1
  85. package/build/template-part/edit/index.js +1 -7
  86. package/build/template-part/edit/index.js.map +1 -1
  87. package/build/template-part/edit/utils/hooks.js +2 -2
  88. package/build/template-part/edit/utils/hooks.js.map +1 -1
  89. package/build/utils/interactivity/directives.js +50 -22
  90. package/build/utils/interactivity/directives.js.map +1 -1
  91. package/build/utils/interactivity/hooks.js +76 -12
  92. package/build/utils/interactivity/hooks.js.map +1 -1
  93. package/build/utils/interactivity/portals.js +108 -0
  94. package/build/utils/interactivity/portals.js.map +1 -0
  95. package/build-module/block/edit.native.js +7 -1
  96. package/build-module/block/edit.native.js.map +1 -1
  97. package/build-module/code/index.js +1 -0
  98. package/build-module/code/index.js.map +1 -1
  99. package/build-module/column/index.js +1 -1
  100. package/build-module/columns/transforms.js +1 -5
  101. package/build-module/columns/transforms.js.map +1 -1
  102. package/build-module/cover/edit/resizable-cover-popover.js +3 -3
  103. package/build-module/cover/edit/resizable-cover-popover.js.map +1 -1
  104. package/build-module/file/interactivity.js +15 -0
  105. package/build-module/file/interactivity.js.map +1 -0
  106. package/build-module/file/{utils.js → utils/index.js} +1 -1
  107. package/build-module/file/utils/index.js.map +1 -0
  108. package/build-module/freeform/modal.js +19 -18
  109. package/build-module/freeform/modal.js.map +1 -1
  110. package/build-module/gallery/v1/edit.js +1 -6
  111. package/build-module/gallery/v1/edit.js.map +1 -1
  112. package/build-module/gallery/v1/gallery-image.native.js +1 -2
  113. package/build-module/gallery/v1/gallery-image.native.js.map +1 -1
  114. package/build-module/group/transforms.js +0 -5
  115. package/build-module/group/transforms.js.map +1 -1
  116. package/build-module/image/deprecated.js +2 -3
  117. package/build-module/image/deprecated.js.map +1 -1
  118. package/build-module/image/edit.js +12 -11
  119. package/build-module/image/edit.js.map +1 -1
  120. package/build-module/image/image.js +7 -11
  121. package/build-module/image/image.js.map +1 -1
  122. package/build-module/image/index.js +3 -0
  123. package/build-module/image/index.js.map +1 -1
  124. package/build-module/image/interactivity.js +99 -0
  125. package/build-module/image/interactivity.js.map +1 -0
  126. package/build-module/image/save.js +2 -3
  127. package/build-module/image/save.js.map +1 -1
  128. package/build-module/image/utils.js +10 -17
  129. package/build-module/image/utils.js.map +1 -1
  130. package/build-module/latest-posts/edit.native.js +1 -2
  131. package/build-module/latest-posts/edit.native.js.map +1 -1
  132. package/build-module/list/edit.js +1 -1
  133. package/build-module/list/edit.js.map +1 -1
  134. package/build-module/list-item/edit.native.js +1 -1
  135. package/build-module/list-item/edit.native.js.map +1 -1
  136. package/build-module/list-item/transforms.js +5 -2
  137. package/build-module/list-item/transforms.js.map +1 -1
  138. package/build-module/media-text/deprecated.js +4 -5
  139. package/build-module/media-text/deprecated.js.map +1 -1
  140. package/build-module/media-text/edit.js +13 -12
  141. package/build-module/media-text/edit.js.map +1 -1
  142. package/build-module/media-text/media-container.js +3 -3
  143. package/build-module/media-text/media-container.js.map +1 -1
  144. package/build-module/media-text/save.js +1 -2
  145. package/build-module/media-text/save.js.map +1 -1
  146. package/build-module/navigation/constants.js +1 -0
  147. package/build-module/navigation/constants.js.map +1 -1
  148. package/build-module/navigation/edit/inner-blocks.js +2 -1
  149. package/build-module/navigation/edit/inner-blocks.js.map +1 -1
  150. package/build-module/navigation/edit/leaf-more-menu.js +132 -0
  151. package/build-module/navigation/edit/leaf-more-menu.js.map +1 -0
  152. package/build-module/navigation/edit/menu-inspector-controls.js +52 -9
  153. package/build-module/navigation/edit/menu-inspector-controls.js.map +1 -1
  154. package/build-module/navigation/edit/navigation-menu-delete-control.js +7 -7
  155. package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  156. package/build-module/navigation/edit/unsaved-inner-blocks.js +8 -16
  157. package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  158. package/build-module/navigation/interactivity.js +24 -6
  159. package/build-module/navigation/interactivity.js.map +1 -1
  160. package/build-module/navigation-link/edit.js +6 -4
  161. package/build-module/navigation-link/edit.js.map +1 -1
  162. package/build-module/navigation-link/update-attributes.js +4 -4
  163. package/build-module/navigation-link/update-attributes.js.map +1 -1
  164. package/build-module/navigation-submenu/edit.js +6 -4
  165. package/build-module/navigation-submenu/edit.js.map +1 -1
  166. package/build-module/pattern/edit.js +42 -9
  167. package/build-module/pattern/edit.js.map +1 -1
  168. package/build-module/pattern/index.js +12 -3
  169. package/build-module/pattern/index.js.map +1 -1
  170. package/build-module/pattern/v1/edit.js +48 -0
  171. package/build-module/pattern/v1/edit.js.map +1 -0
  172. package/build-module/post-title/edit.js +10 -3
  173. package/build-module/post-title/edit.js.map +1 -1
  174. package/build-module/quote/transforms.js +9 -12
  175. package/build-module/quote/transforms.js.map +1 -1
  176. package/build-module/social-link/edit.js +20 -5
  177. package/build-module/social-link/edit.js.map +1 -1
  178. package/build-module/template-part/edit/index.js +1 -6
  179. package/build-module/template-part/edit/index.js.map +1 -1
  180. package/build-module/template-part/edit/utils/hooks.js +1 -1
  181. package/build-module/template-part/edit/utils/hooks.js.map +1 -1
  182. package/build-module/utils/interactivity/directives.js +49 -22
  183. package/build-module/utils/interactivity/directives.js.map +1 -1
  184. package/build-module/utils/interactivity/hooks.js +77 -13
  185. package/build-module/utils/interactivity/hooks.js.map +1 -1
  186. package/build-module/utils/interactivity/portals.js +100 -0
  187. package/build-module/utils/interactivity/portals.js.map +1 -0
  188. package/build-style/common-rtl.css +1 -1
  189. package/build-style/common.css +1 -1
  190. package/build-style/cover/style-rtl.css +1 -2
  191. package/build-style/cover/style.css +1 -2
  192. package/build-style/editor-rtl.css +68 -0
  193. package/build-style/editor.css +68 -0
  194. package/build-style/file/editor-rtl.css +3 -0
  195. package/build-style/file/editor.css +3 -0
  196. package/build-style/freeform/editor-rtl.css +29 -0
  197. package/build-style/freeform/editor.css +29 -0
  198. package/build-style/gallery/style-rtl.css +2 -4
  199. package/build-style/gallery/style.css +2 -4
  200. package/build-style/image/style-rtl.css +98 -0
  201. package/build-style/image/style.css +98 -0
  202. package/build-style/navigation/editor-rtl.css +36 -0
  203. package/build-style/navigation/editor.css +36 -0
  204. package/build-style/post-comments-form/style-rtl.css +1 -1
  205. package/build-style/post-comments-form/style.css +1 -1
  206. package/build-style/style-rtl.css +103 -9
  207. package/build-style/style.css +103 -9
  208. package/build-style/video/style-rtl.css +1 -2
  209. package/build-style/video/style.css +1 -2
  210. package/package.json +32 -32
  211. package/src/block/edit.native.js +18 -4
  212. package/src/buttons/test/edit.native.js +0 -9
  213. package/src/code/block.json +1 -0
  214. package/src/column/block.json +1 -1
  215. package/src/columns/test/__snapshots__/transforms.native.js.snap +1 -1
  216. package/src/columns/test/transforms.native.js +3 -5
  217. package/src/columns/transforms.js +2 -8
  218. package/src/comments/index.php +1 -6
  219. package/src/cover/edit/resizable-cover-popover.js +2 -1
  220. package/src/file/editor.scss +4 -0
  221. package/src/file/interactivity.js +15 -0
  222. package/src/freeform/editor.scss +45 -0
  223. package/src/freeform/modal.js +22 -19
  224. package/src/gallery/v1/edit.js +1 -6
  225. package/src/gallery/v1/gallery-image.native.js +1 -2
  226. package/src/group/test/__snapshots__/transforms.native.js.snap +1 -1
  227. package/src/group/test/transforms.native.js +3 -5
  228. package/src/group/transforms.js +0 -7
  229. package/src/image/block.json +3 -0
  230. package/src/image/deprecated.js +2 -3
  231. package/src/image/edit.js +18 -18
  232. package/src/image/image.js +8 -11
  233. package/src/image/index.php +75 -2
  234. package/src/image/interactivity.js +113 -0
  235. package/src/image/save.js +4 -3
  236. package/src/image/style.scss +113 -0
  237. package/src/image/utils.js +11 -18
  238. package/src/latest-posts/edit.native.js +1 -4
  239. package/src/list/edit.js +1 -1
  240. package/src/list/test/edit.native.js +80 -1
  241. package/src/list-item/edit.native.js +1 -1
  242. package/src/list-item/transforms.js +4 -2
  243. package/src/media-text/deprecated.js +4 -5
  244. package/src/media-text/edit.js +12 -10
  245. package/src/media-text/media-container.js +3 -3
  246. package/src/media-text/save.js +1 -2
  247. package/src/navigation/constants.js +5 -0
  248. package/src/navigation/edit/inner-blocks.js +6 -1
  249. package/src/navigation/edit/leaf-more-menu.js +170 -0
  250. package/src/navigation/edit/menu-inspector-controls.js +78 -10
  251. package/src/navigation/edit/navigation-menu-delete-control.js +29 -29
  252. package/src/navigation/edit/unsaved-inner-blocks.js +11 -24
  253. package/src/navigation/editor.scss +10 -0
  254. package/src/navigation/index.php +4 -1
  255. package/src/navigation/interactivity.js +9 -2
  256. package/src/navigation-link/edit.js +8 -2
  257. package/src/navigation-link/update-attributes.js +2 -2
  258. package/src/navigation-submenu/edit.js +8 -2
  259. package/src/pattern/block.json +4 -0
  260. package/src/pattern/edit.js +53 -16
  261. package/src/pattern/index.js +5 -4
  262. package/src/pattern/index.php +14 -1
  263. package/src/pattern/v1/edit.js +57 -0
  264. package/src/post-comments-form/style.scss +3 -1
  265. package/src/post-title/edit.js +50 -44
  266. package/src/quote/test/__snapshots__/transforms.native.js.snap +1 -1
  267. package/src/quote/test/transforms.native.js +3 -5
  268. package/src/quote/transforms.js +9 -13
  269. package/src/social-link/edit.js +51 -26
  270. package/src/template-part/edit/index.js +4 -6
  271. package/src/template-part/edit/utils/hooks.js +1 -1
  272. package/src/template-part/index.php +2 -2
  273. package/src/utils/interactivity/directives.js +27 -6
  274. package/src/utils/interactivity/hooks.js +83 -14
  275. package/src/utils/interactivity/portals.js +98 -0
  276. package/build/file/utils.js.map +0 -1
  277. package/build-module/file/utils.js.map +0 -1
  278. /package/src/file/{utils.js → utils/index.js} +0 -0
@@ -0,0 +1,100 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import { createElement, render } from 'preact';
5
+ /**
6
+ * @param {import('../../src/index').RenderableProps<{ context: any }>} props
7
+ */
8
+
9
+ function ContextProvider(props) {
10
+ this.getChildContext = () => props.context;
11
+
12
+ return props.children;
13
+ }
14
+ /**
15
+ * Portal component
16
+ *
17
+ * @this {import('./internal').Component}
18
+ * @param {object | null | undefined} props
19
+ *
20
+ * TODO: use createRoot() instead of fake root
21
+ */
22
+
23
+
24
+ function Portal(props) {
25
+ const _this = this;
26
+
27
+ const container = props._container;
28
+
29
+ _this.componentWillUnmount = function () {
30
+ render(null, _this._temp);
31
+ _this._temp = null;
32
+ _this._container = null;
33
+ }; // When we change container we should clear our old container and
34
+ // indicate a new mount.
35
+
36
+
37
+ if (_this._container && _this._container !== container) {
38
+ _this.componentWillUnmount();
39
+ } // When props.vnode is undefined/false/null we are dealing with some kind of
40
+ // conditional vnode. This should not trigger a render.
41
+
42
+
43
+ if (props._vnode) {
44
+ if (!_this._temp) {
45
+ _this._container = container; // Create a fake DOM parent node that manages a subset of `container`'s children:
46
+
47
+ _this._temp = {
48
+ nodeType: 1,
49
+ parentNode: container,
50
+ childNodes: [],
51
+
52
+ appendChild(child) {
53
+ this.childNodes.push(child);
54
+
55
+ _this._container.appendChild(child);
56
+ },
57
+
58
+ insertBefore(child) {
59
+ this.childNodes.push(child);
60
+
61
+ _this._container.appendChild(child);
62
+ },
63
+
64
+ removeChild(child) {
65
+ this.childNodes.splice( // eslint-disable-next-line no-bitwise
66
+ this.childNodes.indexOf(child) >>> 1, 1);
67
+
68
+ _this._container.removeChild(child);
69
+ }
70
+
71
+ };
72
+ } // Render our wrapping element into temp.
73
+
74
+
75
+ render(createElement(ContextProvider, {
76
+ context: _this.context
77
+ }, props._vnode), _this._temp);
78
+ } // When we come from a conditional render, on a mounted
79
+ // portal we should clear the DOM.
80
+ else if (_this._temp) {
81
+ _this.componentWillUnmount();
82
+ }
83
+ }
84
+ /**
85
+ * Create a `Portal` to continue rendering the vnode tree at a different DOM node
86
+ *
87
+ * @param {import('./internal').VNode} vnode The vnode to render
88
+ * @param {import('./internal').PreactElement} container The DOM node to continue rendering in to.
89
+ */
90
+
91
+
92
+ export function createPortal(vnode, container) {
93
+ const el = createElement(Portal, {
94
+ _vnode: vnode,
95
+ _container: container
96
+ });
97
+ el.containerInfo = container;
98
+ return el;
99
+ }
100
+ //# sourceMappingURL=portals.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/block-library/src/utils/interactivity/portals.js"],"names":["createElement","render","ContextProvider","props","getChildContext","context","children","Portal","_this","container","_container","componentWillUnmount","_temp","_vnode","nodeType","parentNode","childNodes","appendChild","child","push","insertBefore","removeChild","splice","indexOf","createPortal","vnode","el","containerInfo"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,aAAT,EAAwBC,MAAxB,QAAsC,QAAtC;AAEA;AACA;AACA;;AACA,SAASC,eAAT,CAA0BC,KAA1B,EAAkC;AACjC,OAAKC,eAAL,GAAuB,MAAMD,KAAK,CAACE,OAAnC;;AACA,SAAOF,KAAK,CAACG,QAAb;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASC,MAAT,CAAiBJ,KAAjB,EAAyB;AACxB,QAAMK,KAAK,GAAG,IAAd;;AACA,QAAMC,SAAS,GAAGN,KAAK,CAACO,UAAxB;;AAEAF,EAAAA,KAAK,CAACG,oBAAN,GAA6B,YAAY;AACxCV,IAAAA,MAAM,CAAE,IAAF,EAAQO,KAAK,CAACI,KAAd,CAAN;AACAJ,IAAAA,KAAK,CAACI,KAAN,GAAc,IAAd;AACAJ,IAAAA,KAAK,CAACE,UAAN,GAAmB,IAAnB;AACA,GAJD,CAJwB,CAUxB;AACA;;;AACA,MAAKF,KAAK,CAACE,UAAN,IAAoBF,KAAK,CAACE,UAAN,KAAqBD,SAA9C,EAA0D;AACzDD,IAAAA,KAAK,CAACG,oBAAN;AACA,GAduB,CAgBxB;AACA;;;AACA,MAAKR,KAAK,CAACU,MAAX,EAAoB;AACnB,QAAK,CAAEL,KAAK,CAACI,KAAb,EAAqB;AACpBJ,MAAAA,KAAK,CAACE,UAAN,GAAmBD,SAAnB,CADoB,CAGpB;;AACAD,MAAAA,KAAK,CAACI,KAAN,GAAc;AACbE,QAAAA,QAAQ,EAAE,CADG;AAEbC,QAAAA,UAAU,EAAEN,SAFC;AAGbO,QAAAA,UAAU,EAAE,EAHC;;AAIbC,QAAAA,WAAW,CAAEC,KAAF,EAAU;AACpB,eAAKF,UAAL,CAAgBG,IAAhB,CAAsBD,KAAtB;;AACAV,UAAAA,KAAK,CAACE,UAAN,CAAiBO,WAAjB,CAA8BC,KAA9B;AACA,SAPY;;AAQbE,QAAAA,YAAY,CAAEF,KAAF,EAAU;AACrB,eAAKF,UAAL,CAAgBG,IAAhB,CAAsBD,KAAtB;;AACAV,UAAAA,KAAK,CAACE,UAAN,CAAiBO,WAAjB,CAA8BC,KAA9B;AACA,SAXY;;AAYbG,QAAAA,WAAW,CAAEH,KAAF,EAAU;AACpB,eAAKF,UAAL,CAAgBM,MAAhB,EACC;AACA,eAAKN,UAAL,CAAgBO,OAAhB,CAAyBL,KAAzB,MAAqC,CAFtC,EAGC,CAHD;;AAKAV,UAAAA,KAAK,CAACE,UAAN,CAAiBW,WAAjB,CAA8BH,KAA9B;AACA;;AAnBY,OAAd;AAqBA,KA1BkB,CA4BnB;;;AACAjB,IAAAA,MAAM,CACLD,aAAa,CACZE,eADY,EAEZ;AAAEG,MAAAA,OAAO,EAAEG,KAAK,CAACH;AAAjB,KAFY,EAGZF,KAAK,CAACU,MAHM,CADR,EAMLL,KAAK,CAACI,KAND,CAAN;AAQA,GArCD,CAsCA;AACA;AAvCA,OAwCK,IAAKJ,KAAK,CAACI,KAAX,EAAmB;AACvBJ,IAAAA,KAAK,CAACG,oBAAN;AACA;AACD;AAED;AACA;AACA;AACA;AACA;AACA;;;AACA,OAAO,SAASa,YAAT,CAAuBC,KAAvB,EAA8BhB,SAA9B,EAA0C;AAChD,QAAMiB,EAAE,GAAG1B,aAAa,CAAEO,MAAF,EAAU;AACjCM,IAAAA,MAAM,EAAEY,KADyB;AAEjCf,IAAAA,UAAU,EAAED;AAFqB,GAAV,CAAxB;AAIAiB,EAAAA,EAAE,CAACC,aAAH,GAAmBlB,SAAnB;AACA,SAAOiB,EAAP;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport { createElement, render } from 'preact';\n\n/**\n * @param {import('../../src/index').RenderableProps<{ context: any }>} props\n */\nfunction ContextProvider( props ) {\n\tthis.getChildContext = () => props.context;\n\treturn props.children;\n}\n\n/**\n * Portal component\n *\n * @this {import('./internal').Component}\n * @param {object | null | undefined} props\n *\n * TODO: use createRoot() instead of fake root\n */\nfunction Portal( props ) {\n\tconst _this = this;\n\tconst container = props._container;\n\n\t_this.componentWillUnmount = function () {\n\t\trender( null, _this._temp );\n\t\t_this._temp = null;\n\t\t_this._container = null;\n\t};\n\n\t// When we change container we should clear our old container and\n\t// indicate a new mount.\n\tif ( _this._container && _this._container !== container ) {\n\t\t_this.componentWillUnmount();\n\t}\n\n\t// When props.vnode is undefined/false/null we are dealing with some kind of\n\t// conditional vnode. This should not trigger a render.\n\tif ( props._vnode ) {\n\t\tif ( ! _this._temp ) {\n\t\t\t_this._container = container;\n\n\t\t\t// Create a fake DOM parent node that manages a subset of `container`'s children:\n\t\t\t_this._temp = {\n\t\t\t\tnodeType: 1,\n\t\t\t\tparentNode: container,\n\t\t\t\tchildNodes: [],\n\t\t\t\tappendChild( child ) {\n\t\t\t\t\tthis.childNodes.push( child );\n\t\t\t\t\t_this._container.appendChild( child );\n\t\t\t\t},\n\t\t\t\tinsertBefore( child ) {\n\t\t\t\t\tthis.childNodes.push( child );\n\t\t\t\t\t_this._container.appendChild( child );\n\t\t\t\t},\n\t\t\t\tremoveChild( child ) {\n\t\t\t\t\tthis.childNodes.splice(\n\t\t\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\t\t\tthis.childNodes.indexOf( child ) >>> 1,\n\t\t\t\t\t\t1\n\t\t\t\t\t);\n\t\t\t\t\t_this._container.removeChild( child );\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\n\t\t// Render our wrapping element into temp.\n\t\trender(\n\t\t\tcreateElement(\n\t\t\t\tContextProvider,\n\t\t\t\t{ context: _this.context },\n\t\t\t\tprops._vnode\n\t\t\t),\n\t\t\t_this._temp\n\t\t);\n\t}\n\t// When we come from a conditional render, on a mounted\n\t// portal we should clear the DOM.\n\telse if ( _this._temp ) {\n\t\t_this.componentWillUnmount();\n\t}\n}\n\n/**\n * Create a `Portal` to continue rendering the vnode tree at a different DOM node\n *\n * @param {import('./internal').VNode} vnode The vnode to render\n * @param {import('./internal').PreactElement} container The DOM node to continue rendering in to.\n */\nexport function createPortal( vnode, container ) {\n\tconst el = createElement( Portal, {\n\t\t_vnode: vnode,\n\t\t_container: container,\n\t} );\n\tel.containerInfo = container;\n\treturn el;\n}\n"]}
@@ -97,7 +97,7 @@
97
97
  --wp-block-synced-color: #7a00df;
98
98
  --wp-block-synced-color--rgb: 122, 0, 223;
99
99
  }
100
- @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
100
+ @media (min-resolution: 192dpi) {
101
101
  :root {
102
102
  --wp-admin-border-width-focus: 1.5px;
103
103
  }
@@ -97,7 +97,7 @@
97
97
  --wp-block-synced-color: #7a00df;
98
98
  --wp-block-synced-color--rgb: 122, 0, 223;
99
99
  }
100
- @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
100
+ @media (min-resolution: 192dpi) {
101
101
  :root {
102
102
  --wp-admin-border-width-focus: 1.5px;
103
103
  }
@@ -396,8 +396,7 @@
396
396
  height: 100%;
397
397
  max-width: none;
398
398
  max-height: none;
399
- -o-object-fit: cover;
400
- object-fit: cover;
399
+ object-fit: cover;
401
400
  outline: none;
402
401
  border: none;
403
402
  box-shadow: none;
@@ -398,8 +398,7 @@
398
398
  height: 100%;
399
399
  max-width: none;
400
400
  max-height: none;
401
- -o-object-fit: cover;
402
- object-fit: cover;
401
+ object-fit: cover;
403
402
  outline: none;
404
403
  border: none;
405
404
  box-shadow: none;
@@ -644,6 +644,9 @@ html :where(.wp-block-column) {
644
644
  .wp-block-file a {
645
645
  min-width: 1em;
646
646
  }
647
+ .wp-block-file a:not(.wp-block-file__button) {
648
+ display: inline-block;
649
+ }
647
650
  .wp-block-file .wp-block-file__button-richtext-wrapper {
648
651
  display: inline-block;
649
652
  margin-right: 0.75em;
@@ -973,6 +976,35 @@ div[data-type="core/freeform"].is-selected .block-library-classic__toolbar {
973
976
  display: block;
974
977
  }
975
978
 
979
+ @media (min-width: 960px) {
980
+ .block-editor-freeform-modal .components-modal__frame {
981
+ height: 9999rem;
982
+ }
983
+ .block-editor-freeform-modal .components-modal__frame .components-modal__header + div {
984
+ height: 100%;
985
+ }
986
+ .block-editor-freeform-modal .components-modal__frame .mce-tinymce {
987
+ height: calc(100% - 36px - 16px);
988
+ }
989
+ .block-editor-freeform-modal .components-modal__frame .mce-container-body {
990
+ height: 100%;
991
+ display: flex;
992
+ flex-direction: column;
993
+ }
994
+ .block-editor-freeform-modal .components-modal__frame .mce-edit-area {
995
+ flex-grow: 1;
996
+ display: flex;
997
+ flex-direction: column;
998
+ }
999
+ .block-editor-freeform-modal .components-modal__frame .mce-edit-area iframe {
1000
+ flex-grow: 1;
1001
+ height: 10px !important;
1002
+ }
1003
+ }
1004
+ .block-editor-freeform-modal__actions {
1005
+ margin-top: 16px;
1006
+ }
1007
+
976
1008
  figure.wp-block-gallery {
977
1009
  display: block;
978
1010
  }
@@ -1998,6 +2030,42 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
1998
2030
  opacity: 1;
1999
2031
  }
2000
2032
 
2033
+ .wp-block-navigation__menu-inspector-controls {
2034
+ overflow-x: auto;
2035
+ scrollbar-width: thin;
2036
+ scrollbar-gutter: stable both-edges;
2037
+ scrollbar-color: transparent transparent;
2038
+ will-change: transform;
2039
+ }
2040
+ .wp-block-navigation__menu-inspector-controls::-webkit-scrollbar {
2041
+ width: 12px;
2042
+ height: 12px;
2043
+ }
2044
+ .wp-block-navigation__menu-inspector-controls::-webkit-scrollbar-track {
2045
+ background-color: transparent;
2046
+ }
2047
+ .wp-block-navigation__menu-inspector-controls::-webkit-scrollbar-thumb {
2048
+ background-color: transparent;
2049
+ border-radius: 8px;
2050
+ border: 3px solid transparent;
2051
+ background-clip: padding-box;
2052
+ }
2053
+ .wp-block-navigation__menu-inspector-controls:hover::-webkit-scrollbar-thumb, .wp-block-navigation__menu-inspector-controls:focus::-webkit-scrollbar-thumb, .wp-block-navigation__menu-inspector-controls:focus-within::-webkit-scrollbar-thumb {
2054
+ background-color: #949494;
2055
+ }
2056
+ .wp-block-navigation__menu-inspector-controls:hover, .wp-block-navigation__menu-inspector-controls:focus, .wp-block-navigation__menu-inspector-controls:focus-within {
2057
+ scrollbar-color: #949494 transparent;
2058
+ }
2059
+ @media (hover: none) {
2060
+ .wp-block-navigation__menu-inspector-controls {
2061
+ scrollbar-color: #949494 transparent;
2062
+ }
2063
+ }
2064
+
2065
+ .wp-block-navigation__menu-inspector-controls__empty-message {
2066
+ margin-right: 24px;
2067
+ }
2068
+
2001
2069
  /**
2002
2070
  * Appender
2003
2071
  */
@@ -648,6 +648,9 @@ html :where(.wp-block-column) {
648
648
  .wp-block-file a {
649
649
  min-width: 1em;
650
650
  }
651
+ .wp-block-file a:not(.wp-block-file__button) {
652
+ display: inline-block;
653
+ }
651
654
  .wp-block-file .wp-block-file__button-richtext-wrapper {
652
655
  display: inline-block;
653
656
  margin-left: 0.75em;
@@ -981,6 +984,35 @@ div[data-type="core/freeform"].is-selected .block-library-classic__toolbar {
981
984
  display: block;
982
985
  }
983
986
 
987
+ @media (min-width: 960px) {
988
+ .block-editor-freeform-modal .components-modal__frame {
989
+ height: 9999rem;
990
+ }
991
+ .block-editor-freeform-modal .components-modal__frame .components-modal__header + div {
992
+ height: 100%;
993
+ }
994
+ .block-editor-freeform-modal .components-modal__frame .mce-tinymce {
995
+ height: calc(100% - 36px - 16px);
996
+ }
997
+ .block-editor-freeform-modal .components-modal__frame .mce-container-body {
998
+ height: 100%;
999
+ display: flex;
1000
+ flex-direction: column;
1001
+ }
1002
+ .block-editor-freeform-modal .components-modal__frame .mce-edit-area {
1003
+ flex-grow: 1;
1004
+ display: flex;
1005
+ flex-direction: column;
1006
+ }
1007
+ .block-editor-freeform-modal .components-modal__frame .mce-edit-area iframe {
1008
+ flex-grow: 1;
1009
+ height: 10px !important;
1010
+ }
1011
+ }
1012
+ .block-editor-freeform-modal__actions {
1013
+ margin-top: 16px;
1014
+ }
1015
+
984
1016
  figure.wp-block-gallery {
985
1017
  display: block;
986
1018
  }
@@ -2006,6 +2038,42 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
2006
2038
  opacity: 1;
2007
2039
  }
2008
2040
 
2041
+ .wp-block-navigation__menu-inspector-controls {
2042
+ overflow-x: auto;
2043
+ scrollbar-width: thin;
2044
+ scrollbar-gutter: stable both-edges;
2045
+ scrollbar-color: transparent transparent;
2046
+ will-change: transform;
2047
+ }
2048
+ .wp-block-navigation__menu-inspector-controls::-webkit-scrollbar {
2049
+ width: 12px;
2050
+ height: 12px;
2051
+ }
2052
+ .wp-block-navigation__menu-inspector-controls::-webkit-scrollbar-track {
2053
+ background-color: transparent;
2054
+ }
2055
+ .wp-block-navigation__menu-inspector-controls::-webkit-scrollbar-thumb {
2056
+ background-color: transparent;
2057
+ border-radius: 8px;
2058
+ border: 3px solid transparent;
2059
+ background-clip: padding-box;
2060
+ }
2061
+ .wp-block-navigation__menu-inspector-controls:hover::-webkit-scrollbar-thumb, .wp-block-navigation__menu-inspector-controls:focus::-webkit-scrollbar-thumb, .wp-block-navigation__menu-inspector-controls:focus-within::-webkit-scrollbar-thumb {
2062
+ background-color: #949494;
2063
+ }
2064
+ .wp-block-navigation__menu-inspector-controls:hover, .wp-block-navigation__menu-inspector-controls:focus, .wp-block-navigation__menu-inspector-controls:focus-within {
2065
+ scrollbar-color: #949494 transparent;
2066
+ }
2067
+ @media (hover: none) {
2068
+ .wp-block-navigation__menu-inspector-controls {
2069
+ scrollbar-color: #949494 transparent;
2070
+ }
2071
+ }
2072
+
2073
+ .wp-block-navigation__menu-inspector-controls__empty-message {
2074
+ margin-left: 24px;
2075
+ }
2076
+
2009
2077
  /**
2010
2078
  * Appender
2011
2079
  */
@@ -117,6 +117,9 @@
117
117
  .wp-block-file a {
118
118
  min-width: 1em;
119
119
  }
120
+ .wp-block-file a:not(.wp-block-file__button) {
121
+ display: inline-block;
122
+ }
120
123
  .wp-block-file .wp-block-file__button-richtext-wrapper {
121
124
  display: inline-block;
122
125
  margin-right: 0.75em;
@@ -117,6 +117,9 @@
117
117
  .wp-block-file a {
118
118
  min-width: 1em;
119
119
  }
120
+ .wp-block-file a:not(.wp-block-file__button) {
121
+ display: inline-block;
122
+ }
120
123
  .wp-block-file .wp-block-file__button-richtext-wrapper {
121
124
  display: inline-block;
122
125
  margin-left: 0.75em;
@@ -408,4 +408,33 @@ div[data-type="core/freeform"].is-selected .block-library-classic__toolbar {
408
408
  }
409
409
  .block-library-classic__toolbar.has-advanced-toolbar .mce-toolbar-grp .mce-toolbar {
410
410
  display: block;
411
+ }
412
+
413
+ @media (min-width: 960px) {
414
+ .block-editor-freeform-modal .components-modal__frame {
415
+ height: 9999rem;
416
+ }
417
+ .block-editor-freeform-modal .components-modal__frame .components-modal__header + div {
418
+ height: 100%;
419
+ }
420
+ .block-editor-freeform-modal .components-modal__frame .mce-tinymce {
421
+ height: calc(100% - 36px - 16px);
422
+ }
423
+ .block-editor-freeform-modal .components-modal__frame .mce-container-body {
424
+ height: 100%;
425
+ display: flex;
426
+ flex-direction: column;
427
+ }
428
+ .block-editor-freeform-modal .components-modal__frame .mce-edit-area {
429
+ flex-grow: 1;
430
+ display: flex;
431
+ flex-direction: column;
432
+ }
433
+ .block-editor-freeform-modal .components-modal__frame .mce-edit-area iframe {
434
+ flex-grow: 1;
435
+ height: 10px !important;
436
+ }
437
+ }
438
+ .block-editor-freeform-modal__actions {
439
+ margin-top: 16px;
411
440
  }
@@ -412,4 +412,33 @@ div[data-type="core/freeform"].is-selected .block-library-classic__toolbar {
412
412
  }
413
413
  .block-library-classic__toolbar.has-advanced-toolbar .mce-toolbar-grp .mce-toolbar {
414
414
  display: block;
415
+ }
416
+
417
+ @media (min-width: 960px) {
418
+ .block-editor-freeform-modal .components-modal__frame {
419
+ height: 9999rem;
420
+ }
421
+ .block-editor-freeform-modal .components-modal__frame .components-modal__header + div {
422
+ height: 100%;
423
+ }
424
+ .block-editor-freeform-modal .components-modal__frame .mce-tinymce {
425
+ height: calc(100% - 36px - 16px);
426
+ }
427
+ .block-editor-freeform-modal .components-modal__frame .mce-container-body {
428
+ height: 100%;
429
+ display: flex;
430
+ flex-direction: column;
431
+ }
432
+ .block-editor-freeform-modal .components-modal__frame .mce-edit-area {
433
+ flex-grow: 1;
434
+ display: flex;
435
+ flex-direction: column;
436
+ }
437
+ .block-editor-freeform-modal .components-modal__frame .mce-edit-area iframe {
438
+ flex-grow: 1;
439
+ height: 10px !important;
440
+ }
441
+ }
442
+ .block-editor-freeform-modal__actions {
443
+ margin-top: 16px;
415
444
  }
@@ -169,8 +169,7 @@
169
169
  width: 100%;
170
170
  height: 100%;
171
171
  flex: 1;
172
- -o-object-fit: cover;
173
- object-fit: cover;
172
+ object-fit: cover;
174
173
  }
175
174
  .wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-image, .wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-item,
176
175
  .blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-image,
@@ -364,8 +363,7 @@ figure.wp-block-gallery.has-nested-images {
364
363
  width: 100%;
365
364
  flex: 1 0 0%;
366
365
  height: 100%;
367
- -o-object-fit: cover;
368
- object-fit: cover;
366
+ object-fit: cover;
369
367
  }
370
368
  .wp-block-gallery.has-nested-images.columns-1 figure.wp-block-image:not(#individual-image) {
371
369
  width: 100%;
@@ -169,8 +169,7 @@
169
169
  width: 100%;
170
170
  height: 100%;
171
171
  flex: 1;
172
- -o-object-fit: cover;
173
- object-fit: cover;
172
+ object-fit: cover;
174
173
  }
175
174
  .wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-image, .wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-item,
176
175
  .blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-image,
@@ -364,8 +363,7 @@ figure.wp-block-gallery.has-nested-images {
364
363
  width: 100%;
365
364
  flex: 1 0 0%;
366
365
  height: 100%;
367
- -o-object-fit: cover;
368
- object-fit: cover;
366
+ object-fit: cover;
369
367
  }
370
368
  .wp-block-gallery.has-nested-images.columns-1 figure.wp-block-image:not(#individual-image) {
371
369
  width: 100%;
@@ -197,4 +197,102 @@
197
197
 
198
198
  .wp-block-image figure {
199
199
  margin: 0;
200
+ }
201
+
202
+ .wp-lightbox-container .img-container {
203
+ position: relative;
204
+ }
205
+ .wp-lightbox-container button {
206
+ border: none;
207
+ background: none;
208
+ cursor: zoom-in;
209
+ width: 100%;
210
+ height: 100%;
211
+ position: absolute;
212
+ z-index: 100;
213
+ }
214
+ .wp-lightbox-container button:focus-visible {
215
+ outline: 5px auto #212121;
216
+ outline: 5px auto -webkit-focus-ring-color;
217
+ outline-offset: 5px;
218
+ }
219
+
220
+ .wp-lightbox-overlay {
221
+ position: fixed;
222
+ top: 0;
223
+ right: 0;
224
+ z-index: 100000;
225
+ overflow: hidden;
226
+ width: 100vw;
227
+ height: 100vh;
228
+ visibility: hidden;
229
+ }
230
+ .wp-lightbox-overlay .close-button {
231
+ font-size: 40px;
232
+ position: absolute;
233
+ top: 20px;
234
+ left: 20px;
235
+ cursor: pointer;
236
+ z-index: 5000000;
237
+ }
238
+ .wp-lightbox-overlay .wp-block-image {
239
+ display: flex;
240
+ justify-content: center;
241
+ align-items: center;
242
+ width: 100%;
243
+ height: 100%;
244
+ z-index: 3000000;
245
+ position: absolute;
246
+ flex-direction: column;
247
+ }
248
+ .wp-lightbox-overlay button {
249
+ border: none;
250
+ background: none;
251
+ }
252
+ .wp-lightbox-overlay .scrim {
253
+ width: 100%;
254
+ height: 100%;
255
+ position: absolute;
256
+ z-index: 2000000;
257
+ background-color: white;
258
+ opacity: 0.9;
259
+ }
260
+ .wp-lightbox-overlay.initialized {
261
+ animation: both turn-off-visibility 300ms;
262
+ }
263
+ .wp-lightbox-overlay.initialized img {
264
+ animation: both turn-off-visibility 250ms;
265
+ }
266
+ .wp-lightbox-overlay.initialized.active {
267
+ visibility: visible;
268
+ animation: both turn-on-visibility 250ms;
269
+ }
270
+ .wp-lightbox-overlay.initialized.active img {
271
+ animation: both turn-on-visibility 300ms;
272
+ }
273
+
274
+ @keyframes turn-on-visibility {
275
+ 0% {
276
+ opacity: 0;
277
+ }
278
+ 100% {
279
+ opacity: 1;
280
+ }
281
+ }
282
+ @keyframes turn-off-visibility {
283
+ 0% {
284
+ opacity: 1;
285
+ visibility: visible;
286
+ }
287
+ 99% {
288
+ opacity: 0;
289
+ visibility: visible;
290
+ }
291
+ 100% {
292
+ opacity: 0;
293
+ visibility: hidden;
294
+ }
295
+ }
296
+ html.has-lightbox-open {
297
+ overflow: hidden;
200
298
  }
@@ -203,4 +203,102 @@
203
203
 
204
204
  .wp-block-image figure {
205
205
  margin: 0;
206
+ }
207
+
208
+ .wp-lightbox-container .img-container {
209
+ position: relative;
210
+ }
211
+ .wp-lightbox-container button {
212
+ border: none;
213
+ background: none;
214
+ cursor: zoom-in;
215
+ width: 100%;
216
+ height: 100%;
217
+ position: absolute;
218
+ z-index: 100;
219
+ }
220
+ .wp-lightbox-container button:focus-visible {
221
+ outline: 5px auto #212121;
222
+ outline: 5px auto -webkit-focus-ring-color;
223
+ outline-offset: 5px;
224
+ }
225
+
226
+ .wp-lightbox-overlay {
227
+ position: fixed;
228
+ top: 0;
229
+ left: 0;
230
+ z-index: 100000;
231
+ overflow: hidden;
232
+ width: 100vw;
233
+ height: 100vh;
234
+ visibility: hidden;
235
+ }
236
+ .wp-lightbox-overlay .close-button {
237
+ font-size: 40px;
238
+ position: absolute;
239
+ top: 20px;
240
+ right: 20px;
241
+ cursor: pointer;
242
+ z-index: 5000000;
243
+ }
244
+ .wp-lightbox-overlay .wp-block-image {
245
+ display: flex;
246
+ justify-content: center;
247
+ align-items: center;
248
+ width: 100%;
249
+ height: 100%;
250
+ z-index: 3000000;
251
+ position: absolute;
252
+ flex-direction: column;
253
+ }
254
+ .wp-lightbox-overlay button {
255
+ border: none;
256
+ background: none;
257
+ }
258
+ .wp-lightbox-overlay .scrim {
259
+ width: 100%;
260
+ height: 100%;
261
+ position: absolute;
262
+ z-index: 2000000;
263
+ background-color: white;
264
+ opacity: 0.9;
265
+ }
266
+ .wp-lightbox-overlay.initialized {
267
+ animation: both turn-off-visibility 300ms;
268
+ }
269
+ .wp-lightbox-overlay.initialized img {
270
+ animation: both turn-off-visibility 250ms;
271
+ }
272
+ .wp-lightbox-overlay.initialized.active {
273
+ visibility: visible;
274
+ animation: both turn-on-visibility 250ms;
275
+ }
276
+ .wp-lightbox-overlay.initialized.active img {
277
+ animation: both turn-on-visibility 300ms;
278
+ }
279
+
280
+ @keyframes turn-on-visibility {
281
+ 0% {
282
+ opacity: 0;
283
+ }
284
+ 100% {
285
+ opacity: 1;
286
+ }
287
+ }
288
+ @keyframes turn-off-visibility {
289
+ 0% {
290
+ opacity: 1;
291
+ visibility: visible;
292
+ }
293
+ 99% {
294
+ opacity: 0;
295
+ visibility: visible;
296
+ }
297
+ 100% {
298
+ opacity: 0;
299
+ visibility: hidden;
300
+ }
301
+ }
302
+ html.has-lightbox-open {
303
+ overflow: hidden;
206
304
  }