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.
- package/README.md +49 -343
- package/dist/chunk-30px21q2.js +0 -0
- package/dist/{chunk-zqscavsh.js → chunk-db9dt7pr.js} +48146 -63236
- 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/index.d.ts +8 -4
- 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 -5
- package/dist/internal.js +23 -5
- package/dist/restty.esm.js +32 -11368
- 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} +5 -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 +1 -8
- 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 +1 -1
- package/dist/runtime/create-runtime/interaction-runtime/bind-pointer-events.d.ts +2 -1
- package/dist/runtime/create-runtime/interaction-runtime/bind-pointer-up-handler.d.ts +1 -1
- 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} +1 -47
- package/dist/runtime/create-runtime/interaction-runtime/scrollbar-runtime.d.ts +1 -23
- 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} +1 -6
- 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 -15
- package/dist/runtime/create-runtime/native-scrollbar-host.types.d.ts +13 -0
- package/dist/runtime/{overlay-scrollbar.d.ts → create-runtime/overlay-scrollbar.d.ts} +1 -12
- 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 +5 -9
- 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 +1 -1
- package/dist/runtime/create-runtime/search-runtime/index.d.ts +2 -0
- package/dist/runtime/create-runtime/{search-runtime.d.ts → search-runtime/types.d.ts} +9 -6
- 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 -393
- 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/{pane-app-manager.d.ts → panes/managed-pane-types.d.ts} +34 -36
- 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 +33 -23
- 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 → restty/pane-handle.d.ts} +42 -40
- 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 -51
- 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 +28 -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/{pane-search-ui.d.ts → search-ui/types.d.ts} +22 -13
- package/dist/wasm/embedded.d.ts +1 -1
- package/dist/wasm/runtime/types.d.ts +0 -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 +52 -33
- package/dist/internal.esm.js +0 -22285
- 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 -31
- 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 -113
- package/dist/runtime/create-runtime/runtime-logger.d.ts +0 -17
- package/dist/runtime/font-sources.d.ts +0 -5
- 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/restty-plugin-runtime.d.ts +0 -57
- package/dist/xterm/app-options.d.ts +0 -2
- package/dist/xterm.esm.js +0 -12210
- /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,31 +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
|
-
markSearchDirty?: () => void;
|
|
23
|
-
shapeClusterWithFont: (entry: FontEntry, text: string) => {
|
|
24
|
-
advance: number;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
export declare function createFontRuntimeGridHelpers(options: CreateFontRuntimeGridHelpersOptions): {
|
|
28
|
-
computeCellMetrics: () => CellMetrics | null;
|
|
29
|
-
updateGrid: () => void;
|
|
30
|
-
};
|
|
31
|
-
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,113 +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
|
-
setLigatures: ResttyApp["setLigatures"];
|
|
29
|
-
setFontHinting: ResttyApp["setFontHinting"];
|
|
30
|
-
setFontHintTarget: ResttyApp["setFontHintTarget"];
|
|
31
|
-
setFontSources: ResttyApp["setFontSources"];
|
|
32
|
-
resetTheme: ResttyApp["resetTheme"];
|
|
33
|
-
setSearchQuery: ResttyApp["setSearchQuery"];
|
|
34
|
-
clearSearch: ResttyApp["clearSearch"];
|
|
35
|
-
searchNext: ResttyApp["searchNext"];
|
|
36
|
-
searchPrevious: ResttyApp["searchPrevious"];
|
|
37
|
-
getSearchState: ResttyApp["getSearchState"];
|
|
38
|
-
dumpAtlasForCodepoint: ResttyApp["dumpAtlasForCodepoint"];
|
|
39
|
-
resize: ResttyApp["resize"];
|
|
40
|
-
focus: ResttyApp["focus"];
|
|
41
|
-
blur: ResttyApp["blur"];
|
|
42
|
-
updateSize: ResttyApp["updateSize"];
|
|
43
|
-
setShaderStages: ResttyApp["setShaderStages"];
|
|
44
|
-
getShaderStages: ResttyApp["getShaderStages"];
|
|
45
|
-
};
|
|
46
|
-
export type RuntimeAppApiRuntime = {
|
|
47
|
-
sendInput: RuntimeSendInput;
|
|
48
|
-
createPublicApi: (options: RuntimePublicApiOptions) => ResttyApp;
|
|
49
|
-
};
|
|
50
|
-
type LifecycleThemeRuntime = {
|
|
51
|
-
cancelScheduledSizeUpdate: () => void;
|
|
52
|
-
getActiveTheme: () => GhosttyTheme | null;
|
|
53
|
-
};
|
|
54
|
-
type CreateRuntimeAppApiOptions = {
|
|
55
|
-
session: ResttyAppSession;
|
|
56
|
-
ptyTransport: PtyTransport;
|
|
57
|
-
inputHandler: InputHandler;
|
|
58
|
-
ptyInputRuntime: PtyInputRuntime;
|
|
59
|
-
interaction: RuntimeInteraction;
|
|
60
|
-
lifecycleThemeSizeRuntime: LifecycleThemeRuntime;
|
|
61
|
-
cleanupFns: Array<() => void>;
|
|
62
|
-
cleanupCanvasFns: Array<() => void>;
|
|
63
|
-
callbacks?: ResttyAppCallbacks;
|
|
64
|
-
fpsEl: HTMLElement | null;
|
|
65
|
-
backendEl: HTMLElement | null;
|
|
66
|
-
inputDebugEl: HTMLElement | null;
|
|
67
|
-
imeInput: HTMLTextAreaElement | null;
|
|
68
|
-
attachWindowEvents: boolean;
|
|
69
|
-
isMacPlatform: boolean;
|
|
70
|
-
textEncoder: TextEncoder;
|
|
71
|
-
readState: () => RuntimeAppApiSharedState;
|
|
72
|
-
writeState: (patch: Partial<RuntimeAppApiSharedState>) => void;
|
|
73
|
-
appendLog: (line: string) => void;
|
|
74
|
-
shouldSuppressWasmLog: (text: string) => boolean;
|
|
75
|
-
runBeforeInputHook: (text: string, source: string) => string | null;
|
|
76
|
-
runBeforeRenderOutputHook: (text: string, source: string) => string | null;
|
|
77
|
-
getSelectionText: () => string;
|
|
78
|
-
initialPreferredRenderer: PreferredRenderer;
|
|
79
|
-
maxScrollbackBytes?: number;
|
|
80
|
-
maxScrollback?: number;
|
|
81
|
-
CURSOR_BLINK_MS: number;
|
|
82
|
-
RESIZE_ACTIVE_MS: number;
|
|
83
|
-
TARGET_RENDER_FPS: number;
|
|
84
|
-
BACKGROUND_RENDER_FPS: number;
|
|
85
|
-
KITTY_FLAG_REPORT_EVENTS: number;
|
|
86
|
-
resizeState: {
|
|
87
|
-
lastAt: number;
|
|
88
|
-
};
|
|
89
|
-
tickWebGPU: (state: WebGPUState) => void;
|
|
90
|
-
tickWebGL: (state: WebGLState) => void;
|
|
91
|
-
updateGrid: () => void;
|
|
92
|
-
gridState: {
|
|
93
|
-
cols: number;
|
|
94
|
-
rows: number;
|
|
95
|
-
};
|
|
96
|
-
getCanvas: () => HTMLCanvasElement;
|
|
97
|
-
applyTheme: ResttyApp["applyTheme"];
|
|
98
|
-
ensureFont: () => Promise<void>;
|
|
99
|
-
updateSize: ResttyApp["updateSize"];
|
|
100
|
-
log: (line: string) => void;
|
|
101
|
-
replaceCanvas: () => void;
|
|
102
|
-
rebuildWebGPUShaderStages: (state: WebGPUState) => void;
|
|
103
|
-
rebuildWebGLShaderStages: (state: WebGLState) => void;
|
|
104
|
-
setShaderStagesDirty: (dirty: boolean) => void;
|
|
105
|
-
clearWebGPUShaderStages: () => void;
|
|
106
|
-
destroyWebGPUStageTargets: () => void;
|
|
107
|
-
clearWebGLShaderStages: (state?: WebGLState) => void;
|
|
108
|
-
destroyWebGLStageTargets: (state?: WebGLState) => void;
|
|
109
|
-
markSearchDirty: () => void;
|
|
110
|
-
handleSearchWasmReset: () => void;
|
|
111
|
-
};
|
|
112
|
-
export declare function createRuntimeAppApi(options: CreateRuntimeAppApiOptions): RuntimeAppApiRuntime;
|
|
113
|
-
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,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,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;
|