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
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ResttyFontInput } from "../../runtime/core/models";
|
|
2
|
+
import { type ResttyPluginSurfaceBridgeSource } from "./plugin-surface";
|
|
3
|
+
import { ResttyController } from "./controller";
|
|
4
|
+
import type { ResttyConfig } from "./config";
|
|
5
|
+
import type { ResttyPaneApi } from "./pane-handle";
|
|
6
|
+
import { ResttyShaderOps } from "./shader-ops";
|
|
7
|
+
type CreateResttySurfaceAssemblyOptions = {
|
|
8
|
+
restty: ResttyPluginSurfaceBridgeSource;
|
|
9
|
+
forEachPane: (visitor: (pane: Pick<ResttyPaneApi, "id" | "setShaderStages">) => void) => void;
|
|
10
|
+
getPaneHandleById: (id: number) => Pick<ResttyPaneApi, "id" | "setShaderStages"> | null;
|
|
11
|
+
getFonts: () => ResttyFontInput[] | undefined;
|
|
12
|
+
terminal: ResttyConfig["terminal"];
|
|
13
|
+
services: ResttyConfig["services"];
|
|
14
|
+
events: NonNullable<NonNullable<ResttyConfig["surface"]>["events"]> | undefined;
|
|
15
|
+
};
|
|
16
|
+
export declare function createResttySurfaceAssembly({ restty, forEachPane, getPaneHandleById, getFonts, terminal, services, events, }: CreateResttySurfaceAssemblyOptions): {
|
|
17
|
+
mergedTerminalConfig: import("../panes/managed-pane-types").ResttyTerminalConfigInput;
|
|
18
|
+
mergedServicesConfig: import("../panes/managed-pane-types").ResttyRuntimeServicesConfigInput;
|
|
19
|
+
paneManagerEventHandlers: import("./manager-options.types").PaneManagerEventHandlers;
|
|
20
|
+
shaderOps: ResttyShaderOps;
|
|
21
|
+
controller: ResttyController;
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ResttyFontInput } from "../../runtime/core/models";
|
|
2
|
+
import type { ResttyManagedPaneManager } from "../panes/managed-pane-types";
|
|
3
|
+
import type { ResttyConfig } from "./config";
|
|
4
|
+
import type { ResttyPaneApi } from "./pane-handle";
|
|
5
|
+
import type { ResttyPluginSurfaceBridgeSource } from "./plugin-surface";
|
|
6
|
+
import { ResttyController } from "./controller";
|
|
7
|
+
import { ResttyShaderOps } from "./shader-ops";
|
|
8
|
+
type BootstrapResttySurfaceOptions = {
|
|
9
|
+
restty: ResttyPluginSurfaceBridgeSource;
|
|
10
|
+
forEachPane: (visitor: (pane: Pick<ResttyPaneApi, "id" | "setShaderStages">) => void) => void;
|
|
11
|
+
getPaneHandleById: (id: number) => Pick<ResttyPaneApi, "id" | "setShaderStages"> | null;
|
|
12
|
+
getFonts: () => ResttyFontInput[] | undefined;
|
|
13
|
+
options: ResttyConfig;
|
|
14
|
+
};
|
|
15
|
+
export declare function bootstrapResttySurface({ restty, forEachPane, getPaneHandleById, getFonts, options, }: BootstrapResttySurfaceOptions): {
|
|
16
|
+
shaderOps: ResttyShaderOps;
|
|
17
|
+
controller: ResttyController;
|
|
18
|
+
paneManager: ResttyManagedPaneManager;
|
|
19
|
+
createInitialPane: NonNullable<ResttyConfig["surface"]>["createInitialPane"];
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ResttyRuntimeServicesConfig } from "../../runtime/core/config";
|
|
2
|
+
import type { ResttyRuntimeSession } from "../../runtime/core/resources";
|
|
3
|
+
import type { ResttyDefaultPaneContextMenuOptions, ResttyManagedPaneSearchUiOptions, ResttyManagedPaneStylesOptions, ResttyPaneDomDefaults, ResttyPaneRuntimeContext, ResttyTerminalConfigInput } from "../panes/managed-pane-types";
|
|
4
|
+
import type { ResttyPaneContextMenuOptions, ResttyPaneShortcutsOptions } from "../panes/types";
|
|
5
|
+
import type { ResttySurfaceEvents, ResttySurfacePane } from "./events";
|
|
6
|
+
export type ResttySurfaceConfig = {
|
|
7
|
+
/** Override default CSS class names for pane DOM elements. */
|
|
8
|
+
paneDom?: ResttyPaneDomDefaults;
|
|
9
|
+
/** Automatically call runtime.lifecycle.init() after pane creation (default true). */
|
|
10
|
+
autoInit?: boolean;
|
|
11
|
+
/** Minimum pane size in pixels during split-resize (default 96). */
|
|
12
|
+
minPaneSize?: number;
|
|
13
|
+
/** Enable or configure built-in pane CSS styles. */
|
|
14
|
+
paneStyles?: boolean | ResttyManagedPaneStylesOptions;
|
|
15
|
+
/** Enable or configure the built-in pane search UI. */
|
|
16
|
+
searchUi?: boolean | ResttyManagedPaneSearchUiOptions;
|
|
17
|
+
/** Enable or configure keyboard shortcuts for splitting. */
|
|
18
|
+
shortcuts?: boolean | ResttyPaneShortcutsOptions;
|
|
19
|
+
/** Custom context menu implementation (overrides defaultContextMenu). */
|
|
20
|
+
contextMenu?: ResttyPaneContextMenuOptions<ResttySurfacePane> | null;
|
|
21
|
+
/** Enable or configure the built-in default context menu. */
|
|
22
|
+
defaultContextMenu?: boolean | ResttyDefaultPaneContextMenuOptions;
|
|
23
|
+
/** Whether to create the first pane automatically (default true). */
|
|
24
|
+
createInitialPane?: boolean | {
|
|
25
|
+
focus?: boolean;
|
|
26
|
+
};
|
|
27
|
+
/** Surface lifecycle and pane-layout event handlers. */
|
|
28
|
+
events?: ResttySurfaceEvents;
|
|
29
|
+
};
|
|
30
|
+
export type ResttyServicesConfig = ResttyRuntimeServicesConfig;
|
|
31
|
+
export type ResttyServicesConfigInput = ResttyServicesConfig | ((context: ResttyPaneRuntimeContext) => ResttyServicesConfig);
|
|
32
|
+
/**
|
|
33
|
+
* Top-level configuration for creating a Restty instance.
|
|
34
|
+
*/
|
|
35
|
+
export type ResttyConfig = {
|
|
36
|
+
/** Root element that will contain the Restty surface. */
|
|
37
|
+
root: HTMLElement;
|
|
38
|
+
/** Shared session for WASM/WebGPU resources. */
|
|
39
|
+
session?: ResttyRuntimeSession;
|
|
40
|
+
/** Surface shell and pane manager behavior. */
|
|
41
|
+
surface?: ResttySurfaceConfig;
|
|
42
|
+
/** Per-pane terminal behavior config, static or factory. */
|
|
43
|
+
terminal?: ResttyTerminalConfigInput;
|
|
44
|
+
/** Per-pane services/hooks config, static or factory. */
|
|
45
|
+
services?: ResttyServicesConfigInput;
|
|
46
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ResttyPaneSplitDirection } from "../panes/types";
|
|
2
|
+
import type { ResttyPluginHostDeps } from "../plugins/dispatcher.types";
|
|
3
|
+
import type { ResttyLifecycleHookPayload, ResttyPlugin, ResttyPluginHostApi, ResttyRenderHookPayload } from "../plugins/context.types";
|
|
4
|
+
import type { ResttyPluginEvents, ResttyPluginInfo, ResttyPluginLoadResult, ResttyPluginManifestEntry, ResttyPluginRegistry } from "../plugins/types";
|
|
5
|
+
type PaneIdentity = {
|
|
6
|
+
id: number;
|
|
7
|
+
};
|
|
8
|
+
export type ResttyPluginSurfaceApiSource<TPaneIdentity extends PaneIdentity = PaneIdentity> = Omit<ResttyPluginHostApi, "createInitialPane" | "splitActivePane" | "splitPane"> & {
|
|
9
|
+
createInitialPane: (options?: {
|
|
10
|
+
focus?: boolean;
|
|
11
|
+
}) => TPaneIdentity;
|
|
12
|
+
splitActivePane: (direction: ResttyPaneSplitDirection) => TPaneIdentity | null;
|
|
13
|
+
splitPane: (id: number, direction: ResttyPaneSplitDirection) => TPaneIdentity | null;
|
|
14
|
+
};
|
|
15
|
+
type ResttyLifecycleHooks = {
|
|
16
|
+
runLifecycleHooks: (payload: ResttyLifecycleHookPayload) => void;
|
|
17
|
+
};
|
|
18
|
+
type ResttyLifecycleAndPluginHooks = ResttyLifecycleHooks & {
|
|
19
|
+
emitPluginEvent: <E extends keyof ResttyPluginEvents>(event: E, payload: ResttyPluginEvents[E]) => void;
|
|
20
|
+
};
|
|
21
|
+
type ResttyPaneManagerHooks = {
|
|
22
|
+
runRenderHooks: (payload: ResttyRenderHookPayload) => void;
|
|
23
|
+
emitPluginEvent: <E extends keyof ResttyPluginEvents>(event: E, payload: ResttyPluginEvents[E]) => void;
|
|
24
|
+
};
|
|
25
|
+
export declare function createResttyPluginSurfaceApi(source: ResttyPluginSurfaceApiSource): ResttyPluginHostApi;
|
|
26
|
+
export declare class ResttyController {
|
|
27
|
+
private readonly pluginHost;
|
|
28
|
+
readonly lifecycleHooks: ResttyLifecycleHooks;
|
|
29
|
+
readonly lifecycleAndPluginHooks: ResttyLifecycleAndPluginHooks;
|
|
30
|
+
readonly paneManagerHooks: ResttyPaneManagerHooks;
|
|
31
|
+
constructor(deps: ResttyPluginHostDeps);
|
|
32
|
+
use(plugin: ResttyPlugin, options?: unknown): Promise<void>;
|
|
33
|
+
loadPlugins(manifest: ReadonlyArray<ResttyPluginManifestEntry>, registry: ResttyPluginRegistry): Promise<ResttyPluginLoadResult[]>;
|
|
34
|
+
unuse(pluginId: string): boolean;
|
|
35
|
+
plugins(): string[];
|
|
36
|
+
pluginInfo(pluginId: string): ResttyPluginInfo | null;
|
|
37
|
+
pluginInfo(): ResttyPluginInfo[];
|
|
38
|
+
applyInputInterceptors(paneId: number, text: string, source: string): string | null;
|
|
39
|
+
applyOutputInterceptors(paneId: number, text: string, source: string): string | null;
|
|
40
|
+
runLifecycleHooks(payload: ResttyLifecycleHookPayload): void;
|
|
41
|
+
runRenderHooks(payload: ResttyRenderHookPayload): void;
|
|
42
|
+
emitPluginEvent<E extends keyof ResttyPluginEvents>(event: E, payload: ResttyPluginEvents[E]): void;
|
|
43
|
+
destroy(): void;
|
|
44
|
+
}
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { DesktopNotification } from "../../input";
|
|
2
|
+
import type { ResttyPaneSplitDirection, ResttyPaneWithRuntime } from "../panes/types";
|
|
3
|
+
export type ResttySurfacePane = ResttyPaneWithRuntime;
|
|
4
|
+
export type ResttySurfaceEvents = {
|
|
5
|
+
onPaneCreated?: (pane: ResttySurfacePane) => void;
|
|
6
|
+
onPaneClosed?: (pane: ResttySurfacePane) => void;
|
|
7
|
+
onPaneSplit?: (sourcePane: ResttySurfacePane, createdPane: ResttySurfacePane, direction: ResttyPaneSplitDirection) => void;
|
|
8
|
+
onActivePaneChange?: (pane: ResttySurfacePane | null) => void;
|
|
9
|
+
onLayoutChanged?: () => void;
|
|
10
|
+
/** Global handler for desktop notifications emitted by any pane. */
|
|
11
|
+
onDesktopNotification?: (notification: DesktopNotification & {
|
|
12
|
+
paneId: number;
|
|
13
|
+
}) => void;
|
|
14
|
+
};
|
|
@@ -1,24 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import type { ResttyPluginOps } from "./plugin-ops";
|
|
6
|
-
import type { ResttyShaderOps } from "./shader-ops";
|
|
7
|
-
type PaneManagerEventHandlers = Pick<CreateResttyAppPaneManagerOptions, "onPaneCreated" | "onPaneClosed" | "onPaneSplit" | "onActivePaneChange" | "onLayoutChanged">;
|
|
8
|
-
type MergedPaneAppOptionsDeps = {
|
|
9
|
-
appOptions: CreateResttyAppPaneManagerOptions["appOptions"] | undefined;
|
|
10
|
-
getFontSources: () => ResttyFontSource[] | undefined;
|
|
11
|
-
onDesktopNotification?: (notification: DesktopNotification & {
|
|
12
|
-
paneId: number;
|
|
13
|
-
}) => void;
|
|
14
|
-
shaderOps: Pick<ResttyShaderOps, "normalizePaneShaderStages" | "setPaneBaseShaderStages" | "buildMergedShaderStages">;
|
|
15
|
-
pluginOps: Pick<ResttyPluginOps, "applyInputInterceptors" | "applyOutputInterceptors">;
|
|
16
|
-
runRenderHooks: (payload: ResttyRenderHookPayload) => void;
|
|
17
|
-
};
|
|
18
|
-
type PaneManagerCallbacksDeps = PaneManagerEventHandlers & {
|
|
19
|
-
shaderOps: Pick<ResttyShaderOps, "syncPaneShaderStages" | "removePaneBaseShaderStages">;
|
|
20
|
-
emitPluginEvent: <E extends keyof ResttyPluginEvents>(event: E, payload: ResttyPluginEvents[E]) => void;
|
|
21
|
-
};
|
|
22
|
-
export declare function createMergedPaneAppOptions(deps: MergedPaneAppOptionsDeps): CreateResttyAppPaneManagerOptions["appOptions"];
|
|
1
|
+
import type { ResttyRuntimeServicesConfigInput, ResttyTerminalConfigInput } from "../panes/managed-pane-types";
|
|
2
|
+
import type { MergedPaneServicesConfigDeps, MergedPaneTerminalConfigDeps, PaneManagerCallbacksDeps, PaneManagerEventHandlers } from "./manager-options.types";
|
|
3
|
+
export declare function createMergedPaneTerminalConfig(deps: MergedPaneTerminalConfigDeps): ResttyTerminalConfigInput;
|
|
4
|
+
export declare function createMergedPaneServicesConfig(deps: MergedPaneServicesConfigDeps): ResttyRuntimeServicesConfigInput;
|
|
23
5
|
export declare function createPaneManagerEventHandlers(deps: PaneManagerCallbacksDeps): PaneManagerEventHandlers;
|
|
24
|
-
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { DesktopNotification } from "../../input";
|
|
2
|
+
import type { ResttyFontInput } from "../../runtime/core/models";
|
|
3
|
+
import type { ResttyPluginHost } from "../plugins/host";
|
|
4
|
+
import type { ResttyRenderHookPayload } from "../plugins/context.types";
|
|
5
|
+
import type { ResttyPluginEvents } from "../plugins/types";
|
|
6
|
+
import type { ResttyManagedPane, ResttyRuntimeServicesConfigInput, ResttyTerminalConfigInput } from "../panes/managed-pane-types";
|
|
7
|
+
import type { ResttyPaneSplitDirection } from "../panes/types";
|
|
8
|
+
import type { ResttyShaderOps } from "./shader-ops";
|
|
9
|
+
export type PaneManagerEventHandlers = {
|
|
10
|
+
onPaneCreated?: (pane: ResttyManagedPane) => void;
|
|
11
|
+
onPaneClosed?: (pane: ResttyManagedPane) => void;
|
|
12
|
+
onPaneSplit?: (sourcePane: ResttyManagedPane, createdPane: ResttyManagedPane, direction: ResttyPaneSplitDirection) => void;
|
|
13
|
+
onActivePaneChange?: (pane: ResttyManagedPane | null) => void;
|
|
14
|
+
onLayoutChanged?: () => void;
|
|
15
|
+
};
|
|
16
|
+
export type MergedPaneTerminalConfigDeps = {
|
|
17
|
+
terminal: ResttyTerminalConfigInput | undefined;
|
|
18
|
+
getFonts: () => ResttyFontInput[] | undefined;
|
|
19
|
+
shaderOps: Pick<ResttyShaderOps, "normalizePaneShaderStages" | "setPaneBaseShaderStages" | "buildMergedShaderStages">;
|
|
20
|
+
};
|
|
21
|
+
export type MergedPaneServicesConfigDeps = {
|
|
22
|
+
services: ResttyRuntimeServicesConfigInput | undefined;
|
|
23
|
+
onDesktopNotification?: (notification: DesktopNotification & {
|
|
24
|
+
paneId: number;
|
|
25
|
+
}) => void;
|
|
26
|
+
pluginHost: Pick<ResttyPluginHost, "applyInputInterceptors" | "applyOutputInterceptors">;
|
|
27
|
+
runRenderHooks: (payload: ResttyRenderHookPayload) => void;
|
|
28
|
+
};
|
|
29
|
+
export type PaneManagerCallbacksDeps = PaneManagerEventHandlers & {
|
|
30
|
+
shaderOps: Pick<ResttyShaderOps, "syncPaneShaderStages" | "removePaneBaseShaderStages">;
|
|
31
|
+
emitPluginEvent: <E extends keyof ResttyPluginEvents>(event: E, payload: ResttyPluginEvents[E]) => void;
|
|
32
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ResttyManagedPane } from "../panes/managed-pane-types";
|
|
2
|
+
import type { ResttyPaneManager, ResttyPaneSplitDirection } from "../panes/types";
|
|
3
|
+
import type { ResttyLifecycleHookPayload } from "../plugins/context.types";
|
|
4
|
+
import type { ResttyPluginEvents } from "../plugins/types";
|
|
5
|
+
type ResttyPaneLookup = {
|
|
6
|
+
getPaneById: (id: number) => ResttyManagedPane | null;
|
|
7
|
+
getActivePane: () => ResttyManagedPane | null;
|
|
8
|
+
getFocusedPane: () => ResttyManagedPane | null;
|
|
9
|
+
openPaneSearch: (id: number) => void;
|
|
10
|
+
closePaneSearch: (id: number) => void;
|
|
11
|
+
togglePaneSearch: (id: number) => void;
|
|
12
|
+
isPaneSearchOpen: (id: number) => boolean;
|
|
13
|
+
getSearchUiStyleOptions: () => Readonly<object>;
|
|
14
|
+
setSearchUiStyleOptions: (options: object) => void;
|
|
15
|
+
};
|
|
16
|
+
type ResttyLifecycleEmitter = {
|
|
17
|
+
runLifecycleHooks: (payload: ResttyLifecycleHookPayload) => void;
|
|
18
|
+
emitPluginEvent: <E extends keyof ResttyPluginEvents>(event: E, payload: ResttyPluginEvents[E]) => void;
|
|
19
|
+
};
|
|
20
|
+
export declare function createInitialPane(paneManager: ResttyPaneManager<ResttyManagedPane>, hooks: Pick<ResttyLifecycleEmitter, "runLifecycleHooks">, options?: {
|
|
21
|
+
focus?: boolean;
|
|
22
|
+
}): ResttyManagedPane;
|
|
23
|
+
export declare function splitActivePane(paneManager: ResttyPaneManager<ResttyManagedPane>, lookup: Pick<ResttyPaneLookup, "getActivePane">, hooks: Pick<ResttyLifecycleEmitter, "runLifecycleHooks">, direction: ResttyPaneSplitDirection): ResttyManagedPane | null;
|
|
24
|
+
export declare function splitPane(paneManager: ResttyPaneManager<ResttyManagedPane>, hooks: Pick<ResttyLifecycleEmitter, "runLifecycleHooks">, id: number, direction: ResttyPaneSplitDirection): ResttyManagedPane | null;
|
|
25
|
+
export declare function closePane(paneManager: ResttyPaneManager<ResttyManagedPane>, hooks: Pick<ResttyLifecycleEmitter, "runLifecycleHooks">, id: number): boolean;
|
|
26
|
+
export declare function setActivePane(paneManager: ResttyPaneManager<ResttyManagedPane>, lookup: Pick<ResttyPaneLookup, "getActivePane">, hooks: Pick<ResttyLifecycleEmitter, "runLifecycleHooks">, id: number, options?: {
|
|
27
|
+
focus?: boolean;
|
|
28
|
+
}): void;
|
|
29
|
+
export declare function markPaneFocused(paneManager: ResttyPaneManager<ResttyManagedPane>, lookup: Pick<ResttyPaneLookup, "getFocusedPane">, hooks: Pick<ResttyLifecycleEmitter, "runLifecycleHooks">, id: number, options?: {
|
|
30
|
+
focus?: boolean;
|
|
31
|
+
}): void;
|
|
32
|
+
export declare function connectPty(lookup: Pick<ResttyPaneLookup, "getActivePane" | "getPaneById">, hooks: Pick<ResttyLifecycleEmitter, "runLifecycleHooks">, url?: string): void;
|
|
33
|
+
export declare function disconnectPty(lookup: Pick<ResttyPaneLookup, "getActivePane" | "getPaneById">, hooks: Pick<ResttyLifecycleEmitter, "runLifecycleHooks">): void;
|
|
34
|
+
export declare function resize(lookup: Pick<ResttyPaneLookup, "getActivePane" | "getPaneById">, hooks: ResttyLifecycleEmitter, cols: number, rows: number): void;
|
|
35
|
+
export declare function focus(lookup: Pick<ResttyPaneLookup, "getActivePane" | "getPaneById">, hooks: ResttyLifecycleEmitter): void;
|
|
36
|
+
export declare function blur(lookup: Pick<ResttyPaneLookup, "getActivePane" | "getPaneById">, hooks: ResttyLifecycleEmitter): void;
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ResttyManagedPane, ResttyManagedPaneSearchUiStyleOptions } from "../panes/managed-pane-types";
|
|
2
|
+
import { ResttyPaneHandle } from "./pane-handle";
|
|
3
|
+
import type { ResttyPaneSearchUiCloseOptions, ResttyPaneSearchUiOpenOptions } from "../search-ui";
|
|
4
|
+
type ResttyPaneLookup = {
|
|
5
|
+
getPanes: () => ResttyManagedPane[];
|
|
6
|
+
getPaneById: (id: number) => ResttyManagedPane | null;
|
|
7
|
+
getActivePane: () => ResttyManagedPane | null;
|
|
8
|
+
getFocusedPane: () => ResttyManagedPane | null;
|
|
9
|
+
openPaneSearch: (id: number, options?: ResttyPaneSearchUiOpenOptions) => void;
|
|
10
|
+
closePaneSearch: (id: number, options?: ResttyPaneSearchUiCloseOptions) => void;
|
|
11
|
+
togglePaneSearch: (id: number, options?: ResttyPaneSearchUiOpenOptions & ResttyPaneSearchUiCloseOptions) => void;
|
|
12
|
+
isPaneSearchOpen: (id: number) => boolean;
|
|
13
|
+
getSearchUiStyleOptions: () => Readonly<Required<ResttyManagedPaneSearchUiStyleOptions>>;
|
|
14
|
+
setSearchUiStyleOptions: (options: ResttyManagedPaneSearchUiStyleOptions) => void;
|
|
15
|
+
};
|
|
16
|
+
export declare function requirePaneById(getPaneById: (id: number) => ResttyManagedPane | null, id: number): ResttyManagedPane;
|
|
17
|
+
export declare function makePaneHandle(lookup: Pick<ResttyPaneLookup, "getPaneById" | "openPaneSearch" | "closePaneSearch" | "togglePaneSearch" | "isPaneSearchOpen" | "getSearchUiStyleOptions" | "setSearchUiStyleOptions">, id: number): ResttyPaneHandle;
|
|
18
|
+
export declare function requireActivePaneHandle(lookup: Pick<ResttyPaneLookup, "getActivePane" | "getPaneById" | "openPaneSearch" | "closePaneSearch" | "togglePaneSearch" | "isPaneSearchOpen" | "getSearchUiStyleOptions" | "setSearchUiStyleOptions">): ResttyPaneHandle;
|
|
19
|
+
export declare function panes(lookup: Pick<ResttyPaneLookup, "getPanes" | "getPaneById" | "openPaneSearch" | "closePaneSearch" | "togglePaneSearch" | "isPaneSearchOpen" | "getSearchUiStyleOptions" | "setSearchUiStyleOptions">): ResttyPaneHandle[];
|
|
20
|
+
export declare function pane(lookup: Pick<ResttyPaneLookup, "getPaneById" | "openPaneSearch" | "closePaneSearch" | "togglePaneSearch" | "isPaneSearchOpen" | "getSearchUiStyleOptions" | "setSearchUiStyleOptions">, id: number): ResttyPaneHandle | null;
|
|
21
|
+
export declare function activePane(lookup: Pick<ResttyPaneLookup, "getActivePane" | "getPaneById" | "openPaneSearch" | "closePaneSearch" | "togglePaneSearch" | "isPaneSearchOpen" | "getSearchUiStyleOptions" | "setSearchUiStyleOptions">): ResttyPaneHandle | null;
|
|
22
|
+
export declare function focusedPane(lookup: Pick<ResttyPaneLookup, "getFocusedPane" | "getPaneById" | "openPaneSearch" | "closePaneSearch" | "togglePaneSearch" | "isPaneSearchOpen" | "getSearchUiStyleOptions" | "setSearchUiStyleOptions">): ResttyPaneHandle | null;
|
|
23
|
+
export declare function forEachPane(lookup: Pick<ResttyPaneLookup, "getPanes" | "getPaneById" | "openPaneSearch" | "closePaneSearch" | "togglePaneSearch" | "isPaneSearchOpen" | "getSearchUiStyleOptions" | "setSearchUiStyleOptions">, visitor: (pane: ResttyPaneHandle) => void): void;
|
|
24
|
+
export {};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type { ResttySearchState, ResttyShaderStage } from "../runtime/types";
|
|
5
|
-
import type { ResttyPaneSearchUiCloseOptions, ResttyPaneSearchUiOpenOptions } from "./pane-search-ui";
|
|
1
|
+
import type { ResttyManagedPane, ResttyManagedPaneSearchUiStyleOptions } from "../panes/managed-pane-types";
|
|
2
|
+
import type { ResttyRuntimeInteractionApi, ResttyRuntimeIoApi, ResttyRuntimeRenderApi, ResttyRuntimeSearchApi, ResttyRuntimeTerminalApi } from "../../runtime/core/api";
|
|
3
|
+
import type { ResttyPaneSearchUiCloseOptions, ResttyPaneSearchUiOpenOptions } from "../search-ui";
|
|
6
4
|
type PaneSearchUiHandleOps = {
|
|
7
5
|
open: (paneId: number, options?: ResttyPaneSearchUiOpenOptions) => void;
|
|
8
6
|
close: (paneId: number, options?: ResttyPaneSearchUiCloseOptions) => void;
|
|
@@ -16,58 +14,64 @@ type PaneSearchUiHandleOps = {
|
|
|
16
14
|
*/
|
|
17
15
|
export type ResttyPaneApi = {
|
|
18
16
|
id: number;
|
|
19
|
-
setRenderer:
|
|
20
|
-
setPaused:
|
|
21
|
-
togglePause:
|
|
22
|
-
setFontSize:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
17
|
+
setRenderer: ResttyRuntimeTerminalApi["setRenderer"];
|
|
18
|
+
setPaused: ResttyRuntimeTerminalApi["setPaused"];
|
|
19
|
+
togglePause: ResttyRuntimeTerminalApi["togglePause"];
|
|
20
|
+
setFontSize: ResttyRuntimeTerminalApi["setFontSize"];
|
|
21
|
+
setLigatures: ResttyRuntimeTerminalApi["setLigatures"];
|
|
22
|
+
setFontHinting: ResttyRuntimeTerminalApi["setFontHinting"];
|
|
23
|
+
setFontHintTarget: ResttyRuntimeTerminalApi["setFontHintTarget"];
|
|
24
|
+
setFonts: ResttyRuntimeTerminalApi["setFonts"];
|
|
25
|
+
applyTheme: ResttyRuntimeTerminalApi["applyTheme"];
|
|
26
|
+
resetTheme: ResttyRuntimeTerminalApi["resetTheme"];
|
|
27
|
+
sendInput: ResttyRuntimeIoApi["sendInput"];
|
|
28
|
+
sendKeyInput: ResttyRuntimeIoApi["sendKeyInput"];
|
|
29
|
+
clearScreen: ResttyRuntimeTerminalApi["clearScreen"];
|
|
30
|
+
connectPty: ResttyRuntimeIoApi["connectPty"];
|
|
31
|
+
disconnectPty: ResttyRuntimeIoApi["disconnectPty"];
|
|
32
|
+
isPtyConnected: ResttyRuntimeIoApi["isPtyConnected"];
|
|
33
|
+
setMouseMode: ResttyRuntimeInteractionApi["setMouseMode"];
|
|
34
|
+
getMouseStatus: ResttyRuntimeInteractionApi["getMouseStatus"];
|
|
35
|
+
copySelectionToClipboard: ResttyRuntimeInteractionApi["copySelectionToClipboard"];
|
|
36
|
+
pasteFromClipboard: ResttyRuntimeInteractionApi["pasteFromClipboard"];
|
|
37
|
+
selectWordAtClientPoint: ResttyRuntimeInteractionApi["selectWordAtClientPoint"];
|
|
38
|
+
setSearchQuery: ResttyRuntimeSearchApi["setQuery"];
|
|
39
|
+
clearSearch: ResttyRuntimeSearchApi["clear"];
|
|
40
|
+
searchNext: ResttyRuntimeSearchApi["next"];
|
|
41
|
+
searchPrevious: ResttyRuntimeSearchApi["previous"];
|
|
42
|
+
getSearchState: ResttyRuntimeSearchApi["getState"];
|
|
41
43
|
openSearch: (options?: ResttyPaneSearchUiOpenOptions) => void;
|
|
42
44
|
closeSearch: (options?: ResttyPaneSearchUiCloseOptions) => void;
|
|
43
45
|
toggleSearch: (options?: ResttyPaneSearchUiOpenOptions & ResttyPaneSearchUiCloseOptions) => void;
|
|
44
46
|
isSearchOpen: () => boolean;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
getBackend: () => string;
|
|
47
|
+
resize: ResttyRuntimeInteractionApi["resize"];
|
|
48
|
+
focus: ResttyRuntimeInteractionApi["focus"];
|
|
49
|
+
blur: ResttyRuntimeInteractionApi["blur"];
|
|
50
|
+
updateSize: ResttyRuntimeInteractionApi["updateSize"];
|
|
51
|
+
getBackend: ResttyRuntimeRenderApi["getBackend"];
|
|
51
52
|
getSearchUiStyleOptions: () => Readonly<Required<ResttyManagedPaneSearchUiStyleOptions>>;
|
|
52
53
|
setSearchUiStyleOptions: (options: ResttyManagedPaneSearchUiStyleOptions) => void;
|
|
53
|
-
setShaderStages:
|
|
54
|
-
getShaderStages:
|
|
55
|
-
getRawPane: () => ResttyManagedAppPane;
|
|
54
|
+
setShaderStages: ResttyRuntimeRenderApi["setShaderStages"];
|
|
55
|
+
getShaderStages: ResttyRuntimeRenderApi["getShaderStages"];
|
|
56
56
|
};
|
|
57
57
|
/**
|
|
58
58
|
* Thin wrapper around a managed pane that delegates calls to the
|
|
59
|
-
* underlying
|
|
59
|
+
* underlying runtime. Resolves the pane lazily so it stays valid across
|
|
60
60
|
* layout changes.
|
|
61
61
|
*/
|
|
62
62
|
export declare class ResttyPaneHandle implements ResttyPaneApi {
|
|
63
63
|
private readonly resolvePane;
|
|
64
64
|
private readonly searchUiOps;
|
|
65
|
-
constructor(resolvePane: () =>
|
|
65
|
+
constructor(resolvePane: () => ResttyManagedPane, searchUiOps: PaneSearchUiHandleOps);
|
|
66
66
|
get id(): number;
|
|
67
67
|
setRenderer(value: "auto" | "webgpu" | "webgl2"): void;
|
|
68
68
|
setPaused(value: boolean): void;
|
|
69
69
|
togglePause(): void;
|
|
70
70
|
setFontSize(value: number): void;
|
|
71
|
+
setLigatures(value: boolean): void;
|
|
72
|
+
setFontHinting(value: boolean): void;
|
|
73
|
+
setFontHintTarget(value: ResttyFontHintTarget): void;
|
|
74
|
+
setFonts(fonts: Parameters<ResttyRuntimeTerminalApi["setFonts"]>[0]): Promise<void>;
|
|
71
75
|
applyTheme(theme: GhosttyTheme, sourceLabel?: string): void;
|
|
72
76
|
resetTheme(): void;
|
|
73
77
|
sendInput(text: string, source?: string): void;
|
|
@@ -90,7 +94,6 @@ export declare class ResttyPaneHandle implements ResttyPaneApi {
|
|
|
90
94
|
closeSearch(options?: ResttyPaneSearchUiCloseOptions): void;
|
|
91
95
|
toggleSearch(options?: ResttyPaneSearchUiOpenOptions & ResttyPaneSearchUiCloseOptions): void;
|
|
92
96
|
isSearchOpen(): boolean;
|
|
93
|
-
dumpAtlasForCodepoint(cp: number): void;
|
|
94
97
|
resize(cols: number, rows: number): void;
|
|
95
98
|
focus(): void;
|
|
96
99
|
blur(): void;
|
|
@@ -100,6 +103,5 @@ export declare class ResttyPaneHandle implements ResttyPaneApi {
|
|
|
100
103
|
setSearchUiStyleOptions(options: ResttyManagedPaneSearchUiStyleOptions): void;
|
|
101
104
|
setShaderStages(stages: ResttyShaderStage[]): void;
|
|
102
105
|
getShaderStages(): ResttyShaderStage[];
|
|
103
|
-
getRawPane(): ResttyManagedAppPane;
|
|
104
106
|
}
|
|
105
107
|
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ResttyManagedPane, ResttyManagedPaneManager } from "../panes/managed-pane-types";
|
|
2
|
+
export type ResttyPaneLookup = {
|
|
3
|
+
getPanes: () => ResttyManagedPane[];
|
|
4
|
+
getPaneById: (id: number) => ResttyManagedPane | null;
|
|
5
|
+
getActivePane: () => ResttyManagedPane | null;
|
|
6
|
+
getFocusedPane: () => ResttyManagedPane | null;
|
|
7
|
+
openPaneSearch: ResttyManagedPaneManager["openPaneSearch"];
|
|
8
|
+
closePaneSearch: ResttyManagedPaneManager["closePaneSearch"];
|
|
9
|
+
togglePaneSearch: ResttyManagedPaneManager["togglePaneSearch"];
|
|
10
|
+
isPaneSearchOpen: ResttyManagedPaneManager["isPaneSearchOpen"];
|
|
11
|
+
getSearchUiStyleOptions: ResttyManagedPaneManager["getSearchUiStyleOptions"];
|
|
12
|
+
setSearchUiStyleOptions: ResttyManagedPaneManager["setSearchUiStyleOptions"];
|
|
13
|
+
};
|
|
14
|
+
type CreateResttyPaneLookupOptions = {
|
|
15
|
+
paneManager: Pick<ResttyManagedPaneManager, "openPaneSearch" | "closePaneSearch" | "togglePaneSearch" | "isPaneSearchOpen" | "getSearchUiStyleOptions" | "setSearchUiStyleOptions">;
|
|
16
|
+
getPanes: () => ResttyManagedPane[];
|
|
17
|
+
getPaneById: (id: number) => ResttyManagedPane | null;
|
|
18
|
+
getActivePane: () => ResttyManagedPane | null;
|
|
19
|
+
getFocusedPane: () => ResttyManagedPane | null;
|
|
20
|
+
};
|
|
21
|
+
export declare function createResttyPaneLookup(options: CreateResttyPaneLookupOptions): ResttyPaneLookup;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ResttyFontInput } from "../../runtime/core/models";
|
|
2
|
+
import { ResttyController } from "./controller";
|
|
3
|
+
import type { ResttyConfig } from "./config";
|
|
4
|
+
import { ResttyShaderOps } from "./shader-ops";
|
|
5
|
+
type CreateResttyPaneManagerAssemblyOptions = {
|
|
6
|
+
shaderOps: ResttyShaderOps;
|
|
7
|
+
controller: ResttyController;
|
|
8
|
+
getFonts: () => ResttyFontInput[] | undefined;
|
|
9
|
+
terminal: ResttyConfig["terminal"];
|
|
10
|
+
services: ResttyConfig["services"];
|
|
11
|
+
events: NonNullable<NonNullable<ResttyConfig["surface"]>["events"]> | undefined;
|
|
12
|
+
};
|
|
13
|
+
export declare function createResttyPaneManagerAssembly({ shaderOps, controller, getFonts, terminal, services, events, }: CreateResttyPaneManagerAssemblyOptions): {
|
|
14
|
+
mergedTerminalConfig: import("../panes/managed-pane-types").ResttyTerminalConfigInput;
|
|
15
|
+
mergedServicesConfig: import("../panes/managed-pane-types").ResttyRuntimeServicesConfigInput;
|
|
16
|
+
paneManagerEventHandlers: import("./manager-options.types").PaneManagerEventHandlers;
|
|
17
|
+
};
|
|
18
|
+
export {};
|
|
@@ -1,51 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import type { ResttyLifecycleHookPayload, ResttyPluginEvents } from "../restty-plugin-types";
|
|
5
|
-
import type { ResttyPaneSearchUiCloseOptions, ResttyPaneSearchUiOpenOptions } from "../pane-search-ui";
|
|
6
|
-
type ResttyPaneLookup = {
|
|
7
|
-
getPanes: () => ResttyManagedAppPane[];
|
|
8
|
-
getPaneById: (id: number) => ResttyManagedAppPane | null;
|
|
9
|
-
getActivePane: () => ResttyManagedAppPane | null;
|
|
10
|
-
getFocusedPane: () => ResttyManagedAppPane | null;
|
|
11
|
-
openPaneSearch: (id: number, options?: ResttyPaneSearchUiOpenOptions) => void;
|
|
12
|
-
closePaneSearch: (id: number, options?: ResttyPaneSearchUiCloseOptions) => void;
|
|
13
|
-
togglePaneSearch: (id: number, options?: ResttyPaneSearchUiOpenOptions & ResttyPaneSearchUiCloseOptions) => void;
|
|
14
|
-
isPaneSearchOpen: (id: number) => boolean;
|
|
15
|
-
getSearchUiStyleOptions: () => Readonly<Required<ResttyManagedPaneSearchUiStyleOptions>>;
|
|
16
|
-
setSearchUiStyleOptions: (options: ResttyManagedPaneSearchUiStyleOptions) => void;
|
|
17
|
-
};
|
|
18
|
-
type ResttyLifecycleEmitter = {
|
|
19
|
-
runLifecycleHooks: (payload: ResttyLifecycleHookPayload) => void;
|
|
20
|
-
emitPluginEvent: <E extends keyof ResttyPluginEvents>(event: E, payload: ResttyPluginEvents[E]) => void;
|
|
21
|
-
};
|
|
22
|
-
export declare function requirePaneById(getPaneById: (id: number) => ResttyManagedAppPane | null, id: number): ResttyManagedAppPane;
|
|
23
|
-
export declare function makePaneHandle(lookup: Pick<ResttyPaneLookup, "getPaneById" | "openPaneSearch" | "closePaneSearch" | "togglePaneSearch" | "isPaneSearchOpen" | "getSearchUiStyleOptions" | "setSearchUiStyleOptions">, id: number): ResttyPaneHandle;
|
|
24
|
-
export declare function requireActivePaneHandle(lookup: Pick<ResttyPaneLookup, "getActivePane" | "getPaneById" | "openPaneSearch" | "closePaneSearch" | "togglePaneSearch" | "isPaneSearchOpen" | "getSearchUiStyleOptions" | "setSearchUiStyleOptions">): ResttyPaneHandle;
|
|
25
|
-
export declare function panes(lookup: Pick<ResttyPaneLookup, "getPanes" | "getPaneById" | "openPaneSearch" | "closePaneSearch" | "togglePaneSearch" | "isPaneSearchOpen" | "getSearchUiStyleOptions" | "setSearchUiStyleOptions">): ResttyPaneHandle[];
|
|
26
|
-
export declare function pane(lookup: Pick<ResttyPaneLookup, "getPaneById" | "openPaneSearch" | "closePaneSearch" | "togglePaneSearch" | "isPaneSearchOpen" | "getSearchUiStyleOptions" | "setSearchUiStyleOptions">, id: number): ResttyPaneHandle | null;
|
|
27
|
-
export declare function activePane(lookup: Pick<ResttyPaneLookup, "getActivePane" | "getPaneById" | "openPaneSearch" | "closePaneSearch" | "togglePaneSearch" | "isPaneSearchOpen" | "getSearchUiStyleOptions" | "setSearchUiStyleOptions">): ResttyPaneHandle | null;
|
|
28
|
-
export declare function focusedPane(lookup: Pick<ResttyPaneLookup, "getFocusedPane" | "getPaneById" | "openPaneSearch" | "closePaneSearch" | "togglePaneSearch" | "isPaneSearchOpen" | "getSearchUiStyleOptions" | "setSearchUiStyleOptions">): ResttyPaneHandle | null;
|
|
29
|
-
export declare function forEachPane(lookup: Pick<ResttyPaneLookup, "getPanes" | "getPaneById" | "openPaneSearch" | "closePaneSearch" | "togglePaneSearch" | "isPaneSearchOpen" | "getSearchUiStyleOptions" | "setSearchUiStyleOptions">, visitor: (pane: ResttyPaneHandle) => void): void;
|
|
30
|
-
export declare function createInitialPane(paneManager: ResttyPaneManager<ResttyManagedAppPane>, hooks: Pick<ResttyLifecycleEmitter, "runLifecycleHooks">, options?: {
|
|
31
|
-
focus?: boolean;
|
|
32
|
-
}): ResttyManagedAppPane;
|
|
33
|
-
export declare function splitActivePane(paneManager: ResttyPaneManager<ResttyManagedAppPane>, lookup: Pick<ResttyPaneLookup, "getActivePane">, hooks: Pick<ResttyLifecycleEmitter, "runLifecycleHooks">, direction: ResttyPaneSplitDirection): ResttyManagedAppPane | null;
|
|
34
|
-
export declare function splitPane(paneManager: ResttyPaneManager<ResttyManagedAppPane>, hooks: Pick<ResttyLifecycleEmitter, "runLifecycleHooks">, id: number, direction: ResttyPaneSplitDirection): ResttyManagedAppPane | null;
|
|
35
|
-
export declare function closePane(paneManager: ResttyPaneManager<ResttyManagedAppPane>, hooks: Pick<ResttyLifecycleEmitter, "runLifecycleHooks">, id: number): boolean;
|
|
36
|
-
export declare function setActivePane(paneManager: ResttyPaneManager<ResttyManagedAppPane>, lookup: Pick<ResttyPaneLookup, "getActivePane">, hooks: Pick<ResttyLifecycleEmitter, "runLifecycleHooks">, id: number, options?: {
|
|
37
|
-
focus?: boolean;
|
|
38
|
-
}): void;
|
|
39
|
-
export declare function markPaneFocused(paneManager: ResttyPaneManager<ResttyManagedAppPane>, lookup: Pick<ResttyPaneLookup, "getFocusedPane">, hooks: Pick<ResttyLifecycleEmitter, "runLifecycleHooks">, id: number, options?: {
|
|
40
|
-
focus?: boolean;
|
|
41
|
-
}): void;
|
|
42
|
-
export declare function connectPty(lookup: Pick<ResttyPaneLookup, "getActivePane" | "getPaneById">, hooks: Pick<ResttyLifecycleEmitter, "runLifecycleHooks">, url?: string): void;
|
|
43
|
-
export declare function disconnectPty(lookup: Pick<ResttyPaneLookup, "getActivePane" | "getPaneById">, hooks: Pick<ResttyLifecycleEmitter, "runLifecycleHooks">): void;
|
|
44
|
-
export declare function resize(lookup: Pick<ResttyPaneLookup, "getActivePane" | "getPaneById">, hooks: ResttyLifecycleEmitter, cols: number, rows: number): void;
|
|
45
|
-
export declare function focus(lookup: Pick<ResttyPaneLookup, "getActivePane" | "getPaneById">, hooks: ResttyLifecycleEmitter): void;
|
|
46
|
-
export declare function blur(lookup: Pick<ResttyPaneLookup, "getActivePane" | "getPaneById">, hooks: ResttyLifecycleEmitter): void;
|
|
47
|
-
export declare function getPaneStyleOptions(paneManager: ResttyPaneManager<ResttyManagedAppPane>): Readonly<Required<ResttyManagedPaneStyleOptions>>;
|
|
48
|
-
export declare function setPaneStyleOptions(paneManager: ResttyPaneManager<ResttyManagedAppPane>, options: ResttyManagedPaneStyleOptions): void;
|
|
49
|
-
export declare function getSearchUiStyleOptions(paneManager: Pick<ResttyAppPaneManager, "getSearchUiStyleOptions">): Readonly<Required<ResttyManagedPaneSearchUiStyleOptions>>;
|
|
50
|
-
export declare function setSearchUiStyleOptions(paneManager: Pick<ResttyAppPaneManager, "setSearchUiStyleOptions">, options: ResttyManagedPaneSearchUiStyleOptions): void;
|
|
51
|
-
export {};
|
|
1
|
+
export * from "./pane-command-ops";
|
|
2
|
+
export * from "./pane-handle-ops";
|
|
3
|
+
export * from "./pane-style-ops";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ResttyManagedPaneManager, ResttyManagedPane, ResttyManagedPaneStyleOptions, ResttyManagedPaneSearchUiStyleOptions } from "../panes/managed-pane-types";
|
|
2
|
+
import type { ResttyPaneManager } from "../panes/types";
|
|
3
|
+
export declare function getPaneStyleOptions(paneManager: ResttyPaneManager<ResttyManagedPane>): Readonly<Required<ResttyManagedPaneStyleOptions>>;
|
|
4
|
+
export declare function setPaneStyleOptions(paneManager: ResttyPaneManager<ResttyManagedPane>, options: ResttyManagedPaneStyleOptions): void;
|
|
5
|
+
export declare function getSearchUiStyleOptions(paneManager: Pick<ResttyManagedPaneManager, "getSearchUiStyleOptions">): Readonly<Required<ResttyManagedPaneSearchUiStyleOptions>>;
|
|
6
|
+
export declare function setSearchUiStyleOptions(paneManager: Pick<ResttyManagedPaneManager, "setSearchUiStyleOptions">, options: ResttyManagedPaneSearchUiStyleOptions): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ResttyPluginHostApi } from "../plugins/context.types";
|
|
2
|
+
import type { ResttySurfacePane } from "./events";
|
|
3
|
+
import { type ResttyPluginSurfaceApiSource } from "./controller";
|
|
4
|
+
export type ResttyPluginSurfaceBridgeSource = ResttyPluginSurfaceApiSource<ResttySurfacePane>;
|
|
5
|
+
export declare function createResttyPluginSurfaceBridge(restty: ResttyPluginSurfaceBridgeSource): ResttyPluginHostApi;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
1
|
+
import type { ResttyRenderStageHandle } from "../plugins/context.types";
|
|
2
|
+
import type { ResttyShaderStage } from "../../runtime/core/models";
|
|
3
|
+
import type { ResttyPaneApi } from "./pane-handle";
|
|
4
|
+
type ShaderStagePane = Pick<ResttyPaneApi, "id" | "setShaderStages">;
|
|
4
5
|
type ResttyShaderOpsDeps = {
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
forEachPane: (visitor: (pane: ShaderStagePane) => void) => void;
|
|
7
|
+
getPaneHandleById: (id: number) => ShaderStagePane | null;
|
|
7
8
|
};
|
|
8
9
|
export declare class ResttyShaderOps {
|
|
9
10
|
private readonly paneBaseShaderStages;
|