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/tutorial-card/index.js +13 -3 2.0.8 → 2.0.14 View file →
@@ -12,11 +12,21 @@
12 12 var TextControl = wp.components.TextControl;
13 13 var TextareaControl = wp.components.TextareaControl;
14 14 var Button = wp.components.Button;
15 15
16 - var _tc, _tvf;
17 - Object.defineProperty(window, '_tc', { get: function () { return _tc || (_tc = window.bkbgTypographyControl); } });
18 - Object.defineProperty(window, '_tvf', { get: function () { return _tvf || (_tvf = window.bkbgTypoCssVars); } });
16 + // Resolve the shared components lazily without defining globals for each block.
17 + function _tc(props, key, label) {
18 + var Control = window.bkbgTypographyControl;
19 + return Control ? el(Control, {
20 + label: label,
21 + value: props.attributes[key] || {},
22 + onChange: function (value) { var update = {}; update[key] = value; props.setAttributes(update); }
23 + }) : null;
24 + }
25 + function _tvf(typo, prefix) {
26 + var cssVars = window.bkbgTypoCssVars;
27 + return cssVars ? cssVars(typo || {}, prefix) : {};
28 + }
19 29 function getTypoControl(p, key, label) { return _tc ? _tc(p, key, label) : null; }
20 30 function getTypoCssVars(a) {
21 31 if (!_tvf) return {};
22 32 var v = {};