eddev 0.3.11 → 0.3.12
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.
|
@@ -41,16 +41,31 @@ var useObservable_1 = require("../utils/useObservable");
|
|
|
41
41
|
var BlockContext = (0, react_1.createContext)(undefined);
|
|
42
42
|
// Store the block manifest as a local variable
|
|
43
43
|
var blocksManifest = new Observable_1.Observable(blocks_1.default);
|
|
44
|
+
function listenForHandleResize() {
|
|
45
|
+
var interval = setInterval(function () {
|
|
46
|
+
var viewportTarget = document.querySelector(".interface-interface-skeleton__content");
|
|
47
|
+
if (viewportTarget) {
|
|
48
|
+
var updateSize = function () {
|
|
49
|
+
document.documentElement.style.setProperty("--vw100", viewportTarget.clientWidth + "px");
|
|
50
|
+
};
|
|
51
|
+
var ro = new ResizeObserver(updateSize);
|
|
52
|
+
ro.observe(viewportTarget);
|
|
53
|
+
clearInterval(interval);
|
|
54
|
+
console.log("Got it");
|
|
55
|
+
}
|
|
56
|
+
}, 100);
|
|
57
|
+
}
|
|
44
58
|
function installEDGutenbergHooks() {
|
|
45
59
|
// Skip this if we're not in the block editor
|
|
46
60
|
// @ts-ignore
|
|
47
61
|
if (!window.wp.blockEditor)
|
|
48
62
|
return;
|
|
63
|
+
listenForHandleResize();
|
|
49
64
|
(0, react_2.globalCss)({
|
|
50
65
|
".edit-post-visual-editor__post-title-wrapper": {
|
|
51
66
|
width: "var(--grid-inner-width)",
|
|
52
|
-
marginLeft: "
|
|
53
|
-
marginRight: "
|
|
67
|
+
marginLeft: "20px",
|
|
68
|
+
marginRight: "20px",
|
|
54
69
|
},
|
|
55
70
|
".block-editor-block-list__block:hover": {
|
|
56
71
|
outline: "1px solid #e1e1e1",
|