@daniel156161/prism 0.2.78 → 0.2.81

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 (180) hide show
  1. package/dist/pi/pi-env.d.ts +1 -1
  2. package/dist/pi/pi-env.js +1 -1
  3. package/dist/pi/pi-patch-interactive.js +8 -5
  4. package/dist/pi/pi-patch-interactive.js.map +1 -1
  5. package/dist/prism-extensions/integrations/ai-memory-errors.d.ts +16 -0
  6. package/dist/prism-extensions/integrations/ai-memory-errors.js +52 -0
  7. package/dist/prism-extensions/integrations/ai-memory-errors.js.map +1 -0
  8. package/dist/prism-extensions/integrations/ai-memory-system.d.ts +3 -0
  9. package/dist/prism-extensions/integrations/ai-memory-system.js +175 -15
  10. package/dist/prism-extensions/integrations/ai-memory-system.js.map +1 -1
  11. package/dist/prism-extensions/integrations/research-tools.js +3 -3
  12. package/dist/prism-extensions/integrations/research-tools.js.map +1 -1
  13. package/dist/prism-extensions/integrations/youtube.d.ts +2 -2
  14. package/dist/prism-extensions/integrations/youtube.js +6 -7
  15. package/dist/prism-extensions/integrations/youtube.js.map +1 -1
  16. package/node_modules/@earendil-works/pi-agent-core/README.md +4 -4
  17. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts.map +1 -1
  18. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +5 -1
  19. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +1 -1
  20. package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts.map +1 -1
  21. package/node_modules/@earendil-works/pi-agent-core/dist/agent.js +3 -0
  22. package/node_modules/@earendil-works/pi-agent-core/dist/agent.js.map +1 -1
  23. package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +6 -0
  24. package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +1 -1
  25. package/node_modules/@earendil-works/pi-agent-core/dist/types.js.map +1 -1
  26. package/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
  27. package/node_modules/@earendil-works/pi-ai/README.md +8 -1
  28. package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.d.ts.map +1 -1
  29. package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js +1 -0
  30. package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js.map +1 -1
  31. package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +2 -0
  32. package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts.map +1 -1
  33. package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +2 -0
  34. package/node_modules/@earendil-works/pi-ai/dist/models.generated.js.map +1 -1
  35. package/node_modules/@earendil-works/pi-ai/dist/providers/all.d.ts.map +1 -1
  36. package/node_modules/@earendil-works/pi-ai/dist/providers/all.js +2 -0
  37. package/node_modules/@earendil-works/pi-ai/dist/providers/all.js.map +1 -1
  38. package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  39. package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
  40. package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
  41. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
  42. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-individual.json +1 -0
  43. package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
  44. package/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-individual.d.ts +3 -0
  45. package/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-individual.d.ts.map +1 -0
  46. package/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-individual.js +15 -0
  47. package/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-individual.js.map +1 -0
  48. package/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-individual.models.d.ts +4 -0
  49. package/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-individual.models.d.ts.map +1 -0
  50. package/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-individual.models.js +6 -0
  51. package/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-individual.models.js.map +1 -0
  52. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +1 -1
  53. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
  54. package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
  55. package/node_modules/@earendil-works/pi-ai/package.json +2 -2
  56. package/node_modules/@earendil-works/pi-client/CHANGELOG.md +1 -1
  57. package/node_modules/@earendil-works/pi-client/package.json +2 -2
  58. package/node_modules/@earendil-works/pi-coding-agent/CHANGELOG.md +31 -2
  59. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.d.ts.map +1 -1
  60. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js +3 -3
  61. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js.map +1 -1
  62. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/auth-check.d.ts +19 -0
  63. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/auth-check.d.ts.map +1 -0
  64. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/auth-check.js +50 -0
  65. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/auth-check.js.map +1 -0
  66. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/auth-command.d.ts +24 -0
  67. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/auth-command.d.ts.map +1 -0
  68. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/auth-command.js +102 -0
  69. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/auth-command.js.map +1 -0
  70. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/credential-print.d.ts +4 -14
  71. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/credential-print.d.ts.map +1 -1
  72. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/credential-print.js +38 -79
  73. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/credential-print.js.map +1 -1
  74. package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.d.ts +10 -0
  75. package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.d.ts.map +1 -1
  76. package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js +78 -1
  77. package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js.map +1 -1
  78. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.d.ts +5 -0
  79. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.d.ts.map +1 -1
  80. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.js.map +1 -1
  81. package/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings.d.ts +8 -0
  82. package/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings.d.ts.map +1 -1
  83. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.d.ts.map +1 -1
  84. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js +1 -0
  85. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js.map +1 -1
  86. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-runtime.d.ts +2 -0
  87. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-runtime.d.ts.map +1 -1
  88. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-runtime.js +3 -1
  89. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-runtime.js.map +1 -1
  90. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.d.ts +4 -0
  91. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.d.ts.map +1 -1
  92. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js +6 -4
  93. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js.map +1 -1
  94. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit.d.ts +4 -0
  95. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit.d.ts.map +1 -1
  96. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit.js +11 -7
  97. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit.js.map +1 -1
  98. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/find.d.ts +4 -0
  99. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/find.d.ts.map +1 -1
  100. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/find.js +5 -1
  101. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/find.js.map +1 -1
  102. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.d.ts +4 -0
  103. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.d.ts.map +1 -1
  104. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.js +5 -1
  105. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.js.map +1 -1
  106. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.d.ts +4 -0
  107. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.d.ts.map +1 -1
  108. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.js +5 -1
  109. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.js.map +1 -1
  110. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.d.ts +4 -0
  111. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.d.ts.map +1 -1
  112. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.js +6 -2
  113. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.js.map +1 -1
  114. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/write.d.ts +4 -0
  115. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/write.d.ts.map +1 -1
  116. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/write.js +6 -2
  117. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/write.js.map +1 -1
  118. package/node_modules/@earendil-works/pi-coding-agent/dist/main.d.ts.map +1 -1
  119. package/node_modules/@earendil-works/pi-coding-agent/dist/main.js +57 -21
  120. package/node_modules/@earendil-works/pi-coding-agent/dist/main.js.map +1 -1
  121. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +3 -0
  122. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  123. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js +234 -2561
  124. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
  125. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  126. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.js +11 -3
  127. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.js.map +1 -1
  128. package/node_modules/@earendil-works/pi-coding-agent/dist/server/create-harness.d.ts +26 -0
  129. package/node_modules/@earendil-works/pi-coding-agent/dist/server/create-harness.d.ts.map +1 -0
  130. package/node_modules/@earendil-works/pi-coding-agent/dist/server/create-harness.js +104 -0
  131. package/node_modules/@earendil-works/pi-coding-agent/dist/server/create-harness.js.map +1 -0
  132. package/node_modules/@earendil-works/pi-coding-agent/docs/extensions.md +3 -2
  133. package/node_modules/@earendil-works/pi-coding-agent/docs/keybindings.md +9 -5
  134. package/node_modules/@earendil-works/pi-coding-agent/docs/providers.md +8 -1
  135. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  136. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-anthropic/package.json +1 -1
  137. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  138. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/package-lock.json +2 -2
  139. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/package.json +1 -1
  140. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/sandbox/package-lock.json +2 -2
  141. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/sandbox/package.json +1 -1
  142. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package-lock.json +2 -2
  143. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package.json +1 -1
  144. package/node_modules/@earendil-works/pi-coding-agent/package.json +7 -7
  145. package/node_modules/@earendil-works/pi-protocol/package.json +1 -1
  146. package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
  147. package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts +10 -0
  148. package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts.map +1 -1
  149. package/node_modules/@earendil-works/pi-tui/dist/keybindings.js +8 -0
  150. package/node_modules/@earendil-works/pi-tui/dist/keybindings.js.map +1 -1
  151. package/node_modules/@earendil-works/pi-tui/dist/latex.d.ts.map +1 -1
  152. package/node_modules/@earendil-works/pi-tui/dist/latex.js +188 -48
  153. package/node_modules/@earendil-works/pi-tui/dist/latex.js.map +1 -1
  154. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts +12 -0
  155. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts.map +1 -1
  156. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js +146 -12
  157. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js.map +1 -1
  158. package/node_modules/@earendil-works/pi-tui/package.json +1 -1
  159. package/node_modules/@types/node/README.md +1 -1
  160. package/node_modules/@types/node/child_process.d.ts +0 -1
  161. package/node_modules/@types/node/crypto.d.ts +6 -6
  162. package/node_modules/@types/node/dns/promises.d.ts +5 -5
  163. package/node_modules/@types/node/dns.d.ts +5 -5
  164. package/node_modules/@types/node/fs.d.ts +7 -0
  165. package/node_modules/@types/node/http.d.ts +30 -0
  166. package/node_modules/@types/node/http2.d.ts +4 -4
  167. package/node_modules/@types/node/os.d.ts +30 -30
  168. package/node_modules/@types/node/package.json +2 -2
  169. package/node_modules/@types/node/perf_hooks.d.ts +2 -1
  170. package/node_modules/@types/node/process.d.ts +42 -43
  171. package/node_modules/@types/node/quic.d.ts +1049 -84
  172. package/node_modules/@types/node/sqlite.d.ts +14 -1
  173. package/node_modules/@types/node/stream/iter.d.ts +3 -2
  174. package/node_modules/@types/node/test.d.ts +61 -0
  175. package/node_modules/@types/node/v8.d.ts +20 -23
  176. package/package.json +6 -6
  177. package/src/prism-extensions/integrations/ai-memory-errors.ts +53 -0
  178. package/src/prism-extensions/integrations/ai-memory-system.ts +179 -15
  179. package/src/prism-extensions/integrations/research-tools.ts +3 -3
  180. package/src/prism-extensions/integrations/youtube.ts +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"tui-alt-screen.js","sourceRoot":"","sources":["../src/tui-alt-screen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EACN,oBAAoB,EACpB,gBAAgB,EAChB,gBAAgB,EAEhB,iBAAiB,GAEjB,MAAM,aAAa,CAAC;AAErB,OAAO,EACN,oBAAoB,EACpB,wBAAwB,EACxB,gBAAgB,EAChB,eAAe,EACf,sBAAsB,EAEtB,WAAW,EACX,eAAe,GAEf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEN,aAAa,EACb,gBAAgB,EAChB,OAAO,EAEP,YAAY,GAEZ,MAAM,UAAU,CAAC;AAClB,OAAO,EACN,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,aAAa,EACb,sBAAsB,EACtB,YAAY,GACZ,MAAM,YAAY,CAAC;AAEpB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AAC,aAAa,GAAG,UAAU,CAAC;IAAA,CAChC;CACD","sourcesContent":["import { AltScreenFlashContainer } from \"./components/alt-screen-flash.ts\";\nimport { ScrollView } from \"./components/scroll-view.ts\";\nimport { getKeybindings } from \"./keybindings.ts\";\nimport { isKeyRelease } from \"./keys.ts\";\nimport {\n\tgetScrollbarGeometry,\n\tgetScrollViewBox,\n\tgetScrollViewsAt,\n\ttype LayoutFrame,\n\trenderLayoutFrame,\n\ttype ScrollbarGeometry,\n} from \"./layout.ts\";\nimport type { Terminal } from \"./terminal.ts\";\nimport {\n\tdeleteAllKittyImages,\n\tdeleteAllKittyPlacements,\n\tdeleteKittyImage,\n\tgetCapabilities,\n\tgetKittyImagePlacement,\n\ttype ImageProtocol,\n\tisImageLine,\n\tsetCapabilities,\n\ttype TerminalCapabilities,\n} from \"./terminal-image.ts\";\nimport {\n\ttype Component,\n\tCURSOR_MARKER,\n\tcompositeTuiLine,\n\tTuiBase,\n\ttype TuiStopOptions,\n\tVIEWPORT_TUI,\n\ttype ViewportTUI,\n} from \"./tui.ts\";\nimport {\n\textractAnsiCode,\n\tgetGraphemeCellRange,\n\tgetOsc8LinkAtColumn,\n\tsliceByColumn,\n\tstripTerminalSequences,\n\tvisibleWidth,\n} from \"./utils.ts\";\n\nconst ENTER_ALT_SCREEN = \"\\x1b[?1049h\";\nconst EXIT_ALT_SCREEN = \"\\x1b[?1049l\";\nconst DISABLE_AUTOWRAP = \"\\x1b[?7l\";\nconst ENABLE_AUTOWRAP = \"\\x1b[?7h\";\nconst ENABLE_MOUSE = \"\\x1b[?1000h\\x1b[?1002h\\x1b[?1003h\\x1b[?1004h\\x1b[?1006h\";\nconst DISABLE_MOUSE = \"\\x1b[?1006l\\x1b[?1004l\\x1b[?1003l\\x1b[?1002l\\x1b[?1000l\";\nconst FOCUS_IN = \"\\x1b[I\";\nconst FOCUS_OUT = \"\\x1b[O\";\nconst BEGIN_SYNCHRONIZED_OUTPUT = \"\\x1b[?2026h\";\nconst END_SYNCHRONIZED_OUTPUT = \"\\x1b[?2026l\";\nconst OSC133_ZONE_PREFIX = /^(?:\\x1b\\]133;[ABC](?:\\x07|\\x1b\\\\))+/;\nconst OSC133_PROMPT_START = /^\\x1b\\]133;A(?:\\x07|\\x1b\\\\)/;\nconst PAGE_SCROLL_OVERLAP = 4;\nconst MAX_CACHED_OFFSCREEN_KITTY_IMAGES = 16;\nconst MAX_CACHED_OFFSCREEN_KITTY_TRANSMISSION_BYTES = 32 * 1024 * 1024;\nconst MAX_CACHED_OFFSCREEN_KITTY_DECODED_BYTES = 64 * 1024 * 1024;\n\ninterface CachedKittyImage {\n\ttransmissionGeneration: number;\n\ttransmissionBytes: number;\n\testimatedDecodedBytes: number;\n}\n\ninterface SelectionPoint {\n\trow: number;\n\tcol: number;\n\tscrollView?: ScrollView;\n}\n\ninterface SgrMouseEvent {\n\tbutton: number;\n\tx: number;\n\ty: number;\n\trelease: boolean;\n}\n\ninterface WheelEvent {\n\tdirection: -1 | 1;\n\tx: number;\n\ty: number;\n}\n\ninterface ScrollbarDrag {\n\tscrollView: ScrollView;\n\tgrabOffset: number;\n}\n\ninterface ScrollbarTarget {\n\tscrollView: ScrollView;\n\tgeometry: ScrollbarGeometry;\n}\n\nexport interface TuiAltScreenOptions {\n\t/** Number of logical lines moved for each mouse-wheel event. */\n\twheelScrollLines?: number;\n\t/** Capture mouse events for viewport scrolling and application-owned text selection. */\n\tmouse?: boolean;\n\t/** Open an OSC 8 hyperlink activated with a primary-button click. */\n\topenUrl?: (url: string) => void;\n}\n\n/** Alternate-screen TUI with a scrollable, application-owned viewport. */\nexport class TuiAltScreen extends TuiBase implements ViewportTUI {\n\treadonly mode = \"fullscreen\" as const;\n\treadonly [VIEWPORT_TUI] = true as const;\n\tprivate previousScreen: string[] = [];\n\tprivate lastDocument: string[] = [];\n\tprivate previousScreenWidth = 0;\n\tprivate previousScreenHeight = 0;\n\tprivate layoutRoot: Component | undefined;\n\tprivate currentLayout: LayoutFrame | undefined;\n\tprivate readonly implicitDocument: Component;\n\tprivate readonly implicitScrollView: ScrollView;\n\tprivate readonly flashes: AltScreenFlashContainer;\n\tprivate altScreenActive = false;\n\tprivate imageProtocol: ImageProtocol = null;\n\tprivate savedCapabilities?: TerminalCapabilities;\n\tprivate readonly uploadedKittyImages = new Map<number, CachedKittyImage>();\n\tprivate selectionAnchor?: SelectionPoint;\n\tprivate selectionFocus?: SelectionPoint;\n\tprivate selectionDragPointer?: { x: number; y: number };\n\tprivate selectionAutoScrollDirection: -1 | 0 | 1 = 0;\n\tprivate selectionAutoScrollTimer?: NodeJS.Timeout;\n\tprivate selectionPressActive = false;\n\tprivate scrollbarDrag?: ScrollbarDrag;\n\tprivate scrollbarHover?: ScrollView;\n\tprivate pressedUrl?: string;\n\tprivate selectionDragged = false;\n\tprivate readonly wheelScrollLines: number;\n\tprivate readonly mouseEnabled: boolean;\n\tprivate readonly openUrl?: (url: string) => void;\n\n\tconstructor(\n\t\tterminal: Terminal,\n\t\tshowHardwareCursor?: boolean,\n\t\tlogDirectory?: string,\n\t\toptions: TuiAltScreenOptions = {},\n\t) {\n\t\tsuper(terminal, showHardwareCursor, logDirectory);\n\t\tthis.implicitDocument = {\n\t\t\trender: (width) => super.render(width),\n\t\t\tinvalidate: () => {\n\t\t\t\tfor (const child of this.children) child.invalidate();\n\t\t\t},\n\t\t};\n\t\tthis.implicitScrollView = new ScrollView(this.implicitDocument, { follow: \"end\", primary: true });\n\t\tthis.flashes = new AltScreenFlashContainer(() => this.requestRender());\n\t\tthis.wheelScrollLines = Math.max(1, Math.floor(options.wheelScrollLines ?? 1));\n\t\tthis.mouseEnabled = options.mouse ?? true;\n\t\tthis.openUrl = options.openUrl;\n\t\tthis.addInputListener((data) => this.handleViewportInput(data));\n\t}\n\n\tget viewportTop(): number {\n\t\treturn this.getPrimaryScrollView().scrollTop;\n\t}\n\n\tget isFollowingOutput(): boolean {\n\t\treturn this.getPrimaryScrollView().isFollowingEnd;\n\t}\n\n\tsetLayoutRoot(component: Component | undefined): void {\n\t\tif (this.layoutRoot === component) return;\n\t\tthis.layoutRoot = component;\n\t\tthis.currentLayout = undefined;\n\t\tthis.requestRender();\n\t}\n\n\toverride render(width: number): string[] {\n\t\treturn this.layoutRoot?.render(width) ?? super.render(width);\n\t}\n\n\tprotected override getMountedRoots(): readonly Component[] {\n\t\treturn this.layoutRoot ? [this.layoutRoot] : this.children;\n\t}\n\n\tprivate getPrimaryScrollView(): ScrollView {\n\t\treturn this.currentLayout?.primaryScrollView ?? this.implicitScrollView;\n\t}\n\n\tprotected override beforeTerminalStart(): void {\n\t\tthis.stopSelectionAutoScroll();\n\t\tthis.selectionPressActive = false;\n\t\tthis.stopScrollbarHover();\n\t\tthis.stopScrollbarDrag();\n\t\tthis.flashes.dispose();\n\t\tthis.altScreenActive = true;\n\t\tconst capabilities = getCapabilities();\n\t\tthis.imageProtocol = capabilities.images;\n\t\tthis.uploadedKittyImages.clear();\n\t\tif (capabilities.images === \"iterm2\") {\n\t\t\tthis.savedCapabilities = capabilities;\n\t\t\tsetCapabilities({ ...capabilities, images: null });\n\t\t\tthis.invalidate();\n\t\t}\n\t\tthis.lastDocument = [];\n\t\tthis.selectionAnchor = undefined;\n\t\tthis.selectionFocus = undefined;\n\t\tthis.pressedUrl = undefined;\n\t\tthis.selectionDragged = false;\n\t\tthis.resetRenderState();\n\t\tthis.terminal.write(\n\t\t\t`${ENTER_ALT_SCREEN}${DISABLE_AUTOWRAP}${this.mouseEnabled ? ENABLE_MOUSE : \"\"}\\x1b[2J\\x1b[H\\x1b[?25l`,\n\t\t);\n\t}\n\n\tprotected override beforeTerminalStop(_options: TuiStopOptions): void {\n\t\tthis.stopSelectionAutoScroll();\n\t\tthis.selectionPressActive = false;\n\t\tthis.stopScrollbarHover();\n\t\tthis.stopScrollbarDrag();\n\t\tthis.flashes.dispose();\n\t\tif (!this.altScreenActive) return;\n\t\tthis.terminal.write(\n\t\t\t`${BEGIN_SYNCHRONIZED_OUTPUT}${this.deleteKittyImages()}${this.mouseEnabled ? DISABLE_MOUSE : \"\"}${ENABLE_AUTOWRAP}${END_SYNCHRONIZED_OUTPUT}`,\n\t\t);\n\t\tthis.uploadedKittyImages.clear();\n\t}\n\n\tprotected override afterTerminalStop(options: TuiStopOptions): void {\n\t\tif (!this.altScreenActive) return;\n\t\tthis.altScreenActive = false;\n\t\tif (options.preserveScreen) {\n\t\t\tthis.terminal.write(`${BEGIN_SYNCHRONIZED_OUTPUT}${EXIT_ALT_SCREEN}\\x1b[?25h${END_SYNCHRONIZED_OUTPUT}`);\n\t\t} else {\n\t\t\tconst width = Math.max(1, this.terminal.columns);\n\t\t\tconst documentLines = this.render(width).map((line) => line.replace(OSC133_ZONE_PREFIX, \"\"));\n\t\t\tthis.lastDocument = this.applyLineResets(documentLines.map((line) => line.replaceAll(CURSOR_MARKER, \"\"))).map(\n\t\t\t\t(line) => (isImageLine(line) || visibleWidth(line) <= width ? line : sliceByColumn(line, 0, width, true)),\n\t\t\t);\n\t\t\tlet buffer = `${BEGIN_SYNCHRONIZED_OUTPUT}${EXIT_ALT_SCREEN}${DISABLE_AUTOWRAP}`;\n\t\t\tfor (let row = 0; row < this.lastDocument.length; row++) {\n\t\t\t\tif (row > 0) buffer += \"\\r\\n\";\n\t\t\t\tbuffer += `\\r\\x1b[2K${this.lastDocument[row] ?? \"\"}`;\n\t\t\t}\n\t\t\tbuffer += `\\x1b[0m${ENABLE_AUTOWRAP}\\r\\n\\x1b[?25h${END_SYNCHRONIZED_OUTPUT}`;\n\t\t\tthis.terminal.write(buffer);\n\t\t}\n\t\tif (this.savedCapabilities) {\n\t\t\tsetCapabilities(this.savedCapabilities);\n\t\t\tthis.savedCapabilities = undefined;\n\t\t}\n\t}\n\n\tprivate deleteKittyImages(): string {\n\t\treturn this.imageProtocol === \"kitty\" ? deleteAllKittyImages() : \"\";\n\t}\n\n\tprivate prepareKittyScreen(screen: string[]): { lines: string[]; evictedImageDeletion: string } {\n\t\tconst visibleImageIds = new Set<number>();\n\t\tconst lines = screen.map((line) => {\n\t\t\tconst placement = getKittyImagePlacement(line);\n\t\t\tif (!placement) return line;\n\t\t\tvisibleImageIds.add(placement.imageId);\n\n\t\t\tconst cachedImage = this.uploadedKittyImages.get(placement.imageId);\n\t\t\tconst nextCachedImage = {\n\t\t\t\ttransmissionGeneration: placement.transmissionGeneration,\n\t\t\t\ttransmissionBytes: placement.transmissionBytes,\n\t\t\t\testimatedDecodedBytes: placement.estimatedDecodedBytes,\n\t\t\t};\n\t\t\tif (cachedImage) this.uploadedKittyImages.delete(placement.imageId);\n\t\t\tthis.uploadedKittyImages.set(placement.imageId, nextCachedImage);\n\n\t\t\treturn cachedImage?.transmissionGeneration === placement.transmissionGeneration\n\t\t\t\t? placement.replacementLine\n\t\t\t\t: line;\n\t\t});\n\n\t\tlet cachedOffscreenImageCount = 0;\n\t\tlet cachedOffscreenTransmissionBytes = 0;\n\t\tlet cachedOffscreenDecodedBytes = 0;\n\t\tfor (const [imageId, cachedImage] of this.uploadedKittyImages) {\n\t\t\tif (visibleImageIds.has(imageId)) continue;\n\t\t\tcachedOffscreenImageCount += 1;\n\t\t\tcachedOffscreenTransmissionBytes += cachedImage.transmissionBytes;\n\t\t\tcachedOffscreenDecodedBytes += cachedImage.estimatedDecodedBytes;\n\t\t}\n\n\t\tlet evictedImageDeletion = \"\";\n\t\tfor (const [imageId, cachedImage] of this.uploadedKittyImages) {\n\t\t\tif (\n\t\t\t\tcachedOffscreenImageCount <= MAX_CACHED_OFFSCREEN_KITTY_IMAGES &&\n\t\t\t\tcachedOffscreenTransmissionBytes <= MAX_CACHED_OFFSCREEN_KITTY_TRANSMISSION_BYTES &&\n\t\t\t\tcachedOffscreenDecodedBytes <= MAX_CACHED_OFFSCREEN_KITTY_DECODED_BYTES\n\t\t\t) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (visibleImageIds.has(imageId)) continue;\n\t\t\tevictedImageDeletion += deleteKittyImage(imageId);\n\t\t\tthis.uploadedKittyImages.delete(imageId);\n\t\t\tcachedOffscreenImageCount -= 1;\n\t\t\tcachedOffscreenTransmissionBytes -= cachedImage.transmissionBytes;\n\t\t\tcachedOffscreenDecodedBytes -= cachedImage.estimatedDecodedBytes;\n\t\t}\n\t\treturn { lines, evictedImageDeletion };\n\t}\n\n\tprotected override resetRenderState(): void {\n\t\tthis.previousScreen = [];\n\t\tthis.previousScreenWidth = 0;\n\t\tthis.previousScreenHeight = 0;\n\t\tthis.currentLayout = undefined;\n\t}\n\n\tscrollBy(lines: number): void {\n\t\tthis.getPrimaryScrollView().scrollBy(lines);\n\t\tthis.requestRender();\n\t}\n\n\tscrollToTop(): void {\n\t\tthis.getPrimaryScrollView().scrollToStart();\n\t\tthis.requestRender();\n\t}\n\n\tscrollToBottom(): void {\n\t\tthis.getPrimaryScrollView().scrollToEnd();\n\t\tthis.requestRender();\n\t}\n\n\tprivate scrollToPrompt(direction: -1 | 1): void {\n\t\tif (!this.currentLayout) return;\n\t\tconst scrollView = this.getPrimaryScrollView();\n\t\tconst lines = getScrollViewBox(this.currentLayout, scrollView)?.scrollContentLines;\n\t\tif (!lines) return;\n\n\t\tfor (let row = scrollView.scrollTop + direction; row >= 0 && row < lines.length; row += direction) {\n\t\t\tif (!OSC133_PROMPT_START.test(lines[row] ?? \"\")) continue;\n\t\t\tscrollView.scrollTo(row);\n\t\t\tthis.requestRender();\n\t\t\treturn;\n\t\t}\n\t}\n\n\t/** Show a transient message in the alternate-screen flash stack. */\n\tflash(message: string, durationMs?: number): void {\n\t\tthis.flashes.flash(message, durationMs);\n\t}\n\n\tprivate handleViewportInput(data: string): { consume?: boolean } | undefined {\n\t\tif (data === FOCUS_OUT) {\n\t\t\tconst hadActiveSelection = this.selectionPressActive;\n\t\t\tthis.selectionPressActive = false;\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\tthis.stopScrollbarHover();\n\t\t\tthis.stopScrollbarDrag();\n\t\t\tthis.pressedUrl = undefined;\n\t\t\tthis.selectionDragged = false;\n\t\t\tif (hadActiveSelection) {\n\t\t\t\tthis.selectionAnchor = undefined;\n\t\t\t\tthis.selectionFocus = undefined;\n\t\t\t}\n\t\t\tthis.requestRender();\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (data === FOCUS_IN) return { consume: true };\n\n\t\tconst wheelEvent = this.parseWheelEvent(data);\n\t\tif (wheelEvent) {\n\t\t\tthis.routeWheel(wheelEvent);\n\t\t\treturn { consume: true };\n\t\t}\n\t\tconst mouseEvent = this.parseSgrMouseEvent(data);\n\t\tif (mouseEvent) {\n\t\t\tconst handled = this.handleScrollbarMouseEvent(mouseEvent);\n\t\t\tif (!this.scrollbarDrag) this.updateScrollbarHover(mouseEvent.x, mouseEvent.y);\n\t\t\tif (!handled) this.handleSelectionMouseEvent(mouseEvent);\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (this.isMouseSequence(data)) return { consume: true };\n\n\t\tconst keybindings = getKeybindings();\n\t\tconst isRelease = isKeyRelease(data);\n\t\tif (keybindings.matches(data, \"tui.altScreen.pageUp\")) {\n\t\t\tif (!isRelease) {\n\t\t\t\tthis.scrollBy(-Math.max(1, this.getPrimaryScrollView().viewportHeight - PAGE_SCROLL_OVERLAP));\n\t\t\t}\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.pageDown\")) {\n\t\t\tif (!isRelease) {\n\t\t\t\tthis.scrollBy(Math.max(1, this.getPrimaryScrollView().viewportHeight - PAGE_SCROLL_OVERLAP));\n\t\t\t}\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.previousPrompt\")) {\n\t\t\tif (!isRelease) this.scrollToPrompt(-1);\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.nextPrompt\")) {\n\t\t\tif (!isRelease) this.scrollToPrompt(1);\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.top\")) {\n\t\t\tif (!isRelease) this.scrollToTop();\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.bottom\")) {\n\t\t\tif (!isRelease) this.scrollToBottom();\n\t\t\treturn { consume: true };\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tprivate parseWheelEvent(data: string): WheelEvent | undefined {\n\t\tconst sgr = /^\\x1b\\[<(\\d+);(\\d+);(\\d+)[Mm]$/.exec(data);\n\t\tif (sgr) {\n\t\t\tconst button = Number.parseInt(sgr[1], 10);\n\t\t\tif ((button & 64) === 0) return undefined;\n\t\t\tconst direction = button & 3;\n\t\t\tif (direction !== 0 && direction !== 1) return undefined;\n\t\t\treturn {\n\t\t\t\tdirection: direction === 0 ? -1 : 1,\n\t\t\t\tx: Number.parseInt(sgr[2], 10) - 1,\n\t\t\t\ty: Number.parseInt(sgr[3], 10) - 1,\n\t\t\t};\n\t\t}\n\t\tif (data.length === 6 && data.startsWith(\"\\x1b[M\")) {\n\t\t\tconst button = data.charCodeAt(3) - 32;\n\t\t\tif ((button & 64) === 0) return undefined;\n\t\t\tconst direction = button & 3;\n\t\t\tif (direction !== 0 && direction !== 1) return undefined;\n\t\t\treturn {\n\t\t\t\tdirection: direction === 0 ? -1 : 1,\n\t\t\t\tx: data.charCodeAt(4) - 33,\n\t\t\t\ty: data.charCodeAt(5) - 33,\n\t\t\t};\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tprivate routeWheel(event: WheelEvent): void {\n\t\tlet remaining = event.direction * this.wheelScrollLines;\n\t\tconst seen = new Set<ScrollView>();\n\t\tfor (const scrollView of this.currentLayout ? getScrollViewsAt(this.currentLayout, event.x, event.y) : []) {\n\t\t\tseen.add(scrollView);\n\t\t\tremaining = scrollView.scrollBy(remaining);\n\t\t\tif (remaining === 0 || scrollView.overscroll === \"contain\") break;\n\t\t}\n\t\tconst primary = this.getPrimaryScrollView();\n\t\tif (remaining !== 0 && !seen.has(primary)) primary.scrollBy(remaining);\n\t\tthis.updateScrollbarHover(event.x, event.y);\n\t\tthis.requestRender();\n\t}\n\n\tprivate parseSgrMouseEvent(data: string): SgrMouseEvent | undefined {\n\t\tconst match = /^\\x1b\\[<(\\d+);(\\d+);(\\d+)([Mm])$/.exec(data);\n\t\tif (!match) return undefined;\n\t\treturn {\n\t\t\tbutton: Number.parseInt(match[1], 10),\n\t\t\tx: Number.parseInt(match[2], 10) - 1,\n\t\t\ty: Number.parseInt(match[3], 10) - 1,\n\t\t\trelease: match[4] === \"m\",\n\t\t};\n\t}\n\n\tprivate getScrollbarTargetAt(x: number, y: number): ScrollbarTarget | undefined {\n\t\tif (this.hasOverlay() || !this.currentLayout) return undefined;\n\t\tfor (const scrollView of getScrollViewsAt(this.currentLayout, x, y)) {\n\t\t\tconst box = getScrollViewBox(this.currentLayout, scrollView);\n\t\t\tconst geometry = box ? getScrollbarGeometry(box) : undefined;\n\t\t\tif (\n\t\t\t\tgeometry &&\n\t\t\t\tx === geometry.column &&\n\t\t\t\ty >= geometry.thumbTop &&\n\t\t\t\ty < geometry.thumbTop + geometry.thumbHeight\n\t\t\t) {\n\t\t\t\treturn { scrollView, geometry };\n\t\t\t}\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tprivate setScrollbarHover(scrollView: ScrollView | undefined): void {\n\t\tif (scrollView === this.scrollbarHover) return;\n\t\tthis.scrollbarHover?.setScrollbarActive(false);\n\t\tthis.scrollbarHover = scrollView;\n\t\tthis.scrollbarHover?.setScrollbarActive(true);\n\t}\n\n\tprivate updateScrollbarHover(x: number, y: number): void {\n\t\tthis.setScrollbarHover(this.getScrollbarTargetAt(x, y)?.scrollView);\n\t}\n\n\tprivate stopScrollbarHover(): void {\n\t\tthis.setScrollbarHover(undefined);\n\t}\n\n\tprivate handleScrollbarMouseEvent(event: SgrMouseEvent): boolean {\n\t\tif (this.scrollbarDrag) {\n\t\t\tif (event.release) {\n\t\t\t\tthis.stopScrollbarDrag();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tconst box = this.currentLayout\n\t\t\t\t? getScrollViewBox(this.currentLayout, this.scrollbarDrag.scrollView)\n\t\t\t\t: undefined;\n\t\t\tconst geometry = box ? getScrollbarGeometry(box) : undefined;\n\t\t\tif (geometry) {\n\t\t\t\tconst maxThumbOffset = geometry.trackHeight - geometry.thumbHeight;\n\t\t\t\tconst thumbOffset = Math.max(\n\t\t\t\t\t0,\n\t\t\t\t\tMath.min(maxThumbOffset, event.y - geometry.trackTop - this.scrollbarDrag.grabOffset),\n\t\t\t\t);\n\t\t\t\tconst scrollTop =\n\t\t\t\t\tmaxThumbOffset === 0 ? 0 : Math.round((thumbOffset / maxThumbOffset) * geometry.maxScrollTop);\n\t\t\t\tthis.scrollbarDrag.scrollView.scrollTo(scrollTop);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tif (event.release || (event.button & 32) !== 0 || (event.button & 3) !== 0) return false;\n\t\tconst target = this.getScrollbarTargetAt(event.x, event.y);\n\t\tif (!target) return false;\n\t\tthis.stopSelectionAutoScroll();\n\t\tthis.selectionPressActive = false;\n\t\tthis.selectionAnchor = undefined;\n\t\tthis.selectionFocus = undefined;\n\t\tthis.pressedUrl = undefined;\n\t\tthis.selectionDragged = false;\n\t\tthis.setScrollbarHover(target.scrollView);\n\t\tthis.scrollbarDrag = {\n\t\t\tscrollView: target.scrollView,\n\t\t\tgrabOffset: event.y - target.geometry.thumbTop,\n\t\t};\n\t\treturn true;\n\t}\n\n\tprivate stopScrollbarDrag(): void {\n\t\tthis.scrollbarDrag = undefined;\n\t}\n\n\tprivate getScrollSelectionPoint(scrollView: ScrollView, x: number, y: number): SelectionPoint | undefined {\n\t\tif (!this.currentLayout) return undefined;\n\t\tconst box = getScrollViewBox(this.currentLayout, scrollView);\n\t\tif (!box || box.rect.height <= 0 || box.clip.height <= 0) return undefined;\n\t\tconst visibleTop = Math.max(0, box.rect.y, box.clip.y);\n\t\tconst visibleBottom = Math.min(\n\t\t\tthis.terminal.rows - 1,\n\t\t\tbox.rect.y + box.rect.height - 1,\n\t\t\tbox.clip.y + box.clip.height - 1,\n\t\t);\n\t\tif (visibleBottom < visibleTop) return undefined;\n\t\tconst pointerRow = Math.max(visibleTop, Math.min(visibleBottom, y));\n\t\tconst maxContentRow = Math.max(0, (box.scrollContentLines?.length ?? 1) - 1);\n\t\treturn {\n\t\t\trow: Math.max(0, Math.min(maxContentRow, scrollView.scrollTop + pointerRow - box.rect.y)),\n\t\t\tcol: Math.max(0, Math.min(box.rect.width - 1, x - box.rect.x)),\n\t\t\tscrollView,\n\t\t};\n\t}\n\n\tprivate getSelectionPoint(event: SgrMouseEvent, scrollView?: ScrollView): SelectionPoint {\n\t\tif (scrollView) {\n\t\t\tconst point = this.getScrollSelectionPoint(scrollView, event.x, event.y);\n\t\t\tif (point) return point;\n\t\t}\n\t\treturn {\n\t\t\trow: Math.max(0, Math.min(this.terminal.rows - 1, event.y)),\n\t\t\tcol: Math.max(0, Math.min(this.terminal.columns - 1, event.x)),\n\t\t};\n\t}\n\n\tprivate updateSelectionAutoScroll(event: SgrMouseEvent): void {\n\t\tconst scrollView = this.selectionAnchor?.scrollView;\n\t\tif (!scrollView || !this.currentLayout) {\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\treturn;\n\t\t}\n\t\tconst box = getScrollViewBox(this.currentLayout, scrollView);\n\t\tif (!box || box.rect.height <= 0 || box.clip.height <= 0) {\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\treturn;\n\t\t}\n\t\tconst visibleTop = Math.max(0, box.rect.y, box.clip.y);\n\t\tconst visibleBottom = Math.min(\n\t\t\tthis.terminal.rows - 1,\n\t\t\tbox.rect.y + box.rect.height - 1,\n\t\t\tbox.clip.y + box.clip.height - 1,\n\t\t);\n\t\tthis.selectionDragPointer = { x: event.x, y: event.y };\n\t\tthis.selectionAutoScrollDirection = event.y <= visibleTop ? -1 : event.y >= visibleBottom ? 1 : 0;\n\t\tif (this.selectionAutoScrollDirection === 0) {\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\treturn;\n\t\t}\n\t\tif (this.selectionAutoScrollTimer) return;\n\t\tthis.selectionAutoScrollTimer = setInterval(() => this.autoScrollSelection(), 50);\n\t\tthis.selectionAutoScrollTimer.unref();\n\t}\n\n\tprivate autoScrollSelection(): void {\n\t\tconst scrollView = this.selectionAnchor?.scrollView;\n\t\tconst pointer = this.selectionDragPointer;\n\t\tconst direction = this.selectionAutoScrollDirection;\n\t\tif (!scrollView || !pointer || direction === 0) {\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\treturn;\n\t\t}\n\t\tconst remaining = scrollView.scrollBy(direction);\n\t\tif (remaining === direction) {\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\treturn;\n\t\t}\n\t\tconst point = this.getScrollSelectionPoint(scrollView, pointer.x, pointer.y);\n\t\tif (point) this.selectionFocus = point;\n\t\tthis.requestRender();\n\t}\n\n\tprivate stopSelectionAutoScroll(): void {\n\t\tif (this.selectionAutoScrollTimer) {\n\t\t\tclearInterval(this.selectionAutoScrollTimer);\n\t\t\tthis.selectionAutoScrollTimer = undefined;\n\t\t}\n\t\tthis.selectionAutoScrollDirection = 0;\n\t\tthis.selectionDragPointer = undefined;\n\t}\n\n\tprivate handleSelectionMouseEvent(event: SgrMouseEvent): void {\n\t\tif ((event.button & 3) !== 0) return;\n\t\tconst anchorScrollView = this.selectionAnchor?.scrollView;\n\t\tconst point = this.getSelectionPoint(event, anchorScrollView);\n\t\tif (event.release) {\n\t\t\tif (!this.selectionPressActive) return;\n\t\t\tthis.selectionPressActive = false;\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\tif (!this.selectionAnchor) return;\n\t\t\tthis.selectionFocus = point;\n\t\t\tconst clickedUrl =\n\t\t\t\t!this.selectionDragged &&\n\t\t\t\tthis.selectionAnchor.scrollView === point.scrollView &&\n\t\t\t\tthis.selectionAnchor.row === point.row &&\n\t\t\t\tthis.selectionAnchor.col === point.col\n\t\t\t\t\t? this.pressedUrl\n\t\t\t\t\t: undefined;\n\t\t\tthis.pressedUrl = undefined;\n\t\t\tif (clickedUrl && this.openUrl) {\n\t\t\t\tthis.selectionAnchor = undefined;\n\t\t\t\tthis.selectionFocus = undefined;\n\t\t\t\ttry {\n\t\t\t\t\tthis.openUrl(clickedUrl);\n\t\t\t\t} catch {\n\t\t\t\t\t// URL activation is best-effort.\n\t\t\t\t}\n\t\t\t\tthis.requestRender();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.copySelectionToClipboard();\n\t\t\tthis.requestRender();\n\t\t\treturn;\n\t\t}\n\t\tif ((event.button & 32) !== 0) {\n\t\t\tif (!this.selectionPressActive || !this.selectionAnchor) return;\n\t\t\tthis.selectionDragged = true;\n\t\t\tthis.pressedUrl = undefined;\n\t\t\tthis.selectionFocus = point;\n\t\t\tthis.updateSelectionAutoScroll(event);\n\t\t\tthis.requestRender();\n\t\t\treturn;\n\t\t}\n\t\tthis.stopSelectionAutoScroll();\n\t\tthis.selectionPressActive = true;\n\t\tconst scrollView =\n\t\t\t!this.hasOverlay() && this.currentLayout\n\t\t\t\t? getScrollViewsAt(this.currentLayout, event.x, event.y)[0]\n\t\t\t\t: undefined;\n\t\tconst anchor = this.getSelectionPoint(event, scrollView);\n\t\tthis.selectionAnchor = anchor;\n\t\tthis.selectionFocus = anchor;\n\t\tthis.selectionDragged = false;\n\t\tthis.pressedUrl = getOsc8LinkAtColumn(\n\t\t\tthis.previousScreen[Math.max(0, Math.min(this.terminal.rows - 1, event.y))] ?? \"\",\n\t\t\tMath.max(0, Math.min(this.terminal.columns - 1, event.x)),\n\t\t);\n\t\tthis.requestRender();\n\t}\n\n\tprivate getSelectionBounds(): { start: SelectionPoint; end: SelectionPoint } | undefined {\n\t\tif (!this.selectionAnchor || !this.selectionFocus) return undefined;\n\t\tif (this.selectionAnchor.scrollView !== this.selectionFocus.scrollView) return undefined;\n\t\tconst anchorBeforeFocus =\n\t\t\tthis.selectionAnchor.row < this.selectionFocus.row ||\n\t\t\t(this.selectionAnchor.row === this.selectionFocus.row && this.selectionAnchor.col < this.selectionFocus.col);\n\t\tif (\n\t\t\tthis.selectionAnchor.row === this.selectionFocus.row &&\n\t\t\tthis.selectionAnchor.col === this.selectionFocus.col\n\t\t) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn anchorBeforeFocus\n\t\t\t? { start: this.selectionAnchor, end: this.selectionFocus }\n\t\t\t: { start: this.selectionFocus, end: this.selectionAnchor };\n\t}\n\n\tprivate getSelectionColumns(\n\t\tline: string,\n\t\trow: number,\n\t\tselection: { start: SelectionPoint; end: SelectionPoint },\n\t\tminColumn = 0,\n\t\tmaxColumn = visibleWidth(line),\n\t): { start: number; end: number } {\n\t\tconst lineWidth = visibleWidth(line);\n\t\tlet start = Math.max(0, minColumn);\n\t\tlet end = Math.min(lineWidth, maxColumn);\n\t\tif (row === selection.start.row) {\n\t\t\tstart = getGraphemeCellRange(line, selection.start.col)?.start ?? Math.min(selection.start.col, lineWidth);\n\t\t}\n\t\tif (row === selection.end.row) {\n\t\t\tend = getGraphemeCellRange(line, selection.end.col)?.end ?? Math.min(selection.end.col + 1, lineWidth);\n\t\t}\n\t\treturn { start: Math.max(minColumn, start), end: Math.min(maxColumn, end) };\n\t}\n\n\tprivate copySelectionToClipboard(): void {\n\t\tconst selection = this.getSelectionBounds();\n\t\tif (!selection) return;\n\t\tlet sourceLines: readonly string[] = this.previousScreen;\n\t\tif (selection.start.scrollView) {\n\t\t\tif (!this.currentLayout) return;\n\t\t\tconst box = getScrollViewBox(this.currentLayout, selection.start.scrollView);\n\t\t\tif (!box?.scrollContentLines) return;\n\t\t\tsourceLines = box.scrollContentLines;\n\t\t}\n\t\tconst lines: string[] = [];\n\t\tfor (let row = selection.start.row; row <= selection.end.row; row++) {\n\t\t\tconst line = sourceLines[row] ?? \"\";\n\t\t\tconst columns = this.getSelectionColumns(line, row, selection);\n\t\t\tlines.push(\n\t\t\t\tstripTerminalSequences(\n\t\t\t\t\tsliceByColumn(line, columns.start, Math.max(0, columns.end - columns.start), true),\n\t\t\t\t).trimEnd(),\n\t\t\t);\n\t\t}\n\t\tconst text = lines.join(\"\\n\");\n\t\tif (text.length === 0) return;\n\t\tthis.terminal.write(`\\x1b]52;c;${Buffer.from(text).toString(\"base64\")}\\x07`);\n\t\tthis.flash(\"Copied!\");\n\t}\n\n\tprivate applySelectionHighlight(text: string): string {\n\t\tlet result = \"\\x1b[7m\";\n\t\tlet index = 0;\n\t\twhile (index < text.length) {\n\t\t\tconst ansi = extractAnsiCode(text, index);\n\t\t\tif (!ansi) {\n\t\t\t\tresult += text[index];\n\t\t\t\tindex += 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tresult += ansi.code;\n\t\t\tif (ansi.code.endsWith(\"m\")) result += \"\\x1b[7m\";\n\t\t\tindex += ansi.length;\n\t\t}\n\t\treturn `${result}\\x1b[27m`;\n\t}\n\n\tprivate applySelection(screen: string[], layout = this.currentLayout): string[] {\n\t\tconst selection = this.getSelectionBounds();\n\t\tif (!selection) return screen;\n\t\tlet screenSelection = selection;\n\t\tlet minRow = 0;\n\t\tlet maxRow = screen.length - 1;\n\t\tlet minColumn = 0;\n\t\tlet maxColumn = this.terminal.columns;\n\t\tif (selection.start.scrollView) {\n\t\t\tif (!layout) return screen;\n\t\t\tconst box = getScrollViewBox(layout, selection.start.scrollView);\n\t\t\tif (!box) return screen;\n\t\t\tminRow = Math.max(0, box.rect.y, box.clip.y);\n\t\t\tmaxRow = Math.min(screen.length - 1, box.rect.y + box.rect.height - 1, box.clip.y + box.clip.height - 1);\n\t\t\tminColumn = Math.max(0, box.rect.x, box.clip.x);\n\t\t\tmaxColumn = Math.min(this.terminal.columns, box.rect.x + box.rect.width, box.clip.x + box.clip.width);\n\t\t\tscreenSelection = {\n\t\t\t\tstart: {\n\t\t\t\t\trow: box.rect.y + selection.start.row - selection.start.scrollView.scrollTop,\n\t\t\t\t\tcol: box.rect.x + selection.start.col,\n\t\t\t\t\tscrollView: selection.start.scrollView,\n\t\t\t\t},\n\t\t\t\tend: {\n\t\t\t\t\trow: box.rect.y + selection.end.row - selection.start.scrollView.scrollTop,\n\t\t\t\t\tcol: box.rect.x + selection.end.col,\n\t\t\t\t\tscrollView: selection.start.scrollView,\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\treturn screen.map((line, row) => {\n\t\t\tif (\n\t\t\t\trow < minRow ||\n\t\t\t\trow > maxRow ||\n\t\t\t\trow < screenSelection.start.row ||\n\t\t\t\trow > screenSelection.end.row ||\n\t\t\t\tisImageLine(line)\n\t\t\t) {\n\t\t\t\treturn line;\n\t\t\t}\n\t\t\tconst lineWidth = visibleWidth(line);\n\t\t\tconst columns = this.getSelectionColumns(line, row, screenSelection, minColumn, maxColumn);\n\t\t\tif (columns.end <= columns.start) return line;\n\t\t\tconst before = sliceByColumn(line, 0, columns.start, true);\n\t\t\tconst selected = sliceByColumn(line, columns.start, columns.end - columns.start, true);\n\t\t\tconst after = sliceByColumn(line, columns.end, Math.max(0, lineWidth - columns.end), true);\n\t\t\treturn `${before}${this.applySelectionHighlight(selected)}${after}`;\n\t\t});\n\t}\n\n\tprivate isMouseSequence(data: string): boolean {\n\t\treturn /^\\x1b\\[<\\d+;\\d+;\\d+[Mm]$/.test(data) || (data.length === 6 && data.startsWith(\"\\x1b[M\"));\n\t}\n\n\tprivate compositeFlashes(screen: string[], width: number, height: number): string[] {\n\t\tconst flashLines = this.flashes.render(width).slice(-height);\n\t\tif (flashLines.length === 0) return screen;\n\t\tconst result = [...screen];\n\t\twhile (result.length < height) result.push(\"\");\n\t\tfor (let row = 0; row < flashLines.length; row++) {\n\t\t\tconst line = flashLines[row]!;\n\t\t\tconst flashWidth = visibleWidth(line);\n\t\t\tif (flashWidth === 0) continue;\n\t\t\tresult[row] = compositeTuiLine(result[row] ?? \"\", line, width - flashWidth, flashWidth, width);\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected override doRender(): void {\n\t\tif (this.stopped || !this.altScreenActive) return;\n\t\tconst width = Math.max(1, this.terminal.columns);\n\t\tconst height = Math.max(1, this.terminal.rows);\n\t\tconst root = this.layoutRoot ?? this.implicitScrollView;\n\t\tconst nextLayout = renderLayoutFrame(root, width, height, () => this.requestRender());\n\t\tlet screen = nextLayout.lines.map((line) => line.replace(OSC133_ZONE_PREFIX, \"\"));\n\t\tscreen = this.compositeOverlays(screen, width, height);\n\t\tif (screen.length > height) screen = screen.slice(screen.length - height);\n\t\tscreen = this.applySelection(screen, nextLayout);\n\t\tscreen = this.compositeFlashes(screen, width, height);\n\n\t\tconst cursorPos = this.extractCursorPosition(screen, height);\n\t\tscreen = this.applyLineResets(screen).map((line) => {\n\t\t\tif (isImageLine(line) || visibleWidth(line) <= width) return line;\n\t\t\treturn sliceByColumn(line, 0, width, true);\n\t\t});\n\n\t\tconst fullRedraw =\n\t\t\tthis.previousScreen.length === 0 || this.previousScreenWidth !== width || this.previousScreenHeight !== height;\n\t\tconst imagesNeedRedraw = screen.some(\n\t\t\t(line, row) =>\n\t\t\t\tline !== this.previousScreen[row] && (isImageLine(line) || isImageLine(this.previousScreen[row] ?? \"\")),\n\t\t);\n\t\tconst redrawImages = fullRedraw || imagesNeedRedraw;\n\t\tconst hadUploadedKittyImages = this.uploadedKittyImages.size > 0;\n\t\tconst preparedKittyScreen =\n\t\t\tredrawImages && this.imageProtocol === \"kitty\"\n\t\t\t\t? this.prepareKittyScreen(screen)\n\t\t\t\t: { lines: screen, evictedImageDeletion: \"\" };\n\n\t\tlet buffer = BEGIN_SYNCHRONIZED_OUTPUT;\n\t\tif (fullRedraw) {\n\t\t\tthis.fullRedrawCount += 1;\n\t\t\tconst clearImages =\n\t\t\t\tthis.imageProtocol === \"kitty\" && hadUploadedKittyImages\n\t\t\t\t\t? deleteAllKittyPlacements()\n\t\t\t\t\t: this.deleteKittyImages();\n\t\t\tbuffer += `${clearImages}\\x1b[2J`;\n\t\t} else if (imagesNeedRedraw) {\n\t\t\tif (this.imageProtocol === \"iterm2\") buffer += \"\\x1b[2J\";\n\t\t\telse if (this.imageProtocol === \"kitty\") buffer += deleteAllKittyPlacements();\n\t\t}\n\t\tbuffer += preparedKittyScreen.evictedImageDeletion;\n\n\t\tfor (let row = 0; row < height; row++) {\n\t\t\tif (!fullRedraw && !imagesNeedRedraw && screen[row] === this.previousScreen[row]) continue;\n\t\t\tbuffer += `\\x1b[${row + 1};1H\\x1b[2K${preparedKittyScreen.lines[row] ?? \"\"}`;\n\t\t}\n\n\t\tif (cursorPos) {\n\t\t\tbuffer += `\\x1b[${cursorPos.row + 1};${Math.min(width, cursorPos.col) + 1}H`;\n\t\t\tbuffer += this.getShowHardwareCursor() ? \"\\x1b[?25h\" : \"\\x1b[?25l\";\n\t\t} else {\n\t\t\tbuffer += \"\\x1b[?25l\";\n\t\t}\n\t\tbuffer += END_SYNCHRONIZED_OUTPUT;\n\t\tthis.terminal.write(buffer);\n\n\t\tthis.previousScreen = screen;\n\t\tthis.previousScreenWidth = width;\n\t\tthis.previousScreenHeight = height;\n\t\tthis.currentLayout = nextLayout;\n\t}\n}\n"]}
