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/url-encoder/index.js +14 -3 2.0.9 → 2.0.14 View file →
@@ -13,11 +13,22 @@
13 13 var TextControl = wp.components.TextControl;
14 14 var TextareaControl = wp.components.TextareaControl;
15 15 var ToggleControl = wp.components.ToggleControl;
16 16
17 - var _tc, _tvf;
18 - Object.defineProperty(window, '_tc', { get: function () { return _tc || (_tc = window.bkbgTypographyControl); } });
19 - Object.defineProperty(window, '_tvf', { get: function () { return _tvf || (_tvf = window.bkbgTypoCssVars); } });
17 + // Resolve the shared components lazily without defining globals for each block.
18 + function _tc(label, key, attrs, setA) {
19 + var Control = window.bkbgTypographyControl;
20 + return Control ? el(Control, {
21 + label: label,
22 + value: attrs[key] || {},
23 + onChange: function (value) { var update = {}; update[key] = value; setA(update); }
24 + }) : null;
25 + }
26 + function _tvf(vars, key, attrs, prefix) {
27 + var cssVars = window.bkbgTypoCssVars;
28 + if (cssVars) Object.assign(vars, cssVars(attrs[key] || {}, prefix));
29 + return vars;
30 + }
20 31 function getTypoControl(label, key, attrs, setA) { return _tc(label, key, attrs, setA); }
21 32 function getTypoCssVars(attrs) {
22 33 var v = {};
23 34 _tvf(v, 'titleTypo', attrs, '--bkue-tt-');