bunnyquery 1.10.1 → 1.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bunnyquery.css +20 -0
- package/bunnyquery.js +6 -6
- package/dist/engine.cjs +4 -3
- package/dist/engine.cjs.map +1 -1
- package/dist/engine.mjs +4 -3
- package/dist/engine.mjs.map +1 -1
- package/package.json +1 -1
- package/src/engine/link_markup.ts +11 -4
- package/styles/chat.css +20 -0
package/dist/engine.mjs
CHANGED
|
@@ -1396,7 +1396,8 @@ function renderInlineLinkHtml(link, opts) {
|
|
|
1396
1396
|
if (refreshing) cls.push("is-refreshing");
|
|
1397
1397
|
if (unavailable) cls.push("is-unavailable");
|
|
1398
1398
|
if (preview) cls.push("is-image-preview");
|
|
1399
|
-
var
|
|
1399
|
+
var glyphHtml = '<span class="bq-link-glyph" translate="no">' + (unavailable ? INLINE_LINK_UNAVAILABLE_GLYPH : INLINE_LINK_GLYPH) + "</span>";
|
|
1400
|
+
var labelHtml = glyphHtml + escapeInlineHtml(link.label + (unavailable ? INLINE_LINK_UNAVAILABLE_SUFFIX : refreshing ? " (fetching...)" : ""));
|
|
1400
1401
|
var attrs = ['class="' + cls.join(" ") + '"'];
|
|
1401
1402
|
if (unavailable) attrs.push('aria-disabled="true"', 'data-bq-unavailable="1"');
|
|
1402
1403
|
else attrs.push('href="' + escapeInlineHtml(link.href) + '"', 'target="_blank"', 'rel="noopener noreferrer"');
|
|
@@ -1407,8 +1408,8 @@ function renderInlineLinkHtml(link, opts) {
|
|
|
1407
1408
|
if (link.expiredHref) attrs.push('data-bq-expired-href="' + escapeInlineHtml(link.expiredHref) + '"');
|
|
1408
1409
|
if (link.remotePath) attrs.push('data-bq-remote-path="' + escapeInlineHtml(link.remotePath) + '"');
|
|
1409
1410
|
if (link.fullLabel) attrs.push('data-bq-full-label="' + escapeInlineHtml(link.fullLabel) + '"');
|
|
1410
|
-
if (!preview) return "<a " + attrs.join(" ") + ">" +
|
|
1411
|
-
return "<a " + attrs.join(" ") + '><img class="bq-img-preview" alt="' + escapeInlineHtml(full) + '" data-bq-img-path="' + escapeInlineHtml(link.remotePath || "") + '" data-bq-img-type="' + escapeInlineHtml(link.image ? link.image.contentType : "") + '" decoding="async"><span class="bq-loader" data-bq-img-loader="1"></span><span class="bq-img-preview-caption" translate="no">' +
|
|
1411
|
+
if (!preview) return "<a " + attrs.join(" ") + ">" + labelHtml + "</a>";
|
|
1412
|
+
return "<a " + attrs.join(" ") + '><img class="bq-img-preview" alt="' + escapeInlineHtml(full) + '" data-bq-img-path="' + escapeInlineHtml(link.remotePath || "") + '" data-bq-img-type="' + escapeInlineHtml(link.image ? link.image.contentType : "") + '" decoding="async"><span class="bq-loader" data-bq-img-loader="1"></span><span class="bq-img-preview-caption" translate="no">' + labelHtml + "</span></a>";
|
|
1412
1413
|
}
|
|
1413
1414
|
|
|
1414
1415
|
// src/engine/image_preview.ts
|