@bindtty/jsx-runtime 0.1.0-alpha.2 → 0.1.0-alpha.4
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/dist/jsx-runtime.d.ts +9 -18
- package/package.json +3 -3
package/dist/jsx-runtime.d.ts
CHANGED
|
@@ -5,27 +5,29 @@ export declare const Fragment: unique symbol;
|
|
|
5
5
|
type InteractionFocusChangeReason = "initial" | "next" | "previous" | "programmatic" | "clear" | "refresh";
|
|
6
6
|
interface InteractionNodeFocusChangeEvent {
|
|
7
7
|
id: string;
|
|
8
|
-
node: unknown;
|
|
9
8
|
focused: boolean;
|
|
10
9
|
reason: InteractionFocusChangeReason;
|
|
11
10
|
}
|
|
12
|
-
|
|
11
|
+
type KeyEventPhase = "capture" | "target" | "bubble";
|
|
12
|
+
interface BindTTYKeyEvent {
|
|
13
13
|
input: string;
|
|
14
14
|
name?: string;
|
|
15
15
|
ctrl: boolean;
|
|
16
16
|
meta: boolean;
|
|
17
17
|
shift: boolean;
|
|
18
18
|
sequence?: string;
|
|
19
|
+
phase: KeyEventPhase;
|
|
20
|
+
propagationStopped: boolean;
|
|
21
|
+
stopPropagation(): void;
|
|
19
22
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
isFocused: true;
|
|
23
|
-
}
|
|
24
|
-
type InteractionKeyHandler = (event: InteractionKeyEvent, context: InteractionKeyContext) => boolean | void;
|
|
23
|
+
type InteractionKeyHandler = (event: BindTTYKeyEvent) => boolean | void;
|
|
24
|
+
type InteractionKeyListener = InteractionKeyHandler | null | undefined;
|
|
25
25
|
type InteractionKeyBinding = boolean | InteractionKeyHandler | null | undefined;
|
|
26
26
|
interface IntrinsicInteractionProps {
|
|
27
27
|
id?: BindingValue<string | number>;
|
|
28
28
|
ref?: MountedElementRefHandler | null | undefined;
|
|
29
|
+
focusable?: BindingValue<boolean>;
|
|
30
|
+
onKeyCapture?: BindingValue<InteractionKeyListener>;
|
|
29
31
|
onKey?: BindingValue<InteractionKeyBinding>;
|
|
30
32
|
onFocusChange?: (event: InteractionNodeFocusChangeEvent) => void;
|
|
31
33
|
}
|
|
@@ -120,17 +122,6 @@ export declare namespace JSX {
|
|
|
120
122
|
wrap?: BindingValue<PublicTextWrapMode>;
|
|
121
123
|
children?: never;
|
|
122
124
|
};
|
|
123
|
-
button: IntrinsicInteractionProps & IntrinsicYogaItemProps & {
|
|
124
|
-
value: BindingValue<string | number>;
|
|
125
|
-
disabled?: BindingValue<boolean>;
|
|
126
|
-
onPress?: () => void;
|
|
127
|
-
children?: never;
|
|
128
|
-
};
|
|
129
|
-
input: IntrinsicInteractionProps & IntrinsicYogaItemProps & {
|
|
130
|
-
value?: BindingValue<string>;
|
|
131
|
-
placeholder?: BindingValue<string>;
|
|
132
|
-
children?: never;
|
|
133
|
-
};
|
|
134
125
|
spacer: IntrinsicInteractionProps & IntrinsicYogaItemProps & IntrinsicYogaSizeProps & IntrinsicYogaMarginProps & {
|
|
135
126
|
size?: BindingValue<number>;
|
|
136
127
|
children?: never;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bindtty/jsx-runtime",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "JSX runtime for BindTTY ViewTemplate.",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"test": "npm run build --workspace @bindtty/text && npm run build --workspace @bindtty/vnode && npm run build && tsc -p test/tsconfig.json && tsc -p test/tsconfig.runtime.json && node --test test/dist/*.test.js"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@bindtty/text": "0.1.0-alpha.
|
|
33
|
-
"@bindtty/vnode": "0.1.0-alpha.
|
|
32
|
+
"@bindtty/text": "0.1.0-alpha.4",
|
|
33
|
+
"@bindtty/vnode": "0.1.0-alpha.4"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/node": "^22.0.0",
|