@bindtty/jsx-runtime 0.1.0-alpha.1 → 0.1.0-alpha.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.
- package/dist/jsx-runtime.d.ts +51 -23
- 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
|
}
|
|
@@ -52,9 +54,46 @@ interface IntrinsicYogaContainerProps {
|
|
|
52
54
|
justifyContent?: BindingValue<IntrinsicYogaJustifyContent>;
|
|
53
55
|
"justify-content"?: BindingValue<IntrinsicYogaJustifyContent>;
|
|
54
56
|
}
|
|
57
|
+
interface IntrinsicYogaSizeProps {
|
|
58
|
+
minWidth?: BindingValue<number>;
|
|
59
|
+
"min-width"?: BindingValue<number>;
|
|
60
|
+
minHeight?: BindingValue<number>;
|
|
61
|
+
"min-height"?: BindingValue<number>;
|
|
62
|
+
maxWidth?: BindingValue<number>;
|
|
63
|
+
"max-width"?: BindingValue<number>;
|
|
64
|
+
maxHeight?: BindingValue<number>;
|
|
65
|
+
"max-height"?: BindingValue<number>;
|
|
66
|
+
}
|
|
67
|
+
interface IntrinsicYogaMarginProps {
|
|
68
|
+
margin?: BindingValue<number>;
|
|
69
|
+
marginX?: BindingValue<number>;
|
|
70
|
+
"margin-x"?: BindingValue<number>;
|
|
71
|
+
marginY?: BindingValue<number>;
|
|
72
|
+
"margin-y"?: BindingValue<number>;
|
|
73
|
+
marginTop?: BindingValue<number>;
|
|
74
|
+
"margin-top"?: BindingValue<number>;
|
|
75
|
+
marginRight?: BindingValue<number>;
|
|
76
|
+
"margin-right"?: BindingValue<number>;
|
|
77
|
+
marginBottom?: BindingValue<number>;
|
|
78
|
+
"margin-bottom"?: BindingValue<number>;
|
|
79
|
+
marginLeft?: BindingValue<number>;
|
|
80
|
+
"margin-left"?: BindingValue<number>;
|
|
81
|
+
}
|
|
55
82
|
interface IntrinsicBoxStyleProps {
|
|
56
83
|
border?: BindingValue<boolean | number>;
|
|
57
84
|
padding?: BindingValue<number>;
|
|
85
|
+
paddingX?: BindingValue<number>;
|
|
86
|
+
"padding-x"?: BindingValue<number>;
|
|
87
|
+
paddingY?: BindingValue<number>;
|
|
88
|
+
"padding-y"?: BindingValue<number>;
|
|
89
|
+
paddingTop?: BindingValue<number>;
|
|
90
|
+
"padding-top"?: BindingValue<number>;
|
|
91
|
+
paddingRight?: BindingValue<number>;
|
|
92
|
+
"padding-right"?: BindingValue<number>;
|
|
93
|
+
paddingBottom?: BindingValue<number>;
|
|
94
|
+
"padding-bottom"?: BindingValue<number>;
|
|
95
|
+
paddingLeft?: BindingValue<number>;
|
|
96
|
+
"padding-left"?: BindingValue<number>;
|
|
58
97
|
height?: BindingValue<number>;
|
|
59
98
|
width?: BindingValue<number>;
|
|
60
99
|
overflow?: BindingValue<"visible" | "clip">;
|
|
@@ -69,32 +108,21 @@ export declare namespace JSX {
|
|
|
69
108
|
screen: IntrinsicInteractionProps & IntrinsicYogaItemProps & IntrinsicYogaContainerProps & {
|
|
70
109
|
children?: TemplateChildren;
|
|
71
110
|
};
|
|
72
|
-
box: IntrinsicInteractionProps & IntrinsicBoxStyleProps & IntrinsicPaintProps & IntrinsicYogaItemProps & IntrinsicYogaContainerProps & {
|
|
111
|
+
box: IntrinsicInteractionProps & IntrinsicBoxStyleProps & IntrinsicYogaSizeProps & IntrinsicYogaMarginProps & IntrinsicPaintProps & IntrinsicYogaItemProps & IntrinsicYogaContainerProps & {
|
|
73
112
|
children?: TemplateChildren;
|
|
74
113
|
};
|
|
75
|
-
vstack: IntrinsicInteractionProps & IntrinsicYogaItemProps & IntrinsicYogaContainerProps & {
|
|
114
|
+
vstack: IntrinsicInteractionProps & IntrinsicYogaItemProps & IntrinsicYogaContainerProps & IntrinsicYogaSizeProps & IntrinsicYogaMarginProps & {
|
|
76
115
|
children?: TemplateChildren;
|
|
77
116
|
};
|
|
78
|
-
hstack: IntrinsicInteractionProps & IntrinsicYogaItemProps & IntrinsicYogaContainerProps & {
|
|
117
|
+
hstack: IntrinsicInteractionProps & IntrinsicYogaItemProps & IntrinsicYogaContainerProps & IntrinsicYogaSizeProps & IntrinsicYogaMarginProps & {
|
|
79
118
|
children?: TemplateChildren;
|
|
80
119
|
};
|
|
81
|
-
text: IntrinsicInteractionProps & IntrinsicPaintProps & IntrinsicYogaItemProps & {
|
|
120
|
+
text: IntrinsicInteractionProps & IntrinsicPaintProps & IntrinsicYogaItemProps & IntrinsicYogaSizeProps & IntrinsicYogaMarginProps & {
|
|
82
121
|
value: BindingValue<string | number>;
|
|
83
122
|
wrap?: BindingValue<PublicTextWrapMode>;
|
|
84
123
|
children?: never;
|
|
85
124
|
};
|
|
86
|
-
|
|
87
|
-
value: BindingValue<string | number>;
|
|
88
|
-
disabled?: BindingValue<boolean>;
|
|
89
|
-
onPress?: () => void;
|
|
90
|
-
children?: never;
|
|
91
|
-
};
|
|
92
|
-
input: IntrinsicInteractionProps & IntrinsicYogaItemProps & {
|
|
93
|
-
value?: BindingValue<string>;
|
|
94
|
-
placeholder?: BindingValue<string>;
|
|
95
|
-
children?: never;
|
|
96
|
-
};
|
|
97
|
-
spacer: IntrinsicInteractionProps & IntrinsicYogaItemProps & {
|
|
125
|
+
spacer: IntrinsicInteractionProps & IntrinsicYogaItemProps & IntrinsicYogaSizeProps & IntrinsicYogaMarginProps & {
|
|
98
126
|
size?: BindingValue<number>;
|
|
99
127
|
children?: never;
|
|
100
128
|
};
|
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.3",
|
|
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.3",
|
|
33
|
+
"@bindtty/vnode": "0.1.0-alpha.3"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/node": "^22.0.0",
|