@kingkoo1985/ink 6.6.6

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 (225) hide show
  1. package/build/colorize.d.ts +4 -0
  2. package/build/colorize.js +59 -0
  3. package/build/colorize.js.map +1 -0
  4. package/build/components/AccessibilityContext.d.ts +3 -0
  5. package/build/components/AccessibilityContext.js +5 -0
  6. package/build/components/AccessibilityContext.js.map +1 -0
  7. package/build/components/App.d.ts +68 -0
  8. package/build/components/App.js +290 -0
  9. package/build/components/App.js.map +1 -0
  10. package/build/components/AppContext.d.ts +52 -0
  11. package/build/components/AppContext.js +16 -0
  12. package/build/components/AppContext.js.map +1 -0
  13. package/build/components/BackgroundContext.d.ts +4 -0
  14. package/build/components/BackgroundContext.js +3 -0
  15. package/build/components/BackgroundContext.js.map +1 -0
  16. package/build/components/Box.d.ts +171 -0
  17. package/build/components/Box.js +40 -0
  18. package/build/components/Box.js.map +1 -0
  19. package/build/components/ErrorOverview.d.ts +6 -0
  20. package/build/components/ErrorOverview.js +84 -0
  21. package/build/components/ErrorOverview.js.map +1 -0
  22. package/build/components/FocusContext.d.ts +16 -0
  23. package/build/components/FocusContext.js +16 -0
  24. package/build/components/FocusContext.js.map +1 -0
  25. package/build/components/Newline.d.ts +13 -0
  26. package/build/components/Newline.js +8 -0
  27. package/build/components/Newline.js.map +1 -0
  28. package/build/components/Spacer.d.ts +7 -0
  29. package/build/components/Spacer.js +11 -0
  30. package/build/components/Spacer.js.map +1 -0
  31. package/build/components/Static.d.ts +24 -0
  32. package/build/components/Static.js +29 -0
  33. package/build/components/Static.js.map +1 -0
  34. package/build/components/StaticRender.d.ts +8 -0
  35. package/build/components/StaticRender.js +19 -0
  36. package/build/components/StaticRender.js.map +1 -0
  37. package/build/components/StderrContext.d.ts +15 -0
  38. package/build/components/StderrContext.js +12 -0
  39. package/build/components/StderrContext.js.map +1 -0
  40. package/build/components/StdinContext.d.ts +22 -0
  41. package/build/components/StdinContext.js +16 -0
  42. package/build/components/StdinContext.js.map +1 -0
  43. package/build/components/StdoutContext.d.ts +15 -0
  44. package/build/components/StdoutContext.js +12 -0
  45. package/build/components/StdoutContext.js.map +1 -0
  46. package/build/components/Text.d.ts +63 -0
  47. package/build/components/Text.js +50 -0
  48. package/build/components/Text.js.map +1 -0
  49. package/build/components/Transform.d.ts +16 -0
  50. package/build/components/Transform.js +15 -0
  51. package/build/components/Transform.js.map +1 -0
  52. package/build/data-limited-lru-map.d.ts +20 -0
  53. package/build/data-limited-lru-map.js +65 -0
  54. package/build/data-limited-lru-map.js.map +1 -0
  55. package/build/debug-log.d.ts +2 -0
  56. package/build/debug-log.js +44 -0
  57. package/build/debug-log.js.map +1 -0
  58. package/build/devtools-window-polyfill.d.ts +1 -0
  59. package/build/devtools-window-polyfill.js +65 -0
  60. package/build/devtools-window-polyfill.js.map +1 -0
  61. package/build/devtools.d.ts +1 -0
  62. package/build/devtools.js +8 -0
  63. package/build/devtools.js.map +1 -0
  64. package/build/dom.d.ts +114 -0
  65. package/build/dom.js +169 -0
  66. package/build/dom.js.map +1 -0
  67. package/build/get-max-width.d.ts +3 -0
  68. package/build/get-max-width.js +10 -0
  69. package/build/get-max-width.js.map +1 -0
  70. package/build/hooks/use-app.d.ts +5 -0
  71. package/build/hooks/use-app.js +8 -0
  72. package/build/hooks/use-app.js.map +1 -0
  73. package/build/hooks/use-focus-manager.d.ts +28 -0
  74. package/build/hooks/use-focus-manager.js +17 -0
  75. package/build/hooks/use-focus-manager.js.map +1 -0
  76. package/build/hooks/use-focus.d.ts +29 -0
  77. package/build/hooks/use-focus.js +42 -0
  78. package/build/hooks/use-focus.js.map +1 -0
  79. package/build/hooks/use-input.d.ts +93 -0
  80. package/build/hooks/use-input.js +92 -0
  81. package/build/hooks/use-input.js.map +1 -0
  82. package/build/hooks/use-is-screen-reader-enabled.d.ts +5 -0
  83. package/build/hooks/use-is-screen-reader-enabled.js +11 -0
  84. package/build/hooks/use-is-screen-reader-enabled.js.map +1 -0
  85. package/build/hooks/use-stderr.d.ts +5 -0
  86. package/build/hooks/use-stderr.js +8 -0
  87. package/build/hooks/use-stderr.js.map +1 -0
  88. package/build/hooks/use-stdin.d.ts +5 -0
  89. package/build/hooks/use-stdin.js +8 -0
  90. package/build/hooks/use-stdin.js.map +1 -0
  91. package/build/hooks/use-stdout.d.ts +5 -0
  92. package/build/hooks/use-stdout.js +8 -0
  93. package/build/hooks/use-stdout.js.map +1 -0
  94. package/build/index.d.ts +38 -0
  95. package/build/index.js +27 -0
  96. package/build/index.js.map +1 -0
  97. package/build/ink.d.ts +110 -0
  98. package/build/ink.js +576 -0
  99. package/build/ink.js.map +1 -0
  100. package/build/instances.d.ts +3 -0
  101. package/build/instances.js +8 -0
  102. package/build/instances.js.map +1 -0
  103. package/build/layout.d.ts +18 -0
  104. package/build/layout.js +54 -0
  105. package/build/layout.js.map +1 -0
  106. package/build/log-update.d.ts +28 -0
  107. package/build/log-update.js +529 -0
  108. package/build/log-update.js.map +1 -0
  109. package/build/measure-element.d.ts +119 -0
  110. package/build/measure-element.js +825 -0
  111. package/build/measure-element.js.map +1 -0
  112. package/build/measure-text.d.ts +50 -0
  113. package/build/measure-text.js +237 -0
  114. package/build/measure-text.js.map +1 -0
  115. package/build/output.d.ts +242 -0
  116. package/build/output.js +607 -0
  117. package/build/output.js.map +1 -0
  118. package/build/parse-keypress.d.ts +14 -0
  119. package/build/parse-keypress.js +225 -0
  120. package/build/parse-keypress.js.map +1 -0
  121. package/build/reconciler.d.ts +4 -0
  122. package/build/reconciler.js +326 -0
  123. package/build/reconciler.js.map +1 -0
  124. package/build/render-background.d.ts +4 -0
  125. package/build/render-background.js +37 -0
  126. package/build/render-background.js.map +1 -0
  127. package/build/render-border.d.ts +4 -0
  128. package/build/render-border.js +81 -0
  129. package/build/render-border.js.map +1 -0
  130. package/build/render-cached.d.ts +18 -0
  131. package/build/render-cached.js +66 -0
  132. package/build/render-cached.js.map +1 -0
  133. package/build/render-container.d.ts +27 -0
  134. package/build/render-container.js +169 -0
  135. package/build/render-container.js.map +1 -0
  136. package/build/render-node-to-output.d.ts +32 -0
  137. package/build/render-node-to-output.js +177 -0
  138. package/build/render-node-to-output.js.map +1 -0
  139. package/build/render-screen-reader.d.ts +5 -0
  140. package/build/render-screen-reader.js +54 -0
  141. package/build/render-screen-reader.js.map +1 -0
  142. package/build/render-scrollbar.d.ts +23 -0
  143. package/build/render-scrollbar.js +70 -0
  144. package/build/render-scrollbar.js.map +1 -0
  145. package/build/render-sticky.d.ts +53 -0
  146. package/build/render-sticky.js +317 -0
  147. package/build/render-sticky.js.map +1 -0
  148. package/build/render-text-node.d.ts +20 -0
  149. package/build/render-text-node.js +155 -0
  150. package/build/render-text-node.js.map +1 -0
  151. package/build/render.d.ts +165 -0
  152. package/build/render.js +60 -0
  153. package/build/render.js.map +1 -0
  154. package/build/renderer.d.ts +24 -0
  155. package/build/renderer.js +292 -0
  156. package/build/renderer.js.map +1 -0
  157. package/build/replay.d.ts +59 -0
  158. package/build/replay.js +128 -0
  159. package/build/replay.js.map +1 -0
  160. package/build/resize-observer.d.ts +24 -0
  161. package/build/resize-observer.js +102 -0
  162. package/build/resize-observer.js.map +1 -0
  163. package/build/scroll.d.ts +11 -0
  164. package/build/scroll.js +123 -0
  165. package/build/scroll.js.map +1 -0
  166. package/build/selection.d.ts +52 -0
  167. package/build/selection.js +359 -0
  168. package/build/selection.js.map +1 -0
  169. package/build/serialization.d.ts +25 -0
  170. package/build/serialization.js +224 -0
  171. package/build/serialization.js.map +1 -0
  172. package/build/squash-text-nodes.d.ts +16 -0
  173. package/build/squash-text-nodes.js +58 -0
  174. package/build/squash-text-nodes.js.map +1 -0
  175. package/build/styled-line.d.ts +58 -0
  176. package/build/styled-line.js +629 -0
  177. package/build/styled-line.js.map +1 -0
  178. package/build/styles.d.ts +286 -0
  179. package/build/styles.js +257 -0
  180. package/build/styles.js.map +1 -0
  181. package/build/terminal-buffer.d.ts +57 -0
  182. package/build/terminal-buffer.js +507 -0
  183. package/build/terminal-buffer.js.map +1 -0
  184. package/build/text-wrap.d.ts +12 -0
  185. package/build/text-wrap.js +154 -0
  186. package/build/text-wrap.js.map +1 -0
  187. package/build/tokenize.d.ts +47 -0
  188. package/build/tokenize.js +419 -0
  189. package/build/tokenize.js.map +1 -0
  190. package/build/vertical-gap.d.ts +17 -0
  191. package/build/vertical-gap.js +20 -0
  192. package/build/vertical-gap.js.map +1 -0
  193. package/build/worker/animation-controller.d.ts +72 -0
  194. package/build/worker/animation-controller.js +128 -0
  195. package/build/worker/animation-controller.js.map +1 -0
  196. package/build/worker/ansi-utils.d.ts +16 -0
  197. package/build/worker/ansi-utils.js +40 -0
  198. package/build/worker/ansi-utils.js.map +1 -0
  199. package/build/worker/canvas.d.ts +49 -0
  200. package/build/worker/canvas.js +90 -0
  201. package/build/worker/canvas.js.map +1 -0
  202. package/build/worker/compositor.d.ts +33 -0
  203. package/build/worker/compositor.js +308 -0
  204. package/build/worker/compositor.js.map +1 -0
  205. package/build/worker/platform.d.ts +15 -0
  206. package/build/worker/platform.js +19 -0
  207. package/build/worker/platform.js.map +1 -0
  208. package/build/worker/render-worker.d.ts +112 -0
  209. package/build/worker/render-worker.js +944 -0
  210. package/build/worker/render-worker.js.map +1 -0
  211. package/build/worker/scene-manager.d.ts +26 -0
  212. package/build/worker/scene-manager.js +109 -0
  213. package/build/worker/scene-manager.js.map +1 -0
  214. package/build/worker/scroll-optimizer.d.ts +32 -0
  215. package/build/worker/scroll-optimizer.js +110 -0
  216. package/build/worker/scroll-optimizer.js.map +1 -0
  217. package/build/worker/terminal-writer.d.ts +116 -0
  218. package/build/worker/terminal-writer.js +708 -0
  219. package/build/worker/terminal-writer.js.map +1 -0
  220. package/build/worker/worker-entry.d.ts +6 -0
  221. package/build/worker/worker-entry.js +130 -0
  222. package/build/worker/worker-entry.js.map +1 -0
  223. package/license +9 -0
  224. package/package.json +208 -0
  225. package/readme.md +2353 -0