1
+ {"version":3,"file":"tui-alt-screen.js","sourceRoot":"","sources":["../src/tui-alt-screen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EACN,oBAAoB,EACpB,gBAAgB,EAChB,gBAAgB,EAEhB,iBAAiB,GAEjB,MAAM,aAAa,CAAC;AAErB,OAAO,EACN,oBAAoB,EACpB,wBAAwB,EACxB,gBAAgB,EAChB,eAAe,EACf,sBAAsB,EAEtB,WAAW,EACX,eAAe,GAEf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEN,aAAa,EACb,gBAAgB,EAChB,OAAO,EAEP,YAAY,GAEZ,MAAM,UAAU,CAAC;AAClB,OAAO,EACN,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YACP,MAAM,IAAI,WAAW,CAAC;QACvB,CAAC;QACD,MAAM,IAAI,uBAAuB,CAAC;QAClC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAE5B,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;QAC7B,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC;QACjC,IAAI,CAAC,oBAAoB,GAAG,MAAM,CAAC;QACnC,IAAI,CAAC,aAAa,GAAG,UAAU,CAAC;IAAA,CAChC;CACD","sourcesContent":["import { AltScreenFlashContainer } from \"./components/alt-screen-flash.ts\";\nimport { ScrollView } from \"./components/scroll-view.ts\";\nimport { getKeybindings } from \"./keybindings.ts\";\nimport { isKeyRelease } from \"./keys.ts\";\nimport {\n\tgetScrollbarGeometry,\n\tgetScrollViewBox,\n\tgetScrollViewsAt,\n\ttype LayoutFrame,\n\trenderLayoutFrame,\n\ttype ScrollbarGeometry,\n} from \"./layout.ts\";\nimport type { Terminal } from \"./terminal.ts\";\nimport {\n\tdeleteAllKittyImages,\n\tdeleteAllKittyPlacements,\n\tdeleteKittyImage,\n\tgetCapabilities,\n\tgetKittyImagePlacement,\n\ttype ImageProtocol,\n\tisImageLine,\n\tsetCapabilities,\n\ttype TerminalCapabilities,\n} from \"./terminal-image.ts\";\nimport {\n\ttype Component,\n\tCURSOR_MARKER,\n\tcompositeTuiLine,\n\tTuiBase,\n\ttype TuiStopOptions,\n\tVIEWPORT_TUI,\n\ttype ViewportTUI,\n} from \"./tui.ts\";\nimport {\n\textractAnsiCode,\n\tgetGraphemeCellRange,\n\tgetOsc8LinkAtColumn,\n\tgetWordSegmenter,\n\tsliceByColumn,\n\tstripTerminalSequences,\n\tvisibleWidth,\n} from \"./utils.ts\";\n\nconst ENTER_ALT_SCREEN = \"\\x1b[?1049h\";\nconst EXIT_ALT_SCREEN = \"\\x1b[?1049l\";\nconst DISABLE_AUTOWRAP = \"\\x1b[?7l\";\nconst ENABLE_AUTOWRAP = \"\\x1b[?7h\";\nconst ENABLE_BUTTON_MOTION_MOUSE = \"\\x1b[?1000h\\x1b[?1002h\\x1b[?1004h\\x1b[?1006h\";\nconst ENABLE_ALL_MOTION_MOUSE = \"\\x1b[?1000h\\x1b[?1002h\\x1b[?1003h\\x1b[?1004h\\x1b[?1006h\";\nconst DISABLE_MOUSE = \"\\x1b[?1006l\\x1b[?1004l\\x1b[?1003l\\x1b[?1002l\\x1b[?1000l\";\nconst FOCUS_IN = \"\\x1b[I\";\nconst FOCUS_OUT = \"\\x1b[O\";\nconst BEGIN_SYNCHRONIZED_OUTPUT = \"\\x1b[?2026h\";\nconst END_SYNCHRONIZED_OUTPUT = \"\\x1b[?2026l\";\nconst OSC133_ZONE_PREFIX = /^(?:\\x1b\\]133;[ABC](?:\\x07|\\x1b\\\\))+/;\nconst OSC133_PROMPT_START = /^\\x1b\\]133;A(?:\\x07|\\x1b\\\\)/;\nconst PAGE_SCROLL_OVERLAP = 4;\nconst MAX_CACHED_OFFSCREEN_KITTY_IMAGES = 16;\nconst MAX_CACHED_OFFSCREEN_KITTY_TRANSMISSION_BYTES = 32 * 1024 * 1024;\nconst MAX_CACHED_OFFSCREEN_KITTY_DECODED_BYTES = 64 * 1024 * 1024;\nconst DOUBLE_CLICK_INTERVAL_MS = 500;\nconst wordSegmenter = getWordSegmenter();\n\ninterface CachedKittyImage {\n\ttransmissionGeneration: number;\n\ttransmissionBytes: number;\n\testimatedDecodedBytes: number;\n}\n\ninterface SelectionPoint {\n\trow: number;\n\tcol: number;\n\tscrollView?: ScrollView;\n\t/** Whether this point lies between terminal cells rather than on a cell. */\n\tboundary?: boolean;\n}\n\ninterface SelectionRange {\n\tstart: SelectionPoint;\n\tend: SelectionPoint;\n}\n\ntype SelectionGranularity = \"character\" | \"word\" | \"line\";\n\ninterface ClickTarget {\n\ttimestamp: number;\n\tcount: number;\n\trow: number;\n\tscrollView?: ScrollView;\n\twordStart: number;\n\twordEnd: number;\n}\n\ninterface SgrMouseEvent {\n\tbutton: number;\n\tx: number;\n\ty: number;\n\trelease: boolean;\n}\n\ninterface WheelEvent {\n\tdirection: -1 | 1;\n\tx: number;\n\ty: number;\n}\n\ninterface ScrollbarDrag {\n\tscrollView: ScrollView;\n\tgrabOffset: number;\n}\n\ninterface ScrollbarTarget {\n\tscrollView: ScrollView;\n\tgeometry: ScrollbarGeometry;\n}\n\nexport interface TuiAltScreenOptions {\n\t/** Number of logical lines moved for each mouse-wheel event. */\n\twheelScrollLines?: number;\n\t/** Capture mouse events for viewport scrolling and application-owned text selection. */\n\tmouse?: boolean;\n\t/** Open an OSC 8 hyperlink activated with a primary-button click. */\n\topenUrl?: (url: string) => void;\n\t/** Handle an unmodified secondary-button press for clipboard paste. Currently enabled on Windows only. */\n\tonRightClickPaste?: () => void;\n}\n\n/** Alternate-screen TUI with a scrollable, application-owned viewport. */\nexport class TuiAltScreen extends TuiBase implements ViewportTUI {\n\treadonly mode = \"fullscreen\" as const;\n\treadonly [VIEWPORT_TUI] = true as const;\n\tprivate previousScreen: string[] = [];\n\tprivate lastDocument: string[] = [];\n\tprivate previousScreenWidth = 0;\n\tprivate previousScreenHeight = 0;\n\tprivate layoutRoot: Component | undefined;\n\tprivate currentLayout: LayoutFrame | undefined;\n\tprivate readonly implicitDocument: Component;\n\tprivate readonly implicitScrollView: ScrollView;\n\tprivate readonly flashes: AltScreenFlashContainer;\n\tprivate altScreenActive = false;\n\tprivate imageProtocol: ImageProtocol = null;\n\tprivate savedCapabilities?: TerminalCapabilities;\n\tprivate readonly uploadedKittyImages = new Map<number, CachedKittyImage>();\n\tprivate selectionAnchor?: SelectionPoint;\n\tprivate selectionFocus?: SelectionPoint;\n\tprivate selectionGranularity: SelectionGranularity = \"character\";\n\tprivate selectionInitialRange?: SelectionRange;\n\tprivate lastClick?: ClickTarget;\n\tprivate selectionDragPointer?: { x: number; y: number };\n\tprivate selectionAutoScrollDirection: -1 | 0 | 1 = 0;\n\tprivate selectionAutoScrollTimer?: NodeJS.Timeout;\n\tprivate selectionPressActive = false;\n\tprivate scrollbarDrag?: ScrollbarDrag;\n\tprivate scrollbarHover?: ScrollView;\n\tprivate pressedUrl?: string;\n\tprivate selectionDragged = false;\n\tprivate readonly wheelScrollLines: number;\n\tprivate readonly mouseEnabled: boolean;\n\tprivate readonly openUrl?: (url: string) => void;\n\tprivate readonly onRightClickPaste?: () => void;\n\n\tconstructor(\n\t\tterminal: Terminal,\n\t\tshowHardwareCursor?: boolean,\n\t\tlogDirectory?: string,\n\t\toptions: TuiAltScreenOptions = {},\n\t) {\n\t\tsuper(terminal, showHardwareCursor, logDirectory);\n\t\tthis.implicitDocument = {\n\t\t\trender: (width) => super.render(width),\n\t\t\tinvalidate: () => {\n\t\t\t\tfor (const child of this.children) child.invalidate();\n\t\t\t},\n\t\t};\n\t\tthis.implicitScrollView = new ScrollView(this.implicitDocument, { follow: \"end\", primary: true });\n\t\tthis.flashes = new AltScreenFlashContainer(() => this.requestRender());\n\t\tthis.wheelScrollLines = Math.max(1, Math.floor(options.wheelScrollLines ?? 1));\n\t\tthis.mouseEnabled = options.mouse ?? true;\n\t\tthis.openUrl = options.openUrl;\n\t\tthis.onRightClickPaste = options.onRightClickPaste;\n\t\tthis.addInputListener((data) => this.handleViewportInput(data));\n\t}\n\n\tget viewportTop(): number {\n\t\treturn this.getPrimaryScrollView().scrollTop;\n\t}\n\n\tget isFollowingOutput(): boolean {\n\t\treturn this.getPrimaryScrollView().isFollowingEnd;\n\t}\n\n\tsetLayoutRoot(component: Component | undefined): void {\n\t\tif (this.layoutRoot === component) return;\n\t\tthis.layoutRoot = component;\n\t\tthis.currentLayout = undefined;\n\t\tthis.requestRender();\n\t}\n\n\toverride render(width: number): string[] {\n\t\treturn this.layoutRoot?.render(width) ?? super.render(width);\n\t}\n\n\tprotected override getMountedRoots(): readonly Component[] {\n\t\treturn this.layoutRoot ? [this.layoutRoot] : this.children;\n\t}\n\n\tprivate getPrimaryScrollView(): ScrollView {\n\t\treturn this.currentLayout?.primaryScrollView ?? this.implicitScrollView;\n\t}\n\n\tprotected override beforeTerminalStart(): void {\n\t\tthis.stopSelectionAutoScroll();\n\t\tthis.selectionPressActive = false;\n\t\tthis.stopScrollbarHover();\n\t\tthis.stopScrollbarDrag();\n\t\tthis.flashes.dispose();\n\t\tthis.altScreenActive = true;\n\t\tconst capabilities = getCapabilities();\n\t\tthis.imageProtocol = capabilities.images;\n\t\tthis.uploadedKittyImages.clear();\n\t\tif (capabilities.images === \"iterm2\") {\n\t\t\tthis.savedCapabilities = capabilities;\n\t\t\tsetCapabilities({ ...capabilities, images: null });\n\t\t\tthis.invalidate();\n\t\t}\n\t\tthis.lastDocument = [];\n\t\tthis.selectionAnchor = undefined;\n\t\tthis.selectionFocus = undefined;\n\t\tthis.selectionGranularity = \"character\";\n\t\tthis.selectionInitialRange = undefined;\n\t\tthis.lastClick = undefined;\n\t\tthis.pressedUrl = undefined;\n\t\tthis.selectionDragged = false;\n\t\tthis.resetRenderState();\n\t\tconst term = process.env.TERM?.toLowerCase() ?? \"\";\n\t\t// Multiplexers can lag when every pointer movement is forwarded. Button-motion\n\t\t// tracking preserves clicks, wheel events, selections, and scrollbar dragging.\n\t\tconst mouseSequence =\n\t\t\tprocess.env.TMUX !== undefined ||\n\t\t\tprocess.env.ZELLIJ !== undefined ||\n\t\t\tprocess.env.STY !== undefined ||\n\t\t\tterm.startsWith(\"tmux\") ||\n\t\t\tterm.startsWith(\"screen\")\n\t\t\t\t? ENABLE_BUTTON_MOTION_MOUSE\n\t\t\t\t: ENABLE_ALL_MOTION_MOUSE;\n\t\tthis.terminal.write(\n\t\t\t`${ENTER_ALT_SCREEN}${DISABLE_AUTOWRAP}${this.mouseEnabled ? mouseSequence : \"\"}\\x1b[2J\\x1b[H\\x1b[?25l`,\n\t\t);\n\t}\n\n\tprotected override beforeTerminalStop(_options: TuiStopOptions): void {\n\t\tthis.stopSelectionAutoScroll();\n\t\tthis.selectionPressActive = false;\n\t\tthis.stopScrollbarHover();\n\t\tthis.stopScrollbarDrag();\n\t\tthis.flashes.dispose();\n\t\tif (!this.altScreenActive) return;\n\t\tthis.terminal.write(\n\t\t\t`${BEGIN_SYNCHRONIZED_OUTPUT}${this.deleteKittyImages()}${this.mouseEnabled ? DISABLE_MOUSE : \"\"}${ENABLE_AUTOWRAP}${END_SYNCHRONIZED_OUTPUT}`,\n\t\t);\n\t\tthis.uploadedKittyImages.clear();\n\t}\n\n\tprotected override afterTerminalStop(options: TuiStopOptions): void {\n\t\tif (!this.altScreenActive) return;\n\t\tthis.altScreenActive = false;\n\t\tif (options.preserveScreen) {\n\t\t\tthis.terminal.write(`${BEGIN_SYNCHRONIZED_OUTPUT}${EXIT_ALT_SCREEN}\\x1b[?25h${END_SYNCHRONIZED_OUTPUT}`);\n\t\t} else {\n\t\t\tconst width = Math.max(1, this.terminal.columns);\n\t\t\tconst documentLines = this.render(width).map((line) => line.replace(OSC133_ZONE_PREFIX, \"\"));\n\t\t\tthis.lastDocument = this.applyLineResets(documentLines.map((line) => line.replaceAll(CURSOR_MARKER, \"\"))).map(\n\t\t\t\t(line) => (isImageLine(line) || visibleWidth(line) <= width ? line : sliceByColumn(line, 0, width, true)),\n\t\t\t);\n\t\t\tlet buffer = `${BEGIN_SYNCHRONIZED_OUTPUT}${EXIT_ALT_SCREEN}${DISABLE_AUTOWRAP}`;\n\t\t\tfor (let row = 0; row < this.lastDocument.length; row++) {\n\t\t\t\tif (row > 0) buffer += \"\\r\\n\";\n\t\t\t\tbuffer += `\\r\\x1b[2K${this.lastDocument[row] ?? \"\"}`;\n\t\t\t}\n\t\t\tbuffer += `\\x1b[0m${ENABLE_AUTOWRAP}\\r\\n\\x1b[?25h${END_SYNCHRONIZED_OUTPUT}`;\n\t\t\tthis.terminal.write(buffer);\n\t\t}\n\t\tif (this.savedCapabilities) {\n\t\t\tsetCapabilities(this.savedCapabilities);\n\t\t\tthis.savedCapabilities = undefined;\n\t\t}\n\t}\n\n\tprivate deleteKittyImages(): string {\n\t\treturn this.imageProtocol === \"kitty\" ? deleteAllKittyImages() : \"\";\n\t}\n\n\tprivate prepareKittyScreen(screen: string[]): { lines: string[]; evictedImageDeletion: string } {\n\t\tconst visibleImageIds = new Set<number>();\n\t\tconst lines = screen.map((line) => {\n\t\t\tconst placement = getKittyImagePlacement(line);\n\t\t\tif (!placement) return line;\n\t\t\tvisibleImageIds.add(placement.imageId);\n\n\t\t\tconst cachedImage = this.uploadedKittyImages.get(placement.imageId);\n\t\t\tconst nextCachedImage = {\n\t\t\t\ttransmissionGeneration: placement.transmissionGeneration,\n\t\t\t\ttransmissionBytes: placement.transmissionBytes,\n\t\t\t\testimatedDecodedBytes: placement.estimatedDecodedBytes,\n\t\t\t};\n\t\t\tif (cachedImage) this.uploadedKittyImages.delete(placement.imageId);\n\t\t\tthis.uploadedKittyImages.set(placement.imageId, nextCachedImage);\n\n\t\t\treturn cachedImage?.transmissionGeneration === placement.transmissionGeneration\n\t\t\t\t? placement.replacementLine\n\t\t\t\t: line;\n\t\t});\n\n\t\tlet cachedOffscreenImageCount = 0;\n\t\tlet cachedOffscreenTransmissionBytes = 0;\n\t\tlet cachedOffscreenDecodedBytes = 0;\n\t\tfor (const [imageId, cachedImage] of this.uploadedKittyImages) {\n\t\t\tif (visibleImageIds.has(imageId)) continue;\n\t\t\tcachedOffscreenImageCount += 1;\n\t\t\tcachedOffscreenTransmissionBytes += cachedImage.transmissionBytes;\n\t\t\tcachedOffscreenDecodedBytes += cachedImage.estimatedDecodedBytes;\n\t\t}\n\n\t\tlet evictedImageDeletion = \"\";\n\t\tfor (const [imageId, cachedImage] of this.uploadedKittyImages) {\n\t\t\tif (\n\t\t\t\tcachedOffscreenImageCount <= MAX_CACHED_OFFSCREEN_KITTY_IMAGES &&\n\t\t\t\tcachedOffscreenTransmissionBytes <= MAX_CACHED_OFFSCREEN_KITTY_TRANSMISSION_BYTES &&\n\t\t\t\tcachedOffscreenDecodedBytes <= MAX_CACHED_OFFSCREEN_KITTY_DECODED_BYTES\n\t\t\t) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (visibleImageIds.has(imageId)) continue;\n\t\t\tevictedImageDeletion += deleteKittyImage(imageId);\n\t\t\tthis.uploadedKittyImages.delete(imageId);\n\t\t\tcachedOffscreenImageCount -= 1;\n\t\t\tcachedOffscreenTransmissionBytes -= cachedImage.transmissionBytes;\n\t\t\tcachedOffscreenDecodedBytes -= cachedImage.estimatedDecodedBytes;\n\t\t}\n\t\treturn { lines, evictedImageDeletion };\n\t}\n\n\tprotected override resetRenderState(): void {\n\t\tthis.previousScreen = [];\n\t\tthis.previousScreenWidth = 0;\n\t\tthis.previousScreenHeight = 0;\n\t\tthis.currentLayout = undefined;\n\t}\n\n\tscrollBy(lines: number): void {\n\t\tthis.getPrimaryScrollView().scrollBy(lines);\n\t\tthis.requestRender();\n\t}\n\n\tscrollToTop(): void {\n\t\tthis.getPrimaryScrollView().scrollToStart();\n\t\tthis.requestRender();\n\t}\n\n\tscrollToBottom(): void {\n\t\tthis.getPrimaryScrollView().scrollToEnd();\n\t\tthis.requestRender();\n\t}\n\n\tprivate scrollToPrompt(direction: -1 | 1): void {\n\t\tif (!this.currentLayout) return;\n\t\tconst scrollView = this.getPrimaryScrollView();\n\t\tconst lines = getScrollViewBox(this.currentLayout, scrollView)?.scrollContentLines;\n\t\tif (!lines) return;\n\n\t\tfor (let row = scrollView.scrollTop + direction; row >= 0 && row < lines.length; row += direction) {\n\t\t\tif (!OSC133_PROMPT_START.test(lines[row] ?? \"\")) continue;\n\t\t\tscrollView.scrollTo(row);\n\t\t\tthis.requestRender();\n\t\t\treturn;\n\t\t}\n\t}\n\n\t/** Show a transient message in the alternate-screen flash stack. */\n\tflash(message: string, durationMs?: number): void {\n\t\tthis.flashes.flash(message, durationMs);\n\t}\n\n\tprivate handleViewportInput(data: string): { consume?: boolean } | undefined {\n\t\tif (data === FOCUS_OUT) {\n\t\t\tconst hadActiveSelection = this.selectionPressActive;\n\t\t\tthis.selectionPressActive = false;\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\tthis.stopScrollbarHover();\n\t\t\tthis.stopScrollbarDrag();\n\t\t\tthis.pressedUrl = undefined;\n\t\t\tthis.selectionDragged = false;\n\t\t\tif (hadActiveSelection) {\n\t\t\t\tthis.selectionAnchor = undefined;\n\t\t\t\tthis.selectionFocus = undefined;\n\t\t\t\tthis.selectionGranularity = \"character\";\n\t\t\t\tthis.selectionInitialRange = undefined;\n\t\t\t}\n\t\t\tthis.lastClick = undefined;\n\t\t\tthis.requestRender();\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (data === FOCUS_IN) return { consume: true };\n\n\t\tconst wheelEvent = this.parseWheelEvent(data);\n\t\tif (wheelEvent) {\n\t\t\tthis.routeWheel(wheelEvent);\n\t\t\treturn { consume: true };\n\t\t}\n\t\tconst mouseEvent = this.parseSgrMouseEvent(data);\n\t\tif (mouseEvent) {\n\t\t\tif (this.handleRightClickPaste(mouseEvent)) return { consume: true };\n\t\t\tconst handled = this.handleScrollbarMouseEvent(mouseEvent);\n\t\t\tif (!this.scrollbarDrag) this.updateScrollbarHover(mouseEvent.x, mouseEvent.y);\n\t\t\tif (!handled) this.handleSelectionMouseEvent(mouseEvent);\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (this.isMouseSequence(data)) return { consume: true };\n\n\t\tconst keybindings = getKeybindings();\n\t\tconst isRelease = isKeyRelease(data);\n\t\tif (keybindings.matches(data, \"tui.altScreen.pageUp\")) {\n\t\t\tif (!isRelease) {\n\t\t\t\tthis.scrollBy(-Math.max(1, this.getPrimaryScrollView().viewportHeight - PAGE_SCROLL_OVERLAP));\n\t\t\t}\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.pageDown\")) {\n\t\t\tif (!isRelease) {\n\t\t\t\tthis.scrollBy(Math.max(1, this.getPrimaryScrollView().viewportHeight - PAGE_SCROLL_OVERLAP));\n\t\t\t}\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.halfPageUp\")) {\n\t\t\tif (!isRelease) this.scrollBy(-Math.max(1, Math.floor(this.getPrimaryScrollView().viewportHeight / 2)));\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.halfPageDown\")) {\n\t\t\tif (!isRelease) this.scrollBy(Math.max(1, Math.floor(this.getPrimaryScrollView().viewportHeight / 2)));\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.previousPrompt\")) {\n\t\t\tif (!isRelease) this.scrollToPrompt(-1);\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.nextPrompt\")) {\n\t\t\tif (!isRelease) this.scrollToPrompt(1);\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.top\")) {\n\t\t\tif (!isRelease) this.scrollToTop();\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.bottom\")) {\n\t\t\tif (!isRelease) this.scrollToBottom();\n\t\t\treturn { consume: true };\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tprivate parseWheelEvent(data: string): WheelEvent | undefined {\n\t\tconst sgr = /^\\x1b\\[<(\\d+);(\\d+);(\\d+)[Mm]$/.exec(data);\n\t\tif (sgr) {\n\t\t\tconst button = Number.parseInt(sgr[1], 10);\n\t\t\tif ((button & 64) === 0) return undefined;\n\t\t\tconst direction = button & 3;\n\t\t\tif (direction !== 0 && direction !== 1) return undefined;\n\t\t\treturn {\n\t\t\t\tdirection: direction === 0 ? -1 : 1,\n\t\t\t\tx: Number.parseInt(sgr[2], 10) - 1,\n\t\t\t\ty: Number.parseInt(sgr[3], 10) - 1,\n\t\t\t};\n\t\t}\n\t\tif (data.length === 6 && data.startsWith(\"\\x1b[M\")) {\n\t\t\tconst button = data.charCodeAt(3) - 32;\n\t\t\tif ((button & 64) === 0) return undefined;\n\t\t\tconst direction = button & 3;\n\t\t\tif (direction !== 0 && direction !== 1) return undefined;\n\t\t\treturn {\n\t\t\t\tdirection: direction === 0 ? -1 : 1,\n\t\t\t\tx: data.charCodeAt(4) - 33,\n\t\t\t\ty: data.charCodeAt(5) - 33,\n\t\t\t};\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tprivate routeWheel(event: WheelEvent): void {\n\t\tlet remaining = event.direction * this.wheelScrollLines;\n\t\tconst seen = new Set<ScrollView>();\n\t\tfor (const scrollView of this.currentLayout ? getScrollViewsAt(this.currentLayout, event.x, event.y) : []) {\n\t\t\tseen.add(scrollView);\n\t\t\tremaining = scrollView.scrollBy(remaining);\n\t\t\tif (remaining === 0 || scrollView.overscroll === \"contain\") break;\n\t\t}\n\t\tconst primary = this.getPrimaryScrollView();\n\t\tif (remaining !== 0 && !seen.has(primary)) primary.scrollBy(remaining);\n\t\tthis.updateScrollbarHover(event.x, event.y);\n\t\tthis.requestRender();\n\t}\n\n\tprivate parseSgrMouseEvent(data: string): SgrMouseEvent | undefined {\n\t\tconst match = /^\\x1b\\[<(\\d+);(\\d+);(\\d+)([Mm])$/.exec(data);\n\t\tif (!match) return undefined;\n\t\treturn {\n\t\t\tbutton: Number.parseInt(match[1], 10),\n\t\t\tx: Number.parseInt(match[2], 10) - 1,\n\t\t\ty: Number.parseInt(match[3], 10) - 1,\n\t\t\trelease: match[4] === \"m\",\n\t\t};\n\t}\n\n\tprivate handleRightClickPaste(event: SgrMouseEvent): boolean {\n\t\tif (!this.onRightClickPaste || process.platform !== \"win32\" || event.release || event.button !== 2) {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\tthis.onRightClickPaste();\n\t\t} catch {\n\t\t\t// Clipboard paste is best-effort.\n\t\t}\n\t\treturn true;\n\t}\n\n\tprivate getScrollbarTargetAt(x: number, y: number): ScrollbarTarget | undefined {\n\t\tif (this.hasOverlay() || !this.currentLayout) return undefined;\n\t\tfor (const scrollView of getScrollViewsAt(this.currentLayout, x, y)) {\n\t\t\tconst box = getScrollViewBox(this.currentLayout, scrollView);\n\t\t\tconst geometry = box ? getScrollbarGeometry(box) : undefined;\n\t\t\tif (\n\t\t\t\tgeometry &&\n\t\t\t\tx === geometry.column &&\n\t\t\t\ty >= geometry.thumbTop &&\n\t\t\t\ty < geometry.thumbTop + geometry.thumbHeight\n\t\t\t) {\n\t\t\t\treturn { scrollView, geometry };\n\t\t\t}\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tprivate setScrollbarHover(scrollView: ScrollView | undefined): void {\n\t\tif (scrollView === this.scrollbarHover) return;\n\t\tthis.scrollbarHover?.setScrollbarActive(false);\n\t\tthis.scrollbarHover = scrollView;\n\t\tthis.scrollbarHover?.setScrollbarActive(true);\n\t}\n\n\tprivate updateScrollbarHover(x: number, y: number): void {\n\t\tthis.setScrollbarHover(this.getScrollbarTargetAt(x, y)?.scrollView);\n\t}\n\n\tprivate stopScrollbarHover(): void {\n\t\tthis.setScrollbarHover(undefined);\n\t}\n\n\tprivate handleScrollbarMouseEvent(event: SgrMouseEvent): boolean {\n\t\tif (this.scrollbarDrag) {\n\t\t\tif (event.release) {\n\t\t\t\tthis.stopScrollbarDrag();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tconst box = this.currentLayout\n\t\t\t\t? getScrollViewBox(this.currentLayout, this.scrollbarDrag.scrollView)\n\t\t\t\t: undefined;\n\t\t\tconst geometry = box ? getScrollbarGeometry(box) : undefined;\n\t\t\tif (geometry) {\n\t\t\t\tconst maxThumbOffset = geometry.trackHeight - geometry.thumbHeight;\n\t\t\t\tconst thumbOffset = Math.max(\n\t\t\t\t\t0,\n\t\t\t\t\tMath.min(maxThumbOffset, event.y - geometry.trackTop - this.scrollbarDrag.grabOffset),\n\t\t\t\t);\n\t\t\t\tconst scrollTop =\n\t\t\t\t\tmaxThumbOffset === 0 ? 0 : Math.round((thumbOffset / maxThumbOffset) * geometry.maxScrollTop);\n\t\t\t\tthis.scrollbarDrag.scrollView.scrollTo(scrollTop);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tif (event.release || (event.button & 32) !== 0 || (event.button & 3) !== 0) return false;\n\t\tconst target = this.getScrollbarTargetAt(event.x, event.y);\n\t\tif (!target) return false;\n\t\tthis.stopSelectionAutoScroll();\n\t\tthis.selectionPressActive = false;\n\t\tthis.selectionAnchor = undefined;\n\t\tthis.selectionFocus = undefined;\n\t\tthis.selectionGranularity = \"character\";\n\t\tthis.selectionInitialRange = undefined;\n\t\tthis.lastClick = undefined;\n\t\tthis.pressedUrl = undefined;\n\t\tthis.selectionDragged = false;\n\t\tthis.setScrollbarHover(target.scrollView);\n\t\tthis.scrollbarDrag = {\n\t\t\tscrollView: target.scrollView,\n\t\t\tgrabOffset: event.y - target.geometry.thumbTop,\n\t\t};\n\t\treturn true;\n\t}\n\n\tprivate stopScrollbarDrag(): void {\n\t\tthis.scrollbarDrag = undefined;\n\t}\n\n\tprivate getScrollSelectionPoint(scrollView: ScrollView, x: number, y: number): SelectionPoint | undefined {\n\t\tif (!this.currentLayout) return undefined;\n\t\tconst box = getScrollViewBox(this.currentLayout, scrollView);\n\t\tif (!box || box.rect.height <= 0 || box.clip.height <= 0) return undefined;\n\t\tconst visibleTop = Math.max(0, box.rect.y, box.clip.y);\n\t\tconst visibleBottom = Math.min(\n\t\t\tthis.terminal.rows - 1,\n\t\t\tbox.rect.y + box.rect.height - 1,\n\t\t\tbox.clip.y + box.clip.height - 1,\n\t\t);\n\t\tif (visibleBottom < visibleTop) return undefined;\n\t\tconst pointerRow = Math.max(visibleTop, Math.min(visibleBottom, y));\n\t\tconst maxContentRow = Math.max(0, (box.scrollContentLines?.length ?? 1) - 1);\n\t\treturn {\n\t\t\trow: Math.max(0, Math.min(maxContentRow, scrollView.scrollTop + pointerRow - box.rect.y)),\n\t\t\tcol: Math.max(0, Math.min(box.rect.width - 1, x - box.rect.x)),\n\t\t\tscrollView,\n\t\t};\n\t}\n\n\tprivate getSelectionPoint(event: SgrMouseEvent, scrollView?: ScrollView): SelectionPoint {\n\t\tif (scrollView) {\n\t\t\tconst point = this.getScrollSelectionPoint(scrollView, event.x, event.y);\n\t\t\tif (point) return point;\n\t\t}\n\t\treturn {\n\t\t\trow: Math.max(0, Math.min(this.terminal.rows - 1, event.y)),\n\t\t\tcol: Math.max(0, Math.min(this.terminal.columns - 1, event.x)),\n\t\t};\n\t}\n\n\tprivate getSelectionSourceLine(point: SelectionPoint): string {\n\t\tif (point.scrollView && this.currentLayout) {\n\t\t\tconst lines = getScrollViewBox(this.currentLayout, point.scrollView)?.scrollContentLines;\n\t\t\tif (lines) return lines[point.row] ?? \"\";\n\t\t}\n\t\treturn this.previousScreen[point.row] ?? \"\";\n\t}\n\n\tprivate getWordSelection(point: SelectionPoint): SelectionRange | undefined {\n\t\tconst line = stripTerminalSequences(this.getSelectionSourceLine(point));\n\t\tlet start = 0;\n\t\tfor (const segment of wordSegmenter.segment(line)) {\n\t\t\tconst end = start + visibleWidth(segment.segment);\n\t\t\tif (point.col >= start && point.col < end) {\n\t\t\t\treturn {\n\t\t\t\t\tstart: { ...point, col: start },\n\t\t\t\t\tend: { ...point, col: end, boundary: true },\n\t\t\t\t};\n\t\t\t}\n\t\t\tstart = end;\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tprivate getLineSelection(point: SelectionPoint): SelectionRange {\n\t\treturn {\n\t\t\tstart: { ...point, col: 0 },\n\t\t\tend: { ...point, col: visibleWidth(this.getSelectionSourceLine(point)), boundary: true },\n\t\t};\n\t}\n\n\tprivate updateSelectionFocus(point: SelectionPoint): void {\n\t\tif (this.selectionGranularity === \"character\" || !this.selectionInitialRange) {\n\t\t\tthis.selectionFocus = point;\n\t\t\treturn;\n\t\t}\n\t\tconst range = this.selectionGranularity === \"word\" ? this.getWordSelection(point) : this.getLineSelection(point);\n\t\tif (!range) return;\n\t\tconst initial = this.selectionInitialRange;\n\t\tconst targetBeforeInitial =\n\t\t\trange.start.row < initial.start.row ||\n\t\t\t(range.start.row === initial.start.row && range.start.col < initial.start.col);\n\t\tif (targetBeforeInitial) {\n\t\t\tthis.selectionAnchor = initial.end;\n\t\t\tthis.selectionFocus = range.start;\n\t\t} else {\n\t\t\tthis.selectionAnchor = initial.start;\n\t\t\tthis.selectionFocus = range.end;\n\t\t}\n\t}\n\n\tprivate getClickCount(point: SelectionPoint, word: SelectionRange | undefined): number {\n\t\tconst now = Date.now();\n\t\tconst previous = this.lastClick;\n\t\tconst count =\n\t\t\tword &&\n\t\t\tprevious &&\n\t\t\tnow - previous.timestamp <= DOUBLE_CLICK_INTERVAL_MS &&\n\t\t\tprevious.row === point.row &&\n\t\t\tprevious.scrollView === point.scrollView &&\n\t\t\tprevious.wordStart === word.start.col &&\n\t\t\tprevious.wordEnd === word.end.col\n\t\t\t\t? (previous.count % 3) + 1\n\t\t\t\t: 1;\n\t\tthis.lastClick = word\n\t\t\t? {\n\t\t\t\t\ttimestamp: now,\n\t\t\t\t\tcount,\n\t\t\t\t\trow: point.row,\n\t\t\t\t\tscrollView: point.scrollView,\n\t\t\t\t\twordStart: word.start.col,\n\t\t\t\t\twordEnd: word.end.col,\n\t\t\t\t}\n\t\t\t: undefined;\n\t\treturn count;\n\t}\n\n\tprivate updateSelectionAutoScroll(event: SgrMouseEvent): void {\n\t\tconst scrollView = this.selectionAnchor?.scrollView;\n\t\tif (!scrollView || !this.currentLayout) {\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\treturn;\n\t\t}\n\t\tconst box = getScrollViewBox(this.currentLayout, scrollView);\n\t\tif (!box || box.rect.height <= 0 || box.clip.height <= 0) {\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\treturn;\n\t\t}\n\t\tconst visibleTop = Math.max(0, box.rect.y, box.clip.y);\n\t\tconst visibleBottom = Math.min(\n\t\t\tthis.terminal.rows - 1,\n\t\t\tbox.rect.y + box.rect.height - 1,\n\t\t\tbox.clip.y + box.clip.height - 1,\n\t\t);\n\t\tthis.selectionDragPointer = { x: event.x, y: event.y };\n\t\tthis.selectionAutoScrollDirection = event.y <= visibleTop ? -1 : event.y >= visibleBottom ? 1 : 0;\n\t\tif (this.selectionAutoScrollDirection === 0) {\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\treturn;\n\t\t}\n\t\tif (this.selectionAutoScrollTimer) return;\n\t\tthis.selectionAutoScrollTimer = setInterval(() => this.autoScrollSelection(), 50);\n\t\tthis.selectionAutoScrollTimer.unref();\n\t}\n\n\tprivate autoScrollSelection(): void {\n\t\tconst scrollView = this.selectionAnchor?.scrollView;\n\t\tconst pointer = this.selectionDragPointer;\n\t\tconst direction = this.selectionAutoScrollDirection;\n\t\tif (!scrollView || !pointer || direction === 0) {\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\treturn;\n\t\t}\n\t\tconst remaining = scrollView.scrollBy(direction);\n\t\tif (remaining === direction) {\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\treturn;\n\t\t}\n\t\tconst point = this.getScrollSelectionPoint(scrollView, pointer.x, pointer.y);\n\t\tif (point) this.updateSelectionFocus(point);\n\t\tthis.requestRender();\n\t}\n\n\tprivate stopSelectionAutoScroll(): void {\n\t\tif (this.selectionAutoScrollTimer) {\n\t\t\tclearInterval(this.selectionAutoScrollTimer);\n\t\t\tthis.selectionAutoScrollTimer = undefined;\n\t\t}\n\t\tthis.selectionAutoScrollDirection = 0;\n\t\tthis.selectionDragPointer = undefined;\n\t}\n\n\tprivate handleSelectionMouseEvent(event: SgrMouseEvent): void {\n\t\tif ((event.button & 3) !== 0) return;\n\t\tconst anchorScrollView = this.selectionAnchor?.scrollView;\n\t\tconst point = this.getSelectionPoint(event, anchorScrollView);\n\t\tif (event.release) {\n\t\t\tif (!this.selectionPressActive) return;\n\t\t\tthis.selectionPressActive = false;\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\tif (!this.selectionAnchor) return;\n\t\t\tthis.updateSelectionFocus(point);\n\t\t\tconst clickedUrl =\n\t\t\t\t!this.selectionDragged &&\n\t\t\t\tthis.selectionAnchor.scrollView === point.scrollView &&\n\t\t\t\tthis.selectionAnchor.row === point.row &&\n\t\t\t\tthis.selectionAnchor.col === point.col\n\t\t\t\t\t? this.pressedUrl\n\t\t\t\t\t: undefined;\n\t\t\tthis.pressedUrl = undefined;\n\t\t\tif (clickedUrl && this.openUrl) {\n\t\t\t\tthis.selectionAnchor = undefined;\n\t\t\t\tthis.selectionFocus = undefined;\n\t\t\t\ttry {\n\t\t\t\t\tthis.openUrl(clickedUrl);\n\t\t\t\t} catch {\n\t\t\t\t\t// URL activation is best-effort.\n\t\t\t\t}\n\t\t\t\tthis.requestRender();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.copySelectionToClipboard();\n\t\t\tthis.requestRender();\n\t\t\treturn;\n\t\t}\n\t\tif ((event.button & 32) !== 0) {\n\t\t\tif (!this.selectionPressActive || !this.selectionAnchor) return;\n\t\t\tthis.selectionDragged = true;\n\t\t\tthis.lastClick = undefined;\n\t\t\tthis.pressedUrl = undefined;\n\t\t\tthis.updateSelectionFocus(point);\n\t\t\tthis.updateSelectionAutoScroll(event);\n\t\t\tthis.requestRender();\n\t\t\treturn;\n\t\t}\n\t\tthis.stopSelectionAutoScroll();\n\t\tthis.selectionPressActive = true;\n\t\tconst scrollView =\n\t\t\t!this.hasOverlay() && this.currentLayout\n\t\t\t\t? getScrollViewsAt(this.currentLayout, event.x, event.y)[0]\n\t\t\t\t: undefined;\n\t\tconst anchor = this.getSelectionPoint(event, scrollView);\n\t\tconst word = this.getWordSelection(anchor);\n\t\tconst clickCount = this.getClickCount(anchor, word);\n\t\tconst range = clickCount === 2 ? word : clickCount === 3 ? this.getLineSelection(anchor) : undefined;\n\t\tthis.selectionGranularity = range ? (clickCount === 2 ? \"word\" : \"line\") : \"character\";\n\t\tthis.selectionInitialRange = range;\n\t\tthis.selectionAnchor = range?.start ?? anchor;\n\t\tthis.selectionFocus = range?.end ?? anchor;\n\t\tthis.selectionDragged = false;\n\t\tthis.pressedUrl = range\n\t\t\t? undefined\n\t\t\t: getOsc8LinkAtColumn(\n\t\t\t\t\tthis.previousScreen[Math.max(0, Math.min(this.terminal.rows - 1, event.y))] ?? \"\",\n\t\t\t\t\tMath.max(0, Math.min(this.terminal.columns - 1, event.x)),\n\t\t\t\t);\n\t\tthis.requestRender();\n\t}\n\n\tprivate getSelectionBounds(): { start: SelectionPoint; end: SelectionPoint } | undefined {\n\t\tif (!this.selectionAnchor || !this.selectionFocus) return undefined;\n\t\tif (this.selectionAnchor.scrollView !== this.selectionFocus.scrollView) return undefined;\n\t\tconst anchorBeforeFocus =\n\t\t\tthis.selectionAnchor.row < this.selectionFocus.row ||\n\t\t\t(this.selectionAnchor.row === this.selectionFocus.row && this.selectionAnchor.col < this.selectionFocus.col);\n\t\tif (\n\t\t\tthis.selectionAnchor.row === this.selectionFocus.row &&\n\t\t\tthis.selectionAnchor.col === this.selectionFocus.col\n\t\t) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn anchorBeforeFocus\n\t\t\t? { start: this.selectionAnchor, end: this.selectionFocus }\n\t\t\t: { start: this.selectionFocus, end: this.selectionAnchor };\n\t}\n\n\tprivate getSelectionColumns(\n\t\tline: string,\n\t\trow: number,\n\t\tselection: { start: SelectionPoint; end: SelectionPoint },\n\t\tminColumn = 0,\n\t\tmaxColumn = visibleWidth(line),\n\t): { start: number; end: number } {\n\t\tconst lineWidth = visibleWidth(line);\n\t\tlet start = Math.max(0, minColumn);\n\t\tlet end = Math.min(lineWidth, maxColumn);\n\t\tif (row === selection.start.row) {\n\t\t\tstart = getGraphemeCellRange(line, selection.start.col)?.start ?? Math.min(selection.start.col, lineWidth);\n\t\t}\n\t\tif (row === selection.end.row) {\n\t\t\tend = selection.end.boundary\n\t\t\t\t? Math.min(selection.end.col, lineWidth)\n\t\t\t\t: (getGraphemeCellRange(line, selection.end.col)?.end ?? Math.min(selection.end.col + 1, lineWidth));\n\t\t}\n\t\treturn { start: Math.max(minColumn, start), end: Math.min(maxColumn, end) };\n\t}\n\n\tprivate copySelectionToClipboard(): void {\n\t\tconst selection = this.getSelectionBounds();\n\t\tif (!selection) return;\n\t\tlet sourceLines: readonly string[] = this.previousScreen;\n\t\tif (selection.start.scrollView) {\n\t\t\tif (!this.currentLayout) return;\n\t\t\tconst box = getScrollViewBox(this.currentLayout, selection.start.scrollView);\n\t\t\tif (!box?.scrollContentLines) return;\n\t\t\tsourceLines = box.scrollContentLines;\n\t\t}\n\t\tconst lines: string[] = [];\n\t\tfor (let row = selection.start.row; row <= selection.end.row; row++) {\n\t\t\tconst line = sourceLines[row] ?? \"\";\n\t\t\tconst columns = this.getSelectionColumns(line, row, selection);\n\t\t\tlines.push(\n\t\t\t\tstripTerminalSequences(\n\t\t\t\t\tsliceByColumn(line, columns.start, Math.max(0, columns.end - columns.start), true),\n\t\t\t\t).trimEnd(),\n\t\t\t);\n\t\t}\n\t\tconst text = lines.join(\"\\n\");\n\t\tif (text.length === 0) return;\n\t\tthis.terminal.write(`\\x1b]52;c;${Buffer.from(text).toString(\"base64\")}\\x07`);\n\t\tthis.flash(\"Copied!\");\n\t}\n\n\tprivate applySelectionHighlight(text: string): string {\n\t\tlet result = \"\\x1b[7m\";\n\t\tlet index = 0;\n\t\twhile (index < text.length) {\n\t\t\tconst ansi = extractAnsiCode(text, index);\n\t\t\tif (!ansi) {\n\t\t\t\tresult += text[index];\n\t\t\t\tindex += 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tresult += ansi.code;\n\t\t\tif (ansi.code.endsWith(\"m\")) result += \"\\x1b[7m\";\n\t\t\tindex += ansi.length;\n\t\t}\n\t\treturn `${result}\\x1b[27m`;\n\t}\n\n\tprivate applySelection(screen: string[], layout = this.currentLayout): string[] {\n\t\tconst selection = this.getSelectionBounds();\n\t\tif (!selection) return screen;\n\t\tlet screenSelection = selection;\n\t\tlet minRow = 0;\n\t\tlet maxRow = screen.length - 1;\n\t\tlet minColumn = 0;\n\t\tlet maxColumn = this.terminal.columns;\n\t\tif (selection.start.scrollView) {\n\t\t\tif (!layout) return screen;\n\t\t\tconst box = getScrollViewBox(layout, selection.start.scrollView);\n\t\t\tif (!box) return screen;\n\t\t\tminRow = Math.max(0, box.rect.y, box.clip.y);\n\t\t\tmaxRow = Math.min(screen.length - 1, box.rect.y + box.rect.height - 1, box.clip.y + box.clip.height - 1);\n\t\t\tminColumn = Math.max(0, box.rect.x, box.clip.x);\n\t\t\tmaxColumn = Math.min(this.terminal.columns, box.rect.x + box.rect.width, box.clip.x + box.clip.width);\n\t\t\tscreenSelection = {\n\t\t\t\tstart: {\n\t\t\t\t\t...selection.start,\n\t\t\t\t\trow: box.rect.y + selection.start.row - selection.start.scrollView.scrollTop,\n\t\t\t\t\tcol: box.rect.x + selection.start.col,\n\t\t\t\t},\n\t\t\t\tend: {\n\t\t\t\t\t...selection.end,\n\t\t\t\t\trow: box.rect.y + selection.end.row - selection.start.scrollView.scrollTop,\n\t\t\t\t\tcol: box.rect.x + selection.end.col,\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\treturn screen.map((line, row) => {\n\t\t\tif (\n\t\t\t\trow < minRow ||\n\t\t\t\trow > maxRow ||\n\t\t\t\trow < screenSelection.start.row ||\n\t\t\t\trow > screenSelection.end.row ||\n\t\t\t\tisImageLine(line)\n\t\t\t) {\n\t\t\t\treturn line;\n\t\t\t}\n\t\t\tconst lineWidth = visibleWidth(line);\n\t\t\tconst columns = this.getSelectionColumns(line, row, screenSelection, minColumn, maxColumn);\n\t\t\tif (columns.end <= columns.start) return line;\n\t\t\tconst before = sliceByColumn(line, 0, columns.start, true);\n\t\t\tconst selected = sliceByColumn(line, columns.start, columns.end - columns.start, true);\n\t\t\tconst after = sliceByColumn(line, columns.end, Math.max(0, lineWidth - columns.end), true);\n\t\t\treturn `${before}${this.applySelectionHighlight(selected)}${after}`;\n\t\t});\n\t}\n\n\tprivate isMouseSequence(data: string): boolean {\n\t\treturn /^\\x1b\\[<\\d+;\\d+;\\d+[Mm]$/.test(data) || (data.length === 6 && data.startsWith(\"\\x1b[M\"));\n\t}\n\n\tprivate compositeFlashes(screen: string[], width: number, height: number): string[] {\n\t\tconst flashLines = this.flashes.render(width).slice(-height);\n\t\tif (flashLines.length === 0) return screen;\n\t\tconst result = [...screen];\n\t\twhile (result.length < height) result.push(\"\");\n\t\tfor (let row = 0; row < flashLines.length; row++) {\n\t\t\tconst line = flashLines[row]!;\n\t\t\tconst flashWidth = visibleWidth(line);\n\t\t\tif (flashWidth === 0) continue;\n\t\t\tresult[row] = compositeTuiLine(result[row] ?? \"\", line, width - flashWidth, flashWidth, width);\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected override doRender(): void {\n\t\tif (this.stopped || !this.altScreenActive) return;\n\t\tconst width = Math.max(1, this.terminal.columns);\n\t\tconst height = Math.max(1, this.terminal.rows);\n\t\tconst root = this.layoutRoot ?? this.implicitScrollView;\n\t\tconst nextLayout = renderLayoutFrame(root, width, height, () => this.requestRender());\n\t\tlet screen = nextLayout.lines.map((line) => line.replace(OSC133_ZONE_PREFIX, \"\"));\n\t\tscreen = this.compositeOverlays(screen, width, height);\n\t\tif (screen.length > height) screen = screen.slice(screen.length - height);\n\t\tscreen = this.applySelection(screen, nextLayout);\n\t\tscreen = this.compositeFlashes(screen, width, height);\n\n\t\tconst cursorPos = this.extractCursorPosition(screen, height);\n\t\tscreen = this.applyLineResets(screen).map((line) => {\n\t\t\tif (isImageLine(line) || visibleWidth(line) <= width) return line;\n\t\t\treturn sliceByColumn(line, 0, width, true);\n\t\t});\n\n\t\tconst fullRedraw =\n\t\t\tthis.previousScreen.length === 0 || this.previousScreenWidth !== width || this.previousScreenHeight !== height;\n\t\tconst imagesNeedRedraw = screen.some(\n\t\t\t(line, row) =>\n\t\t\t\tline !== this.previousScreen[row] && (isImageLine(line) || isImageLine(this.previousScreen[row] ?? \"\")),\n\t\t);\n\t\tconst redrawImages = fullRedraw || imagesNeedRedraw;\n\t\tconst hadUploadedKittyImages = this.uploadedKittyImages.size > 0;\n\t\tconst preparedKittyScreen =\n\t\t\tredrawImages && this.imageProtocol === \"kitty\"\n\t\t\t\t? this.prepareKittyScreen(screen)\n\t\t\t\t: { lines: screen, evictedImageDeletion: \"\" };\n\n\t\tlet buffer = BEGIN_SYNCHRONIZED_OUTPUT;\n\t\tif (fullRedraw) {\n\t\t\tthis.fullRedrawCount += 1;\n\t\t\tconst clearImages =\n\t\t\t\tthis.imageProtocol === \"kitty\" && hadUploadedKittyImages\n\t\t\t\t\t? deleteAllKittyPlacements()\n\t\t\t\t\t: this.deleteKittyImages();\n\t\t\tbuffer += `${clearImages}\\x1b[2J`;\n\t\t} else if (imagesNeedRedraw) {\n\t\t\tif (this.imageProtocol === \"iterm2\") buffer += \"\\x1b[2J\";\n\t\t\telse if (this.imageProtocol === \"kitty\") buffer += deleteAllKittyPlacements();\n\t\t}\n\t\tbuffer += preparedKittyScreen.evictedImageDeletion;\n\n\t\tfor (let row = 0; row < height; row++) {\n\t\t\tif (!fullRedraw && !imagesNeedRedraw && screen[row] === this.previousScreen[row]) continue;\n\t\t\tbuffer += `\\x1b[${row + 1};1H\\x1b[2K${preparedKittyScreen.lines[row] ?? \"\"}`;\n\t\t}\n\n\t\tif (cursorPos) {\n\t\t\tbuffer += `\\x1b[${cursorPos.row + 1};${Math.min(width, cursorPos.col) + 1}H`;\n\t\t\tbuffer += this.getShowHardwareCursor() ? \"\\x1b[?25h\" : \"\\x1b[?25l\";\n\t\t} else {\n\t\t\tbuffer += \"\\x1b[?25l\";\n\t\t}\n\t\tbuffer += END_SYNCHRONIZED_OUTPUT;\n\t\tthis.terminal.write(buffer);\n\n\t\tthis.previousScreen = screen;\n\t\tthis.previousScreenWidth = width;\n\t\tthis.previousScreenHeight = height;\n\t\tthis.currentLayout = nextLayout;\n\t}\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@earendil-works/pi-tui",
3
- "version": "0.84.0",
3
+ "version": "0.84.1",
4
4
  "description": "Terminal User Interface library with differential rendering for efficient text-based applications",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Mon, 27 Jul 2026 17:32:10 GMT
11
+ * Last updated: Fri, 07 Aug 2026 17:46:44 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
@@ -227,7 +227,6 @@ declare module "node:child_process" {
227
227
  * new process in a shell or with the use of the `shell` option of `ChildProcess`:
228
228
  *
229
229
  * ```js
230
- * 'use strict';
231
230
  * import { spawn } from 'node:child_process';
232
231
  *
233
232
  * const subprocess = spawn(
@@ -2698,12 +2698,12 @@ declare module "node:crypto" {
2698
2698
  */
2699
2699
  function sign(
2700
2700
  algorithm: string | null | undefined,
2701
- data: ArrayBufferLike | NodeJS.ArrayBufferView,
2701
+ data: BinaryLike,
2702
2702
  key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput,
2703
2703
  ): NonSharedBuffer;
2704
2704
  function sign(
2705
2705
  algorithm: string | null | undefined,
2706
- data: ArrayBufferLike | NodeJS.ArrayBufferView,
2706
+ data: BinaryLike,
2707
2707
  key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput,
2708
2708
  callback: (error: Error | null, data: NonSharedBuffer) => void,
2709
2709
  ): void;
@@ -2729,15 +2729,15 @@ declare module "node:crypto" {
2729
2729
  */
2730
2730
  function verify(
2731
2731
  algorithm: string | null | undefined,
2732
- data: ArrayBufferLike | NodeJS.ArrayBufferView,
2732
+ data: BinaryLike,
2733
2733
  key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput,
2734
- signature: ArrayBufferLike | NodeJS.ArrayBufferView,
2734
+ signature: BinaryLike,
2735
2735
  ): boolean;
2736
2736
  function verify(
2737
2737
  algorithm: string | null | undefined,
2738
- data: ArrayBufferLike | NodeJS.ArrayBufferView,
2738
+ data: BinaryLike,
2739
2739
  key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput,
2740
- signature: ArrayBufferLike | NodeJS.ArrayBufferView,
2740
+ signature: BinaryLike,
2741
2741
  callback: (error: Error | null, result: boolean) => void,
2742
2742
  ): void;
2743
2743
  /**
@@ -183,7 +183,7 @@ declare module "node:dns/promises" {
183
183
  * refresh: 900,
184
184
  * retry: 900,
185
185
  * expire: 1800,
186
- * minttl: 60 } ]
186
+ * minttl: 60 } ];
187
187
  * ```
188
188
  * @since v10.6.0
189
189
  */
@@ -226,7 +226,7 @@ declare module "node:dns/promises" {
226
226
  * regexp: '',
227
227
  * replacement: '_sip._udp.example.com',
228
228
  * order: 30,
229
- * preference: 100
229
+ * preference: 100,
230
230
  * }
231
231
  * ```
232
232
  * @since v10.6.0
@@ -265,7 +265,7 @@ declare module "node:dns/promises" {
265
265
  * refresh: 10000,
266
266
  * retry: 2400,
267
267
  * expire: 604800,
268
- * minttl: 3600
268
+ * minttl: 3600,
269
269
  * }
270
270
  * ```
271
271
  * @since v10.6.0
@@ -285,7 +285,7 @@ declare module "node:dns/promises" {
285
285
  * priority: 10,
286
286
  * weight: 5,
287
287
  * port: 21223,
288
- * name: 'service.example.com'
288
+ * name: 'service.example.com',
289
289
  * }
290
290
  * ```
291
291
  * @since v10.6.0
@@ -306,7 +306,7 @@ declare module "node:dns/promises" {
306
306
  * certUsage: 3,
307
307
  * selector: 1,
308
308
  * match: 1,
309
- * data: [ArrayBuffer]
309
+ * data: [ArrayBuffer],
310
310
  * }
311
311
  * ```
312
312
  * @since v23.9.0, v22.15.0
@@ -490,7 +490,7 @@ declare module "node:dns" {
490
490
  * regexp: '',
491
491
  * replacement: '_sip._udp.example.com',
492
492
  * order: 30,
493
- * preference: 100
493
+ * preference: 100,
494
494
  * }
495
495
  * ```
496
496
  * @since v0.9.12
@@ -547,7 +547,7 @@ declare module "node:dns" {
547
547
  * refresh: 10000,
548
548
  * retry: 2400,
549
549
  * expire: 604800,
550
- * minttl: 3600
550
+ * minttl: 3600,
551
551
  * }
552
552
  * ```
553
553
  * @since v0.11.10
@@ -573,7 +573,7 @@ declare module "node:dns" {
573
573
  * priority: 10,
574
574
  * weight: 5,
575
575
  * port: 21223,
576
- * name: 'service.example.com'
576
+ * name: 'service.example.com',
577
577
  * }
578
578
  * ```
579
579
  * @since v0.1.27
@@ -600,7 +600,7 @@ declare module "node:dns" {
600
600
  * certUsage: 3,
601
601
  * selector: 1,
602
602
  * match: 1,
603
- * data: [ArrayBuffer]
603
+ * data: [ArrayBuffer],
604
604
  * }
605
605
  * ```
606
606
  * @since v23.9.0, v22.15.0
@@ -650,7 +650,7 @@ declare module "node:dns" {
650
650
  * refresh: 900,
651
651
  * retry: 900,
652
652
  * expire: 1800,
653
- * minttl: 60 } ]
653
+ * minttl: 60 } ];
654
654
  * ```
655
655
  *
656
656
  * DNS server operators may choose not to respond to `ANY` queries. It may be better to call individual methods like {@link resolve4}, {@link resolveMx}, and so on. For more details, see
@@ -48,6 +48,13 @@ declare module "node:fs" {
48
48
  mtime: Date;
49
49
  ctime: Date;
50
50
  birthtime: Date;
51
+ // Deliberately not defining a type alias here... it'd be exported, and something in the ecosystem would inevitably start using it.
52
+ // TODO: replace with Temporal builtins once @types/node no longer supports TS <6.0.
53
+ atimeInstant: typeof globalThis extends { Temporal: { Instant: new(...args: any[]) => infer T } } ? T : unknown;
54
+ mtimeInstant: typeof globalThis extends { Temporal: { Instant: new(...args: any[]) => infer T } } ? T : unknown;
55
+ ctimeInstant: typeof globalThis extends { Temporal: { Instant: new(...args: any[]) => infer T } } ? T : unknown;
56
+ birthtimeInstant: typeof globalThis extends { Temporal: { Instant: new(...args: any[]) => infer T } } ? T
57
+ : unknown;
51
58
  }
52
59
  interface Stats extends StatsBase<number> {}
53
60
  /**
@@ -922,6 +922,36 @@ declare module "node:http" {
922
922
  headers?: OutgoingHttpHeaders | OutgoingHttpHeader[],
923
923
  ): this;
924
924
  writeHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this;
925
+ /**
926
+ * Sends an arbitrary HTTP/1.1 1xx informational response to the client. This
927
+ * is a generic equivalent of `response.writeContinue()`,
928
+ * `response.writeProcessing()` and `response.writeEarlyHints()`, and
929
+ * can be called multiple times before the final response. After the final
930
+ * response headers have been sent (via `response.writeHead()` or an
931
+ * implicit header), calling this method throws `ERR_HTTP_HEADERS_SENT`.
932
+ *
933
+ * Clients receive these responses via the [`'information'`](https://nodejs.org/docs/latest-v26.x/api/http.html#event-information)
934
+ * event on `http.ClientRequest`.
935
+ *
936
+ * ```js
937
+ * response.writeInformation(110, { 'X-Progress': '50%' });
938
+ * ```
939
+ * @since v26.2.0
940
+ * @param statusCode An HTTP 1xx informational status code, between `100`
941
+ * and `199` inclusive, excluding `101` (Switching Protocols) which is only
942
+ * available through the [`'upgrade'`](https://nodejs.org/docs/latest-v26.x/api/http.html#event-upgrade) event.
943
+ * @param headers An optional set of headers to send with the
944
+ * informational response. Accepts the same shapes as
945
+ * `response.writeHead()`.
946
+ * @param callback Optional, called once the message has been written
947
+ * to the socket.
948
+ */
949
+ writeInformation(
950
+ statusCode: number,
951
+ headers?: OutgoingHttpHeaders | readonly string[],
952
+ callback?: () => void,
953
+ ): void;
954
+ writeInformation(statusCode: number, callback: () => void): void;
925
955
  /**
926
956
  * Sends a HTTP/1.1 102 Processing message to the client, indicating that
927
957
  * the request body should be sent.
@@ -59,7 +59,7 @@ declare module "node:http2" {
59
59
  "ready": [];
60
60
  "streamClosed": [code: number];
61
61
  "timeout": [];
62
- "trailers": [trailers: IncomingHttpHeaders, flags: number];
62
+ "trailers": [headers: IncomingHttpHeaders, flags: number, rawHeaders: string[]];
63
63
  "wantTrailers": [];
64
64
  }
65
65
  interface Http2Stream extends stream.Duplex {
@@ -245,7 +245,7 @@ declare module "node:http2" {
245
245
  interface ClientHttp2StreamEventMap extends Http2StreamEventMap {
246
246
  "continue": [];
247
247
  "headers": [headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number, rawHeaders: string[]];
248
- "push": [headers: IncomingHttpHeaders, flags: number];
248
+ "push": [headers: IncomingHttpHeaders, flags: number, rawHeaders: string[]];
249
249
  "response": [headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number, rawHeaders: string[]];
250
250
  }
251
251
  interface ClientHttp2Stream extends Http2Stream {
@@ -1644,8 +1644,8 @@ declare module "node:http2" {
1644
1644
  *
1645
1645
  * Then `request.url` will be:
1646
1646
  *
1647
- * ```js
1648
- * '/status?name=ryan'
1647
+ * ```json
1648
+ * "/status?name=ryan"
1649
1649
  * ```
1650
1650
  *
1651
1651
  * To parse the url into its parts, `new URL()` can be used: