forked from vadimdemedes/ink
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathglobal.d.ts
More file actions
39 lines (35 loc) 路 1 KB
/
Copy pathglobal.d.ts
File metadata and controls
39 lines (35 loc) 路 1 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
import {type ReactNode, type Key, type Ref} from 'react';
import {type Except} from 'type-fest';
import {type DOMElement} from './dom.js';
import {type Styles} from './styles.js';
declare module 'react' {
namespace JSX {
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
interface IntrinsicElements {
'ink-box': Ink.Box;
'ink-text': Ink.Text;
}
}
}
declare namespace Ink {
type Box = {
internal_static?: boolean;
children?: ReactNode;
key?: Key;
ref?: Ref<DOMElement>;
style?: Except<Styles, 'textWrap'>;
internal_accessibility?: DOMElement['internal_accessibility'];
};
type Text = {
children?: ReactNode;
key?: Key;
style?: Styles;
// eslint-disable-next-line @typescript-eslint/naming-convention
internal_transform?: (children: string, index: number) => string;
internal_accessibility?: DOMElement['internal_accessibility'];
selectable?: boolean;
selectionFlow?: unknown;
selectionBreakAfter?: 'soft' | 'hard';
selectionJoiner?: string;
};
}