PluginProbe
Blockenberg — 600+ Advanced Gutenberg Blocks & AI Agent for WordPress Block Editor / 2.0.14
Blockenberg — 600+ Advanced Gutenberg Blocks & AI Agent for WordPress Block Editor v2.0.14
2.0.14 2.0.13 2.0.12 2.0.11 2.0.10 2.0.9 trunk 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8
← All changes | blocks/weather-widget/index.js +14 -3 2.0.11 → 2.0.14 View file →
@@ -11,11 +11,22 @@
11 11 var ToggleControl = wp.components.ToggleControl;
12 12 var RangeControl = wp.components.RangeControl;
13 13 var SelectControl = wp.components.SelectControl;
14 14
15 - var _tc, _tvf;
16 - Object.defineProperty(window, '_tc', { get: function () { return _tc || (_tc = window.bkbgTypographyControl); } });
17 - Object.defineProperty(window, '_tvf', { get: function () { return _tvf || (_tvf = window.bkbgTypoCssVars); } });
15 + // Resolve the shared components lazily without defining globals for each block.
16 + function _tc(label, key, attrs, setA) {
17 + var Control = window.bkbgTypographyControl;
18 + return Control ? el(Control, {
19 + label: label,
20 + value: attrs[key] || {},
21 + onChange: function (value) { var update = {}; update[key] = value; setA(update); }
22 + }) : null;
23 + }
24 + function _tvf(vars, key, attrs, prefix) {
25 + var cssVars = window.bkbgTypoCssVars;
26 + if (cssVars) Object.assign(vars, cssVars(attrs[key] || {}, prefix));
27 + return vars;
28 + }
18 29 function getTypoControl(label, key, attrs, setA) { return _tc(label, key, attrs, setA); }
19 30 function getTypoCssVars(attrs) {
20 31 var v = {};
21 32 _tvf(v, 'tempTypo', attrs, '--bkww-tp-');