ink 6.2.2 → 6.3.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.
Files changed (74) hide show
  1. package/build/components/AppContext.d.ts +4 -4
  2. package/build/components/AppContext.js +2 -2
  3. package/build/components/AppContext.js.map +1 -1
  4. package/build/components/Box.d.ts +18 -18
  5. package/build/components/Box.js +2 -2
  6. package/build/components/Box.js.map +1 -1
  7. package/build/components/Newline.d.ts +6 -6
  8. package/build/components/Newline.js +2 -2
  9. package/build/components/Newline.js.map +1 -1
  10. package/build/components/Spacer.d.ts +4 -3
  11. package/build/components/Spacer.js +4 -3
  12. package/build/components/Spacer.js.map +1 -1
  13. package/build/components/Static.d.ts +12 -19
  14. package/build/components/Static.js +6 -11
  15. package/build/components/Static.js.map +1 -1
  16. package/build/components/StderrContext.d.ts +6 -8
  17. package/build/components/StderrContext.js +2 -2
  18. package/build/components/StderrContext.js.map +1 -1
  19. package/build/components/StdinContext.d.ts +8 -9
  20. package/build/components/StdinContext.js +2 -2
  21. package/build/components/StdinContext.js.map +1 -1
  22. package/build/components/StdoutContext.d.ts +6 -8
  23. package/build/components/StdoutContext.js +2 -2
  24. package/build/components/StdoutContext.js.map +1 -1
  25. package/build/components/Text.d.ts +24 -26
  26. package/build/components/Text.js +2 -2
  27. package/build/components/Text.js.map +1 -1
  28. package/build/components/Transform.d.ts +6 -10
  29. package/build/components/Transform.js +2 -5
  30. package/build/components/Transform.js.map +1 -1
  31. package/build/hooks/use-app.d.ts +2 -2
  32. package/build/hooks/use-app.js +2 -2
  33. package/build/hooks/use-app.js.map +1 -1
  34. package/build/hooks/use-focus-manager.d.ts +12 -18
  35. package/build/hooks/use-focus-manager.js +2 -3
  36. package/build/hooks/use-focus-manager.js.map +1 -1
  37. package/build/hooks/use-focus.d.ts +12 -17
  38. package/build/hooks/use-focus.js +2 -7
  39. package/build/hooks/use-focus.js.map +1 -1
  40. package/build/hooks/use-input.d.ts +54 -58
  41. package/build/hooks/use-input.js +20 -23
  42. package/build/hooks/use-input.js.map +1 -1
  43. package/build/hooks/use-is-screen-reader-enabled.d.ts +2 -3
  44. package/build/hooks/use-is-screen-reader-enabled.js +2 -3
  45. package/build/hooks/use-is-screen-reader-enabled.js.map +1 -1
  46. package/build/hooks/use-stderr.d.ts +2 -2
  47. package/build/hooks/use-stderr.js +2 -2
  48. package/build/hooks/use-stderr.js.map +1 -1
  49. package/build/hooks/use-stdin.d.ts +2 -2
  50. package/build/hooks/use-stdin.js +2 -2
  51. package/build/hooks/use-stdin.js.map +1 -1
  52. package/build/hooks/use-stdout.d.ts +2 -2
  53. package/build/hooks/use-stdout.js +2 -2
  54. package/build/hooks/use-stdout.js.map +1 -1
  55. package/build/ink.d.ts +1 -0
  56. package/build/ink.js +3 -1
  57. package/build/ink.js.map +1 -1
  58. package/build/measure-element.d.ts +6 -6
  59. package/build/measure-element.js +2 -2
  60. package/build/measure-element.js.map +1 -1
  61. package/build/options.d.ts +52 -0
  62. package/build/options.js +2 -0
  63. package/build/options.js.map +1 -0
  64. package/build/output.d.ts +6 -7
  65. package/build/output.js.map +1 -1
  66. package/build/render-node-to-output.js +1 -3
  67. package/build/render-node-to-output.js.map +1 -1
  68. package/build/render.d.ts +45 -38
  69. package/build/render.js +3 -2
  70. package/build/render.js.map +1 -1
  71. package/build/styles.d.ts +132 -141
  72. package/build/styles.js.map +1 -1
  73. package/package.json +2 -4
  74. package/readme.md +154 -153
@@ -1,11 +1,11 @@
1
1
  export type Props = {
2
2
  /**
3
- * Exit (unmount) the whole Ink app.
4
- */
3
+ Exit (unmount) the whole Ink app.
4
+ */
5
5
  readonly exit: (error?: Error) => void;
6
6
  };
7
7
  /**
8
- * `AppContext` is a React context, which exposes a method to manually exit the app (unmount).
9
- */
8
+ `AppContext` is a React context that exposes a method to manually exit the app (unmount).
9
+ */
10
10
  declare const AppContext: import("react").Context<Props>;
11
11
  export default AppContext;
@@ -1,7 +1,7 @@
1
1
  import { createContext } from 'react';
