restty 0.1.35 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/README.md +49 -343
  2. package/dist/chunk-30px21q2.js +0 -0
  3. package/dist/{chunk-zqscavsh.js → chunk-db9dt7pr.js} +48146 -63236
  4. package/dist/chunk-s26trws6.js +9136 -0
  5. package/dist/chunk-wdme6j9c.js +1776 -0
  6. package/dist/chunk-xykzfd81.js +0 -0
  7. package/dist/chunk-y6hfk43b.js +1690 -0
  8. package/dist/fonts/local-font-access.types.d.ts +19 -0
  9. package/dist/fonts/manager/entries.d.ts +7 -0
  10. package/dist/headless.d.ts +102 -0
  11. package/dist/headless.js +350 -0
  12. package/dist/index.d.ts +8 -4
  13. package/dist/input/keymap/default-mapping.d.ts +1 -0
  14. package/dist/input/mouse.d.ts +13 -0
  15. package/dist/input/types.d.ts +10 -1
  16. package/dist/internal/runtime.d.ts +4 -0
  17. package/dist/internal/runtime.js +12 -0
  18. package/dist/internal/surface.d.ts +6 -0
  19. package/dist/internal/surface.js +15 -0
  20. package/dist/internal.d.ts +2 -5
  21. package/dist/internal.js +23 -5
  22. package/dist/restty.esm.js +32 -11368
  23. package/dist/restty.js +8 -2
  24. package/dist/runtime/core/api.d.ts +112 -0
  25. package/dist/runtime/core/config.d.ts +133 -0
  26. package/dist/runtime/core/lifecycle.d.ts +1 -0
  27. package/dist/runtime/core/models.d.ts +124 -0
  28. package/dist/runtime/core/resources.d.ts +50 -0
  29. package/dist/runtime/core/runtime-events.d.ts +28 -0
  30. package/dist/runtime/core/session.d.ts +9 -0
  31. package/dist/runtime/{codepoint-utils.d.ts → create-runtime/codepoint-utils.d.ts} +1 -1
  32. package/dist/runtime/create-runtime/{color-glyph-atlas.d.ts → font-runtime/color-glyph-atlas.d.ts} +2 -2
  33. package/dist/runtime/create-runtime/font-runtime/grid.d.ts +6 -0
  34. package/dist/runtime/create-runtime/font-runtime/grid.types.d.ts +22 -0
  35. package/dist/runtime/create-runtime/font-runtime/index.d.ts +15 -0
  36. package/dist/runtime/create-runtime/font-runtime/text.d.ts +12 -0
  37. package/dist/runtime/create-runtime/font-runtime/text.types.d.ts +10 -0
  38. package/dist/runtime/create-runtime/{font-runtime-helpers.types.d.ts → font-runtime/types.d.ts} +5 -8
  39. package/dist/runtime/create-runtime/font-runtime/webgpu-atlas.d.ts +7 -0
  40. package/dist/runtime/create-runtime/font-runtime/webgpu-atlas.types.d.ts +23 -0
  41. package/dist/runtime/create-runtime/highlight-terminal-color-utils.d.ts +1 -8
  42. package/dist/runtime/create-runtime/highlight-terminal-color-utils.types.d.ts +9 -0
  43. package/dist/runtime/create-runtime/input-hooks.d.ts +2 -12
  44. package/dist/runtime/create-runtime/input-hooks.types.d.ts +10 -0
  45. package/dist/runtime/create-runtime/interaction-runtime/bind-ime-events.d.ts +2 -1
  46. package/dist/runtime/create-runtime/interaction-runtime/bind-pointer-aux-handlers.d.ts +1 -1
  47. package/dist/runtime/create-runtime/interaction-runtime/bind-pointer-events.d.ts +2 -1
  48. package/dist/runtime/create-runtime/interaction-runtime/bind-pointer-up-handler.d.ts +1 -1
  49. package/dist/runtime/create-runtime/{interaction-runtime.d.ts → interaction-runtime/index.d.ts} +3 -2
  50. package/dist/runtime/create-runtime/interaction-runtime/kitty-image-cache.d.ts +2 -17
  51. package/dist/runtime/create-runtime/interaction-runtime/kitty-image-cache.types.d.ts +17 -0
  52. package/dist/runtime/create-runtime/interaction-runtime/{types.d.ts → runtime.types.d.ts} +1 -47
  53. package/dist/runtime/create-runtime/interaction-runtime/scrollbar-runtime.d.ts +1 -23
  54. package/dist/runtime/create-runtime/interaction-runtime/scrollbar-runtime.types.d.ts +23 -0
  55. package/dist/runtime/create-runtime/interaction-runtime/state.types.d.ts +47 -0
  56. package/dist/runtime/create-runtime/kitty-render-runtime.d.ts +2 -36
  57. package/dist/runtime/create-runtime/kitty-render-runtime.types.d.ts +33 -0
  58. package/dist/runtime/create-runtime/{lifecycle-theme-size-canvas.d.ts → lifecycle-theme-size/canvas.d.ts} +1 -1
  59. package/dist/runtime/create-runtime/{lifecycle-theme-size.d.ts → lifecycle-theme-size/index.d.ts} +3 -3
  60. package/dist/runtime/create-runtime/lifecycle-theme-size/theme.d.ts +6 -0
  61. package/dist/runtime/create-runtime/{lifecycle-theme-size.types.d.ts → lifecycle-theme-size/types.d.ts} +1 -6
  62. package/dist/runtime/{max-scrollback.d.ts → create-runtime/max-scrollback.d.ts} +2 -5
  63. package/dist/runtime/create-runtime/max-scrollback.types.d.ts +4 -0
  64. package/dist/runtime/create-runtime/native-scrollbar-host.d.ts +2 -15
  65. package/dist/runtime/create-runtime/native-scrollbar-host.types.d.ts +13 -0
  66. package/dist/runtime/{overlay-scrollbar.d.ts → create-runtime/overlay-scrollbar.d.ts} +1 -12
  67. package/dist/runtime/create-runtime/overlay-scrollbar.types.d.ts +12 -0
  68. package/dist/runtime/create-runtime/pty-input-runtime.d.ts +2 -46
  69. package/dist/runtime/create-runtime/pty-input-runtime.types.d.ts +41 -0
  70. package/dist/runtime/{render-color-utils.d.ts → create-runtime/render-color-utils.d.ts} +1 -1
  71. package/dist/runtime/{render-stage-runtime.d.ts → create-runtime/render-stage-runtime.d.ts} +2 -2
  72. package/dist/runtime/{create-app-types.d.ts → create-runtime/render-stage-runtime.types.d.ts} +1 -29
  73. package/dist/runtime/create-runtime/render-tick-webgl-overlays.d.ts +1 -1
  74. package/dist/runtime/create-runtime/render-tick-webgl-scene.d.ts +1 -1
  75. package/dist/runtime/create-runtime/render-tick-webgl.types.d.ts +2 -5
  76. package/dist/runtime/create-runtime/render-tick-webgpu-cell-pass.d.ts +1 -1
  77. package/dist/runtime/create-runtime/render-tick-webgpu.types.d.ts +5 -9
  78. package/dist/runtime/create-runtime/runtime-controller.api.types.d.ts +96 -0
  79. package/dist/runtime/create-runtime/runtime-controller.clipboard.d.ts +10 -0
  80. package/dist/runtime/create-runtime/runtime-controller.d.ts +3 -0
  81. package/dist/runtime/create-runtime/runtime-controller.input.d.ts +24 -0
  82. package/dist/runtime/create-runtime/runtime-controller.keyboard.d.ts +19 -0
  83. package/dist/runtime/create-runtime/runtime-controller.lifecycle.d.ts +50 -0
  84. package/dist/runtime/create-runtime/runtime-controller.public-api.capabilities.d.ts +57 -0
  85. package/dist/runtime/create-runtime/runtime-controller.public-api.d.ts +28 -0
  86. package/dist/runtime/create-runtime/runtime-controller.render-loop.d.ts +20 -0
  87. package/dist/runtime/create-runtime/runtime-controller.state.types.d.ts +24 -0
  88. package/dist/runtime/create-runtime/runtime-reporting.d.ts +3 -21
  89. package/dist/runtime/create-runtime/runtime-reporting.types.d.ts +18 -0
  90. package/dist/runtime/{create-app-symbols.d.ts → create-runtime/runtime-symbols.d.ts} +2 -2
  91. package/dist/runtime/create-runtime/search-highlight-utils.d.ts +1 -1
  92. package/dist/runtime/create-runtime/search-runtime/index.d.ts +2 -0
  93. package/dist/runtime/create-runtime/{search-runtime.d.ts → search-runtime/types.d.ts} +9 -6
  94. package/dist/runtime/create-runtime/shader-stage-runtime.d.ts +2 -29
  95. package/dist/runtime/create-runtime/shader-stage-runtime.types.d.ts +27 -0
  96. package/dist/runtime/{text-decoration.d.ts → create-runtime/text-decoration.d.ts} +1 -1
  97. package/dist/runtime/create-runtime.d.ts +7 -7
  98. package/dist/runtime/font-atlas-utils/glyph-atlas-builder.d.ts +1 -1
  99. package/dist/runtime/font-atlas-utils/nerd-metrics-utils.d.ts +1 -1
  100. package/dist/runtime/{atlas-builder.d.ts → fonts/atlas-builder.d.ts} +1 -1
  101. package/dist/runtime/{font-resource-store.d.ts → fonts/font-resource-store.d.ts} +3 -2
  102. package/dist/runtime/fonts/font-sources.d.ts +4 -0
  103. package/dist/runtime/shader-stages.d.ts +1 -1
  104. package/dist/runtime/types.d.ts +6 -393
  105. package/dist/surface/{panes-context-menu.d.ts → panes/context-menu.d.ts} +1 -1
  106. package/dist/surface/panes/default-context-menu-items.d.ts +2 -2
  107. package/dist/surface/panes/layout.d.ts +1 -1
  108. package/dist/surface/panes/managed-pane-create.d.ts +3 -0
  109. package/dist/surface/panes/managed-pane-create.types.d.ts +17 -0
  110. package/dist/surface/panes/managed-pane-dom.d.ts +13 -0
  111. package/dist/surface/panes/managed-pane-manager.d.ts +6 -0
  112. package/dist/surface/panes/managed-pane-options.d.ts +6 -0
  113. package/dist/surface/panes/managed-pane-options.types.d.ts +7 -0
  114. package/dist/surface/panes/managed-pane-runtime-config.d.ts +3 -0
  115. package/dist/surface/panes/managed-pane-runtime-config.types.d.ts +9 -0
  116. package/dist/surface/panes/managed-pane-runtime.d.ts +3 -0
  117. package/dist/surface/panes/managed-pane-runtime.types.d.ts +10 -0
  118. package/dist/surface/panes/managed-pane-search-ui.d.ts +9 -0
  119. package/dist/surface/{pane-app-manager.d.ts → panes/managed-pane-types.d.ts} +34 -36
  120. package/dist/surface/panes/manager.d.ts +1 -1
  121. package/dist/surface/panes/pane-interactions.d.ts +2 -2
  122. package/dist/surface/{panes-styles.d.ts → panes/styles.d.ts} +1 -1
  123. package/dist/surface/{panes-types.d.ts → panes/types.d.ts} +48 -7
  124. package/dist/surface/panes/window-events.d.ts +1 -1
  125. package/dist/surface/{restty-plugin-types.d.ts → plugins/context.types.d.ts} +32 -88
  126. package/dist/surface/{restty/plugin-dispatcher.d.ts → plugins/dispatcher.d.ts} +4 -13
  127. package/dist/surface/plugins/dispatcher.types.d.ts +6 -0
  128. package/dist/surface/{restty/plugin-ops.d.ts → plugins/host.d.ts} +4 -3
  129. package/dist/surface/plugins/runtime.d.ts +18 -0
  130. package/dist/surface/plugins/runtime.types.d.ts +47 -0
  131. package/dist/surface/plugins/types.d.ts +83 -0
  132. package/dist/surface/restty/active-pane-api.d.ts +33 -23
  133. package/dist/surface/restty/assembly.d.ts +23 -0
  134. package/dist/surface/restty/bootstrap.d.ts +21 -0
  135. package/dist/surface/restty/config.d.ts +46 -0
  136. package/dist/surface/restty/controller.d.ts +45 -0
  137. package/dist/surface/restty/events.d.ts +14 -0
  138. package/dist/surface/restty/manager-options.d.ts +4 -23
  139. package/dist/surface/restty/manager-options.types.d.ts +32 -0
  140. package/dist/surface/restty/pane-command-ops.d.ts +37 -0
  141. package/dist/surface/restty/pane-handle-ops.d.ts +24 -0
  142. package/dist/surface/{restty-pane-handle.d.ts → restty/pane-handle.d.ts} +42 -40
  143. package/dist/surface/restty/pane-lookup.d.ts +22 -0
  144. package/dist/surface/restty/pane-manager-assembly.d.ts +18 -0
  145. package/dist/surface/restty/pane-ops.d.ts +3 -51
  146. package/dist/surface/restty/pane-style-ops.d.ts +6 -0
  147. package/dist/surface/restty/plugin-surface.d.ts +5 -0
  148. package/dist/surface/restty/shader-ops.d.ts +6 -5
  149. package/dist/surface/restty.d.ts +28 -49
  150. package/dist/surface/search-ui/controller.d.ts +2 -0
  151. package/dist/surface/search-ui/index.d.ts +2 -0
  152. package/dist/surface/search-ui/styles.d.ts +5 -0
  153. package/dist/surface/{pane-search-ui.d.ts → search-ui/types.d.ts} +22 -13
  154. package/dist/wasm/embedded.d.ts +1 -1
  155. package/dist/wasm/runtime/types.d.ts +0 -6
  156. package/dist/xterm/compat-services.d.ts +2 -0
  157. package/dist/xterm.d.ts +4 -3
  158. package/dist/xterm.js +14 -8
  159. package/package.json +52 -33
  160. package/dist/internal.esm.js +0 -22285
  161. package/dist/runtime/create-runtime/debug-tools/create-dump-glyph-render.d.ts +0 -2
  162. package/dist/runtime/create-runtime/debug-tools/diagnose-codepoint.d.ts +0 -2
  163. package/dist/runtime/create-runtime/debug-tools/dump-atlas-for-codepoint.d.ts +0 -2
  164. package/dist/runtime/create-runtime/debug-tools/read-texture-to-image-data.d.ts +0 -1
  165. package/dist/runtime/create-runtime/debug-tools/setup-debug-expose.d.ts +0 -2
  166. package/dist/runtime/create-runtime/debug-tools/types.d.ts +0 -63
  167. package/dist/runtime/create-runtime/debug-tools.d.ts +0 -6
  168. package/dist/runtime/create-runtime/font-runtime-grid-helpers.d.ts +0 -31
  169. package/dist/runtime/create-runtime/font-runtime-helpers.d.ts +0 -15
  170. package/dist/runtime/create-runtime/font-runtime-text-helpers.d.ts +0 -21
  171. package/dist/runtime/create-runtime/font-runtime-webgpu-atlas.d.ts +0 -29
  172. package/dist/runtime/create-runtime/lifecycle-theme-size-theme.d.ts +0 -6
  173. package/dist/runtime/create-runtime/runtime-app-api.d.ts +0 -113
  174. package/dist/runtime/create-runtime/runtime-logger.d.ts +0 -17
  175. package/dist/runtime/font-sources.d.ts +0 -5
  176. package/dist/runtime/pty-output-buffer.d.ts +0 -12
  177. package/dist/runtime/session.d.ts +0 -9
  178. package/dist/surface/app-factory.d.ts +0 -3
  179. package/dist/surface/restty-plugin-runtime.d.ts +0 -57
  180. package/dist/xterm/app-options.d.ts +0 -2
  181. package/dist/xterm.esm.js +0 -12210
  182. /package/dist/runtime/create-runtime/{atlas-debug-utils.d.ts → atlas-bitmap-utils.d.ts} +0 -0
  183. /package/dist/runtime/{clipboard-paste.d.ts → create-runtime/clipboard-paste.d.ts} +0 -0
  184. /package/dist/runtime/{render-stage-shaders.d.ts → create-runtime/render-stage-shaders.d.ts} +0 -0
  185. /package/dist/runtime/{create-app-io-utils.d.ts → create-runtime/runtime-io-utils.d.ts} +0 -0
  186. /package/dist/surface/{restty-plugin-utils.d.ts → plugins/utils.d.ts} +0 -0
