x4js 2.0.7 → 2.0.9

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.
Files changed (150) hide show
  1. package/lib/cjs/x4.js +1 -1
  2. package/lib/esm/x4.mjs +1 -1
  3. package/lib/output.d.ts +1472 -0
  4. package/lib/src/components/boxes/boxes.ts +1 -1
  5. package/lib/src/components/btngroup/btngroup.ts +7 -11
  6. package/lib/src/components/button/button.ts +3 -3
  7. package/lib/src/components/calendar/calendar.ts +6 -6
  8. package/lib/src/components/checkbox/checkbox.ts +3 -3
  9. package/lib/src/components/colorinput/colorinput.ts +3 -3
  10. package/lib/src/components/colorpicker/colorpicker.ts +3 -3
  11. package/lib/src/components/combobox/combobox.ts +1 -1
  12. package/lib/src/components/dialog/dialog.ts +3 -2
  13. package/lib/src/components/header/header.ts +1 -1
  14. package/lib/src/components/icon/icon.ts +1 -1
  15. package/lib/src/components/image/image.ts +1 -1
  16. package/lib/src/components/input/input.ts +2 -2
  17. package/lib/src/components/label/label.ts +2 -2
  18. package/lib/src/components/listbox/listbox.ts +1 -1
  19. package/lib/src/components/menu/menu.ts +3 -3
  20. package/lib/src/components/messages/messages.ts +2 -2
  21. package/lib/src/components/notification/notification.ts +2 -2
  22. package/lib/src/components/panel/panel.ts +2 -2
  23. package/lib/src/components/popup/popup.ts +2 -2
  24. package/lib/src/components/progress/progress.ts +1 -1
  25. package/lib/src/components/rating/rating.ts +2 -2
  26. package/lib/src/components/sizers/sizer.ts +2 -2
  27. package/lib/src/components/slider/slider.ts +2 -2
  28. package/lib/src/components/switch/switch.ts +1 -1
  29. package/lib/src/components/tabs/tabs.ts +2 -2
  30. package/lib/src/components/textarea/textarea.ts +1 -1
  31. package/lib/src/components/textedit/textedit.ts +2 -2
  32. package/lib/src/components/tooltips/tooltips.ts +2 -2
  33. package/lib/src/components/treeview/treeview.ts +1 -1
  34. package/lib/src/components/viewport/viewport.ts +1 -1
  35. package/lib/src/core/component.ts +1 -1
  36. package/lib/src/core/core_styles.ts +0 -1
  37. package/lib/src/types/svg.d.ts +1 -0
  38. package/lib/src/types/x4react.d.ts +9 -0
  39. package/lib/types/x4.d.ts +6144 -178
  40. package/package.json +6 -1
  41. package/build/x4.css +0 -1
  42. package/build/x4.js +0 -1
  43. package/scripts/build.mjs +0 -362
  44. package/scripts/prepack.mjs +0 -51
  45. package/src/components/base.scss +0 -26
  46. package/src/components/boxes/boxes.module.scss +0 -37
  47. package/src/components/boxes/boxes.ts +0 -125
  48. package/src/components/btngroup/btngroup.module.scss +0 -29
  49. package/src/components/btngroup/btngroup.ts +0 -106
  50. package/src/components/button/button.module.scss +0 -154
  51. package/src/components/button/button.ts +0 -117
  52. package/src/components/calendar/calendar-check-sharp-light.svg +0 -1
  53. package/src/components/calendar/calendar.module.scss +0 -163
  54. package/src/components/calendar/calendar.ts +0 -326
  55. package/src/components/calendar/chevron-left-sharp-light.svg +0 -1
  56. package/src/components/calendar/chevron-right-sharp-light.svg +0 -1
  57. package/src/components/checkbox/check.svg +0 -4
  58. package/src/components/checkbox/checkbox.module.scss +0 -142
  59. package/src/components/checkbox/checkbox.ts +0 -125
  60. package/src/components/colorinput/colorinput.module.scss +0 -65
  61. package/src/components/colorinput/colorinput.ts +0 -88
  62. package/src/components/colorinput/crosshairs-simple-sharp-light.svg +0 -1
  63. package/src/components/colorpicker/colorpicker.module.scss +0 -133
  64. package/src/components/colorpicker/colorpicker.ts +0 -477
  65. package/src/components/combobox/combobox.module.scss +0 -121
  66. package/src/components/combobox/combobox.ts +0 -190
  67. package/src/components/combobox/updown.svg +0 -4
  68. package/src/components/dialog/dialog.module.scss +0 -71
  69. package/src/components/dialog/dialog.ts +0 -91
  70. package/src/components/dialog/xmark-sharp-light.svg +0 -1
  71. package/src/components/form/form.module.scss +0 -34
  72. package/src/components/form/form.ts +0 -36
  73. package/src/components/header/header.module.scss +0 -40
  74. package/src/components/header/header.ts +0 -124
  75. package/src/components/icon/icon.module.scss +0 -30
  76. package/src/components/icon/icon.ts +0 -134
  77. package/src/components/image/image.module.scss +0 -21
  78. package/src/components/image/image.ts +0 -67
  79. package/src/components/input/input.module.scss +0 -69
  80. package/src/components/input/input.ts +0 -274
  81. package/src/components/label/label.module.scss +0 -52
  82. package/src/components/label/label.ts +0 -55
  83. package/src/components/listbox/listbox.module.scss +0 -103
  84. package/src/components/listbox/listbox.ts +0 -427
  85. package/src/components/menu/caret-right-solid.svg +0 -1
  86. package/src/components/menu/menu.module.scss +0 -108
  87. package/src/components/menu/menu.ts +0 -168
  88. package/src/components/messages/circle-exclamation.svg +0 -1
  89. package/src/components/messages/messages.module.scss +0 -47
  90. package/src/components/messages/messages.ts +0 -64
  91. package/src/components/normalize.scss +0 -386
  92. package/src/components/notification/circle-check-solid.svg +0 -1
  93. package/src/components/notification/circle-exclamation-solid.svg +0 -1
  94. package/src/components/notification/circle-notch-light.svg +0 -1
  95. package/src/components/notification/notification.module.scss +0 -82
  96. package/src/components/notification/notification.ts +0 -108
  97. package/src/components/notification/xmark-sharp-light.svg +0 -1
  98. package/src/components/panel/panel.module.scss +0 -48
  99. package/src/components/panel/panel.ts +0 -57
  100. package/src/components/popup/popup.module.scss +0 -43
  101. package/src/components/popup/popup.ts +0 -395
  102. package/src/components/progress/progress.module.scss +0 -57
  103. package/src/components/progress/progress.ts +0 -43
  104. package/src/components/rating/rating.module.scss +0 -23
  105. package/src/components/rating/rating.ts +0 -125
  106. package/src/components/rating/star-sharp-light.svg +0 -1
  107. package/src/components/rating/star-sharp-solid.svg +0 -1
  108. package/src/components/shared.scss +0 -76
  109. package/src/components/sizers/sizer.module.scss +0 -90
  110. package/src/components/sizers/sizer.ts +0 -120
  111. package/src/components/slider/slider.module.scss +0 -71
  112. package/src/components/slider/slider.ts +0 -143
  113. package/src/components/switch/switch.module.scss +0 -127
  114. package/src/components/switch/switch.ts +0 -56
  115. package/src/components/tabs/tabs.module.scss +0 -46
  116. package/src/components/tabs/tabs.ts +0 -157
  117. package/src/components/textarea/textarea.module.scss +0 -59
  118. package/src/components/textarea/textarea.ts +0 -54
  119. package/src/components/textedit/textedit.module.scss +0 -114
  120. package/src/components/textedit/textedit.ts +0 -82
  121. package/src/components/themes.scss +0 -77
  122. package/src/components/tooltips/circle-info-sharp-light.svg +0 -1
  123. package/src/components/tooltips/tooltips.scss +0 -51
  124. package/src/components/tooltips/tooltips.ts +0 -103
  125. package/src/components/treeview/chevron-down-light.svg +0 -1
  126. package/src/components/treeview/treeview.module.scss +0 -116
  127. package/src/components/treeview/treeview.ts +0 -403
  128. package/src/components/viewport/viewport.module.scss +0 -25
  129. package/src/components/viewport/viewport.ts +0 -38
  130. package/src/core/component.ts +0 -979
  131. package/src/core/core_colors.ts +0 -250
  132. package/src/core/core_dom.ts +0 -471
  133. package/src/core/core_dragdrop.ts +0 -201
  134. package/src/core/core_element.ts +0 -98
  135. package/src/core/core_events.ts +0 -149
  136. package/src/core/core_i18n.ts +0 -377
  137. package/src/core/core_router.ts +0 -221
  138. package/src/core/core_styles.ts +0 -215
  139. package/src/core/core_svg.ts +0 -550
  140. package/src/core/core_tools.ts +0 -673
  141. package/src/demo/assets/house-light.svg +0 -1
  142. package/src/demo/assets/radio.svg +0 -4
  143. package/src/demo/index.html +0 -12
  144. package/src/demo/main.scss +0 -21
  145. package/src/demo/main.tsx +0 -323
  146. package/src/x4.scss +0 -19
  147. package/tsconfig.json +0 -14
  148. package/types/svg.d.ts +0 -4
  149. package/types/x4react.d.ts +0 -9
  150. /package/{types → lib/src/types}/scss.d.ts +0 -0
