ink 3.2.0 → 4.1.0
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/build/colorize.d.ts +3 -3
- package/build/colorize.js +30 -35
- package/build/colorize.js.map +1 -1
- package/build/components/App.d.ts +12 -12
- package/build/components/App.js +287 -208
- package/build/components/App.js.map +1 -1
- package/build/components/AppContext.d.ts +2 -2
- package/build/components/AppContext.js +5 -6
- package/build/components/AppContext.js.map +1 -1
- package/build/components/Box.d.ts +77 -5
- package/build/components/Box.js +20 -38
- package/build/components/Box.js.map +1 -1
- package/build/components/ErrorOverview.d.ts +5 -5
- package/build/components/ErrorOverview.js +40 -58
- package/build/components/ErrorOverview.js.map +1 -1
- package/build/components/FocusContext.d.ts +2 -2
- package/build/components/FocusContext.js +13 -14
- package/build/components/FocusContext.js.map +1 -1
- package/build/components/Newline.d.ts +4 -5
- package/build/components/Newline.js +4 -9
- package/build/components/Newline.js.map +1 -1
- package/build/components/Spacer.d.ts +2 -3
- package/build/components/Spacer.js +5 -10
- package/build/components/Spacer.js.map +1 -1
- package/build/components/Static.d.ts +5 -9
- package/build/components/Static.js +12 -33
- package/build/components/Static.js.map +1 -1
- package/build/components/StderrContext.d.ts +4 -4
- package/build/components/StderrContext.js +7 -7
- package/build/components/StderrContext.js.map +1 -1
- package/build/components/StdinContext.d.ts +4 -4
- package/build/components/StdinContext.js +8 -7
- package/build/components/StdinContext.js.map +1 -1
- package/build/components/StdoutContext.d.ts +4 -4
- package/build/components/StdoutContext.js +7 -7
- package/build/components/StdoutContext.js.map +1 -1
- package/build/components/Text.d.ts +9 -10
- package/build/components/Text.js +14 -29
- package/build/components/Text.js.map +1 -1
- package/build/components/Transform.d.ts +4 -5
- package/build/components/Transform.js +4 -11
- package/build/components/Transform.js.map +1 -1
- package/build/devtools-window-polyfill.js +3 -8
- package/build/devtools-window-polyfill.js.map +1 -1
- package/build/devtools.d.ts +1 -1
- package/build/devtools.js +6 -6
- package/build/devtools.js.map +1 -1
- package/build/dom.d.ts +17 -20
- package/build/dom.js +35 -47
- package/build/dom.js.map +1 -1
- package/build/get-max-width.d.ts +3 -3
- package/build/get-max-width.js +8 -11
- package/build/get-max-width.js.map +1 -1
- package/build/hooks/use-app.d.ts +1 -1
- package/build/hooks/use-app.js +4 -9
- package/build/hooks/use-app.js.map +1 -1
- package/build/hooks/use-focus-manager.d.ts +3 -3
- package/build/hooks/use-focus-manager.js +4 -9
- package/build/hooks/use-focus-manager.js.map +1 -1
- package/build/hooks/use-focus.d.ts +4 -4
- package/build/hooks/use-focus.js +11 -16
- package/build/hooks/use-focus.js.map +1 -1
- package/build/hooks/use-input.d.ts +5 -5
- package/build/hooks/use-input.js +13 -14
- package/build/hooks/use-input.js.map +1 -1
- package/build/hooks/use-stderr.d.ts +1 -1
- package/build/hooks/use-stderr.js +4 -9
- package/build/hooks/use-stderr.js.map +1 -1
- package/build/hooks/use-stdin.d.ts +1 -1
- package/build/hooks/use-stdin.js +4 -9
- package/build/hooks/use-stdin.js.map +1 -1
- package/build/hooks/use-stdout.d.ts +1 -1
- package/build/hooks/use-stdout.js +4 -9
- package/build/hooks/use-stdout.js.map +1 -1
- package/build/index.d.ts +27 -20
- package/build/index.js +15 -32
- package/build/index.js.map +1 -1
- package/build/ink.d.ts +6 -4
- package/build/ink.js +188 -99
- package/build/ink.js.map +1 -1
- package/build/instances.d.ts +4 -2
- package/build/instances.js +2 -3
- package/build/instances.js.map +1 -1
- package/build/log-update.d.ts +5 -6
- package/build/log-update.js +8 -12
- package/build/log-update.js.map +1 -1
- package/build/measure-element.d.ts +5 -5
- package/build/measure-element.js +5 -9
- package/build/measure-element.js.map +1 -1
- package/build/measure-text.d.ts +4 -4
- package/build/measure-text.js +7 -10
- package/build/measure-text.js.map +1 -1
- package/build/output.d.ts +12 -4
- package/build/output.js +108 -31
- package/build/output.js.map +1 -1
- package/build/reconciler.d.ts +1 -1
- package/build/reconciler.js +104 -76
- package/build/reconciler.js.map +1 -1
- package/build/render-border.d.ts +4 -4
- package/build/render-border.js +8 -12
- package/build/render-border.js.map +1 -1
- package/build/render-node-to-output.d.ts +3 -3
- package/build/render-node-to-output.js +44 -24
- package/build/render-node-to-output.js.map +1 -1
- package/build/render.d.ts +8 -8
- package/build/render.js +23 -20
- package/build/render.js.map +1 -1
- package/build/renderer.d.ts +5 -5
- package/build/renderer.js +9 -17
- package/build/renderer.js.map +1 -1
- package/build/squash-text-nodes.d.ts +1 -1
- package/build/squash-text-nodes.js +1 -3
- package/build/squash-text-nodes.js.map +1 -1
- package/build/styles.d.ts +30 -9
- package/build/styles.js +60 -46
- package/build/styles.js.map +1 -1
- package/build/wrap-text.d.ts +3 -3
- package/build/wrap-text.js +9 -12
- package/build/wrap-text.js.map +1 -1
- package/license +1 -1
- package/package.json +87 -67
- package/readme.md +202 -57
|
@@ -1,8 +1,26 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Except } from 'type-fest';
|
|
3
|
-
import { Styles } from '../styles';
|
|
4
|
-
import { DOMElement } from '../dom';
|
|
5
|
-
export
|
|
2
|
+
import { type Except } from 'type-fest';
|
|
3
|
+
import { type Styles } from '../styles.js';
|
|
4
|
+
import { type DOMElement } from '../dom.js';
|
|
5
|
+
export type Props = Except<Styles, 'textWrap'> & {
|
|
6
|
+
/**
|
|
7
|
+
* Size of the gap between an element's columns.
|
|
8
|
+
*
|
|
9
|
+
* @default 0
|
|
10
|
+
*/
|
|
11
|
+
readonly columnGap?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Size of the gap between element's rows.
|
|
14
|
+
*
|
|
15
|
+
* @default 0
|
|
16
|
+
*/
|
|
17
|
+
readonly rowGap?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Size of the gap between an element's columns and rows. Shorthand for `columnGap` and `rowGap`.
|
|
20
|
+
*
|
|
21
|
+
* @default 0
|
|
22
|
+
*/
|
|
23
|
+
readonly gap?: number;
|
|
6
24
|
/**
|
|
7
25
|
* Margin on all sides. Equivalent to setting `marginTop`, `marginBottom`, `marginLeft` and `marginRight`.
|
|
8
26
|
*
|
|
@@ -39,11 +57,47 @@ export declare type Props = Except<Styles, 'textWrap'> & {
|
|
|
39
57
|
* @default 0
|
|
40
58
|
*/
|
|
41
59
|
readonly paddingY?: number;
|
|
60
|
+
/**
|
|
61
|
+
* Behavior for an element's overflow in both directions.
|
|
62
|
+
*
|
|
63
|
+
* @default 'visible'
|
|
64
|
+
*/
|
|
65
|
+
readonly overflow?: 'visible' | 'hidden';
|
|
66
|
+
/**
|
|
67
|
+
* Behavior for an element's overflow in horizontal direction.
|
|
68
|
+
*
|
|
69
|
+
* @default 'visible'
|
|
70
|
+
*/
|
|
71
|
+
readonly overflowX?: 'visible' | 'hidden';
|
|
72
|
+
/**
|
|
73
|
+
* Behavior for an element's overflow in vertical direction.
|
|
74
|
+
*
|
|
75
|
+
* @default 'visible'
|
|
76
|
+
*/
|
|
77
|
+
readonly overflowY?: 'visible' | 'hidden';
|
|
42
78
|
};
|
|
43
79
|
/**
|
|
44
80
|
* `<Box>` is an essential Ink component to build your layout. It's like `<div style="display: flex">` in the browser.
|
|
45
81
|
*/
|
|
46
|
-
declare const Box: React.ForwardRefExoticComponent<
|
|
82
|
+
declare const Box: React.ForwardRefExoticComponent<Except<Styles, "textWrap"> & {
|
|
83
|
+
/**
|
|
84
|
+
* Size of the gap between an element's columns.
|
|
85
|
+
*
|
|
86
|
+
* @default 0
|
|
87
|
+
*/
|
|
88
|
+
readonly columnGap?: number | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* Size of the gap between element's rows.
|
|
91
|
+
*
|
|
92
|
+
* @default 0
|
|
93
|
+
*/
|
|
94
|
+
readonly rowGap?: number | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* Size of the gap between an element's columns and rows. Shorthand for `columnGap` and `rowGap`.
|
|
97
|
+
*
|
|
98
|
+
* @default 0
|
|
99
|
+
*/
|
|
100
|
+
readonly gap?: number | undefined;
|
|
47
101
|
/**
|
|
48
102
|
* Margin on all sides. Equivalent to setting `marginTop`, `marginBottom`, `marginLeft` and `marginRight`.
|
|
49
103
|
*
|
|
@@ -80,6 +134,24 @@ declare const Box: React.ForwardRefExoticComponent<Pick<Styles, "position" | "ma
|
|
|
80
134
|
* @default 0
|
|
81
135
|
*/
|
|
82
136
|
readonly paddingY?: number | undefined;
|
|
137
|
+
/**
|
|
138
|
+
* Behavior for an element's overflow in both directions.
|
|
139
|
+
*
|
|
140
|
+
* @default 'visible'
|
|
141
|
+
*/
|
|
142
|
+
readonly overflow?: "visible" | "hidden" | undefined;
|
|
143
|
+
/**
|
|
144
|
+
* Behavior for an element's overflow in horizontal direction.
|
|
145
|
+
*
|
|
146
|
+
* @default 'visible'
|
|
147
|
+
*/
|
|
148
|
+
readonly overflowX?: "visible" | "hidden" | undefined;
|
|
149
|
+
/**
|
|
150
|
+
* Behavior for an element's overflow in vertical direction.
|
|
151
|
+
*
|
|
152
|
+
* @default 'visible'
|
|
153
|
+
*/
|
|
154
|
+
readonly overflowY?: "visible" | "hidden" | undefined;
|
|
83
155
|
} & {
|
|
84
156
|
children?: React.ReactNode;
|
|
85
157
|
} & React.RefAttributes<DOMElement>>;
|
package/build/components/Box.js
CHANGED
|
@@ -1,50 +1,32 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
22
|
-
var t = {};
|
|
23
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
24
|
-
t[p] = s[p];
|
|
25
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
26
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
27
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
28
|
-
t[p[i]] = s[p[i]];
|
|
29
|
-
}
|
|
30
|
-
return t;
|
|
31
|
-
};
|
|
32
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
1
|
/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */
|
|
34
|
-
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
35
3
|
/**
|
|
36
4
|
* `<Box>` is an essential Ink component to build your layout. It's like `<div style="display: flex">` in the browser.
|
|
37
5
|
*/
|
|
38
|
-
const Box =
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
6
|
+
const Box = forwardRef(({ children, ...style }, ref) => {
|
|
7
|
+
const transformedStyle = {
|
|
8
|
+
...style,
|
|
9
|
+
columnGap: style.columnGap || style.gap || 0,
|
|
10
|
+
rowGap: style.rowGap || style.gap || 0,
|
|
11
|
+
marginLeft: style.marginLeft || style.marginX || style.margin || 0,
|
|
12
|
+
marginRight: style.marginRight || style.marginX || style.margin || 0,
|
|
13
|
+
marginTop: style.marginTop || style.marginY || style.margin || 0,
|
|
14
|
+
marginBottom: style.marginBottom || style.marginY || style.margin || 0,
|
|
15
|
+
paddingLeft: style.paddingLeft || style.paddingX || style.padding || 0,
|
|
16
|
+
paddingRight: style.paddingRight || style.paddingX || style.padding || 0,
|
|
17
|
+
paddingTop: style.paddingTop || style.paddingY || style.padding || 0,
|
|
18
|
+
paddingBottom: style.paddingBottom || style.paddingY || style.padding || 0,
|
|
19
|
+
overflowX: style.overflowX || style.overflow || 'visible',
|
|
20
|
+
overflowY: style.overflowY || style.overflow || 'visible'
|
|
21
|
+
};
|
|
22
|
+
return (React.createElement("ink-box", { ref: ref, style: transformedStyle }, children));
|
|
42
23
|
});
|
|
43
24
|
Box.displayName = 'Box';
|
|
44
25
|
Box.defaultProps = {
|
|
26
|
+
flexWrap: 'nowrap',
|
|
45
27
|
flexDirection: 'row',
|
|
46
28
|
flexGrow: 0,
|
|
47
29
|
flexShrink: 1
|
|
48
30
|
};
|
|
49
|
-
|
|
31
|
+
export default Box;
|
|
50
32
|
//# sourceMappingURL=Box.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.js","sourceRoot":"","sources":["../../src/components/Box.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Box.js","sourceRoot":"","sources":["../../src/components/Box.tsx"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,OAAO,KAAK,EAAE,EAAC,UAAU,EAAyB,MAAM,OAAO,CAAC;AA2FhE;;GAEG;AACH,MAAM,GAAG,GAAG,UAAU,CACrB,CAAC,EAAC,QAAQ,EAAE,GAAG,KAAK,EAAC,EAAE,GAAG,EAAE,EAAE;IAC7B,MAAM,gBAAgB,GAAG;QACxB,GAAG,KAAK;QACR,SAAS,EAAE,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,GAAG,IAAI,CAAC;QAC5C,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,CAAC;QACtC,UAAU,EAAE,KAAK,CAAC,UAAU,IAAI,KAAK,CAAC,OAAO,IAAI,KA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|
|
2
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type Props = {
|
|
3
3
|
readonly error: Error;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export
|
|
4
|
+
};
|
|
5
|
+
export default function ErrorOverview({ error }: Props): JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -1,97 +1,79 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
1
|
+
import * as fs from 'node:fs';
|
|
2
|
+
import { cwd } from 'node:process';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import StackUtils from 'stack-utils';
|
|
5
|
+
import codeExcerpt from 'code-excerpt';
|
|
6
|
+
import Box from './Box.js';
|
|
7
|
+
import Text from './Text.js';
|
|
8
|
+
// Error's source file is reported as file:///home/user/file.js
|
|
9
|
+
// This function removes the file://[cwd] part
|
|
10
|
+
const cleanupPath = (path) => {
|
|
11
|
+
return path?.replace(`file://${cwd()}/`, '');
|
|
23
12
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const stack_utils_1 = __importDefault(require("stack-utils"));
|
|
28
|
-
const code_excerpt_1 = __importDefault(require("code-excerpt"));
|
|
29
|
-
const Box_1 = __importDefault(require("./Box"));
|
|
30
|
-
const Text_1 = __importDefault(require("./Text"));
|
|
31
|
-
const stackUtils = new stack_utils_1.default({
|
|
32
|
-
cwd: process.cwd(),
|
|
33
|
-
internals: stack_utils_1.default.nodeInternals()
|
|
13
|
+
const stackUtils = new StackUtils({
|
|
14
|
+
cwd: cwd(),
|
|
15
|
+
internals: StackUtils.nodeInternals()
|
|
34
16
|
});
|
|
35
|
-
|
|
17
|
+
export default function ErrorOverview({ error }) {
|
|
36
18
|
const stack = error.stack ? error.stack.split('\n').slice(1) : undefined;
|
|
37
19
|
const origin = stack ? stackUtils.parseLine(stack[0]) : undefined;
|
|
20
|
+
const filePath = cleanupPath(origin?.file);
|
|
38
21
|
let excerpt;
|
|
39
22
|
let lineWidth = 0;
|
|
40
|
-
if (
|
|
41
|
-
const sourceCode = fs.readFileSync(
|
|
42
|
-
excerpt =
|
|
23
|
+
if (filePath && origin?.line && fs.existsSync(filePath)) {
|
|
24
|
+
const sourceCode = fs.readFileSync(filePath, 'utf8');
|
|
25
|
+
excerpt = codeExcerpt(sourceCode, origin.line);
|
|
43
26
|
if (excerpt) {
|
|
44
27
|
for (const { line } of excerpt) {
|
|
45
28
|
lineWidth = Math.max(lineWidth, String(line).length);
|
|
46
29
|
}
|
|
47
30
|
}
|
|
48
31
|
}
|
|
49
|
-
return (
|
|
50
|
-
|
|
51
|
-
|
|
32
|
+
return (React.createElement(Box, { flexDirection: "column", padding: 1 },
|
|
33
|
+
React.createElement(Box, null,
|
|
34
|
+
React.createElement(Text, { backgroundColor: "red", color: "white" },
|
|
52
35
|
' ',
|
|
53
36
|
"ERROR",
|
|
54
37
|
' '),
|
|
55
|
-
|
|
38
|
+
React.createElement(Text, null,
|
|
56
39
|
" ",
|
|
57
40
|
error.message)),
|
|
58
|
-
origin && (
|
|
59
|
-
|
|
60
|
-
|
|
41
|
+
origin && filePath && (React.createElement(Box, { marginTop: 1 },
|
|
42
|
+
React.createElement(Text, { dimColor: true },
|
|
43
|
+
filePath,
|
|
61
44
|
":",
|
|
62
45
|
origin.line,
|
|
63
46
|
":",
|
|
64
47
|
origin.column))),
|
|
65
|
-
origin && excerpt && (
|
|
66
|
-
|
|
67
|
-
|
|
48
|
+
origin && excerpt && (React.createElement(Box, { marginTop: 1, flexDirection: "column" }, excerpt.map(({ line, value }) => (React.createElement(Box, { key: line },
|
|
49
|
+
React.createElement(Box, { width: lineWidth + 1 },
|
|
50
|
+
React.createElement(Text, { dimColor: line !== origin.line, backgroundColor: line === origin.line ? 'red' : undefined, color: line === origin.line ? 'white' : undefined },
|
|
68
51
|
String(line).padStart(lineWidth, ' '),
|
|
69
52
|
":")),
|
|
70
|
-
|
|
71
|
-
error.stack && (
|
|
53
|
+
React.createElement(Text, { key: line, backgroundColor: line === origin.line ? 'red' : undefined, color: line === origin.line ? 'white' : undefined }, ' ' + value)))))),
|
|
54
|
+
error.stack && (React.createElement(Box, { marginTop: 1, flexDirection: "column" }, error.stack
|
|
72
55
|
.split('\n')
|
|
73
56
|
.slice(1)
|
|
74
57
|
.map(line => {
|
|
75
58
|
const parsedLine = stackUtils.parseLine(line);
|
|
76
59
|
// If the line from the stack cannot be parsed, we print out the unparsed line.
|
|
77
60
|
if (!parsedLine) {
|
|
78
|
-
return (
|
|
79
|
-
|
|
80
|
-
|
|
61
|
+
return (React.createElement(Box, { key: line },
|
|
62
|
+
React.createElement(Text, { dimColor: true }, "- "),
|
|
63
|
+
React.createElement(Text, { dimColor: true, bold: true }, line)));
|
|
81
64
|
}
|
|
82
|
-
return (
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
65
|
+
return (React.createElement(Box, { key: line },
|
|
66
|
+
React.createElement(Text, { dimColor: true }, "- "),
|
|
67
|
+
React.createElement(Text, { dimColor: true, bold: true }, parsedLine.function),
|
|
68
|
+
React.createElement(Text, { dimColor: true, color: "gray" },
|
|
86
69
|
' ',
|
|
87
70
|
"(",
|
|
88
|
-
parsedLine.file,
|
|
71
|
+
cleanupPath(parsedLine.file) ?? '',
|
|
89
72
|
":",
|
|
90
73
|
parsedLine.line,
|
|
91
74
|
":",
|
|
92
75
|
parsedLine.column,
|
|
93
76
|
")")));
|
|
94
77
|
})))));
|
|
95
|
-
}
|
|
96
|
-
exports.default = ErrorOverview;
|
|
78
|
+
}
|
|
97
79
|
//# sourceMappingURL=ErrorOverview.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorOverview.js","sourceRoot":"","sources":["../../src/components/ErrorOverview.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ErrorOverview.js","sourceRoot":"","sources":["../../src/components/ErrorOverview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAC,GAAG,EAAC,MAAM,cAAc,CAAC;AACjC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,WAA+B,MAAM,cAAc,CAAC;AAC3D,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,+DAA+D;AAC/D,8CAA8C;AAC9C,MAAM,WAAW,GAAG,CAAC,IAAwB,EAAsB,EAAE;IACpE,OAAO,IAAI,EAAE,OAAO,CAAC,UAAU,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;AAC9C,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC;IACjC,GAAG,EAAE,GAAG,EAAE;IACV,SAAS,EAAE,UAAU,CAAC,aAAa,EAAE;CACrC,CAAC,CAAC;AAMH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAAC,KAAK,EAAQ;IACnD,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACzE,MAAM,MAAM,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AQ,eAAU;oBACxB,oBAAC,IAAI,IAAC,QAAQ,QAAC,IAAI,UACjB,IAAI,CACC,CACF,CACN,CAAC;aACF;YAED,OAAO,CACN,oBAAC,GAAG,IAAC,GAAG,EAAE,IAAI;gBACb,oBAAC,IAAI,IAAC,QAAQ,eAAU;gBACxB,oBAAC,IAAI,IAAC,QAAQ,QAAC,IAAI,UACjB,UAAU,CAAC,QAAQ,CACd;gBACP,oBAAC,IAAI,IAAC,QAAQ,QAAC,KAAK,EAAC,MAAM;oBACzB,GAAG;;oBACF,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE;;oBAAG,UAAU,CAAC,IAAI;;oBACrD,UAAU,CAAC,MAAM;wBACZ,CACF,CACN,CAAC;QACH,CAAC,CAAC,CACE,CACN,CACI,CACN,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export
|
|
2
|
+
export type Props = {
|
|
3
3
|
readonly activeId?: string;
|
|
4
4
|
readonly add: (id: string, options: {
|
|
5
5
|
autoFocus: boolean;
|
|
@@ -12,6 +12,6 @@ export interface Props {
|
|
|
12
12
|
readonly focusNext: () => void;
|
|
13
13
|
readonly focusPrevious: () => void;
|
|
14
14
|
readonly focus: (id: string) => void;
|
|
15
|
-
}
|
|
15
|
+
};
|
|
16
16
|
declare const FocusContext: import("react").Context<Props>;
|
|
17
17
|
export default FocusContext;
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
const FocusContext = react_1.createContext({
|
|
1
|
+
import { createContext } from 'react';
|
|
2
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
3
|
+
const FocusContext = createContext({
|
|
5
4
|
activeId: undefined,
|
|
6
|
-
add
|
|
7
|
-
remove
|
|
8
|
-
activate
|
|
9
|
-
deactivate
|
|
10
|
-
enableFocus
|
|
11
|
-
disableFocus
|
|
12
|
-
focusNext
|
|
13
|
-
focusPrevious
|
|
14
|
-
focus
|
|
5
|
+
add() { },
|
|
6
|
+
remove() { },
|
|
7
|
+
activate() { },
|
|
8
|
+
deactivate() { },
|
|
9
|
+
enableFocus() { },
|
|
10
|
+
disableFocus() { },
|
|
11
|
+
focusNext() { },
|
|
12
|
+
focusPrevious() { },
|
|
13
|
+
focus() { }
|
|
15
14
|
});
|
|
16
15
|
FocusContext.displayName = 'InternalFocusContext';
|
|
17
|
-
|
|
16
|
+
export default FocusContext;
|
|
18
17
|
//# sourceMappingURL=FocusContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FocusContext.js","sourceRoot":"","sources":["../../src/components/FocusContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FocusContext.js","sourceRoot":"","sources":["../../src/components/FocusContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AAepC,gEAAgE;AAChE,MAAM,YAAY,GAAG,aAAa,CAAQ;IACzC,QAAQ,EAAE,SAAS;IACnB,GAAG,KAAI,CAAC;IACR,MAAM,KAAI,CAAC;IACX,QAAQ,KAAI,CAAC;IACb,UAAU,KAAI,CAAC;IACf,WAAW,KAAI,CAAC;IAChB,YAAY,KAAI,CAAC;IACjB,SAAS,KAAI,CAAC;IACd,aAAa,KAAI,CAAC;IAClB,KAAK,KAAI,CAAC;CACV,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,GAAG,sBAAsB,CAAC;AAElD,eAAe,YAAY,CAAC"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type Props = {
|
|
3
3
|
/**
|
|
4
4
|
* Number of newlines to insert.
|
|
5
5
|
*
|
|
6
6
|
* @default 1
|
|
7
7
|
*/
|
|
8
8
|
readonly count?: number;
|
|
9
|
-
}
|
|
9
|
+
};
|
|
10
10
|
/**
|
|
11
11
|
* Adds one or more newline (\n) characters. Must be used within <Text> components.
|
|
12
12
|
*/
|
|
13
|
-
|
|
14
|
-
export default Newline;
|
|
13
|
+
export default function Newline({ count }: Props): JSX.Element;
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
1
|
+
import React from 'react';
|
|
7
2
|
/**
|
|
8
3
|
* Adds one or more newline (\n) characters. Must be used within <Text> components.
|
|
9
4
|
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
export default function Newline({ count = 1 }) {
|
|
6
|
+
return React.createElement("ink-text", null, '\n'.repeat(count));
|
|
7
|
+
}
|
|
13
8
|
//# sourceMappingURL=Newline.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Newline.js","sourceRoot":"","sources":["../../src/components/Newline.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Newline.js","sourceRoot":"","sources":["../../src/components/Newline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAAC,KAAK,GAAG,CAAC,EAAQ;IACjD,OAAO,sCAAW,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAY,CAAC;AAClD,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
/**
|
|
3
3
|
* A flexible space that expands along the major axis of its containing layout.
|
|
4
4
|
* It's useful as a shortcut for filling all the available spaces between elements.
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
export default Spacer;
|
|
6
|
+
export default function Spacer(): JSX.Element;
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const Box_1 = __importDefault(require("./Box"));
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Box from './Box.js';
|
|
8
3
|
/**
|
|
9
4
|
* A flexible space that expands along the major axis of its containing layout.
|
|
10
5
|
* It's useful as a shortcut for filling all the available spaces between elements.
|
|
11
6
|
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
export default function Spacer() {
|
|
8
|
+
return React.createElement(Box, { flexGrow: 1 });
|
|
9
|
+
}
|
|
15
10
|
//# sourceMappingURL=Spacer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spacer.js","sourceRoot":"","sources":["../../src/components/Spacer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Spacer.js","sourceRoot":"","sources":["../../src/components/Spacer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,UAAU,CAAC;AAE3B;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM;IAC7B,OAAO,oBAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,GAAI,CAAC;AAC7B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { Styles } from '../styles';
|
|
3
|
-
export
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type Styles } from '../styles.js';
|
|
3
|
+
export type Props<T> = {
|
|
4
4
|
/**
|
|
5
5
|
* Array of items of any type to render using a function you pass as a component child.
|
|
6
6
|
*/
|
|
@@ -15,7 +15,7 @@ export interface Props<T> {
|
|
|
15
15
|
* Note that `key` must be assigned to the root component.
|
|
16
16
|
*/
|
|
17
17
|
readonly children: (item: T, index: number) => ReactNode;
|
|
18
|
-
}
|
|
18
|
+
};
|
|
19
19
|
/**
|
|
20
20
|
* `<Static>` component permanently renders its output above everything else.
|
|
21
21
|
* It's useful for displaying activity like completed tasks or logs - things that
|
|
@@ -28,8 +28,4 @@ export interface Props<T> {
|
|
|
28
28
|
* a list of completed tests. [Gatsby](https://github.com/gatsbyjs/gatsby) uses it
|
|
29
29
|
* to display a list of generated pages, while still displaying a live progress bar.
|
|
30
30
|
*/
|
|
31
|
-
|
|
32
|
-
<T>(props: Props<T>): JSX.Element;
|
|
33
|
-
displayName: string;
|
|
34
|
-
};
|
|
35
|
-
export default Static;
|
|
31
|
+
export default function Static<T>(props: Props<T>): JSX.Element;
|
|
@@ -1,25 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
const react_1 = __importStar(require("react"));
|
|
1
|
+
import React, { useMemo, useState, useLayoutEffect } from 'react';
|
|
23
2
|
/**
|
|
24
3
|
* `<Static>` component permanently renders its output above everything else.
|
|
25
4
|
* It's useful for displaying activity like completed tasks or logs - things that
|
|
@@ -32,23 +11,23 @@ const react_1 = __importStar(require("react"));
|
|
|
32
11
|
* a list of completed tests. [Gatsby](https://github.com/gatsbyjs/gatsby) uses it
|
|
33
12
|
* to display a list of generated pages, while still displaying a live progress bar.
|
|
34
13
|
*/
|
|
35
|
-
|
|
14
|
+
export default function Static(props) {
|
|
36
15
|
const { items, children: render, style: customStyle } = props;
|
|
37
|
-
const [index, setIndex] =
|
|
38
|
-
const itemsToRender =
|
|
16
|
+
const [index, setIndex] = useState(0);
|
|
17
|
+
const itemsToRender = useMemo(() => {
|
|
39
18
|
return items.slice(index);
|
|
40
19
|
}, [items, index]);
|
|
41
|
-
|
|
20
|
+
useLayoutEffect(() => {
|
|
42
21
|
setIndex(items.length);
|
|
43
22
|
}, [items.length]);
|
|
44
23
|
const children = itemsToRender.map((item, itemIndex) => {
|
|
45
24
|
return render(item, index + itemIndex);
|
|
46
25
|
});
|
|
47
|
-
const style =
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
|
|
26
|
+
const style = useMemo(() => ({
|
|
27
|
+
position: 'absolute',
|
|
28
|
+
flexDirection: 'column',
|
|
29
|
+
...customStyle
|
|
30
|
+
}), [customStyle]);
|
|
31
|
+
return (React.createElement("ink-box", { internal_static: true, style: style }, children));
|
|
32
|
+
}
|
|
54
33
|
//# sourceMappingURL=Static.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Static.js","sourceRoot":"","sources":["../../src/components/Static.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Static.js","sourceRoot":"","sources":["../../src/components/Static.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAiB,MAAM,OAAO,CAAC;AAsBhF;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAAI,KAAe;IAChD,MAAM,EAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAC,GAAG,KAAK,CAAC;IAC5D,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAEtC,MAAM,aAAa,GAAQ,OAAO,CAAC,GAAG,EAAE;QACvC,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;IAEnB,eAAe,CAAC,GAAG,EAAE;QACpB,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACxB,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAEnB,MAAM,QAAQ,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE;QACtD,OAAO,MAAM,CAAC,IAAI,EAAE,KAAK,GAAG,SAAS,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;IAEH,MAAM,KAAK,GAAW,OAAO,CAC5B,GAAG,EAAE,CAAC,CAAC;QACN,QAAQ,EAAE,UAAU;QACpB,aAAa,EAAE,QAAQ;QACvB,GAAG,WAAW;KACd,CAAC,EACF,CAAC,WAAW,CAAC,CACb,CAAC;IAEF,OAAO,CACN,iCAAS,eAAe,QAAC,KAAK,EAAE,KAAK,IACnC,QAAQ,CACA,CACV,CAAC;AACH,CAAC"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
2
|
/// <reference types="react" />
|
|
3
|
-
export
|
|
3
|
+
export type Props = {
|
|
4
4
|
/**
|
|
5
5
|
* Stderr stream passed to `render()` in `options.stderr` or `process.stderr` by default.
|
|
6
6
|
*/
|
|
7
|
-
readonly stderr
|
|
7
|
+
readonly stderr: NodeJS.WriteStream;
|
|
8
8
|
/**
|
|
9
9
|
* Write any string to stderr, while preserving Ink's output.
|
|
10
10
|
* It's useful when you want to display some external information outside of Ink's rendering and ensure there's no conflict between the two.
|
|
11
11
|
* It's similar to `<Static>`, except it can't accept components, it only works with strings.
|
|
12
12
|
*/
|
|
13
13
|
readonly write: (data: string) => void;
|
|
14
|
-
}
|
|
14
|
+
};
|
|
15
15
|
/**
|
|
16
16
|
* `StderrContext` is a React context, which exposes stderr stream.
|
|
17
17
|
*/
|