@opentui/core 0.0.0-20251202-71dcabc4 → 0.0.0-20251202-52296102

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/index.js CHANGED
@@ -9,7 +9,9 @@ import {
9
9
  ConsolePosition,
10
10
  DataPathsManager,
11
11
  DebugOverlayCorner,
12
+ Edge,
12
13
  ExtmarksController,
14
+ Gutter,
13
15
  InternalKeyHandler,
14
16
  KeyEvent,
15
17
  KeyHandler,
@@ -17,6 +19,7 @@ import {
17
19
  LinearScrollAccel,
18
20
  LogLevel,
19
21
  MacOSScrollAccel,
22
+ MeasureMode,
20
23
  MouseButton,
21
24
  MouseEvent,
22
25
  MouseParser,
@@ -35,7 +38,6 @@ import {
35
38
  TextAttributes,
36
39
  TextBuffer,
37
40
  TreeSitterClient,
38
- __toESM,
39
41
  addDefaultParsers,
40
42
  bg,
41
43
  bgBlack,
@@ -72,6 +74,7 @@ import {
72
74
  dim,
73
75
  env,
74
76
  envRegistry,
77
+ exports_dist,
75
78
  extToFiletype,
76
79
  fg,
77
80
  fonts,
@@ -120,7 +123,6 @@ import {
120
123
  red,
121
124
  registerEnvVar,
122
125
  renderFontToFrameBuffer,
123
- require_dist,
124
126
  resolveRenderLib,
125
127
  reverse,
126
128
  rgbToHex,
@@ -135,7 +137,8 @@ import {
135
137
  white,
136
138
  wrapWithDelegates,
137
139
  yellow
138
- } from "./index-r6acnfwr.js";
140
+ } from "./index-re80811e.js";
141
+ import"./index-g8dczzvv.js";
139
142
  // src/text-buffer-view.ts
140
143
  class TextBufferView {
141
144
  lib;
@@ -2199,7 +2202,6 @@ class ASCIIFontRenderable extends FrameBufferRenderable {
2199
2202
  }
2200
2203
  }
2201
2204
  // src/renderables/Box.ts
2202
- var import_bun_yoga = __toESM(require_dist(), 1);
2203
2205
  function isGapType(value) {
2204
2206
  if (value === undefined) {
2205
2207
  return true;
@@ -2378,45 +2380,44 @@ class BoxRenderable extends Renderable {
2378
2380
  }
2379
2381
  applyYogaBorders() {
2380
2382
  const node = this.yogaNode;
2381
- node.setBorder(import_bun_yoga.Edge.Left, this.borderSides.left ? 1 : 0);
2382
- node.setBorder(import_bun_yoga.Edge.Right, this.borderSides.right ? 1 : 0);
2383
- node.setBorder(import_bun_yoga.Edge.Top, this.borderSides.top ? 1 : 0);
2384
- node.setBorder(import_bun_yoga.Edge.Bottom, this.borderSides.bottom ? 1 : 0);
2383
+ node.setBorder(Edge.Left, this.borderSides.left ? 1 : 0);
2384
+ node.setBorder(Edge.Right, this.borderSides.right ? 1 : 0);
2385
+ node.setBorder(Edge.Top, this.borderSides.top ? 1 : 0);
2386
+ node.setBorder(Edge.Bottom, this.borderSides.bottom ? 1 : 0);
2385
2387
  this.requestRender();
2386
2388
  }
2387
2389
  applyYogaGap(options) {
2388
2390
  const node = this.yogaNode;
2389
2391
  if (isGapType(options.gap)) {
2390
- node.setGap(import_bun_yoga.Gutter.All, options.gap);
2392
+ node.setGap(Gutter.All, options.gap);
2391
2393
  }
2392
2394
  if (isGapType(options.rowGap)) {
2393
- node.setGap(import_bun_yoga.Gutter.Row, options.rowGap);
2395
+ node.setGap(Gutter.Row, options.rowGap);
2394
2396
  }
2395
2397
  if (isGapType(options.columnGap)) {
2396
- node.setGap(import_bun_yoga.Gutter.Column, options.columnGap);
2398
+ node.setGap(Gutter.Column, options.columnGap);
2397
2399
  }
2398
2400
  }
2399
2401
  set gap(gap) {
2400
2402
  if (isGapType(gap)) {
2401
- this.yogaNode.setGap(import_bun_yoga.Gutter.All, gap);
2403
+ this.yogaNode.setGap(Gutter.All, gap);
2402
2404
  this.requestRender();
2403
2405
  }
2404
2406
  }
2405
2407
  set rowGap(rowGap) {
2406
2408
  if (isGapType(rowGap)) {
2407
- this.yogaNode.setGap(import_bun_yoga.Gutter.Row, rowGap);
2409
+ this.yogaNode.setGap(Gutter.Row, rowGap);
2408
2410
  this.requestRender();
2409
2411
  }
2410
2412
  }
2411
2413
  set columnGap(columnGap) {
2412
2414
  if (isGapType(columnGap)) {
2413
- this.yogaNode.setGap(import_bun_yoga.Gutter.Column, columnGap);
2415
+ this.yogaNode.setGap(Gutter.Column, columnGap);
2414
2416
  this.requestRender();
2415
2417
  }
2416
2418
  }
2417
2419
  }
2418
2420
  // src/renderables/TextBufferRenderable.ts
2419
- var import_bun_yoga2 = __toESM(require_dist(), 1);
2420
2421
  class TextBufferRenderable extends Renderable {
2421
2422
  selectable = true;
2422
2423
  _defaultFg;
@@ -2689,7 +2690,7 @@ class TextBufferRenderable extends Renderable {
2689
2690
  setupMeasureFunc() {
2690
2691
  const measureFunc = (width, widthMode, height, heightMode) => {
2691
2692
  let effectiveWidth;
2692
- if (widthMode === import_bun_yoga2.MeasureMode.Undefined || isNaN(width)) {
2693
+ if (widthMode === MeasureMode.Undefined || isNaN(width)) {
2693
2694
  effectiveWidth = 0;
2694
2695
  } else {
2695
2696
  effectiveWidth = width;
@@ -2698,7 +2699,7 @@ class TextBufferRenderable extends Renderable {
2698
2699
  const measureResult = this.textBufferView.measureForDimensions(Math.floor(effectiveWidth), Math.floor(effectiveHeight));
2699
2700
  const measuredWidth = measureResult ? Math.max(1, measureResult.maxWidth) : 1;
2700
2701
  const measuredHeight = measureResult ? Math.max(1, measureResult.lineCount) : 1;
2701
- if (widthMode === import_bun_yoga2.MeasureMode.AtMost && this._positionType !== "absolute") {
2702
+ if (widthMode === MeasureMode.AtMost && this._positionType !== "absolute") {
2702
2703
  return {
2703
2704
  width: Math.min(effectiveWidth, measuredWidth),
2704
2705
  height: Math.min(effectiveHeight, measuredHeight)
@@ -7499,8 +7500,6 @@ class TabSelectRenderable extends Renderable {
7499
7500
  }
7500
7501
  }
7501
7502
  // src/renderables/EditBufferRenderable.ts
7502
- var import_bun_yoga3 = __toESM(require_dist(), 1);
7503
-
7504
7503
  class EditBufferRenderable extends Renderable {
7505
7504
  _focusable = true;
7506
7505
  selectable = true;
@@ -7800,7 +7799,7 @@ class EditBufferRenderable extends Renderable {
7800
7799
  setupMeasureFunc() {
7801
7800
  const measureFunc = (width, widthMode, height, heightMode) => {
7802
7801
  let effectiveWidth;
7803
- if (widthMode === import_bun_yoga3.MeasureMode.Undefined || isNaN(width)) {
7802
+ if (widthMode === MeasureMode.Undefined || isNaN(width)) {
7804
7803
  effectiveWidth = 0;
7805
7804
  } else {
7806
7805
  effectiveWidth = width;
@@ -7809,7 +7808,7 @@ class EditBufferRenderable extends Renderable {
7809
7808
  const measureResult = this.editorView.measureForDimensions(Math.floor(effectiveWidth), Math.floor(effectiveHeight));
7810
7809
  const measuredWidth = measureResult ? Math.max(1, measureResult.maxWidth) : 1;
7811
7810
  const measuredHeight = measureResult ? Math.max(1, measureResult.lineCount) : 1;
7812
- if (widthMode === import_bun_yoga3.MeasureMode.AtMost && this._positionType !== "absolute") {
7811
+ if (widthMode === MeasureMode.AtMost && this._positionType !== "absolute") {
7813
7812
  return {
7814
7813
  width: Math.min(effectiveWidth, measuredWidth),
7815
7814
  height: Math.min(effectiveHeight, measuredHeight)
@@ -8471,8 +8470,6 @@ class TextareaRenderable extends EditBufferRenderable {
8471
8470
  return this.editorView.extmarks;
8472
8471
  }
8473
8472
  }
8474
- // src/index.ts
8475
- var Yoga = __toESM(require_dist(), 1);
8476
8473
  export {
8477
8474
  yellow,
8478
8475
  wrapWithDelegates,
@@ -8582,7 +8579,7 @@ export {
8582
8579
  applyChromaticAberration,
8583
8580
  applyAsciiArt,
8584
8581
  addDefaultParsers,
8585
- Yoga,
8582
+ exports_dist as Yoga,
8586
8583
  VignetteEffect,
8587
8584
  VRenderable,
8588
8585
  TreeSitterClient,
@@ -8660,5 +8657,5 @@ export {
8660
8657
  ASCIIFont
8661
8658
  };
8662
8659
 
8663
- //# debugId=FC7E508FCF3C484F64756E2164756E21
8660
+ //# debugId=626300641E77A75764756E2164756E21
8664
8661
  //# sourceMappingURL=index.js.map