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
@@ -0,0 +1,19 @@
1
+ export type LocalFontsPermissionDescriptor = PermissionDescriptor & {
2
+ name: "local-fonts";
3
+ };
4
+ export type LocalFontFaceData = {
5
+ family?: string;
6
+ fullName?: string;
7
+ postscriptName?: string;
8
+ blob: () => Promise<Blob>;
9
+ };
10
+ export type NavigatorWithLocalFontAccess = Navigator & {
11
+ queryLocalFonts?: () => Promise<LocalFontFaceData[]>;
12
+ permissions?: {
13
+ query?: (permissionDesc: LocalFontsPermissionDescriptor) => Promise<PermissionStatus>;
14
+ };
15
+ };
16
+ export type GlobalWithLocalFontAccess = typeof globalThis & {
17
+ queryLocalFonts?: () => Promise<LocalFontFaceData[]>;
18
+ navigator?: NavigatorWithLocalFontAccess;
19
+ };
@@ -9,5 +9,12 @@ export declare function createFontManagerState(): FontManagerState;
9
9
  export declare function fontHasGlyph(font: Font, ch: string): boolean;
10
10
  /** Get the horizontal advance width in font design units, computing and caching it if needed. */
11
11
  export declare function fontAdvanceUnits(entry: FontEntry, shapeClusterWithFont: (entry: FontEntry, text: string) => ShapedCluster): number;
12
+ /**
13
+ * Scale (pixels per font unit) that renders a fallback font at the primary
14
+ * font's em size, matching Ghostty's rule of loading every face at the same
15
+ * point size. Returns 0 when either font lacks a usable unitsPerEm (for
16
+ * example bitmap fonts), so callers can fall back to size-mode scaling.
17
+ */
18
+ export declare function fallbackEmScale(primaryFont: Font | null | undefined, primaryScale: number, fallbackFont: Font | null | undefined): number;
12
19
  /** Get the bounding-box width of a glyph in font design units, with caching. */
13
20
  export declare function glyphWidthUnits(entry: FontEntry, glyphId: number | undefined | null): number;
@@ -0,0 +1,102 @@
1
+ import type { KittyPlacement, RenderState, ResttyWasmOptions, SearchStatus, SearchViewportMatch } from "./wasm";
2
+ import type { ResttyWasm } from "./wasm";
3
+ export type ResttyHeadlessInput = string | ArrayBuffer | ArrayBufferView;
4
+ export type ResttyHeadlessReplayOptions = {
5
+ /** Maximum replay journal size in UTF-8 bytes. Default: 10MB. */
6
+ maxBytes?: number;
7
+ };
8
+ export type ResttyHeadlessReplayWriteEvent = {
9
+ type: "write";
10
+ data: string;
11
+ byteLength: number;
12
+ };
13
+ export type ResttyHeadlessReplayResizeEvent = {
14
+ type: "resize";
15
+ cols: number;
16
+ rows: number;
17
+ };
18
+ export type ResttyHeadlessReplayEvent = ResttyHeadlessReplayWriteEvent | ResttyHeadlessReplayResizeEvent;
19
+ export type ResttyHeadlessTerminalOptions = {
20
+ /** Initial terminal width in columns. Default: 80. */
21
+ cols?: number;
22
+ /** Initial terminal height in rows. Default: 24. */
23
+ rows?: number;
24
+ /** Maximum scrollback buffer size in bytes. Default: 10MB. */
25
+ maxScrollbackBytes?: number;
26
+ /** Initial pixel width used by protocols such as Kitty graphics. */
27
+ pixelWidth?: number;
28
+ /** Initial pixel height used by protocols such as Kitty graphics. */
29
+ pixelHeight?: number;
30
+ /**
31
+ * Replay journal config. Set to false when reconnect replay is not needed.
32
+ * The journal is a bounded input replay stream, not a binary terminal-state snapshot.
33
+ */
34
+ replay?: false | ResttyHeadlessReplayOptions;
35
+ /** Reuse an existing WASM runtime instance. */
36
+ wasm?: ResttyWasm;
37
+ /** WASM loader options used when wasm is not provided. */
38
+ wasmOptions?: ResttyWasmOptions;
39
+ };
40
+ export type ResttyHeadlessReplay = {
41
+ kind: "restty-headless-replay";
42
+ version: 1;
43
+ initialCols: number;
44
+ initialRows: number;
45
+ cols: number;
46
+ rows: number;
47
+ events: ResttyHeadlessReplayEvent[];
48
+ data: string;
49
+ byteLength: number;
50
+ truncated: boolean;
51
+ };
52
+ export type ResttyHeadlessSnapshot = RenderState;
53
+ export type ResttyHeadlessWriteOptions = {
54
+ recordReplay?: boolean;
55
+ };
56
+ export type ResttyHeadlessApplyReplayOptions = {
57
+ resize?: boolean;
58
+ };
59
+ export declare class ResttyHeadlessTerminal {
60
+ readonly wasm: ResttyWasm;
61
+ private wasmHandle;
62
+ private replayEnabled;
63
+ private replayMaxBytes;
64
+ private replayEvents;
65
+ private replayByteLength;
66
+ private replayTruncated;
67
+ private replayStartCols;
68
+ private replayStartRows;
69
+ private disposed;
70
+ cols: number;
71
+ rows: number;
72
+ constructor(wasm: ResttyWasm, options?: ResttyHeadlessTerminalOptions);
73
+ get handle(): number;
74
+ write(input: ResttyHeadlessInput, options?: ResttyHeadlessWriteOptions): void;
75
+ writeln(input?: ResttyHeadlessInput): void;
76
+ resize(cols: number, rows: number): void;
77
+ private applyResize;
78
+ setPixelSize(widthPx: number, heightPx: number): void;
79
+ renderUpdate(): void;
80
+ getRenderState(): RenderState | null;
81
+ snapshot(): ResttyHeadlessSnapshot | null;
82
+ drainOutput(): string;
83
+ getKittyKeyboardFlags(): number;
84
+ getKittyPlacements(): KittyPlacement[];
85
+ scrollViewport(delta: number): void;
86
+ setSearchQuery(query: string): void;
87
+ clearSearch(): void;
88
+ stepSearch(budget?: number): void;
89
+ searchNext(): void;
90
+ searchPrevious(): void;
91
+ getSearchStatus(): SearchStatus;
92
+ getSearchViewportMatches(): SearchViewportMatch[];
93
+ createReplay(): ResttyHeadlessReplay;
94
+ applyReplay(replay: ResttyHeadlessReplay | string, options?: ResttyHeadlessApplyReplayOptions): void;
95
+ clearReplay(): void;
96
+ dispose(): void;
97
+ private appendReplay;
98
+ private appendReplayResize;
99
+ private replaceReplay;
100
+ private assertUsable;
101
+ }
102
+ export declare function createHeadlessTerminal(options?: ResttyHeadlessTerminalOptions): Promise<ResttyHeadlessTerminal>;
@@ -0,0 +1,350 @@
1
+ import {
2
+ loadResttyWasm
3
+ } from "./chunk-s26trws6.js";
4
+
5
+ // src/headless.ts
6
+ var DEFAULT_COLS = 80;
7
+ var DEFAULT_ROWS = 24;
8
+ var DEFAULT_MAX_SCROLLBACK_BYTES = 1e7;
9
+ var MAX_MAX_SCROLLBACK_BYTES = 256000000;
10
+ var DEFAULT_REPLAY_MAX_BYTES = 1e7;
11
+ var HARD_RESET_SEQUENCE = "\x1Bc";
12
+ var textDecoder = new TextDecoder;
13
+ var textEncoder = new TextEncoder;
14
+ function normalizePositiveInt(value, fallback) {
15
+ if (!Number.isFinite(value))
16
+ return fallback;
17
+ const asInt = Math.trunc(Number(value));
18
+ return asInt > 0 ? asInt : fallback;
19
+ }
20
+ function normalizeMaxBytes(value, fallback) {
21
+ if (!Number.isFinite(value))
22
+ return fallback;
23
+ const asInt = Math.trunc(Number(value));
24
+ if (asInt <= 0)
25
+ return 0;
26
+ return Math.min(asInt, MAX_MAX_SCROLLBACK_BYTES);
27
+ }
28
+ function decodeInput(input) {
29
+ if (typeof input === "string")
30
+ return input;
31
+ return textDecoder.decode(input);
32
+ }
33
+ function copyCursor(cursor) {
34
+ return cursor ? { ...cursor } : null;
35
+ }
36
+ function copyRenderState(state) {
37
+ if (!state)
38
+ return null;
39
+ return {
40
+ rows: state.rows,
41
+ cols: state.cols,
42
+ cellCount: state.cellCount,
43
+ codepoints: state.codepoints ? new Uint32Array(state.codepoints) : null,
44
+ contentTags: state.contentTags ? new Uint8Array(state.contentTags) : null,
45
+ wide: state.wide ? new Uint8Array(state.wide) : null,
46
+ cellFlags: state.cellFlags ? new Uint16Array(state.cellFlags) : null,
47
+ styleFlags: state.styleFlags ? new Uint16Array(state.styleFlags) : null,
48
+ linkIds: state.linkIds ? new Uint32Array(state.linkIds) : null,
49
+ fgBytes: state.fgBytes ? new Uint8Array(state.fgBytes) : null,
50
+ bgBytes: state.bgBytes ? new Uint8Array(state.bgBytes) : null,
51
+ ulBytes: state.ulBytes ? new Uint8Array(state.ulBytes) : null,
52
+ ulStyle: state.ulStyle ? new Uint8Array(state.ulStyle) : null,
53
+ linkOffsets: state.linkOffsets ? new Uint32Array(state.linkOffsets) : null,
54
+ linkLengths: state.linkLengths ? new Uint32Array(state.linkLengths) : null,
55
+ linkBuffer: state.linkBuffer ? new Uint8Array(state.linkBuffer) : null,
56
+ graphemeOffset: state.graphemeOffset ? new Uint32Array(state.graphemeOffset) : null,
57
+ graphemeLen: state.graphemeLen ? new Uint32Array(state.graphemeLen) : null,
58
+ graphemeBuffer: state.graphemeBuffer ? new Uint32Array(state.graphemeBuffer) : null,
59
+ selectionStart: state.selectionStart ? new Int16Array(state.selectionStart) : null,
60
+ selectionEnd: state.selectionEnd ? new Int16Array(state.selectionEnd) : null,
61
+ cursor: copyCursor(state.cursor)
62
+ };
63
+ }
64
+
65
+ class ResttyHeadlessTerminal {
66
+ wasm;
67
+ wasmHandle;
68
+ replayEnabled;
69
+ replayMaxBytes;
70
+ replayEvents = [];
71
+ replayByteLength = 0;
72
+ replayTruncated = false;
73
+ replayStartCols;
74
+ replayStartRows;
75
+ disposed = false;
76
+ cols;
77
+ rows;
78
+ constructor(wasm, options = {}) {
79
+ this.wasm = wasm;
80
+ this.cols = normalizePositiveInt(options.cols, DEFAULT_COLS);
81
+ this.rows = normalizePositiveInt(options.rows, DEFAULT_ROWS);
82
+ const maxScrollbackBytes = normalizeMaxBytes(options.maxScrollbackBytes, DEFAULT_MAX_SCROLLBACK_BYTES);
83
+ const replayOptions = options.replay === false ? null : options.replay ?? {};
84
+ this.replayEnabled = !!replayOptions;
85
+ this.replayMaxBytes = replayOptions ? normalizeMaxBytes(replayOptions.maxBytes, DEFAULT_REPLAY_MAX_BYTES) : 0;
86
+ if (this.replayMaxBytes <= 0) {
87
+ this.replayEnabled = false;
88
+ }
89
+ this.wasmHandle = this.wasm.create(this.cols, this.rows, maxScrollbackBytes);
90
+ if (!this.wasmHandle) {
91
+ throw new Error("restty headless create failed (restty_create returned 0)");
92
+ }
93
+ this.replayStartCols = this.cols;
94
+ this.replayStartRows = this.rows;
95
+ if (options.pixelWidth !== undefined || options.pixelHeight !== undefined) {
96
+ this.setPixelSize(options.pixelWidth ?? 0, options.pixelHeight ?? 0);
97
+ }
98
+ this.renderUpdate();
99
+ }
100
+ get handle() {
101
+ return this.wasmHandle;
102
+ }
103
+ write(input, options = {}) {
104
+ this.assertUsable();
105
+ const text = decodeInput(input);
106
+ if (!text)
107
+ return;
108
+ if (options.recordReplay !== false) {
109
+ this.appendReplay(text);
110
+ }
111
+ this.wasm.write(this.wasmHandle, text);
112
+ this.renderUpdate();
113
+ }
114
+ writeln(input = "") {
115
+ this.write(`${decodeInput(input)}\r
116
+ `);
117
+ }
118
+ resize(cols, rows) {
119
+ this.applyResize(cols, rows);
120
+ }
121
+ applyResize(cols, rows, options = {}) {
122
+ this.assertUsable();
123
+ const previousCols = this.cols;
124
+ const previousRows = this.rows;
125
+ this.cols = normalizePositiveInt(cols, this.cols);
126
+ this.rows = normalizePositiveInt(rows, this.rows);
127
+ this.wasm.resize(this.wasmHandle, this.cols, this.rows);
128
+ if (options.recordReplay !== false && (this.cols !== previousCols || this.rows !== previousRows)) {
129
+ this.appendReplayResize(this.cols, this.rows);
130
+ }
131
+ this.renderUpdate();
132
+ }
133
+ setPixelSize(widthPx, heightPx) {
134
+ this.assertUsable();
135
+ this.wasm.setPixelSize(this.wasmHandle, Math.max(0, Math.trunc(Number(widthPx) || 0)), Math.max(0, Math.trunc(Number(heightPx) || 0)));
136
+ }
137
+ renderUpdate() {
138
+ this.assertUsable();
139
+ this.wasm.renderUpdate(this.wasmHandle);
140
+ }
141
+ getRenderState() {
142
+ this.assertUsable();
143
+ return this.wasm.getRenderState(this.wasmHandle);
144
+ }
145
+ snapshot() {
146
+ return copyRenderState(this.getRenderState());
147
+ }
148
+ drainOutput() {
149
+ this.assertUsable();
150
+ return this.wasm.drainOutput(this.wasmHandle);
151
+ }
152
+ getKittyKeyboardFlags() {
153
+ this.assertUsable();
154
+ return this.wasm.getKittyKeyboardFlags(this.wasmHandle);
155
+ }
156
+ getKittyPlacements() {
157
+ this.assertUsable();
158
+ return this.wasm.getKittyPlacements(this.wasmHandle);
159
+ }
160
+ scrollViewport(delta) {
161
+ this.assertUsable();
162
+ this.wasm.scrollViewport(this.wasmHandle, Math.trunc(delta));
163
+ this.renderUpdate();
164
+ }
165
+ setSearchQuery(query) {
166
+ this.assertUsable();
167
+ this.wasm.setSearchQuery(this.wasmHandle, query);
168
+ }
169
+ clearSearch() {
170
+ this.assertUsable();
171
+ this.wasm.clearSearch(this.wasmHandle);
172
+ this.renderUpdate();
173
+ }
174
+ stepSearch(budget = 1000) {
175
+ this.assertUsable();
176
+ this.wasm.stepSearch(this.wasmHandle, budget);
177
+ }
178
+ searchNext() {
179
+ this.assertUsable();
180
+ this.wasm.searchNext(this.wasmHandle);
181
+ this.renderUpdate();
182
+ }
183
+ searchPrevious() {
184
+ this.assertUsable();
185
+ this.wasm.searchPrevious(this.wasmHandle);
186
+ this.renderUpdate();
187
+ }
188
+ getSearchStatus() {
189
+ this.assertUsable();
190
+ return this.wasm.getSearchStatus(this.wasmHandle);
191
+ }
192
+ getSearchViewportMatches() {
193
+ this.assertUsable();
194
+ return this.wasm.getSearchViewportMatches(this.wasmHandle);
195
+ }
196
+ createReplay() {
197
+ this.assertUsable();
198
+ const events = this.replayEvents.map((event) => ({ ...event }));
199
+ const data = events.filter((event) => event.type === "write").map((event) => event.data).join("");
200
+ return {
201
+ kind: "restty-headless-replay",
202
+ version: 1,
203
+ initialCols: this.replayStartCols,
204
+ initialRows: this.replayStartRows,
205
+ cols: this.cols,
206
+ rows: this.rows,
207
+ events,
208
+ data,
209
+ byteLength: this.replayByteLength,
210
+ truncated: this.replayTruncated
211
+ };
212
+ }
213
+ applyReplay(replay, options = {}) {
214
+ this.assertUsable();
215
+ if (typeof replay === "string") {
216
+ if (replay) {
217
+ this.write(replay, { recordReplay: false });
218
+ }
219
+ this.replaceReplay(replay, false);
220
+ return;
221
+ }
222
+ const shouldResize = options.resize !== false;
223
+ const events = replay.events?.length ? replay.events : [
224
+ {
225
+ type: "write",
226
+ data: replay.data,
227
+ byteLength: replay.byteLength
228
+ }
229
+ ];
230
+ if (shouldResize) {
231
+ this.applyResize(replay.initialCols ?? replay.cols, replay.initialRows ?? replay.rows, {
232
+ recordReplay: false
233
+ });
234
+ }
235
+ for (const event of events) {
236
+ if (event.type === "resize") {
237
+ if (shouldResize) {
238
+ this.applyResize(event.cols, event.rows, { recordReplay: false });
239
+ }
240
+ continue;
241
+ }
242
+ if (event.data) {
243
+ this.write(event.data, { recordReplay: false });
244
+ }
245
+ }
246
+ if (shouldResize && (this.cols !== replay.cols || this.rows !== replay.rows)) {
247
+ this.applyResize(replay.cols, replay.rows, { recordReplay: false });
248
+ }
249
+ this.replaceReplay(replay);
250
+ }
251
+ clearReplay() {
252
+ this.replayEvents = [];
253
+ this.replayByteLength = 0;
254
+ this.replayTruncated = false;
255
+ this.replayStartCols = this.cols;
256
+ this.replayStartRows = this.rows;
257
+ }
258
+ dispose() {
259
+ if (this.disposed)
260
+ return;
261
+ this.disposed = true;
262
+ if (this.wasmHandle) {
263
+ this.wasm.destroy(this.wasmHandle);
264
+ this.wasmHandle = 0;
265
+ }
266
+ this.clearReplay();
267
+ }
268
+ appendReplay(text) {
269
+ if (!this.replayEnabled || !text)
270
+ return;
271
+ const hardResetIndex = text.lastIndexOf(HARD_RESET_SEQUENCE);
272
+ const replayText = hardResetIndex >= 0 ? text.slice(hardResetIndex) : text;
273
+ if (hardResetIndex >= 0) {
274
+ this.clearReplay();
275
+ }
276
+ const byteLength = textEncoder.encode(replayText).byteLength;
277
+ if (byteLength > this.replayMaxBytes) {
278
+ this.clearReplay();
279
+ this.replayTruncated = true;
280
+ return;
281
+ }
282
+ while (this.replayEvents.length > 0 && this.replayByteLength + byteLength > this.replayMaxBytes) {
283
+ const removed = this.replayEvents.shift();
284
+ if (removed?.type === "write") {
285
+ this.replayByteLength -= removed.byteLength;
286
+ }
287
+ this.replayTruncated = true;
288
+ }
289
+ this.replayEvents.push({ type: "write", data: replayText, byteLength });
290
+ this.replayByteLength += byteLength;
291
+ }
292
+ appendReplayResize(cols, rows) {
293
+ if (!this.replayEnabled)
294
+ return;
295
+ const previous = this.replayEvents.at(-1);
296
+ if (previous?.type === "resize") {
297
+ previous.cols = cols;
298
+ previous.rows = rows;
299
+ return;
300
+ }
301
+ this.replayEvents.push({ type: "resize", cols, rows });
302
+ }
303
+ replaceReplay(replay, truncated = false) {
304
+ if (!this.replayEnabled)
305
+ return;
306
+ if (typeof replay !== "string") {
307
+ const events = replay.events?.length ? replay.events : [
308
+ {
309
+ type: "write",
310
+ data: replay.data,
311
+ byteLength: replay.byteLength
312
+ }
313
+ ];
314
+ this.replayStartCols = replay.initialCols ?? replay.cols;
315
+ this.replayStartRows = replay.initialRows ?? replay.rows;
316
+ this.replayEvents = events.map((event) => ({ ...event }));
317
+ this.replayByteLength = this.replayEvents.reduce((sum, event) => sum + (event.type === "write" ? event.byteLength : 0), 0);
318
+ this.replayTruncated = replay.truncated || this.replayByteLength > this.replayMaxBytes;
319
+ if (this.replayByteLength <= this.replayMaxBytes)
320
+ return;
321
+ this.replayEvents = [];
322
+ this.replayByteLength = 0;
323
+ return;
324
+ }
325
+ this.clearReplay();
326
+ this.replayTruncated = truncated;
327
+ if (!replay)
328
+ return;
329
+ const byteLength = textEncoder.encode(replay).byteLength;
330
+ if (byteLength > this.replayMaxBytes) {
331
+ this.replayTruncated = true;
332
+ return;
333
+ }
334
+ this.replayEvents = [{ type: "write", data: replay, byteLength }];
335
+ this.replayByteLength = byteLength;
336
+ }
337
+ assertUsable() {
338
+ if (this.disposed || !this.wasmHandle) {
339
+ throw new Error("ResttyHeadlessTerminal is disposed");
340
+ }
341
+ }
342
+ }
343
+ async function createHeadlessTerminal(options = {}) {
344
+ const wasm = options.wasm ?? await loadResttyWasm(options.wasmOptions);
345
+ return new ResttyHeadlessTerminal(wasm, options);
346
+ }
347
+ export {
348
+ createHeadlessTerminal,
349
+ ResttyHeadlessTerminal
350
+ };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,11 @@
1
1
  export { RESTTY_PLUGIN_API_VERSION, Restty, ResttyPaneHandle, createRestty, } from "./surface/restty";
2
- export type { ResttyOptions, ResttyPaneApi, ResttyPluginApiRange, ResttyPlugin, ResttyPluginCleanup, ResttyPluginContext, ResttyPluginDisposable, ResttyPluginEvents, ResttyPluginInfo, ResttyPluginRequires, ResttyInputInterceptor, ResttyInputInterceptorPayload, ResttyInterceptorOptions, ResttyLifecycleHook, ResttyLifecycleHookPayload, ResttyPluginLoadResult, ResttyPluginLoadStatus, ResttyPluginManifestEntry, ResttyPluginRegistry, ResttyPluginRegistryEntry, ResttyRenderHook, ResttyRenderHookPayload, ResttyOutputInterceptor, ResttyOutputInterceptorPayload, ResttyRenderStageHandle, } from "./surface/restty";
3
- export type { ResttyManagedPaneSearchUiOptions, ResttyManagedPaneSearchUiStyleOptions, } from "./surface/pane-app-manager";
4
- export type { ResttyPaneSearchUiOpenOptions, ResttyPaneSearchUiCloseOptions, } from "./surface/pane-search-ui";
2
+ export type { ResttyConfig, ResttyServicesConfig, ResttySurfaceConfig, ResttySurfaceEvents, ResttySurfacePane, ResttyPaneApi, ResttyPluginApiRange, ResttyPlugin, ResttyPluginCleanup, ResttyPluginContext, ResttyPluginDisposable, ResttyPluginHostApi, ResttyPluginEvents, ResttyPluginInfo, ResttyPluginRequires, ResttyInputInterceptor, ResttyInputInterceptorPayload, ResttyInterceptorOptions, ResttyLifecycleHook, ResttyLifecycleHookPayload, ResttyPluginLoadResult, ResttyPluginLoadStatus, ResttyPluginManifestEntry, ResttyPluginRegistry, ResttyPluginRegistryEntry, ResttyRenderHook, ResttyRenderHookPayload, ResttyOutputInterceptor, ResttyOutputInterceptorPayload, ResttyRenderStageHandle, } from "./surface/restty";
3
+ export type { ResttyManagedPaneSearchUiOptions, ResttyManagedPaneSearchUiStyleOptions, } from "./surface/panes/managed-pane-types";
4
+ export type { ResttyPaneSearchUiOpenOptions, ResttyPaneSearchUiCloseOptions, } from "./surface/search-ui";
5
5
  export { getBuiltinTheme, getBuiltinThemeSource, isBuiltinThemeName, listBuiltinThemeNames, parseGhosttyTheme, } from "./theme";
6
6
  export type { GhosttyTheme, ResttyBuiltinThemeName } from "./theme";
7
- export type { ResttyFontHintTarget, ResttyFontSource, ResttyUrlFontSource, ResttyBufferFontSource, ResttyLocalFontSource, ResttyFontPreset, ResttyShaderStage, ResttyShaderStageMode, ResttyShaderStageBackend, ResttyShaderStageSource, } from "./runtime/types";
7
+ export type { ResttyFontData, ResttyFontHintTarget, ResttyFontInput, ResttyFontUrlInput, ResttyFontPathInput, ResttyFontBufferInput, ResttyFontFamilyInput, ResttyFontFallbackInput, ResttyFontStyle, ResttyLocalFontMode, ResttyShaderStage, ResttyShaderStageMode, ResttyShaderStageBackend, ResttyShaderStageSource, } from "./runtime/core/models";
8
+ export type { ResttyTerminalConfig, ResttyRuntimeMountConfig, ResttyRuntimeServicesConfig, ResttyRuntimeConfig, } from "./runtime/core/config";
9
+ export type { ResttyRuntimeEvent, ResttyRuntimeLifecycleState } from "./runtime/types";
10
+ export { createWebSocketPtyTransport } from "./pty";
11
+ export type { PtyCallbacks, PtyConnectOptions, PtyResizeMeta, PtyTransport } from "./pty";
@@ -1 +1,2 @@
1
+ export declare function encodeCommandNavigationKeyEvent(event: KeyboardEvent): string;
1
2
  export declare function encodeDefaultKeyEvent(event: KeyboardEvent): string;
@@ -12,6 +12,14 @@ export type MouseControllerOptions = {
12
12
  x: number;
13
13
  y: number;
14
14
  };
15
+ /** Provide cell metrics in CSS pixels for wheel delta accumulation. */
16
+ getWheelCellMetrics?: () => WheelCellMetrics | null;
17
+ };
18
+ export type WheelCellMetrics = {
19
+ cellWidth: number;
20
+ cellHeight: number;
21
+ rows: number;
22
+ cols: number;
15
23
  };
16
24
  /**
17
25
  * Tracks mouse reporting state (mode, format, motion tracking) and encodes
@@ -26,9 +34,12 @@ export declare class MouseController {
26
34
  private button;
27
35
  private flags;
28
36
  private x10Event;
37
+ private pendingWheelX;
38
+ private pendingWheelY;
29
39
  private sendReply;
30
40
  private positionToCell;
31
41
  private positionToPixel?;
42
+ private getWheelCellMetrics?;
32
43
  constructor(options: MouseControllerOptions);
33
44
  setReplySink(fn: (data: string) => void): void;
34
45
  setPositionToCell(fn: (event: MouseEvent | PointerEvent | WheelEvent) => CellPosition): void;
@@ -36,11 +47,13 @@ export declare class MouseController {
36
47
  x: number;
37
48
  y: number;
38
49
  }): void;
50
+ setWheelCellMetricsProvider(fn: () => WheelCellMetrics | null): void;
39
51
  setMode(mode: MouseMode): void;
40
52
  handleModeSeq(seq: string): boolean;
41
53
  isActive(): boolean;
42
54
  getStatus(): MouseStatus;
43
55
  sendMouseEvent(kind: "down" | "up" | "move" | "wheel", event: PointerEvent | WheelEvent): boolean;
56
+ private consumeWheelDelta;
44
57
  private updateFlags;
45
58
  private isX10EventMode;
46
59
  private modifiers;
@@ -95,6 +95,15 @@ export type InputHandlerOptions = {
95
95
  x: number;
96
96
  y: number;
97
97
  };
98
+ /**
99
+ * Provide cell metrics in CSS pixels for wheel delta accumulation.
100
+ */
101
+ getWheelCellMetrics?: () => {
102
+ cellWidth: number;
103
+ cellHeight: number;
104
+ rows: number;
105
+ cols: number;
106
+ } | null;
98
107
  /**
99
108
  * Provide default colors for OSC 10/11/12 queries (RGB 0-255).
100
109
  */
