Prepare v2.0.0 release

This commit is contained in:
2026-07-28 22:20:40 +01:00
parent de1469c29d
commit c643d2fb07
64 changed files with 809 additions and 1391 deletions
+7 -4
View File
@@ -61,7 +61,7 @@ function substituteApiVariables(html, item) {
function getApiPreviewFallback(item) {
if (!item || typeof item !== 'object') {
return '<div class="template-region-placeholder">API item</div>';
return '';
}
var title = String(item.title || item.name || '').trim();
@@ -74,7 +74,7 @@ function getApiPreviewFallback(item) {
summary.push('<div>' + sanitizeRichText(description) + '</div>');
}
if (!summary.length) {
return '<div class="template-region-placeholder">API item</div>';
return '';
}
return summary.join('');
}
@@ -92,6 +92,9 @@ function renderApiRegion(region, regionContent) {
body = getApiPreviewFallback(item);
}
var contentStyle = 'width:' + region.pixelWidth + 'px;height:' + region.pixelHeight + 'px;transform:scale(' + region.canvasScale + ');transform-origin:top left;' + (fontFamily ? 'font-family:' + escapeHtml(fontFamily) + ';' : '') + 'font-size:' + fontSize + 'px;color:' + escapeHtml(fontColor) + ';';
var renderedBody = body ? renderEditorJsContent(body) : '<div class="template-region-placeholder">API item</div>';
return '<div class="template-region api" style="' + region.baseStyle + '"><div class="template-region-text-scale" style="' + contentStyle + '">' + renderedBody + '</div></div>';
if (!body) {
return '';
}
var renderedBody = renderEditorJsContent(body);
return renderedBody ? '<div class="template-region api" style="' + region.baseStyle + '"><div class="template-region-text-scale" style="' + contentStyle + '">' + renderedBody + '</div></div>' : '';
}