toolcraft-openapi 0.0.235 → 0.0.236

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.
@@ -33,12 +33,12 @@
33
33
  },
34
34
  {
35
35
  "name": "toolcraft-openapi",
36
- "version": "0.0.235",
36
+ "version": "0.0.236",
37
37
  "license": "MIT"
38
38
  },
39
39
  {
40
40
  "name": "toolcraft-schema",
41
- "version": "0.0.235",
41
+ "version": "0.0.236",
42
42
  "license": "MIT"
43
43
  },
44
44
  {
@@ -37,6 +37,7 @@ export function createDashboard(opts = {}) {
37
37
  const performanceMonitor = createRenderPerformanceMonitor();
38
38
  let showPerformance = false;
39
39
  let scrollOffset = 0;
40
+ let outputViewportHeight = 0;
40
41
  let heldOutput;
41
42
  let renderTimer;
42
43
  function appendOutput(item) {
@@ -109,11 +110,7 @@ export function createDashboard(opts = {}) {
109
110
  command === "scroll-down" ||
110
111
  command === "page-up" ||
111
112
  command === "page-down") {
112
- const page = Math.max(1, computeDashboardLayout({
113
- totalWidth: driver.getSize().cols,
114
- totalHeight: driver.getSize().rows,
115
- rightPaneWidth
116
- }).leftPane.height);
113
+ const page = Math.max(1, outputViewportHeight);
117
114
  const amount = command === "page-up" || command === "page-down" ? page : 1;
118
115
  const direction = command === "scroll-up" || command === "page-up" ? 1 : -1;
119
116
  if (direction > 0)
@@ -211,7 +208,8 @@ export function createDashboard(opts = {}) {
211
208
  layout.rightPane.height -= height;
212
209
  }
213
210
  }
214
- scrollOffset = renderOutputPane(nextBuffer, { ...layout.leftPane, height: Math.max(0, layout.leftPane.height - (showPerformance ? 1 : 0)) }, heldOutput ?? state.output, scrollOffset);
211
+ outputViewportHeight = Math.max(0, layout.leftPane.height - (showPerformance ? 1 : 0));
212
+ scrollOffset = renderOutputPane(nextBuffer, { ...layout.leftPane, height: outputViewportHeight }, heldOutput ?? state.output, scrollOffset);
215
213
  if (scrollOffset === 0)
216
214
  heldOutput = undefined;
217
215
  renderStatsPane(nextBuffer, layout.rightPane, state.stats);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toolcraft-schema",
3
- "version": "0.0.235",
3
+ "version": "0.0.236",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toolcraft-openapi",
3
- "version": "0.0.235",
3
+ "version": "0.0.236",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -30,7 +30,7 @@
30
30
  "toolcraft-openapi-generate": "dist/bin/generate.js"
31
31
  },
32
32
  "dependencies": {
33
- "toolcraft": "0.0.235",
33
+ "toolcraft": "0.0.236",
34
34
  "fast-string-width": "^3.0.2",
35
35
  "fast-wrap-ansi": "^0.2.0",
36
36
  "sisteransi": "^1.0.5",
@@ -45,7 +45,7 @@
45
45
  "directory": "packages/toolcraft-openapi"
46
46
  },
47
47
  "optionalDependencies": {
48
- "toolcraft-schema": "0.0.235",
48
+ "toolcraft-schema": "0.0.236",
49
49
  "toolcraft-design": "*",
50
50
  "@poe-code/frontmatter": "*"
51
51
  },