@@ -0,0 +1,63 @@
1
+ import React, { type ReactNode } from 'react';
2
+ import { type ForegroundColorName } from 'chalk';
3
+ import { type LiteralUnion } from 'type-fest';
4
+ import { type Styles } from '../styles.js';
5
+ export type Props = {
6
+ /**
7
+ A label for the element for screen readers.
8
+ */
9
+ readonly 'aria-label'?: string;
10
+ /**
11
+ Hide the element from screen readers.
12
+ */
13
+ readonly 'aria-hidden'?: boolean;
14
+ /**
15
+ Change text color. Ink uses Chalk under the hood, so all its functionality is supported.
16
+ */
17
+ readonly color?: LiteralUnion<ForegroundColorName, string>;
18
+ /**
19
+ Same as `color`, but for the background.
20
+ */
21
+ readonly backgroundColor?: LiteralUnion<ForegroundColorName, string>;
22
+ /**
23
+ Dim the color (make it less bright).
24
+ */
25
+ readonly dimColor?: boolean;
26
+ /**
27
+ Make the text bold.
28
+ */
29
+ readonly bold?: boolean;
30
+ /**
31
+ Make the text italic.
32
+ */
33
+ readonly italic?: boolean;
34
+ /**
35
+ Make the text underlined.
36
+ */
37
+ readonly underline?: boolean;
38
+ /**
39
+ Make the text crossed out with a line.
40
+ */
41
+ readonly strikethrough?: boolean;
42
+ /**
43
+ Inverse background and foreground colors.
44
+ */
45
+ readonly inverse?: boolean;
46
+ /**
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
+ */
49
+ readonly wrap?: Styles['textWrap'];
50
+ /**
51
+ When enabled, the terminal cursor will be positioned at the end of this Text component's content. Useful for input fields where IME (Input Method Editor) cursor synchronization is needed.
52
+ */
53
+ readonly terminalCursorFocus?: boolean;
54
+ /**
55
+ Specifies the cursor position within the text content (character index). Only works when `terminalCursorFocus` is true. If not specified, the cursor will be positioned at the end of the text (default behavior).
56
+ */
57
+ readonly terminalCursorPosition?: number;
58
+ readonly children?: ReactNode;
59
+ };
60
+ /**
61
+ This component can display text and change its style to make it bold, underlined, italic, or strikethrough.
62
+ */
63
+ export default function Text({ color, backgroundColor, dimColor, bold, italic, underline, strikethrough, inverse, wrap, terminalCursorFocus, terminalCursorPosition, children, 'aria-label': ariaLabel, 'aria-hidden': ariaHidden, }: Props): React.JSX.Element | null;
@@ -0,0 +1,50 @@
1
+ import React, { useContext } from 'react';
2
+ import chalk from 'chalk';
3
+ import colorize from '../colorize.js';
4
+ import { accessibilityContext } from './AccessibilityContext.js';
5
+ import { backgroundContext } from './BackgroundContext.js';
6
+ /**
7
+ This component can display text and change its style to make it bold, underlined, italic, or strikethrough.
8
+ */
9
+ export default function Text({ color, backgroundColor, dimColor = false, bold = false, italic = false, underline = false, strikethrough = false, inverse = false, wrap = 'wrap', terminalCursorFocus = false, terminalCursorPosition, children, 'aria-label': ariaLabel, 'aria-hidden': ariaHidden = false, }) {
10
+ const { isScreenReaderEnabled } = useContext(accessibilityContext);
11
+ const inheritedBackgroundColor = useContext(backgroundContext);
12
+ const childrenOrAriaLabel = isScreenReaderEnabled && ariaLabel ? ariaLabel : children;
13
+ if (childrenOrAriaLabel === undefined || childrenOrAriaLabel === null) {
14
+ return null;
15
+ }
16
+ const transform = (children) => {
17
+ if (dimColor) {
18
+ children = chalk.dim(children);
19
+ }
20
+ if (bold) {
21
+ children = chalk.bold(children);
22
+ }
23
+ if (italic) {
24
+ children = chalk.italic(children);
25
+ }
26
+ if (underline) {
27
+ children = chalk.underline(children);
28
+ }
29
+ if (strikethrough) {
30
+ children = chalk.strikethrough(children);
31
+ }
32
+ if (inverse) {
33
+ children = chalk.inverse(children);
34
+ }
35
+ if (color) {
36
+ children = colorize(children, color, 'foreground');
37
+ }
38
+ // Use explicit backgroundColor if provided, otherwise use inherited from parent Box
39
+ const effectiveBackgroundColor = backgroundColor ?? inheritedBackgroundColor;
40
+ if (effectiveBackgroundColor) {
41
+ children = colorize(children, effectiveBackgroundColor, 'background');
42
+ }
43
+ return children;
44
+ };
45
+ if (isScreenReaderEnabled && ariaHidden) {
46
+ return null;
47
+ }
48
+ return (React.createElement("ink-text", { style: { flexGrow: 0, flexShrink: 1, flexDirection: 'row', textWrap: wrap }, internal_transform: transform, internal_terminalCursorFocus: terminalCursorFocus, internal_terminalCursorPosition: terminalCursorPosition }, isScreenReaderEnabled && ariaLabel ? ariaLabel : children));
49
+ }
50
+ //# sourceMappingURL=Text.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Text.js","sourceRoot":"","sources":["../../src/components/Text.tsx"],"names":[],"mappings":"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"}
@@ -0,0 +1,16 @@
1
+ import React, { type ReactNode } from 'react';
2
+ export type Props = {
3
+ /**
4
+ Screen-reader-specific text to output. If this is set, all children will be ignored.
5
+ */
6
+ readonly accessibilityLabel?: string;
7
+ /**
8
+ Function that transforms children output. It accepts children and must return transformed children as well.
9
+ */
10
+ readonly transform: (children: string, index: number) => string;
11
+ readonly children?: ReactNode;
12
+ };
13
+ /**
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
+ */
16
+ export default function Transform({ children, transform, accessibilityLabel, }: Props): React.JSX.Element | null;
@@ -0,0 +1,15 @@
1
+ import React, { useContext } from 'react';
2
+ import { accessibilityContext } from './AccessibilityContext.js';
3
+ /**
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
+ */
6
+ export default function Transform({ children, transform, accessibilityLabel, }) {
7
+ const { isScreenReaderEnabled } = useContext(accessibilityContext);
8
+ if (children === undefined || children === null) {
9
+ return null;
10
+ }
11
+ return (React.createElement("ink-text", { style: { flexGrow: 0, flexShrink: 1, flexDirection: 'row' }, internal_transform: transform }, isScreenReaderEnabled && accessibilityLabel
12
+ ? accessibilityLabel
13
+ : children));
14
+ }
15
+ //# sourceMappingURL=Transform.js.map
@@ -0,0 +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;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"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * A specialized LRU map that enforces limits on both the number of entries and
3
+ * the total character length of the keys.
4
+ *
5
+ * When adding a new item, if the new key's length would exceed `maxDataSize`,
6
+ * it evicts the least recently used items until space is available.
7
+ *
8
+ * @template V - The type of the values stored in the map.
9
+ */
10
+ export declare class DataLimitedLruMap<V> {
11
+ private readonly map;
12
+ private readonly maxDataSize;
13
+ private currentDataSize;
14
+ constructor(maxKeys: number, maxDataSize: number);
15
+ get(key: string): V | undefined;
16
+ set(key: string, value: V): void;
17
+ get size(): number;
18
+ get currentDataSizeValue(): number;
19
+ clear(): void;
20
+ }
@@ -0,0 +1,65 @@
1
+ import { LRUMapWithDelete } from 'mnemonist';
2
+ /**
3
+ * A specialized LRU map that enforces limits on both the number of entries and
4
+ * the total character length of the keys.
5
+ *
6
+ * When adding a new item, if the new key's length would exceed `maxDataSize`,
7
+ * it evicts the least recently used items until space is available.
8
+ *
9
+ * @template V - The type of the values stored in the map.
10
+ */
11
+ export class DataLimitedLruMap {
12
+ map;
13
+ maxDataSize;
14
+ currentDataSize = 0;
15
+ constructor(maxKeys, maxDataSize) {
16
+ this.map = new LRUMapWithDelete(maxKeys);
17
+ this.maxDataSize = maxDataSize;
18
+ }
19
+ get(key) {
20
+ return this.map.get(key);
21
+ }
22
+ set(key, value) {
23
+ const size = key.length;
24
+ const hasKey = this.map.has(key);
25
+ while (this.currentDataSize + size > this.maxDataSize &&
26
+ this.map.size > 0) {
27
+ const map = this.map;
28
+ const lruKey = map.K[map.tail];
29
+ if (lruKey === undefined) {
30
+ break;
31
+ }
32
+ // If the key is not found in the map, we can't evict it.
33
+ // This can happen if the map is in an inconsistent state.
34
+ // To avoid an infinite loop, we break here.
35
+ // The LRUMap still has its own size limit so it is acceptable
36
+ // for us to make a best effort to stay within the data size limit.
37
+ // The alternative would be to continue searching for a valid key
38
+ // to delete but that would risk making calling set O(n) instead of
39
+ // O(1).
40
+ if (!this.map.delete(lruKey)) {
41
+ break;
42
+ }
43
+ this.currentDataSize -= lruKey.length;
44
+ }
45
+ const result = this.map.setpop(key, value);
46
+ if (result?.evicted) {
47
+ this.currentDataSize -= result.key.length;
48
+ }
49
+ if (hasKey) {
50
+ this.currentDataSize -= size;
51
+ }
52
+ this.currentDataSize += size;
53
+ }
54
+ get size() {
55
+ return this.map.size;
56
+ }
57
+ get currentDataSizeValue() {
58
+ return this.currentDataSize;
59
+ }
60
+ clear() {
61
+ this.map.clear();
62
+ this.currentDataSize = 0;
63
+ }
64
+ }
65
+ //# sourceMappingURL=data-limited-lru-map.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-limited-lru-map.js","sourceRoot":"","sources":["../src/data-limited-lru-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,WAAW,CAAC;AAO3C;;;;;;;;GAQG;AACH,MAAM,OAAO,iBAAiB;IACZ,GAAG,CAA8B;IACjC,WAAW,CAAS;IAC7B,eAAe,GAAG,CAAC,CAAC;IAE5B,YAAY,OAAe,EAAE,WAAmB;QAC/C,IAAI,CAAC,GAAG,GAAG,IAAI,gBAAgB,CAAY,OAAO,CAAC,CAAC;QACpD,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IAChC,CAAC;IAED,GAAG,CAAC,GAAW;QACd,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;IAED,GAAG,CAAC,GAAW,EAAE,KAAQ;QACxB,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC;QACxB,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAEjC,OACC,IAAI,CAAC,eAAe,GAAG,IAAI,GAAG,IAAI,CAAC,WAAW;YAC9C,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,EAChB,CAAC;YACF,MAAM,GAAG,GAAG,IAAI,CAAC,GAAwC,CAAC;YAC1D,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAE/B,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;gBAC1B,MAAM;YACP,CAAC;YAED,yDAAyD;YACzD,0DAA0D;YAC1D,4CAA4C;YAC5C,8DAA8D;YAC9D,mEAAmE;YACnE,iEAAiE;YACjE,mEAAmE;YACnE,QAAQ;YACR,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC9B,MAAM;YACP,CAAC;YAED,IAAI,CAAC,eAAe,IAAI,MAAM,CAAC,MAAM,CAAC;QACvC,CAAC;QAED,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAE7B,CAAC;QAEb,IAAI,MAAM,EAAE,OAAO,EAAE,CAAC;YACrB,IAAI,CAAC,eAAe,IAAI,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC;QAC3C,CAAC;QAED,IAAI,MAAM,EAAE,CAAC;YACZ,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC;QAC9B,CAAC;QAED,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC;IAC9B,CAAC;IAED,IAAI,IAAI;QACP,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC;IACtB,CAAC;IAED,IAAI,oBAAoB;QACvB,OAAO,IAAI,CAAC,eAAe,CAAC;IAC7B,CAAC;IAED,KAAK;QACJ,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC;QACjB,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC;IAC1B,CAAC;CACD"}
@@ -0,0 +1,2 @@
1
+ export declare const debugLog: (message: string) => void;
2
+ export declare const clearDebugLog: () => void;
@@ -0,0 +1,44 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import process from 'node:process';
4
+ const debugLogEnabled = false;
5
+ let isFirstRun = true;
6
+ const logFilePath = path.join(process.cwd(), 'debug.log');
7
+ let logStream;
8
+ export const debugLog = (message) => {
9
+ if (!debugLogEnabled) {
10
+ return;
11
+ }
12
+ if (isFirstRun) {
13
+ try {
14
+ logStream = fs.createWriteStream(logFilePath, { flags: 'w' });
15
+ }
16
+ catch (error) {
17
+ process.stderr.write(`[debug-log] Failed to start writing to debug file ${logFilePath} in debugLog: ${String(error)}\n`);
18
+ }
19
+ isFirstRun = false;
20
+ }
21
+ if (logStream) {
22
+ try {
23
+ logStream.write(message + '\n');
24
+ }
25
+ catch (error) {
26
+ process.stderr.write(`[debug-log] Failed to write to debug file ${logFilePath} in debugLog: ${String(error)}\n`);
27
+ }
28
+ }
29
+ };
30
+ export const clearDebugLog = () => {
31
+ if (!debugLogEnabled) {
32
+ return;
33
+ }
34
+ if (logStream) {
35
+ logStream.end();
36
+ }
37
+ try {
38
+ logStream = fs.createWriteStream(logFilePath, { flags: 'w' });
39
+ }
40
+ catch (error) {
41
+ process.stderr.write(`[debug-log] Failed to start writing to debug file ${logFilePath} in clearDebugLog: ${String(error)}\n`);
42
+ }
43
+ };
44
+ //# sourceMappingURL=debug-log.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debug-log.js","sourceRoot":"","sources":["../src/debug-log.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,OAAO,MAAM,cAAc,CAAC;AAEnC,MAAM,eAAe,GAAG,KAAK,CAAC;AAC9B,IAAI,UAAU,GAAG,IAAI,CAAC;AACtB,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,WAAW,CAAC,CAAC;AAC1D,IAAI,SAAqC,CAAC;AAE1C,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,OAAe,EAAE,EAAE;IAC3C,IAAI,CAAC,eAAe,EAAE,CAAC;QACtB,OAAO;IACR,CAAC;IAED,IAAI,UAAU,EAAE,CAAC;QAChB,IAAI,CAAC;YACJ,SAAS,GAAG,EAAE,CAAC,iBAAiB,CAAC,WAAW,EAAE,EAAC,KAAK,EAAE,GAAG,EAAC,CAAC,CAAC;QAC7D,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,OAAO,CAAC,MAAM,CAAC,KAAK,CACnB,qDAAqD,WAAW,iBAAiB,MAAM,CAAC,KAAK,CAAC,IAAI,CAClG,CAAC;QACH,CAAC;QAED,UAAU,GAAG,KAAK,CAAC;IACpB,CAAC;IAED,IAAI,SAAS,EAAE,CAAC;QACf,IAAI,CAAC;YACJ,SAAS,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;QACjC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,OAAO,CAAC,MAAM,CAAC,KAAK,CACnB,6CAA6C,WAAW,iBAAiB,MAAM,CAAC,KAAK,CAAC,IAAI,CAC1F,CAAC;QACH,CAAC;IACF,CAAC;AACF,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE;IACjC,IAAI,CAAC,eAAe,EAAE,CAAC;QACtB,OAAO;IACR,CAAC;IAED,IAAI,SAAS,EAAE,CAAC;QACf,SAAS,CAAC,GAAG,EAAE,CAAC;IACjB,CAAC;IAED,IAAI,CAAC;QACJ,SAAS,GAAG,EAAE,CAAC,iBAAiB,CAAC,WAAW,EAAE,EAAC,KAAK,EAAE,GAAG,EAAC,CAAC,CAAC;IAC7D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,OAAO,CAAC,MAAM,CAAC,KAAK,CACnB,qDAAqD,WAAW,sBAAsB,MAAM,CAAC,KAAK,CAAC,IAAI,CACvG,CAAC;IACH,CAAC;AACF,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,65 @@
1
+ // Ignoring missing types error to avoid adding another dependency for this hack to work
2
+ import ws from 'ws';
3
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
4
+ const customGlobal = global;
5
+ // These things must exist before importing `react-devtools-core`
6
+ // eslint-disable-next-line n/no-unsupported-features/node-builtins
7
+ customGlobal.WebSocket ||= ws;
8
+ customGlobal.window ||= global;
9
+ customGlobal.self ||= global;
10
+ // Filter out Ink's internal components from devtools for a cleaner view.
11
+ // Also, ince `react-devtools-shared` package isn't published on npm, we can't
12
+ // use its types, that's why there are hard-coded values in `type` fields below.
13
+ // See https://github.com/facebook/react/blob/edf6eac8a181860fd8a2d076a43806f1237495a1/packages/react-devtools-shared/src/types.js#L24
14
+ customGlobal.window.__REACT_DEVTOOLS_COMPONENT_FILTERS__ = [
15
+ {
16
+ // ComponentFilterElementType
17
+ type: 1,
18
+ // ElementTypeHostComponent
19
+ value: 7,
20
+ isEnabled: true,
21
+ },
22
+ {
23
+ // ComponentFilterDisplayName
24
+ type: 2,
25
+ value: 'InternalApp',
26
+ isEnabled: true,
27
+ isValid: true,
28
+ },
29
+ {
30
+ // ComponentFilterDisplayName
31
+ type: 2,
32
+ value: 'InternalAppContext',
33
+ isEnabled: true,
34
+ isValid: true,
35
+ },
36
+ {
37
+ // ComponentFilterDisplayName
38
+ type: 2,
39
+ value: 'InternalStdoutContext',
40
+ isEnabled: true,
41
+ isValid: true,
42
+ },
43
+ {
44
+ // ComponentFilterDisplayName
45
+ type: 2,
46
+ value: 'InternalStderrContext',
47
+ isEnabled: true,
48
+ isValid: true,
49
+ },
50
+ {
51
+ // ComponentFilterDisplayName
52
+ type: 2,
53
+ value: 'InternalStdinContext',
54
+ isEnabled: true,
55
+ isValid: true,
56
+ },
57
+ {
58
+ // ComponentFilterDisplayName
59
+ type: 2,
60
+ value: 'InternalFocusContext',
61
+ isEnabled: true,
62
+ isValid: true,
63
+ },
64
+ ];
65
+ //# sourceMappingURL=devtools-window-polyfill.js.map
@@ -0,0 +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;AAEjE,mEAAmE;AACnE,YAAY,CAAC,SAAS,KAAK,EAAE,CAAC;AAE9B,YAAY,CAAC,MAAM,KAAK,MAAM,CAAC;AAE/B,YAAY,CAAC,IAAI,KAAK,MAAM,CAAC;AAE7B,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"}
@@ -0,0 +1 @@
1
+ import './devtools-window-polyfill.js';
@@ -0,0 +1,8 @@
1
+ // eslint-disable-next-line import/no-unassigned-import
2
+ import './devtools-window-polyfill.js';
3
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
4
+ // @ts-expect-error
5
+ import devtools from 'react-devtools-core';
6
+ devtools.initialize();
7
+ devtools.connectToDevTools();
8
+ //# sourceMappingURL=devtools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devtools.js","sourceRoot":"","sources":["../src/devtools.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,OAAO,+BAA+B,CAAC;AAEvC,6DAA6D;AAC7D,mBAAmB;AACnB,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAE1C,QAAgB,CAAC,UAAU,EAAE,CAAC;AAE9B,QAAgB,CAAC,iBAAiB,EAAE,CAAC"}
package/build/dom.d.ts ADDED
@@ -0,0 +1,114 @@
1
+ import { type Node as YogaNode } from 'yoga-layout';
2
+ import { type StyledLine } from './styled-line.js';
3
+ import { type Styles } from './styles.js';
4
+ import { type OutputTransformer } from './render-node-to-output.js';
5
+ import type ResizeObserver from './resize-observer.js';
6
+ import { type Region } from './output.js';
7
+ type InkNode = {
8
+ parentNode: DOMElement | undefined;
9
+ yogaNode?: YogaNode;
10
+ internal_static?: boolean;
11
+ style: Styles;
12
+ };
13
+ export type TextName = '#text';
14
+ export type ElementNames = 'ink-root' | 'ink-box' | 'ink-text' | 'ink-virtual-text' | 'ink-static-render';
15
+ export type NodeNames = ElementNames | TextName;
16
+ export type StickyHeader = {
17
+ nodeId: number;
18
+ lines: readonly StyledLine[];
19
+ stuckLines?: readonly StyledLine[];
20
+ styledOutput: readonly StyledLine[];
21
+ x: number;
22
+ y: number;
23
+ naturalRow: number;
24
+ startRow: number;
25
+ endRow: number;
26
+ scrollContainerId: number | string;
27
+ isStuckOnly: boolean;
28
+ relativeX?: number;
29
+ relativeY?: number;
30
+ height?: number;
31
+ parentRelativeTop?: number;
32
+ parentHeight?: number;
33
+ parentBorderTop?: number;
34
+ parentBorderBottom?: number;
35
+ type?: 'top' | 'bottom';
36
+ node?: DOMElement;
37
+ maxStuckY?: number;
38
+ minStuckY?: number;
39
+ };
40
+ export type DOMElement = {
41
+ nodeName: ElementNames;
42
+ attributes: Record<string, DOMNodeAttribute>;
43
+ childNodes: DOMNode[];
44
+ internal_transform?: OutputTransformer;
45
+ internal_terminalCursorFocus?: boolean;
46
+ internal_terminalCursorPosition?: number;
47
+ internalOnBeforeRender?: (node: DOMElement, options?: {
48
+ trackSelection?: boolean;
49
+ }) => void;
50
+ cachedRender?: Region;
51
+ internal_accessibility?: {
52
+ role?: 'button' | 'checkbox' | 'combobox' | 'list' | 'listbox' | 'listitem' | 'menu' | 'menuitem' | 'option' | 'progressbar' | 'radio' | 'radiogroup' | 'tab' | 'tablist' | 'table' | 'textbox' | 'timer' | 'toolbar';
53
+ state?: {
54
+ busy?: boolean;
55
+ checked?: boolean;
56
+ disabled?: boolean;
57
+ expanded?: boolean;
58
+ multiline?: boolean;
59
+ multiselectable?: boolean;
60
+ readonly?: boolean;
61
+ required?: boolean;
62
+ selected?: boolean;
63
+ };
64
+ };
65
+ isStaticDirty?: boolean;
66
+ staticNode?: DOMElement;
67
+ onComputeLayout?: () => void;
68
+ onRender?: () => void;
69
+ onImmediateRender?: () => void;
70
+ internal_scrollState?: ScrollState;
71
+ internalSticky?: boolean | 'top' | 'bottom';
72
+ internalStickyAlternate?: boolean;
73
+ internalOpaque?: boolean;
74
+ internalScrollbar?: boolean;
75
+ resizeObservers?: Set<ResizeObserver>;
76
+ internal_lastMeasuredSize?: {
77
+ width: number;
78
+ height: number;
79
+ };
80
+ internalMaxScrollTop?: number;
81
+ internalIsScrollbackDirty?: boolean;
82
+ internalId: number;
83
+ } & InkNode;
84
+ export type ScrollState = {
85
+ scrollTop: number;
86
+ scrollLeft: number;
87
+ scrollHeight: number;
88
+ actualScrollHeight: number;
89
+ scrollWidth: number;
90
+ clientHeight: number;
91
+ clientWidth: number;
92
+ };
93
+ export type TextNode = {
94
+ nodeName: TextName;
95
+ nodeValue: string;
96
+ } & InkNode;
97
+ export type DOMNode<T = {
98
+ nodeName: NodeNames;
99
+ }> = T extends {
100
+ nodeName: infer U;
101
+ } ? U extends '#text' ? TextNode : DOMElement : never;
102
+ export type DOMNodeAttribute = boolean | string | number;
103
+ export declare const createNode: (nodeName: ElementNames) => DOMElement;
104
+ export declare const appendChildNode: (node: DOMElement, childNode: DOMElement) => void;
105
+ export declare const insertBeforeNode: (node: DOMElement, newChildNode: DOMNode, beforeChildNode: DOMNode) => void;
106
+ export declare const removeChildNode: (node: DOMElement, removeNode: DOMNode) => void;
107
+ export declare const setAttribute: (node: DOMElement, key: string, value: DOMNodeAttribute) => void;
108
+ export declare const setStyle: (node: DOMNode, style: Styles) => void;
109
+ export declare const createTextNode: (text: string) => TextNode;
110
+ export declare const setCachedRender: (node: DOMElement, cachedRender: Region) => void;
111
+ export declare const setTextNodeValue: (node: TextNode, text: string) => void;
112
+ export declare const getPathToRoot: (node: DOMNode) => DOMNode[];
113
+ export declare const isNodeSelectable: (node: DOMElement) => boolean;
114
+ export {};