@@ -122,7 +131,7 @@ export type InputHandlerOptions = {
122
131
  getKittyKeyboardFlags?: () => number;
123
132
  };
124
133
  /**
125
- * Exposed mouse status for UI debugging.
134
+ * Exposed mouse status for UI displays.
126
135
  */
127
136
  export type MouseStatus = {
128
137
  mode: MouseMode;
@@ -0,0 +1,4 @@
1
+ export { createResttyRuntime, createResttyRuntimeSession, getDefaultResttyRuntimeSession, } from "../runtime/create-runtime";
2
+ export type { ResttyRuntimeCallbacks, ResttyFontData, ResttyFontInput, ResttyFontUrlInput, ResttyFontPathInput, ResttyFontBufferInput, ResttyFontFamilyInput, ResttyFontFallbackInput, ResttyFontStyle, ResttyLocalFontMode, ResttyFontHintTarget, ResttyTouchSelectionMode, ResttyWasmLogListener, ResttyRuntimeSession, ResttyRuntimeInputPayload, ResttyRuntimeEvent, ResttyRuntimeLifecycleState, ResttyRuntimeConfig, ResttyRuntime, } from "../runtime/create-runtime";
3
+ export type { ResttyShaderStage, ResttyShaderStageMode, ResttyShaderStageBackend, ResttyShaderStageSource, } from "../runtime/core/models";
4
+ export type { ResttyTerminalConfig, ResttyRuntimeMountConfig, ResttyRuntimeServicesConfig, } from "../runtime/core/config";
@@ -0,0 +1,12 @@
1
+ import"../chunk-30px21q2.js";
2
+ import {
3
+ createResttyRuntime,
4
+ createResttyRuntimeSession,
5
+ getDefaultResttyRuntimeSession
6
+ } from "../chunk-db9dt7pr.js";
7
+ import"../chunk-s26trws6.js";
8
+ export {
9
+ getDefaultResttyRuntimeSession,
10
+ createResttyRuntimeSession,
11
+ createResttyRuntime
12
+ };
@@ -0,0 +1,6 @@
1
+ export { createResttyPaneManager } from "../surface/panes/manager";
2
+ export { createDefaultResttyPaneContextMenuItems, getResttyShortcutModifierLabel, } from "../surface/panes/default-context-menu-items";
3
+ export type { ResttyPaneSplitDirection, ResttyPaneContextMenuItem, ResttyPaneDefinition, ResttyPaneStyleOptions, ResttyPaneStylesOptions, ResttyPaneShortcutsOptions, ResttyPaneContextMenuOptions, CreateResttyPaneManagerOptions, ResttyPaneManager, ResttyPaneWithRuntime, ResttyPaneWithRuntimeActions, ResttyPaneWithManagedRuntime, CreateDefaultResttyPaneContextMenuItemsOptions, } from "../surface/panes/types";
4
+ export { createResttyManagedPaneManager } from "../surface/panes/managed-pane-manager";
5
+ export type { CreateResttyManagedPaneManagerOptions, ResttyManagedPaneManager, ResttyDefaultPaneContextMenuOptions, ResttyManagedPane, ResttyPaneDomDefaults, ResttyManagedPaneStyleOptions, ResttyManagedPaneStylesOptions, ResttyManagedPaneSearchUiOptions, ResttyManagedPaneSearchUiStyleOptions, ResttyPaneRuntimeContext, ResttyTerminalConfigInput, ResttyRuntimeServicesConfigInput, } from "../surface/panes/managed-pane-types";
6
+ export type { ResttyPaneSearchUiOpenOptions, ResttyPaneSearchUiCloseOptions, } from "../surface/search-ui";
@@ -0,0 +1,15 @@
1
+ import"../chunk-xykzfd81.js";
2
+ import {
3
+ createDefaultResttyPaneContextMenuItems,
4
+ createResttyManagedPaneManager,
5
+ createResttyPaneManager,
6
+ getResttyShortcutModifierLabel
7
+ } from "../chunk-y6hfk43b.js";
8
+ import"../chunk-db9dt7pr.js";
9
+ import"../chunk-s26trws6.js";
10
+ export {
11
+ getResttyShortcutModifierLabel,
12
+ createResttyPaneManager,
13
+ createResttyManagedPaneManager,
14
+ createDefaultResttyPaneContextMenuItems
15
+ };
@@ -12,8 +12,5 @@ export { loadResttyWasm, ResttyWasm } from "./wasm";
12
12
  export type { WasmAbi, WasmAbiKind, CursorInfo, RenderState, ResttyWasmExports, ResttyWasmOptions, } from "./wasm";
13
13
  export { parseGhosttyTheme, parseGhosttyColor, colorToFloats, colorToRgbU32, listBuiltinThemeNames, isBuiltinThemeName, getBuiltinThemeSource, getBuiltinTheme, } from "./theme";
14
14
  export type { GhosttyTheme, ThemeColor, ResttyBuiltinThemeName } from "./theme";
15
- export { Restty } from "./surface/restty";
16
- export type { ResttyOptions } from "./surface/restty";
17
- export type { ResttyManagedAppPane, ResttyPaneDomDefaults, ResttyManagedPaneStyleOptions, ResttyManagedPaneStylesOptions, ResttyManagedPaneSearchUiOptions, ResttyManagedPaneSearchUiStyleOptions, ResttyPaneAppOptionsInput, } from "./surface/pane-app-manager";
18
- export type { ResttyPaneSearchUiOpenOptions, ResttyPaneSearchUiCloseOptions, } from "./surface/pane-search-ui";
19
- export type { ResttyFontHintTarget, ResttyFontSource, ResttyUrlFontSource, ResttyBufferFontSource, ResttyLocalFontSource, ResttyShaderStage, ResttyShaderStageMode, ResttyShaderStageBackend, ResttyShaderStageSource, } from "./runtime/types";
15
+ export * from "./internal/runtime";
16
+ export * from "./internal/surface";