package/dist/restty.js CHANGED
@@ -2,19 +2,25 @@ import {
2
2
  RESTTY_PLUGIN_API_VERSION,
3
3
  Restty,
4
4
  ResttyPaneHandle,
5
- createRestty,
5
+ createRestty
6
+ } from "./chunk-wdme6j9c.js";
7
+ import"./chunk-y6hfk43b.js";
8
+ import {
9
+ createWebSocketPtyTransport,
6
10
  getBuiltinTheme,
7
11
  getBuiltinThemeSource,
8
12
  isBuiltinThemeName,
9
13
  listBuiltinThemeNames,
10
14
  parseGhosttyTheme
11
- } from "./chunk-zqscavsh.js";
15
+ } from "./chunk-db9dt7pr.js";
16
+ import"./chunk-s26trws6.js";
12
17
  export {
13
18
  parseGhosttyTheme,
14
19
  listBuiltinThemeNames,
15
20
  isBuiltinThemeName,
16
21
  getBuiltinThemeSource,
17
22
  getBuiltinTheme,
23
+ createWebSocketPtyTransport,
18
24
  createRestty,
19
25
  ResttyPaneHandle,
20
26
  Restty,
@@ -0,0 +1,112 @@
1
+ import type { InputHandler, MouseMode } from "../../input";
2
+ import type { GhosttyTheme } from "../../theme";
3
+ import type { ResttyRuntimeLifecycleState } from "./lifecycle";
4
+ import type { ResttyRuntimeEvent } from "./runtime-events";
5
+ import type { ResttyFontHintTarget, ResttyFontInput, ResttySearchState, ResttyShaderStage } from "./models";
6
+ /**
7
+ * Public API for a single terminal runtime instance.
8
+ */
9
+ export type ResttyRuntimeLifecycleApi = {
10
+ init: () => Promise<void>;
11
+ destroy: () => void;
12
+ state: () => ResttyRuntimeLifecycleState;
13
+ };
14
+ export type ResttyRuntimeEventsApi = {
15
+ /** Runtime lifecycle and state-change events. */
16
+ events: {
17
+ /** Subscribe to runtime lifecycle and state-change events. */
18
+ subscribe: (listener: (event: ResttyRuntimeEvent) => void) => () => void;
19
+ };
20
+ };
21
+ export type ResttyRuntimeTerminalApi = {
22
+ /** Switch the renderer backend at runtime. */
23
+ setRenderer: (value: "auto" | "webgpu" | "webgl2") => void;
24
+ /** Pause or resume rendering. */
25
+ setPaused: (value: boolean) => void;
26
+ /** Toggle the rendering pause state. */
27
+ togglePause: () => void;
28
+ /** Update the terminal font size in CSS pixels. */
29
+ setFontSize: (value: number) => void;
30
+ /** Enable or disable programming ligature shaping. */
31
+ setLigatures: (value: boolean) => void;
32
+ /** Enable or disable TrueType hinting for atlas glyph rasterization. */
33
+ setFontHinting: (value: boolean) => void;
34
+ /** Update hinting target mode used when hinting is enabled. */
35
+ setFontHintTarget: (value: ResttyFontHintTarget) => void;
36
+ /** Replace the active font list and reload fonts. */
37
+ setFonts: (fonts: ResttyFontInput[]) => Promise<void>;
38
+ /** Apply a Ghostty color theme. */
39
+ applyTheme: (theme: GhosttyTheme, sourceLabel?: string) => void;
40
+ /** Reset colors to the default theme. */
41
+ resetTheme: () => void;
42
+ /** Clear terminal scrollback and visible content. */
43
+ clearScreen: () => void;
44
+ };
45
+ export type ResttyRuntimeIoApi = {
46
+ /** Write raw text to the terminal PTY. */
47
+ sendInput: (text: string, source?: string) => void;
48
+ /** Encode and send a key sequence to the terminal PTY. */
49
+ sendKeyInput: (text: string, source?: string) => void;
50
+ /** Open a PTY connection, optionally to a specific URL. */
51
+ connectPty: (url?: string) => void;
52
+ /** Close the active PTY connection. */
53
+ disconnectPty: () => void;
54
+ /** Check whether the PTY transport is currently connected. */
55
+ isPtyConnected: () => boolean;
56
+ };
57
+ export type ResttyRuntimeInteractionApi = {
58
+ /** Override the mouse reporting mode. */
59
+ setMouseMode: (value: MouseMode) => void;
60
+ /** Return current mouse reporting status. */
61
+ getMouseStatus: () => ReturnType<InputHandler["getMouseStatus"]>;
62
+ /** Copy the current text selection to the clipboard. */
63
+ copySelectionToClipboard: () => Promise<boolean>;
64
+ /** Paste clipboard contents into the terminal. */
65
+ pasteFromClipboard: () => Promise<boolean>;
66
+ /** Select the word at a viewport client coordinate. */
67
+ selectWordAtClientPoint: (clientX: number, clientY: number) => boolean;
68
+ /** Resize terminal grid to explicit columns/rows. */
69
+ resize: (cols: number, rows: number) => void;
70
+ /** Focus terminal input targets. */
71
+ focus: () => void;
72
+ /** Blur terminal input targets. */
73
+ blur: () => void;
74
+ /** Recalculate terminal dimensions from the canvas size. */
75
+ updateSize: (force?: boolean) => void;
76
+ };
77
+ export type ResttyRuntimeSearchApi = {
78
+ /** Update the active terminal search query. */
79
+ setQuery: (query: string) => void;
80
+ /** Clear terminal search state and visible highlights. */
81
+ clear: () => void;
82
+ /** Navigate to the next terminal search match. */
83
+ next: () => void;
84
+ /** Navigate to the previous terminal search match. */
85
+ previous: () => void;
86
+ /** Get the current terminal search state. */
87
+ getState: () => ResttySearchState;
88
+ };
89
+ export type ResttyRuntimeRenderApi = {
90
+ /** Return the name of the active renderer backend. */
91
+ getBackend: () => string;
92
+ /** Replace the active shader stage list. */
93
+ setShaderStages: (stages: ResttyShaderStage[]) => void;
94
+ /** Get the current shader stage list. */
95
+ getShaderStages: () => ResttyShaderStage[];
96
+ };
97
+ export type ResttyRuntimeLifecycleView = {
98
+ init: ResttyRuntimeLifecycleApi["init"];
99
+ destroy: ResttyRuntimeLifecycleApi["destroy"];
100
+ state: ResttyRuntimeLifecycleApi["state"];
101
+ };
102
+ export type ResttyRuntimeEventsView = ResttyRuntimeEventsApi["events"];
103
+ export type ResttyRuntimeGroupedApi = {
104
+ lifecycle: ResttyRuntimeLifecycleView;
105
+ events: ResttyRuntimeEventsView;
106
+ terminal: ResttyRuntimeTerminalApi;
107
+ io: ResttyRuntimeIoApi;
108
+ interaction: ResttyRuntimeInteractionApi;
109
+ search: ResttyRuntimeSearchApi;
110
+ render: ResttyRuntimeRenderApi;
111
+ };
112
+ export type ResttyRuntime = ResttyRuntimeGroupedApi;
@@ -0,0 +1,133 @@
1
+ import type { PtyTransport } from "../../pty";
2
+ import type { ResttyRuntimeInputPayload, ResttyFontHintTarget, ResttyFontInput, ResttyShaderStage, ResttyTouchSelectionMode } from "./models";
3
+ import type { ResttyRuntimeCallbacks, ResttyRuntimeSession } from "./resources";
4
+ import type { GhosttyTheme } from "../../theme";
5
+ /**
6
+ * DOM/session fields required to mount a runtime instance.
7
+ */
8
+ export type ResttyRuntimeMountConfig = {
9
+ /** Target canvas element for terminal rendering. */
10
+ canvas: HTMLCanvasElement;
11
+ /** Shared session for WASM/WebGPU resource reuse across panes. */
12
+ session?: ResttyRuntimeSession;
13
+ /** Hidden textarea for IME composition input. */
14
+ imeInput?: HTMLTextAreaElement | null;
15
+ };
16
+ /**
17
+ * Advanced runtime service hooks and adapters.
18
+ */
19
+ export type ResttyRuntimeServicesConfig = {
20
+ /** Callbacks for state-change notifications. */
21
+ callbacks?: ResttyRuntimeCallbacks;
22
+ /** PTY transport layer for terminal I/O. */
23
+ ptyTransport?: PtyTransport;
24
+ /**
25
+ * Optional hook to transform or suppress terminal/program input
26
+ * before it is written to the terminal core.
27
+ */
28
+ beforeInput?: (payload: ResttyRuntimeInputPayload) => string | null | void;
29
+ /**
30
+ * Optional hook to transform or suppress PTY output before it is
31
+ * queued for rendering.
32
+ */
33
+ beforeRenderOutput?: (payload: ResttyRuntimeInputPayload) => string | null | void;
34
+ };
35
+ /**
36
+ * Terminal behavior/config shared across panes and runtime creation.
37
+ */
38
+ export type ResttyTerminalConfig = {
39
+ /** Renderer backend preference (default "auto"). */
40
+ renderer?: "auto" | "webgpu" | "webgl2";
41
+ /** Font size in CSS pixels. */
42
+ fontSize?: number;
43
+ /** Enable programming ligature shaping across adjacent operator cells (default true). */
44
+ ligatures?: boolean;
45
+ /** Enable TrueType hinting during atlas rasterization (default false). */
46
+ fontHinting?: boolean;
47
+ /**
48
+ * Hinting target mode passed to text-shaper when hinting is enabled.
49
+ * - auto: infer from pixel mode
50
+ * - light: prefer light/subpixel-like vertical hinting
51
+ * - normal: prefer full hinting
52
+ */
53
+ fontHintTarget?: ResttyFontHintTarget;
54
+ /**
55
+ * Font sizing mode used by text-shaper scale resolution.
56
+ * - em: interpret fontSize as EM size
57
+ * - height: interpret fontSize as full font height (ascender-descender-lineGap)
58
+ */
59
+ fontSizeMode?: "em" | "height";
60
+ /**
61
+ * Alpha blending strategy.
62
+ * - native: GPU-native premultiplied alpha
63
+ * - linear: linear-space blending
64
+ * - linear-corrected: linear-space with gamma correction
65
+ */
66
+ alphaBlending?: "native" | "linear" | "linear-corrected";
67
+ /** Ordered terminal fonts. Omit to use the built-in local-first fallback chain. */
68
+ fonts?: ResttyFontInput[];
69
+ /** Initial Ghostty-compatible color theme applied before the runtime becomes ready. */
70
+ theme?: GhosttyTheme;
71
+ /** Maximum scale factor for the symbol atlas texture. */
72
+ maxSymbolAtlasScale?: number;
73
+ /** Per-glyph scale overrides matched by regex. */
74
+ fontScaleOverrides?: {
75
+ match: RegExp;
76
+ scale: number;
77
+ }[];
78
+ /** Scale factor applied to Nerd Font icons. */
79
+ nerdIconScale?: number;
80
+ /** Automatically resize the terminal on container/window changes (default true). */
81
+ autoResize?: boolean;
82
+ /** Show the centered cols x rows badge while resizing (default true). */
83
+ showResizeOverlay?: boolean;
84
+ /**
85
+ * Forward terminal-generated reply bytes to the PTY transport (default true).
86
+ * Set false when a backend/headless terminal is authoritative for replies.
87
+ */
88
+ forwardTerminalReplies?: boolean;
89
+ /** Attach resize/focus listeners to the window object. */
90
+ attachWindowEvents?: boolean;
91
+ /** Attach pointer/keyboard listeners to the canvas. */
92
+ attachCanvasEvents?: boolean;
93
+ /**
94
+ * Touch selection behavior on pointerType=touch:
95
+ * - drag: immediate drag-selection (legacy behavior)
96
+ * - long-press: selection starts after press timeout (default)
97
+ * - off: disable touch selection, keep touch scrolling
98
+ */
99
+ touchSelectionMode?: ResttyTouchSelectionMode;
100
+ /**
101
+ * Long-press timeout in ms for touch selection intent.
102
+ * Only used when touchSelectionMode is "long-press".
103
+ */
104
+ touchSelectionLongPressMs?: number;
105
+ /**
106
+ * Pointer move threshold in CSS pixels before long-press selection is
107
+ * canceled and touch pan-scroll takes priority.
108
+ */
109
+ touchSelectionMoveThresholdPx?: number;
110
+ /** Optional render-stage shader chain. */
111
+ shaderStages?: ResttyShaderStage[];
112
+ /**
113
+ * Maximum scrollback buffer size in bytes passed to the WASM terminal.
114
+ * Default is 10_000_000 (10MB).
115
+ */
116
+ maxScrollbackBytes?: number;
117
+ /**
118
+ * Deprecated alias for maxScrollbackBytes.
119
+ * If both are set, maxScrollbackBytes takes precedence.
120
+ */
121
+ maxScrollback?: number;
122
+ };
123
+ /**
124
+ * Configuration for creating a Restty runtime instance.
125
+ */
126
+ export type ResttyRuntimeConfig = {
127
+ /** DOM/session fields required to mount the runtime. */
128
+ mount: ResttyRuntimeMountConfig;
129
+ /** Terminal behavior/config applied to the runtime instance. */
130
+ terminal?: ResttyTerminalConfig;
131
+ /** Service hooks and adapters used by the runtime. */
132
+ services?: ResttyRuntimeServicesConfig;
133
+ };
@@ -0,0 +1 @@
1
+ export type ResttyRuntimeLifecycleState = "created" | "initializing" | "ready" | "failed" | "destroyed";
@@ -0,0 +1,124 @@
1
+ import type { SearchViewportMatch } from "../../wasm";
2
+ export type ResttySearchState = {
3
+ query: string;
4
+ active: boolean;
5
+ pending: boolean;
6
+ complete: boolean;
7
+ total: number;
8
+ selectedIndex: number | null;
9
+ };
10
+ export type ResttySearchViewportMatch = SearchViewportMatch;
11
+ /** Raw font data as an ArrayBuffer or typed-array view. */
12
+ export type ResttyFontData = ArrayBuffer | ArrayBufferView;
13
+ /** Font style metadata used for local matching and face labels. */
14
+ export type ResttyFontStyle = "normal" | "italic" | "oblique";
15
+ /** Local Font Access behavior for family-based inputs. */
16
+ export type ResttyLocalFontMode = "prefer" | "require";
17
+ /** Font loaded from a URL or app-relative path. */
18
+ export type ResttyFontUrlInput = {
19
+ url: string | URL;
20
+ name?: string;
21
+ weight?: number;
22
+ style?: ResttyFontStyle;
23
+ };
24
+ /** Font loaded from an app-relative path. */
25
+ export type ResttyFontPathInput = {
26
+ path: string;
27
+ name?: string;
28
+ weight?: number;
29
+ style?: ResttyFontStyle;
30
+ };
31
+ /** Font loaded from an in-memory buffer. */
32
+ export type ResttyFontBufferInput = {
33
+ data: ResttyFontData;
34
+ name?: string;
35
+ weight?: number;
36
+ style?: ResttyFontStyle;
37
+ };
38
+ /** Non-family font inputs that can be used as fallbacks. */
39
+ export type ResttyFontFallbackInput = string | URL | ResttyFontData | ResttyFontUrlInput | ResttyFontPathInput | ResttyFontBufferInput;
40
+ /**
41
+ * Font resolved by family name through Local Font Access, optionally falling
42
+ * back to a URL/path/buffer when the local face is unavailable.
43
+ */
44
+ export type ResttyFontFamilyInput = {
45
+ family: string;
46
+ local?: ResttyLocalFontMode;
47
+ fallback?: ResttyFontFallbackInput;
48
+ name?: string;
49
+ weight?: number;
50
+ style?: ResttyFontStyle;
51
+ };
52
+ /**
53
+ * Public font input accepted by runtime and surface APIs.
54
+ * - string/URL/path: fetched directly when URL-like, otherwise treated as a local family
55
+ * - buffer/data: parsed from memory
56
+ * - family: tries Local Font Access, with optional fallback
57
+ */
58
+ export type ResttyFontInput = ResttyFontFallbackInput | ResttyFontFamilyInput;
59
+ /** Internal resolved source consumed by the runtime font resource store. */
60
+ export type ResttyResolvedFontSource = {
61
+ kind: "url";
62
+ url: string;
63
+ label: string;
64
+ weight?: number;
65
+ style?: ResttyFontStyle;
66
+ } | {
67
+ kind: "buffer";
68
+ data: ResttyFontData;
69
+ label: string;
70
+ weight?: number;
71
+ style?: ResttyFontStyle;
72
+ } | {
73
+ kind: "local";
74
+ family: string;
75
+ matchers: string[];
76
+ label: string;
77
+ required: boolean;
78
+ weight?: number;
79
+ style?: ResttyFontStyle;
80
+ };
81
+ /**
82
+ * Touch-based text selection behavior.
83
+ * - drag: immediate drag-selection on touch
84
+ * - long-press: selection starts after a long-press timeout
85
+ * - off: disable touch selection entirely
86
+ */
87
+ export type ResttyTouchSelectionMode = "drag" | "long-press" | "off";
88
+ /** Hinting target mode used when TrueType hinting is enabled. */
89
+ export type ResttyFontHintTarget = "auto" | "light" | "normal";
90
+ /** Input payload passed to runtime before-input hooks. */
91
+ export type ResttyRuntimeInputPayload = {
92
+ text: string;
93
+ source: string;
94
+ };
95
+ /** Render-stage phase ordering. */
96
+ export type ResttyShaderStageMode = "before-main" | "after-main" | "replace-main";
97
+ /** Target backend(s) for a shader stage. */
98
+ export type ResttyShaderStageBackend = "webgpu" | "webgl2" | "both";
99
+ /** Stage shader source definitions. */
100
+ export type ResttyShaderStageSource = {
101
+ /**
102
+ * WGSL source that defines:
103
+ * fn resttyStage(color: vec4f, uv: vec2f, time: f32, params0: vec4f, params1: vec4f) -> vec4f
104
+ */
105
+ wgsl?: string;
106
+ /**
107
+ * GLSL source that defines:
108
+ * vec4 resttyStage(vec4 color, vec2 uv, float time, vec4 params0, vec4 params1)
109
+ */
110
+ glsl?: string;
111
+ };
112
+ /** User-defined frame shader stage. */
113
+ export type ResttyShaderStage = {
114
+ id: string;
115
+ mode?: ResttyShaderStageMode;
116
+ backend?: ResttyShaderStageBackend;
117
+ priority?: number;
118
+ enabled?: boolean;
119
+ /** Optional numeric uniforms packed into params0/params1 (up to 8 values). */
120
+ uniforms?: number[];
121
+ shader: ResttyShaderStageSource;
122
+ /** Optional compile/runtime error callback for this stage. */
123
+ onError?: (message: string) => void;
124
+ };
@@ -0,0 +1,50 @@
1
+ import type { DesktopNotification } from "../../input";
2
+ import type { WebGPUCoreState } from "../../renderer";
3
+ import type { ResttyWasm } from "../../wasm";
4
+ import type { Font as TextShaperFont } from "text-shaper";
5
+ import type { ResttyResolvedFontSource, ResttySearchState } from "./models";
6
+ /** Callback for WASM log messages. */
7
+ export type ResttyWasmLogListener = (message: string) => void;
8
+ /** Shared parsed font face reused across panes within a session. */
9
+ export type ResttyFontResourceFace = {
10
+ /** Human-readable label for UI/status output. */
11
+ label: string;
12
+ /** Parsed text-shaper font instance. */
13
+ font: TextShaperFont;
14
+ };
15
+ /** Lease handle returned by the shared font resource store. */
16
+ export type ResttyFontResourceLease = {
17
+ /** Ordered parsed faces (primary + fallbacks). */
18
+ faces: ResttyFontResourceFace[];
19
+ /** Release the lease when pane/runtime no longer needs the faces. */
20
+ release: () => void;
21
+ };
22
+ /** Session-level font resource store for deduped loading/parsing and caching. */
23
+ export type ResttyFontResourceStore = {
24
+ /** Acquire parsed faces for a source list. */
25
+ acquire: (sources: ResttyResolvedFontSource[]) => Promise<ResttyFontResourceLease>;
26
+ };
27
+ /**
28
+ * Runtime session provider that supplies shared WASM and WebGPU resources.
29
+ */
30
+ export type ResttyRuntimeSession = {
31
+ /** Lazily initialize and return the WASM module. */
32
+ getWasm: () => Promise<ResttyWasm>;
33
+ /** Lazily initialize and return the WebGPU renderer core for a canvas. */
34
+ getWebGPUCore: (canvas: HTMLCanvasElement) => Promise<WebGPUCoreState | null>;
35
+ /** Return the shared font resource store for this session/tab. */
36
+ getFontResourceStore?: () => ResttyFontResourceStore;
37
+ /** Subscribe to WASM log output. */
38
+ addWasmLogListener?: (listener: ResttyWasmLogListener) => void;
39
+ /** Unsubscribe from WASM log output. */
40
+ removeWasmLogListener?: (listener: ResttyWasmLogListener) => void;
41
+ };
42
+ /**
43
+ * Callbacks fired by the runtime when internal state changes.
44
+ */
45
+ export type ResttyRuntimeCallbacks = {
46
+ /** Terminal requested a desktop notification via OSC 9 / OSC 777. */
47
+ onDesktopNotification?: (notification: DesktopNotification) => void;
48
+ /** Terminal search state changed. */
49
+ onSearchState?: (state: ResttySearchState) => void;
50
+ };
@@ -0,0 +1,28 @@
1
+ import type { ResttySearchState } from "./models";
2
+ import type { ResttyRuntimeLifecycleState } from "./lifecycle";
3
+ /**
4
+ * Event emitted by a single runtime instance.
5
+ */
6
+ export type ResttyRuntimeEvent = {
7
+ type: "state";
8
+ state: ResttyRuntimeLifecycleState;
9
+ } | {
10
+ type: "backend";
11
+ backend: string;
12
+ } | {
13
+ type: "term-size";
14
+ cols: number;
15
+ rows: number;
16
+ } | {
17
+ type: "pty-status";
18
+ status: string;
19
+ } | {
20
+ type: "search-state";
21
+ state: ResttySearchState;
22
+ };
23
+ export type ResttyRuntimeEventListener = (event: ResttyRuntimeEvent) => void;
24
+ export type ResttyRuntimeEventHub = {
25
+ emit: (event: ResttyRuntimeEvent) => void;
26
+ subscribe: (listener: ResttyRuntimeEventListener) => () => void;
27
+ };
28
+ export declare function createRuntimeEventHub(): ResttyRuntimeEventHub;
@@ -0,0 +1,9 @@
1
+ import type { ResttyRuntimeSession } from "./resources";
2
+ /**
3
+ * Create a new runtime session that lazily loads the WASM module and
4
+ * initializes the WebGPU core on first use. Multiple panes can
5
+ * share a single session to avoid duplicate resource loading.
6
+ */
7
+ export declare function createResttyRuntimeSession(): ResttyRuntimeSession;
8
+ /** Return the global default session, creating it on first call. */
9
+ export declare function getDefaultResttyRuntimeSession(): ResttyRuntimeSession;
@@ -1,4 +1,4 @@
1
- import type { FontEntry } from "../fonts";
1
+ import type { FontEntry } from "../../fonts";
2
2
  export declare function isLikelyEmojiCodepoint(cp: number): boolean;
3
3
  export declare function isVariationSelectorCodepoint(cp: number): boolean;
4
4
  export declare function isCombiningMarkCodepoint(cp: number): boolean;
@@ -1,5 +1,5 @@
1
- import type { FontAtlas } from "../../fonts";
2
- import type { BuildColorEmojiAtlasWithCanvas } from "./font-runtime-helpers.types";
1
+ import type { FontAtlas } from "../../../fonts";
2
+ import type { BuildColorEmojiAtlasWithCanvas } from "./types";
3
3
  type CreateColorGlyphAtlasHelpersOptions = {
4
4
  pixelModeRgba: number;
5
5
  atlasToRGBA: (atlas: FontAtlas) => Uint8Array;
@@ -0,0 +1,6 @@
1
+ import type { CellMetrics } from "./types";
2
+ import type { CreateFontRuntimeGridHelpersOptions } from "./grid.types";
3
+ export declare function createFontRuntimeGridHelpers(options: CreateFontRuntimeGridHelpersOptions): {
4
+ computeCellMetrics: () => CellMetrics | null;
5
+ updateGrid: () => void;
6
+ };
@@ -0,0 +1,22 @@
1
+ import type { FontEntry, FontManagerState } from "../../../fonts";
2
+ import type { WebGLState, WebGPUState } from "../../../renderer";
3
+ import type { PtyTransport } from "../../../pty";
4
+ import type { ResttyWasm } from "../../../wasm";
5
+ import type { FontConfigRef, GridStateRef } from "./types";
6
+ export type CreateFontRuntimeGridHelpersOptions = {
7
+ fontState: FontManagerState;
8
+ fontConfig: FontConfigRef;
9
+ gridState: GridStateRef;
10
+ getCanvas: () => HTMLCanvasElement;
11
+ getCurrentDpr: () => number;
12
+ getActiveState: () => WebGPUState | WebGLState | null;
13
+ getWasmReady: () => boolean;
14
+ getWasm: () => ResttyWasm | null;
15
+ getWasmHandle: () => number;
16
+ ptyTransport: PtyTransport;
17
+ setNeedsRender: () => void;
18
+ markSearchDirty?: () => void;
19
+ shapeClusterWithFont: (entry: FontEntry, text: string) => {
20
+ advance: number;
21
+ };
22
+ };
@@ -0,0 +1,15 @@
1
+ import type { CreateRuntimeFontRuntimeHelpersOptions } from "./types";
2
+ export type { CreateRuntimeFontRuntimeHelpersOptions } from "./types";
3
+ export declare function createRuntimeFontRuntimeHelpers(options: CreateRuntimeFontRuntimeHelpersOptions): {
4
+ ensureAtlasForFont: (device: GPUDevice, state: import("../../../renderer").WebGPUState, entry: import("../../../fonts").FontEntry, neededGlyphIds: Set<number>, fontSizePx: number, fontIndex: number, atlasScale: number, glyphMeta?: Map<number, import("../../fonts/atlas-builder").GlyphConstraintMeta>, constraintContext?: import("../../fonts/atlas-builder").AtlasConstraintContext | null) => boolean;
5
+ computeCellMetrics: () => import("./types").CellMetrics | null;
6
+ updateGrid: () => void;
7
+ shapeClusterWithFont: (entry: import("../../../fonts").FontEntry, text: string) => import("../../../fonts").ShapedCluster;
8
+ noteColorGlyphText: (entry: import("../../../fonts").FontEntry, text: string, shaped: {
9
+ glyphs: Array<{
10
+ glyphId: number;
11
+ }>;
12
+ }) => void;
13
+ fontHasGlyph: (font: import("../../../fonts").Font, ch: string) => boolean;
14
+ pickFontIndexForText: (text: string, expectedSpan?: number, stylePreference?: string) => number;
15
+ };
@@ -0,0 +1,12 @@
1
+ import { type Font, type FontEntry } from "../../../fonts";
2
+ import type { CreateFontRuntimeTextHelpersOptions } from "./text.types";
3
+ export declare function createFontRuntimeTextHelpers(options: CreateFontRuntimeTextHelpersOptions): {
4
+ shapeClusterWithFont: (entry: FontEntry, text: string) => import("../../../fonts").ShapedCluster;
5
+ noteColorGlyphText: (entry: FontEntry, text: string, shaped: {
6
+ glyphs: Array<{
7
+ glyphId: number;
8
+ }>;
9
+ }) => void;
10
+ fontHasGlyph: (font: Font, ch: string) => boolean;
11
+ pickFontIndexForText: (text: string, expectedSpan?: number, stylePreference?: string) => number;
12
+ };
@@ -0,0 +1,10 @@
1
+ import type { FontManagerState } from "../../../fonts";
2
+ import type { GlyphBufferToShapedGlyphsFn, ShapeFn, UnicodeBufferCtor } from "./types";
3
+ export type CreateFontRuntimeTextHelpersOptions = {
4
+ fontState: FontManagerState;
5
+ glyphShapeCacheLimit: number;
6
+ fontPickCacheLimit: number;
7
+ UnicodeBuffer: UnicodeBufferCtor;
8
+ shape: ShapeFn;
9
+ glyphBufferToShapedGlyphs: GlyphBufferToShapedGlyphsFn;
10
+ };
@@ -1,8 +1,8 @@
1
- import type { Font, FontAtlas, FontEntry, FontManagerState, FontSizeMode, ShapedGlyph } from "../../fonts";
2
- import type { WebGLState, WebGPUState } from "../../renderer";
3
- import type { PtyTransport } from "../../pty";
4
- import type { ResttyWasm } from "../../wasm";
5
- import type { ResttyAppCallbacks, ResttyFontHintTarget } from "../types";
1
+ import type { Font, FontAtlas, FontEntry, FontManagerState, FontSizeMode, ShapedGlyph } from "../../../fonts";
2
+ import type { WebGLState, WebGPUState } from "../../../renderer";
3
+ import type { PtyTransport } from "../../../pty";
4
+ import type { ResttyWasm } from "../../../wasm";
5
+ import type { ResttyFontHintTarget } from "../../core/models";
6
6
  import type { AtlasOptions, GlyphBuffer, GlyphRasterizeOptions, Matrix2D, Matrix3x3, RasterizedGlyph, UnicodeBuffer } from "text-shaper";
7
7
  export type GridStateRef = {
8
8
  cols: number;
@@ -58,9 +58,6 @@ export type CreateRuntimeFontRuntimeHelpersOptions = {
58
58
  fontState: FontManagerState;
59
59
  fontConfig: FontConfigRef;
60
60
  gridState: GridStateRef;
61
- callbacks?: ResttyAppCallbacks;
62
- gridEl: HTMLElement | null;
63
- cellEl: HTMLElement | null;
64
61
  getCanvas: () => HTMLCanvasElement;
65
62
  getCurrentDpr: () => number;
66
63
  getActiveState: () => WebGPUState | WebGLState | null;
@@ -0,0 +1,7 @@
1
+ import { type FontEntry } from "../../../fonts";
2
+ import type { WebGPUState } from "../../../renderer";
3
+ import { type AtlasConstraintContext, type GlyphConstraintMeta } from "../../fonts/atlas-builder";
4
+ import type { CreateRuntimeWebGPUAtlasHelpersOptions } from "./webgpu-atlas.types";
5
+ export declare function createRuntimeWebGPUAtlasHelpers(options: CreateRuntimeWebGPUAtlasHelpersOptions): {
6
+ ensureAtlasForFont: (device: GPUDevice, state: WebGPUState, entry: FontEntry, neededGlyphIds: Set<number>, fontSizePx: number, fontIndex: number, atlasScale: number, glyphMeta?: Map<number, GlyphConstraintMeta>, constraintContext?: AtlasConstraintContext | null) => boolean;
7
+ };
@@ -0,0 +1,23 @@
1
+ import type { FontManagerState } from "../../../fonts";
2
+ import type { ResttyFontHintTarget } from "../../core/models";
3
+ import type { AtlasBitmapToRGBA, BuildAtlasFn, BuildColorEmojiAtlasWithCanvas, PadAtlasRGBAFn, RasterizeGlyphFn, RasterizeGlyphWithTransformFn, ResolveGlyphPixelMode } from "./types";
4
+ export type CreateRuntimeWebGPUAtlasHelpersOptions = {
5
+ fontState: FontManagerState;
6
+ getFontHinting: () => boolean;
7
+ getFontHintTarget: () => ResttyFontHintTarget;
8
+ fontScaleOverrides: Array<{
9
+ match: RegExp;
10
+ scale: number;
11
+ }>;
12
+ resolveGlyphPixelMode: ResolveGlyphPixelMode;
13
+ atlasBitmapToRGBA: AtlasBitmapToRGBA;
14
+ padAtlasRGBA: PadAtlasRGBAFn;
15
+ buildAtlas: BuildAtlasFn;
16
+ buildColorEmojiAtlasWithCanvas: BuildColorEmojiAtlasWithCanvas;
17
+ rasterizeGlyph: RasterizeGlyphFn;
18
+ rasterizeGlyphWithTransform: RasterizeGlyphWithTransformFn;
19
+ pixelModeRgbaValue: number;
20
+ atlasPadding: number;
21
+ symbolAtlasPadding: number;
22
+ symbolAtlasMaxSize: number;
23
+ };
@@ -1,13 +1,6 @@
1
1
  import { type ThemeTerminalColor } from "../../theme";
2
2
  import type { Color } from "../../renderer";
3
- export type RuntimeTerminalColor = {
4
- kind: "color";
5
- color: Color;
6
- } | {
7
- kind: "cell-foreground";
8
- } | {
9
- kind: "cell-background";
10
- };
3
+ import type { RuntimeTerminalColor } from "./highlight-terminal-color-utils.types";
11
4
  export declare function runtimeTerminalColorFromTheme(value: ThemeTerminalColor): RuntimeTerminalColor;
12
5
  export declare function resolveHighlightBackgroundColor(value: RuntimeTerminalColor, cellFg: Color, cellBg: Color, inverse: boolean): Color;
13
6
  export declare function resolveHighlightForegroundColor(value: RuntimeTerminalColor, cellFg: Color, cellBg: Color, inverse: boolean): Color;