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,12 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
export type CreateRuntimeInputHooksOptions = {
|
|
4
|
-
beforeInputHook?: RuntimeInputHook;
|
|
5
|
-
beforeRenderOutputHook?: RuntimeInputHook;
|
|
6
|
-
};
|
|
7
|
-
export type RuntimeInputHooks = {
|
|
8
|
-
runBeforeInputHook: (text: string, source: string) => string | null;
|
|
9
|
-
runBeforeRenderOutputHook: (text: string, source: string) => string | null;
|
|
10
|
-
};
|
|
11
|
-
export declare function createRuntimeInputHooks(options: CreateRuntimeInputHooksOptions): RuntimeInputHooks;
|
|
12
|
-
export {};
|
|
1
|
+
import type { RuntimeInputHooks, RuntimeInputHooksOptions } from "./input-hooks.types";
|
|
2
|
+
export declare function createRuntimeInputHooks(options: RuntimeInputHooksOptions): RuntimeInputHooks;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ResttyRuntimeInputPayload } from "../core/models";
|
|
2
|
+
export type RuntimeInputHook = ((payload: ResttyRuntimeInputPayload) => string | null | void) | null | undefined;
|
|
3
|
+
export type RuntimeInputHooksOptions = {
|
|
4
|
+
beforeInputHook?: RuntimeInputHook;
|
|
5
|
+
beforeRenderOutputHook?: RuntimeInputHook;
|
|
6
|
+
};
|
|
7
|
+
export type RuntimeInputHooks = {
|
|
8
|
+
runBeforeInputHook: (text: string, source: string) => string | null;
|
|
9
|
+
runBeforeRenderOutputHook: (text: string, source: string) => string | null;
|
|
10
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { BindCanvasEventsOptions
|
|
1
|
+
import type { BindCanvasEventsOptions } from "./runtime.types";
|
|
2
|
+
import type { RuntimeImeState } from "./state.types";
|
|
2
3
|
export type BindImeEventsOptions = {
|
|
3
4
|
bindOptions: BindCanvasEventsOptions;
|
|
4
5
|
imeInput: HTMLTextAreaElement;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InputHandler } from "../../../input";
|
|
2
|
-
import type { RuntimeCell, RuntimeDesktopSelectionState, RuntimeGridState, RuntimeSelectionState, RuntimeTouchSelectionState } from "./types";
|
|
2
|
+
import type { RuntimeCell, RuntimeDesktopSelectionState, RuntimeGridState, RuntimeSelectionState, RuntimeTouchSelectionState } from "./state.types";
|
|
3
3
|
type CreatePointerAuxHandlersOptions = {
|
|
4
4
|
inputHandler: InputHandler;
|
|
5
5
|
shouldRoutePointerToAppMouse: (shiftKey: boolean) => boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { BindCanvasEventsOptions
|
|
1
|
+
import type { BindCanvasEventsOptions } from "./runtime.types";
|
|
2
|
+
import type { RuntimeCell, RuntimeDesktopSelectionState, RuntimeGridState, RuntimeLinkState, RuntimeSelectionState, RuntimeTouchSelectionState } from "./state.types";
|
|
2
3
|
export type BindPointerEventsOptions = {
|
|
3
4
|
canvas: HTMLCanvasElement;
|
|
4
5
|
bindOptions: BindCanvasEventsOptions;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InputHandler } from "../../../input";
|
|
2
|
-
import type { RuntimeCell, RuntimeDesktopSelectionState, RuntimeLinkState, RuntimeSelectionState, RuntimeTouchSelectionState } from "./types";
|
|
2
|
+
import type { RuntimeCell, RuntimeDesktopSelectionState, RuntimeLinkState, RuntimeSelectionState, RuntimeTouchSelectionState } from "./state.types";
|
|
3
3
|
type CreatePointerUpHandlerOptions = {
|
|
4
4
|
inputHandler: InputHandler;
|
|
5
5
|
sendKeyInput: (text: string) => void;
|
package/dist/runtime/create-runtime/{interaction-runtime.d.ts → interaction-runtime/index.d.ts}
RENAMED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import type { CreateRuntimeInteractionOptions, RuntimeInteraction } from "./
|
|
2
|
-
export type { BindCanvasEventsOptions, CreateRuntimeInteractionOptions,
|
|
1
|
+
import type { CreateRuntimeInteractionOptions, RuntimeInteraction } from "./runtime.types";
|
|
2
|
+
export type { BindCanvasEventsOptions, CreateRuntimeInteractionOptions, RuntimeInteraction, } from "./runtime.types";
|
|
3
|
+
export type { RuntimeCell } from "./state.types";
|
|
3
4
|
export declare function createRuntimeInteraction(options: CreateRuntimeInteractionOptions): RuntimeInteraction;
|
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export type KittyDecodedImage
|
|
3
|
-
key: string;
|
|
4
|
-
width: number;
|
|
5
|
-
height: number;
|
|
6
|
-
source: CanvasImageSource;
|
|
7
|
-
pixels?: Uint8Array;
|
|
8
|
-
};
|
|
9
|
-
export type KittyImageCache = {
|
|
10
|
-
resolveKittyImage: (placement: KittyPlacement) => KittyDecodedImage | null;
|
|
11
|
-
clearKittyImageCache: () => void;
|
|
12
|
-
pruneInactiveImages: (activeImageIds: Set<number>) => boolean;
|
|
13
|
-
};
|
|
14
|
-
export type CreateKittyImageCacheOptions = {
|
|
15
|
-
getWasm: () => ResttyWasm | null;
|
|
16
|
-
markNeedsRender: () => void;
|
|
17
|
-
};
|
|
1
|
+
import type { CreateKittyImageCacheOptions, KittyImageCache } from "./kitty-image-cache.types";
|
|
2
|
+
export type { CreateKittyImageCacheOptions, KittyDecodedImage, KittyImageCache, } from "./kitty-image-cache.types";
|
|
18
3
|
export declare function createKittyImageCache(options: CreateKittyImageCacheOptions): KittyImageCache;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { KittyPlacement, ResttyWasm } from "../../../wasm";
|
|
2
|
+
export type KittyDecodedImage = {
|
|
3
|
+
key: string;
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
source: CanvasImageSource;
|
|
7
|
+
pixels?: Uint8Array;
|
|
8
|
+
};
|
|
9
|
+
export type KittyImageCache = {
|
|
10
|
+
resolveKittyImage: (placement: KittyPlacement) => KittyDecodedImage | null;
|
|
11
|
+
clearKittyImageCache: () => void;
|
|
12
|
+
pruneInactiveImages: (activeImageIds: Set<number>) => boolean;
|
|
13
|
+
};
|
|
14
|
+
export type CreateKittyImageCacheOptions = {
|
|
15
|
+
getWasm: () => ResttyWasm | null;
|
|
16
|
+
markNeedsRender: () => void;
|
|
17
|
+
};
|
|
@@ -1,52 +1,6 @@
|
|
|
1
1
|
import type { InputHandler } from "../../../input";
|
|
2
|
-
import type { createSelectionState } from "../../../selection";
|
|
3
2
|
import type { RenderState, ResttyWasm, ResttyWasmExports } from "../../../wasm";
|
|
4
|
-
|
|
5
|
-
row: number;
|
|
6
|
-
col: number;
|
|
7
|
-
};
|
|
8
|
-
export type RuntimeGridState = {
|
|
9
|
-
cols: number;
|
|
10
|
-
rows: number;
|
|
11
|
-
cellW: number;
|
|
12
|
-
cellH: number;
|
|
13
|
-
};
|
|
14
|
-
export type RuntimeImeState = {
|
|
15
|
-
composing: boolean;
|
|
16
|
-
preedit: string;
|
|
17
|
-
selectionStart: number;
|
|
18
|
-
selectionEnd: number;
|
|
19
|
-
};
|
|
20
|
-
export type RuntimeTouchSelectionState = {
|
|
21
|
-
pendingPointerId: number | null;
|
|
22
|
-
activePointerId: number | null;
|
|
23
|
-
panPointerId: number | null;
|
|
24
|
-
pendingCell: RuntimeCell | null;
|
|
25
|
-
pendingStartedAt: number;
|
|
26
|
-
pendingStartX: number;
|
|
27
|
-
pendingStartY: number;
|
|
28
|
-
panLastY: number;
|
|
29
|
-
pendingTimer: number;
|
|
30
|
-
};
|
|
31
|
-
export type RuntimeDesktopSelectionState = {
|
|
32
|
-
pendingPointerId: number | null;
|
|
33
|
-
pendingCell: RuntimeCell | null;
|
|
34
|
-
startedWithActiveSelection: boolean;
|
|
35
|
-
lastPrimaryClickAt: number;
|
|
36
|
-
lastPrimaryClickCell: RuntimeCell | null;
|
|
37
|
-
lastPrimaryClickCount: number;
|
|
38
|
-
};
|
|
39
|
-
export type RuntimeLinkState = {
|
|
40
|
-
hoverId: number;
|
|
41
|
-
hoverUri: string;
|
|
42
|
-
};
|
|
43
|
-
export type RuntimeScrollbarState = {
|
|
44
|
-
lastInputAt: number;
|
|
45
|
-
lastTotal: number;
|
|
46
|
-
lastOffset: number;
|
|
47
|
-
lastLen: number;
|
|
48
|
-
};
|
|
49
|
-
export type RuntimeSelectionState = ReturnType<typeof createSelectionState>;
|
|
3
|
+
import type { RuntimeCell, RuntimeGridState, RuntimeImeState, RuntimeLinkState, RuntimeScrollbarState, RuntimeSelectionState } from "./state.types";
|
|
50
4
|
export type BindCanvasEventsOptions = {
|
|
51
5
|
inputHandler: InputHandler;
|
|
52
6
|
sendKeyInput: (text: string) => void;
|
|
@@ -1,24 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { ResttyWasm, ResttyWasmExports } from "../../../wasm";
|
|
3
|
-
export type CreateScrollbarRuntimeOptions = {
|
|
4
|
-
scrollbarState: RuntimeScrollbarState;
|
|
5
|
-
selectionState: RuntimeSelectionState;
|
|
6
|
-
linkState: RuntimeLinkState;
|
|
7
|
-
getCanvas: () => HTMLCanvasElement;
|
|
8
|
-
getGridState: () => RuntimeGridState;
|
|
9
|
-
getWasmReady: () => boolean;
|
|
10
|
-
getWasm: () => ResttyWasm | null;
|
|
11
|
-
getWasmHandle: () => number;
|
|
12
|
-
getWasmExports: () => ResttyWasmExports | null;
|
|
13
|
-
updateLinkHover: (cell: null) => void;
|
|
14
|
-
markNeedsRender: () => void;
|
|
15
|
-
markSearchDirty?: () => void;
|
|
16
|
-
};
|
|
17
|
-
export type ScrollbarRuntime = {
|
|
18
|
-
destroy: () => void;
|
|
19
|
-
noteScrollActivity: () => void;
|
|
20
|
-
scrollViewportByLines: (lines: number) => void;
|
|
21
|
-
scrollViewportByWheel: (event: WheelEvent) => void;
|
|
22
|
-
syncScrollbar: (total: number, offset: number, len: number) => void;
|
|
23
|
-
};
|
|
1
|
+
import type { CreateScrollbarRuntimeOptions, ScrollbarRuntime } from "./scrollbar-runtime.types";
|
|
24
2
|
export declare function createScrollbarRuntime(options: CreateScrollbarRuntimeOptions): ScrollbarRuntime;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ResttyWasm, ResttyWasmExports } from "../../../wasm";
|
|
2
|
+
import type { RuntimeGridState, RuntimeLinkState, RuntimeScrollbarState, RuntimeSelectionState } from "./state.types";
|
|
3
|
+
export type CreateScrollbarRuntimeOptions = {
|
|
4
|
+
scrollbarState: RuntimeScrollbarState;
|
|
5
|
+
selectionState: RuntimeSelectionState;
|
|
6
|
+
linkState: RuntimeLinkState;
|
|
7
|
+
getCanvas: () => HTMLCanvasElement;
|
|
8
|
+
getGridState: () => RuntimeGridState;
|
|
9
|
+
getWasmReady: () => boolean;
|
|
10
|
+
getWasm: () => ResttyWasm | null;
|
|
11
|
+
getWasmHandle: () => number;
|
|
12
|
+
getWasmExports: () => ResttyWasmExports | null;
|
|
13
|
+
updateLinkHover: (cell: null) => void;
|
|
14
|
+
markNeedsRender: () => void;
|
|
15
|
+
markSearchDirty?: () => void;
|
|
16
|
+
};
|
|
17
|
+
export type ScrollbarRuntime = {
|
|
18
|
+
destroy: () => void;
|
|
19
|
+
noteScrollActivity: () => void;
|
|
20
|
+
scrollViewportByLines: (lines: number) => void;
|
|
21
|
+
scrollViewportByWheel: (event: WheelEvent) => void;
|
|
22
|
+
syncScrollbar: (total: number, offset: number, len: number) => void;
|
|
23
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { createSelectionState } from "../../../selection";
|
|
2
|
+
export type RuntimeCell = {
|
|
3
|
+
row: number;
|
|
4
|
+
col: number;
|
|
5
|
+
};
|
|
6
|
+
export type RuntimeGridState = {
|
|
7
|
+
cols: number;
|
|
8
|
+
rows: number;
|
|
9
|
+
cellW: number;
|
|
10
|
+
cellH: number;
|
|
11
|
+
};
|
|
12
|
+
export type RuntimeImeState = {
|
|
13
|
+
composing: boolean;
|
|
14
|
+
preedit: string;
|
|
15
|
+
selectionStart: number;
|
|
16
|
+
selectionEnd: number;
|
|
17
|
+
};
|
|
18
|
+
export type RuntimeTouchSelectionState = {
|
|
19
|
+
pendingPointerId: number | null;
|
|
20
|
+
activePointerId: number | null;
|
|
21
|
+
panPointerId: number | null;
|
|
22
|
+
pendingCell: RuntimeCell | null;
|
|
23
|
+
pendingStartedAt: number;
|
|
24
|
+
pendingStartX: number;
|
|
25
|
+
pendingStartY: number;
|
|
26
|
+
panLastY: number;
|
|
27
|
+
pendingTimer: number;
|
|
28
|
+
};
|
|
29
|
+
export type RuntimeDesktopSelectionState = {
|
|
30
|
+
pendingPointerId: number | null;
|
|
31
|
+
pendingCell: RuntimeCell | null;
|
|
32
|
+
startedWithActiveSelection: boolean;
|
|
33
|
+
lastPrimaryClickAt: number;
|
|
34
|
+
lastPrimaryClickCell: RuntimeCell | null;
|
|
35
|
+
lastPrimaryClickCount: number;
|
|
36
|
+
};
|
|
37
|
+
export type RuntimeLinkState = {
|
|
38
|
+
hoverId: number;
|
|
39
|
+
hoverUri: string;
|
|
40
|
+
};
|
|
41
|
+
export type RuntimeScrollbarState = {
|
|
42
|
+
lastInputAt: number;
|
|
43
|
+
lastTotal: number;
|
|
44
|
+
lastOffset: number;
|
|
45
|
+
lastLen: number;
|
|
46
|
+
};
|
|
47
|
+
export type RuntimeSelectionState = ReturnType<typeof createSelectionState>;
|
|
@@ -1,36 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
export type KittyDrawSlice = {
|
|
4
|
-
imageId: number;
|
|
5
|
-
key: string;
|
|
6
|
-
source: CanvasImageSource;
|
|
7
|
-
pixels?: Uint8Array;
|
|
8
|
-
imageWidth: number;
|
|
9
|
-
imageHeight: number;
|
|
10
|
-
sx: number;
|
|
11
|
-
sy: number;
|
|
12
|
-
sw: number;
|
|
13
|
-
sh: number;
|
|
14
|
-
dx: number;
|
|
15
|
-
dy: number;
|
|
16
|
-
dw: number;
|
|
17
|
-
dh: number;
|
|
18
|
-
z: number;
|
|
19
|
-
};
|
|
20
|
-
export type KittyDrawPlan = {
|
|
21
|
-
underlay: KittyDrawSlice[];
|
|
22
|
-
overlay: KittyDrawSlice[];
|
|
23
|
-
};
|
|
24
|
-
type CreateKittyRenderRuntimeOptions = {
|
|
25
|
-
getWasm: () => ResttyWasm | null;
|
|
26
|
-
markNeedsRender: () => void;
|
|
27
|
-
};
|
|
28
|
-
export declare function createKittyRenderRuntime(options: CreateKittyRenderRuntimeOptions): {
|
|
29
|
-
collectKittyDrawPlan: (placements: KittyPlacement[], cellW: number, cellH: number) => KittyDrawPlan;
|
|
30
|
-
resolveKittyWebGLTexture: (gl: WebGL2RenderingContext, slice: KittyDrawSlice) => WebGLTexture | null;
|
|
31
|
-
resolveKittyWebGPUBindGroup: (state: WebGPUState, slice: KittyDrawSlice, nearest?: boolean) => GPUBindGroup | null;
|
|
32
|
-
clearWebGLKittyTextures: () => void;
|
|
33
|
-
clearWebGPUKittyTextures: () => void;
|
|
34
|
-
clearKittyRenderCaches: () => void;
|
|
35
|
-
};
|
|
36
|
-
export {};
|
|
1
|
+
import type { KittyRenderRuntime, KittyRenderRuntimeOptions } from "./kitty-render-runtime.types";
|
|
2
|
+
export declare function createKittyRenderRuntime(options: KittyRenderRuntimeOptions): KittyRenderRuntime;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { WebGPUState } from "../../renderer";
|
|
2
|
+
import type { KittyPlacement } from "../../wasm";
|
|
3
|
+
import type { CreateKittyImageCacheOptions } from "./interaction-runtime/kitty-image-cache.types";
|
|
4
|
+
export type KittyDrawSlice = {
|
|
5
|
+
imageId: number;
|
|
6
|
+
key: string;
|
|
7
|
+
source: CanvasImageSource;
|
|
8
|
+
pixels?: Uint8Array;
|
|
9
|
+
imageWidth: number;
|
|
10
|
+
imageHeight: number;
|
|
11
|
+
sx: number;
|
|
12
|
+
sy: number;
|
|
13
|
+
sw: number;
|
|
14
|
+
sh: number;
|
|
15
|
+
dx: number;
|
|
16
|
+
dy: number;
|
|
17
|
+
dw: number;
|
|
18
|
+
dh: number;
|
|
19
|
+
z: number;
|
|
20
|
+
};
|
|
21
|
+
export type KittyDrawPlan = {
|
|
22
|
+
underlay: KittyDrawSlice[];
|
|
23
|
+
overlay: KittyDrawSlice[];
|
|
24
|
+
};
|
|
25
|
+
export type KittyRenderRuntimeOptions = CreateKittyImageCacheOptions;
|
|
26
|
+
export type KittyRenderRuntime = {
|
|
27
|
+
collectKittyDrawPlan: (placements: KittyPlacement[], cellW: number, cellH: number) => KittyDrawPlan;
|
|
28
|
+
resolveKittyWebGLTexture: (gl: WebGL2RenderingContext, slice: KittyDrawSlice) => WebGLTexture | null;
|
|
29
|
+
resolveKittyWebGPUBindGroup: (state: WebGPUState, slice: KittyDrawSlice, nearest?: boolean) => GPUBindGroup | null;
|
|
30
|
+
clearWebGLKittyTextures: () => void;
|
|
31
|
+
clearWebGPUKittyTextures: () => void;
|
|
32
|
+
clearKittyRenderCaches: () => void;
|
|
33
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LifecycleThemeSizeDeps } from "./
|
|
1
|
+
import type { LifecycleThemeSizeDeps } from "./types";
|
|
2
2
|
export declare function createLifecycleCanvasHandlers(deps: LifecycleThemeSizeDeps): {
|
|
3
3
|
replaceCanvas: () => void;
|
|
4
4
|
updateSize: (force?: boolean) => void;
|
package/dist/runtime/create-runtime/{lifecycle-theme-size.d.ts → lifecycle-theme-size/index.d.ts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { LifecycleThemeSizeDeps } from "./
|
|
1
|
+
import type { LifecycleThemeSizeDeps } from "./types";
|
|
2
2
|
export declare function createRuntimeLifecycleThemeSize(deps: LifecycleThemeSizeDeps): {
|
|
3
|
-
applyTheme: (theme: import("
|
|
3
|
+
applyTheme: (theme: import("../../..").GhosttyTheme | null | undefined, _sourceLabel?: string) => void;
|
|
4
4
|
resetTheme: () => void;
|
|
5
5
|
replaceCanvas: () => void;
|
|
6
6
|
updateSize: (force?: boolean) => void;
|
|
@@ -12,5 +12,5 @@ export declare function createRuntimeLifecycleThemeSize(deps: LifecycleThemeSize
|
|
|
12
12
|
bindFocusEvents: () => void;
|
|
13
13
|
bindAutoResizeEvents: () => void;
|
|
14
14
|
cancelScheduledSizeUpdate: () => void;
|
|
15
|
-
getActiveTheme: () =>
|
|
15
|
+
getActiveTheme: () => GhosttyTheme | null;
|
|
16
16
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type GhosttyTheme } from "../../../theme";
|
|
2
|
+
import type { LifecycleThemeSizeDeps } from "./types";
|
|
3
|
+
export declare function createLifecycleThemeHandlers(deps: LifecycleThemeSizeDeps): {
|
|
4
|
+
applyTheme: (theme: GhosttyTheme | null | undefined, _sourceLabel?: string) => void;
|
|
5
|
+
resetTheme: () => void;
|
|
6
|
+
};
|
|
@@ -2,9 +2,8 @@ import type { InputHandler } from "../../input";
|
|
|
2
2
|
import type { FontManagerState } from "../../fonts";
|
|
3
3
|
import type { Color, WebGLState, WebGPUState } from "../../renderer";
|
|
4
4
|
import type { GhosttyTheme } from "../../theme";
|
|
5
|
-
import type { RuntimeTerminalColor } from "./highlight-terminal-color-utils";
|
|
5
|
+
import type { RuntimeTerminalColor } from "./highlight-terminal-color-utils.types";
|
|
6
6
|
import type { ResttyWasm } from "../../wasm";
|
|
7
|
-
import type { ResttyAppCallbacks } from "../types";
|
|
8
7
|
export type ActiveState = WebGPUState | WebGLState | null;
|
|
9
8
|
export type GridStateRef = {
|
|
10
9
|
cols: number;
|
|
@@ -35,9 +34,6 @@ export type LifecycleThemeSizeDeps = {
|
|
|
35
34
|
attachWindowEvents: boolean;
|
|
36
35
|
autoResize: boolean;
|
|
37
36
|
imeInput: HTMLTextAreaElement | null;
|
|
38
|
-
dprEl: HTMLElement | null;
|
|
39
|
-
sizeEl: HTMLElement | null;
|
|
40
|
-
callbacks: ResttyAppCallbacks | undefined;
|
|
41
37
|
cleanupFns: Array<() => void>;
|
|
42
38
|
cleanupCanvasFns: Array<() => void>;
|
|
43
39
|
gridState: GridStateRef;
|
|
@@ -74,7 +70,6 @@ export type LifecycleThemeSizeDeps = {
|
|
|
74
70
|
getWasmReady: () => boolean;
|
|
75
71
|
getWasm: () => ResttyWasm | null;
|
|
76
72
|
getWasmHandle: () => number;
|
|
77
|
-
appendLog: (line: string) => void;
|
|
78
73
|
bindCanvasEvents: () => void;
|
|
79
74
|
computeCellMetrics: () => {
|
|
80
75
|
cellW: number;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
+
import type { MaxScrollbackOptions } from "./max-scrollback.types";
|
|
1
2
|
export declare const DEFAULT_MAX_SCROLLBACK_BYTES = 10000000;
|
|
2
3
|
export declare const MAX_MAX_SCROLLBACK_BYTES = 256000000;
|
|
3
|
-
type MaxScrollbackOptions
|
|
4
|
-
maxScrollbackBytes?: number;
|
|
5
|
-
maxScrollback?: number;
|
|
6
|
-
};
|
|
4
|
+
export type { MaxScrollbackOptions } from "./max-scrollback.types";
|
|
7
5
|
export declare function normalizeMaxScrollbackBytes(value: number | undefined): number;
|
|
8
6
|
export declare function resolveMaxScrollbackBytes(options: MaxScrollbackOptions): number;
|
|
9
|
-
export {};
|
|
@@ -1,15 +1,2 @@
|
|
|
1
|
-
type
|
|
2
|
-
|
|
3
|
-
getGridState: () => {
|
|
4
|
-
cellH: number;
|
|
5
|
-
};
|
|
6
|
-
noteScrollActivity: () => void;
|
|
7
|
-
setViewportScrollOffset: (nextOffset: number) => void;
|
|
8
|
-
};
|
|
9
|
-
export type NativeScrollbarHost = {
|
|
10
|
-
flash: () => void;
|
|
11
|
-
sync: (total: number, offset: number, len: number) => void;
|
|
12
|
-
destroy: () => void;
|
|
13
|
-
};
|
|
14
|
-
export declare function createNativeScrollbarHost(options: CreateNativeScrollbarHostOptions): NativeScrollbarHost;
|
|
15
|
-
export {};
|
|
1
|
+
import type { NativeScrollbarHost, NativeScrollbarHostOptions } from "./native-scrollbar-host.types";
|
|
2
|
+
export declare function createNativeScrollbarHost(options: NativeScrollbarHostOptions): NativeScrollbarHost;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type NativeScrollbarHostOptions = {
|
|
2
|
+
canvas: HTMLCanvasElement;
|
|
3
|
+
getGridState: () => {
|
|
4
|
+
cellH: number;
|
|
5
|
+
};
|
|
6
|
+
noteScrollActivity: () => void;
|
|
7
|
+
setViewportScrollOffset: (nextOffset: number) => void;
|
|
8
|
+
};
|
|
9
|
+
export type NativeScrollbarHost = {
|
|
10
|
+
flash: () => void;
|
|
11
|
+
sync: (total: number, offset: number, len: number) => void;
|
|
12
|
+
destroy: () => void;
|
|
13
|
+
};
|
|
@@ -1,17 +1,6 @@
|
|
|
1
|
+
import type { OverlayScrollbarLayout } from "./overlay-scrollbar.types";
|
|
1
2
|
export declare const OVERLAY_SCROLLBAR_WIDTH_CSS_PX = 7;
|
|
2
3
|
export declare const OVERLAY_SCROLLBAR_MARGIN_CSS_PX = 4;
|
|
3
4
|
export declare const OVERLAY_SCROLLBAR_INSET_Y_CSS_PX = 2;
|
|
4
5
|
export declare const OVERLAY_SCROLLBAR_MIN_THUMB_CSS_PX = 28;
|
|
5
|
-
export type OverlayScrollbarLayout = {
|
|
6
|
-
total: number;
|
|
7
|
-
offset: number;
|
|
8
|
-
len: number;
|
|
9
|
-
denom: number;
|
|
10
|
-
width: number;
|
|
11
|
-
trackX: number;
|
|
12
|
-
trackY: number;
|
|
13
|
-
trackH: number;
|
|
14
|
-
thumbY: number;
|
|
15
|
-
thumbH: number;
|
|
16
|
-
};
|
|
17
6
|
export declare function computeOverlayScrollbarLayout(total: number, offset: number, len: number, canvasWidth: number, canvasHeight: number, currentDpr: number): OverlayScrollbarLayout | null;
|
|
@@ -1,46 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
import type { PtyOutputBufferController } from "../pty-output-buffer";
|
|
4
|
-
type CursorPosition = {
|
|
5
|
-
row: number;
|
|
6
|
-
col: number;
|
|
7
|
-
};
|
|
8
|
-
type SendInput = (text: string, source?: string, options?: {
|
|
9
|
-
skipHooks?: boolean;
|
|
10
|
-
}) => void;
|
|
11
|
-
export type CreatePtyInputRuntimeOptions = {
|
|
12
|
-
ptyTransport: PtyTransport;
|
|
13
|
-
ptyOutputBuffer: PtyOutputBufferController;
|
|
14
|
-
inputHandler: InputHandler;
|
|
15
|
-
ptyStatusEl?: HTMLElement | null;
|
|
16
|
-
mouseStatusEl?: HTMLElement | null;
|
|
17
|
-
onPtyStatus?: ((status: string) => void) | null;
|
|
18
|
-
onMouseStatus?: ((status: string) => void) | null;
|
|
19
|
-
appendLog: (line: string) => void;
|
|
20
|
-
getGridSize: () => {
|
|
21
|
-
cols: number;
|
|
22
|
-
rows: number;
|
|
23
|
-
};
|
|
24
|
-
getResizeMeta?: () => PtyResizeMeta | null;
|
|
25
|
-
getCursorForCpr: () => CursorPosition;
|
|
26
|
-
sendInput: SendInput;
|
|
27
|
-
runBeforeInputHook: (text: string, source: string) => string | null;
|
|
28
|
-
shouldClearSelection: () => boolean;
|
|
29
|
-
clearSelection: () => void;
|
|
30
|
-
syncOutputResetMs: number;
|
|
31
|
-
syncOutputResetSeq: string;
|
|
32
|
-
};
|
|
33
|
-
export type PtyInputRuntime = {
|
|
34
|
-
setPtyStatus: (text: string) => void;
|
|
35
|
-
updateMouseStatus: () => void;
|
|
36
|
-
scheduleSyncOutputReset: () => void;
|
|
37
|
-
cancelSyncOutputReset: () => void;
|
|
38
|
-
connectPty: (url?: string) => void;
|
|
39
|
-
disconnectPty: () => void;
|
|
40
|
-
sendKeyInput: (text: string, source?: string) => void;
|
|
41
|
-
sendPasteText: (text: string) => void;
|
|
42
|
-
sendPastePayloadFromDataTransfer: (dataTransfer: DataTransfer | null | undefined) => boolean;
|
|
43
|
-
getCprPosition: () => CursorPosition;
|
|
44
|
-
};
|
|
45
|
-
export declare function createPtyInputRuntime(options: CreatePtyInputRuntimeOptions): PtyInputRuntime;
|
|
46
|
-
export {};
|
|
1
|
+
import type { PtyInputRuntime, PtyInputRuntimeOptions } from "./pty-input-runtime.types";
|
|
2
|
+
export declare function createPtyInputRuntime(options: PtyInputRuntimeOptions): PtyInputRuntime;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { InputHandler } from "../../input";
|
|
2
|
+
import type { PtyResizeMeta, PtyTransport } from "../../pty";
|
|
3
|
+
import type { ResttyRuntimeEvent } from "../core/runtime-events";
|
|
4
|
+
export type CursorPosition = {
|
|
5
|
+
row: number;
|
|
6
|
+
col: number;
|
|
7
|
+
};
|
|
8
|
+
export type RuntimeSendInput = (text: string, source?: string, options?: {
|
|
9
|
+
skipHooks?: boolean;
|
|
10
|
+
}) => void;
|
|
11
|
+
export type PtyInputRuntimeOptions = {
|
|
12
|
+
ptyTransport: PtyTransport;
|
|
13
|
+
inputHandler: InputHandler;
|
|
14
|
+
emitRuntimeEvent?: (event: Extract<ResttyRuntimeEvent, {
|
|
15
|
+
type: "pty-status";
|
|
16
|
+
}>) => void;
|
|
17
|
+
getGridSize: () => {
|
|
18
|
+
cols: number;
|
|
19
|
+
rows: number;
|
|
20
|
+
};
|
|
21
|
+
getResizeMeta?: () => PtyResizeMeta | null;
|
|
22
|
+
getCursorForCpr: () => CursorPosition;
|
|
23
|
+
sendInput: RuntimeSendInput;
|
|
24
|
+
runBeforeInputHook: (text: string, source: string) => string | null;
|
|
25
|
+
shouldClearSelection: () => boolean;
|
|
26
|
+
clearSelection: () => void;
|
|
27
|
+
syncOutputResetMs: number;
|
|
28
|
+
syncOutputResetSeq: string;
|
|
29
|
+
};
|
|
30
|
+
export type PtyInputRuntime = {
|
|
31
|
+
setPtyStatus: (text: string) => void;
|
|
32
|
+
updateMouseStatus: () => void;
|
|
33
|
+
scheduleSyncOutputReset: () => void;
|
|
34
|
+
cancelSyncOutputReset: () => void;
|
|
35
|
+
connectPty: (url?: string) => void;
|
|
36
|
+
disconnectPty: () => void;
|
|
37
|
+
sendKeyInput: (text: string, source?: string) => void;
|
|
38
|
+
sendPasteText: (text: string) => void;
|
|
39
|
+
sendPastePayloadFromDataTransfer: (dataTransfer: DataTransfer | null | undefined) => boolean;
|
|
40
|
+
getCprPosition: () => CursorPosition;
|
|
41
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Color } from "
|
|
1
|
+
import type { Color } from "../../renderer";
|
|
2
2
|
export declare function decodePackedRGBA(color: number): Color;
|
|
3
3
|
export declare function decodeRGBAWithCache(bytes: Uint8Array, index: number, cache: Map<number, Color>): Color;
|
|
4
4
|
export declare function clamp01(value: number): number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CompiledWebGPUShaderStage, WebGPUStageTargets, CompiledWebGLShaderStage, WebGLStageTargets } from "./
|
|
2
|
-
import type { ResttyShaderStage } from "
|
|
1
|
+
import type { CompiledWebGPUShaderStage, WebGPUStageTargets, CompiledWebGLShaderStage, WebGLStageTargets } from "./render-stage-runtime.types";
|
|
2
|
+
import type { ResttyShaderStage } from "../core/models";
|
|
3
3
|
export declare function compileShaderStageProgram(options: {
|
|
4
4
|
gl: WebGL2RenderingContext;
|
|
5
5
|
stage: ResttyShaderStage;
|
package/dist/runtime/{create-app-types.d.ts → create-runtime/render-stage-runtime.types.d.ts}
RENAMED
|
@@ -1,32 +1,4 @@
|
|
|
1
|
-
import type { ResttyShaderStage } from "
|
|
2
|
-
export type LocalFontsPermissionDescriptor = PermissionDescriptor & {
|
|
3
|
-
name: "local-fonts";
|
|
4
|
-
};
|
|
5
|
-
export type LocalFontFaceData = {
|
|
6
|
-
family?: string;
|
|
7
|
-
fullName?: string;
|
|
8
|
-
postscriptName?: string;
|
|
9
|
-
blob: () => Promise<Blob>;
|
|
10
|
-
};
|
|
11
|
-
export type NavigatorWithLocalFontAccess = Navigator & {
|
|
12
|
-
queryLocalFonts?: () => Promise<LocalFontFaceData[]>;
|
|
13
|
-
permissions?: {
|
|
14
|
-
query?: (permissionDesc: LocalFontsPermissionDescriptor) => Promise<PermissionStatus>;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export type GlobalWithLocalFontAccess = typeof globalThis & {
|
|
18
|
-
queryLocalFonts?: () => Promise<LocalFontFaceData[]>;
|
|
19
|
-
navigator?: NavigatorWithLocalFontAccess;
|
|
20
|
-
};
|
|
21
|
-
export type ResttyDebugWindow = Window & typeof globalThis & {
|
|
22
|
-
diagnoseCodepoint?: (cp: number) => void;
|
|
23
|
-
dumpGlyphMetrics?: (cp: number) => {
|
|
24
|
-
fontIndex: number;
|
|
25
|
-
glyphId: number;
|
|
26
|
-
} | null;
|
|
27
|
-
dumpAtlasRegion?: (fontIndex: number, x: number, y: number, width: number, height: number) => Promise<ImageData | null>;
|
|
28
|
-
dumpGlyphRender?: (cp: number, constraintWidth?: number) => Promise<unknown>;
|
|
29
|
-
};
|
|
1
|
+
import type { ResttyShaderStage } from "../core/models";
|
|
30
2
|
export type CompiledWebGPUShaderStage = {
|
|
31
3
|
stage: ResttyShaderStage;
|
|
32
4
|
pipeline: GPURenderPipeline;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { WebGLTickContext } from "./render-tick-webgl
|
|
1
|
+
import type { WebGLTickContext } from "./render-tick-webgl.types";
|
|
2
2
|
export declare function populateWebGLOverlays(ctx: WebGLTickContext): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { WebGLTickContext } from "./render-tick-webgl
|
|
1
|
+
import type { WebGLTickContext } from "./render-tick-webgl.types";
|
|
2
2
|
export declare function populateWebGLSceneData(ctx: WebGLTickContext): void;
|