veles 0.0.7 → 0.0.8
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/README.md +24 -247
- package/dist/{chunk-ILNLS6QO.js → chunk-4QXZSBVZ.js} +124 -121
- package/dist/chunk-GVPFIZZW.js +928 -0
- package/dist/index-BA0L7WRK.d.ts +60 -0
- package/dist/index-BOpDMzdf.d.cts +60 -0
- package/dist/index.cjs +969 -535
- package/dist/index.d.cts +14 -5
- package/dist/index.d.ts +14 -5
- package/dist/index.js +14 -10
- package/dist/jsx-runtime.cjs +91 -122
- package/dist/jsx-runtime.d.cts +7 -3252
- package/dist/jsx-runtime.d.ts +7 -3252
- package/dist/jsx-runtime.js +2 -4
- package/dist/types.d-CjiJHqth.d.cts +3954 -0
- package/dist/types.d-CjiJHqth.d.ts +3954 -0
- package/dist/utils/index.cjs +901 -501
- package/dist/utils/index.d.cts +2 -2
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-MH6DPZ3V.js +0 -490
- package/dist/chunk-X6QYYW56.js +0 -15
- package/dist/create-state-Bo6TT4qP.d.ts +0 -33
- package/dist/create-state-D1JASFVs.d.cts +0 -33
- package/dist/fragment-CU26z590.d.cts +0 -9
- package/dist/fragment-IVSEC7-Q.d.ts +0 -9
- package/dist/types.d-DgVBp6oa.d.cts +0 -256
- package/dist/types.d-DgVBp6oa.d.ts +0 -256
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
type VelesDOMElementProps = {
|
|
2
|
-
onCopy?: any | undefined;
|
|
3
|
-
onCopyCapture?: any | undefined;
|
|
4
|
-
onCut?: any | undefined;
|
|
5
|
-
onCutCapture?: any | undefined;
|
|
6
|
-
onPaste?: any | undefined;
|
|
7
|
-
onPasteCapture?: any | undefined;
|
|
8
|
-
onCompositionEnd?: any | undefined;
|
|
9
|
-
onCompositionEndCapture?: any | undefined;
|
|
10
|
-
onCompositionStart?: any | undefined;
|
|
11
|
-
onCompositionStartCapture?: any | undefined;
|
|
12
|
-
onCompositionUpdate?: any | undefined;
|
|
13
|
-
onCompositionUpdateCapture?: any | undefined;
|
|
14
|
-
onFocus?: any | undefined;
|
|
15
|
-
onFocusCapture?: any | undefined;
|
|
16
|
-
onBlur?: any | undefined;
|
|
17
|
-
onBlurCapture?: any | undefined;
|
|
18
|
-
onChange?: any | undefined;
|
|
19
|
-
onChangeCapture?: any | undefined;
|
|
20
|
-
onBeforeInput?: any | undefined;
|
|
21
|
-
onBeforeInputCapture?: any | undefined;
|
|
22
|
-
onInput?: any | undefined;
|
|
23
|
-
onInputCapture?: any | undefined;
|
|
24
|
-
onReset?: any | undefined;
|
|
25
|
-
onResetCapture?: any | undefined;
|
|
26
|
-
onSubmit?: any | undefined;
|
|
27
|
-
onSubmitCapture?: any | undefined;
|
|
28
|
-
onInvalid?: any | undefined;
|
|
29
|
-
onInvalidCapture?: any | undefined;
|
|
30
|
-
onLoad?: any | undefined;
|
|
31
|
-
onLoadCapture?: any | undefined;
|
|
32
|
-
onError?: any | undefined;
|
|
33
|
-
onErrorCapture?: any | undefined;
|
|
34
|
-
onKeyDown?: any | undefined;
|
|
35
|
-
onKeyDownCapture?: any | undefined;
|
|
36
|
-
/** @deprecated */
|
|
37
|
-
onKeyPress?: any | undefined;
|
|
38
|
-
/** @deprecated */
|
|
39
|
-
onKeyPressCapture?: any | undefined;
|
|
40
|
-
onKeyUp?: any | undefined;
|
|
41
|
-
onKeyUpCapture?: any | undefined;
|
|
42
|
-
onAbort?: any | undefined;
|
|
43
|
-
onAbortCapture?: any | undefined;
|
|
44
|
-
onCanPlay?: any | undefined;
|
|
45
|
-
onCanPlayCapture?: any | undefined;
|
|
46
|
-
onCanPlayThrough?: any | undefined;
|
|
47
|
-
onCanPlayThroughCapture?: any | undefined;
|
|
48
|
-
onDurationChange?: any | undefined;
|
|
49
|
-
onDurationChangeCapture?: any | undefined;
|
|
50
|
-
onEmptied?: any | undefined;
|
|
51
|
-
onEmptiedCapture?: any | undefined;
|
|
52
|
-
onEncrypted?: any | undefined;
|
|
53
|
-
onEncryptedCapture?: any | undefined;
|
|
54
|
-
onEnded?: any | undefined;
|
|
55
|
-
onEndedCapture?: any | undefined;
|
|
56
|
-
onLoadedData?: any | undefined;
|
|
57
|
-
onLoadedDataCapture?: any | undefined;
|
|
58
|
-
onLoadedMetadata?: any | undefined;
|
|
59
|
-
onLoadedMetadataCapture?: any | undefined;
|
|
60
|
-
onLoadStart?: any | undefined;
|
|
61
|
-
onLoadStartCapture?: any | undefined;
|
|
62
|
-
onPause?: any | undefined;
|
|
63
|
-
onPauseCapture?: any | undefined;
|
|
64
|
-
onPlay?: any | undefined;
|
|
65
|
-
onPlayCapture?: any | undefined;
|
|
66
|
-
onPlaying?: any | undefined;
|
|
67
|
-
onPlayingCapture?: any | undefined;
|
|
68
|
-
onProgress?: any | undefined;
|
|
69
|
-
onProgressCapture?: any | undefined;
|
|
70
|
-
onRateChange?: any | undefined;
|
|
71
|
-
onRateChangeCapture?: any | undefined;
|
|
72
|
-
onResize?: any | undefined;
|
|
73
|
-
onResizeCapture?: any | undefined;
|
|
74
|
-
onSeeked?: any | undefined;
|
|
75
|
-
onSeekedCapture?: any | undefined;
|
|
76
|
-
onSeeking?: any | undefined;
|
|
77
|
-
onSeekingCapture?: any | undefined;
|
|
78
|
-
onStalled?: any | undefined;
|
|
79
|
-
onStalledCapture?: any | undefined;
|
|
80
|
-
onSuspend?: any | undefined;
|
|
81
|
-
onSuspendCapture?: any | undefined;
|
|
82
|
-
onTimeUpdate?: any | undefined;
|
|
83
|
-
onTimeUpdateCapture?: any | undefined;
|
|
84
|
-
onVolumeChange?: any | undefined;
|
|
85
|
-
onVolumeChangeCapture?: any | undefined;
|
|
86
|
-
onWaiting?: any | undefined;
|
|
87
|
-
onWaitingCapture?: any | undefined;
|
|
88
|
-
onAuxClick?: (e: MouseEvent) => any | undefined;
|
|
89
|
-
onAuxClickCapture?: (e: MouseEvent) => any | undefined;
|
|
90
|
-
onClick?: (e: MouseEvent) => any | undefined;
|
|
91
|
-
onClickCapture?: (e: MouseEvent) => any | undefined;
|
|
92
|
-
onContextMenu?: (e: MouseEvent) => any | undefined;
|
|
93
|
-
onContextMenuCapture?: (e: MouseEvent) => any | undefined;
|
|
94
|
-
onDoubleClick?: (e: MouseEvent) => any | undefined;
|
|
95
|
-
onDoubleClickCapture?: (e: MouseEvent) => any | undefined;
|
|
96
|
-
onDrag?: any | undefined;
|
|
97
|
-
onDragCapture?: any | undefined;
|
|
98
|
-
onDragEnd?: any | undefined;
|
|
99
|
-
onDragEndCapture?: any | undefined;
|
|
100
|
-
onDragEnter?: any | undefined;
|
|
101
|
-
onDragEnterCapture?: any | undefined;
|
|
102
|
-
onDragExit?: any | undefined;
|
|
103
|
-
onDragExitCapture?: any | undefined;
|
|
104
|
-
onDragLeave?: any | undefined;
|
|
105
|
-
onDragLeaveCapture?: any | undefined;
|
|
106
|
-
onDragOver?: any | undefined;
|
|
107
|
-
onDragOverCapture?: any | undefined;
|
|
108
|
-
onDragStart?: any | undefined;
|
|
109
|
-
onDragStartCapture?: any | undefined;
|
|
110
|
-
onDrop?: any | undefined;
|
|
111
|
-
onDropCapture?: any | undefined;
|
|
112
|
-
onMouseDown?: (e: MouseEvent) => any | undefined;
|
|
113
|
-
onMouseDownCapture?: (e: MouseEvent) => any | undefined;
|
|
114
|
-
onMouseEnter?: (e: MouseEvent) => any | undefined;
|
|
115
|
-
onMouseLeave?: (e: MouseEvent) => any | undefined;
|
|
116
|
-
onMouseMove?: (e: MouseEvent) => any | undefined;
|
|
117
|
-
onMouseMoveCapture?: (e: MouseEvent) => any | undefined;
|
|
118
|
-
onMouseOut?: (e: MouseEvent) => any | undefined;
|
|
119
|
-
onMouseOutCapture?: (e: MouseEvent) => any | undefined;
|
|
120
|
-
onMouseOver?: (e: MouseEvent) => any | undefined;
|
|
121
|
-
onMouseOverCapture?: (e: MouseEvent) => any | undefined;
|
|
122
|
-
onMouseUp?: (e: MouseEvent) => any | undefined;
|
|
123
|
-
onMouseUpCapture?: (e: MouseEvent) => any | undefined;
|
|
124
|
-
onSelect?: any | undefined;
|
|
125
|
-
onSelectCapture?: any | undefined;
|
|
126
|
-
onTouchCancel?: any | undefined;
|
|
127
|
-
onTouchCancelCapture?: any | undefined;
|
|
128
|
-
onTouchEnd?: any | undefined;
|
|
129
|
-
onTouchEndCapture?: any | undefined;
|
|
130
|
-
onTouchMove?: any | undefined;
|
|
131
|
-
onTouchMoveCapture?: any | undefined;
|
|
132
|
-
onTouchStart?: any | undefined;
|
|
133
|
-
onTouchStartCapture?: any | undefined;
|
|
134
|
-
onPointerDown?: any | undefined;
|
|
135
|
-
onPointerDownCapture?: any | undefined;
|
|
136
|
-
onPointerMove?: any | undefined;
|
|
137
|
-
onPointerMoveCapture?: any | undefined;
|
|
138
|
-
onPointerUp?: any | undefined;
|
|
139
|
-
onPointerUpCapture?: any | undefined;
|
|
140
|
-
onPointerCancel?: any | undefined;
|
|
141
|
-
onPointerCancelCapture?: any | undefined;
|
|
142
|
-
onPointerEnter?: any | undefined;
|
|
143
|
-
onPointerLeave?: any | undefined;
|
|
144
|
-
onPointerOver?: any | undefined;
|
|
145
|
-
onPointerOverCapture?: any | undefined;
|
|
146
|
-
onPointerOut?: any | undefined;
|
|
147
|
-
onPointerOutCapture?: any | undefined;
|
|
148
|
-
onGotPointerCapture?: any | undefined;
|
|
149
|
-
onGotPointerCaptureCapture?: any | undefined;
|
|
150
|
-
onLostPointerCapture?: any | undefined;
|
|
151
|
-
onLostPointerCaptureCapture?: any | undefined;
|
|
152
|
-
onScroll?: any | undefined;
|
|
153
|
-
onScrollCapture?: any | undefined;
|
|
154
|
-
onWheel?: any | undefined;
|
|
155
|
-
onWheelCapture?: any | undefined;
|
|
156
|
-
onAnimationStart?: any | undefined;
|
|
157
|
-
onAnimationStartCapture?: any | undefined;
|
|
158
|
-
onAnimationEnd?: any | undefined;
|
|
159
|
-
onAnimationEndCapture?: any | undefined;
|
|
160
|
-
onAnimationIteration?: any | undefined;
|
|
161
|
-
onAnimationIterationCapture?: any | undefined;
|
|
162
|
-
onTransitionEnd?: any | undefined;
|
|
163
|
-
onTransitionEndCapture?: any | undefined;
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
// an internal representation of DOM nodes in the tree
|
|
167
|
-
// despite being DOM nodes, we still can track mounting/unmounting
|
|
168
|
-
// (although it is not exposed at the moment)
|
|
169
|
-
type VelesElement = {
|
|
170
|
-
velesNode: true;
|
|
171
|
-
|
|
172
|
-
html: HTMLElement;
|
|
173
|
-
|
|
174
|
-
phantom?: boolean;
|
|
175
|
-
|
|
176
|
-
// every element except the most top one should have one
|
|
177
|
-
parentVelesElement?: VelesElement;
|
|
178
|
-
childComponents: (VelesElement | VelesComponent | VelesStringElement)[];
|
|
179
|
-
|
|
180
|
-
// not intended to be used directly
|
|
181
|
-
_privateMethods: {
|
|
182
|
-
_addUnmountHandler: Function;
|
|
183
|
-
_callUnmountHandlers: Function;
|
|
184
|
-
};
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
type VelesStringElement = {
|
|
188
|
-
velesStringElement: true;
|
|
189
|
-
html: Text;
|
|
190
|
-
parentVelesElement?: VelesElement;
|
|
191
|
-
|
|
192
|
-
// not intended to be used directly
|
|
193
|
-
// despite being a text component, having same lifecycle
|
|
194
|
-
// methods is useful for state changes, to remove tracking
|
|
195
|
-
// when the said Text is returned from `useValue` state method
|
|
196
|
-
_privateMethods: {
|
|
197
|
-
_addUnmountHandler: Function;
|
|
198
|
-
_callUnmountHandlers: Function;
|
|
199
|
-
};
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
// an internal representation of components in the tree
|
|
203
|
-
type VelesComponent = {
|
|
204
|
-
velesComponent: true;
|
|
205
|
-
|
|
206
|
-
tree: VelesElement | VelesComponent | VelesStringElement;
|
|
207
|
-
|
|
208
|
-
// not intended to be used directly
|
|
209
|
-
_privateMethods: {
|
|
210
|
-
_callMountHandlers: Function;
|
|
211
|
-
_callUnmountHandlers: Function;
|
|
212
|
-
_addUnmountHandler: Function;
|
|
213
|
-
};
|
|
214
|
-
};
|
|
215
|
-
|
|
216
|
-
// all supported child options
|
|
217
|
-
type velesChild =
|
|
218
|
-
| string
|
|
219
|
-
| number
|
|
220
|
-
| VelesElement
|
|
221
|
-
| VelesComponent
|
|
222
|
-
| VelesStringElement;
|
|
223
|
-
type VelesChildren = velesChild | velesChild[] | undefined | null;
|
|
224
|
-
|
|
225
|
-
type VelesElementProps = {
|
|
226
|
-
children?: VelesChildren;
|
|
227
|
-
ref?: {
|
|
228
|
-
velesRef: true;
|
|
229
|
-
current: any;
|
|
230
|
-
};
|
|
231
|
-
|
|
232
|
-
// event handlers + any html properties
|
|
233
|
-
// the value can be either a string value
|
|
234
|
-
// or a function in case we support reactivity
|
|
235
|
-
// TODO: we can improve these types
|
|
236
|
-
[htmlAttribute: string]: any;
|
|
237
|
-
} & VelesDOMElementProps;
|
|
238
|
-
|
|
239
|
-
type ComponentAPI = {
|
|
240
|
-
// You can return a function from the mount callback, and it will be
|
|
241
|
-
// automatically registered as `onUnmount` callback
|
|
242
|
-
onMount: (cb: Function) => void | Function;
|
|
243
|
-
onUnmount: (cb: Function) => void;
|
|
244
|
-
};
|
|
245
|
-
|
|
246
|
-
type ComponentFunction = (
|
|
247
|
-
props: VelesElementProps,
|
|
248
|
-
componentAPI: ComponentAPI
|
|
249
|
-
) => VelesElement | VelesComponent | string | null;
|
|
250
|
-
|
|
251
|
-
type AttributeHelper<T> = {
|
|
252
|
-
(htmlElement: HTMLElement, attributeName: string, node: VelesElement): T;
|
|
253
|
-
velesAttribute: boolean;
|
|
254
|
-
};
|
|
255
|
-
|
|
256
|
-
export type { AttributeHelper as A, ComponentFunction as C, VelesElement as V, VelesComponent as a, VelesChildren as b, VelesElementProps as c, VelesStringElement as d };
|
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
type VelesDOMElementProps = {
|
|
2
|
-
onCopy?: any | undefined;
|
|
3
|
-
onCopyCapture?: any | undefined;
|
|
4
|
-
onCut?: any | undefined;
|
|
5
|
-
onCutCapture?: any | undefined;
|
|
6
|
-
onPaste?: any | undefined;
|
|
7
|
-
onPasteCapture?: any | undefined;
|
|
8
|
-
onCompositionEnd?: any | undefined;
|
|
9
|
-
onCompositionEndCapture?: any | undefined;
|
|
10
|
-
onCompositionStart?: any | undefined;
|
|
11
|
-
onCompositionStartCapture?: any | undefined;
|
|
12
|
-
onCompositionUpdate?: any | undefined;
|
|
13
|
-
onCompositionUpdateCapture?: any | undefined;
|
|
14
|
-
onFocus?: any | undefined;
|
|
15
|
-
onFocusCapture?: any | undefined;
|
|
16
|
-
onBlur?: any | undefined;
|
|
17
|
-
onBlurCapture?: any | undefined;
|
|
18
|
-
onChange?: any | undefined;
|
|
19
|
-
onChangeCapture?: any | undefined;
|
|
20
|
-
onBeforeInput?: any | undefined;
|
|
21
|
-
onBeforeInputCapture?: any | undefined;
|
|
22
|
-
onInput?: any | undefined;
|
|
23
|
-
onInputCapture?: any | undefined;
|
|
24
|
-
onReset?: any | undefined;
|
|
25
|
-
onResetCapture?: any | undefined;
|
|
26
|
-
onSubmit?: any | undefined;
|
|
27
|
-
onSubmitCapture?: any | undefined;
|
|
28
|
-
onInvalid?: any | undefined;
|
|
29
|
-
onInvalidCapture?: any | undefined;
|
|
30
|
-
onLoad?: any | undefined;
|
|
31
|
-
onLoadCapture?: any | undefined;
|
|
32
|
-
onError?: any | undefined;
|
|
33
|
-
onErrorCapture?: any | undefined;
|
|
34
|
-
onKeyDown?: any | undefined;
|
|
35
|
-
onKeyDownCapture?: any | undefined;
|
|
36
|
-
/** @deprecated */
|
|
37
|
-
onKeyPress?: any | undefined;
|
|
38
|
-
/** @deprecated */
|
|
39
|
-
onKeyPressCapture?: any | undefined;
|
|
40
|
-
onKeyUp?: any | undefined;
|
|
41
|
-
onKeyUpCapture?: any | undefined;
|
|
42
|
-
onAbort?: any | undefined;
|
|
43
|
-
onAbortCapture?: any | undefined;
|
|
44
|
-
onCanPlay?: any | undefined;
|
|
45
|
-
onCanPlayCapture?: any | undefined;
|
|
46
|
-
onCanPlayThrough?: any | undefined;
|
|
47
|
-
onCanPlayThroughCapture?: any | undefined;
|
|
48
|
-
onDurationChange?: any | undefined;
|
|
49
|
-
onDurationChangeCapture?: any | undefined;
|
|
50
|
-
onEmptied?: any | undefined;
|
|
51
|
-
onEmptiedCapture?: any | undefined;
|
|
52
|
-
onEncrypted?: any | undefined;
|
|
53
|
-
onEncryptedCapture?: any | undefined;
|
|
54
|
-
onEnded?: any | undefined;
|
|
55
|
-
onEndedCapture?: any | undefined;
|
|
56
|
-
onLoadedData?: any | undefined;
|
|
57
|
-
onLoadedDataCapture?: any | undefined;
|
|
58
|
-
onLoadedMetadata?: any | undefined;
|
|
59
|
-
onLoadedMetadataCapture?: any | undefined;
|
|
60
|
-
onLoadStart?: any | undefined;
|
|
61
|
-
onLoadStartCapture?: any | undefined;
|
|
62
|
-
onPause?: any | undefined;
|
|
63
|
-
onPauseCapture?: any | undefined;
|
|
64
|
-
onPlay?: any | undefined;
|
|
65
|
-
onPlayCapture?: any | undefined;
|
|
66
|
-
onPlaying?: any | undefined;
|
|
67
|
-
onPlayingCapture?: any | undefined;
|
|
68
|
-
onProgress?: any | undefined;
|
|
69
|
-
onProgressCapture?: any | undefined;
|
|
70
|
-
onRateChange?: any | undefined;
|
|
71
|
-
onRateChangeCapture?: any | undefined;
|
|
72
|
-
onResize?: any | undefined;
|
|
73
|
-
onResizeCapture?: any | undefined;
|
|
74
|
-
onSeeked?: any | undefined;
|
|
75
|
-
onSeekedCapture?: any | undefined;
|
|
76
|
-
onSeeking?: any | undefined;
|
|
77
|
-
onSeekingCapture?: any | undefined;
|
|
78
|
-
onStalled?: any | undefined;
|
|
79
|
-
onStalledCapture?: any | undefined;
|
|
80
|
-
onSuspend?: any | undefined;
|
|
81
|
-
onSuspendCapture?: any | undefined;
|
|
82
|
-
onTimeUpdate?: any | undefined;
|
|
83
|
-
onTimeUpdateCapture?: any | undefined;
|
|
84
|
-
onVolumeChange?: any | undefined;
|
|
85
|
-
onVolumeChangeCapture?: any | undefined;
|
|
86
|
-
onWaiting?: any | undefined;
|
|
87
|
-
onWaitingCapture?: any | undefined;
|
|
88
|
-
onAuxClick?: (e: MouseEvent) => any | undefined;
|
|
89
|
-
onAuxClickCapture?: (e: MouseEvent) => any | undefined;
|
|
90
|
-
onClick?: (e: MouseEvent) => any | undefined;
|
|
91
|
-
onClickCapture?: (e: MouseEvent) => any | undefined;
|
|
92
|
-
onContextMenu?: (e: MouseEvent) => any | undefined;
|
|
93
|
-
onContextMenuCapture?: (e: MouseEvent) => any | undefined;
|
|
94
|
-
onDoubleClick?: (e: MouseEvent) => any | undefined;
|
|
95
|
-
onDoubleClickCapture?: (e: MouseEvent) => any | undefined;
|
|
96
|
-
onDrag?: any | undefined;
|
|
97
|
-
onDragCapture?: any | undefined;
|
|
98
|
-
onDragEnd?: any | undefined;
|
|
99
|
-
onDragEndCapture?: any | undefined;
|
|
100
|
-
onDragEnter?: any | undefined;
|
|
101
|
-
onDragEnterCapture?: any | undefined;
|
|
102
|
-
onDragExit?: any | undefined;
|
|
103
|
-
onDragExitCapture?: any | undefined;
|
|
104
|
-
onDragLeave?: any | undefined;
|
|
105
|
-
onDragLeaveCapture?: any | undefined;
|
|
106
|
-
onDragOver?: any | undefined;
|
|
107
|
-
onDragOverCapture?: any | undefined;
|
|
108
|
-
onDragStart?: any | undefined;
|
|
109
|
-
onDragStartCapture?: any | undefined;
|
|
110
|
-
onDrop?: any | undefined;
|
|
111
|
-
onDropCapture?: any | undefined;
|
|
112
|
-
onMouseDown?: (e: MouseEvent) => any | undefined;
|
|
113
|
-
onMouseDownCapture?: (e: MouseEvent) => any | undefined;
|
|
114
|
-
onMouseEnter?: (e: MouseEvent) => any | undefined;
|
|
115
|
-
onMouseLeave?: (e: MouseEvent) => any | undefined;
|
|
116
|
-
onMouseMove?: (e: MouseEvent) => any | undefined;
|
|
117
|
-
onMouseMoveCapture?: (e: MouseEvent) => any | undefined;
|
|
118
|
-
onMouseOut?: (e: MouseEvent) => any | undefined;
|
|
119
|
-
onMouseOutCapture?: (e: MouseEvent) => any | undefined;
|
|
120
|
-
onMouseOver?: (e: MouseEvent) => any | undefined;
|
|
121
|
-
onMouseOverCapture?: (e: MouseEvent) => any | undefined;
|
|
122
|
-
onMouseUp?: (e: MouseEvent) => any | undefined;
|
|
123
|
-
onMouseUpCapture?: (e: MouseEvent) => any | undefined;
|
|
124
|
-
onSelect?: any | undefined;
|
|
125
|
-
onSelectCapture?: any | undefined;
|
|
126
|
-
onTouchCancel?: any | undefined;
|
|
127
|
-
onTouchCancelCapture?: any | undefined;
|
|
128
|
-
onTouchEnd?: any | undefined;
|
|
129
|
-
onTouchEndCapture?: any | undefined;
|
|
130
|
-
onTouchMove?: any | undefined;
|
|
131
|
-
onTouchMoveCapture?: any | undefined;
|
|
132
|
-
onTouchStart?: any | undefined;
|
|
133
|
-
onTouchStartCapture?: any | undefined;
|
|
134
|
-
onPointerDown?: any | undefined;
|
|
135
|
-
onPointerDownCapture?: any | undefined;
|
|
136
|
-
onPointerMove?: any | undefined;
|
|
137
|
-
onPointerMoveCapture?: any | undefined;
|
|
138
|
-
onPointerUp?: any | undefined;
|
|
139
|
-
onPointerUpCapture?: any | undefined;
|
|
140
|
-
onPointerCancel?: any | undefined;
|
|
141
|
-
onPointerCancelCapture?: any | undefined;
|
|
142
|
-
onPointerEnter?: any | undefined;
|
|
143
|
-
onPointerLeave?: any | undefined;
|
|
144
|
-
onPointerOver?: any | undefined;
|
|
145
|
-
onPointerOverCapture?: any | undefined;
|
|
146
|
-
onPointerOut?: any | undefined;
|
|
147
|
-
onPointerOutCapture?: any | undefined;
|
|
148
|
-
onGotPointerCapture?: any | undefined;
|
|
149
|
-
onGotPointerCaptureCapture?: any | undefined;
|
|
150
|
-
onLostPointerCapture?: any | undefined;
|
|
151
|
-
onLostPointerCaptureCapture?: any | undefined;
|
|
152
|
-
onScroll?: any | undefined;
|
|
153
|
-
onScrollCapture?: any | undefined;
|
|
154
|
-
onWheel?: any | undefined;
|
|
155
|
-
onWheelCapture?: any | undefined;
|
|
156
|
-
onAnimationStart?: any | undefined;
|
|
157
|
-
onAnimationStartCapture?: any | undefined;
|
|
158
|
-
onAnimationEnd?: any | undefined;
|
|
159
|
-
onAnimationEndCapture?: any | undefined;
|
|
160
|
-
onAnimationIteration?: any | undefined;
|
|
161
|
-
onAnimationIterationCapture?: any | undefined;
|
|
162
|
-
onTransitionEnd?: any | undefined;
|
|
163
|
-
onTransitionEndCapture?: any | undefined;
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
// an internal representation of DOM nodes in the tree
|
|
167
|
-
// despite being DOM nodes, we still can track mounting/unmounting
|
|
168
|
-
// (although it is not exposed at the moment)
|
|
169
|
-
type VelesElement = {
|
|
170
|
-
velesNode: true;
|
|
171
|
-
|
|
172
|
-
html: HTMLElement;
|
|
173
|
-
|
|
174
|
-
phantom?: boolean;
|
|
175
|
-
|
|
176
|
-
// every element except the most top one should have one
|
|
177
|
-
parentVelesElement?: VelesElement;
|
|
178
|
-
childComponents: (VelesElement | VelesComponent | VelesStringElement)[];
|
|
179
|
-
|
|
180
|
-
// not intended to be used directly
|
|
181
|
-
_privateMethods: {
|
|
182
|
-
_addUnmountHandler: Function;
|
|
183
|
-
_callUnmountHandlers: Function;
|
|
184
|
-
};
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
type VelesStringElement = {
|
|
188
|
-
velesStringElement: true;
|
|
189
|
-
html: Text;
|
|
190
|
-
parentVelesElement?: VelesElement;
|
|
191
|
-
|
|
192
|
-
// not intended to be used directly
|
|
193
|
-
// despite being a text component, having same lifecycle
|
|
194
|
-
// methods is useful for state changes, to remove tracking
|
|
195
|
-
// when the said Text is returned from `useValue` state method
|
|
196
|
-
_privateMethods: {
|
|
197
|
-
_addUnmountHandler: Function;
|
|
198
|
-
_callUnmountHandlers: Function;
|
|
199
|
-
};
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
// an internal representation of components in the tree
|
|
203
|
-
type VelesComponent = {
|
|
204
|
-
velesComponent: true;
|
|
205
|
-
|
|
206
|
-
tree: VelesElement | VelesComponent | VelesStringElement;
|
|
207
|
-
|
|
208
|
-
// not intended to be used directly
|
|
209
|
-
_privateMethods: {
|
|
210
|
-
_callMountHandlers: Function;
|
|
211
|
-
_callUnmountHandlers: Function;
|
|
212
|
-
_addUnmountHandler: Function;
|
|
213
|
-
};
|
|
214
|
-
};
|
|
215
|
-
|
|
216
|
-
// all supported child options
|
|
217
|
-
type velesChild =
|
|
218
|
-
| string
|
|
219
|
-
| number
|
|
220
|
-
| VelesElement
|
|
221
|
-
| VelesComponent
|
|
222
|
-
| VelesStringElement;
|
|
223
|
-
type VelesChildren = velesChild | velesChild[] | undefined | null;
|
|
224
|
-
|
|
225
|
-
type VelesElementProps = {
|
|
226
|
-
children?: VelesChildren;
|
|
227
|
-
ref?: {
|
|
228
|
-
velesRef: true;
|
|
229
|
-
current: any;
|
|
230
|
-
};
|
|
231
|
-
|
|
232
|
-
// event handlers + any html properties
|
|
233
|
-
// the value can be either a string value
|
|
234
|
-
// or a function in case we support reactivity
|
|
235
|
-
// TODO: we can improve these types
|
|
236
|
-
[htmlAttribute: string]: any;
|
|
237
|
-
} & VelesDOMElementProps;
|
|
238
|
-
|
|
239
|
-
type ComponentAPI = {
|
|
240
|
-
// You can return a function from the mount callback, and it will be
|
|
241
|
-
// automatically registered as `onUnmount` callback
|
|
242
|
-
onMount: (cb: Function) => void | Function;
|
|
243
|
-
onUnmount: (cb: Function) => void;
|
|
244
|
-
};
|
|
245
|
-
|
|
246
|
-
type ComponentFunction = (
|
|
247
|
-
props: VelesElementProps,
|
|
248
|
-
componentAPI: ComponentAPI
|
|
249
|
-
) => VelesElement | VelesComponent | string | null;
|
|
250
|
-
|
|
251
|
-
type AttributeHelper<T> = {
|
|
252
|
-
(htmlElement: HTMLElement, attributeName: string, node: VelesElement): T;
|
|
253
|
-
velesAttribute: boolean;
|
|
254
|
-
};
|
|
255
|
-
|
|
256
|
-
export type { AttributeHelper as A, ComponentFunction as C, VelesElement as V, VelesComponent as a, VelesChildren as b, VelesElementProps as c, VelesStringElement as d };
|