markstream-vue2 0.0.28 → 0.0.30

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/dist/index.js CHANGED
@@ -51,7 +51,7 @@ var __async = (__this, __arguments, generator) => {
51
51
  });
52
52
  };
53
53
  var _a;
54
- import { getMarkdown, parseMarkdownToStructure, setDefaultMathOptions } from "stream-markdown-parser";
54
+ import { EXTENDED_STANDARD_HTML_TAGS, VOID_HTML_TAGS, BLOCKED_HTML_TAGS, DANGEROUS_HTML_ATTRS, URL_HTML_ATTRS, isUnsafeHtmlUrl, getMarkdown, parseMarkdownToStructure, setDefaultMathOptions } from "stream-markdown-parser";
55
55
  export * from "stream-markdown-parser";
56
56
  import { KATEX_COMMANDS, normalizeStandaloneBackslashT, setDefaultMathOptions as setDefaultMathOptions2 } from "stream-markdown-parser";
57
57
  import * as VueModule from "vue-demi";
@@ -129,7 +129,7 @@ function resolveVueListeners(input) {
129
129
  }
130
130
  return listeners;
131
131
  }
132
- const _sfc_main$J = /* @__PURE__ */ defineComponent({
132
+ const _sfc_main$K = /* @__PURE__ */ defineComponent({
133
133
  __name: "CheckboxNode",
134
134
  props: {
135
135
  node: null
@@ -139,10 +139,10 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
139
139
  }
140
140
  });
141
141
  const CheckboxNode_vue_vue_type_style_index_0_scoped_8dc6c46f_lang = "";
142
- function normalizeComponent(scriptExports, render46, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
142
+ function normalizeComponent(scriptExports, render47, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
143
143
  var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
144
- if (render46) {
145
- options.render = render46;
144
+ if (render47) {
145
+ options.render = render47;
146
146
  options.staticRenderFns = staticRenderFns;
147
147
  options._compiled = true;
148
148
  }
@@ -195,24 +195,24 @@ function normalizeComponent(scriptExports, render46, staticRenderFns, functional
195
195
  options
196
196
  };
197
197
  }
198
- var _sfc_render$J = function render() {
198
+ var _sfc_render$K = function render() {
199
199
  var _vm = this, _c = _vm._self._c;
200
200
  _vm._self._setupProxy;
201
201
  return _c("span", { staticClass: "checkbox-node" }, [_c("input", { staticClass: "checkbox-input", attrs: { "type": "checkbox", "disabled": "" }, domProps: { "checked": _vm.node.checked } })]);
202
202
  };
203
- var _sfc_staticRenderFns$J = [];
204
- var __component__$J = /* @__PURE__ */ normalizeComponent(
205
- _sfc_main$J,
206
- _sfc_render$J,
207
- _sfc_staticRenderFns$J,
203
+ var _sfc_staticRenderFns$K = [];
204
+ var __component__$K = /* @__PURE__ */ normalizeComponent(
205
+ _sfc_main$K,
206
+ _sfc_render$K,
207
+ _sfc_staticRenderFns$K,
208
208
  false,
209
209
  null,
210
210
  "8dc6c46f",
211
211
  null,
212
212
  null
213
213
  );
214
- const CheckboxNode = __component__$J.exports;
215
- const _sfc_main$I = /* @__PURE__ */ defineComponent({
214
+ const CheckboxNode = __component__$K.exports;
215
+ const _sfc_main$J = /* @__PURE__ */ defineComponent({
216
216
  __name: "DefinitionListNode",
217
217
  props: {
218
218
  node: null,
@@ -248,7 +248,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
248
248
  }
249
249
  });
250
250
  const DefinitionListNode_vue_vue_type_style_index_0_scoped_b089ea12_lang = "";
251
- var _sfc_render$I = function render2() {
251
+ var _sfc_render$J = function render2() {
252
252
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
253
253
  return _c("dl", { staticClass: "definition-list" }, _vm._l(_setup.definitionEntries, function(entry) {
254
254
  return _c(entry.tag, { key: entry.key, tag: "component", class: entry.className }, [_c(_setup.nestedRenderer, { tag: "component", attrs: { "index-key": entry.key, "nodes": entry.nodes, "custom-id": _setup.props.customId, "typewriter": _setup.props.typewriter }, on: { "copy": function($event) {
@@ -256,19 +256,19 @@ var _sfc_render$I = function render2() {
256
256
  } } })], 1);
257
257
  }), 1);
258
258
  };
259
- var _sfc_staticRenderFns$I = [];
260
- var __component__$I = /* @__PURE__ */ normalizeComponent(
261
- _sfc_main$I,
262
- _sfc_render$I,
263
- _sfc_staticRenderFns$I,
259
+ var _sfc_staticRenderFns$J = [];
260
+ var __component__$J = /* @__PURE__ */ normalizeComponent(
261
+ _sfc_main$J,
262
+ _sfc_render$J,
263
+ _sfc_staticRenderFns$J,
264
264
  false,
265
265
  null,
266
266
  "b089ea12",
267
267
  null,
268
268
  null
269
269
  );
270
- const DefinitionListNode = __component__$I.exports;
271
- const _sfc_main$H = /* @__PURE__ */ defineComponent({
270
+ const DefinitionListNode = __component__$J.exports;
271
+ const _sfc_main$I = /* @__PURE__ */ defineComponent({
272
272
  __name: "EmojiNode",
273
273
  props: {
274
274
  node: null
@@ -278,23 +278,23 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
278
278
  }
279
279
  });
280
280
  const EmojiNode_vue_vue_type_style_index_0_scoped_de55dc97_lang = "";
281
- var _sfc_render$H = function render3() {
281
+ var _sfc_render$I = function render3() {
282
282
  var _vm = this, _c = _vm._self._c;
283
283
  _vm._self._setupProxy;
284
284
  return _c("span", { staticClass: "emoji-node" }, [_vm._v(_vm._s(_vm.node.name))]);
285
285
  };
286
- var _sfc_staticRenderFns$H = [];
287
- var __component__$H = /* @__PURE__ */ normalizeComponent(
288
- _sfc_main$H,
289
- _sfc_render$H,
290
- _sfc_staticRenderFns$H,
286
+ var _sfc_staticRenderFns$I = [];
287
+ var __component__$I = /* @__PURE__ */ normalizeComponent(
288
+ _sfc_main$I,
289
+ _sfc_render$I,
290
+ _sfc_staticRenderFns$I,
291
291
  false,
292
292
  null,
293
293
  "de55dc97",
294
294
  null,
295
295
  null
296
296
  );
297
- const EmojiNode = __component__$H.exports;
297
+ const EmojiNode = __component__$I.exports;
298
298
  const GLOBAL_KEY = "__global__";
299
299
  const STORE_KEY = "__MARKSTREAM_VUE2_CUSTOM_COMPONENTS_STORE__";
300
300
  const store = (() => {
@@ -339,7 +339,7 @@ function clearGlobalCustomComponents() {
339
339
  delete store.scopedCustomComponents[GLOBAL_KEY];
340
340
  customComponentsRevision.value++;
341
341
  }
342
- const _sfc_main$G = /* @__PURE__ */ defineComponent({
342
+ const _sfc_main$H = /* @__PURE__ */ defineComponent({
343
343
  __name: "FootnoteReferenceNode",
344
344
  props: {
345
345
  node: null
@@ -362,22 +362,22 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
362
362
  }
363
363
  });
364
364
  const FootnoteReferenceNode_vue_vue_type_style_index_0_scoped_01af0fee_lang = "";
365
- var _sfc_render$G = function render4() {
365
+ var _sfc_render$H = function render4() {
366
366
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
367
367
  return _c("sup", { staticClass: "footnote-reference", attrs: { "id": `fnref-${_vm.node.id}` }, on: { "click": _setup.handleScroll } }, [_c("span", { staticClass: "footnote-link cursor-pointer", attrs: { "href": _setup.href, "title": `查看脚注 ${_vm.node.id}` } }, [_vm._v("[" + _vm._s(_vm.node.id) + "]")])]);
368
368
  };
369
- var _sfc_staticRenderFns$G = [];
370
- var __component__$G = /* @__PURE__ */ normalizeComponent(
371
- _sfc_main$G,
372
- _sfc_render$G,
373
- _sfc_staticRenderFns$G,
369
+ var _sfc_staticRenderFns$H = [];
370
+ var __component__$H = /* @__PURE__ */ normalizeComponent(
371
+ _sfc_main$H,
372
+ _sfc_render$H,
373
+ _sfc_staticRenderFns$H,
374
374
  false,
375
375
  null,
376
376
  "01af0fee",
377
377
  null,
378
378
  null
379
379
  );
380
- const FootnoteReferenceNode = __component__$G.exports;
380
+ const FootnoteReferenceNode = __component__$H.exports;
381
381
  function getVue2CreateElementFallback() {
382
382
  var _a2, _b, _c;
383
383
  const anyMod = VueModule;
@@ -419,176 +419,7 @@ function safeRender(createElement, tag, attrs, children) {
419
419
  return vue2CreateElementFallback(tag, attrs, children);
420
420
  return null;
421
421
  }
422
- const DANGEROUS_ATTRS = /* @__PURE__ */ new Set([
423
- "onclick",
424
- "onerror",
425
- "onload",
426
- "onmouseover",
427
- "onmouseout",
428
- "onmousedown",
429
- "onmouseup",
430
- "onkeydown",
431
- "onkeyup",
432
- "onfocus",
433
- "onblur",
434
- "onsubmit",
435
- "onreset",
436
- "onchange",
437
- "onselect",
438
- "ondblclick",
439
- "ontouchstart",
440
- "ontouchend",
441
- "ontouchmove",
442
- "ontouchcancel",
443
- "onwheel",
444
- "onscroll",
445
- "oncopy",
446
- "oncut",
447
- "onpaste",
448
- "oninput",
449
- "oninvalid",
450
- "onreset",
451
- "onsearch",
452
- "onsubmit"
453
- ]);
454
- const VOID_ELEMENTS = /* @__PURE__ */ new Set([
455
- "area",
456
- "base",
457
- "br",
458
- "col",
459
- "embed",
460
- "hr",
461
- "img",
462
- "input",
463
- "link",
464
- "meta",
465
- "param",
466
- "source",
467
- "track",
468
- "wbr"
469
- ]);
470
- const STANDARD_HTML_TAGS = /* @__PURE__ */ new Set([
471
- "a",
472
- "abbr",
473
- "address",
474
- "area",
475
- "article",
476
- "aside",
477
- "audio",
478
- "b",
479
- "base",
480
- "bdi",
481
- "bdo",
482
- "blockquote",
483
- "body",
484
- "br",
485
- "button",
486
- "canvas",
487
- "caption",
488
- "cite",
489
- "code",
490
- "col",
491
- "colgroup",
492
- "data",
493
- "datalist",
494
- "dd",
495
- "del",
496
- "details",
497
- "dfn",
498
- "dialog",
499
- "div",
500
- "dl",
501
- "dt",
502
- "em",
503
- "embed",
504
- "fieldset",
505
- "figcaption",
506
- "figure",
507
- "footer",
508
- "form",
509
- "h1",
510
- "h2",
511
- "h3",
512
- "h4",
513
- "h5",
514
- "h6",
515
- "head",
516
- "header",
517
- "hgroup",
518
- "hr",
519
- "html",
520
- "i",
521
- "iframe",
522
- "img",
523
- "input",
524
- "ins",
525
- "kbd",
526
- "label",
527
- "legend",
528
- "li",
529
- "link",
530
- "main",
531
- "map",
532
- "mark",
533
- "menu",
534
- "meta",
535
- "meter",
536
- "nav",
537
- "noscript",
538
- "object",
539
- "ol",
540
- "optgroup",
541
- "option",
542
- "output",
543
- "p",
544
- "param",
545
- "picture",
546
- "pre",
547
- "progress",
548
- "q",
549
- "rp",
550
- "rt",
551
- "ruby",
552
- "s",
553
- "samp",
554
- "script",
555
- "section",
556
- "select",
557
- "small",
558
- "source",
559
- "span",
560
- "strong",
561
- "style",
562
- "sub",
563
- "summary",
564
- "sup",
565
- "table",
566
- "tbody",
567
- "td",
568
- "template",
569
- "textarea",
570
- "tfoot",
571
- "th",
572
- "thead",
573
- "time",
574
- "title",
575
- "tr",
576
- "track",
577
- "u",
578
- "ul",
579
- "var",
580
- "video",
581
- "wbr"
582
- ]);
583
422
  const CUSTOM_TAG_REGEX = /<([a-z][a-z0-9-]*)\b[^>]*>/gi;
584
- const BLOCKED_TAGS = /* @__PURE__ */ new Set(["script"]);
585
- const URL_ATTRS = /* @__PURE__ */ new Set([
586
- "href",
587
- "src",
588
- "srcset",
589
- "xlink:href",
590
- "formaction"
591
- ]);
592
423
  const SHOULD_LOG = (() => {
593
424
  var _a2;
594
425
  try {
@@ -605,33 +436,12 @@ function logError(message, err) {
605
436
  if (SHOULD_LOG)
606
437
  console.error(message, err);
607
438
  }
608
- function stripControlAndWhitespace(value) {
609
- let out = "";
610
- for (const ch of value) {
611
- const code = ch.charCodeAt(0);
612
- if (code <= 31 || code === 127)
613
- continue;
614
- if (/\s/u.test(ch))
615
- continue;
616
- out += ch;
617
- }
618
- return out;
619
- }
620
- function isUnsafeUrl(value) {
621
- const normalized = stripControlAndWhitespace(value).toLowerCase();
622
- if (normalized.startsWith("javascript:") || normalized.startsWith("vbscript:"))
623
- return true;
624
- if (normalized.startsWith("data:")) {
625
- return !(normalized.startsWith("data:image/") || normalized.startsWith("data:video/") || normalized.startsWith("data:audio/"));
626
- }
627
- return false;
628
- }
629
439
  function hasOwn(obj, key) {
630
440
  return Object.prototype.hasOwnProperty.call(obj, key);
631
441
  }
632
442
  function isCustomComponent(tagName, customComponents) {
633
443
  const lowerTag = tagName.toLowerCase();
634
- if (STANDARD_HTML_TAGS.has(lowerTag))
444
+ if (EXTENDED_STANDARD_HTML_TAGS.has(lowerTag))
635
445
  return false;
636
446
  return hasOwn(customComponents, lowerTag) || hasOwn(customComponents, tagName);
637
447
  }
@@ -639,9 +449,9 @@ function sanitizeAttrs(attrs) {
639
449
  const clean = {};
640
450
  for (const [key, value] of Object.entries(attrs)) {
641
451
  const lowerKey = key.toLowerCase();
642
- if (DANGEROUS_ATTRS.has(lowerKey))
452
+ if (DANGEROUS_HTML_ATTRS.has(lowerKey))
643
453
  continue;
644
- if (URL_ATTRS.has(lowerKey) && value && isUnsafeUrl(value))
454
+ if (URL_HTML_ATTRS.has(lowerKey) && value && isUnsafeHtmlUrl(value))
645
455
  continue;
646
456
  clean[key] = value;
647
457
  }
@@ -742,7 +552,7 @@ function tokenizeHtml(html) {
742
552
  }
743
553
  }
744
554
  tokens.push({
745
- type: isSelfClosing || VOID_ELEMENTS.has(tagName.toLowerCase()) ? "self_closing" : "tag_open",
555
+ type: isSelfClosing || VOID_HTML_TAGS.has(tagName.toLowerCase()) ? "self_closing" : "tag_open",
746
556
  tagName,
747
557
  attrs
748
558
  });
@@ -799,7 +609,7 @@ function buildVNodeTree(tokens, customComponents, createElement) {
799
609
  return rootNodes;
800
610
  }
801
611
  function createVNode(tagName, attrs, children, customComponents, createElement) {
802
- if (BLOCKED_TAGS.has(tagName.toLowerCase()))
612
+ if (BLOCKED_HTML_TAGS.has(tagName.toLowerCase()))
803
613
  return null;
804
614
  const sanitizedAttrs = sanitizeAttrs(attrs);
805
615
  if (isCustomComponent(tagName, customComponents)) {
@@ -836,7 +646,7 @@ function parseHtmlToVNodes(content2, customComponents, createElement) {
836
646
  return null;
837
647
  }
838
648
  }
839
- const _sfc_main$F = /* @__PURE__ */ defineComponent({
649
+ const _sfc_main$G = /* @__PURE__ */ defineComponent({
840
650
  __name: "HtmlInlineNode",
841
651
  props: {
842
652
  node: null,
@@ -946,22 +756,22 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
946
756
  }
947
757
  });
948
758
  const HtmlInlineNode_vue_vue_type_style_index_0_scoped_7aa2ed27_lang = "";
949
- var _sfc_render$F = function render5() {
759
+ var _sfc_render$G = function render5() {
950
760
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
951
761
  return _setup.renderMode.mode === "dynamic" ? _c("span", { staticClass: "html-inline-node", class: { "html-inline-node--loading": _setup.props.node.loading } }, [_c(_setup.DynamicRenderer, { attrs: { "content": _setup.renderMode.content, "custom-components": _setup.customComponents } })], 1) : _c("span", { ref: "containerRef", staticClass: "html-inline-node", class: { "html-inline-node--loading": _setup.props.node.loading } });
952
762
  };
953
- var _sfc_staticRenderFns$F = [];
954
- var __component__$F = /* @__PURE__ */ normalizeComponent(
955
- _sfc_main$F,
956
- _sfc_render$F,
957
- _sfc_staticRenderFns$F,
763
+ var _sfc_staticRenderFns$G = [];
764
+ var __component__$G = /* @__PURE__ */ normalizeComponent(
765
+ _sfc_main$G,
766
+ _sfc_render$G,
767
+ _sfc_staticRenderFns$G,
958
768
  false,
959
769
  null,
960
770
  "7aa2ed27",
961
771
  null,
962
772
  null
963
773
  );
964
- const HtmlInlineNode = __component__$F.exports;
774
+ const HtmlInlineNode = __component__$G.exports;
965
775
  function resolveStreamingTextState({
966
776
  nextContent,
967
777
  previousContent,
@@ -994,7 +804,7 @@ function resolveStreamingTextState({
994
804
  appended: false
995
805
  };
996
806
  }
997
- const _sfc_main$E = /* @__PURE__ */ defineComponent({
807
+ const _sfc_main$F = /* @__PURE__ */ defineComponent({
998
808
  __name: "InlineCodeNode",
999
809
  props: {
1000
810
  node: null
@@ -1081,22 +891,22 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
1081
891
  }
1082
892
  });
1083
893
  const InlineCodeNode_vue_vue_type_style_index_0_scoped_38cc3b9f_lang = "";
1084
- var _sfc_render$E = function render6() {
894
+ var _sfc_render$F = function render6() {
1085
895
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
1086
896
  return _c("code", { staticClass: "inline text-[85%] px-1 py-0.5 rounded font-mono bg-[hsl(var(--secondary))] whitespace-normal break-words max-w-full before:content-[''] after:content-['']" }, [_setup.settledCode ? _c("span", [_vm._v(_vm._s(_setup.settledCode))]) : _vm._e(), _setup.streamedDelta ? _c("span", { staticClass: "inline-code-stream-delta", class: [_setup.streamedDeltaClass], on: { "animationend": _setup.settleStreamedDelta } }, [_vm._v(" " + _vm._s(_setup.streamedDelta) + " ")]) : _vm._e()]);
1087
897
  };
1088
- var _sfc_staticRenderFns$E = [];
1089
- var __component__$E = /* @__PURE__ */ normalizeComponent(
1090
- _sfc_main$E,
1091
- _sfc_render$E,
1092
- _sfc_staticRenderFns$E,
898
+ var _sfc_staticRenderFns$F = [];
899
+ var __component__$F = /* @__PURE__ */ normalizeComponent(
900
+ _sfc_main$F,
901
+ _sfc_render$F,
902
+ _sfc_staticRenderFns$F,
1093
903
  false,
1094
904
  null,
1095
905
  "38cc3b9f",
1096
906
  null,
1097
907
  null
1098
908
  );
1099
- const InlineCodeNode = __component__$E.exports;
909
+ const InlineCodeNode = __component__$F.exports;
1100
910
  function getVueCtor() {
1101
911
  var _a2, _b, _c, _d;
1102
912
  const anyMod = VueModule;
@@ -1438,7 +1248,7 @@ function useViewportPriority() {
1438
1248
  };
1439
1249
  return register;
1440
1250
  }
1441
- const _sfc_main$D = /* @__PURE__ */ defineComponent({
1251
+ const _sfc_main$E = /* @__PURE__ */ defineComponent({
1442
1252
  __name: "ImageNode",
1443
1253
  props: {
1444
1254
  node: null,
@@ -1446,7 +1256,8 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
1446
1256
  showCaption: { type: Boolean, default: false },
1447
1257
  lazy: { type: Boolean, default: true },
1448
1258
  svgMinHeight: { default: "12rem" },
1449
- usePlaceholder: { type: Boolean, default: true }
1259
+ usePlaceholder: { type: Boolean, default: true },
1260
+ inline: { type: Boolean }
1450
1261
  },
1451
1262
  emits: ["load", "error", "click"],
1452
1263
  setup(__props, { emit }) {
@@ -1484,6 +1295,33 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
1484
1295
  });
1485
1296
  const displaySrc = computed(() => hasError.value && props.fallbackSrc ? props.fallbackSrc : props.node.src);
1486
1297
  const canRenderImage = computed(() => !props.lazy || isVisible.value);
1298
+ const inheritedInlineImages = inject("markstreamInlineImages", void 0);
1299
+ const instance = getCurrentInstance();
1300
+ const hasInlineProp = computed(() => {
1301
+ var _a2, _b, _c;
1302
+ const vnodeProps = (_a2 = instance == null ? void 0 : instance.vnode) == null ? void 0 : _a2.props;
1303
+ if (vnodeProps != null && Object.prototype.hasOwnProperty.call(vnodeProps, "inline"))
1304
+ return true;
1305
+ const propsData = (_c = (_b = instance == null ? void 0 : instance.proxy) == null ? void 0 : _b.$options) == null ? void 0 : _c.propsData;
1306
+ return propsData != null && Object.prototype.hasOwnProperty.call(propsData, "inline");
1307
+ });
1308
+ const inlineMode = computed(() => {
1309
+ if (hasInlineProp.value)
1310
+ return props.inline;
1311
+ return (inheritedInlineImages == null ? void 0 : inheritedInlineImages.value) === true;
1312
+ });
1313
+ const rootTag = computed(() => inlineMode.value ? "span" : "figure");
1314
+ const rootClass = computed(() => inlineMode.value ? "image-node image-node--inline" : "image-node image-node--block text-center my-8");
1315
+ const innerTag = computed(() => inlineMode.value ? "span" : "div");
1316
+ const innerClass = computed(() => inlineMode.value ? "image-node__inner image-node__inner--inline" : "relative inline-block");
1317
+ const imageClass = computed(() => inlineMode.value ? "h-auto inline-block align-middle transition-opacity duration-200 ease-in-out" : "max-w-96 h-auto rounded-lg transition-opacity duration-200 ease-in-out");
1318
+ const placeholderClass = computed(() => inlineMode.value ? "placeholder-layer inline-flex items-center justify-center gap-1 align-middle" : "placeholder-layer max-w-96 inline-flex items-center justify-center gap-2");
1319
+ const placeholderStyle = computed(() => {
1320
+ if (inlineMode.value)
1321
+ return isSvg.value ? { minHeight: props.svgMinHeight, width: "100%" } : void 0;
1322
+ return isSvg.value ? { minHeight: props.svgMinHeight, width: "100%" } : { minHeight: "6rem" };
1323
+ });
1324
+ const errorClass = computed(() => inlineMode.value ? "image-node__error inline-flex items-center justify-center gap-1 text-red-500 align-middle" : "px-4 py-2 bg-gray-100 flex items-center justify-center rounded-lg gap-2 text-red-500");
1487
1325
  const isSvg = computed(() => /\.svg(?:\?|$)/i.test(displaySrc.value));
1488
1326
  function handleImageError() {
1489
1327
  if (props.fallbackSrc && !fallbackTried.value) {
@@ -1510,18 +1348,44 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
1510
1348
  imageLoaded.value = false;
1511
1349
  hasError.value = false;
1512
1350
  });
1513
- return { __sfc: true, props, emit, imageLoaded, hasError, fallbackTried, figureRef, registerVisibility, visibilityHandle, isVisible, displaySrc, canRenderImage, isSvg, handleImageError, handleImageLoad, handleClick, t };
1351
+ return { __sfc: true, props, emit, imageLoaded, hasError, fallbackTried, figureRef, registerVisibility, visibilityHandle, isVisible, displaySrc, canRenderImage, inheritedInlineImages, instance, hasInlineProp, inlineMode, rootTag, rootClass, innerTag, innerClass, imageClass, placeholderClass, placeholderStyle, errorClass, isSvg, handleImageError, handleImageLoad, handleClick, t };
1514
1352
  }
1515
1353
  });
1516
- const ImageNode_vue_vue_type_style_index_0_scoped_2b49bba9_lang = "";
1517
- var _sfc_render$D = function render7() {
1354
+ const ImageNode_vue_vue_type_style_index_0_scoped_bb7aa7f0_lang = "";
1355
+ var _sfc_render$E = function render7() {
1518
1356
  var _a2, _b, _c2, _d, _e;
1519
1357
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
1520
- return _c("figure", { ref: "figureRef", staticClass: "text-center my-8" }, [_c("div", { staticClass: "relative inline-block" }, [_c("transition", { attrs: { "name": "img-switch", "mode": "out-in" } }, [!_vm.node.loading && !_setup.hasError && _setup.canRenderImage ? _c("img", { key: "image", staticClass: "max-w-96 h-auto rounded-lg transition-opacity duration-200 ease-in-out", class: { "opacity-0": !_setup.imageLoaded, "opacity-100": _setup.imageLoaded, "cursor-pointer": _setup.imageLoaded }, style: _setup.isSvg ? { minHeight: _setup.props.svgMinHeight, width: "100%", height: "auto", objectFit: "contain" } : void 0, attrs: { "src": _setup.displaySrc, "alt": String((_b = (_a2 = _setup.props.node.alt) != null ? _a2 : _setup.props.node.title) != null ? _b : ""), "title": String((_d = (_c2 = _setup.props.node.title) != null ? _c2 : _setup.props.node.alt) != null ? _d : ""), "loading": _setup.props.lazy ? "lazy" : "eager", "decoding": "async", "tabindex": _setup.imageLoaded ? 0 : -1, "aria-label": (_e = _setup.props.node.alt) != null ? _e : _setup.t("image.preview") }, on: { "error": _setup.handleImageError, "load": _setup.handleImageLoad, "click": _setup.handleClick } }) : !_setup.hasError ? _c("div", { key: "placeholder", staticClass: "placeholder-layer max-w-96 inline-flex items-center justify-center gap-2", style: _setup.isSvg ? { minHeight: _setup.props.svgMinHeight, width: "100%" } : { minHeight: "6rem" } }, [_setup.props.usePlaceholder ? [_vm._t("placeholder", function() {
1358
+ return _c(_setup.rootTag, { ref: "figureRef", tag: "component", class: _setup.rootClass }, [_c(_setup.innerTag, { tag: "component", class: _setup.innerClass }, [_c("transition", { attrs: { "name": "img-switch", "mode": "out-in" } }, [!_vm.node.loading && !_setup.hasError && _setup.canRenderImage ? _c("img", { key: "image", class: [_setup.imageClass, { "opacity-0": !_setup.imageLoaded, "opacity-100": _setup.imageLoaded, "cursor-pointer": _setup.imageLoaded }], style: _setup.isSvg ? { minHeight: _setup.props.svgMinHeight, width: "100%", height: "auto", objectFit: "contain" } : void 0, attrs: { "src": _setup.displaySrc, "alt": String((_b = (_a2 = _setup.props.node.alt) != null ? _a2 : _setup.props.node.title) != null ? _b : ""), "title": String((_d = (_c2 = _setup.props.node.title) != null ? _c2 : _setup.props.node.alt) != null ? _d : ""), "loading": _setup.props.lazy ? "lazy" : "eager", "decoding": "async", "tabindex": _setup.imageLoaded ? 0 : -1, "aria-label": (_e = _setup.props.node.alt) != null ? _e : _setup.t("image.preview") }, on: { "error": _setup.handleImageError, "load": _setup.handleImageLoad, "click": _setup.handleClick } }) : !_setup.hasError ? _c("div", { key: "placeholder", class: _setup.placeholderClass, style: _setup.placeholderStyle }, [_setup.props.usePlaceholder ? [_vm._t("placeholder", function() {
1521
1359
  return [_c("div", { staticClass: "w-4 h-4 rounded-full border-2 border-solid border-current border-t-transparent animate-spin", attrs: { "aria-hidden": "true" } }), _c("span", { staticClass: "text-sm whitespace-nowrap" }, [_vm._v(_vm._s(_setup.t("image.loading")))])];
1522
- }, { "node": _setup.props.node, "displaySrc": _setup.displaySrc, "imageLoaded": _setup.imageLoaded, "hasError": _setup.hasError, "fallbackSrc": _setup.props.fallbackSrc, "lazy": _setup.props.lazy, "isSvg": _setup.isSvg })] : [_c("span", { staticClass: "text-sm text-gray-500" }, [_vm._v(_vm._s(_vm.node.raw))])]], 2) : !_vm.node.loading && !_setup.props.fallbackSrc ? _c("div", { key: "error", staticClass: "px-4 py-2 bg-gray-100 flex items-center justify-center rounded-lg gap-2 text-red-500" }, [_vm._t("error", function() {
1360
+ }, { "node": _setup.props.node, "displaySrc": _setup.displaySrc, "imageLoaded": _setup.imageLoaded, "hasError": _setup.hasError, "fallbackSrc": _setup.props.fallbackSrc, "lazy": _setup.props.lazy, "isSvg": _setup.isSvg })] : [_c("span", { staticClass: "text-sm text-gray-500" }, [_vm._v(_vm._s(_vm.node.raw))])]], 2) : !_vm.node.loading && !_setup.props.fallbackSrc ? _c("div", { key: "error", class: _setup.errorClass }, [_vm._t("error", function() {
1523
1361
  return [_c("svg", { attrs: { "xmlns": "http://www.w3.org/2000/svg", "width": "16", "height": "16", "viewBox": "0 0 24 24" } }, [_c("path", { attrs: { "fill": "currentColor", "d": "M2 2h20v10h-2V4H4v9.586l5-5L14.414 14L13 15.414l-4-4l-5 5V20h8v2H2zm13.547 5a1 1 0 1 0 0 2a1 1 0 0 0 0-2m-3 1a3 3 0 1 1 6 0a3 3 0 0 1-6 0m3.625 6.757L19 17.586l2.828-2.829l1.415 1.415L20.414 19l2.829 2.828l-1.415 1.415L19 20.414l-2.828 2.829l-1.415-1.415L17.586 19l-2.829-2.828z" } })]), _c("span", { staticClass: "text-sm whitespace-nowrap" }, [_vm._v(_vm._s(_setup.t("image.loadError")))])];
1524
- }, { "node": _setup.props.node, "displaySrc": _setup.displaySrc, "imageLoaded": _setup.imageLoaded, "hasError": _setup.hasError, "fallbackSrc": _setup.props.fallbackSrc, "lazy": _setup.props.lazy, "isSvg": _setup.isSvg })], 2) : _vm._e()])], 1), _setup.props.showCaption && _setup.props.node.alt ? _c("figcaption", { staticClass: "mt-2 text-sm text-gray-500 italic" }, [_vm._v(" " + _vm._s(_setup.props.node.alt) + " ")]) : _vm._e()]);
1362
+ }, { "node": _setup.props.node, "displaySrc": _setup.displaySrc, "imageLoaded": _setup.imageLoaded, "hasError": _setup.hasError, "fallbackSrc": _setup.props.fallbackSrc, "lazy": _setup.props.lazy, "isSvg": _setup.isSvg })], 2) : _vm._e()])], 1), !_setup.inlineMode && _setup.props.showCaption && _setup.props.node.alt ? _c("figcaption", { staticClass: "mt-2 text-sm text-gray-500 italic" }, [_vm._v(" " + _vm._s(_setup.props.node.alt) + " ")]) : _vm._e()], 1);
1363
+ };
1364
+ var _sfc_staticRenderFns$E = [];
1365
+ var __component__$E = /* @__PURE__ */ normalizeComponent(
1366
+ _sfc_main$E,
1367
+ _sfc_render$E,
1368
+ _sfc_staticRenderFns$E,
1369
+ false,
1370
+ null,
1371
+ "bb7aa7f0",
1372
+ null,
1373
+ null
1374
+ );
1375
+ const ImageNode = __component__$E.exports;
1376
+ const _sfc_main$D = /* @__PURE__ */ defineComponent({
1377
+ __name: "SoftBreakNode",
1378
+ props: {
1379
+ node: null
1380
+ },
1381
+ setup(__props) {
1382
+ return { __sfc: true };
1383
+ }
1384
+ });
1385
+ var _sfc_render$D = function render8() {
1386
+ var _vm = this, _c = _vm._self._c;
1387
+ _vm._self._setupProxy;
1388
+ return _c("span", { staticClass: "soft-break", domProps: { "textContent": _vm._s(" ") } });
1525
1389
  };
1526
1390
  var _sfc_staticRenderFns$D = [];
1527
1391
  var __component__$D = /* @__PURE__ */ normalizeComponent(
@@ -1530,11 +1394,11 @@ var __component__$D = /* @__PURE__ */ normalizeComponent(
1530
1394
  _sfc_staticRenderFns$D,
1531
1395
  false,
1532
1396
  null,
1533
- "2b49bba9",
1397
+ null,
1534
1398
  null,
1535
1399
  null
1536
1400
  );
1537
- const ImageNode = __component__$D.exports;
1401
+ const SoftBreakNode = __component__$D.exports;
1538
1402
  let katex = null;
1539
1403
  let importAttempted$1 = false;
1540
1404
  let katexLoader = defaultKatexLoader;
@@ -1729,7 +1593,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
1729
1593
  }
1730
1594
  });
1731
1595
  const TextNode_vue_vue_type_style_index_0_scoped_356c331b_lang = "";
1732
- var _sfc_render$C = function render8() {
1596
+ var _sfc_render$C = function render9() {
1733
1597
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
1734
1598
  return _c("span", { staticClass: "whitespace-pre-wrap break-words text-node", class: [_setup.katexReady && _vm.node.center ? "text-node-center" : ""] }, [_setup.settledContent ? _c("span", [_vm._v(_vm._s(_setup.settledContent))]) : _vm._e(), _setup.streamedDelta ? _c("span", { staticClass: "text-node-stream-delta", class: [_setup.streamedDeltaClass], on: { "animationend": _setup.settleStreamedDelta } }, [_vm._v(" " + _vm._s(_setup.streamedDelta) + " ")]) : _vm._e()]);
1735
1599
  };
@@ -1807,7 +1671,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
1807
1671
  return { __sfc: true };
1808
1672
  }
1809
1673
  });
1810
- var _sfc_render$B = function render9() {
1674
+ var _sfc_render$B = function render10() {
1811
1675
  var _vm = this, _c = _vm._self._c;
1812
1676
  _vm._self._setupProxy;
1813
1677
  return _c("span", { staticClass: "reference-node cursor-pointer bg-[hsl(var(--muted))] text-xs rounded-md px-1.5 mx-0.5 hover:bg-[hsl(var(--secondary))]", attrs: { "role": "button", "tabindex": "0" }, on: { "click": function($event) {
@@ -1854,13 +1718,14 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
1854
1718
  subscript: SubscriptNode,
1855
1719
  emoji: EmojiNode,
1856
1720
  math_inline: MathInlineNodeAsync,
1857
- reference: ReferenceNode
1721
+ reference: ReferenceNode,
1722
+ softbreak: SoftBreakNode
1858
1723
  }, overrides);
1859
1724
  return { __sfc: true, props, overrides, nodeComponents };
1860
1725
  }
1861
1726
  });
1862
- const SuperscriptNode_vue_vue_type_style_index_0_scoped_ef2512b4_lang = "";
1863
- var _sfc_render$A = function render10() {
1727
+ const SuperscriptNode_vue_vue_type_style_index_0_scoped_54fda8d4_lang = "";
1728
+ var _sfc_render$A = function render11() {
1864
1729
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
1865
1730
  return _c("sup", { staticClass: "superscript-node" }, _vm._l(_vm.node.children, function(child, index2) {
1866
1731
  return _c("span", { key: `${_vm.indexKey || "superscript"}-${index2}`, staticClass: "superscript-child" }, [_setup.nodeComponents[child.type] ? _c(_setup.nodeComponents[child.type], { tag: "component", attrs: { "node": child, "custom-id": _setup.props.customId, "index-key": `${_vm.indexKey || "superscript"}-${index2}` } }) : _c("span", [_vm._v(_vm._s(child.content || child.raw || ""))])], 1);
@@ -1873,7 +1738,7 @@ var __component__$A = /* @__PURE__ */ normalizeComponent(
1873
1738
  _sfc_staticRenderFns$A,
1874
1739
  false,
1875
1740
  null,
1876
- "ef2512b4",
1741
+ "54fda8d4",
1877
1742
  null,
1878
1743
  null
1879
1744
  );
@@ -1902,13 +1767,14 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
1902
1767
  superscript: SuperscriptNode,
1903
1768
  emoji: EmojiNode,
1904
1769
  math_inline: MathInlineNodeAsync,
1905
- reference: ReferenceNode
1770
+ reference: ReferenceNode,
1771
+ softbreak: SoftBreakNode
1906
1772
  }, overrides);
1907
1773
  return { __sfc: true, props, overrides, nodeComponents };
1908
1774
  }
1909
1775
  });
1910
- const SubscriptNode_vue_vue_type_style_index_0_scoped_3d49d031_lang = "";
1911
- var _sfc_render$z = function render11() {
1776
+ const SubscriptNode_vue_vue_type_style_index_0_scoped_0740560a_lang = "";
1777
+ var _sfc_render$z = function render12() {
1912
1778
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
1913
1779
  return _c("sub", { staticClass: "subscript-node" }, _vm._l(_vm.node.children, function(child, index2) {
1914
1780
  return _c("span", { key: `${_vm.indexKey || "subscript"}-${index2}`, staticClass: "subscript-child" }, [_setup.nodeComponents[child.type] ? _c(_setup.nodeComponents[child.type], { tag: "component", attrs: { "node": child, "custom-id": _setup.props.customId, "index-key": `${_vm.indexKey || "subscript"}-${index2}` } }) : _c("span", [_vm._v(_vm._s(child.content || child.raw || ""))])], 1);
@@ -1921,7 +1787,7 @@ var __component__$z = /* @__PURE__ */ normalizeComponent(
1921
1787
  _sfc_staticRenderFns$z,
1922
1788
  false,
1923
1789
  null,
1924
- "3d49d031",
1790
+ "0740560a",
1925
1791
  null,
1926
1792
  null
1927
1793
  );
@@ -1950,13 +1816,14 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
1950
1816
  emoji: EmojiNode,
1951
1817
  footnote_reference: FootnoteReferenceNode,
1952
1818
  math_inline: MathInlineNodeAsync,
1953
- reference: ReferenceNode
1819
+ reference: ReferenceNode,
1820
+ softbreak: SoftBreakNode
1954
1821
  }, overrides);
1955
1822
  return { __sfc: true, props, overrides, nodeComponents };
1956
1823
  }
1957
1824
  });
1958
- const StrongNode_vue_vue_type_style_index_0_scoped_af3ce037_lang = "";
1959
- var _sfc_render$y = function render12() {
1825
+ const StrongNode_vue_vue_type_style_index_0_scoped_27709563_lang = "";
1826
+ var _sfc_render$y = function render13() {
1960
1827
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
1961
1828
  return _c("strong", { staticClass: "strong-node" }, _vm._l(_vm.node.children, function(child, index2) {
1962
1829
  return _c(_setup.nodeComponents[child.type], { key: `${_vm.indexKey || "strong"}-${index2}`, tag: "component", attrs: { "index-key": `${_vm.indexKey || "strong"}-${index2}`, "node": child, "custom-id": _setup.props.customId } });
@@ -1969,7 +1836,7 @@ var __component__$y = /* @__PURE__ */ normalizeComponent(
1969
1836
  _sfc_staticRenderFns$y,
1970
1837
  false,
1971
1838
  null,
1972
- "af3ce037",
1839
+ "27709563",
1973
1840
  null,
1974
1841
  null
1975
1842
  );
@@ -1998,13 +1865,14 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
1998
1865
  emoji: EmojiNode,
1999
1866
  footnote_reference: FootnoteReferenceNode,
2000
1867
  math_inline: MathInlineNodeAsync,
2001
- reference: ReferenceNode
1868
+ reference: ReferenceNode,
1869
+ softbreak: SoftBreakNode
2002
1870
  }, overrides);
2003
1871
  return { __sfc: true, props, overrides, nodeComponents };
2004
1872
  }
2005
1873
  });
2006
- const StrikethroughNode_vue_vue_type_style_index_0_scoped_904d5bd1_lang = "";
2007
- var _sfc_render$x = function render13() {
1874
+ const StrikethroughNode_vue_vue_type_style_index_0_scoped_388291cf_lang = "";
1875
+ var _sfc_render$x = function render14() {
2008
1876
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
2009
1877
  return _c("del", { staticClass: "strikethrough-node" }, _vm._l(_vm.node.children, function(child, index2) {
2010
1878
  return _c(_setup.nodeComponents[child.type], { key: `${_vm.indexKey || "strikethrough"}-${index2}`, tag: "component", attrs: { "node": child, "custom-id": _setup.props.customId, "index-key": `${_vm.indexKey || "strikethrough"}-${index2}` } });
@@ -2017,7 +1885,7 @@ var __component__$x = /* @__PURE__ */ normalizeComponent(
2017
1885
  _sfc_staticRenderFns$x,
2018
1886
  false,
2019
1887
  null,
2020
- "904d5bd1",
1888
+ "388291cf",
2021
1889
  null,
2022
1890
  null
2023
1891
  );
@@ -2090,13 +1958,16 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
2090
1958
  "--underline-iteration": typeof props.animationIteration === "number" ? String(props.animationIteration) : (_f = props.animationIteration) != null ? _f : "infinite"
2091
1959
  };
2092
1960
  });
1961
+ provide("markstreamInlineImages", computed(() => true));
2093
1962
  const nodeComponents = {
2094
1963
  text: TextNode,
2095
1964
  strong: StrongNode,
2096
1965
  strikethrough: StrikethroughNode,
2097
1966
  emphasis: EmphasisNode,
2098
1967
  image: ImageNode,
2099
- html_inline: HtmlInlineNode
1968
+ softbreak: SoftBreakNode,
1969
+ html_inline: HtmlInlineNode,
1970
+ inline_code: InlineCodeNode
2100
1971
  };
2101
1972
  const attrs = useAttrs();
2102
1973
  const anchorEl2 = ref(null);
@@ -2173,8 +2044,8 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
2173
2044
  return { __sfc: true, props, lastPointerPosition, pointerTrackerRefCount, pointerTrackerCleanup, ensurePointerTracker, retainPointerTracker, releasePointerTracker, cssVars, nodeComponents, attrs, anchorEl: anchorEl2, isHovering, anchorAttrs, getTooltipText, isPointerInsideAnchor, syncTooltipForHoveredAnchor, onAnchorEnter, onAnchorLeave, title, TextNode };
2174
2045
  }
2175
2046
  });
2176
- const LinkNode_vue_vue_type_style_index_0_scoped_535a598a_lang = "";
2177
- var _sfc_render$w = function render14() {
2047
+ const LinkNode_vue_vue_type_style_index_0_scoped_62007177_lang = "";
2048
+ var _sfc_render$w = function render15() {
2178
2049
  var _a2, _b;
2179
2050
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
2180
2051
  return !_vm.node.loading ? _c("a", _vm._b({ ref: "anchorEl", staticClass: "link-node", style: _setup.cssVars, attrs: { "href": _vm.node.href, "title": _vm.showTooltip ? "" : _setup.title, "aria-label": `Link: ${_setup.title}`, "aria-hidden": _vm.node.loading ? "true" : "false", "target": "_blank", "rel": "noopener noreferrer" }, on: { "mouseenter": (e) => _setup.onAnchorEnter(e), "mouseleave": _setup.onAnchorLeave } }, "a", _setup.anchorAttrs, false), _vm._l(_vm.node.children, function(child, index2) {
@@ -2188,7 +2059,7 @@ var __component__$w = /* @__PURE__ */ normalizeComponent(
2188
2059
  _sfc_staticRenderFns$w,
2189
2060
  false,
2190
2061
  null,
2191
- "535a598a",
2062
+ "62007177",
2192
2063
  null,
2193
2064
  null
2194
2065
  );
@@ -2217,13 +2088,14 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
2217
2088
  emoji: EmojiNode,
2218
2089
  footnote_reference: FootnoteReferenceNode,
2219
2090
  math_inline: MathInlineNodeAsync,
2220
- reference: ReferenceNode
2091
+ reference: ReferenceNode,
2092
+ softbreak: SoftBreakNode
2221
2093
  }, overrides);
2222
2094
  return { __sfc: true, props, overrides, nodeComponents };
2223
2095
  }
2224
2096
  });
2225
- const InsertNode_vue_vue_type_style_index_0_scoped_ab1ec9bc_lang = "";
2226
- var _sfc_render$v = function render15() {
2097
+ const InsertNode_vue_vue_type_style_index_0_scoped_88ac685e_lang = "";
2098
+ var _sfc_render$v = function render16() {
2227
2099
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
2228
2100
  return _c("ins", { staticClass: "insert-node" }, _vm._l(_vm.node.children, function(child, index2) {
2229
2101
  return _c(_setup.nodeComponents[child.type], { key: `${_vm.indexKey || "insert"}-${index2}`, tag: "component", attrs: { "node": child, "custom-id": _setup.props.customId, "index-key": `${_vm.indexKey || "insert"}-${index2}` } });
@@ -2236,7 +2108,7 @@ var __component__$v = /* @__PURE__ */ normalizeComponent(
2236
2108
  _sfc_staticRenderFns$v,
2237
2109
  false,
2238
2110
  null,
2239
- "ab1ec9bc",
2111
+ "88ac685e",
2240
2112
  null,
2241
2113
  null
2242
2114
  );
@@ -2265,13 +2137,14 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
2265
2137
  emoji: EmojiNode,
2266
2138
  footnote_reference: FootnoteReferenceNode,
2267
2139
  math_inline: MathInlineNodeAsync,
2268
- reference: ReferenceNode
2140
+ reference: ReferenceNode,
2141
+ softbreak: SoftBreakNode
2269
2142
  }, overrides);
2270
2143
  return { __sfc: true, props, overrides, nodeComponents };
2271
2144
  }
2272
2145
  });
2273
- const HighlightNode_vue_vue_type_style_index_0_scoped_38e31bf6_lang = "";
2274
- var _sfc_render$u = function render16() {
2146
+ const HighlightNode_vue_vue_type_style_index_0_scoped_452c2d33_lang = "";
2147
+ var _sfc_render$u = function render17() {
2275
2148
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
2276
2149
  return _c("mark", { staticClass: "highlight-node" }, _vm._l(_vm.node.children, function(child, index2) {
2277
2150
  return _c(_setup.nodeComponents[child.type], { key: `${_vm.indexKey || "highlight"}-${index2}`, tag: "component", attrs: { "node": child, "custom-id": _setup.props.customId, "index-key": `${_vm.indexKey || "highlight"}-${index2}` } });
@@ -2284,7 +2157,7 @@ var __component__$u = /* @__PURE__ */ normalizeComponent(
2284
2157
  _sfc_staticRenderFns$u,
2285
2158
  false,
2286
2159
  null,
2287
- "38e31bf6",
2160
+ "452c2d33",
2288
2161
  null,
2289
2162
  null
2290
2163
  );
@@ -2313,13 +2186,14 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
2313
2186
  emoji: EmojiNode,
2314
2187
  footnote_reference: FootnoteReferenceNode,
2315
2188
  math_inline: MathInlineNodeAsync,
2316
- reference: ReferenceNode
2189
+ reference: ReferenceNode,
2190
+ softbreak: SoftBreakNode
2317
2191
  }, overrides);
2318
2192
  return { __sfc: true, props, overrides, nodeComponents };
2319
2193
  }
2320
2194
  });
2321
- const EmphasisNode_vue_vue_type_style_index_0_scoped_8264674d_lang = "";
2322
- var _sfc_render$t = function render17() {
2195
+ const EmphasisNode_vue_vue_type_style_index_0_scoped_79d1ccf1_lang = "";
2196
+ var _sfc_render$t = function render18() {
2323
2197
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
2324
2198
  return _c("em", { staticClass: "emphasis-node" }, _vm._l(_vm.node.children, function(child, index2) {
2325
2199
  return _c(_setup.nodeComponents[child.type], { key: `${_vm.indexKey || "emphasis"}-${index2}`, tag: "component", attrs: { "node": child, "custom-id": _setup.props.customId, "index-key": `${_vm.indexKey || "emphasis"}-${index2}` } });
@@ -2332,7 +2206,7 @@ var __component__$t = /* @__PURE__ */ normalizeComponent(
2332
2206
  _sfc_staticRenderFns$t,
2333
2207
  false,
2334
2208
  null,
2335
- "8264674d",
2209
+ "79d1ccf1",
2336
2210
  null,
2337
2211
  null
2338
2212
  );
@@ -2359,7 +2233,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
2359
2233
  }
2360
2234
  });
2361
2235
  const FootnoteAnchorNode_vue_vue_type_style_index_0_scoped_4756ce0d_lang = "";
2362
- var _sfc_render$s = function render18() {
2236
+ var _sfc_render$s = function render19() {
2363
2237
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
2364
2238
  return _c("a", { staticClass: "footnote-anchor text-sm text-[#0366d6] hover:underline cursor-pointer", attrs: { "href": `#fnref-${_vm.node.id}`, "title": `返回引用 ${_vm.node.id}` }, on: { "click": _setup.scrollToReference } }, [_vm._v(" ↩︎ ")]);
2365
2239
  };
@@ -2395,7 +2269,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
2395
2269
  }
2396
2270
  });
2397
2271
  const FootnoteNode_vue_vue_type_style_index_0_lang = "";
2398
- var _sfc_render$r = function render19() {
2272
+ var _sfc_render$r = function render20() {
2399
2273
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
2400
2274
  return _c("div", { staticClass: "flex mt-2 mb-2 text-sm leading-relaxed border-t border-[#eaecef] pt-2", attrs: { "id": `fnref--${_vm.node.id}` } }, [_c("div", { staticClass: "flex-1" }, [_c(_setup.nestedRenderer, { tag: "component", attrs: { "index-key": `footnote-${_setup.props.indexKey}`, "nodes": _setup.props.node.children, "custom-id": _setup.props.customId, "typewriter": _setup.props.typewriter }, on: { "copy": function($event) {
2401
2275
  return _vm.$emit("copy", $event);
@@ -2423,7 +2297,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
2423
2297
  }
2424
2298
  });
2425
2299
  const HardBreakNode_vue_vue_type_style_index_0_scoped_50c58f70_lang = "";
2426
- var _sfc_render$q = function render20() {
2300
+ var _sfc_render$q = function render21() {
2427
2301
  var _vm = this, _c = _vm._self._c;
2428
2302
  _vm._self._setupProxy;
2429
2303
  return _c("br", { staticClass: "hard-break" });
@@ -2450,6 +2324,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
2450
2324
  setup(__props) {
2451
2325
  const props = __props;
2452
2326
  const overrides = getCustomNodeComponents(props.customId);
2327
+ provide("markstreamInlineImages", computed(() => true));
2453
2328
  const nodeComponents = __spreadValues({
2454
2329
  text: TextNode,
2455
2330
  inline_code: InlineCodeNode,
@@ -2467,14 +2342,15 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
2467
2342
  checkbox_input: CheckboxNode,
2468
2343
  footnote_reference: FootnoteReferenceNode,
2469
2344
  hardbreak: HardBreakNode,
2345
+ softbreak: SoftBreakNode,
2470
2346
  math_inline: MathInlineNodeAsync,
2471
2347
  reference: ReferenceNode
2472
2348
  }, overrides);
2473
2349
  return { __sfc: true, props, overrides, nodeComponents };
2474
2350
  }
2475
2351
  });
2476
- const HeadingNode_vue_vue_type_style_index_0_scoped_ffb7cf51_lang = "";
2477
- var _sfc_render$p = function render21() {
2352
+ const HeadingNode_vue_vue_type_style_index_0_scoped_194f91db_lang = "";
2353
+ var _sfc_render$p = function render22() {
2478
2354
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
2479
2355
  return _c(`h${_vm.node.level}`, _vm._b({ tag: "component", staticClass: "heading-node", class: [`heading-${_vm.node.level}`], attrs: { "dir": "auto" } }, "component", _vm.node.attrs, false), _vm._l(_vm.node.children, function(child, index2) {
2480
2356
  return _c(_setup.nodeComponents[child.type], { key: `${_vm.indexKey || "heading"}-${index2}`, tag: "component", attrs: { "custom-id": _setup.props.customId, "node": child, "index-key": `${_vm.indexKey || "heading"}-${index2}` } });
@@ -2487,7 +2363,7 @@ var __component__$p = /* @__PURE__ */ normalizeComponent(
2487
2363
  _sfc_staticRenderFns$p,
2488
2364
  false,
2489
2365
  null,
2490
- "ffb7cf51",
2366
+ "194f91db",
2491
2367
  null,
2492
2368
  null
2493
2369
  );
@@ -2519,7 +2395,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
2519
2395
  }
2520
2396
  });
2521
2397
  const ListItemNode_vue_vue_type_style_index_0_scoped_5c58ad56_lang = "";
2522
- var _sfc_render$o = function render22() {
2398
+ var _sfc_render$o = function render23() {
2523
2399
  var _a2, _b;
2524
2400
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
2525
2401
  return _c("li", _vm._b({ staticClass: "list-item pl-1.5 my-2", attrs: { "dir": "auto" } }, "li", _setup.liValueAttr, false), [_c(_setup.nestedRenderer, _vm._b({ tag: "component", attrs: { "index-key": `list-item-${_setup.props.indexKey}`, "nodes": (_b = (_a2 = _setup.itemNode) == null ? void 0 : _a2.children) != null ? _b : [], "custom-id": _setup.props.customId, "typewriter": _setup.props.typewriter, "batch-rendering": false }, on: { "copy": function($event) {
@@ -2559,7 +2435,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
2559
2435
  }
2560
2436
  });
2561
2437
  const ListNode_vue_vue_type_style_index_0_scoped_91e6dafc_lang = "";
2562
- var _sfc_render$n = function render23() {
2438
+ var _sfc_render$n = function render24() {
2563
2439
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
2564
2440
  return _c(_vm.node.ordered ? "ol" : "ul", { tag: "component", staticClass: "list-node", class: { "list-decimal": _vm.node.ordered, "list-disc": !_vm.node.ordered } }, _vm._l(_vm.node.items, function(item, index2) {
2565
2441
  var _a2;
@@ -2684,7 +2560,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
2684
2560
  }
2685
2561
  });
2686
2562
  const HtmlBlockNode_vue_vue_type_style_index_0_scoped_53b53d7c_lang = "";
2687
- var _sfc_render$m = function render24() {
2563
+ var _sfc_render$m = function render25() {
2688
2564
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
2689
2565
  return _c("div", _vm._b({ ref: "htmlRef", staticClass: "html-block-node" }, "div", _setup.boundAttrs, false), [_setup.shouldRender ? [_setup.renderMode.mode === "dynamic" ? _c(_setup.DynamicRenderer, { attrs: { "content": _setup.renderMode.content, "custom-components": _setup.customComponents } }) : _c("div", { domProps: { "innerHTML": _vm._s(_setup.renderContent) } })] : _c("div", { staticClass: "html-block-node__placeholder" }, [_vm._t("placeholder", function() {
2690
2566
  return [_c("span", { staticClass: "html-block-node__placeholder-bar" }), _c("span", { staticClass: "html-block-node__placeholder-bar w-4/5" }), _c("span", { staticClass: "html-block-node__placeholder-bar w-2/3" })];
@@ -2712,11 +2588,28 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
2712
2588
  setup(__props) {
2713
2589
  const props = __props;
2714
2590
  const overrides = getCustomNodeComponents(props.customId);
2591
+ const paragraphTag = computed(() => {
2592
+ if (props.node.children.length === 0)
2593
+ return "p";
2594
+ const isMediaOnlyParagraph = props.node.children.every((child) => {
2595
+ var _a2;
2596
+ if (child.type === "image")
2597
+ return true;
2598
+ if (child.type === "softbreak")
2599
+ return true;
2600
+ if (child.type !== "text")
2601
+ return false;
2602
+ return String((_a2 = child.content) != null ? _a2 : "").trim() === "";
2603
+ });
2604
+ return isMediaOnlyParagraph ? "div" : "p";
2605
+ });
2606
+ provide("markstreamInlineImages", computed(() => paragraphTag.value === "p"));
2715
2607
  const nodeComponents = __spreadValues({
2716
2608
  inline_code: InlineCodeNode,
2717
2609
  image: ImageNode,
2718
2610
  link: LinkNode,
2719
2611
  hardbreak: HardBreakNode,
2612
+ softbreak: SoftBreakNode,
2720
2613
  emphasis: EmphasisNode,
2721
2614
  strong: StrongNode,
2722
2615
  strikethrough: StrikethroughNode,
@@ -2735,13 +2628,13 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
2735
2628
  footnote_reference: FootnoteReferenceNode,
2736
2629
  text: TextNode
2737
2630
  }, overrides);
2738
- return { __sfc: true, props, overrides, nodeComponents };
2631
+ return { __sfc: true, props, overrides, paragraphTag, nodeComponents };
2739
2632
  }
2740
2633
  });
2741
- const ParagraphNode_vue_vue_type_style_index_0_scoped_0d09b107_lang = "";
2742
- var _sfc_render$l = function render25() {
2634
+ const ParagraphNode_vue_vue_type_style_index_0_scoped_96096700_lang = "";
2635
+ var _sfc_render$l = function render26() {
2743
2636
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
2744
- return _c("p", { staticClass: "paragraph-node", attrs: { "dir": "auto" } }, _vm._l(_vm.node.children, function(child, index2) {
2637
+ return _c(_setup.paragraphTag, { tag: "component", staticClass: "paragraph-node", attrs: { "dir": "auto" } }, _vm._l(_vm.node.children, function(child, index2) {
2745
2638
  var _a2;
2746
2639
  return _c(_setup.nodeComponents[child.type], { key: `${_vm.indexKey || "paragraph"}-${index2}`, tag: "component", attrs: { "node": child, "index-key": `${(_a2 = _vm.indexKey) != null ? _a2 : "paragraph"}-${index2}`, "custom-id": _setup.props.customId } });
2747
2640
  }), 1);
@@ -2753,7 +2646,7 @@ var __component__$l = /* @__PURE__ */ normalizeComponent(
2753
2646
  _sfc_staticRenderFns$l,
2754
2647
  false,
2755
2648
  null,
2756
- "0d09b107",
2649
+ "96096700",
2757
2650
  null,
2758
2651
  null
2759
2652
  );
@@ -2781,7 +2674,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
2781
2674
  }
2782
2675
  });
2783
2676
  const PreCodeNode_vue_vue_type_style_index_0_lang = "";
2784
- var _sfc_render$k = function render26() {
2677
+ var _sfc_render$k = function render27() {
2785
2678
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
2786
2679
  return _c("pre", { class: [_setup.languageClass], attrs: { "aria-busy": _vm.node.loading === true, "aria-label": _setup.ariaLabel, "data-language": _setup.normalizedLanguage, "tabindex": "0" } }, [_c("code", { attrs: { "translate": "no" }, domProps: { "textContent": _vm._s(_vm.node.code) } })]);
2787
2680
  };
@@ -2826,7 +2719,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
2826
2719
  }
2827
2720
  });
2828
2721
  const TableNode_vue_vue_type_style_index_0_scoped_60ab705d_lang = "";
2829
- var _sfc_render$j = function render27() {
2722
+ var _sfc_render$j = function render28() {
2830
2723
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
2831
2724
  return _c("div", { staticClass: "table-node-wrapper" }, [_c("table", { staticClass: "my-8 text-sm table-node", class: { "table-node--loading": _setup.isLoading }, attrs: { "aria-busy": _setup.isLoading } }, [_c("thead", { staticClass: "border-[var(--table-border,#cbd5e1)] border-solid" }, [_c("tr", { staticClass: "border-b border-solid" }, _vm._l(_vm.node.header.cells, function(cell, index2) {
2832
2725
  return _c("th", { key: `header-${index2}`, staticClass: "font-semibold p-[calc(4/7*1em)]", class: [
@@ -2865,7 +2758,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
2865
2758
  }
2866
2759
  });
2867
2760
  const ThematicBreakNode_vue_vue_type_style_index_0_scoped_639cbad9_lang = "";
2868
- var _sfc_render$i = function render28() {
2761
+ var _sfc_render$i = function render29() {
2869
2762
  var _vm = this, _c = _vm._self._c;
2870
2763
  _vm._self._setupProxy;
2871
2764
  return _c("hr", { staticClass: "hr-node" });
@@ -2892,7 +2785,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
2892
2785
  }
2893
2786
  });
2894
2787
  const FallbackComponent_vue_vue_type_style_index_0_scoped_89aff01f_lang = "";
2895
- var _sfc_render$h = function render29() {
2788
+ var _sfc_render$h = function render30() {
2896
2789
  var _vm = this, _c = _vm._self._c;
2897
2790
  _vm._self._setupProxy;
2898
2791
  return _c("div", { staticClass: "unknown-node" }, [_vm._v(" " + _vm._s(_vm.node.raw) + " ")]);
@@ -2939,6 +2832,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
2939
2832
  checkbox: CheckboxNode,
2940
2833
  checkbox_input: CheckboxNode,
2941
2834
  hardbreak: HardBreakNode,
2835
+ softbreak: SoftBreakNode,
2942
2836
  math_inline: MathInlineNodeAsync,
2943
2837
  reference: ReferenceNode,
2944
2838
  list: ListNode,
@@ -2951,8 +2845,8 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
2951
2845
  return { __sfc: true, props, containerClass, overrides, nodeComponents, getNodeComponent };
2952
2846
  }
2953
2847
  });
2954
- const VmrContainerNode_vue_vue_type_style_index_0_scoped_3cd2aff2_lang = "";
2955
- var _sfc_render$g = function render30() {
2848
+ const VmrContainerNode_vue_vue_type_style_index_0_scoped_cb57a559_lang = "";
2849
+ var _sfc_render$g = function render31() {
2956
2850
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
2957
2851
  return _c("div", _vm._b({ class: _setup.containerClass }, "div", _vm.node.attrs, false), _vm._l(_vm.node.children, function(child, index2) {
2958
2852
  return _c(_setup.getNodeComponent(child.type), { key: `${_vm.indexKey || "vmr-container"}-${index2}`, tag: "component", attrs: { "custom-id": _setup.props.customId, "node": child, "index-key": `${_vm.indexKey || "vmr-container"}-${index2}` } });
@@ -2965,7 +2859,7 @@ var __component__$g = /* @__PURE__ */ normalizeComponent(
2965
2859
  _sfc_staticRenderFns$g,
2966
2860
  false,
2967
2861
  null,
2968
- "3cd2aff2",
2862
+ "cb57a559",
2969
2863
  null,
2970
2864
  null
2971
2865
  );
@@ -3009,6 +2903,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
3009
2903
  admonition: AdmonitionNode,
3010
2904
  vmr_container: VmrContainerNode,
3011
2905
  hardbreak: HardBreakNode,
2906
+ softbreak: SoftBreakNode,
3012
2907
  link: LinkNode,
3013
2908
  image: ImageNode,
3014
2909
  thematic_break: ThematicBreakNode,
@@ -3151,7 +3046,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
3151
3046
  return { __sfc: true, props, emit, nodeComponents, customComponentsMap, indexPrefix, codeBlockBindings, nonCodeBindings, linkBindings, listBindings, effectiveCustomHtmlTagsSet, renderedItems, getHtmlTagFromContent, stripCustomHtmlWrapper, getCodeBlockLanguage, getNodeComponent, getBindingsFor, handleClick };
3152
3047
  }
3153
3048
  });
3154
- var _sfc_render$f = function render31() {
3049
+ var _sfc_render$f = function render32() {
3155
3050
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
3156
3051
  return _c("div", { staticClass: "markstream-vue2 markdown-renderer legacy-nodes-renderer", class: { dark: _setup.props.isDark }, on: { "click": _setup.handleClick } }, _vm._l(_setup.renderedItems, function(item) {
3157
3052
  return _c("div", { key: item.renderKey, staticClass: "node-slot", attrs: { "data-node-index": item.index, "data-node-type": item.node.type } }, [_c("div", { staticClass: "node-content" }, [_c(item.component, _vm._b({ tag: "component", attrs: { "node": item.node, "loading": item.node.loading, "index-key": item.indexKey, "custom-id": _setup.props.customId, "is-dark": _setup.props.isDark }, on: { "copy": function($event) {
@@ -3192,7 +3087,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
3192
3087
  }
3193
3088
  });
3194
3089
  const BlockquoteNode_vue_vue_type_style_index_0_scoped_0bfb818f_lang = "";
3195
- var _sfc_render$e = function render32() {
3090
+ var _sfc_render$e = function render33() {
3196
3091
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
3197
3092
  return _c("blockquote", { staticClass: "blockquote", attrs: { "dir": "auto", "cite": _vm.node.cite } }, [_c(_setup.nestedRenderer, { tag: "component", attrs: { "index-key": `blockquote-${_setup.props.indexKey}`, "nodes": _setup.props.node.children || [], "custom-id": _setup.props.customId, "typewriter": _setup.props.typewriter }, on: { "copy": function($event) {
3198
3093
  return _vm.$emit("copy", $event);
@@ -4544,6 +4439,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
4544
4439
  admonition: AdmonitionNode,
4545
4440
  vmr_container: VmrContainerNode,
4546
4441
  hardbreak: HardBreakNode,
4442
+ softbreak: SoftBreakNode,
4547
4443
  link: LinkNode,
4548
4444
  image: ImageNode,
4549
4445
  thematic_break: ThematicBreakNode,
@@ -4799,9 +4695,9 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
4799
4695
  return { __sfc: true, props, emit, MAX_DEFERRED_NODE_COUNT, MAX_VIEWPORT_OBSERVER_TARGETS, VIEWPORT_PRIORITY_RECOVERY_COUNT, containerRef, viewportPriorityAutoDisabled, SCROLL_PARENT_OVERFLOW_RE, isClient, instance, debugPerformanceEnabled, attrs, textStreamState, streamRenderVersion, resolvedShowTooltips, logPerf, resolveViewportRoot, instanceMsgId, defaultMd, customTagCache, EMPTY_PARSED_NODES, mdBase, mdInstance, normalizeCustomTag: normalizeCustomTag2, resolveCustomHtmlTags: resolveCustomHtmlTags2, cloneNodeValue, cloneParsedNodeList, mergedParseOptions, effectiveCustomHtmlTagsSet, parsedNodes, maxLiveNodesResolved, virtualizationEnabled, viewportPriorityEnabled, registerNodeVisibility, requestFrame, cancelFrame, isTestEnv, hasIdleCallback, resolvedBatchSize, resolvedInitialBatch, batchingEnabled, renderedCount, previousRenderContext, adaptiveBatchSize, nodeVisibilityState, nodeVisibilityHandles, nodeVisibilityFallbackTimers, nodeSlotElements, codeBlockRenderCache, nodeSlotVersion, sortedNodeSlots, scrollRootElement, detachScrollHandler, pendingFocusSync, liveRange, visibleNodes, deferNodes, incrementalRenderingActive, previousBatchConfig, shouldObserveSlots, liveNodeBufferResolved, focusIndex, nodeContentElements, legacyVue26, legacyNodesMode, legacyNodeItems, syncNodeRefs, resolveTemplateRef, desiredRenderedCount, resolveScrollContainer, isReverseFlexScrollRoot, getNormalizedScrollTop, getOffsetTopWithinRoot, cleanupScrollListener, setupScrollListener, cancelScheduledFocusSync, scheduleFocusSync, syncFocusToScroll, clamp, updateLiveRange, nodeHeights, heightStats, heightTreeSize, heightSumTree, heightKnownTree, resetHeightMeasurements, pruneHeightMeasurements, fenwickUpdate, fenwickQuery, fenwickRangeSum, rebuildHeightTrees, recordNodeHeight, averageNodeHeight, estimateHeightRange, topSpacerHeight, bottomSpacerHeight, estimateIndexForOffset, estimateIndexForOffsetFromEnd, cleanupNodeVisibility, markNodeVisible, shouldRenderNode, destroyNodeHandle, setNodeSlotElement, bumpNodeSlotVersion, setNodeContentRef, batchRaf, batchTimeout, batchPending, pendingIncrement, batchIdle, VIEWPORT_FALLBACK_DELAY, VIEWPORT_FALLBACK_MARGIN_PX, cancelBatchTimers, clearVisibilityFallback, scheduleVisibilityFallback, autoDisableViewportPriority, scheduleBatch, queueNextBatch, adjustAdaptiveBatchSize, CodeBlockNodeAsync, MermaidBlockNodeAsync, InfographicBlockNodeAsync, D2BlockNodeAsync, codeBlockComponent, nodeComponents, customComponentsMap, indexPrefix, codeBlockBindings, mermaidBindings, d2Bindings, infographicBindings, nonCodeBindings, linkBindings, listBindings, legacyRenderedItems, legacyStructuredContentMode, renderedItems, getCodeBlockRenderNode, getHtmlTagFromContent, stripCustomHtmlWrapper, getCodeBlockLanguage, isLegacyStructuredNode, getRenderKey, getNodeComponent, getBindingsFor, handleContainerClick, handleContainerMouseover, handleContainerMouseout, LegacyNodesRenderer };
4800
4696
  }
4801
4697
  });
4802
- const NodeRenderer_vue_vue_type_style_index_0_scoped_e98920fd_lang = "";
4698
+ const NodeRenderer_vue_vue_type_style_index_0_scoped_7e238230_lang = "";
4803
4699
  const NodeRenderer_vue_vue_type_style_index_1_lang = "";
4804
- var _sfc_render$d = function render33() {
4700
+ var _sfc_render$d = function render34() {
4805
4701
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
4806
4702
  return _c("div", { ref: "containerRef", staticClass: "markstream-vue2 markdown-renderer", class: [{ dark: _setup.props.isDark }, { virtualized: _setup.virtualizationEnabled }], attrs: { "data-custom-id": _setup.props.customId }, on: { "click": _setup.handleContainerClick, "mouseover": _setup.handleContainerMouseover, "mouseout": _setup.handleContainerMouseout } }, [_setup.legacyNodesMode ? _vm._l(_setup.legacyRenderedItems, function(item) {
4807
4703
  return _c("div", { key: item.renderKey, staticClass: "node-slot", attrs: { "data-node-index": item.index, "data-node-type": item.node.type } }, [_c("div", { staticClass: "node-content" }, [!item.isCodeBlock && _setup.props.typewriter !== false ? _c("transition", { attrs: { "name": "typewriter", "appear": "" } }, [_c(item.component, _vm._b({ tag: "component", attrs: { "node": item.node, "loading": item.node.loading, "index-key": item.indexKey, "custom-id": _setup.props.customId, "is-dark": _setup.props.isDark }, on: { "copy": function($event) {
@@ -4837,7 +4733,7 @@ var __component__$d = /* @__PURE__ */ normalizeComponent(
4837
4733
  _sfc_staticRenderFns$d,
4838
4734
  false,
4839
4735
  null,
4840
- "e98920fd",
4736
+ "7e238230",
4841
4737
  null,
4842
4738
  null
4843
4739
  );
@@ -4887,7 +4783,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
4887
4783
  }
4888
4784
  });
4889
4785
  const AdmonitionNode_vue_vue_type_style_index_0_scoped_f9c1d6b9_lang = "";
4890
- var _sfc_render$c = function render34() {
4786
+ var _sfc_render$c = function render35() {
4891
4787
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
4892
4788
  return _c("div", { staticClass: "admonition", class: [`admonition-${_setup.props.node.kind}`, _setup.props.isDark ? "is-dark" : ""] }, [_c("div", { staticClass: "admonition-header", attrs: { "id": _setup.headerId } }, [_setup.iconMap[_setup.props.node.kind] ? _c("span", { staticClass: "admonition-icon" }, [_vm._v(_vm._s(_setup.iconMap[_setup.props.node.kind]))]) : _vm._e(), _c("span", { staticClass: "admonition-title" }, [_vm._v(_vm._s(_setup.displayTitle))]), _setup.props.node.collapsible ? _c("button", { staticClass: "admonition-toggle", attrs: { "aria-expanded": !_setup.collapsed, "aria-controls": `${_setup.headerId}-content`, "title": _setup.collapsed ? "Expand" : "Collapse" }, on: { "click": _setup.toggleCollapse } }, [_setup.collapsed ? _c("span", [_vm._v("▶")]) : _c("span", [_vm._v("▼")])]) : _vm._e()]), _c("div", { directives: [{ name: "show", rawName: "v-show", value: !_setup.collapsed, expression: "!collapsed" }], staticClass: "admonition-content", attrs: { "id": `${_setup.headerId}-content`, "aria-labelledby": _setup.headerId } }, [_c(_setup.nestedRenderer, { tag: "component", attrs: { "index-key": `admonition-${_vm.indexKey}`, "nodes": _setup.props.node.children, "custom-id": _setup.props.customId, "typewriter": _setup.props.typewriter }, on: { "copy": function($event) {
4893
4789
  return _setup.emit("copy", $event);
@@ -5175,6 +5071,7 @@ const KNOWN_NODE_TYPES = /* @__PURE__ */ new Set([
5175
5071
  "footnote",
5176
5072
  "footnote_reference",
5177
5073
  "hardbreak",
5074
+ "softbreak",
5178
5075
  "heading",
5179
5076
  "highlight",
5180
5077
  "html_block",
@@ -5275,6 +5172,8 @@ function renderNodeToHtml(node, ctx) {
5275
5172
  return `<code>${escapeHtml(getString(node.code))}</code>`;
5276
5173
  case "hardbreak":
5277
5174
  return "<br>";
5175
+ case "softbreak":
5176
+ return " ";
5278
5177
  case "link":
5279
5178
  return renderLinkNode(node, ctx);
5280
5179
  case "image":
@@ -5660,7 +5559,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
5660
5559
  }
5661
5560
  });
5662
5561
  const Portal_vue_vue_type_style_index_0_scoped_5b7455c5_lang = "";
5663
- var _sfc_render$b = function render35() {
5562
+ var _sfc_render$b = function render36() {
5664
5563
  var _vm = this, _c = _vm._self._c;
5665
5564
  _vm._self._setupProxy;
5666
5565
  return _c("div", { ref: "rootRef", staticClass: "portal-root" }, [_vm._t("default")], 2);
@@ -5735,7 +5634,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
5735
5634
  }
5736
5635
  });
5737
5636
  const HtmlPreviewFrame_vue_vue_type_style_index_0_scoped_a5364041_lang = "";
5738
- var _sfc_render$a = function render36() {
5637
+ var _sfc_render$a = function render37() {
5739
5638
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
5740
5639
  return _c(_setup.Portal, { attrs: { "to": "body" } }, [_c("div", { staticClass: "markstream-vue2" }, [_c("div", { staticClass: "html-preview-frame__backdrop", class: { "html-preview-frame__backdrop--dark": _setup.props.isDark }, on: { "click": function($event) {
5741
5640
  var _a2, _b;
@@ -7098,7 +6997,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
7098
6997
  }
7099
6998
  });
7100
6999
  const CodeBlockNode_vue_vue_type_style_index_0_scoped_22412502_lang = "";
7101
- var _sfc_render$9 = function render37() {
7000
+ var _sfc_render$9 = function render38() {
7102
7001
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
7103
7002
  return _setup.usePreCodeRender ? _c(_setup.PreCodeNode, { attrs: { "node": _vm.node, "loading": _setup.props.loading } }) : _c("div", { ref: "container", staticClass: "code-block-container my-4 rounded-lg border overflow-hidden shadow-sm", class: [
7104
7003
  _setup.resolvedSurfaceIsDark ? "border-gray-700/30 bg-gray-900" : "border-gray-200 bg-white",
@@ -7628,7 +7527,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
7628
7527
  }
7629
7528
  });
7630
7529
  const D2BlockNode_vue_vue_type_style_index_0_scoped_fdf24c90_lang = "";
7631
- var _sfc_render$8 = function render38() {
7530
+ var _sfc_render$8 = function render39() {
7632
7531
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
7633
7532
  return _c("div", { staticClass: "d2-block-container my-4 rounded-lg border overflow-hidden shadow-sm", class: _setup.props.isDark ? "border-gray-700/30 bg-gray-900 text-gray-100" : "border-gray-200 bg-white text-gray-900" }, [_setup.props.showHeader ? _c("div", { staticClass: "d2-block-header flex justify-between items-center px-4 py-2.5 border-b border-gray-400/5", staticStyle: { "color": "var(--vscode-editor-foreground)", "background-color": "var(--vscode-editor-background)" } }, [_vm._m(0), _c("div", { staticClass: "flex items-center gap-x-2" }, [_setup.props.showModeToggle ? _c("div", { staticClass: "flex items-center gap-x-1 rounded-md p-0.5", class: _setup.props.isDark ? "bg-gray-700" : "bg-gray-100" }, [_c("button", { staticClass: "mode-btn px-2 py-1 text-xs rounded", class: !_setup.showSource ? "is-active" : "", attrs: { "type": "button" }, on: { "click": function($event) {
7634
7533
  return _setup.handleSwitchMode("preview");
@@ -8050,7 +7949,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
8050
7949
  }
8051
7950
  });
8052
7951
  const InfographicBlockNode_vue_vue_type_style_index_0_scoped_f09aa514_lang = "";
8053
- var _sfc_render$7 = function render39() {
7952
+ var _sfc_render$7 = function render40() {
8054
7953
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
8055
7954
  return _c("div", { staticClass: "my-4 rounded-lg border overflow-hidden shadow-sm", class: [
8056
7955
  _setup.props.isDark ? "border-gray-700/30" : "border-gray-200",
@@ -8641,7 +8540,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
8641
8540
  }
8642
8541
  });
8643
8542
  const MarkdownCodeBlockNode_vue_vue_type_style_index_0_scoped_dfe9b17a_lang = "";
8644
- var _sfc_render$6 = function render40() {
8543
+ var _sfc_render$6 = function render41() {
8645
8544
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
8646
8545
  return _c("div", { ref: "container", staticClass: "code-block-container my-4 rounded-lg border overflow-hidden shadow-sm", class: [_setup.props.isDark ? "border-gray-700/30 bg-gray-900" : "border-gray-200 bg-white", _setup.props.isDark ? "is-dark" : ""], style: __spreadProps(__spreadValues({}, _setup.containerStyle), {
8647
8546
  backgroundColor: "var(--vscode-editor-background, var(--markstream-code-fallback-bg))",
@@ -9378,7 +9277,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
9378
9277
  }
9379
9278
  });
9380
9279
  const MathBlockNode_vue_vue_type_style_index_0_scoped_a643b55f_lang = "";
9381
- var _sfc_render$4 = function render41() {
9280
+ var _sfc_render$4 = function render42() {
9382
9281
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
9383
9282
  return _c("div", { ref: "containerEl", staticClass: "math-block text-center overflow-x-auto relative min-h-[40px]" }, [_setup.renderedHtml ? _c("div", { staticClass: "math-block__content", domProps: { "innerHTML": _vm._s(_setup.renderedHtml) } }) : _setup.fallbackText ? _c("div", { staticClass: "math-block__fallback" }, [_vm._v(" " + _vm._s(_setup.fallbackText) + " ")]) : _vm._e(), _setup.renderingLoading && !_setup.renderedHtml && !_setup.fallbackText ? _c("div", { staticClass: "math-loading-overlay" }, [_c("div", { staticClass: "math-loading-spinner" })]) : _vm._e()]);
9384
9283
  };
@@ -9531,7 +9430,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
9531
9430
  }
9532
9431
  });
9533
9432
  const MathInlineNode_vue_vue_type_style_index_0_scoped_d1ef86a8_lang = "";
9534
- var _sfc_render$3 = function render42() {
9433
+ var _sfc_render$3 = function render43() {
9535
9434
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
9536
9435
  return _c("span", { ref: "containerEl", staticClass: "math-inline-wrapper" }, [_setup.renderedHtml ? _c("span", { staticClass: "math-inline", domProps: { "innerHTML": _vm._s(_setup.renderedHtml) } }) : _setup.fallbackText ? _c("span", { staticClass: "math-inline math-inline--fallback" }, [_vm._v(_vm._s(_setup.fallbackText))]) : _vm._e(), _setup.renderingLoading && !_setup.renderedHtml && !_setup.fallbackText ? _c("span", { staticClass: "math-inline__loading", attrs: { "role": "status", "aria-live": "polite" } }, [_vm._t("loading", function() {
9537
9436
  return [_c("span", { staticClass: "math-inline__spinner animate-spin", attrs: { "aria-hidden": "true" } }), _c("span", { staticClass: "sr-only" }, [_vm._v("Loading")])];
@@ -11217,7 +11116,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
11217
11116
  }
11218
11117
  });
11219
11118
  const MermaidBlockNode_vue_vue_type_style_index_0_scoped_80cb1008_lang = "";
11220
- var _sfc_render$2 = function render43() {
11119
+ var _sfc_render$2 = function render44() {
11221
11120
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
11222
11121
  return _c("div", { staticClass: "my-4 rounded-lg border overflow-hidden shadow-sm", class: [
11223
11122
  _setup.props.isDark ? "border-gray-700/30" : "border-gray-200",
@@ -11349,7 +11248,7 @@ const _sfc_main$1 = defineComponent({
11349
11248
  };
11350
11249
  }
11351
11250
  });
11352
- var _sfc_render$1 = function render44() {
11251
+ var _sfc_render$1 = function render45() {
11353
11252
  var _vm = this, _c = _vm._self._c;
11354
11253
  _vm._self._setupProxy;
11355
11254
  return _c("MarkdownRender", _vm._g(_vm._b({ attrs: { "nodes": _vm.resolvedNodes, "final": _vm.resolvedFinal, "custom-html-tags": _vm.customHtmlTags } }, "MarkdownRender", _vm.$attrs, false), _vm.forwardedListeners));
@@ -11479,7 +11378,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
11479
11378
  }
11480
11379
  });
11481
11380
  const Tooltip_vue_vue_type_style_index_0_scoped_703da293_lang = "";
11482
- var _sfc_render = function render45() {
11381
+ var _sfc_render = function render46() {
11483
11382
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
11484
11383
  return _c(_setup.Portal, { attrs: { "to": "body" } }, [_c("div", { staticClass: "markstream-vue2" }, [_c("transition", { attrs: { "name": "tooltip", "appear": "" } }, [_c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.visible && _setup.ready, expression: "visible && ready" }], ref: "tooltip", staticClass: "z-[9999] inline-block text-base py-2 px-3 rounded-md shadow-md whitespace-nowrap pointer-events-none tooltip-element border", class: [_setup.isDarkEffective ? "bg-gray-900 text-white border-gray-700 border is-dark" : "bg-white text-gray-900 border-gray-200 border"], style: { position: "fixed", left: _setup.style.left, top: _setup.style.top, transform: _setup.style.transform }, attrs: { "id": _setup.props.id, "role": "tooltip" } }, [_vm._v(" " + _vm._s(_vm.content) + " ")])])], 1)]);
11485
11384
  };
@@ -12023,7 +11922,8 @@ const componentMap = {
12023
11922
  TextNode,
12024
11923
  ThematicBreakNode,
12025
11924
  VmrContainerNode,
12026
- ReferenceNode
11925
+ ReferenceNode,
11926
+ SoftBreakNode
12027
11927
  };
12028
11928
  const VueRendererMarkdown = {
12029
11929
  install(Vue, options) {
@@ -12076,6 +11976,7 @@ export {
12076
11976
  ParagraphNode,
12077
11977
  PreCodeNode,
12078
11978
  ReferenceNode,
11979
+ SoftBreakNode,
12079
11980
  StrikethroughNode,
12080
11981
  StrongNode,
12081
11982
  SubscriptNode,