@next_term/web 0.1.0-next.0 → 0.1.0-next.3

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.
@@ -0,0 +1,9 @@
1
+ import type { WebTerminal } from "./web-terminal.js";
2
+ /**
3
+ * Interface that all terminal addons must implement.
4
+ */
5
+ export interface ITerminalAddon {
6
+ activate(terminal: WebTerminal): void;
7
+ dispose(): void;
8
+ }
9
+ //# sourceMappingURL=addon.d.ts.map
@@ -0,0 +1,23 @@
1
+ import type { ITerminalAddon } from "../addon.js";
2
+ import type { WebTerminal } from "../web-terminal.js";
3
+ /**
4
+ * Addon that fits the terminal to its container element.
5
+ */
6
+ export declare class FitAddon implements ITerminalAddon {
7
+ private terminal;
8
+ activate(terminal: WebTerminal): void;
9
+ dispose(): void;
10
+ /**
11
+ * Calculate the dimensions that would fit the terminal's container.
12
+ * Returns null if the terminal is not attached or dimensions can't be calculated.
13
+ */
14
+ proposeDimensions(): {
15
+ cols: number;
16
+ rows: number;
17
+ } | null;
18
+ /**
19
+ * Fit the terminal to its container by resizing.
20
+ */
21
+ fit(): void;
22
+ }
23
+ //# sourceMappingURL=fit.d.ts.map
package/dist/fit.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Calculate how many terminal columns/rows fit in a container element.
3
+ */
4
+ export declare function calculateFit(container: HTMLElement, cellWidth: number, cellHeight: number): {
5
+ cols: number;
6
+ rows: number;
7
+ };
8
+ //# sourceMappingURL=fit.d.ts.map
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Parser Web Worker entry point.
3
+ *
4
+ * Runs the VTParser off the main thread. When SharedArrayBuffer is available
5
+ * the worker writes directly into the SAB that the main-thread renderer reads.
6
+ * Otherwise it owns the buffer and transfers cell data back via Transferable
7
+ * ArrayBuffers in the flush message.
8
+ */
9
+ /** Messages the worker posts back to the main thread. */
10
+ export interface FlushMessage {
11
+ type: "flush";
12
+ cursor: {
13
+ row: number;
14
+ col: number;
15
+ visible: boolean;
16
+ style: string;
17
+ };
18
+ /** true when the parser switched to or from the alternate buffer. */
19
+ isAlternate: boolean;
20
+ /** Number of bytes that were processed in the write that triggered this flush. */
21
+ bytesProcessed: number;
22
+ /** Full cell data (Transferable). Only present in non-SAB mode. */
23
+ cellData?: ArrayBuffer;
24
+ /** Dirty-row flags (Transferable). Only present in non-SAB mode. */
25
+ dirtyRows?: ArrayBuffer;
26
+ /** Circular buffer row offset. Only present in non-SAB mode. */
27
+ rowOffset?: number;
28
+ }
29
+ export interface ErrorMessage {
30
+ type: "error";
31
+ message: string;
32
+ }
33
+ export type OutboundMessage = FlushMessage | ErrorMessage;
34
+ //# sourceMappingURL=parser-worker.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next_term/web",
3
- "version": "0.1.0-next.0",
3
+ "version": "0.1.0-next.3",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",