-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathjsx-namespace.d.ts
More file actions
48 lines (44 loc) · 1.33 KB
/
Copy pathjsx-namespace.d.ts
File metadata and controls
48 lines (44 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import { type ReactNode, type Key, type LegacyRef } from "react";
import { type Except } from "type-fest";
import { type DOMElement } from "./src/dom.js";
import { type Styles } from "./src/styles.js";
import { type Region } from "./src/output.js";
declare namespace Ink {
type Box = {
internal_static?: boolean;
children?: ReactNode;
key?: Key;
ref?: LegacyRef<DOMElement>;
style?: Except<Styles, "textWrap">;
internal_accessibility?: DOMElement["internal_accessibility"];
sticky?: boolean | "top" | "bottom";
internal_stickyAlternate?: boolean;
opaque?: boolean;
scrollbar?: boolean;
stableScrollback?: boolean;
};
type StaticRender = {
children?: ReactNode;
style?: Styles;
ref?: LegacyRef<DOMElement>;
cachedRender?: Region;
internal_staticRenderVersion?: number;
internal_onRendered?: (node: DOMElement) => void;
};
type Text = {
children?: ReactNode;
key?: Key;
style?: Styles;
internal_transform?: (children: string, index: number) => string;
internal_terminalCursorFocus?: boolean;
internal_terminalCursorPosition?: number;
internal_accessibility?: DOMElement["internal_accessibility"];
};
}
declare namespace JSX {
interface IntrinsicElements {
"ink-box": Ink.Box;
"ink-text": Ink.Text;
"ink-static-render": Ink.StaticRender;
}
}