PluginProbe
Gutenberg / 24.1.0
Gutenberg v24.1.0
24.1.0 24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 All 404 releases
← All changes | build/scripts/viewport/index.js +5 -3 23.1.0 → 24.1.0 View file →
@@ -1,4 +1,5 @@
1 +(function() {
1 2 "use strict";
2 3 var wp;
3 4 (wp ||= {}).viewport = (() => {
4 5 var __create = Object.create;
@@ -128,9 +129,9 @@
128 129 ([name, width]) => {
129 130 return operatorEntries.map(
130 131 ([operator, condition]) => {
131 132 const list = window.matchMedia(
132 - `(${condition}: ${width}px)`
133 + `screen and (${condition}: ${width}px)`
133 134 );
134 135 list.addEventListener("change", setIsMatching2);
135 136 return [`${operator} ${name}`, list];
136 137 }
@@ -172,9 +173,9 @@
172 173 })
173 174 );
174 175 return (0, import_compose2.createHigherOrderComponent)(
175 176 (WrappedComponent) => {
176 - const WrappedWithViewport = (props) => {
177 + return function WithViewportMatch(props) {
177 178 const queriesResult = useViewPortQueriesResult();
178 179 return (0, import_element.createElement)(WrappedComponent, {
179 180 ...props,
180 181 ...queriesResult
@@ -179,9 +180,8 @@
179 180 ...props,
180 181 ...queriesResult
181 182 });
182 183 };
183 - return (0, import_compose2.pure)(WrappedWithViewport);
184 184 },
185 185 "withViewportMatch"
186 186 );
187 187 };
@@ -215,6 +215,8 @@
215 215 ">=": "min-width"
216 216 };
217 217 listener_default(BREAKPOINTS, OPERATORS);
218 218 return __toCommonJS(index_exports);
219 +})();
220 +(window.wp ||= {}).viewport = wp.viewport;
219 221 })();
220 222 //# sourceMappingURL=index.js.map