diff --git a/ui-tui/packages/hermes-ink/index.d.ts b/ui-tui/packages/hermes-ink/index.d.ts index 2a8ccef6297..a0db6e7e0c7 100644 --- a/ui-tui/packages/hermes-ink/index.d.ts +++ b/ui-tui/packages/hermes-ink/index.d.ts @@ -36,5 +36,6 @@ export type { Instance, RenderOptions, Root } from './src/ink/root.ts' export { stringWidth } from './src/ink/stringWidth.ts' export type { MouseTrackingMode } from './src/ink/termio/dec.ts' export { wrapAnsi } from './src/ink/wrapAnsi.ts' -export { default as TextInput, UncontrolledTextInput } from 'ink-text-input' -export type { Props as TextInputProps } from 'ink-text-input' +// 'ink-text-input' types deliberately not re-exported here; see +// src/entry-exports.ts for the full rationale (#31227). Use the +// '@hermes/ink/text-input' subpath when the upstream widget is needed. diff --git a/ui-tui/packages/hermes-ink/src/entry-exports.ts b/ui-tui/packages/hermes-ink/src/entry-exports.ts index 2251fa6c82c..aaa849506ae 100644 --- a/ui-tui/packages/hermes-ink/src/entry-exports.ts +++ b/ui-tui/packages/hermes-ink/src/entry-exports.ts @@ -29,4 +29,21 @@ export { stringWidth } from './ink/stringWidth.js' export { isXtermJs } from './ink/terminal.js' export type { MouseTrackingMode } from './ink/termio/dec.js' export { wrapAnsi } from './ink/wrapAnsi.js' -export { default as TextInput, UncontrolledTextInput } from 'ink-text-input' + +// NOTE: Do not re-export from 'ink-text-input' here. +// +// 'ink-text-input' depends on the npm 'ink' package; pulling it in from +// this re-export drags an entire second copy of ink (and its async +// top-level init chain) into any caller that bundles `@hermes/ink` from +// source. esbuild's `__esm` helper then deadlocks on the circular +// async init between the two ink graphs — the dashboard TUI bundle +// stalls at startup with only 141 bytes of ANSI reset output, blank +// screen forever (#31227). +// +// Consumers that actually want the upstream ink-text-input widget must +// import it via the dedicated subpath: +// +// import TextInput from '@hermes/ink/text-input' +// +// which still resolves through this package's `./text-input` export, +// just outside the entry-exports surface that gets inlined by callers.