highmark-cli 0.0.135 → 0.0.138
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/client.js +1376 -449
- package/lib/client.js +4 -6
- package/lib/constants.js +37 -25
- package/lib/customEventTypes.js +40 -4
- package/lib/mixins/touch.js +346 -71
- package/lib/position/relative.js +97 -0
- package/lib/position.js +8 -36
- package/lib/selectors.js +26 -0
- package/lib/style.js +13 -0
- package/lib/utilities/element.js +6 -3
- package/lib/utilities/positions.js +143 -0
- package/lib/view/div/leaf.js +20 -16
- package/lib/view/div/menu.js +238 -0
- package/lib/view.js +268 -68
- package/package.json +5 -5
- package/src/client.js +2 -6
- package/src/constants.js +11 -8
- package/src/customEventTypes.js +10 -1
- package/src/mixins/touch.js +556 -78
- package/src/position/relative.js +63 -0
- package/src/position.js +10 -48
- package/src/selectors.js +5 -0
- package/src/style.js +3 -0
- package/src/utilities/element.js +7 -2
- package/src/utilities/positions.js +127 -0
- package/src/view/div/leaf.js +23 -26
- package/src/view/div/menu.js +62 -0
- package/src/view.js +315 -76
- package/template/default.html +10 -4
- package/lib/mixins/event.js +0 -46
- package/lib/velocity.js +0 -82
- package/src/mixins/event.js +0 -56
- package/src/velocity.js +0 -45
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _easywithstyle = /*#__PURE__*/ _interop_require_default(require("easy-with-style"));
|
|
12
|
+
var _easy = require("easy");
|
|
13
|
+
var _touch = /*#__PURE__*/ _interop_require_default(require("../../mixins/touch"));
|
|
14
|
+
var _style = require("../../style");
|
|
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 _class_call_check(instance, Constructor) {
|
|
22
|
+
if (!(instance instanceof Constructor)) {
|
|
23
|
+
throw new TypeError("Cannot call a class as a function");
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function _construct(Parent, args, Class) {
|
|
27
|
+
if (_is_native_reflect_construct()) {
|
|
28
|
+
_construct = Reflect.construct;
|
|
29
|
+
} else {
|
|
30
|
+
_construct = function construct(Parent, args, Class) {
|
|
31
|
+
var a = [
|
|
32
|
+
null
|
|
33
|
+
];
|
|
34
|
+
a.push.apply(a, args);
|
|
35
|
+
var Constructor = Function.bind.apply(Parent, a);
|
|
36
|
+
var instance = new Constructor();
|
|
37
|
+
if (Class) _set_prototype_of(instance, Class.prototype);
|
|
38
|
+
return instance;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
return _construct.apply(null, arguments);
|
|
42
|
+
}
|
|
43
|
+
function _defineProperties(target, props) {
|
|
44
|
+
for(var i = 0; i < props.length; i++){
|
|
45
|
+
var descriptor = props[i];
|
|
46
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
47
|
+
descriptor.configurable = true;
|
|
48
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
49
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
53
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
54
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
55
|
+
return Constructor;
|
|
56
|
+
}
|
|
57
|
+
function _define_property(obj, key, value) {
|
|
58
|
+
if (key in obj) {
|
|
59
|
+
Object.defineProperty(obj, key, {
|
|
60
|
+
value: value,
|
|
61
|
+
enumerable: true,
|
|
62
|
+
configurable: true,
|
|
63
|
+
writable: true
|
|
64
|
+
});
|
|
65
|
+
} else {
|
|
66
|
+
obj[key] = value;
|
|
67
|
+
}
|
|
68
|
+
return obj;
|
|
69
|
+
}
|
|
70
|
+
function _get_prototype_of(o) {
|
|
71
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
72
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
73
|
+
};
|
|
74
|
+
return _get_prototype_of(o);
|
|
75
|
+
}
|
|
76
|
+
function _inherits(subClass, superClass) {
|
|
77
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
78
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
79
|
+
}
|
|
80
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
81
|
+
constructor: {
|
|
82
|
+
value: subClass,
|
|
83
|
+
writable: true,
|
|
84
|
+
configurable: true
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
88
|
+
}
|
|
89
|
+
function _interop_require_default(obj) {
|
|
90
|
+
return obj && obj.__esModule ? obj : {
|
|
91
|
+
default: obj
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
function _is_native_function(fn) {
|
|
95
|
+
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
96
|
+
}
|
|
97
|
+
function _possible_constructor_return(self, call) {
|
|
98
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
99
|
+
return call;
|
|
100
|
+
}
|
|
101
|
+
return _assert_this_initialized(self);
|
|
102
|
+
}
|
|
103
|
+
function _set_prototype_of(o, p) {
|
|
104
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
105
|
+
o.__proto__ = p;
|
|
106
|
+
return o;
|
|
107
|
+
};
|
|
108
|
+
return _set_prototype_of(o, p);
|
|
109
|
+
}
|
|
110
|
+
function _tagged_template_literal(strings, raw) {
|
|
111
|
+
if (!raw) {
|
|
112
|
+
raw = strings.slice(0);
|
|
113
|
+
}
|
|
114
|
+
return Object.freeze(Object.defineProperties(strings, {
|
|
115
|
+
raw: {
|
|
116
|
+
value: Object.freeze(raw)
|
|
117
|
+
}
|
|
118
|
+
}));
|
|
119
|
+
}
|
|
120
|
+
function _type_of(obj) {
|
|
121
|
+
"@swc/helpers - typeof";
|
|
122
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
123
|
+
}
|
|
124
|
+
function _wrap_native_super(Class) {
|
|
125
|
+
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
126
|
+
_wrap_native_super = function wrapNativeSuper(Class) {
|
|
127
|
+
if (Class === null || !_is_native_function(Class)) return Class;
|
|
128
|
+
if (typeof Class !== "function") {
|
|
129
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
130
|
+
}
|
|
131
|
+
if (typeof _cache !== "undefined") {
|
|
132
|
+
if (_cache.has(Class)) return _cache.get(Class);
|
|
133
|
+
_cache.set(Class, Wrapper);
|
|
134
|
+
}
|
|
135
|
+
function Wrapper() {
|
|
136
|
+
return _construct(Class, arguments, _get_prototype_of(this).constructor);
|
|
137
|
+
}
|
|
138
|
+
Wrapper.prototype = Object.create(Class.prototype, {
|
|
139
|
+
constructor: {
|
|
140
|
+
value: Wrapper,
|
|
141
|
+
enumerable: false,
|
|
142
|
+
writable: true,
|
|
143
|
+
configurable: true
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
return _set_prototype_of(Wrapper, Class);
|
|
147
|
+
};
|
|
148
|
+
return _wrap_native_super(Class);
|
|
149
|
+
}
|
|
150
|
+
function _is_native_reflect_construct() {
|
|
151
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
152
|
+
if (Reflect.construct.sham) return false;
|
|
153
|
+
if (typeof Proxy === "function") return true;
|
|
154
|
+
try {
|
|
155
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
156
|
+
return true;
|
|
157
|
+
} catch (e) {
|
|
158
|
+
return false;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
function _create_super(Derived) {
|
|
162
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct();
|
|
163
|
+
return function _createSuperInternal() {
|
|
164
|
+
var Super = _get_prototype_of(Derived), result;
|
|
165
|
+
if (hasNativeReflectConstruct) {
|
|
166
|
+
var NewTarget = _get_prototype_of(this).constructor;
|
|
167
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
168
|
+
} else {
|
|
169
|
+
result = Super.apply(this, arguments);
|
|
170
|
+
}
|
|
171
|
+
return _possible_constructor_return(this, result);
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
function _templateObject() {
|
|
175
|
+
var data = _tagged_template_literal([
|
|
176
|
+
"\n\n left: 0;\n width: 100%;\n height: ",
|
|
177
|
+
";\n bottom: 0;\n position: fixed;\n background-color: black;\n \n"
|
|
178
|
+
]);
|
|
179
|
+
_templateObject = function _templateObject() {
|
|
180
|
+
return data;
|
|
181
|
+
};
|
|
182
|
+
return data;
|
|
183
|
+
}
|
|
184
|
+
var MenuDiv = /*#__PURE__*/ function(Element) {
|
|
185
|
+
_inherits(MenuDiv, Element);
|
|
186
|
+
var _super = _create_super(MenuDiv);
|
|
187
|
+
function MenuDiv() {
|
|
188
|
+
_class_call_check(this, MenuDiv);
|
|
189
|
+
var _this;
|
|
190
|
+
_this = _super.apply(this, arguments);
|
|
191
|
+
_define_property(_assert_this_initialized(_this), "customTapHandler", function(event, element) {
|
|
192
|
+
alert("MENU DIV TAP!");
|
|
193
|
+
});
|
|
194
|
+
return _this;
|
|
195
|
+
}
|
|
196
|
+
_create_class(MenuDiv, [
|
|
197
|
+
{
|
|
198
|
+
key: "didMount",
|
|
199
|
+
value: function didMount() {
|
|
200
|
+
this.enableTouch();
|
|
201
|
+
this.onCustomTap(this.customTapHandler);
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
key: "willUnmount",
|
|
206
|
+
value: function willUnmount() {
|
|
207
|
+
this.disableTouch();
|
|
208
|
+
this.offCustomTap(this.customTapHandler);
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
key: "initialise",
|
|
213
|
+
value: function initialise() {
|
|
214
|
+
this.hide();
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
key: "parentContext",
|
|
219
|
+
value: function parentContext() {
|
|
220
|
+
var showMenuDiv = this.show.bind(this), hideMenuDiv = this.hide.bind(this), isMenuDivDisplayed = this.isDisplayed.bind(this); ///
|
|
221
|
+
return {
|
|
222
|
+
showMenuDiv: showMenuDiv,
|
|
223
|
+
hideMenuDiv: hideMenuDiv,
|
|
224
|
+
isMenuDivDisplayed: isMenuDivDisplayed
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
]);
|
|
229
|
+
return MenuDiv;
|
|
230
|
+
}(_wrap_native_super(_easy.Element));
|
|
231
|
+
_define_property(MenuDiv, "tagName", "div");
|
|
232
|
+
_define_property(MenuDiv, "defaultProperties", {
|
|
233
|
+
className: "menu"
|
|
234
|
+
});
|
|
235
|
+
Object.assign(MenuDiv.prototype, _touch.default);
|
|
236
|
+
var _default = (0, _easywithstyle.default)(MenuDiv)(_templateObject(), _style.menuDivHeight);
|
|
237
|
+
|
|
238
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy92aWV3L2Rpdi9tZW51LmpzIl0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuXG5pbXBvcnQgd2l0aFN0eWxlIGZyb20gXCJlYXN5LXdpdGgtc3R5bGVcIjtcblxuaW1wb3J0IHsgRWxlbWVudCB9IGZyb20gXCJlYXN5XCI7XG5cbmltcG9ydCB0b3VjaE1peGlucyBmcm9tIFwiLi4vLi4vbWl4aW5zL3RvdWNoXCI7X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