2
2
  /**
3
- * `AppContext` is a React context, which exposes a method to manually exit the app (unmount).
4
- */
3
+ `AppContext` is a React context that exposes a method to manually exit the app (unmount).
4
+ */
5
5
  // eslint-disable-next-line @typescript-eslint/naming-convention
6
6
  const AppContext = createContext({
7
7
  exit() { },
@@ -1 +1 @@
1
- {"version":3,"file":"AppContext.js","sourceRoot":"","sources":["../../src/components/AppContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AASpC;;GAEG;AACH,gEAAgE;AAChE,MAAM,UAAU,GAAG,aAAa,CAAQ;IACvC,IAAI,KAAI,CAAC;CACT,CAAC,CAAC;AAEH,UAAU,CAAC,WAAW,GAAG,oBAAoB,CAAC;AAE9C,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"AppContext.js","sourceRoot":"","sources":["../../src/components/AppContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AASpC;;EAEE;AACF,gEAAgE;AAChE,MAAM,UAAU,GAAG,aAAa,CAAQ;IACvC,IAAI,KAAI,CAAC;CACT,CAAC,CAAC;AAEH,UAAU,CAAC,WAAW,GAAG,oBAAoB,CAAC;AAE9C,eAAe,UAAU,CAAC"}
@@ -4,20 +4,20 @@ import { type Styles } from '../styles.js';
4
4
  import { type DOMElement } from '../dom.js';
5
5
  export type Props = Except<Styles, 'textWrap'> & {
6
6
  /**
7
- * Label for the element for screen readers.
8
- */
7
+ A label for the element for screen readers.
8
+ */
9
9
  readonly 'aria-label'?: string;
10
10
  /**
11
- * Hide the element from screen readers.
12
- */
11
+ Hide the element from screen readers.
12
+ */
13
13
  readonly 'aria-hidden'?: boolean;
14
14
  /**
15
- * Role of the element.
16
- */
15
+ The role of the element.
16
+ */
17
17
  readonly 'aria-role'?: 'button' | 'checkbox' | 'combobox' | 'list' | 'listbox' | 'listitem' | 'menu' | 'menuitem' | 'option' | 'progressbar' | 'radio' | 'radiogroup' | 'tab' | 'tablist' | 'table' | 'textbox' | 'timer' | 'toolbar';
18
18
  /**
19
- * State of the element.
20
- */
19
+ The state of the element.
20
+ */
21
21
  readonly 'aria-state'?: {
22
22
  readonly busy?: boolean;
23
23
  readonly checked?: boolean;
@@ -31,8 +31,8 @@ export type Props = Except<Styles, 'textWrap'> & {
31
31
  };
32
32
  };
33
33
  /**
34
- * `<Box>` is an essential Ink component to build your layout. It's like `<div style="display: flex">` in the browser.
35
- */
34
+ `<Box>` is an essential Ink component to build your layout. It's like `<div style="display: flex">` in the browser.
35
+ */
36
36
  declare const Box: React.ForwardRefExoticComponent<{
37
37
  readonly position?: "absolute" | "relative" | undefined;
38
38
  readonly columnGap?: number | undefined;
@@ -86,20 +86,20 @@ declare const Box: React.ForwardRefExoticComponent<{
86
86
  readonly backgroundColor?: import("type-fest").LiteralUnion<import("ansi-styles").ForegroundColorName, string> | undefined;
87
87
  } & {
88
88
  /**
89
- * Label for the element for screen readers.
90
- */
89
+ A label for the element for screen readers.
90
+ */
91
91
  readonly 'aria-label'?: string;
92
92
  /**
93
- * Hide the element from screen readers.
94
- */
93
+ Hide the element from screen readers.
94
+ */
95
95
  readonly 'aria-hidden'?: boolean;
96
96
  /**
97
- * Role of the element.
98
- */
97
+ The role of the element.
98
+ */
99
99
  readonly 'aria-role'?: "button" | "checkbox" | "combobox" | "list" | "listbox" | "listitem" | "menu" | "menuitem" | "option" | "progressbar" | "radio" | "radiogroup" | "tab" | "tablist" | "table" | "textbox" | "timer" | "toolbar";
100
100
  /**
101
- * State of the element.
102
- */
101
+ The state of the element.
102
+ */
103
103
  readonly 'aria-state'?: {
104
104
  readonly busy?: boolean;
105
105
  readonly checked?: boolean;
@@ -2,8 +2,8 @@ import React, { forwardRef, useContext } from 'react';
2
2
  import { accessibilityContext } from './AccessibilityContext.js';
3
3
  import { backgroundContext } from './BackgroundContext.js';
4
4
  /**
5
- * `<Box>` is an essential Ink component to build your layout. It's like `<div style="display: flex">` in the browser.
6
- */
5
+ `<Box>` is an essential Ink component to build your layout. It's like `<div style="display: flex">` in the browser.
6
+ */
7
7
  const Box = forwardRef(({ children, backgroundColor, 'aria-label': ariaLabel, 'aria-hidden': ariaHidden, 'aria-role': role, 'aria-state': ariaState, ...style }, ref) => {
8
8
  const { isScreenReaderEnabled } = useContext(accessibilityContext);
9
9
  const label = ariaLabel ? React.createElement("ink-text", null, ariaLabel) : undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"Box.js","sourceRoot":"","sources":["../../src/components/Box.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,UAAU,EAAE,UAAU,EAAyB,MAAM,OAAO,CAAC;AAI5E,OAAO,EAAC,oBAAoB,EAAC,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAC,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AAoDzD;;GAEG;AACH,MAAM,GAAG,GAAG,UAAU,CACrB,CACC,EACC,QAAQ,EACR,eAAe,EACf,YAAY,EAAE,SAAS,EACvB,aAAa,EAAE,UAAU,EACzB,WAAW,EAAE,IAAI,EACjB,YAAY,EAAE,SAAS,EACvB,GAAG,KAAK,EACR,EACD,GAAG,EACF,EAAE;IACH,MAAM,EAAC,qBAAqB,EAAC,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;IACjE,MAAM,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,sCAAW,SAAS,CAAY,CAAC,CAAC,CAAC,SAAS,CAAC;IACvE,IAAI,qBAAqB,IAAI,UAAU,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC;IACb,CAAC;IAED,MAAM,UAAU,GAAG,CAClB,iCACC,GAAG,EAAE,GAAG,EACR,KAAK,EAAE;YACN,QAAQ,EAAE,QAAQ;YAClB,aAAa,EAAE,KAAK;YACpB,QAAQ,EAAE,CAAC;YACX,UAAU,EAAE,CAAC;YACb,GAAG,KAAK;YACR,eAAe;YACf,SAAS,EAAE,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,QAAQ,IAAI,S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M,UAAU,GAAG,CAClB,iCACC,GAAG,EAAE,GAAG,EACR,KAAK,EAAE;YACN,QAAQ,EAAE,QAAQ;YAClB,aAAa,EAAE,KAAK;YACpB,QAAQ,EAAE,CAAC;YACX,UAAU,EAAE,CAAC;YACb,GAAG,KAAK;YACR,eAAe;YACf,SAAS,EAAE,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,QAAQ,IAAI,SAAS;YACzD,SAAS,EAAE,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,QAAQ,IAAI,SAAS;SACzD,EACD,sBAAsB,EAAE;YACvB,IAAI;YACJ,KAAK,EAAE,SAAS;SAChB,IAEA,qBAAqB,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CACzC,CACV,CAAC;IAEF,yEAAyE;IACzE,IAAI,eAAe,EAAE,CAAC;QACrB,OAAO,CACN,oBAAC,iBAAiB,CAAC,QAAQ,IAAC,KAAK,EAAE,eAAe,IAChD,UAAU,CACiB,CAC7B,CAAC;IACH,CAAC;IAED,OAAO,UAAU,CAAC;AACnB,CAAC,CACD,CAAC;AAEF,GAAG,CAAC,WAAW,GAAG,KAAK,CAAC;AAExB,eAAe,GAAG,CAAC"}
@@ -1,13 +1,13 @@
1
1
  import React from 'react';
2
2
  export type Props = {
3
3
  /**
4
- * Number of newlines to insert.
5
- *
6
- * @default 1
7
- */
4
+ Number of newlines to insert.
5
+
6
+ @default 1
7
+ */
8
8
  readonly count?: number;
9
9
  };
10
10
  /**
11
- * Adds one or more newline (\n) characters. Must be used within <Text> components.
12
- */
11
+ Adds one or more newline (`\n`) characters. Must be used within `<Text>` components.
12
+ */
13
13
  export default function Newline({ count }: Props): React.JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  /**
3
- * Adds one or more newline (\n) characters. Must be used within <Text> components.
4
- */
3
+ Adds one or more newline (`\n`) characters. Must be used within `<Text>` components.
4
+ */
5
5
  export default function Newline({ count = 1 }) {
6
6
  return React.createElement("ink-text", null, '\n'.repeat(count));
7
7
  }
@@ -1 +1 @@
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
+ {"version":3,"file":"Newline.js","sourceRoot":"","sources":["../../src/components/Newline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B;;EAEE;AACF,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,6 +1,7 @@
1
1
  import React from 'react';
2
2
  /**
3
- * A flexible space that expands along the major axis of its containing layout.
4
- * It's useful as a shortcut for filling all the available spaces between elements.
5
- */
3
+ A flexible space that expands along the major axis of its containing layout.
4
+
5
+ It's useful as a shortcut for filling all the available space between elements.
6
+ */
6
7
  export default function Spacer(): React.JSX.Element;
@@ -1,9 +1,10 @@
1
1
  import React from 'react';
2
2
  import Box from './Box.js';
3
3
  /**
4
- * A flexible space that expands along the major axis of its containing layout.
5
- * It's useful as a shortcut for filling all the available spaces between elements.
6
- */
4
+ A flexible space that expands along the major axis of its containing layout.
5
+
6
+ It's useful as a shortcut for filling all the available space between elements.
7
+ */
7
8
  export default function Spacer() {
8
9
  return React.createElement(Box, { flexGrow: 1 });
9
10
  }
@@ -1 +1 @@
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
+ {"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;;;;EAIE;AACF,MAAM,CAAC,OAAO,UAAU,MAAM;IAC7B,OAAO,oBAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,GAAI,CAAC;AAC7B,CAAC"}
@@ -2,30 +2,23 @@ import React, { type ReactNode } from 'react';
2
2
  import { type Styles } from '../styles.js';
3
3
  export type Props<T> = {
4
4
  /**
5
- * Array of items of any type to render using a function you pass as a component child.
6
- */
5
+ Array of items of any type to render using the function you pass as a component child.
6
+ */
7
7
  readonly items: T[];
8
8
  /**
9
- * Styles to apply to a container of child elements. See <Box> for supported properties.
10
- */
9
+ Styles to apply to a container of child elements. See <Box> for supported properties.
10
+ */
11
11
  readonly style?: Styles;
12
12
  /**
13
- * Function that is called to render every item in `items` array.
14
- * First argument is an item itself and second argument is index of that item in `items` array.
15
- * Note that `key` must be assigned to the root component.
16
- */
13
+ Function that is called to render every item in the `items` array. The first argument is the item itself, and the second argument is the index of that item in the `items` array. Note that a `key` must be assigned to the root component.
14
+ */
17
15
  readonly children: (item: T, index: number) => ReactNode;
18
16
  };
19
17
  /**
20
- * `<Static>` component permanently renders its output above everything else.
21
- * It's useful for displaying activity like completed tasks or logs - things that
22
- * are not changing after they're rendered (hence the name "Static").
23
- *
24
- * It's preferred to use `<Static>` for use cases like these, when you can't know
25
- * or control the amount of items that need to be rendered.
26
- *
27
- * For example, [Tap](https://github.com/tapjs/node-tap) uses `<Static>` to display
28
- * a list of completed tests. [Gatsby](https://github.com/gatsbyjs/gatsby) uses it
29
- * to display a list of generated pages, while still displaying a live progress bar.
30
- */
18
+ `<Static>` component permanently renders its output above everything else. It's useful for displaying activity like completed tasks or logs—things that don't change after they're rendered (hence the name "Static").
19
+
20
+ It's preferred to use `<Static>` for use cases like these when you can't know or control the number of items that need to be rendered.
21
+
22
+ For example, [Tap](https://github.com/tapjs/node-tap) uses `<Static>` to display a list of completed tests. [Gatsby](https://github.com/gatsbyjs/gatsby) uses it to display a list of generated pages while still displaying a live progress bar.
23
+ */
31
24
  export default function Static<T>(props: Props<T>): React.JSX.Element;
@@ -1,16 +1,11 @@
1
1
  import React, { useMemo, useState, useLayoutEffect } from 'react';
2
2
  /**
3
- * `<Static>` component permanently renders its output above everything else.
4
- * It's useful for displaying activity like completed tasks or logs - things that
5
- * are not changing after they're rendered (hence the name "Static").
6
- *
7
- * It's preferred to use `<Static>` for use cases like these, when you can't know
8
- * or control the amount of items that need to be rendered.
9
- *
10
- * For example, [Tap](https://github.com/tapjs/node-tap) uses `<Static>` to display
11
- * a list of completed tests. [Gatsby](https://github.com/gatsbyjs/gatsby) uses it
12
- * to display a list of generated pages, while still displaying a live progress bar.
13
- */
3
+ `<Static>` component permanently renders its output above everything else. It's useful for displaying activity like completed tasks or logs—things that don't change after they're rendered (hence the name "Static").
4
+
5
+ It's preferred to use `<Static>` for use cases like these when you can't know or control the number of items that need to be rendered.
6
+
7
+ For example, [Tap](https://github.com/tapjs/node-tap) uses `<Static>` to display a list of completed tests. [Gatsby](https://github.com/gatsbyjs/gatsby) uses it to display a list of generated pages while still displaying a live progress bar.
8
+ */
14
9
  export default function Static(props) {
15
10
  const { items, children: render, style: customStyle } = props;
16
11
  const [index, setIndex] = useState(0);
@@ -1 +1 @@
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,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,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,15 @@
1
1
  export type Props = {
2
2
  /**
3
- * Stderr stream passed to `render()` in `options.stderr` or `process.stderr` by default.
4
- */
3
+ Stderr stream passed to `render()` in `options.stderr` or `process.stderr` by default.
4
+ */
5
5
  readonly stderr: NodeJS.WriteStream;
6
6
  /**
7
- * Write any string to stderr, while preserving Ink's output.
8
- * 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.
9
- * It's similar to `<Static>`, except it can't accept components, it only works with strings.
10
- */
7
+ Write any string to stderr while preserving Ink's output. It's useful when you want to display external information outside of Ink's rendering and ensure there's no conflict between the two. It's similar to `<Static>`, except it can't accept components; it only works with strings.
8
+ */
11
9
  readonly write: (data: string) => void;
12
10
  };
13
11
  /**
14
- * `StderrContext` is a React context, which exposes stderr stream.
15
- */
12
+ `StderrContext` is a React context that exposes the stderr stream.
13
+ */
16
14
  declare const StderrContext: import("react").Context<Props>;
17
15
  export default StderrContext;
@@ -1,8 +1,8 @@
1
1
  import process from 'node:process';
2
2
  import { createContext } from 'react';
3
3
  /**
4
- * `StderrContext` is a React context, which exposes stderr stream.
5
- */
4
+ `StderrContext` is a React context that exposes the stderr stream.
5
+ */
6
6
  // eslint-disable-next-line @typescript-eslint/naming-convention
7
7
  const StderrContext = createContext({
8
8
  stderr: process.stderr,
@@ -1 +1 @@
1
- {"version":3,"file":"StderrContext.js","sourceRoot":"","sources":["../../src/components/StderrContext.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AAgBpC;;GAEG;AACH,gEAAgE;AAChE,MAAM,aAAa,GAAG,aAAa,CAAQ;IAC1C,MAAM,EAAE,OAAO,CAAC,MAAM;IACtB,KAAK,KAAI,CAAC;CACV,CAAC,CAAC;AAEH,aAAa,CAAC,WAAW,GAAG,uBAAuB,CAAC;AAEpD,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"StderrContext.js","sourceRoot":"","sources":["../../src/components/StderrContext.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AAcpC;;EAEE;AACF,gEAAgE;AAChE,MAAM,aAAa,GAAG,aAAa,CAAQ;IAC1C,MAAM,EAAE,OAAO,CAAC,MAAM;IACtB,KAAK,KAAI,CAAC;CACV,CAAC,CAAC;AAEH,aAAa,CAAC,WAAW,GAAG,uBAAuB,CAAC;AAEpD,eAAe,aAAa,CAAC"}
@@ -1,23 +1,22 @@
1
1
  import { EventEmitter } from 'node:events';
2
2
  export type Props = {
3
3
  /**
4
- * Stdin stream passed to `render()` in `options.stdin` or `process.stdin` by default. Useful if your app needs to handle user input.
5
- */
4
+ The stdin stream passed to `render()` in `options.stdin`, or `process.stdin` by default. Useful if your app needs to handle user input.
5
+ */
6
6
  readonly stdin: NodeJS.ReadStream;
7
7
  /**
8
- * Ink exposes this function via own `<StdinContext>` to be able to handle Ctrl+C, that's why you should use Ink's `setRawMode` instead of `process.stdin.setRawMode`.
9
- * If the `stdin` stream passed to Ink does not support setRawMode, this function does nothing.
10
- */
8
+ Ink exposes this function via own `<StdinContext>` to be able to handle Ctrl+C, that's why you should use Ink's `setRawMode` instead of `process.stdin.setRawMode`. If the `stdin` stream passed to Ink does not support setRawMode, this function does nothing.
9
+ */
11
10
  readonly setRawMode: (value: boolean) => void;
12
11
  /**
13
- * A boolean flag determining if the current `stdin` supports `setRawMode`. A component using `setRawMode` might want to use `isRawModeSupported` to nicely fall back in environments where raw mode is not supported.
14
- */
12
+ A boolean flag determining if the current `stdin` supports `setRawMode`. A component using `setRawMode` might want to use `isRawModeSupported` to nicely fall back in environments where raw mode is not supported.
13
+ */
15
14
  readonly isRawModeSupported: boolean;
16
15
  readonly internal_exitOnCtrlC: boolean;
17
16
  readonly internal_eventEmitter: EventEmitter;
18
17
  };
19
18
  /**
20
- * `StdinContext` is a React context, which exposes input stream.
21
- */
19
+ `StdinContext` is a React context that exposes the input stream.
20
+ */
22
21
  declare const StdinContext: import("react").Context<Props>;
23
22
  export default StdinContext;
@@ -2,8 +2,8 @@ import { EventEmitter } from 'node:events';
2
2
  import process from 'node:process';
3
3
  import { createContext } from 'react';
4
4
  /**
5
- * `StdinContext` is a React context, which exposes input stream.
6
- */
5
+ `StdinContext` is a React context that exposes the input stream.
6
+ */
7
7
  // eslint-disable-next-line @typescript-eslint/naming-convention
8
8
  const StdinContext = createContext({
9
9
  stdin: process.stdin,
@@ -1 +1 @@
1
- {"version":3,"file":"StdinContext.js","sourceRoot":"","sources":["../../src/components/StdinContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AACzC,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AAwBpC;;GAEG;AACH,gEAAgE;AAChE,MAAM,YAAY,GAAG,aAAa,CAAQ;IACzC,KAAK,EAAE,OAAO,CAAC,KAAK;IACpB,gEAAgE;IAChE,qBAAqB,EAAE,IAAI,YAAY,EAAE;IACzC,UAAU,KAAI,CAAC;IACf,kBAAkB,EAAE,KAAK;IACzB,gEAAgE;IAChE,oBAAoB,EAAE,IAAI;CAC1B,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,GAAG,sBAAsB,CAAC;AAElD,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"StdinContext.js","sourceRoot":"","sources":["../../src/components/StdinContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AACzC,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AAuBpC;;EAEE;AACF,gEAAgE;AAChE,MAAM,YAAY,GAAG,aAAa,CAAQ;IACzC,KAAK,EAAE,OAAO,CAAC,KAAK;IACpB,gEAAgE;IAChE,qBAAqB,EAAE,IAAI,YAAY,EAAE;IACzC,UAAU,KAAI,CAAC;IACf,kBAAkB,EAAE,KAAK;IACzB,gEAAgE;IAChE,oBAAoB,EAAE,IAAI;CAC1B,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,GAAG,sBAAsB,CAAC;AAElD,eAAe,YAAY,CAAC"}
@@ -1,17 +1,15 @@
1
1
  export type Props = {
2
2
  /**
3
- * Stdout stream passed to `render()` in `options.stdout` or `process.stdout` by default.
4
- */
3
+ Stdout stream passed to `render()` in `options.stdout` or `process.stdout` by default.
4
+ */
5
5
  readonly stdout: NodeJS.WriteStream;
6
6
  /**
7
- * Write any string to stdout, while preserving Ink's output.
8
- * 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.
9
- * It's similar to `<Static>`, except it can't accept components, it only works with strings.
10
- */
7
+ Write any string to stdout while preserving Ink's output. It's useful when you want to display external information outside of Ink's rendering and ensure there's no conflict between the two. It's similar to `<Static>`, except it can't accept components; it only works with strings.
8
+ */
11
9
  readonly write: (data: string) => void;
12
10
  };
13
11
  /**
14
- * `StdoutContext` is a React context, which exposes stdout stream, where Ink renders your app.
15
- */
12
+ `StdoutContext` is a React context that exposes the stdout stream where Ink renders your app.
13
+ */
16
14
  declare const StdoutContext: import("react").Context<Props>;
17
15
  export default StdoutContext;
@@ -1,8 +1,8 @@
1
1
  import process from 'node:process';
2
2
  import { createContext } from 'react';
3
3
  /**
4
- * `StdoutContext` is a React context, which exposes stdout stream, where Ink renders your app.
5
- */
4
+ `StdoutContext` is a React context that exposes the stdout stream where Ink renders your app.
5
+ */
6
6
  // eslint-disable-next-line @typescript-eslint/naming-convention
7
7
  const StdoutContext = createContext({
8
8
  stdout: process.stdout,
@@ -1 +1 @@
1
- {"version":3,"file":"StdoutContext.js","sourceRoot":"","sources":["../../src/components/StdoutContext.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AAgBpC;;GAEG;AACH,gEAAgE;AAChE,MAAM,aAAa,GAAG,aAAa,CAAQ;IAC1C,MAAM,EAAE,OAAO,CAAC,MAAM;IACtB,KAAK,KAAI,CAAC;CACV,CAAC,CAAC;AAEH,aAAa,CAAC,WAAW,GAAG,uBAAuB,CAAC;AAEpD,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"StdoutContext.js","sourceRoot":"","sources":["../../src/components/StdoutContext.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AAcpC;;EAEE;AACF,gEAAgE;AAChE,MAAM,aAAa,GAAG,aAAa,CAAQ;IAC1C,MAAM,EAAE,OAAO,CAAC,MAAM;IACtB,KAAK,KAAI,CAAC;CACV,CAAC,CAAC;AAEH,aAAa,CAAC,WAAW,GAAG,uBAAuB,CAAC;AAEpD,eAAe,aAAa,CAAC"}
@@ -4,54 +4,52 @@ import { type LiteralUnion } from 'type-fest';
4
4
  import { type Styles } from '../styles.js';
5
5
  export type Props = {
6
6
  /**
7
- * Label for the element for screen readers.
8
- */
7
+ A label for the element for screen readers.
8
+ */
9
9
  readonly 'aria-label'?: string;
10
10
  /**
11
- * Hide the element from screen readers.
12
- */
11
+ Hide the element from screen readers.
12
+ */
13
13
  readonly 'aria-hidden'?: boolean;
14
14
  /**
15
- * Change text color. Ink uses chalk under the hood, so all its functionality is supported.
16
- */
15
+ Change text color. Ink uses Chalk under the hood, so all its functionality is supported.
16
+ */
17
17
  readonly color?: LiteralUnion<ForegroundColorName, string>;
18
18
  /**
19
- * Same as `color`, but for background.
20
- */
19
+ Same as `color`, but for the background.
20
+ */
21
21
  readonly backgroundColor?: LiteralUnion<ForegroundColorName, string>;
22
22
  /**
23
- * Dim the color (emit a small amount of light).
24
- */
23
+ Dim the color (make it less bright).
24
+ */
25
25
  readonly dimColor?: boolean;
26
26
  /**
27
- * Make the text bold.
28
- */
27
+ Make the text bold.
28
+ */
29
29
  readonly bold?: boolean;
30
30
  /**
31
- * Make the text italic.
32
- */
31
+ Make the text italic.
32
+ */
33
33
  readonly italic?: boolean;
34
34
  /**
35
- * Make the text underlined.
36
- */
35
+ Make the text underlined.
36
+ */
37
37
  readonly underline?: boolean;
38
38
  /**
39
- * Make the text crossed with a line.
40
- */
39
+ Make the text crossed out with a line.
40
+ */
41
41
  readonly strikethrough?: boolean;
42
42
  /**
43
- * Inverse background and foreground colors.
44
- */
43
+ Inverse background and foreground colors.
44
+ */
45
45
  readonly inverse?: boolean;
46
46
  /**
47
- * This property tells Ink to wrap or truncate text if its width is larger than container.
48
- * If `wrap` is passed (by default), Ink will wrap text and split it into multiple lines.
49
- * If `truncate-*` is passed, Ink will truncate text instead, which will result in one line of text with the rest cut off.
50
- */
47
+ This property tells Ink to wrap or truncate text if its width is larger than the container. If `wrap` is passed (the default), Ink will wrap text and split it into multiple lines. If `truncate-*` is passed, Ink will truncate text instead, resulting in one line of text with the rest cut off.
48
+ */
51
49
  readonly wrap?: Styles['textWrap'];
52
50
  readonly children?: ReactNode;
53
51
  };
54
52
  /**
55
- * This component can display text, and change its style to make it colorful, bold, underline, italic or strikethrough.
56
- */
53
+ This component can display text and change its style to make it bold, underlined, italic, or strikethrough.
54
+ */
57
55
  export default function Text({ color, backgroundColor, dimColor, bold, italic, underline, strikethrough, inverse, wrap, children, 'aria-label': ariaLabel, 'aria-hidden': ariaHidden, }: Props): React.JSX.Element | null;
@@ -4,8 +4,8 @@ import colorize from '../colorize.js';
4
4
  import { accessibilityContext } from './AccessibilityContext.js';
5
5
  import { backgroundContext } from './BackgroundContext.js';
6
6
  /**
7
- * This component can display text, and change its style to make it colorful, bold, underline, italic or strikethrough.
8
- */
7
+ This component can display text and change its style to make it bold, underlined, italic, or strikethrough.
8
+ */
9
9
  export default function Text({ color, backgroundColor, dimColor = false, bold = false, italic = false, underline = false, strikethrough = false, inverse = false, wrap = 'wrap', children, 'aria-label': ariaLabel, 'aria-hidden': ariaHidden = false, }) {
10
10
  const { isScreenReaderEnabled } = useContext(accessibilityContext);
11
11
  const inheritedBackgroundColor = useContext(backgroundContext);
@@ -1 +1 @@
1
- {"version":3,"file":"Text.js","sourceRoot":"","sources":["../../src/components/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,UAAU,EAAiB,MAAM,OAAO,CAAC;AACxD,OAAO,KAAiC,MAAM,OAAO,CAAC;AAEtD,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAC,oBAAoB,EAAC,MAAM,2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AAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACnC,CAAC;QAED,IAAI,SAAS,EAAE,CAAC;YACf,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QACtC,CAAC;QAED,IAAI,aAAa,EAAE,CAAC;YACnB,QAAQ,GAAG,KAAK,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QAC1C,CAAC;QAED,IAAI,OAAO,EAAE,CAAC;YACb,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACpC,CAAC;QAED,OAAO,QAAQ,CAAC;IACjB,CAAC,CAAC;IAEF,IAAI,qBAAqB,IAAI,UAAU,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC;IACb,CAAC;IAED,OAAO,CACN,kCACC,KAAK,EAAE,EAAC,QAAQ,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAC,EACzE,kBAAkB,EAAE,SAAS,IAE5B,qBAAqB,IAAI,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAChD,CACX,CAAC;AACH,CAAC"}
@@ -1,20 +1,16 @@
1
1
  import React, { type ReactNode } from 'react';
2
2
  export type Props = {
3
3
  /**
4
- * Screen-reader-specific text to output.
5
- * If this is set, all children will be ignored.
6
- */
4
+ Screen-reader-specific text to output. If this is set, all children will be ignored.
5
+ */
7
6
  readonly accessibilityLabel?: string;
8
7
  /**
9
- * Function which transforms children output. It accepts children and must return transformed children too.
10
- */
8
+ Function that transforms children output. It accepts children and must return transformed children as well.
9
+ */
11
10
  readonly transform: (children: string, index: number) => string;
12
11
  readonly children?: ReactNode;
13
12
  };
14
13
  /**
15
- * Transform a string representation of React components before they are written to output.
16
- * For example, you might want to apply a gradient to text, add a clickable link or create some text effects.
17
- * These use cases can't accept React nodes as input, they are expecting a string.
18
- * That's what <Transform> component does, it gives you an output string of its child components and lets you transform it in any way.
19
- */
14
+ Transform a string representation of React components before they're written to output. For example, you might want to apply a gradient to text, add a clickable link, or create some text effects. These use cases can't accept React nodes as input; they expect a string. That's what the <Transform> component does: it gives you an output string of its child components and lets you transform it in any way.
15
+ */
20
16
  export default function Transform({ children, transform, accessibilityLabel, }: Props): React.JSX.Element | null;
@@ -1,11 +1,8 @@
1
1
  import React, { useContext } from 'react';
2
2
  import { accessibilityContext } from './AccessibilityContext.js';
3
3
  /**
4
- * Transform a string representation of React components before they are written to output.
5
- * For example, you might want to apply a gradient to text, add a clickable link or create some text effects.
6
- * These use cases can't accept React nodes as input, they are expecting a string.
7
- * That's what <Transform> component does, it gives you an output string of its child components and lets you transform it in any way.
8
- */
4
+ Transform a string representation of React components before they're written to output. For example, you might want to apply a gradient to text, add a clickable link, or create some text effects. These use cases can't accept React nodes as input; they expect a string. That's what the <Transform> component does: it gives you an output string of its child components and lets you transform it in any way.
5
+ */
9
6
  export default function Transform({ children, transform, accessibilityLabel, }) {
10
7
  const { isScreenReaderEnabled } = useContext(accessibilityContext);
11
8
  if (children === undefined || children === null) {
@@ -1 +1 @@
1
- {"version":3,"file":"Transform.js","sourceRoot":"","sources":["../../src/components/Transform.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,UAAU,EAAiB,MAAM,OAAO,CAAC;AACxD,OAAO,EAAC,oBAAoB,EAAC,MAAM,2BAA2B,CAAC;AAiB/D;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EACjC,QAAQ,EACR,SAAS,EACT,kBAAkB,GACX;IACP,MAAM,EAAC,qBAAqB,EAAC,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;IAEjE,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;QACjD,OAAO,IAAI,CAAC;IACb,CAAC;IAED,OAAO,CACN,kCACC,KAAK,EAAE,EAAC,QAAQ,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,aAAa,EAAE,KAAK,EAAC,EACzD,kBAAkB,EAAE,SAAS,IAE5B,qBAAqB,IAAI,kBAAkB;QAC3C,CAAC,CAAC,kBAAkB;QACpB,CAAC,CAAC,QAAQ,CACD,CACX,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"Transform.js","sourceRoot":"","sources":["../../src/components/Transform.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,UAAU,EAAiB,MAAM,OAAO,CAAC;AACxD,OAAO,EAAC,oBAAoB,EAAC,MAAM,2BAA2B,CAAC;AAgB/D;;EAEE;AACF,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EACjC,QAAQ,EACR,SAAS,EACT,kBAAkB,GACX;IACP,MAAM,EAAC,qBAAqB,EAAC,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;IAEjE,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;QACjD,OAAO,IAAI,CAAC;IACb,CAAC;IAED,OAAO,CACN,kCACC,KAAK,EAAE,EAAC,QAAQ,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,aAAa,EAAE,KAAK,EAAC,EACzD,kBAAkB,EAAE,SAAS,IAE5B,qBAAqB,IAAI,kBAAkB;QAC3C,CAAC,CAAC,kBAAkB;QACpB,CAAC,CAAC,QAAQ,CACD,CACX,CAAC;AACH,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * `useApp` is a React hook, which exposes a method to manually exit the app (unmount).
3
- */
2
+ `useApp` is a React hook that exposes a method to manually exit the app (unmount).
3
+ */
4
4
  declare const useApp: () => import("../components/AppContext.js").Props;
5
5
  export default useApp;
@@ -1,8 +1,8 @@
1
1
  import { useContext } from 'react';
2
2
  import AppContext from '../components/AppContext.js';
3
3
  /**
4
- * `useApp` is a React hook, which exposes a method to manually exit the app (unmount).
5
- */
4
+ `useApp` is a React hook that exposes a method to manually exit the app (unmount).
5
+ */
6
6
  const useApp = () => useContext(AppContext);
7
7
  export default useApp;
8
8
  //# sourceMappingURL=use-app.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-app.js","sourceRoot":"","sources":["../../src/hooks/use-app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,OAAO,CAAC;AACjC,OAAO,UAAU,MAAM,6BAA6B,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;AAC5C,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"use-app.js","sourceRoot":"","sources":["../../src/hooks/use-app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,OAAO,CAAC;AACjC,OAAO,UAAU,MAAM,6BAA6B,CAAC;AAErD;;EAEE;AACF,MAAM,MAAM,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;AAC5C,eAAe,MAAM,CAAC"}