easy 24.1.0 → 24.1.2
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/.aiignore +12 -0
- package/.swcrc +4 -3
- package/example.js +672 -2711
- package/lib/bounds.js +50 -116
- package/lib/constants.js +23 -23
- package/lib/document.js +48 -97
- package/lib/element/body.js +7 -131
- package/lib/element/button.js +5 -129
- package/lib/element/checkbox.js +13 -160
- package/lib/element/input.js +7 -131
- package/lib/element/link.js +10 -156
- package/lib/element/select.js +6 -130
- package/lib/element/textarea.js +7 -131
- package/lib/element.js +245 -481
- package/lib/eventTypes.js +60 -60
- package/lib/example/preamble.js +2 -2
- package/lib/example/view/div.js +20 -169
- package/lib/example/view.js +9 -152
- package/lib/example.js +4 -4
- package/lib/index.js +22 -22
- package/lib/mixins/click.js +10 -10
- package/lib/mixins/customEvent.js +41 -84
- package/lib/mixins/element.js +28 -34
- package/lib/mixins/event.js +45 -50
- package/lib/mixins/focus.js +13 -13
- package/lib/mixins/fullScreen.js +11 -11
- package/lib/mixins/input.js +12 -12
- package/lib/mixins/jsx.js +42 -48
- package/lib/mixins/key.js +8 -8
- package/lib/mixins/mouse.js +14 -14
- package/lib/mixins/resize.js +6 -6
- package/lib/mixins/scroll.js +13 -13
- package/lib/mixins/selection.js +15 -15
- package/lib/mixins/state.js +6 -6
- package/lib/mixins/touch.js +10 -10
- package/lib/mouseButtons.js +8 -8
- package/lib/offset.js +14 -47
- package/lib/react.js +17 -31
- package/lib/textElement.js +61 -129
- package/lib/utilities/array.js +8 -38
- package/lib/utilities/async.js +5 -5
- package/lib/utilities/dom.js +17 -19
- package/lib/utilities/element.js +22 -44
- package/lib/utilities/elements.js +7 -11
- package/lib/utilities/name.js +2 -2
- package/lib/utilities/object.js +17 -47
- package/lib/utilities/string.js +3 -3
- package/lib/window.js +55 -152
- package/package.json +1 -1
package/lib/element/select.js
CHANGED
|
@@ -8,142 +8,18 @@ Object.defineProperty(exports, "default", {
|
|
|
8
8
|
return Select;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
function _assert_this_initialized(self) {
|
|
15
|
-
if (self === void 0) {
|
|
16
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
17
|
-
}
|
|
18
|
-
return self;
|
|
19
|
-
}
|
|
20
|
-
function _call_super(_this, derived, args) {
|
|
21
|
-
derived = _get_prototype_of(derived);
|
|
22
|
-
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
23
|
-
}
|
|
24
|
-
function _class_call_check(instance, Constructor) {
|
|
25
|
-
if (!(instance instanceof Constructor)) {
|
|
26
|
-
throw new TypeError("Cannot call a class as a function");
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
function _construct(Parent, args, Class) {
|
|
30
|
-
if (_is_native_reflect_construct()) {
|
|
31
|
-
_construct = Reflect.construct;
|
|
32
|
-
} else {
|
|
33
|
-
_construct = function construct(Parent, args, Class) {
|
|
34
|
-
var a = [
|
|
35
|
-
null
|
|
36
|
-
];
|
|
37
|
-
a.push.apply(a, args);
|
|
38
|
-
var Constructor = Function.bind.apply(Parent, a);
|
|
39
|
-
var instance = new Constructor();
|
|
40
|
-
if (Class) _set_prototype_of(instance, Class.prototype);
|
|
41
|
-
return instance;
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
return _construct.apply(null, arguments);
|
|
45
|
-
}
|
|
46
|
-
function _define_property(obj, key, value) {
|
|
47
|
-
if (key in obj) {
|
|
48
|
-
Object.defineProperty(obj, key, {
|
|
49
|
-
value: value,
|
|
50
|
-
enumerable: true,
|
|
51
|
-
configurable: true,
|
|
52
|
-
writable: true
|
|
53
|
-
});
|
|
54
|
-
} else {
|
|
55
|
-
obj[key] = value;
|
|
56
|
-
}
|
|
57
|
-
return obj;
|
|
58
|
-
}
|
|
59
|
-
function _get_prototype_of(o) {
|
|
60
|
-
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
61
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
62
|
-
};
|
|
63
|
-
return _get_prototype_of(o);
|
|
64
|
-
}
|
|
65
|
-
function _inherits(subClass, superClass) {
|
|
66
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
67
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
68
|
-
}
|
|
69
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
70
|
-
constructor: {
|
|
71
|
-
value: subClass,
|
|
72
|
-
writable: true,
|
|
73
|
-
configurable: true
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
77
|
-
}
|
|
11
|
+
const _element = /*#__PURE__*/ _interop_require_default(require("../element"));
|
|
12
|
+
const _input = /*#__PURE__*/ _interop_require_default(require("../mixins/input"));
|
|
13
|
+
const _focus = /*#__PURE__*/ _interop_require_default(require("../mixins/focus"));
|
|
78
14
|
function _interop_require_default(obj) {
|
|
79
15
|
return obj && obj.__esModule ? obj : {
|
|
80
16
|
default: obj
|
|
81
17
|
};
|
|
82
18
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
function _possible_constructor_return(self, call) {
|
|
87
|
-
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
88
|
-
return call;
|
|
89
|
-
}
|
|
90
|
-
return _assert_this_initialized(self);
|
|
91
|
-
}
|
|
92
|
-
function _set_prototype_of(o, p) {
|
|
93
|
-
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
94
|
-
o.__proto__ = p;
|
|
95
|
-
return o;
|
|
96
|
-
};
|
|
97
|
-
return _set_prototype_of(o, p);
|
|
19
|
+
class Select extends _element.default {
|
|
20
|
+
static tagName = "select";
|
|
98
21
|
}
|
|
99
|
-
function _type_of(obj) {
|
|
100
|
-
"@swc/helpers - typeof";
|
|
101
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
102
|
-
}
|
|
103
|
-
function _wrap_native_super(Class) {
|
|
104
|
-
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
105
|
-
_wrap_native_super = function wrapNativeSuper(Class) {
|
|
106
|
-
if (Class === null || !_is_native_function(Class)) return Class;
|
|
107
|
-
if (typeof Class !== "function") {
|
|
108
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
109
|
-
}
|
|
110
|
-
if (typeof _cache !== "undefined") {
|
|
111
|
-
if (_cache.has(Class)) return _cache.get(Class);
|
|
112
|
-
_cache.set(Class, Wrapper);
|
|
113
|
-
}
|
|
114
|
-
function Wrapper() {
|
|
115
|
-
return _construct(Class, arguments, _get_prototype_of(this).constructor);
|
|
116
|
-
}
|
|
117
|
-
Wrapper.prototype = Object.create(Class.prototype, {
|
|
118
|
-
constructor: {
|
|
119
|
-
value: Wrapper,
|
|
120
|
-
enumerable: false,
|
|
121
|
-
writable: true,
|
|
122
|
-
configurable: true
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
return _set_prototype_of(Wrapper, Class);
|
|
126
|
-
};
|
|
127
|
-
return _wrap_native_super(Class);
|
|
128
|
-
}
|
|
129
|
-
function _is_native_reflect_construct() {
|
|
130
|
-
try {
|
|
131
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
132
|
-
} catch (_) {}
|
|
133
|
-
return (_is_native_reflect_construct = function() {
|
|
134
|
-
return !!result;
|
|
135
|
-
})();
|
|
136
|
-
}
|
|
137
|
-
var Select = /*#__PURE__*/ function(Element) {
|
|
138
|
-
_inherits(Select, Element);
|
|
139
|
-
function Select() {
|
|
140
|
-
_class_call_check(this, Select);
|
|
141
|
-
return _call_super(this, Select, arguments);
|
|
142
|
-
}
|
|
143
|
-
return Select;
|
|
144
|
-
}(_wrap_native_super(_element.default));
|
|
145
|
-
_define_property(Select, "tagName", "select");
|
|
146
22
|
Object.assign(Select.prototype, _input.default);
|
|
147
23
|
Object.assign(Select.prototype, _focus.default);
|
|
148
24
|
|
|
149
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
25
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9lbGVtZW50L3NlbGVjdC5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcblxuaW1wb3J0IEVsZW1lbnQgZnJvbSBcIi4uL2VsZW1lbnRcIjtcbmltcG9ydCBpbnB1dE1peGlucyBmcm9tIFwiLi4vbWl4aW5zL2lucHV0XCI7XG5pbXBvcnQgZm9jdXNNaXhpbnMgZnJvbSBcIi4uL21peGlucy9mb2N1c1wiO1xuXG5leHBvcnQgZGVmYXVsdCBjbGFzcyBTZWxlY3QgZXh0ZW5kcyBFbGVtZW50IHtcbiAgc3RhdGljIHRhZ05hbWUgPSBcInNlbGVjdFwiO1xufVxuXG5PYmplY3QuYXNzaWduKFNlbGVjdC5wcm90b3R5cGUsIGlucHV0TWl4aW5zKTtcbk9iamVjdC5hc3NpZ24oU2VsZWN0LnByb3RvdHlwZSwgZm9jdXNNaXhpbnMpO1xuIl0sIm5hbWVzIjpbIlNlbGVjdCIsIkVsZW1lbnQiLCJ0YWdOYW1lIiwiT2JqZWN0IiwiYXNzaWduIiwicHJvdG90eXBlIiwiaW5wdXRNaXhpbnMiLCJmb2N1c01peGlucyJdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7K0JBTUE7OztlQUFxQkE7OztnRUFKRDs4REFDSTs4REFDQTs7Ozs7O0FBRVQsTUFBTUEsZUFBZUMsZ0JBQU87SUFDekMsT0FBT0MsVUFBVSxTQUFTO0FBQzVCO0FBRUFDLE9BQU9DLE1BQU0sQ0FBQ0osT0FBT0ssU0FBUyxFQUFFQyxjQUFXO0FBQzNDSCxPQUFPQyxNQUFNLENBQUNKLE9BQU9LLFNBQVMsRUFBRUUsY0FBVyJ9
|
package/lib/element/textarea.js
CHANGED
|
@@ -8,144 +8,20 @@ Object.defineProperty(exports, "default", {
|
|
|
8
8
|
return Textarea;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
function _assert_this_initialized(self) {
|
|
16
|
-
if (self === void 0) {
|
|
17
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
18
|
-
}
|
|
19
|
-
return self;
|
|
20
|
-
}
|
|
21
|
-
function _call_super(_this, derived, args) {
|
|
22
|
-
derived = _get_prototype_of(derived);
|
|
23
|
-
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
24
|
-
}
|
|
25
|
-
function _class_call_check(instance, Constructor) {
|
|
26
|
-
if (!(instance instanceof Constructor)) {
|
|
27
|
-
throw new TypeError("Cannot call a class as a function");
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
function _construct(Parent, args, Class) {
|
|
31
|
-
if (_is_native_reflect_construct()) {
|
|
32
|
-
_construct = Reflect.construct;
|
|
33
|
-
} else {
|
|
34
|
-
_construct = function construct(Parent, args, Class) {
|
|
35
|
-
var a = [
|
|
36
|
-
null
|
|
37
|
-
];
|
|
38
|
-
a.push.apply(a, args);
|
|
39
|
-
var Constructor = Function.bind.apply(Parent, a);
|
|
40
|
-
var instance = new Constructor();
|
|
41
|
-
if (Class) _set_prototype_of(instance, Class.prototype);
|
|
42
|
-
return instance;
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
return _construct.apply(null, arguments);
|
|
46
|
-
}
|
|
47
|
-
function _define_property(obj, key, value) {
|
|
48
|
-
if (key in obj) {
|
|
49
|
-
Object.defineProperty(obj, key, {
|
|
50
|
-
value: value,
|
|
51
|
-
enumerable: true,
|
|
52
|
-
configurable: true,
|
|
53
|
-
writable: true
|
|
54
|
-
});
|
|
55
|
-
} else {
|
|
56
|
-
obj[key] = value;
|
|
57
|
-
}
|
|
58
|
-
return obj;
|
|
59
|
-
}
|
|
60
|
-
function _get_prototype_of(o) {
|
|
61
|
-
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
62
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
63
|
-
};
|
|
64
|
-
return _get_prototype_of(o);
|
|
65
|
-
}
|
|
66
|
-
function _inherits(subClass, superClass) {
|
|
67
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
68
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
69
|
-
}
|
|
70
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
71
|
-
constructor: {
|
|
72
|
-
value: subClass,
|
|
73
|
-
writable: true,
|
|
74
|
-
configurable: true
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
78
|
-
}
|
|
11
|
+
const _element = /*#__PURE__*/ _interop_require_default(require("../element"));
|
|
12
|
+
const _input = /*#__PURE__*/ _interop_require_default(require("../mixins/input"));
|
|
13
|
+
const _focus = /*#__PURE__*/ _interop_require_default(require("../mixins/focus"));
|
|
14
|
+
const _selection = /*#__PURE__*/ _interop_require_default(require("../mixins/selection"));
|
|
79
15
|
function _interop_require_default(obj) {
|
|
80
16
|
return obj && obj.__esModule ? obj : {
|
|
81
17
|
default: obj
|
|
82
18
|
};
|
|
83
19
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
function _possible_constructor_return(self, call) {
|
|
88
|
-
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
89
|
-
return call;
|
|
90
|
-
}
|
|
91
|
-
return _assert_this_initialized(self);
|
|
92
|
-
}
|
|
93
|
-
function _set_prototype_of(o, p) {
|
|
94
|
-
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
95
|
-
o.__proto__ = p;
|
|
96
|
-
return o;
|
|
97
|
-
};
|
|
98
|
-
return _set_prototype_of(o, p);
|
|
20
|
+
class Textarea extends _element.default {
|
|
21
|
+
static tagName = "textarea";
|
|
99
22
|
}
|
|
100
|
-
function _type_of(obj) {
|
|
101
|
-
"@swc/helpers - typeof";
|
|
102
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
103
|
-
}
|
|
104
|
-
function _wrap_native_super(Class) {
|
|
105
|
-
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
106
|
-
_wrap_native_super = function wrapNativeSuper(Class) {
|
|
107
|
-
if (Class === null || !_is_native_function(Class)) return Class;
|
|
108
|
-
if (typeof Class !== "function") {
|
|
109
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
110
|
-
}
|
|
111
|
-
if (typeof _cache !== "undefined") {
|
|
112
|
-
if (_cache.has(Class)) return _cache.get(Class);
|
|
113
|
-
_cache.set(Class, Wrapper);
|
|
114
|
-
}
|
|
115
|
-
function Wrapper() {
|
|
116
|
-
return _construct(Class, arguments, _get_prototype_of(this).constructor);
|
|
117
|
-
}
|
|
118
|
-
Wrapper.prototype = Object.create(Class.prototype, {
|
|
119
|
-
constructor: {
|
|
120
|
-
value: Wrapper,
|
|
121
|
-
enumerable: false,
|
|
122
|
-
writable: true,
|
|
123
|
-
configurable: true
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
return _set_prototype_of(Wrapper, Class);
|
|
127
|
-
};
|
|
128
|
-
return _wrap_native_super(Class);
|
|
129
|
-
}
|
|
130
|
-
function _is_native_reflect_construct() {
|
|
131
|
-
try {
|
|
132
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
133
|
-
} catch (_) {}
|
|
134
|
-
return (_is_native_reflect_construct = function() {
|
|
135
|
-
return !!result;
|
|
136
|
-
})();
|
|
137
|
-
}
|
|
138
|
-
var Textarea = /*#__PURE__*/ function(Element) {
|
|
139
|
-
_inherits(Textarea, Element);
|
|
140
|
-
function Textarea() {
|
|
141
|
-
_class_call_check(this, Textarea);
|
|
142
|
-
return _call_super(this, Textarea, arguments);
|
|
143
|
-
}
|
|
144
|
-
return Textarea;
|
|
145
|
-
}(_wrap_native_super(_element.default));
|
|
146
|
-
_define_property(Textarea, "tagName", "textarea");
|
|
147
23
|
Object.assign(Textarea.prototype, _input.default);
|
|
148
24
|
Object.assign(Textarea.prototype, _focus.default);
|
|
149
25
|
Object.assign(Textarea.prototype, _selection.default);
|
|
150
26
|
|
|
151
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
27
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9lbGVtZW50L3RleHRhcmVhLmpzIl0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuXG5pbXBvcnQgRWxlbWVudCBmcm9tIFwiLi4vZWxlbWVudFwiO1xuaW1wb3J0IGlucHV0TWl4aW5zIGZyb20gXCIuLi9taXhpbnMvaW5wdXRcIjtcbmltcG9ydCBmb2N1c01peGlucyBmcm9tIFwiLi4vbWl4aW5zL2ZvY3VzXCI7XG5pbXBvcnQgc2VsZWN0aW9uTWl4aW5zIGZyb20gXCIuLi9taXhpbnMvc2VsZWN0aW9uXCI7XG5cbmV4cG9ydCBkZWZhdWx0IGNsYXNzIFRleHRhcmVhIGV4dGVuZHMgRWxlbWVudCB7XG4gIHN0YXRpYyB0YWdOYW1lID0gXCJ0ZXh0YXJlYVwiO1xufVxuXG5PYmplY3QuYXNzaWduKFRleHRhcmVhLnByb3RvdHlwZSwgaW5wdXRNaXhpbnMpO1xuT2JqZWN0LmFzc2lnbihUZXh0YXJlYS5wcm90b3R5cGUsIGZvY3VzTWl4aW5zKTtcbk9iamVjdC5hc3NpZ24oVGV4dGFyZWEucHJvdG90eXBlLCBzZWxlY3Rpb25NaXhpbnMpO1xuIl0sIm5hbWVzIjpbIlRleHRhcmVhIiwiRWxlbWVudCIsInRhZ05hbWUiLCJPYmplY3QiLCJhc3NpZ24iLCJwcm90b3R5cGUiLCJpbnB1dE1peGlucyIsImZvY3VzTWl4aW5zIiwic2VsZWN0aW9uTWl4aW5zIl0sIm1hcHBpbmdzIjoiQUFBQTs7OzsrQkFPQTs7O2VBQXFCQTs7O2dFQUxEOzhEQUNJOzhEQUNBO2tFQUNJOzs7Ozs7QUFFYixNQUFNQSxpQkFBaUJDLGdCQUFPO0lBQzNDLE9BQU9DLFVBQVUsV0FBVztBQUM5QjtBQUVBQyxPQUFPQyxNQUFNLENBQUNKLFNBQVNLLFNBQVMsRUFBRUMsY0FBVztBQUM3Q0gsT0FBT0MsTUFBTSxDQUFDSixTQUFTSyxTQUFTLEVBQUVFLGNBQVc7QUFDN0NKLE9BQU9DLE1BQU0sQ0FBQ0osU0FBU0ssU0FBUyxFQUFFRyxrQkFBZSJ9
|