ink 5.0.0 → 5.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.
@@ -0,0 +1,175 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _yogaLayoutPrebuilt = _interopRequireDefault(require("yoga-layout-prebuilt"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+
12
+ const applyMarginStyles = (node, style) => {
13
+ if (style.margin) {
14
+ node.setMargin(_yogaLayoutPrebuilt.default.EDGE_TOP, style.margin);
15
+ node.setMargin(_yogaLayoutPrebuilt.default.EDGE_BOTTOM, style.margin);
16
+ node.setMargin(_yogaLayoutPrebuilt.default.EDGE_START, style.margin);
17
+ node.setMargin(_yogaLayoutPrebuilt.default.EDGE_END, style.margin);
18
+ }
19
+
20
+ if (style.marginX) {
21
+ node.setMargin(_yogaLayoutPrebuilt.default.EDGE_START, style.marginX);
22
+ node.setMargin(_yogaLayoutPrebuilt.default.EDGE_END, style.marginX);
23
+ }
24
+
25
+ if (style.marginY) {
26
+ node.setMargin(_yogaLayoutPrebuilt.default.EDGE_TOP, style.marginY);
27
+ node.setMargin(_yogaLayoutPrebuilt.default.EDGE_BOTTOM, style.marginY);
28
+ }
29
+
30
+ if (style.marginTop) {
31
+ node.setMargin(_yogaLayoutPrebuilt.default.EDGE_TOP, style.marginTop);
32
+ }
33
+
34
+ if (style.marginBottom) {
35
+ node.setMargin(_yogaLayoutPrebuilt.default.EDGE_BOTTOM, style.marginBottom);
36
+ }
37
+
38
+ if (style.marginLeft) {
39
+ node.setMargin(_yogaLayoutPrebuilt.default.EDGE_START, style.marginLeft);
40
+ }
41
+
42
+ if (style.marginRight) {
43
+ node.setMargin(_yogaLayoutPrebuilt.default.EDGE_END, style.marginRight);
44
+ }
45
+ };
46
+
47
+ const applyPaddingStyles = (node, style) => {
48
+ if (style.padding) {
49
+ node.setPadding(_yogaLayoutPrebuilt.default.EDGE_TOP, style.padding);
50
+ node.setPadding(_yogaLayoutPrebuilt.default.EDGE_BOTTOM, style.padding);
51
+ node.setPadding(_yogaLayoutPrebuilt.default.EDGE_LEFT, style.padding);
52
+ node.setPadding(_yogaLayoutPrebuilt.default.EDGE_RIGHT, style.padding);
53
+ }
54
+
55
+ if (style.paddingX) {
56
+ node.setPadding(_yogaLayoutPrebuilt.default.EDGE_LEFT, style.paddingX);
57
+ node.setPadding(_yogaLayoutPrebuilt.default.EDGE_RIGHT, style.paddingX);
58
+ }
59
+
60
+ if (style.paddingY) {
61
+ node.setPadding(_yogaLayoutPrebuilt.default.EDGE_TOP, style.paddingY);
62
+ node.setPadding(_yogaLayoutPrebuilt.default.EDGE_BOTTOM, style.paddingY);
63
+ }
64
+
65
+ if (style.paddingTop) {
66
+ node.setPadding(_yogaLayoutPrebuilt.default.EDGE_TOP, style.paddingTop);
67
+ }
68
+
69
+ if (style.paddingBottom) {
70
+ node.setPadding(_yogaLayoutPrebuilt.default.EDGE_BOTTOM, style.paddingBottom);
71
+ }
72
+
73
+ if (style.paddingLeft) {
74
+ node.setPadding(_yogaLayoutPrebuilt.default.EDGE_LEFT, style.paddingLeft);
75
+ }
76
+
77
+ if (style.paddingRight) {
78
+ node.setPadding(_yogaLayoutPrebuilt.default.EDGE_RIGHT, style.paddingRight);
79
+ }
80
+ };
81
+
82
+ const applyFlexStyles = (node, style) => {
83
+ if (style.flexGrow) {
84
+ node.setFlexGrow(style.flexGrow);
85
+ }
86
+
87
+ if (style.flexShrink) {
88
+ node.setFlexShrink(style.flexShrink);
89
+ }
90
+
91
+ if (style.flexDirection) {
92
+ if (style.flexDirection === 'row') {
93
+ node.setFlexDirection(_yogaLayoutPrebuilt.default.FLEX_DIRECTION_ROW);
94
+ }
95
+
96
+ if (style.flexDirection === 'row-reverse') {
97
+ node.setFlexDirection(_yogaLayoutPrebuilt.default.FLEX_DIRECTION_ROW_REVERSE);
98
+ }
99
+
100
+ if (style.flexDirection === 'column') {
101
+ node.setFlexDirection(_yogaLayoutPrebuilt.default.FLEX_DIRECTION_COLUMN);
102
+ }
103
+
104
+ if (style.flexDirection === 'column-reverse') {
105
+ node.setFlexDirection(_yogaLayoutPrebuilt.default.FLEX_DIRECTION_COLUMN_REVERSE);
106
+ }
107
+ }
108
+
109
+ if (style.flexBasis !== undefined) {
110
+ node.setFlexBasis(style.flexBasis);
111
+ }
112
+
113
+ if (style.alignItems) {
114
+ if (style.alignItems === 'flex-start') {
115
+ node.setAlignItems(_yogaLayoutPrebuilt.default.ALIGN_FLEX_START);
116
+ }
117
+
118
+ if (style.alignItems === 'center') {
119
+ node.setAlignItems(_yogaLayoutPrebuilt.default.ALIGN_CENTER);
120
+ }
121
+
122
+ if (style.alignItems === 'flex-end') {
123
+ node.setAlignItems(_yogaLayoutPrebuilt.default.ALIGN_FLEX_END);
124
+ }
125
+ }
126
+
127
+ if (style.justifyContent) {
128
+ if (style.justifyContent === 'flex-start') {
129
+ node.setJustifyContent(_yogaLayoutPrebuilt.default.JUSTIFY_FLEX_START);
130
+ }
131
+
132
+ if (style.justifyContent === 'center') {
133
+ node.setJustifyContent(_yogaLayoutPrebuilt.default.JUSTIFY_CENTER);
134
+ }
135
+
136
+ if (style.justifyContent === 'flex-end') {
137
+ node.setJustifyContent(_yogaLayoutPrebuilt.default.JUSTIFY_FLEX_END);
138
+ }
139
+
140
+ if (style.justifyContent === 'space-between') {
141
+ node.setJustifyContent(_yogaLayoutPrebuilt.default.JUSTIFY_SPACE_BETWEEN);
142
+ }
143
+
144
+ if (style.justifyContent === 'space-around') {
145
+ node.setJustifyContent(_yogaLayoutPrebuilt.default.JUSTIFY_SPACE_AROUND);
146
+ }
147
+ }
148
+ };
149
+
150
+ const applyDimensionStyles = (node, style) => {
151
+ if (style.width !== undefined) {
152
+ node.setWidth(style.width);
153
+ }
154
+
155
+ if (style.height !== undefined) {
156
+ node.setHeight(style.height);
157
+ }
158
+
159
+ if (style.minWidth !== undefined) {
160
+ node.setMinWidth(style.minWidth);
161
+ }
162
+
163
+ if (style.minHeight !== undefined) {
164
+ node.setMinHeight(style.minHeight);
165
+ }
166
+ };
167
+
168
+ var _default = (node, style = {}) => {
169
+ applyMarginStyles(node, style);
170
+ applyPaddingStyles(node, style);
171
+ applyFlexStyles(node, style);
172
+ applyDimensionStyles(node, style);
173
+ };
174
+
175
+ exports.default = _default;
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _yogaLayoutPrebuilt = _interopRequireDefault(require("yoga-layout-prebuilt"));
9
+
10
+ var _applyStyles = _interopRequireDefault(require("./apply-styles"));
11
+
12
+ var _measureText = _interopRequireDefault(require("./measure-text"));
13
+
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
+
16
+ // Traverse the node tree, create Yoga nodes and assign styles to each Yoga node
17
+ const buildLayout = (node, options) => {
18
+ const {
19
+ config,
20
+ terminalWidth,
21
+ skipStaticElements
22
+ } = options;
23
+
24
+ const yogaNode = _yogaLayoutPrebuilt.default.Node.create(config);
25
+
26
+ node.yogaNode = yogaNode;
27
+ const style = node.style || {}; // Root node of the tree
28
+
29
+ if (node.nodeName === 'ROOT') {
30
+ // `terminalWidth` can be `undefined` if env isn't a TTY
31
+ yogaNode.setWidth(terminalWidth || 100);
32
+
33
+ if (node.childNodes.length > 0) {
34
+ const childNodes = node.childNodes.filter(childNode => {
35
+ return skipStaticElements ? !childNode.unstable__static : true;
36
+ });
37
+
38
+ for (const [index, childNode] of Object.entries(childNodes)) {
39
+ const childYogaNode = buildLayout(childNode, options).yogaNode;
40
+ yogaNode.insertChild(childYogaNode, index);
41
+ }
42
+ }
43
+
44
+ return node;
45
+ } // Apply margin, padding, flex, etc styles
46
+
47
+
48
+ (0, _applyStyles.default)(yogaNode, style); // Nodes with only text have a child Yoga node dedicated for that text
49
+
50
+ if (node.textContent || node.nodeValue) {
51
+ const {
52
+ width,
53
+ height
54
+ } = (0, _measureText.default)(node.textContent || node.nodeValue);
55
+ yogaNode.setWidth(style.width || width);
56
+ yogaNode.setHeight(style.height || height);
57
+ return node;
58
+ }
59
+
60
+ if (Array.isArray(node.childNodes) && node.childNodes.length > 0) {
61
+ const childNodes = node.childNodes.filter(childNode => {
62
+ return skipStaticElements ? !childNode.unstable__static : true;
63
+ });
64
+
65
+ for (const [index, childNode] of Object.entries(childNodes)) {
66
+ const {
67
+ yogaNode: childYogaNode
68
+ } = buildLayout(childNode, options);
69
+ yogaNode.insertChild(childYogaNode, index);
70
+ }
71
+ }
72
+
73
+ return node;
74
+ };
75
+
76
+ var _default = buildLayout;
77
+ exports.default = _default;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _measureText = _interopRequireDefault(require("./measure-text"));
9
+
10
+ var _wrapText = _interopRequireDefault(require("./wrap-text"));
11
+
12
+ var _getMaxWidth = _interopRequireDefault(require("./get-max-width"));
13
+
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
+
16
+ // Since we need to know the width of text container to wrap text, we have to calculate layout twice
17
+ // This function is executed after first layout calculation to reassign width and height of text nodes
18
+ const calculateWrappedText = node => {
19
+ if (node.textContent && typeof node.parentNode.style.textWrap === 'string') {
20
+ const {
21
+ yogaNode
22
+ } = node;
23
+ const parentYogaNode = node.parentNode.yogaNode;
24
+ const maxWidth = (0, _getMaxWidth.default)(parentYogaNode);
25
+ const currentWidth = yogaNode.getComputedWidth();
26
+
27
+ if (currentWidth > maxWidth) {
28
+ const {
29
+ textWrap
30
+ } = node.parentNode.style;
31
+ const wrappedText = (0, _wrapText.default)(node.textContent, maxWidth, {
32
+ textWrap
33
+ });
34
+ const {
35
+ width,
36
+ height
37
+ } = (0, _measureText.default)(wrappedText);
38
+ yogaNode.setWidth(width);
39
+ yogaNode.setHeight(height);
40
+ }
41
+
42
+ return;
43
+ }
44
+
45
+ if (Array.isArray(node.childNodes) && node.childNodes.length > 0) {
46
+ for (const childNode of node.childNodes) {
47
+ calculateWrappedText(childNode);
48
+ }
49
+ }
50
+ };
51
+
52
+ var _default = calculateWrappedText;
53
+ exports.default = _default;
@@ -1,5 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
1
  import { EventEmitter } from 'node:events';
4
2
  import React, { PureComponent, type ReactNode } from 'react';
5
3
  type Props = {
@@ -185,7 +185,7 @@ export default class App extends PureComponent {
185
185
  };
186
186
  focusNext = () => {
187
187
  this.setState(previousState => {
188
- const firstFocusableId = previousState.focusables[0]?.id;
188
+ const firstFocusableId = previousState.focusables.find(focusable => focusable.isActive)?.id;
189
189
  const nextFocusableId = this.findNextFocusable(previousState);
190
190
  return {
191
191
  activeFocusId: nextFocusableId ?? firstFocusableId,
@@ -194,7 +194,7 @@ export default class App extends PureComponent {
194
194
  };
195
195
  focusPrevious = () => {
196
196
  this.setState(previousState => {
197
- const lastFocusableId = previousState.focusables.at(-1)?.id;
197
+ const lastFocusableId = previousState.focusables.findLast(focusable => focusable.isActive)?.id;
198
198
  const previousFocusableId = this.findPreviousFocusable(previousState);
199
199
  return {
200
200
  activeFocusId: previousFocusableId ?? lastFocusableId,
@@ -1 +1 @@
1
- {"version":3,"file":"App.js","sourceRoot":"","sources":["../../src/components/App.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AACzC,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,KAAK,EAAE,EAAC,aAAa,EAAiB,MAAM,OAAO,CAAC;AAC3D,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,OAAO,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C,KAAY,EAAsB,EAAE;QAC5D,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE;YAC1D,OAAO,SAAS,CAAC,EAAE,KAAK,KAAK,CAAC,aAAa,CAAC;QAC7C,CAAC,CAAC,CAAC;QAEH,KAAK,IAAI,KAAK,GAAG,WAAW,GAAG,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC;YACvD,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;YAE1C,IAAI,SAAS,EAAE,QAAQ,EAAE,CAAC;gBACzB,OAAO,SAAS,CAAC,EAAE,CAAC;YACrB,CAAC;QACF,CAAC;QAED,OAAO,SAAS,CAAC;IAClB,CAAC,CAAC"}
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export type Props = {
3
2
  /**
4
3
  * Exit (unmount) the whole Ink app.
@@ -7,7 +7,7 @@ export type Props = Except<Styles, 'textWrap'>;
7
7
  * `<Box>` is an essential Ink component to build your layout. It's like `<div style="display: flex">` in the browser.
8
8
  */
9
9
  declare const Box: React.ForwardRefExoticComponent<{
10
- readonly position?: "absolute" | "relative" | undefined;
10
+ readonly position?: ("absolute" | "relative") | undefined;
11
11
  readonly columnGap?: number | undefined;
12
12
  readonly rowGap?: number | undefined;
13
13
  readonly gap?: number | undefined;
@@ -27,36 +27,36 @@ declare const Box: React.ForwardRefExoticComponent<{
27
27
  readonly paddingRight?: number | undefined;
28
28
  readonly flexGrow?: number | undefined;
29
29
  readonly flexShrink?: number | undefined;
30
- readonly flexDirection?: "row" | "column" | "row-reverse" | "column-reverse" | undefined;
31
- readonly flexBasis?: string | number | undefined;
32
- readonly flexWrap?: "wrap" | "nowrap" | "wrap-reverse" | undefined;
33
- readonly alignItems?: "flex-start" | "center" | "flex-end" | "stretch" | undefined;
34
- readonly alignSelf?: "flex-start" | "center" | "flex-end" | "auto" | undefined;
35
- readonly justifyContent?: "flex-start" | "center" | "flex-end" | "space-between" | "space-around" | undefined;
36
- readonly width?: string | number | undefined;
37
- readonly height?: string | number | undefined;
38
- readonly minWidth?: string | number | undefined;
39
- readonly minHeight?: string | number | undefined;
40
- readonly display?: "flex" | "none" | undefined;
41
- readonly borderStyle?: import("cli-boxes").BoxStyle | keyof import("cli-boxes").Boxes | undefined;
30
+ readonly flexDirection?: ("row" | "column" | "row-reverse" | "column-reverse") | undefined;
31
+ readonly flexBasis?: (number | string) | undefined;
32
+ readonly flexWrap?: ("nowrap" | "wrap" | "wrap-reverse") | undefined;
33
+ readonly alignItems?: ("flex-start" | "center" | "flex-end" | "stretch") | undefined;
34
+ readonly alignSelf?: ("flex-start" | "center" | "flex-end" | "auto") | undefined;
35
+ readonly justifyContent?: ("flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly" | "center") | undefined;
36
+ readonly width?: (number | string) | undefined;
37
+ readonly height?: (number | string) | undefined;
38
+ readonly minWidth?: (number | string) | undefined;
39
+ readonly minHeight?: (number | string) | undefined;
40
+ readonly display?: ("flex" | "none") | undefined;
41
+ readonly borderStyle?: (keyof import("cli-boxes").Boxes | import("cli-boxes").BoxStyle) | undefined;
42
42
  readonly borderTop?: boolean | undefined;
43
43
  readonly borderBottom?: boolean | undefined;
44
44
  readonly borderLeft?: boolean | undefined;
45
45
  readonly borderRight?: boolean | undefined;
46
- readonly borderColor?: import("type-fest").LiteralUnion<keyof import("ansi-styles").ForegroundColor, string> | undefined;
47
- readonly borderTopColor?: import("type-fest").LiteralUnion<keyof import("ansi-styles").ForegroundColor, string> | undefined;
48
- readonly borderBottomColor?: import("type-fest").LiteralUnion<keyof import("ansi-styles").ForegroundColor, string> | undefined;
49
- readonly borderLeftColor?: import("type-fest").LiteralUnion<keyof import("ansi-styles").ForegroundColor, string> | undefined;
50
- readonly borderRightColor?: import("type-fest").LiteralUnion<keyof import("ansi-styles").ForegroundColor, string> | undefined;
46
+ readonly borderColor?: import("type-fest").LiteralUnion<import("ansi-styles").ForegroundColorName, string> | undefined;
47
+ readonly borderTopColor?: import("type-fest").LiteralUnion<import("ansi-styles").ForegroundColorName, string> | undefined;
48
+ readonly borderBottomColor?: import("type-fest").LiteralUnion<import("ansi-styles").ForegroundColorName, string> | undefined;
49
+ readonly borderLeftColor?: import("type-fest").LiteralUnion<import("ansi-styles").ForegroundColorName, string> | undefined;
50
+ readonly borderRightColor?: import("type-fest").LiteralUnion<import("ansi-styles").ForegroundColorName, string> | undefined;
51
51
  readonly borderDimColor?: boolean | undefined;
52
52
  readonly borderTopDimColor?: boolean | undefined;
53
53
  readonly borderBottomDimColor?: boolean | undefined;
54
54
  readonly borderLeftDimColor?: boolean | undefined;
55
55
  readonly borderRightDimColor?: boolean | undefined;
56
- readonly overflow?: "visible" | "hidden" | undefined;
57
- readonly overflowX?: "visible" | "hidden" | undefined;
58
- readonly overflowY?: "visible" | "hidden" | undefined;
56
+ readonly overflow?: ("visible" | "hidden") | undefined;
57
+ readonly overflowX?: ("visible" | "hidden") | undefined;
58
+ readonly overflowY?: ("visible" | "hidden") | undefined;
59
59
  } & {
60
- children?: React.ReactNode;
60
+ children?: React.ReactNode | undefined;
61
61
  } & React.RefAttributes<DOMElement>>;
62
62
  export default Box;
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _propTypes = _interopRequireDefault(require("prop-types"));
11
+
12
+ var _arrify = _interopRequireDefault(require("arrify"));
13
+
14
+ var _chalk = _interopRequireDefault(require("chalk"));
15
+
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
+
18
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
19
+
20
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
21
+
22
+ const methods = ['hex', 'hsl', 'hsv', 'hwb', 'rgb', 'keyword', 'bgHex', 'bgHsl', 'bgHsv', 'bgHwb', 'bgRgb', 'bgKeyword'];
23
+
24
+ const Color = (_ref) => {
25
+ let {
26
+ children
27
+ } = _ref,
28
+ colorProps = _objectWithoutProperties(_ref, ["children"]);
29
+
30
+ if (children === '') {
31
+ return null;
32
+ }
33
+
34
+ const transformChildren = children => {
35
+ Object.keys(colorProps).forEach(method => {
36
+ if (colorProps[method]) {
37
+ if (methods.includes(method)) {
38
+ children = _chalk.default[method](...(0, _arrify.default)(colorProps[method]))(children);
39
+ } else if (typeof _chalk.default[method] === 'function') {
40
+ children = _chalk.default[method](children);
41
+ }
42
+ }
43
+ });
44
+ return children;
45
+ };
46
+
47
+ return _react.default.createElement("span", {
48
+ style: {
49
+ flexDirection: 'row'
50
+ },
51
+ unstable__transformChildren: transformChildren
52
+ }, children);
53
+ };
54
+
55
+ Color.propTypes = {
56
+ children: _propTypes.default.node
57
+ };
58
+ Color.defaultProps = {
59
+ children: ''
60
+ };
61
+ var _default = Color;
62
+ exports.default = _default;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export type Props = {
3
2
  readonly activeId?: string;
4
3
  readonly add: (id: string, options: {
@@ -1,5 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="react" />
3
1
  export type Props = {
4
2
  /**
5
3
  * Stderr stream passed to `render()` in `options.stderr` or `process.stderr` by default.
@@ -1,6 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- /// <reference types="react" />
4
1
  import { EventEmitter } from 'node:events';
5
2
  export type Props = {
6
3
  /**
@@ -1,5 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="react" />
3
1
  export type Props = {
4
2
  /**
5
3
  * Stdout stream passed to `render()` in `options.stdout` or `process.stdout` by default.
@@ -3,15 +3,9 @@ import ws from 'ws';
3
3
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
4
4
  const customGlobal = global;
5
5
  // These things must exist before importing `react-devtools-core`
6
- if (!customGlobal.WebSocket) {
7
- customGlobal.WebSocket = ws;
8
- }
9
- if (!customGlobal.window) {
10
- customGlobal.window = global;
11
- }
12
- if (!customGlobal.self) {
13
- customGlobal.self = global;
14
- }
6
+ customGlobal.WebSocket ||= ws;
7
+ customGlobal.window ||= global;
8
+ customGlobal.self ||= global;
15
9
  // Filter out Ink's internal components from devtools for a cleaner view.
16
10
  // Also, ince `react-devtools-shared` package isn't published on npm, we can't
17
11
  // use its types, that's why there are hard-coded values in `type` fields below.
@@ -1 +1 @@
1
- {"version":3,"file":"devtools-window-polyfill.js","sourceRoot":"","sources":["../src/devtools-window-polyfill.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,mEAAmE;AACnE,MAAM,YAAY,GAAG,MAAa,CAAC;AAEnC,iEAAiE;AACjE,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,CAAC;IAC7B,YAAY,CAAC,SAAS,GAAG,EAAE,CAAC;AAC7B,CAAC;AAED,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC;IAC1B,YAAY,CAAC,MAAM,GAAG,MAAM,CAAC;AAC9B,CAAC;AAED,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;IACxB,YAAY,CAAC,IAAI,GAAG,MAAM,CAAC;AAC5B,CAAC;AAED,yEAAyE;AACzE,8EAA8E;AAC9E,gFAAgF;AAChF,sIAAsI;AACtI,YAAY,CAAC,MAAM,CAAC,oCAAoC,GAAG;IAC1D;QACC,6BAA6B;QAC7B,IAAI,EAAE,CAAC;QACP,2BAA2B;QAC3B,KAAK,EAAE,CAAC;QACR,SAAS,EAAE,IAAI;KACf;IACD;QACC,6BAA6B;QAC7B,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,aAAa;QACpB,SAAS,EAAE,IAAI;QACf,OAAO,EAAE,IAAI;KACb;IACD;QACC,6BAA6B;QAC7B,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,oBAAoB;QAC3B,SAAS,EAAE,IAAI;QACf,OAAO,EAAE,IAAI;KACb;IACD;QACC,6BAA6B;QAC7B,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,uBAAuB;QAC9B,SAAS,EAAE,IAAI;QACf,OAAO,EAAE,IAAI;KACb;IACD;QACC,6BAA6B;QAC7B,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,uBAAuB;QAC9B,SAAS,EAAE,IAAI;QACf,OAAO,EAAE,IAAI;KACb;IACD;QACC,6BAA6B;QAC7B,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,sBAAsB;QAC7B,SAAS,EAAE,IAAI;QACf,OAAO,EAAE,IAAI;KACb;IACD;QACC,6BAA6B;QAC7B,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,sBAAsB;QAC7B,SAAS,EAAE,IAAI;QACf,OAAO,EAAE,IAAI;KACb;CACD,CAAC"}
1
+ {"version":3,"file":"devtools-window-polyfill.js","sourceRoot":"","sources":["../src/devtools-window-polyfill.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,mEAAmE;AACnE,MAAM,YAAY,GAAG,MAAa,CAAC;AAEnC,iEAAiE;AACjE,YAAY,CAAC,SAAS,KAAK,EAAE,CAAC;AAE9B,YAAY,CAAC,MAAM,KAAK,MAAM,CAAC;AAE/B,YA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