@fairyhunter13/opentui-core 0.1.113 → 0.1.115

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.
@@ -167,7 +167,7 @@ import {
167
167
  white,
168
168
  wrapWithDelegates,
169
169
  yellow
170
- } from "./index-dcj62y8t.js";
170
+ } from "./index-tse8gzh0.js";
171
171
 
172
172
  // src/index.ts
173
173
  var exports_src2 = {};
@@ -9525,6 +9525,20 @@ class MarkdownRenderable extends Renderable {
9525
9525
  }
9526
9526
  chunks.push(this.createDefaultChunk(`
9527
9527
  `));
9528
+ } else if (markedChild.type === "table") {
9529
+ const tbl = markedChild;
9530
+ const headerCells = tbl.header.map((h2) => h2.text || " ").join(" | ");
9531
+ const sepCells = tbl.header.map(() => "---").join(" | ");
9532
+ const tableLines = [
9533
+ `| ${headerCells} |`,
9534
+ `| ${sepCells} |`,
9535
+ ...tbl.rows.map((row) => `| ${row.map((c) => c.text || " ").join(" | ")} |`)
9536
+ ];
9537
+ for (const line of tableLines) {
9538
+ chunks.push(this.createChunk("\u258E ", "markup.quote"));
9539
+ chunks.push(this.createDefaultChunk(line + `
9540
+ `));
9541
+ }
9528
9542
  } else {
9529
9543
  chunks.push(this.createChunk("\u258E ", "markup.quote"));
9530
9544
  this.renderBlockTokenInline(markedChild, chunks);
@@ -9651,6 +9665,31 @@ class MarkdownRenderable extends Renderable {
9651
9665
  continue;
9652
9666
  } else if (markedSub.type === "paragraph" && "tokens" in markedSub) {
9653
9667
  this.renderInlineContent(markedSub.tokens, chunks);
9668
+ } else if (markedSub.type === "code") {
9669
+ if (chunks.length > 0 && !chunks[chunks.length - 1].text.endsWith(`
9670
+ `)) {
9671
+ chunks[chunks.length - 1] = { ...chunks[chunks.length - 1], text: chunks[chunks.length - 1].text + `
9672
+ ` };
9673
+ } else {
9674
+ chunks.push(this.createDefaultChunk(`
9675
+ `));
9676
+ }
9677
+ const codeLines = markedSub.text.split(`
9678
+ `);
9679
+ const codeStyle = this.getStyle("markup.raw") || this.getStyle("default");
9680
+ for (const codeLine of codeLines) {
9681
+ chunks.push(this.createDefaultChunk(indent + " "));
9682
+ chunks.push({
9683
+ __isChunk: true,
9684
+ text: codeLine,
9685
+ fg: codeStyle?.fg,
9686
+ bg: codeStyle?.bg,
9687
+ attributes: 0
9688
+ });
9689
+ chunks.push(this.createDefaultChunk(`
9690
+ `));
9691
+ }
9692
+ continue;
9654
9693
  } else {
9655
9694
  this.renderInlineToken(markedSub, chunks);
9656
9695
  }
@@ -12256,5 +12295,5 @@ class TimeToFirstDrawRenderable extends Renderable {
12256
12295
  }
12257
12296
  export { TextBufferView, convertThemeToStyles, SyntaxStyle, 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, FrameBufferRenderable, ASCIIFontRenderable, BoxRenderable, TextBufferRenderable, CodeRenderable, isTextNodeRenderable, TextNodeRenderable, RootTextNodeRenderable, Generic, Box, Text, ASCIIFont, Input, Select, TabSelect, FrameBuffer, Code, ScrollBox, vstyles, VRenderable, LineNumberRenderable, TextRenderable, DiffRenderable, TextareaRenderable, InputRenderableEvents, InputRenderable, TextTableRenderable, MarkdownRenderable, SliderRenderable, ScrollBarRenderable, ArrowRenderable, ScrollBoxRenderable, SelectRenderableEvents, SelectRenderable, TabSelectRenderableEvents, TabSelectRenderable, TimeToFirstDrawRenderable, exports_src2 as exports_src };
12258
12297
 
12259
- //# debugId=46208B9A2D3BDE9C64756E2164756E21
12260
- //# sourceMappingURL=index-9vwc3fg6.js.map
12298
+ //# debugId=2DA8089E55F2756B64756E2164756E21
12299
+ //# sourceMappingURL=index-vv2jcd4r.js.map