restty 0.1.34 → 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.
- package/README.md +49 -318
- package/dist/chunk-30px21q2.js +0 -0
- package/dist/chunk-db9dt7pr.js +55226 -0
- package/dist/chunk-s26trws6.js +9136 -0
- package/dist/chunk-wdme6j9c.js +1776 -0
- package/dist/chunk-xykzfd81.js +0 -0
- package/dist/chunk-y6hfk43b.js +1690 -0
- package/dist/fonts/local-font-access.types.d.ts +19 -0
- package/dist/fonts/manager/entries.d.ts +7 -0
- package/dist/headless.d.ts +102 -0
- package/dist/headless.js +350 -0
- package/dist/ime/ime.d.ts +4 -4
- package/dist/index.d.ts +8 -2
- package/dist/input/keymap/default-mapping.d.ts +1 -0
- package/dist/input/mouse.d.ts +13 -0
- package/dist/input/types.d.ts +10 -1
- package/dist/internal/runtime.d.ts +4 -0
- package/dist/internal/runtime.js +12 -0
- package/dist/internal/surface.d.ts +6 -0
- package/dist/internal/surface.js +15 -0
- package/dist/internal.d.ts +2 -4
- package/dist/internal.js +23 -5
- package/dist/restty.esm.js +10949 -0
- package/dist/restty.js +8 -2
- package/dist/runtime/core/api.d.ts +112 -0
- package/dist/runtime/core/config.d.ts +133 -0
- package/dist/runtime/core/lifecycle.d.ts +1 -0
- package/dist/runtime/core/models.d.ts +124 -0
- package/dist/runtime/core/resources.d.ts +50 -0
- package/dist/runtime/core/runtime-events.d.ts +28 -0
- package/dist/runtime/core/session.d.ts +9 -0
- package/dist/runtime/{codepoint-utils.d.ts → create-runtime/codepoint-utils.d.ts} +1 -1
- package/dist/runtime/create-runtime/{color-glyph-atlas.d.ts → font-runtime/color-glyph-atlas.d.ts} +2 -2
- package/dist/runtime/create-runtime/font-runtime/grid.d.ts +6 -0
- package/dist/runtime/create-runtime/font-runtime/grid.types.d.ts +22 -0
- package/dist/runtime/create-runtime/font-runtime/index.d.ts +15 -0
- package/dist/runtime/create-runtime/font-runtime/text.d.ts +12 -0
- package/dist/runtime/create-runtime/font-runtime/text.types.d.ts +10 -0
- package/dist/runtime/create-runtime/{font-runtime-helpers.types.d.ts → font-runtime/types.d.ts} +6 -8
- package/dist/runtime/create-runtime/font-runtime/webgpu-atlas.d.ts +7 -0
- package/dist/runtime/create-runtime/font-runtime/webgpu-atlas.types.d.ts +23 -0
- package/dist/runtime/create-runtime/highlight-terminal-color-utils.d.ts +6 -0
- package/dist/runtime/create-runtime/highlight-terminal-color-utils.types.d.ts +9 -0
- package/dist/runtime/create-runtime/input-hooks.d.ts +2 -12
- package/dist/runtime/create-runtime/input-hooks.types.d.ts +10 -0
- package/dist/runtime/create-runtime/interaction-runtime/bind-ime-events.d.ts +2 -1
- package/dist/runtime/create-runtime/interaction-runtime/bind-pointer-aux-handlers.d.ts +2 -3
- package/dist/runtime/create-runtime/interaction-runtime/bind-pointer-events.d.ts +5 -10
- package/dist/runtime/create-runtime/interaction-runtime/bind-pointer-up-handler.d.ts +3 -2
- package/dist/runtime/create-runtime/interaction-runtime/desktop-word-selection.d.ts +8 -0
- package/dist/runtime/create-runtime/{interaction-runtime.d.ts → interaction-runtime/index.d.ts} +3 -2
- package/dist/runtime/create-runtime/interaction-runtime/kitty-image-cache.d.ts +2 -17
- package/dist/runtime/create-runtime/interaction-runtime/kitty-image-cache.types.d.ts +17 -0
- package/dist/runtime/create-runtime/interaction-runtime/{types.d.ts → runtime.types.d.ts} +4 -50
- package/dist/runtime/create-runtime/interaction-runtime/scrollbar-runtime.d.ts +1 -29
- package/dist/runtime/create-runtime/interaction-runtime/scrollbar-runtime.types.d.ts +23 -0
- package/dist/runtime/create-runtime/interaction-runtime/state.types.d.ts +47 -0
- package/dist/runtime/create-runtime/kitty-render-runtime.d.ts +2 -36
- package/dist/runtime/create-runtime/kitty-render-runtime.types.d.ts +33 -0
- package/dist/runtime/create-runtime/{lifecycle-theme-size-canvas.d.ts → lifecycle-theme-size/canvas.d.ts} +1 -1
- package/dist/runtime/create-runtime/{lifecycle-theme-size.d.ts → lifecycle-theme-size/index.d.ts} +3 -3
- package/dist/runtime/create-runtime/lifecycle-theme-size/theme.d.ts +6 -0
- package/dist/runtime/create-runtime/{lifecycle-theme-size.types.d.ts → lifecycle-theme-size/types.d.ts} +13 -7
- package/dist/runtime/create-runtime/ligature-runs.d.ts +52 -0
- package/dist/runtime/{max-scrollback.d.ts → create-runtime/max-scrollback.d.ts} +2 -5
- package/dist/runtime/create-runtime/max-scrollback.types.d.ts +4 -0
- package/dist/runtime/create-runtime/native-scrollbar-host.d.ts +2 -0
- package/dist/runtime/create-runtime/native-scrollbar-host.types.d.ts +13 -0
- package/dist/runtime/create-runtime/overlay-scrollbar.d.ts +6 -0
- package/dist/runtime/create-runtime/overlay-scrollbar.types.d.ts +12 -0
- package/dist/runtime/create-runtime/pty-input-runtime.d.ts +2 -46
- package/dist/runtime/create-runtime/pty-input-runtime.types.d.ts +41 -0
- package/dist/runtime/{render-color-utils.d.ts → create-runtime/render-color-utils.d.ts} +1 -1
- package/dist/runtime/{render-stage-runtime.d.ts → create-runtime/render-stage-runtime.d.ts} +2 -2
- package/dist/runtime/{create-app-types.d.ts → create-runtime/render-stage-runtime.types.d.ts} +1 -29
- package/dist/runtime/create-runtime/render-tick-webgl-overlays.d.ts +1 -1
- package/dist/runtime/create-runtime/render-tick-webgl-scene.d.ts +1 -1
- package/dist/runtime/create-runtime/render-tick-webgl.types.d.ts +2 -5
- package/dist/runtime/create-runtime/render-tick-webgpu-cell-pass.d.ts +1 -1
- package/dist/runtime/create-runtime/render-tick-webgpu.types.d.ts +15 -11
- package/dist/runtime/create-runtime/runtime-controller.api.types.d.ts +96 -0
- package/dist/runtime/create-runtime/runtime-controller.clipboard.d.ts +10 -0
- package/dist/runtime/create-runtime/runtime-controller.d.ts +3 -0
- package/dist/runtime/create-runtime/runtime-controller.input.d.ts +24 -0
- package/dist/runtime/create-runtime/runtime-controller.keyboard.d.ts +19 -0
- package/dist/runtime/create-runtime/runtime-controller.lifecycle.d.ts +50 -0
- package/dist/runtime/create-runtime/runtime-controller.public-api.capabilities.d.ts +57 -0
- package/dist/runtime/create-runtime/runtime-controller.public-api.d.ts +28 -0
- package/dist/runtime/create-runtime/runtime-controller.render-loop.d.ts +20 -0
- package/dist/runtime/create-runtime/runtime-controller.state.types.d.ts +24 -0
- package/dist/runtime/create-runtime/runtime-reporting.d.ts +3 -21
- package/dist/runtime/create-runtime/runtime-reporting.types.d.ts +18 -0
- package/dist/runtime/{create-app-symbols.d.ts → create-runtime/runtime-symbols.d.ts} +2 -2
- package/dist/runtime/create-runtime/search-highlight-utils.d.ts +21 -0
- package/dist/runtime/create-runtime/search-runtime/index.d.ts +2 -0
- package/dist/runtime/create-runtime/search-runtime/types.d.ts +25 -0
- package/dist/runtime/create-runtime/shader-stage-runtime.d.ts +2 -29
- package/dist/runtime/create-runtime/shader-stage-runtime.types.d.ts +27 -0
- package/dist/runtime/{text-decoration.d.ts → create-runtime/text-decoration.d.ts} +1 -1
- package/dist/runtime/create-runtime.d.ts +7 -7
- package/dist/runtime/font-atlas-utils/glyph-atlas-builder.d.ts +1 -1
- package/dist/runtime/font-atlas-utils/nerd-metrics-utils.d.ts +1 -1
- package/dist/runtime/{atlas-builder.d.ts → fonts/atlas-builder.d.ts} +1 -1
- package/dist/runtime/{font-resource-store.d.ts → fonts/font-resource-store.d.ts} +3 -2
- package/dist/runtime/fonts/font-sources.d.ts +4 -0
- package/dist/runtime/shader-stages.d.ts +1 -1
- package/dist/runtime/types.d.ts +6 -365
- package/dist/surface/{panes-context-menu.d.ts → panes/context-menu.d.ts} +1 -1
- package/dist/surface/panes/default-context-menu-items.d.ts +2 -2
- package/dist/surface/panes/layout.d.ts +1 -1
- package/dist/surface/panes/managed-pane-create.d.ts +3 -0
- package/dist/surface/panes/managed-pane-create.types.d.ts +17 -0
- package/dist/surface/panes/managed-pane-dom.d.ts +13 -0
- package/dist/surface/panes/managed-pane-manager.d.ts +6 -0
- package/dist/surface/panes/managed-pane-options.d.ts +6 -0
- package/dist/surface/panes/managed-pane-options.types.d.ts +7 -0
- package/dist/surface/panes/managed-pane-runtime-config.d.ts +3 -0
- package/dist/surface/panes/managed-pane-runtime-config.types.d.ts +9 -0
- package/dist/surface/panes/managed-pane-runtime.d.ts +3 -0
- package/dist/surface/panes/managed-pane-runtime.types.d.ts +10 -0
- package/dist/surface/panes/managed-pane-search-ui.d.ts +9 -0
- package/dist/surface/panes/managed-pane-types.d.ts +102 -0
- package/dist/surface/panes/manager.d.ts +1 -1
- package/dist/surface/panes/pane-interactions.d.ts +2 -2
- package/dist/surface/{panes-styles.d.ts → panes/styles.d.ts} +1 -1
- package/dist/surface/{panes-types.d.ts → panes/types.d.ts} +48 -7
- package/dist/surface/panes/window-events.d.ts +1 -1
- package/dist/surface/{restty-plugin-types.d.ts → plugins/context.types.d.ts} +32 -88
- package/dist/surface/{restty/plugin-dispatcher.d.ts → plugins/dispatcher.d.ts} +4 -13
- package/dist/surface/plugins/dispatcher.types.d.ts +6 -0
- package/dist/surface/{restty/plugin-ops.d.ts → plugins/host.d.ts} +4 -3
- package/dist/surface/plugins/runtime.d.ts +18 -0
- package/dist/surface/plugins/runtime.types.d.ts +47 -0
- package/dist/surface/plugins/types.d.ts +83 -0
- package/dist/surface/restty/active-pane-api.d.ts +34 -16
- package/dist/surface/restty/assembly.d.ts +23 -0
- package/dist/surface/restty/bootstrap.d.ts +21 -0
- package/dist/surface/restty/config.d.ts +46 -0
- package/dist/surface/restty/controller.d.ts +45 -0
- package/dist/surface/restty/events.d.ts +14 -0
- package/dist/surface/restty/manager-options.d.ts +4 -23
- package/dist/surface/restty/manager-options.types.d.ts +32 -0
- package/dist/surface/restty/pane-command-ops.d.ts +37 -0
- package/dist/surface/restty/pane-handle-ops.d.ts +24 -0
- package/dist/surface/restty/pane-handle.d.ts +107 -0
- package/dist/surface/restty/pane-lookup.d.ts +22 -0
- package/dist/surface/restty/pane-manager-assembly.d.ts +18 -0
- package/dist/surface/restty/pane-ops.d.ts +3 -42
- package/dist/surface/restty/pane-style-ops.d.ts +6 -0
- package/dist/surface/restty/plugin-surface.d.ts +5 -0
- package/dist/surface/restty/shader-ops.d.ts +6 -5
- package/dist/surface/restty.d.ts +30 -49
- package/dist/surface/search-ui/controller.d.ts +2 -0
- package/dist/surface/search-ui/index.d.ts +2 -0
- package/dist/surface/search-ui/styles.d.ts +5 -0
- package/dist/surface/search-ui/types.d.ts +96 -0
- package/dist/theme/ghostty.d.ts +13 -2
- package/dist/wasm/embedded.d.ts +1 -1
- package/dist/wasm/index.d.ts +1 -1
- package/dist/wasm/runtime/restty-wasm.d.ts +15 -1
- package/dist/wasm/runtime/types.d.ts +24 -6
- package/dist/xterm/compat-services.d.ts +2 -0
- package/dist/xterm.d.ts +4 -3
- package/dist/xterm.js +14 -8
- package/package.json +59 -24
- package/dist/chunk-meqn8xtd.js +0 -66867
- package/dist/runtime/create-runtime/debug-tools/create-dump-glyph-render.d.ts +0 -2
- package/dist/runtime/create-runtime/debug-tools/diagnose-codepoint.d.ts +0 -2
- package/dist/runtime/create-runtime/debug-tools/dump-atlas-for-codepoint.d.ts +0 -2
- package/dist/runtime/create-runtime/debug-tools/read-texture-to-image-data.d.ts +0 -1
- package/dist/runtime/create-runtime/debug-tools/setup-debug-expose.d.ts +0 -2
- package/dist/runtime/create-runtime/debug-tools/types.d.ts +0 -63
- package/dist/runtime/create-runtime/debug-tools.d.ts +0 -6
- package/dist/runtime/create-runtime/font-runtime-grid-helpers.d.ts +0 -30
- package/dist/runtime/create-runtime/font-runtime-helpers.d.ts +0 -15
- package/dist/runtime/create-runtime/font-runtime-text-helpers.d.ts +0 -21
- package/dist/runtime/create-runtime/font-runtime-webgpu-atlas.d.ts +0 -29
- package/dist/runtime/create-runtime/lifecycle-theme-size-theme.d.ts +0 -6
- package/dist/runtime/create-runtime/runtime-app-api.d.ts +0 -105
- package/dist/runtime/create-runtime/runtime-logger.d.ts +0 -17
- package/dist/runtime/font-sources.d.ts +0 -5
- package/dist/runtime/overlay-scrollbar.d.ts +0 -24
- package/dist/runtime/pty-output-buffer.d.ts +0 -12
- package/dist/runtime/session.d.ts +0 -9
- package/dist/surface/app-factory.d.ts +0 -3
- package/dist/surface/pane-app-manager.d.ts +0 -89
- package/dist/surface/restty-pane-handle.d.ts +0 -70
- package/dist/surface/restty-plugin-runtime.d.ts +0 -57
- package/dist/xterm/app-options.d.ts +0 -2
- /package/dist/runtime/create-runtime/{atlas-debug-utils.d.ts → atlas-bitmap-utils.d.ts} +0 -0
- /package/dist/runtime/{clipboard-paste.d.ts → create-runtime/clipboard-paste.d.ts} +0 -0
- /package/dist/runtime/{render-stage-shaders.d.ts → create-runtime/render-stage-shaders.d.ts} +0 -0
- /package/dist/runtime/{create-app-io-utils.d.ts → create-runtime/runtime-io-utils.d.ts} +0 -0
- /package/dist/surface/{restty-plugin-utils.d.ts → plugins/utils.d.ts} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function readTextureToImageData(device: GPUDevice, texture: GPUTexture, width: number, height: number, origin?: GPUOrigin3D): Promise<ImageData>;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import type { fontAdvanceUnits as fontAdvanceUnitsFn, fontMaxCellSpan as fontMaxCellSpanFn, fontScaleOverride as fontScaleOverrideFn, FontEntry, FontManagerState, NerdConstraint, isColorEmojiFont as isColorEmojiFontFn, isNerdSymbolCodepoint as isNerdSymbolCodepointFn, isSymbolFont as isSymbolFontFn } from "../../../fonts";
|
|
2
|
-
import type { clamp as clampFn, fontHeightUnits as fontHeightUnitsFn } from "../../../grid";
|
|
3
|
-
import type { WebGLState, WebGPUState } from "../../../renderer";
|
|
4
|
-
import type { GlyphConstraintMeta, AtlasConstraintContext } from "../../atlas-builder";
|
|
5
|
-
import type { NerdMetrics } from "../render-tick-webgpu.types";
|
|
6
|
-
export type GridState = {
|
|
7
|
-
cols: number;
|
|
8
|
-
rows: number;
|
|
9
|
-
cellW: number;
|
|
10
|
-
cellH: number;
|
|
11
|
-
fontSizePx: number;
|
|
12
|
-
yPad: number;
|
|
13
|
-
};
|
|
14
|
-
export type FontConfig = {
|
|
15
|
-
sizePx: number;
|
|
16
|
-
};
|
|
17
|
-
export type ShapeClusterResult = {
|
|
18
|
-
glyphs: Array<{
|
|
19
|
-
glyphId: number;
|
|
20
|
-
xAdvance: number;
|
|
21
|
-
xOffset: number;
|
|
22
|
-
yOffset: number;
|
|
23
|
-
}>;
|
|
24
|
-
advance: number;
|
|
25
|
-
};
|
|
26
|
-
export type BuildNerdMetricsFn = (cellW: number, cellH: number, lineHeight: number, font: FontEntry["font"] | null | undefined, primaryScale: number, nerdIconScale: number) => NerdMetrics;
|
|
27
|
-
export type EnsureAtlasForFontFn = (device: GPUDevice, state: WebGPUState, entry: FontEntry, neededGlyphIds: Set<number>, fontSizePx: number, fontIndex: number, atlasScale: number, glyphMeta?: Map<number, GlyphConstraintMeta>, constraintContext?: AtlasConstraintContext | null) => boolean;
|
|
28
|
-
export type CreateRuntimeDebugToolsOptions = {
|
|
29
|
-
debugExpose: boolean;
|
|
30
|
-
getWindow: () => (Window & typeof globalThis) | undefined;
|
|
31
|
-
getActiveState: () => WebGPUState | WebGLState | null;
|
|
32
|
-
getCanvas: () => HTMLCanvasElement;
|
|
33
|
-
atlasCanvas: HTMLCanvasElement | null;
|
|
34
|
-
atlasInfoEl: HTMLElement | null;
|
|
35
|
-
fontState: FontManagerState;
|
|
36
|
-
gridState: GridState;
|
|
37
|
-
fontConfig: FontConfig;
|
|
38
|
-
pickFontIndexForText: (text: string, expectedSpan?: number) => number;
|
|
39
|
-
ensureAtlasForFont: EnsureAtlasForFontFn;
|
|
40
|
-
formatCodepoint: (cp: number) => string;
|
|
41
|
-
isSymbolFont: typeof isSymbolFontFn;
|
|
42
|
-
isNerdSymbolCodepoint: typeof isNerdSymbolCodepointFn;
|
|
43
|
-
isSymbolCp: (cp: number) => boolean;
|
|
44
|
-
fontHasGlyph: (font: FontEntry["font"], ch: string) => boolean;
|
|
45
|
-
shapeClusterWithFont: (entry: FontEntry, text: string) => ShapeClusterResult;
|
|
46
|
-
getNerdConstraint: (cp: number) => NerdConstraint | null;
|
|
47
|
-
fontHeightUnits: typeof fontHeightUnitsFn;
|
|
48
|
-
fontScaleOverride: typeof fontScaleOverrideFn;
|
|
49
|
-
fontScaleOverrides: Array<{
|
|
50
|
-
match: RegExp;
|
|
51
|
-
scale: number;
|
|
52
|
-
}>;
|
|
53
|
-
fontAdvanceUnits: typeof fontAdvanceUnitsFn;
|
|
54
|
-
fontMaxCellSpan: typeof fontMaxCellSpanFn;
|
|
55
|
-
clamp: typeof clampFn;
|
|
56
|
-
buildNerdMetrics: BuildNerdMetricsFn;
|
|
57
|
-
nerdIconScale: number;
|
|
58
|
-
isColorEmojiFont: typeof isColorEmojiFontFn;
|
|
59
|
-
atlasPadding: number;
|
|
60
|
-
symbolAtlasPadding: number;
|
|
61
|
-
pixelModeGray: number;
|
|
62
|
-
pixelModeRgba: number;
|
|
63
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { CreateRuntimeDebugToolsOptions } from "./debug-tools/types";
|
|
2
|
-
export type { CreateRuntimeDebugToolsOptions } from "./debug-tools/types";
|
|
3
|
-
export declare function createRuntimeDebugTools(options: CreateRuntimeDebugToolsOptions): {
|
|
4
|
-
dumpAtlasForCodepoint: (cp: number) => void;
|
|
5
|
-
setupDebugExpose: () => void;
|
|
6
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { type FontEntry, type 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 { ResttyAppCallbacks } from "../types";
|
|
6
|
-
import type { CellMetrics, FontConfigRef, GridStateRef } from "./font-runtime-helpers.types";
|
|
7
|
-
type CreateFontRuntimeGridHelpersOptions = {
|
|
8
|
-
fontState: FontManagerState;
|
|
9
|
-
fontConfig: FontConfigRef;
|
|
10
|
-
gridState: GridStateRef;
|
|
11
|
-
callbacks?: ResttyAppCallbacks;
|
|
12
|
-
gridEl: HTMLElement | null;
|
|
13
|
-
cellEl: HTMLElement | null;
|
|
14
|
-
getCanvas: () => HTMLCanvasElement;
|
|
15
|
-
getCurrentDpr: () => number;
|
|
16
|
-
getActiveState: () => WebGPUState | WebGLState | null;
|
|
17
|
-
getWasmReady: () => boolean;
|
|
18
|
-
getWasm: () => ResttyWasm | null;
|
|
19
|
-
getWasmHandle: () => number;
|
|
20
|
-
ptyTransport: PtyTransport;
|
|
21
|
-
setNeedsRender: () => void;
|
|
22
|
-
shapeClusterWithFont: (entry: FontEntry, text: string) => {
|
|
23
|
-
advance: number;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
export declare function createFontRuntimeGridHelpers(options: CreateFontRuntimeGridHelpersOptions): {
|
|
27
|
-
computeCellMetrics: () => CellMetrics | null;
|
|
28
|
-
updateGrid: () => void;
|
|
29
|
-
};
|
|
30
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { CreateRuntimeFontRuntimeHelpersOptions } from "./font-runtime-helpers.types";
|
|
2
|
-
export type { CreateRuntimeFontRuntimeHelpersOptions } from "./font-runtime-helpers.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("../atlas-builder").GlyphConstraintMeta>, constraintContext?: import("../atlas-builder").AtlasConstraintContext | null) => boolean;
|
|
5
|
-
computeCellMetrics: () => import("./font-runtime-helpers.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
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { type Font, type FontEntry, type FontManagerState } from "../../fonts";
|
|
2
|
-
import type { GlyphBufferToShapedGlyphsFn, ShapeFn, UnicodeBufferCtor } from "./font-runtime-helpers.types";
|
|
3
|
-
type CreateFontRuntimeTextHelpersOptions = {
|
|
4
|
-
fontState: FontManagerState;
|
|
5
|
-
glyphShapeCacheLimit: number;
|
|
6
|
-
fontPickCacheLimit: number;
|
|
7
|
-
UnicodeBuffer: UnicodeBufferCtor;
|
|
8
|
-
shape: ShapeFn;
|
|
9
|
-
glyphBufferToShapedGlyphs: GlyphBufferToShapedGlyphsFn;
|
|
10
|
-
};
|
|
11
|
-
export declare function createFontRuntimeTextHelpers(options: CreateFontRuntimeTextHelpersOptions): {
|
|
12
|
-
shapeClusterWithFont: (entry: FontEntry, text: string) => import("../../fonts").ShapedCluster;
|
|
13
|
-
noteColorGlyphText: (entry: FontEntry, text: string, shaped: {
|
|
14
|
-
glyphs: Array<{
|
|
15
|
-
glyphId: number;
|
|
16
|
-
}>;
|
|
17
|
-
}) => void;
|
|
18
|
-
fontHasGlyph: (font: Font, ch: string) => boolean;
|
|
19
|
-
pickFontIndexForText: (text: string, expectedSpan?: number, stylePreference?: string) => number;
|
|
20
|
-
};
|
|
21
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { type FontEntry, type FontManagerState } from "../../fonts";
|
|
2
|
-
import type { WebGPUState } from "../../renderer";
|
|
3
|
-
import { type AtlasConstraintContext, type GlyphConstraintMeta } from "../atlas-builder";
|
|
4
|
-
import type { ResttyFontHintTarget } from "../types";
|
|
5
|
-
import type { AtlasBitmapToRGBA, BuildAtlasFn, BuildColorEmojiAtlasWithCanvas, PadAtlasRGBAFn, RasterizeGlyphFn, RasterizeGlyphWithTransformFn, ResolveGlyphPixelMode } from "./font-runtime-helpers.types";
|
|
6
|
-
type CreateRuntimeWebGPUAtlasHelpersOptions = {
|
|
7
|
-
fontState: FontManagerState;
|
|
8
|
-
getFontHinting: () => boolean;
|
|
9
|
-
getFontHintTarget: () => ResttyFontHintTarget;
|
|
10
|
-
fontScaleOverrides: Array<{
|
|
11
|
-
match: RegExp;
|
|
12
|
-
scale: number;
|
|
13
|
-
}>;
|
|
14
|
-
resolveGlyphPixelMode: ResolveGlyphPixelMode;
|
|
15
|
-
atlasBitmapToRGBA: AtlasBitmapToRGBA;
|
|
16
|
-
padAtlasRGBA: PadAtlasRGBAFn;
|
|
17
|
-
buildAtlas: BuildAtlasFn;
|
|
18
|
-
buildColorEmojiAtlasWithCanvas: BuildColorEmojiAtlasWithCanvas;
|
|
19
|
-
rasterizeGlyph: RasterizeGlyphFn;
|
|
20
|
-
rasterizeGlyphWithTransform: RasterizeGlyphWithTransformFn;
|
|
21
|
-
pixelModeRgbaValue: number;
|
|
22
|
-
atlasPadding: number;
|
|
23
|
-
symbolAtlasPadding: number;
|
|
24
|
-
symbolAtlasMaxSize: number;
|
|
25
|
-
};
|
|
26
|
-
export declare function createRuntimeWebGPUAtlasHelpers(options: CreateRuntimeWebGPUAtlasHelpersOptions): {
|
|
27
|
-
ensureAtlasForFont: (device: GPUDevice, state: WebGPUState, entry: FontEntry, neededGlyphIds: Set<number>, fontSizePx: number, fontIndex: number, atlasScale: number, glyphMeta?: Map<number, GlyphConstraintMeta>, constraintContext?: AtlasConstraintContext | null) => boolean;
|
|
28
|
-
};
|
|
29
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { type GhosttyTheme } from "../../theme";
|
|
2
|
-
import type { LifecycleThemeSizeDeps } from "./lifecycle-theme-size.types";
|
|
3
|
-
export declare function createLifecycleThemeHandlers(deps: LifecycleThemeSizeDeps): {
|
|
4
|
-
applyTheme: (theme: GhosttyTheme | null | undefined, sourceLabel?: string) => void;
|
|
5
|
-
resetTheme: () => void;
|
|
6
|
-
};
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import type { InputHandler } from "../../input";
|
|
2
|
-
import { type WebGPUState, type WebGLState } from "../../renderer";
|
|
3
|
-
import type { PtyTransport } from "../../pty";
|
|
4
|
-
import { type GhosttyTheme } from "../../theme";
|
|
5
|
-
import type { ResttyWasm, ResttyWasmExports } from "../../wasm";
|
|
6
|
-
import type { ResttyApp, ResttyAppCallbacks, ResttyAppSession } from "../types";
|
|
7
|
-
import type { PtyInputRuntime } from "./pty-input-runtime";
|
|
8
|
-
import type { RuntimeInteraction } from "./interaction-runtime";
|
|
9
|
-
export type RuntimeAppApiSharedState = {
|
|
10
|
-
wasm: ResttyWasm | null;
|
|
11
|
-
wasmExports: ResttyWasmExports | null;
|
|
12
|
-
wasmHandle: number;
|
|
13
|
-
wasmReady: boolean;
|
|
14
|
-
activeState: WebGPUState | WebGLState | null;
|
|
15
|
-
needsRender: boolean;
|
|
16
|
-
lastRenderTime: number;
|
|
17
|
-
currentContextType: "webgpu" | "webgl2" | null;
|
|
18
|
-
isFocused: boolean;
|
|
19
|
-
lastKeydownSeq: string;
|
|
20
|
-
lastKeydownSeqAt: number;
|
|
21
|
-
};
|
|
22
|
-
type PreferredRenderer = "auto" | "webgpu" | "webgl2";
|
|
23
|
-
type RuntimeSendInput = (text: string, source?: string, options?: {
|
|
24
|
-
skipHooks?: boolean;
|
|
25
|
-
}) => void;
|
|
26
|
-
type RuntimePublicApiOptions = {
|
|
27
|
-
setFontSize: ResttyApp["setFontSize"];
|
|
28
|
-
setFontHinting: ResttyApp["setFontHinting"];
|
|
29
|
-
setFontHintTarget: ResttyApp["setFontHintTarget"];
|
|
30
|
-
setFontSources: ResttyApp["setFontSources"];
|
|
31
|
-
resetTheme: ResttyApp["resetTheme"];
|
|
32
|
-
dumpAtlasForCodepoint: ResttyApp["dumpAtlasForCodepoint"];
|
|
33
|
-
resize: ResttyApp["resize"];
|
|
34
|
-
focus: ResttyApp["focus"];
|
|
35
|
-
blur: ResttyApp["blur"];
|
|
36
|
-
updateSize: ResttyApp["updateSize"];
|
|
37
|
-
setShaderStages: ResttyApp["setShaderStages"];
|
|
38
|
-
getShaderStages: ResttyApp["getShaderStages"];
|
|
39
|
-
};
|
|
40
|
-
export type RuntimeAppApiRuntime = {
|
|
41
|
-
sendInput: RuntimeSendInput;
|
|
42
|
-
createPublicApi: (options: RuntimePublicApiOptions) => ResttyApp;
|
|
43
|
-
};
|
|
44
|
-
type LifecycleThemeRuntime = {
|
|
45
|
-
cancelScheduledSizeUpdate: () => void;
|
|
46
|
-
getActiveTheme: () => GhosttyTheme | null;
|
|
47
|
-
};
|
|
48
|
-
type CreateRuntimeAppApiOptions = {
|
|
49
|
-
session: ResttyAppSession;
|
|
50
|
-
ptyTransport: PtyTransport;
|
|
51
|
-
inputHandler: InputHandler;
|
|
52
|
-
ptyInputRuntime: PtyInputRuntime;
|
|
53
|
-
interaction: RuntimeInteraction;
|
|
54
|
-
lifecycleThemeSizeRuntime: LifecycleThemeRuntime;
|
|
55
|
-
cleanupFns: Array<() => void>;
|
|
56
|
-
cleanupCanvasFns: Array<() => void>;
|
|
57
|
-
callbacks?: ResttyAppCallbacks;
|
|
58
|
-
fpsEl: HTMLElement | null;
|
|
59
|
-
backendEl: HTMLElement | null;
|
|
60
|
-
inputDebugEl: HTMLElement | null;
|
|
61
|
-
imeInput: HTMLTextAreaElement | null;
|
|
62
|
-
attachWindowEvents: boolean;
|
|
63
|
-
isMacPlatform: boolean;
|
|
64
|
-
textEncoder: TextEncoder;
|
|
65
|
-
readState: () => RuntimeAppApiSharedState;
|
|
66
|
-
writeState: (patch: Partial<RuntimeAppApiSharedState>) => void;
|
|
67
|
-
appendLog: (line: string) => void;
|
|
68
|
-
shouldSuppressWasmLog: (text: string) => boolean;
|
|
69
|
-
runBeforeInputHook: (text: string, source: string) => string | null;
|
|
70
|
-
runBeforeRenderOutputHook: (text: string, source: string) => string | null;
|
|
71
|
-
getSelectionText: () => string;
|
|
72
|
-
initialPreferredRenderer: PreferredRenderer;
|
|
73
|
-
maxScrollbackBytes?: number;
|
|
74
|
-
maxScrollback?: number;
|
|
75
|
-
CURSOR_BLINK_MS: number;
|
|
76
|
-
RESIZE_ACTIVE_MS: number;
|
|
77
|
-
TARGET_RENDER_FPS: number;
|
|
78
|
-
BACKGROUND_RENDER_FPS: number;
|
|
79
|
-
KITTY_FLAG_REPORT_EVENTS: number;
|
|
80
|
-
resizeState: {
|
|
81
|
-
lastAt: number;
|
|
82
|
-
};
|
|
83
|
-
tickWebGPU: (state: WebGPUState) => void;
|
|
84
|
-
tickWebGL: (state: WebGLState) => void;
|
|
85
|
-
updateGrid: () => void;
|
|
86
|
-
gridState: {
|
|
87
|
-
cols: number;
|
|
88
|
-
rows: number;
|
|
89
|
-
};
|
|
90
|
-
getCanvas: () => HTMLCanvasElement;
|
|
91
|
-
applyTheme: ResttyApp["applyTheme"];
|
|
92
|
-
ensureFont: () => Promise<void>;
|
|
93
|
-
updateSize: ResttyApp["updateSize"];
|
|
94
|
-
log: (line: string) => void;
|
|
95
|
-
replaceCanvas: () => void;
|
|
96
|
-
rebuildWebGPUShaderStages: (state: WebGPUState) => void;
|
|
97
|
-
rebuildWebGLShaderStages: (state: WebGLState) => void;
|
|
98
|
-
setShaderStagesDirty: (dirty: boolean) => void;
|
|
99
|
-
clearWebGPUShaderStages: () => void;
|
|
100
|
-
destroyWebGPUStageTargets: () => void;
|
|
101
|
-
clearWebGLShaderStages: (state?: WebGLState) => void;
|
|
102
|
-
destroyWebGLStageTargets: (state?: WebGLState) => void;
|
|
103
|
-
};
|
|
104
|
-
export declare function createRuntimeAppApi(options: CreateRuntimeAppApiOptions): RuntimeAppApiRuntime;
|
|
105
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
type RuntimeLogFilter = {
|
|
2
|
-
re: RegExp;
|
|
3
|
-
note: string;
|
|
4
|
-
};
|
|
5
|
-
export type CreateRuntimeLoggerOptions = {
|
|
6
|
-
logEl?: HTMLElement | null;
|
|
7
|
-
onLog?: ((entry: string) => void) | null;
|
|
8
|
-
logLimit?: number;
|
|
9
|
-
wasmLogFilters?: RuntimeLogFilter[];
|
|
10
|
-
};
|
|
11
|
-
export type RuntimeLogger = {
|
|
12
|
-
log: (msg: string) => void;
|
|
13
|
-
appendLog: (line: string) => void;
|
|
14
|
-
shouldSuppressWasmLog: (text: string) => boolean;
|
|
15
|
-
};
|
|
16
|
-
export declare function createRuntimeLogger(options: CreateRuntimeLoggerOptions): RuntimeLogger;
|
|
17
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { ResttyFontPreset, ResttyFontSource } from "./types";
|
|
2
|
-
/** Local-first default font fallback chain with CDN fallback for JetBrains Mono, Nerd symbols, emoji, and CJK support. */
|
|
3
|
-
export declare const DEFAULT_FONT_SOURCES: ResttyFontSource[];
|
|
4
|
-
/** Validates user-provided font sources or returns defaults based on preset (none returns empty array, otherwise default CDN fonts). */
|
|
5
|
-
export declare function normalizeFontSources(sources: ResttyFontSource[] | undefined, preset: ResttyFontPreset | undefined): ResttyFontSource[];
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { type Color } from "../renderer";
|
|
2
|
-
export declare const OVERLAY_SCROLLBAR_WIDTH_CSS_PX = 7;
|
|
3
|
-
export declare const OVERLAY_SCROLLBAR_MARGIN_CSS_PX = 4;
|
|
4
|
-
export declare const OVERLAY_SCROLLBAR_INSET_Y_CSS_PX = 2;
|
|
5
|
-
export declare const OVERLAY_SCROLLBAR_MIN_THUMB_CSS_PX = 28;
|
|
6
|
-
export declare const OVERLAY_SCROLLBAR_CAP_SUPERSAMPLE = 8;
|
|
7
|
-
export type OverlayScrollbarLayout = {
|
|
8
|
-
total: number;
|
|
9
|
-
offset: number;
|
|
10
|
-
len: number;
|
|
11
|
-
denom: number;
|
|
12
|
-
width: number;
|
|
13
|
-
trackX: number;
|
|
14
|
-
trackY: number;
|
|
15
|
-
trackH: number;
|
|
16
|
-
thumbY: number;
|
|
17
|
-
thumbH: number;
|
|
18
|
-
};
|
|
19
|
-
export declare function computeOverlayScrollbarLayout(total: number, offset: number, len: number, canvasWidth: number, canvasHeight: number, currentDpr: number): OverlayScrollbarLayout | null;
|
|
20
|
-
export declare function isPointInScrollbarHitArea(layout: OverlayScrollbarLayout, x: number, y: number): boolean;
|
|
21
|
-
export declare function isPointInScrollbarThumb(layout: OverlayScrollbarLayout, x: number, y: number): boolean;
|
|
22
|
-
export declare function scrollbarOffsetForPointerY(layout: OverlayScrollbarLayout, pointerY: number, thumbGrabRatio: number): number;
|
|
23
|
-
export declare function pushRoundedVerticalBar(out: number[], x: number, y: number, w: number, h: number, color: Color, capSupersample?: number): void;
|
|
24
|
-
export declare function resolveOverlayScrollbarAlpha(now: number, lastInputAt: number): number;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export type CreatePtyOutputBufferControllerOptions = {
|
|
2
|
-
idleMs: number;
|
|
3
|
-
maxMs: number;
|
|
4
|
-
onFlush: (text: string) => void;
|
|
5
|
-
};
|
|
6
|
-
export type PtyOutputBufferController = {
|
|
7
|
-
queue: (text: string) => void;
|
|
8
|
-
flush: () => void;
|
|
9
|
-
cancel: () => void;
|
|
10
|
-
clear: () => void;
|
|
11
|
-
};
|
|
12
|
-
export declare function createPtyOutputBufferController(options: CreatePtyOutputBufferControllerOptions): PtyOutputBufferController;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ResttyAppSession } from "./types";
|
|
2
|
-
/**
|
|
3
|
-
* Create a new app 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 createResttyAppSession(): ResttyAppSession;
|
|
8
|
-
/** Return the global default session, creating it on first call. */
|
|
9
|
-
export declare function getDefaultResttyAppSession(): ResttyAppSession;
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { type ResttyPaneStyleOptions, type ResttyPaneStylesOptions, type ResttyPaneContextMenuOptions, type ResttyPaneManager, type ResttyPaneShortcutsOptions, type ResttyPaneWithApp } from "./panes-types";
|
|
2
|
-
import type { ResttyAppOptions, ResttyAppSession } from "../runtime/types";
|
|
3
|
-
/**
|
|
4
|
-
* A pane created by the app pane manager, extending the base pane
|
|
5
|
-
* with DOM elements needed by the terminal app.
|
|
6
|
-
*/
|
|
7
|
-
export type ResttyManagedAppPane = ResttyPaneWithApp & {
|
|
8
|
-
/** The canvas element used for terminal rendering. */
|
|
9
|
-
canvas: HTMLCanvasElement;
|
|
10
|
-
/** Hidden textarea for IME composition input. */
|
|
11
|
-
imeInput: HTMLTextAreaElement;
|
|
12
|
-
/** Pre element for terminal debug / accessibility output. */
|
|
13
|
-
termDebugEl: HTMLPreElement;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* Default CSS class names for pane DOM elements.
|
|
17
|
-
*/
|
|
18
|
-
export type ResttyPaneDomDefaults = {
|
|
19
|
-
paneClassName?: string;
|
|
20
|
-
canvasClassName?: string;
|
|
21
|
-
imeInputClassName?: string;
|
|
22
|
-
termDebugClassName?: string;
|
|
23
|
-
};
|
|
24
|
-
/** Style options for managed panes (alias for ResttyPaneStyleOptions). */
|
|
25
|
-
export type ResttyManagedPaneStyleOptions = ResttyPaneStyleOptions;
|
|
26
|
-
/** Style configuration including enabled flag (alias for ResttyPaneStylesOptions). */
|
|
27
|
-
export type ResttyManagedPaneStylesOptions = ResttyPaneStylesOptions;
|
|
28
|
-
/** App options minus the DOM/session fields that the pane manager provides. */
|
|
29
|
-
export type ResttyPaneAppOptionsInput = Omit<ResttyAppOptions, "canvas" | "imeInput" | "session">;
|
|
30
|
-
/**
|
|
31
|
-
* Configuration for the built-in default context menu.
|
|
32
|
-
*/
|
|
33
|
-
export type ResttyDefaultPaneContextMenuOptions = {
|
|
34
|
-
/** Whether the default context menu is enabled (default true). */
|
|
35
|
-
enabled?: boolean;
|
|
36
|
-
/** Guard predicate; return false to suppress the menu for a given event. */
|
|
37
|
-
canOpen?: (event: MouseEvent, pane: ResttyManagedAppPane) => boolean;
|
|
38
|
-
/** Override the modifier key label shown in shortcut hints. */
|
|
39
|
-
modKeyLabel?: string;
|
|
40
|
-
/** Provide the PTY WebSocket URL for the connect/disconnect menu item. */
|
|
41
|
-
getPtyUrl?: () => string | null | undefined;
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* Options for creating an app-level pane manager that wires up DOM
|
|
45
|
-
* elements, the terminal app, and the shared session automatically.
|
|
46
|
-
*/
|
|
47
|
-
export type CreateResttyAppPaneManagerOptions = {
|
|
48
|
-
/** Root element that will contain all pane DOM trees. */
|
|
49
|
-
root: HTMLElement;
|
|
50
|
-
/** Shared session for WASM/WebGPU resources (defaults to the global session). */
|
|
51
|
-
session?: ResttyAppSession;
|
|
52
|
-
/** Per-pane app options, static object or factory receiving pane context. */
|
|
53
|
-
appOptions?: ResttyPaneAppOptionsInput | ((context: {
|
|
54
|
-
id: number;
|
|
55
|
-
sourcePane: ResttyManagedAppPane | null;
|
|
56
|
-
canvas: HTMLCanvasElement;
|
|
57
|
-
imeInput: HTMLTextAreaElement;
|
|
58
|
-
termDebugEl: HTMLPreElement;
|
|
59
|
-
}) => ResttyPaneAppOptionsInput);
|
|
60
|
-
/** Override default CSS class names for pane DOM elements. */
|
|
61
|
-
paneDom?: ResttyPaneDomDefaults;
|
|
62
|
-
/** Automatically call app.init() after pane creation (default true). */
|
|
63
|
-
autoInit?: boolean;
|
|
64
|
-
/** Minimum pane size in pixels during split-resize (default 96). */
|
|
65
|
-
minPaneSize?: number;
|
|
66
|
-
/** Enable or configure built-in pane CSS styles. */
|
|
67
|
-
paneStyles?: boolean | ResttyManagedPaneStylesOptions;
|
|
68
|
-
/** Enable or configure keyboard shortcuts for splitting. */
|
|
69
|
-
shortcuts?: boolean | ResttyPaneShortcutsOptions;
|
|
70
|
-
/** Custom context menu implementation (overrides defaultContextMenu). */
|
|
71
|
-
contextMenu?: ResttyPaneContextMenuOptions<ResttyManagedAppPane> | null;
|
|
72
|
-
/** Enable or configure the built-in default context menu. */
|
|
73
|
-
defaultContextMenu?: boolean | ResttyDefaultPaneContextMenuOptions;
|
|
74
|
-
/** Called after a new pane is created. */
|
|
75
|
-
onPaneCreated?: (pane: ResttyManagedAppPane) => void;
|
|
76
|
-
/** Called after a pane is closed. */
|
|
77
|
-
onPaneClosed?: (pane: ResttyManagedAppPane) => void;
|
|
78
|
-
/** Called after a pane is split. */
|
|
79
|
-
onPaneSplit?: (sourcePane: ResttyManagedAppPane, createdPane: ResttyManagedAppPane, direction: "vertical" | "horizontal") => void;
|
|
80
|
-
/** Called when the active pane changes (or becomes null). */
|
|
81
|
-
onActivePaneChange?: (pane: ResttyManagedAppPane | null) => void;
|
|
82
|
-
/** Called when the layout changes (splits, closes, resizes). */
|
|
83
|
-
onLayoutChanged?: () => void;
|
|
84
|
-
};
|
|
85
|
-
/**
|
|
86
|
-
* Create an app-aware pane manager that automatically constructs
|
|
87
|
-
* canvas, IME input, and terminal app instances for each pane.
|
|
88
|
-
*/
|
|
89
|
-
export declare function createResttyAppPaneManager(options: CreateResttyAppPaneManagerOptions): ResttyPaneManager<ResttyManagedAppPane>;
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import type { InputHandler, MouseMode } from "../input";
|
|
2
|
-
import type { GhosttyTheme } from "../theme";
|
|
3
|
-
import type { ResttyManagedAppPane } from "./pane-app-manager";
|
|
4
|
-
import type { ResttyShaderStage } from "../runtime/types";
|
|
5
|
-
/**
|
|
6
|
-
* Public API surface exposed by each pane handle.
|
|
7
|
-
*/
|
|
8
|
-
export type ResttyPaneApi = {
|
|
9
|
-
id: number;
|
|
10
|
-
setRenderer: (value: "auto" | "webgpu" | "webgl2") => void;
|
|
11
|
-
setPaused: (value: boolean) => void;
|
|
12
|
-
togglePause: () => void;
|
|
13
|
-
setFontSize: (value: number) => void;
|
|
14
|
-
applyTheme: (theme: GhosttyTheme, sourceLabel?: string) => void;
|
|
15
|
-
resetTheme: () => void;
|
|
16
|
-
sendInput: (text: string, source?: string) => void;
|
|
17
|
-
sendKeyInput: (text: string, source?: string) => void;
|
|
18
|
-
clearScreen: () => void;
|
|
19
|
-
connectPty: (url?: string) => void;
|
|
20
|
-
disconnectPty: () => void;
|
|
21
|
-
isPtyConnected: () => boolean;
|
|
22
|
-
setMouseMode: (value: MouseMode) => void;
|
|
23
|
-
getMouseStatus: () => ReturnType<InputHandler["getMouseStatus"]>;
|
|
24
|
-
copySelectionToClipboard: () => Promise<boolean>;
|
|
25
|
-
pasteFromClipboard: () => Promise<boolean>;
|
|
26
|
-
dumpAtlasForCodepoint: (cp: number) => void;
|
|
27
|
-
resize: (cols: number, rows: number) => void;
|
|
28
|
-
focus: () => void;
|
|
29
|
-
blur: () => void;
|
|
30
|
-
updateSize: (force?: boolean) => void;
|
|
31
|
-
getBackend: () => string;
|
|
32
|
-
setShaderStages: (stages: ResttyShaderStage[]) => void;
|
|
33
|
-
getShaderStages: () => ResttyShaderStage[];
|
|
34
|
-
getRawPane: () => ResttyManagedAppPane;
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* Thin wrapper around a managed pane that delegates calls to the
|
|
38
|
-
* underlying app. Resolves the pane lazily so it stays valid across
|
|
39
|
-
* layout changes.
|
|
40
|
-
*/
|
|
41
|
-
export declare class ResttyPaneHandle implements ResttyPaneApi {
|
|
42
|
-
private readonly resolvePane;
|
|
43
|
-
constructor(resolvePane: () => ResttyManagedAppPane);
|
|
44
|
-
get id(): number;
|
|
45
|
-
setRenderer(value: "auto" | "webgpu" | "webgl2"): void;
|
|
46
|
-
setPaused(value: boolean): void;
|
|
47
|
-
togglePause(): void;
|
|
48
|
-
setFontSize(value: number): void;
|
|
49
|
-
applyTheme(theme: GhosttyTheme, sourceLabel?: string): void;
|
|
50
|
-
resetTheme(): void;
|
|
51
|
-
sendInput(text: string, source?: string): void;
|
|
52
|
-
sendKeyInput(text: string, source?: string): void;
|
|
53
|
-
clearScreen(): void;
|
|
54
|
-
connectPty(url?: string): void;
|
|
55
|
-
disconnectPty(): void;
|
|
56
|
-
isPtyConnected(): boolean;
|
|
57
|
-
setMouseMode(value: MouseMode): void;
|
|
58
|
-
getMouseStatus(): ReturnType<InputHandler["getMouseStatus"]>;
|
|
59
|
-
copySelectionToClipboard(): Promise<boolean>;
|
|
60
|
-
pasteFromClipboard(): Promise<boolean>;
|
|
61
|
-
dumpAtlasForCodepoint(cp: number): void;
|
|
62
|
-
resize(cols: number, rows: number): void;
|
|
63
|
-
focus(): void;
|
|
64
|
-
blur(): void;
|
|
65
|
-
updateSize(force?: boolean): void;
|
|
66
|
-
getBackend(): string;
|
|
67
|
-
setShaderStages(stages: ResttyShaderStage[]): void;
|
|
68
|
-
getShaderStages(): ResttyShaderStage[];
|
|
69
|
-
getRawPane(): ResttyManagedAppPane;
|
|
70
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import type { ResttyShaderStage } from "../runtime/types";
|
|
2
|
-
import type { ResttyInterceptorOptions, ResttyPlugin, ResttyPluginEvents, ResttyPluginInfo, ResttyPluginRequires } from "./restty-plugin-types";
|
|
3
|
-
export type ResttyPluginRuntimeDisposerKind = "event" | "input-interceptor" | "output-interceptor" | "lifecycle-hook" | "render-hook" | "render-stage";
|
|
4
|
-
export type ResttyPluginRuntimeDisposer = {
|
|
5
|
-
kind: ResttyPluginRuntimeDisposerKind;
|
|
6
|
-
active: boolean;
|
|
7
|
-
dispose: () => void;
|
|
8
|
-
};
|
|
9
|
-
export type ResttyPluginRuntime = {
|
|
10
|
-
plugin: ResttyPlugin;
|
|
11
|
-
cleanup: (() => void) | null;
|
|
12
|
-
activatedAt: number;
|
|
13
|
-
options: unknown;
|
|
14
|
-
disposers: Array<ResttyPluginRuntimeDisposer>;
|
|
15
|
-
};
|
|
16
|
-
export type ResttyPluginDiagnostic = {
|
|
17
|
-
id: string;
|
|
18
|
-
version: string | null;
|
|
19
|
-
apiVersion: number | null;
|
|
20
|
-
requires: ResttyPluginRequires | null;
|
|
21
|
-
active: boolean;
|
|
22
|
-
activatedAt: number | null;
|
|
23
|
-
lastError: string | null;
|
|
24
|
-
};
|
|
25
|
-
export type ResttyRegisteredInterceptor<T extends (payload: unknown) => unknown> = {
|
|
26
|
-
id: number;
|
|
27
|
-
pluginId: string;
|
|
28
|
-
priority: number;
|
|
29
|
-
order: number;
|
|
30
|
-
interceptor: T;
|
|
31
|
-
};
|
|
32
|
-
export type ResttyManagedShaderStage = {
|
|
33
|
-
id: string;
|
|
34
|
-
stage: ResttyShaderStage;
|
|
35
|
-
order: number;
|
|
36
|
-
ownerPluginId: string | null;
|
|
37
|
-
};
|
|
38
|
-
export type ResttyInterceptorSeq = {
|
|
39
|
-
nextId: number;
|
|
40
|
-
nextOrder: number;
|
|
41
|
-
};
|
|
42
|
-
export declare function registerPluginInterceptor<T extends (payload: unknown) => unknown>(bucket: Array<ResttyRegisteredInterceptor<T>>, pluginId: string, interceptor: T, options: ResttyInterceptorOptions | undefined, seq: ResttyInterceptorSeq): {
|
|
43
|
-
dispose: () => void;
|
|
44
|
-
nextId: number;
|
|
45
|
-
nextOrder: number;
|
|
46
|
-
};
|
|
47
|
-
export declare function applyPluginInterceptors<TPayload extends {
|
|
48
|
-
text: string;
|
|
49
|
-
}>(bucket: Array<ResttyRegisteredInterceptor<(payload: TPayload) => string | null | void>>, kind: "input" | "output", payload: TPayload): string | null;
|
|
50
|
-
export declare function runPluginHooks<TPayload>(bucket: Array<ResttyRegisteredInterceptor<(payload: TPayload) => void>>, kind: "lifecycle" | "render", payload: TPayload): void;
|
|
51
|
-
export declare function attachRuntimeDisposer(runtime: ResttyPluginRuntime, kind: ResttyPluginRuntimeDisposerKind, dispose: () => void): () => void;
|
|
52
|
-
export declare function teardownPluginRuntime(runtime: ResttyPluginRuntime): void;
|
|
53
|
-
export declare function setPluginLoadError(pluginDiagnostics: Map<string, ResttyPluginDiagnostic>, pluginId: string, message: string): void;
|
|
54
|
-
export declare function patchPluginDiagnostic(pluginDiagnostics: Map<string, ResttyPluginDiagnostic>, pluginId: string, patch: Partial<Pick<ResttyPluginDiagnostic, "active" | "activatedAt" | "lastError">>): void;
|
|
55
|
-
export declare function buildPluginInfo(pluginId: string, pluginDiagnostics: Map<string, ResttyPluginDiagnostic>, pluginRuntimes: Map<string, ResttyPluginRuntime>): ResttyPluginInfo | null;
|
|
56
|
-
export declare function onPluginEvent<E extends keyof ResttyPluginEvents>(pluginListeners: Map<keyof ResttyPluginEvents, Set<(payload: unknown) => void>>, event: E, listener: (payload: ResttyPluginEvents[E]) => void): () => void;
|
|
57
|
-
export declare function emitPluginEvent<E extends keyof ResttyPluginEvents>(pluginListeners: Map<keyof ResttyPluginEvents, Set<(payload: unknown) => void>>, event: E, payload: ResttyPluginEvents[E]): void;
|
|
File without changes
|
|
File without changes
|
/package/dist/runtime/{render-stage-shaders.d.ts → create-runtime/render-stage-shaders.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|