@opentui/core 0.2.11 → 0.2.13

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.
@@ -183,7 +183,7 @@ import {
183
183
  white,
184
184
  wrapWithDelegates,
185
185
  yellow
186
- } from "./index-ysvpktsp.js";
186
+ } from "./index-04gp15zc.js";
187
187
 
188
188
  // src/index.ts
189
189
  var exports_src2 = {};
@@ -9014,8 +9014,7 @@ class MarkdownRenderable extends Renderable {
9014
9014
  continue;
9015
9015
  }
9016
9016
  const prev = blocks[blocks.length - 1];
9017
- const separated = prev ? TRAILING_MARKDOWN_BLOCK_BREAKS_RE.test(prev.token.raw + gapBefore) : false;
9018
- const marginTop = prev && this.shouldAddTopLevelMargin(prev.token, token, separated) ? 1 : 0;
9017
+ const marginTop = prev && this.shouldAddTopLevelMargin(prev.token, token, gapBefore) ? 1 : 0;
9019
9018
  blocks.push({
9020
9019
  token,
9021
9020
  sourceTokenEnd: i + 1,
@@ -9025,14 +9024,15 @@ class MarkdownRenderable extends Renderable {
9025
9024
  }
9026
9025
  return blocks;
9027
9026
  }
9028
- shouldAddTopLevelMargin(prev, current, separated) {
9029
- if (current.type === "heading" || prev.type === "heading")
9027
+ shouldAddTopLevelMargin(prev, current, gapBefore) {
9028
+ if (this.isSeparatedTopLevelBlock(prev) || this.isSeparatedTopLevelBlock(current))
9030
9029
  return true;
9031
- if (current.type === "list")
9032
- return separated;
9033
- if (this.shouldRenderSeparately(prev) || this.shouldRenderSeparately(current))
9034
- return true;
9035
- return separated && prev.type === "paragraph" && current.type === "paragraph";
9030
+ if (prev.type !== "paragraph" || current.type !== "paragraph")
9031
+ return false;
9032
+ return TRAILING_MARKDOWN_BLOCK_BREAKS_RE.test(prev.raw + gapBefore);
9033
+ }
9034
+ isSeparatedTopLevelBlock(token) {
9035
+ return token.type === "heading" || token.type === "list" || this.shouldRenderSeparately(token);
9036
9036
  }
9037
9037
  getTableRowsToRender(table) {
9038
9038
  return table.rows;
@@ -11732,5 +11732,5 @@ class TimeToFirstDrawRenderable extends Renderable {
11732
11732
  }
11733
11733
  export { DistortionEffect, VignetteEffect, CloudsEffect, FlamesEffect, CRTRollingBarEffect, RainbowTextEffect, applyScanlines, applyInvert, applyNoise, applyChromaticAberration, applyAsciiArt, applyBrightness, applyGain, applySaturation, BloomEffect, SEPIA_MATRIX, PROTANOPIA_SIM_MATRIX, DEUTERANOPIA_SIM_MATRIX, TRITANOPIA_SIM_MATRIX, ACHROMATOPSIA_MATRIX, PROTANOPIA_COMP_MATRIX, DEUTERANOPIA_COMP_MATRIX, TRITANOPIA_COMP_MATRIX, TECHNICOLOR_MATRIX, SOLARIZATION_MATRIX, SYNTHWAVE_MATRIX, GREENSCALE_MATRIX, GRAYSCALE_MATRIX, INVERT_MATRIX, Timeline, engine, createTimeline, SlotRegistry, createSlotRegistry, createCoreSlotRegistry, registerCorePlugin, resolveCoreSlot, SlotRenderable, NativeSpanFeed, Audio, setupAudio, FrameBufferRenderable, ASCIIFontRenderable, Generic, Box, Text, ASCIIFont, Input, Select, TabSelect, FrameBuffer, Code, ScrollBox, vstyles, VRenderable, LineNumberRenderable, DiffRenderable, defaultTextareaKeyBindings, TextareaRenderable, InputRenderableEvents, InputRenderable, TextTableRenderable, MarkdownRenderable, SliderRenderable, ScrollBarRenderable, ArrowRenderable, ScrollBoxRenderable, SelectRenderableEvents, SelectRenderable, TabSelectRenderableEvents, TabSelectRenderable, TimeToFirstDrawRenderable, exports_src2 as exports_src };
11734
11734
 
11735
- //# debugId=FD10850E13870AEB64756E2164756E21
11736
- //# sourceMappingURL=index-hpxarv5s.js.map
11735
+ //# debugId=3EFDBF20709770DB64756E2164756E21
11736
+ //# sourceMappingURL=index-7a82km21.js.map