@@ -1,250 +0,0 @@
1
- /**
2
- * ___ ___ __
3
- * \ \/ / / _
4
- * \ / /_| |_
5
- * / \____ _|
6
- * /__/\__\ |_|
7
- *
8
- * @file core_colors.ts
9
- * @author Etienne Cochard
10
- *
11
- * @copyright (c) 2024 R-libre ingenierie
12
- *
13
- * Use of this source code is governed by an MIT-style license
14
- * that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
15
- **/
16
-
17
- import { clamp, isString } from './core_tools';
18
-
19
-
20
- function hx( v: number ) {
21
- const hex = v.toString( 16 );
22
- return hex.padStart( 2, '0' );
23
- }
24
-
25
- function round( v: number ) {
26
- return Math.round(v);
27
- }
28
-
29
-
30
- export interface Rgb {
31
- red: number;
32
- green: number;
33
- blue: number;
34
- alpha: number;
35
- }
36
-
37
- export interface Hsv {
38
- hue: number;
39
- saturation: number;
40
- value: number;
41
- alpha: number;
42
- }
43
-
44
-
45
- export class Color {
46
-
47
- private rgb: [red:number,green:number,blue:number,alpha:number] = [0,0,0,1];
48
- private invalid = false;
49
-
50
- constructor( value: string );
51
- constructor( r: number, g: number, b: number, a?: number );
52
- constructor( ...args: any[] ) {
53
- if( isString(args[0] ) ) {
54
- this.setValue( args[0] );
55
- }
56
- else {
57
- this.setRgb( args[0], args[1], args[2], args[3] );
58
- }
59
- }
60
-
61
- /**
62
- * accepts:
63
- * #aaa
64
- * #ababab
65
- * #ababab55
66
- * rgb(a,b,c)
67
- * rgba(a,b,c,d)
68
- * var( --color-5 )
69
- */
70
-
71
- setValue( value: string ): this {
72
-
73
- this.invalid = false;
74
-
75
- if( value.length==4 && /#[0-9a-fA-F]{3}/.test(value) ) {
76
- const r1 = parseInt( value[1], 16 );
77
- const g1 = parseInt( value[2], 16 );
78
- const b1 = parseInt( value[3], 16 );
79
- return this.setRgb( r1<<4|r1, g1<<4|g1, b1<<4|b1, 1.0 );
80
- }
81
-
82
- if( value.length==7 && /#[0-9a-fA-F]{6}/.test(value) ) {
83
- const r1 = parseInt( value[1], 16 );
84
- const r2 = parseInt( value[2], 16 );
85
- const g1 = parseInt( value[3], 16 );
86
- const g2 = parseInt( value[4], 16 );
87
- const b1 = parseInt( value[5], 16 );
88
- const b2 = parseInt( value[6], 16 );
89
- return this.setRgb( r1<<4|r2, g1<<4|g2, b1<<4|b2, 1.0 );
90
- }
91
-
92
- if( value.length==9 && /#[0-9a-fA-F]{8}/.test(value) ) {
93
- const r1 = parseInt( value[1], 16 );
94
- const r2 = parseInt( value[2], 16 );
95
- const g1 = parseInt( value[3], 16 );
96
- const g2 = parseInt( value[4], 16 );
97
- const b1 = parseInt( value[5], 16 );
98
- const b2 = parseInt( value[6], 16 );
99
- const a1 = parseInt( value[7], 16 );
100
- const a2 = parseInt( value[8], 16 );
101
- return this.setRgb( r1<<4|r2, g1<<4|g2, b1<<4|b2, (a1<<4|a2) / 255.0 );
102
- }
103
-
104
- if( value.startsWith('rgba') ) {
105
- const re = /rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*((\d+)|(\d*\.\d+)|(\.\d+))\s*\)/;
106
- const m = re.exec( value );
107
- if( m ) {
108
- return this.setRgb( parseInt(m[1]), parseInt(m[2]), parseInt(m[3]), parseFloat(m[4]) );
109
- }
110
- }
111
- else if( value.startsWith('rgb') ) {
112
- const re = /rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/;
113
- const m = re.exec( value );
114
- if( m ) {
115
- return this.setRgb( parseInt(m[1]), parseInt(m[2]), parseInt(m[3]), 1.0 );
116
- }
117
- }
118
- else if( value.startsWith("var") ) {
119
- const re = /var\s*\(([^)]*)\)/;
120
- const m = re.exec( value );
121
- if( m ) {
122
- const expr = m[1].trim( );
123
- const style = getComputedStyle( document.documentElement );
124
- const value = style.getPropertyValue( expr );
125
- return this.setValue( value );
126
- }
127
- }
128
-
129
- this.invalid = true;
130
- return this.setRgb(255,0,0,1);
131
- }
132
-
133
- setHsv( h: number, s: number, v: number, a = 1.0 ): this {
134
-
135
- let i = Math.min(5, Math.floor(h * 6)),
136
- f = h * 6 - i,
137
- p = v * (1 - s),
138
- q = v * (1 - f * s),
139
- t = v * (1 - (1 - f) * s);
140
-
141
- let R, G, B;
142
-
143
- switch (i) {
144
- case 0:
145
- R = v;
146
- G = t;
147
- B = p;
148
- break;
149
- case 1:
150
- R = q;
151
- G = v;
152
- B = p;
153
- break;
154
- case 2:
155
- R = p;
156
- G = v;
157
- B = t;
158
- break;
159
- case 3:
160
- R = p;
161
- G = q;
162
- B = v;
163
- break;
164
- case 4:
165
- R = t;
166
- G = p;
167
- B = v;
168
- break;
169
- case 5:
170
- R = v;
171
- G = p;
172
- B = q;
173
- break;
174
- }
175
-
176
- return this.setRgb( R*255, G*255, B*255, a );
177
- }
178
-
179
-
180
- setRgb( r: number, g: number, b: number, a: number ): this {
181
- this.rgb = [clamp(r,0,255),clamp(g,0,255),clamp(b,0,255),clamp(a,0,1)];
182
- return this;
183
- }
184
-
185
- toRgbString( withAlpha?: boolean ): string {
186
- const _ = this.rgb;
187
- return withAlpha===false || _[3]==1 ? `rgb(${round(_[0])},${round(_[1])},${round(_[2])})` : `rgba(${round(_[0])},${round(_[1])},${round(_[2])},${_[3].toFixed(3)})`
188
- }
189
-
190
- toHexString( ): string {
191
- const _ = this.rgb;
192
- return _[3]==1 ? `#(${hx(_[0])},${hx(_[1])},${hx(_[2])})` : `rgba(${hx(_[0])},${hx(_[1])},${hx(_[2])},${hx(_[3]*255)})`
193
- }
194
-
195
- toRgb( ): Rgb {
196
- const _ = this.rgb;
197
- return { red: _[0], green: _[1], blue: _[2], alpha: _[3] };
198
- }
199
-
200
- toHsv( ): Hsv {
201
-
202
- let el = this.toRgb( );
203
-
204
- el.red /= 255.0;
205
- el.green /= 255.0;
206
- el.blue /= 255.0;
207
-
208
- const max = Math.max(el.red, el.green, el.blue);
209
- const min = Math.min(el.red, el.green, el.blue);
210
- const delta = max - min;
211
- const saturation = (max === 0) ? 0 : (delta / max);
212
- const value = max;
213
-
214
- let hue;
215
-
216
- if (delta === 0) {
217
- hue = 0;
218
- }
219
- else {
220
- switch (max) {
221
- case el.red:
222
- hue = (el.green - el.blue) / delta / 6 + (el.green < el.blue ? 1 : 0);
223
- break;
224
-
225
- case el.green:
226
- hue = (el.blue - el.red) / delta / 6 + 1 / 3;
227
- break;
228
-
229
- case el.blue:
230
- hue = (el.red - el.green) / delta / 6 + 2 / 3;
231
- break;
232
- }
233
- }
234
-
235
- return { hue, saturation, value, alpha: el.alpha };
236
- }
237
-
238
- getAlpha( ) {
239
- return this.rgb[3];
240
- }
241
-
242
- setAlpha( a: number ): this {
243
- this.rgb[3] = clamp( a, 0, 1 );
244
- return this;
245
- }
246
-
247
- isInvalid( ) {
248
- return this.invalid;
249
- }
250
- }
@@ -1,471 +0,0 @@
1
- /**
2
- * ___ ___ __
3
- * \ \/ / / _
4
- * \ / /_| |_
5
- * / \____ _|
6
- * /__/\__\ |_|
7
- *
8
- * @file core_dom.ts
9
- * @author Etienne Cochard
10
- *
11
- * @copyright (c) 2024 R-libre ingenierie
12
- *
13
- * Use of this source code is governed by an MIT-style license
14
- * that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
15
- **/
16
-
17
- /** @ignore this events must be defined on domNode (do not bubble) */
18
- export const unbubbleEvents = {
19
- mouseleave: 1, mouseenter: 1, load: 1, unload: 1, scroll: 1, focus: 1, blur: 1, rowexit: 1, beforeunload: 1, stop: 1,
20
- dragdrop: 1, dragenter: 1, dragexit: 1, draggesture: 1, dragover: 1, contextmenu: 1, created: 2, removed: 2, sizechange: 2
21
- };
22
-
23
- export type DOMEventHandler = ( ev: Event ) => void;
24
- type EventEntry = Record<string,DOMEventHandler | DOMEventHandler[]>;
25
-
26
- const event_handlers = new WeakMap<Node,EventEntry>( );
27
-
28
- /**
29
- * handle dom mutations
30
- */
31
-
32
- let mutObserver: MutationObserver = null;
33
-
34
- const observeMutation = (mutations: MutationRecord[], observer: MutationObserver): void => {
35
-
36
- const sendEvent = ( node: Node, code: "created" | "removed" ) => {
37
- // console.log( "notify", node, code );
38
-
39
- const store = event_handlers.get( node );
40
- if ( store && store[code] ) {
41
- node.dispatchEvent( new Event( code, {} ) );
42
- }
43
- }
44
-
45
- const notify = ( node: Node, create: boolean ) => {
46
-
47
- if( create ) {
48
- sendEvent( node, "created" );
49
- }
50
-
51
- for( let c=node.firstChild; c; c=c.nextSibling ) {
52
- notify( c, create );
53
- }
54
-
55
- if( !create ) {
56
- sendEvent( node, "removed" );
57
- }
58
- }
59
-
60
-
61
- for (const mutation of mutations) {
62
- if( mutation.type=="childList" ) {
63
- if( mutation.addedNodes ) {
64
- mutation.addedNodes.forEach( node => {
65
- notify( node, true );
66
- } );
67
- }
68
-
69
- if( mutation.removedNodes ) {
70
- mutation.removedNodes.forEach( node => {
71
- notify( node, false );
72
- } );
73
- }
74
- }
75
- }
76
- }
77
-
78
-
79
-
80
- /**
81
- *
82
- */
83
-
84
- let sizeObserver: ResizeObserver = null;
85
-
86
- function observeSize(entries: ResizeObserverEntry[]) {
87
- entries.forEach((entry) => {
88
- let dom = entry.target as HTMLElement;
89
- if (dom.offsetParent !== null) {
90
- dom.dispatchEvent( new Event('resized') );
91
- }
92
- });
93
- }
94
-
95
- /**
96
- *
97
- */
98
-
99
- export function dispatchEvent(ev: Event) {
100
-
101
- let target = ev.target as Node,
102
- noup = (unbubbleEvents as any)[ev.type] === 2;
103
-
104
- while (target) {
105
- const store = event_handlers.get( target );
106
- if ( store ) {
107
- const callback = store[ev.type];
108
- if( callback ) {
109
- if( Array.isArray(callback) ) {
110
- callback.some( c => c( ev ) );
111
- }
112
- else {
113
- callback( ev );
114
- }
115
-
116
- if (ev.stopPropagation || ev.defaultPrevented || noup) {
117
- break;
118
- }
119
- }
120
- }
121
-
122
- target = target.parentNode;
123
-
124
- // no need to go above
125
- if (target == document) {
126
- break;
127
- }
128
- }
129
- }
130
-
131
- /**
132
- *
133
- */
134
-
135
- export function addEvent( node: Node, name: string, handler: DOMEventHandler, prepend = false ) {
136
-
137
- if( name=="removed" || name=="created" ) {
138
- if( !mutObserver ) {
139
- mutObserver = new MutationObserver( observeMutation )
140
- mutObserver.observe( document.body, {childList: true,subtree: true} );
141
- }
142
- }
143
- else if( name=="resized" ) {
144
- if (!sizeObserver) {
145
- sizeObserver = new ResizeObserver( observeSize );
146
- }
147
-
148
- sizeObserver.observe( node as Element );
149
- }
150
-
151
-
152
- let store = event_handlers.get( node );
153
- if( !store ) {
154
- store = {}
155
- event_handlers.set( node, store );
156
- }
157
-
158
- if( !store[name] ) {
159
- store[name] = handler;
160
- node.addEventListener( name, dispatchEvent );
161
- }
162
- else {
163
- const entry = store[name];
164
- if( Array.isArray(entry) ) {
165
- entry.push( handler );
166
- }
167
- else {
168
- store[name] = [entry,handler];
169
- }
170
- }
171
- }
172
-
173
- /**
174
- *
175
- */
176
-
177
- export interface GlobalDOMEvents {
178
-
179
- /**
180
- * Fires when the user aborts the download.
181
- * @param ev The event.
182
- */
183
-
184
- abort?: (ev: UIEvent) => any;
185
- animationcancel?: (ev: AnimationEvent) => any;
186
- animationend?: (ev: AnimationEvent) => any;
187
- animationiteration?: (ev: AnimationEvent) => any;
188
- animationstart?: (ev: AnimationEvent) => any;
189
- auxclick?: (ev: MouseEvent) => any;
190
-
191
- /**
192
- * Fires when the object loses the input focus.
193
- * @param ev The focus event.
194
- */
195
- blur?: (ev: FocusEvent) => any;
196
- cancel?: (ev: Event) => any;
197
-
198
- /**
199
- * Occurs when playback is possible, but would require further buffering.
200
- * @param ev The event.
201
- */
202
- canplay?: (ev: Event) => any;
203
- canplaythrough?: (ev: Event) => any;
204
- /**
205
- * Fires when the contents of the object or selection have changed.
206
- * @param ev The event.
207
- */
208
- change?: (ev: Event) => any;
209
- /**
210
- * Fires when the user clicks the left mouse button on the object
211
- * @param ev The mouse event.
212
- */
213
- click?: (ev: MouseEvent) => any;
214
- close?: (ev: Event) => any;
215
- /**
216
- * Fires when the user clicks the right mouse button in the client area, opening the context menu.
217
- * @param ev The mouse event.
218
- */
219
- contextmenu?: (ev: MouseEvent) => any;
220
- cuechange?: (ev: Event) => any;
221
- /**
222
- * Fires when the user double-clicks the object.
223
- * @param ev The mouse event.
224
- */
225
- dblclick?: (ev: MouseEvent) => any;
226
- /**
227
- * Fires on the source object continuously during a drag operation.
228
- * @param ev The event.
229
- */
230
- drag?: (ev: DragEvent) => any;
231
- /**
232
- * Fires on the source object when the user releases the mouse at the close of a drag operation.
233
- * @param ev The event.
234
- */
235
- dragend?: (ev: DragEvent) => any;
236
- /**
237
- * Fires on the target element when the user drags the object to a valid drop target.
238
- * @param ev The drag event.
239
- */
240
- dragenter?: (ev: DragEvent) => any;
241
- dragexit?: (ev: Event) => any;
242
- /**
243
- * Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.
244
- * @param ev The drag event.
245
- */
246
- dragleave?: (ev: DragEvent) => any;
247
- /**
248
- * Fires on the target element continuously while the user drags the object over a valid drop target.
249
- * @param ev The event.
250
- */
251
- dragover?: (ev: DragEvent) => any;
252
- /**
253
- * Fires on the source object when the user starts to drag a text selection or selected object.
254
- * @param ev The event.
255
- */
256
- dragstart?: (ev: DragEvent) => any;
257
- drop?: (ev: DragEvent) => any;
258
- /**
259
- * Occurs when the duration attribute is updated.
260
- * @param ev The event.
261
- */
262
- durationchange?: (ev: Event) => any;
263
- /**
264
- * Occurs when the media element is reset to its initial state.
265
- * @param ev The event.
266
- */
267
- emptied?: (ev: Event) => any;
268
- /**
269
- * Occurs when the end of playback is reached.
270
- * @param ev The event
271
- */
272
- ended?: (ev: Event) => any;
273
- /**
274
- * Fires when an error occurs during object loading.
275
- * @param ev The event.
276
- */
277
- error?: OnErrorEventHandler;
278
- /**
279
- * Fires when the object receives focus.
280
- * @param ev The event.
281
- */
282
- focusin?: (ev: FocusEvent) => any;
283
- focusout?: (ev: FocusEvent) => any;
284
- focus?: (ev: FocusEvent) => any;
285
- gotpointercapture?: (ev: PointerEvent) => any;
286
- input?: (ev: Event) => any;
287
- invalid?: (ev: Event) => any;
288
- /**
289
- * Fires when the user presses a key.
290
- * @param ev The keyboard event
291
- */
292
- keydown?: (ev: KeyboardEvent) => any;
293
- /**
294
- * Fires when the user presses an alphanumeric key.
295
- * @param ev The event.
296
- */
297
- keypress?: (ev: KeyboardEvent) => any;
298
- /**
299
- * Fires when the user releases a key.
300
- * @param ev The keyboard event
301
- */
302
- keyup?: (ev: KeyboardEvent) => any;
303
- /**
304
- * Fires immediately after the browser loads the object.
305
- * @param ev The event.
306
- */
307
- load?: (ev: Event) => any;
308
- /**
309
- * Occurs when media data is loaded at the current playback position.
310
- * @param ev The event.
311
- */
312
- loadeddata?: (ev: Event) => any;
313
- /**
314
- * Occurs when the duration and dimensions of the media have been determined.
315
- * @param ev The event.
316
- */
317
- loadedmetadata?: (ev: Event) => any;
318
- /**
319
- * Occurs when Internet Explorer begins looking for media data.
320
- * @param ev The event.
321
- */
322
- loadstart?: (ev: Event) => any;
323
- lostpointercapture?: (ev: PointerEvent) => any;
324
- /**
325
- * Fires when the user clicks the object with either mouse button.
326
- * @param ev The mouse event.
327
- */
328
- mousedown?: (ev: MouseEvent) => any;
329
- mouseenter?: (ev: MouseEvent) => any;
330
- mouseleave?: (ev: MouseEvent) => any;
331
- /**
332
- * Fires when the user moves the mouse over the object.
333
- * @param ev The mouse event.
334
- */
335
- mousemove?: (ev: MouseEvent) => any;
336
- /**
337
- * Fires when the user moves the mouse pointer outside the boundaries of the object.
338
- * @param ev The mouse event.
339
- */
340
- mouseout?: (ev: MouseEvent) => any;
341
- /**
342
- * Fires when the user moves the mouse pointer into the object.
343
- * @param ev The mouse event.
344
- */
345
- mouseover?: (ev: MouseEvent) => any;
346
- /**
347
- * Fires when the user releases a mouse button while the mouse is over the object.
348
- * @param ev The mouse event.
349
- */
350
- mouseup?: (ev: MouseEvent) => any;
351
- /**
352
- * Occurs when playback is paused.
353
- * @param ev The event.
354
- */
355
- pause?: (ev: Event) => any;
356
- /**
357
- * Occurs when the play method is requested.
358
- * @param ev The event.
359
- */
360
- play?: (ev: Event) => any;
361
- /**
362
- * Occurs when the audio or video has started playing.
363
- * @param ev The event.
364
- */
365
- playing?: (ev: Event) => any;
366
- pointercancel?: (ev: PointerEvent) => any;
367
- pointerdown?: (ev: PointerEvent) => any;
368
- pointerenter?: (ev: PointerEvent) => any;
369
- pointerleave?: (ev: PointerEvent) => any;
370
- pointermove?: (ev: PointerEvent) => any;
371
- pointerout?: (ev: PointerEvent) => any;
372
- pointerover?: (ev: PointerEvent) => any;
373
- pointerup?: (ev: PointerEvent) => any;
374
- /**
375
- * Occurs to indicate progress while downloading media data.
376
- * @param ev The event.
377
- */
378
- progress?: (ev: ProgressEvent) => any;
379
- /**
380
- * Occurs when the playback rate is increased or decreased.
381
- * @param ev The event.
382
- */
383
- ratechange?: (ev: Event) => any;
384
- /**
385
- * Fires when the user resets a form.
386
- * @param ev The event.
387
- */
388
- reset?: (ev: Event) => any;
389
- //resize?: (ev: UIEvent) => any; remove to avoid errors with sizechange event
390
-
391
- /**
392
- * Fires when the user repositions the scroll box in the scroll bar on the object.
393
- * @param ev The event.
394
- */
395
- scroll?: (ev: Event) => any;
396
- securitypolicyviolation?: (ev: SecurityPolicyViolationEvent) => any;
397
- /**
398
- * Occurs when the seek operation ends.
399
- * @param ev The event.
400
- */
401
- seeked?: (ev: Event) => any;
402
- /**
403
- * Occurs when the current playback position is moved.
404
- * @param ev The event.
405
- */
406
- seeking?: (ev: Event) => any;
407
- /**
408
- * Fires when the current selection changes.
409
- * @param ev The event.
410
- */
411
- select?: (ev: Event) => any;
412
- selectionchange?: (ev: Event) => any;
413
- selectstart?: (ev: Event) => any;
414
- /**
415
- * Occurs when the download has stopped.
416
- * @param ev The event.
417
- */
418
- stalled?: (ev: Event) => any;
419
- submit?: (ev: Event) => any;
420
-
421
- /**
422
- * Occurs if the load operation has been intentionally halted.
423
- * @param ev The event.
424
- */
425
- suspend?: (ev: Event) => any;
426
-
427
- /**
428
- * Occurs to indicate the current playback position.
429
- * @param ev The event.
430
- */
431
- timeupdate?: (ev: Event) => any;
432
- toggle?: (ev: Event) => any;
433
- touchcancel?: (ev: TouchEvent) => any;
434
- touchend?: (ev: TouchEvent) => any;
435
- touchmove?: (ev: TouchEvent) => any;
436
- touchstart?: (ev: TouchEvent) => any;
437
- transitioncancel?: (ev: TransitionEvent) => any;
438
- transitionend?: (ev: TransitionEvent) => any;
439
- transitionrun?: (ev: TransitionEvent) => any;
440
- transitionstart?: (ev: TransitionEvent) => any;
441
-
442
- /**
443
- * Occurs when the volume is changed, or playback is muted or unmuted.
444
- * @param ev The event.
445
- */
446
- volumechange?: (ev: Event) => any;
447
-
448
- /**
449
- * Occurs when playback stops because the next frame of a video resource is not available.
450
- * @param ev The event.
451
- */
452
- waiting?: (ev: Event) => any;
453
- wheel?: (ev: WheelEvent) => any;
454
-
455
- /**
456
- * custom x4 events
457
- */
458
-
459
- resized?: (ev: Event) => void; // occurs when size changed
460
- created?: ( ev: Event ) => void; // occurs when inserted in the dom
461
- removed?: ( ev: Event ) => void; // occurs when removed from dom
462
- }
463
-
464
-
465
-
466
-
467
-
468
-
469
-
470
-
471
-