highmark-cli 0.0.174 → 0.0.175

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 (90) hide show
  1. package/README.md +20 -2
  2. package/bin/abbreviations.js +6 -9
  3. package/bin/action/help.js +3 -3
  4. package/bin/action/publish.js +3 -4
  5. package/bin/action/server.js +2 -2
  6. package/bin/constants.js +2 -6
  7. package/bin/defaults.js +4 -6
  8. package/bin/main.js +7 -9
  9. package/bin/operation/copyFonts.js +5 -23
  10. package/bin/operation/html.js +5 -71
  11. package/bin/options.js +4 -6
  12. package/package.json +2 -26
  13. package/.swcrc +0 -11
  14. package/bin/utilities/client.js +0 -38
  15. package/checkmark.svg +0 -12
  16. package/client.js +0 -39623
  17. package/css/loading.css +0 -59
  18. package/lib/client.js +0 -74
  19. package/lib/constants.js +0 -70
  20. package/lib/createMethods.js +0 -84
  21. package/lib/customEventTypes.js +0 -74
  22. package/lib/localStorage.js +0 -41
  23. package/lib/migrate.js +0 -34
  24. package/lib/selectors.js +0 -26
  25. package/lib/state/version_1.js +0 -39
  26. package/lib/state.js +0 -153
  27. package/lib/styles.js +0 -82
  28. package/lib/utilities/element.js +0 -62
  29. package/lib/utilities/orientation.js +0 -39
  30. package/lib/versions.js +0 -13
  31. package/lib/view/button/closeMenu.js +0 -121
  32. package/lib/view/button/zoomMenuIn.js +0 -121
  33. package/lib/view/button/zoomMenuOut.js +0 -121
  34. package/lib/view/button.js +0 -160
  35. package/lib/view/checkbox.js +0 -193
  36. package/lib/view/div/buttons.js +0 -213
  37. package/lib/view/div/checkbox/fullScreen.js +0 -155
  38. package/lib/view/div/checkbox/invertColours.js +0 -154
  39. package/lib/view/div/checkbox/nativeGestures.js +0 -154
  40. package/lib/view/div/checkbox.js +0 -220
  41. package/lib/view/div/checkboxes.js +0 -213
  42. package/lib/view/div/menu.js +0 -301
  43. package/lib/view/div/overlay.js +0 -685
  44. package/lib/view/div/preloader.js +0 -204
  45. package/lib/view/div.js +0 -227
  46. package/lib/view/element.js +0 -164
  47. package/lib/view/span.js +0 -182
  48. package/lib/view/svg/closeMenu.js +0 -138
  49. package/lib/view/svg/zoomMenuIn.js +0 -146
  50. package/lib/view/svg/zoomMenuOut.js +0 -141
  51. package/lib/view/svg.js +0 -184
  52. package/lib/view.js +0 -247
  53. package/src/client.js +0 -70
  54. package/src/constants.js +0 -16
  55. package/src/createMethods.js +0 -105
  56. package/src/customEventTypes.js +0 -17
  57. package/src/localStorage.js +0 -40
  58. package/src/migrate.js +0 -19
  59. package/src/selectors.js +0 -5
  60. package/src/state/version_1.js +0 -32
  61. package/src/state.js +0 -152
  62. package/src/styles.js +0 -19
  63. package/src/utilities/element.js +0 -66
  64. package/src/utilities/orientation.js +0 -34
  65. package/src/versions.js +0 -3
  66. package/src/view/button/closeMenu.js +0 -16
  67. package/src/view/button/zoomMenuIn.js +0 -16
  68. package/src/view/button/zoomMenuOut.js +0 -16
  69. package/src/view/button.js +0 -38
  70. package/src/view/checkbox.js +0 -68
  71. package/src/view/div/buttons.js +0 -37
  72. package/src/view/div/checkbox/fullScreen.js +0 -40
  73. package/src/view/div/checkbox/invertColours.js +0 -37
  74. package/src/view/div/checkbox/nativeGestures.js +0 -38
  75. package/src/view/div/checkbox.js +0 -45
  76. package/src/view/div/checkboxes.js +0 -38
  77. package/src/view/div/menu.js +0 -88
  78. package/src/view/div/overlay.js +0 -602
  79. package/src/view/div/preloader.js +0 -25
  80. package/src/view/div.js +0 -47
  81. package/src/view/element.js +0 -16
  82. package/src/view/span.js +0 -20
  83. package/src/view/svg/closeMenu.js +0 -19
  84. package/src/view/svg/zoomMenuIn.js +0 -20
  85. package/src/view/svg/zoomMenuOut.js +0 -19
  86. package/src/view/svg.js +0 -24
  87. package/src/view.js +0 -64
  88. package/template/client.html +0 -4
  89. package/template/default.html +0 -71
  90. package/template/loading.html +0 -17
package/lib/view/svg.js DELETED
@@ -1,184 +0,0 @@
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 _element = /*#__PURE__*/ _interop_require_default(require("./element"));
13
- var _styles = require("../styles");
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 _class_call_check(instance, Constructor) {
21
- if (!(instance instanceof Constructor)) {
22
- throw new TypeError("Cannot call a class as a function");
23
- }
24
- }
25
- function _construct(Parent, args, Class) {
26
- if (_is_native_reflect_construct()) {
27
- _construct = Reflect.construct;
28
- } else {
29
- _construct = function construct(Parent, args, Class) {
30
- var a = [
31
- null
32
- ];
33
- a.push.apply(a, args);
34
- var Constructor = Function.bind.apply(Parent, a);
35
- var instance = new Constructor();
36
- if (Class) _set_prototype_of(instance, Class.prototype);
37
- return instance;
38
- };
39
- }
40
- return _construct.apply(null, arguments);
41
- }
42
- function _define_property(obj, key, value) {
43
- if (key in obj) {
44
- Object.defineProperty(obj, key, {
45
- value: value,
46
- enumerable: true,
47
- configurable: true,
48
- writable: true
49
- });
50
- } else {
51
- obj[key] = value;
52
- }
53
- return obj;
54
- }
55
- function _get_prototype_of(o) {
56
- _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
57
- return o.__proto__ || Object.getPrototypeOf(o);
58
- };
59
- return _get_prototype_of(o);
60
- }
61
- function _inherits(subClass, superClass) {
62
- if (typeof superClass !== "function" && superClass !== null) {
63
- throw new TypeError("Super expression must either be null or a function");
64
- }
65
- subClass.prototype = Object.create(superClass && superClass.prototype, {
66
- constructor: {
67
- value: subClass,
68
- writable: true,
69
- configurable: true
70
- }
71
- });
72
- if (superClass) _set_prototype_of(subClass, superClass);
73
- }
74
- function _interop_require_default(obj) {
75
- return obj && obj.__esModule ? obj : {
76
- default: obj
77
- };
78
- }
79
- function _is_native_function(fn) {
80
- return Function.toString.call(fn).indexOf("[native code]") !== -1;
81
- }
82
- function _possible_constructor_return(self, call) {
83
- if (call && (_type_of(call) === "object" || typeof call === "function")) {
84
- return call;
85
- }
86
- return _assert_this_initialized(self);
87
- }
88
- function _set_prototype_of(o, p) {
89
- _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
90
- o.__proto__ = p;
91
- return o;
92
- };
93
- return _set_prototype_of(o, p);
94
- }
95
- function _tagged_template_literal(strings, raw) {
96
- if (!raw) {
97
- raw = strings.slice(0);
98
- }
99
- return Object.freeze(Object.defineProperties(strings, {
100
- raw: {
101
- value: Object.freeze(raw)
102
- }
103
- }));
104
- }
105
- function _type_of(obj) {
106
- "@swc/helpers - typeof";
107
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
108
- }
109
- function _wrap_native_super(Class) {
110
- var _cache = typeof Map === "function" ? new Map() : undefined;
111
- _wrap_native_super = function wrapNativeSuper(Class) {
112
- if (Class === null || !_is_native_function(Class)) return Class;
113
- if (typeof Class !== "function") {
114
- throw new TypeError("Super expression must either be null or a function");
115
- }
116
- if (typeof _cache !== "undefined") {
117
- if (_cache.has(Class)) return _cache.get(Class);
118
- _cache.set(Class, Wrapper);
119
- }
120
- function Wrapper() {
121
- return _construct(Class, arguments, _get_prototype_of(this).constructor);
122
- }
123
- Wrapper.prototype = Object.create(Class.prototype, {
124
- constructor: {
125
- value: Wrapper,
126
- enumerable: false,
127
- writable: true,
128
- configurable: true
129
- }
130
- });
131
- return _set_prototype_of(Wrapper, Class);
132
- };
133
- return _wrap_native_super(Class);
134
- }
135
- function _is_native_reflect_construct() {
136
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
137
- if (Reflect.construct.sham) return false;
138
- if (typeof Proxy === "function") return true;
139
- try {
140
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
141
- return true;
142
- } catch (e) {
143
- return false;
144
- }
145
- }
146
- function _create_super(Derived) {
147
- var hasNativeReflectConstruct = _is_native_reflect_construct();
148
- return function _createSuperInternal() {
149
- var Super = _get_prototype_of(Derived), result;
150
- if (hasNativeReflectConstruct) {
151
- var NewTarget = _get_prototype_of(this).constructor;
152
- result = Reflect.construct(Super, arguments, NewTarget);
153
- } else {
154
- result = Super.apply(this, arguments);
155
- }
156
- return _possible_constructor_return(this, result);
157
- };
158
- }
159
- function _templateObject() {
160
- var data = _tagged_template_literal([
161
- "\n\n fill: ",
162
- ";\n stroke: none;\n display: block;\n pointer-events: none;\n \n"
163
- ]);
164
- _templateObject = function _templateObject() {
165
- return data;
166
- };
167
- return data;
168
- }
169
- var FontSizeSVG = /*#__PURE__*/ function(Element) {
170
- _inherits(FontSizeSVG, Element);
171
- var _super = _create_super(FontSizeSVG);
172
- function FontSizeSVG() {
173
- _class_call_check(this, FontSizeSVG);
174
- return _super.apply(this, arguments);
175
- }
176
- return FontSizeSVG;
177
- }(_wrap_native_super(_element.default));
178
- _define_property(FontSizeSVG, "tagName", "svg");
179
- _define_property(FontSizeSVG, "defaultProperties", {
180
- viewBox: "0 0 25 25"
181
- });
182
- var _default = (0, _easywithstyle.default)(FontSizeSVG)(_templateObject(), _styles.svgFill);
183
-
184
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy92aWV3L3N2Zy5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcblxuaW1wb3J0IHdpdGhTdHlsZSBmcm9tIFwiZWFzeS13aXRoLXN0eWxlXCI7ICAvLy9cblxuaW1wb3J0IEVsZW1lbnQgZnJvbSBcIi4vZWxlbWVudFwiO1xuXG5pbXBvcnQgeyBzdmdGaWxsIH0gZnJvbSBcIi4uL3N0eWxlc1wiO1xuXG5jbGFzcyBGb250U2l6ZVNWRyBleHRlbmRzIEVsZW1lbnQge1xuICBzdGF0aWMgdGFnTmFtZSA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s7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUV4QixJQUFBLEFBQU1BLDRCQUFELEFBQUw7Y0FBTUE7K0JBQUFBO2FBQUFBO2dDQUFBQTs7O1dBQUFBO3FCQUFvQkMsZ0JBQU87QUFDL0IsaUJBRElELGFBQ0dFLFdBQVU7QUFFakIsaUJBSElGLGFBR0dHLHFCQUFvQjtJQUN6QkMsU0FBUztBQUNYO0lBR0YsV0FBZUMsSUFBQUEsc0JBQVMsRUFBQ0wsZ0NBRWZNLGVBQU8ifQ==
package/lib/view.js DELETED
@@ -1,247 +0,0 @@
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 _element = /*#__PURE__*/ _interop_require_default(require("./view/element"));
13
- var _menu = /*#__PURE__*/ _interop_require_default(require("./view/div/menu"));
14
- var _overlay = /*#__PURE__*/ _interop_require_default(require("./view/div/overlay"));
15
- var _preloader = /*#__PURE__*/ _interop_require_default(require("./view/div/preloader"));
16
- function _assert_this_initialized(self) {
17
- if (self === void 0) {
18
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
19
- }
20
- return self;
21
- }
22
- function _class_call_check(instance, Constructor) {
23
- if (!(instance instanceof Constructor)) {
24
- throw new TypeError("Cannot call a class as a function");
25
- }
26
- }
27
- function _construct(Parent, args, Class) {
28
- if (_is_native_reflect_construct()) {
29
- _construct = Reflect.construct;
30
- } else {
31
- _construct = function construct(Parent, args, Class) {
32
- var a = [
33
- null
34
- ];
35
- a.push.apply(a, args);
36
- var Constructor = Function.bind.apply(Parent, a);
37
- var instance = new Constructor();
38
- if (Class) _set_prototype_of(instance, Class.prototype);
39
- return instance;
40
- };
41
- }
42
- return _construct.apply(null, arguments);
43
- }
44
- function _defineProperties(target, props) {
45
- for(var i = 0; i < props.length; i++){
46
- var descriptor = props[i];
47
- descriptor.enumerable = descriptor.enumerable || false;
48
- descriptor.configurable = true;
49
- if ("value" in descriptor) descriptor.writable = true;
50
- Object.defineProperty(target, descriptor.key, descriptor);
51
- }
52
- }
53
- function _create_class(Constructor, protoProps, staticProps) {
54
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
55
- if (staticProps) _defineProperties(Constructor, staticProps);
56
- return Constructor;
57
- }
58
- function _define_property(obj, key, value) {
59
- if (key in obj) {
60
- Object.defineProperty(obj, key, {
61
- value: value,
62
- enumerable: true,
63
- configurable: true,
64
- writable: true
65
- });
66
- } else {
67
- obj[key] = value;
68
- }
69
- return obj;
70
- }
71
- function _get_prototype_of(o) {
72
- _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
73
- return o.__proto__ || Object.getPrototypeOf(o);
74
- };
75
- return _get_prototype_of(o);
76
- }
77
- function _inherits(subClass, superClass) {
78
- if (typeof superClass !== "function" && superClass !== null) {
79
- throw new TypeError("Super expression must either be null or a function");
80
- }
81
- subClass.prototype = Object.create(superClass && superClass.prototype, {
82
- constructor: {
83
- value: subClass,
84
- writable: true,
85
- configurable: true
86
- }
87
- });
88
- if (superClass) _set_prototype_of(subClass, superClass);
89
- }
90
- function _interop_require_default(obj) {
91
- return obj && obj.__esModule ? obj : {
92
- default: obj
93
- };
94
- }
95
- function _is_native_function(fn) {
96
- return Function.toString.call(fn).indexOf("[native code]") !== -1;
97
- }
98
- function _possible_constructor_return(self, call) {
99
- if (call && (_type_of(call) === "object" || typeof call === "function")) {
100
- return call;
101
- }
102
- return _assert_this_initialized(self);
103
- }
104
- function _set_prototype_of(o, p) {
105
- _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
106
- o.__proto__ = p;
107
- return o;
108
- };
109
- return _set_prototype_of(o, p);
110
- }
111
- function _tagged_template_literal(strings, raw) {
112
- if (!raw) {
113
- raw = strings.slice(0);
114
- }
115
- return Object.freeze(Object.defineProperties(strings, {
116
- raw: {
117
- value: Object.freeze(raw)
118
- }
119
- }));
120
- }
121
- function _type_of(obj) {
122
- "@swc/helpers - typeof";
123
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
124
- }
125
- function _wrap_native_super(Class) {
126
- var _cache = typeof Map === "function" ? new Map() : undefined;
127
- _wrap_native_super = function wrapNativeSuper(Class) {
128
- if (Class === null || !_is_native_function(Class)) return Class;
129
- if (typeof Class !== "function") {
130
- throw new TypeError("Super expression must either be null or a function");
131
- }
132
- if (typeof _cache !== "undefined") {
133
- if (_cache.has(Class)) return _cache.get(Class);
134
- _cache.set(Class, Wrapper);
135
- }
136
- function Wrapper() {
137
- return _construct(Class, arguments, _get_prototype_of(this).constructor);
138
- }
139
- Wrapper.prototype = Object.create(Class.prototype, {
140
- constructor: {
141
- value: Wrapper,
142
- enumerable: false,
143
- writable: true,
144
- configurable: true
145
- }
146
- });
147
- return _set_prototype_of(Wrapper, Class);
148
- };
149
- return _wrap_native_super(Class);
150
- }
151
- function _is_native_reflect_construct() {
152
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
153
- if (Reflect.construct.sham) return false;
154
- if (typeof Proxy === "function") return true;
155
- try {
156
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
157
- return true;
158
- } catch (e) {
159
- return false;
160
- }
161
- }
162
- function _create_super(Derived) {
163
- var hasNativeReflectConstruct = _is_native_reflect_construct();
164
- return function _createSuperInternal() {
165
- var Super = _get_prototype_of(Derived), result;
166
- if (hasNativeReflectConstruct) {
167
- var NewTarget = _get_prototype_of(this).constructor;
168
- result = Reflect.construct(Super, arguments, NewTarget);
169
- } else {
170
- result = Super.apply(this, arguments);
171
- }
172
- return _possible_constructor_return(this, result);
173
- };
174
- }
175
- function _templateObject() {
176
- var data = _tagged_template_literal([
177
- "\n\n width: 100%;\n height: 100%;\n align-items: stretch;\n flex-direction: column;\n \n"
178
- ]);
179
- _templateObject = function _templateObject() {
180
- return data;
181
- };
182
- return data;
183
- }
184
- var View = /*#__PURE__*/ function(Element) {
185
- _inherits(View, Element);
186
- var _super = _create_super(View);
187
- function View() {
188
- _class_call_check(this, View);
189
- return _super.apply(this, arguments);
190
- }
191
- _create_class(View, [
192
- {
193
- key: "updateZoom",
194
- value: function updateZoom() {
195
- this.updateMenuZoom();
196
- this.updateOverlayZoom();
197
- }
198
- },
199
- {
200
- key: "didMount",
201
- value: function didMount() {
202
- this.show();
203
- this.updateOverlayColours();
204
- this.updateNativeGestures();
205
- this.updateFullScreenCheckboxDiv();
206
- this.updateInvertColoursCheckboxDiv();
207
- this.updateNativeGesturesCheckboxDiv();
208
- }
209
- },
210
- {
211
- key: "willUnmount",
212
- value: function willUnmount() {
213
- ///
214
- }
215
- },
216
- {
217
- key: "childElements",
218
- value: function childElements() {
219
- var divDOMElements = this.properties.divDOMElements;
220
- return [
221
- /*#__PURE__*/ React.createElement(_preloader.default, null),
222
- /*#__PURE__*/ React.createElement(_overlay.default, {
223
- divDOMElements: divDOMElements
224
- }),
225
- /*#__PURE__*/ React.createElement(_menu.default, null)
226
- ];
227
- }
228
- },
229
- {
230
- key: "initialise",
231
- value: function initialise() {
232
- this.assignContext();
233
- }
234
- }
235
- ]);
236
- return View;
237
- }(_wrap_native_super(_element.default));
238
- _define_property(View, "tagName", "div");
239
- _define_property(View, "ignoredProperties", [
240
- "divDOMElements"
241
- ]);
242
- _define_property(View, "defaultProperties", {
243
- className: "view"
244
- });
245
- var _default = (0, _easywithstyle.default)(View)(_templateObject());
246
-
247
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy92aWV3LmpzIl0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuXG5pbXBvcnQgd2l0aFN0eWxlIGZyb20gXCJlYXN5LXdpdGgtc3R5bGVcIjsgIC8vL1xuXG5pbXBvcnQgRWxlbWVudCBmcm9tIFwiLi92aW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Bb0I7Z0JBQ3pCLElBQUksQ0FBQ0MsMkJBQTJCO2dCQUNoQyxJQUFJLENBQUNDLDhCQUE4QjtnQkFDbkMsSUFBSSxDQUFDQywrQkFBK0I7WUFDdEM7OztZQUVBQyxLQUFBQTttQkFBQUEsU0FBQUE7WUFDRSxHQUFHO1lBQ0w7OztZQUVBQyxLQUFBQTttQkFBQUEsU0FBQUE7Z0JBQ0UsSUFBTSxBQUFFQyxpQkFBbUIsSUFBSSxDQUFDQyxVQUFVLENBQWxDRDtnQkFFUixPQUFRO2tDQUVOLG9CQUFDRSxrQkFBWTtrQ0FDYixvQkFBQ0MsZ0JBQVU7d0JBQUNILGdCQUFnQkE7O2tDQUM1QixvQkFBQ0ksYUFBTztpQkFFVDtZQUNIOzs7WUFFQUMsS0FBQUE7bUJBQUFBLFNBQUFBO2dCQUNFLElBQUksQ0FBQ0MsYUFBYTtZQUNwQjs7O1dBbENJbkI7cUJBQWFvQixnQkFBTztBQW9DeEIsaUJBcENJcEIsTUFvQ0dxQixXQUFVO0FBRWpCLGlCQXRDSXJCLE1Bc0NHc0IscUJBQW9CO0lBQ3pCO0NBQ0Q7QUFFRCxpQkExQ0l0QixNQTBDR3VCLHFCQUFvQjtJQUN6QkMsV0FBVztBQUNiO0lBR0YsV0FBZUMsSUFBQUEsc0JBQVMsRUFBQ3pCIn0=
package/src/client.js DELETED
@@ -1,70 +0,0 @@
1
- "use strict";
2
-
3
- import "juxtapose";
4
-
5
- import withStyle from "easy-with-style"; ///
6
-
7
- import { controller } from "sufficient";
8
- import { Body, Element } from "easy";
9
- import { onFragmentChange } from "fragmented";
10
-
11
- import View from "./view";
12
- import createMethods from "./createMethods";
13
-
14
- import { EMPTY_STRING } from "./constants";
15
- import { setOrientation } from "./state";
16
- import { DIVS_SELECTOR, LOADING_DIV_SELECTOR } from "./selectors";
17
- import { getOrientation, onOrientationChange } from "./utilities/orientation";
18
-
19
- const { renderStyles } = withStyle;
20
-
21
- renderStyles();
22
-
23
- const divDOMElements = [ ...document.querySelectorAll(DIVS_SELECTOR) ]; ///
24
-
25
- divDOMElements.forEach((divDOMElement) => {
26
- divDOMElement.remove();
27
- });
28
-
29
- const scheduler = null,
30
- model = null,
31
- view =
32
-
33
- <View divDOMElements={divDOMElements} />
34
-
35
- ;
36
-
37
- controller.assignMethods(createMethods, scheduler, model, view);
38
-
39
- const body = new Body(),
40
- loadingDiv = new Element(LOADING_DIV_SELECTOR);
41
-
42
- onOrientationChange((orientation) => {
43
- setOrientation(orientation);
44
-
45
- view.updateZoom();
46
- });
47
-
48
- onFragmentChange((event, element, fragment) => {
49
- const anchorId = `${fragment}`;
50
-
51
- (anchorId === EMPTY_STRING) ?
52
- view.showFirstDiv() :
53
- view.scrollToAnchor(anchorId);
54
- });
55
-
56
- getOrientation((orientation) => {
57
- setOrientation(orientation);
58
-
59
- loadingDiv.hide();
60
-
61
- body.mount(view);
62
-
63
- const anchorId = `${fragment}`;
64
-
65
- (anchorId === EMPTY_STRING) ?
66
- view.showFirstDiv() :
67
- view.scrollToAnchor(anchorId);
68
-
69
- view.updateZoom();
70
- });
package/src/constants.js DELETED
@@ -1,16 +0,0 @@
1
- "use strict";
2
-
3
- export const HASH = "#";
4
- export const GRID = "grid";
5
- export const STATE_KEY = "state";
6
- export const EMPTY_STRING = "";
7
- export const SCROLL_DELAY = 10;
8
- export const DECELERATION = 0.0333333;
9
- export const UP_DIRECTION = +1;
10
- export const DOWN_DIRECTION = -1;
11
- export const MENU_ZOOM_RATIO = 1.1;
12
- export const BACKGROUND_COLOUR = "background-color"; ///
13
- export const PORTRAIT_ORIENTATION = "portrait";
14
- export const LANDSCAPE_ORIENTATION = "landscape";
15
- export const OPEN_MENU_TAP_AREA_HEIGHT = 128;
16
- export const ORIENTATION_PORTRAIT_QUERY = "(orientation: portrait)";
@@ -1,105 +0,0 @@
1
- "use strict";
2
-
3
- import { MENU_ZOOM_RATIO } from "./constants";
4
- import { getMenuZoom, setMenuZoom, setOverlayZoom, setColoursInverted, setNativeGesturesRestored } from "./state";
5
-
6
- export default function createMethods(scheduler, model, view) {
7
- function openMenu() {
8
- view.openMenu();
9
- }
10
-
11
- function closeMenu() {
12
- view.closeMenu();
13
- }
14
-
15
- function zoomMenuIn() {
16
- let menuZoom = getMenuZoom();
17
-
18
- menuZoom *= MENU_ZOOM_RATIO;
19
-
20
- setMenuZoom(menuZoom);
21
-
22
- view.updateMenuZoom();
23
- }
24
-
25
- function zoomMenuOut() {
26
- let menuZoom = getMenuZoom();
27
-
28
- menuZoom /= MENU_ZOOM_RATIO;
29
-
30
- setMenuZoom(menuZoom);
31
-
32
- view.updateMenuZoom();
33
- }
34
-
35
- function zoomOverlay(overlayZoom) {
36
- setOverlayZoom(overlayZoom);
37
-
38
- view.updateOverlayZoom();
39
- }
40
-
41
- function invertColours() {
42
- const coloursInverted = true;
43
-
44
- setColoursInverted(coloursInverted);
45
-
46
- view.updateOverlayColours();
47
- }
48
-
49
- function revertColours() {
50
- const coloursInverted = false;
51
-
52
- setColoursInverted(coloursInverted);
53
-
54
- view.updateOverlayColours();
55
- }
56
-
57
- function exitFullScreen() {
58
- view.exitFullScreen();
59
- }
60
-
61
- function enterFullScreen() {
62
- view.enterFullScreen();
63
- }
64
-
65
- function updateFullScreen() {
66
- view.closeMenu();
67
-
68
- view.updateFullScreenCheckboxDiv();
69
- }
70
-
71
- function restoreNativeGestures() {
72
- const nativeGesturesRestored = true;
73
-
74
- setNativeGesturesRestored(nativeGesturesRestored);
75
-
76
- view.updateNativeGestures();
77
-
78
- view.updateNativeGesturesCheckboxDiv();
79
- }
80
-
81
- function suppressNativeGestures() {
82
- const nativeGesturesRestored = false;
83
-
84
- setNativeGesturesRestored(nativeGesturesRestored);
85
-
86
- view.updateNativeGestures();
87
-
88
- view.updateNativeGesturesCheckboxDiv();
89
- }
90
-
91
- return ({
92
- openMenu,
93
- closeMenu,
94
- zoomMenuIn,
95
- zoomMenuOut,
96
- zoomOverlay,
97
- invertColours,
98
- revertColours,
99
- exitFullScreen,
100
- enterFullScreen,
101
- updateFullScreen,
102
- restoreNativeGestures,
103
- suppressNativeGestures
104
- });
105
- }
@@ -1,17 +0,0 @@
1
- "use strict";
2
-
3
- export const TAP_CUSTOM_EVENT_TYPE = "tap";
4
- export const DRAG_UP_CUSTOM_EVENT_TYPE = "drag-up";
5
- export const DRAG_DOWN_CUSTOM_EVENT_TYPE = "drag-down";
6
- export const DRAG_LEFT_CUSTOM_EVENT_TYPE = "drag-left";
7
- export const DRAG_RIGHT_CUSTOM_EVENT_TYPE = "drag-right";
8
- export const DRAG_START_CUSTOM_EVENT_TYPE = "drag-start";
9
- export const DRAG_END_CUSTOM_EVENT_TYPE = "drag-end";
10
- export const SWIPE_UP_CUSTOM_EVENT_TYPE = "swipe-up";
11
- export const SWIPE_DOWN_CUSTOM_EVENT_TYPE = "swipe-down";
12
- export const SWIPE_LEFT_CUSTOM_EVENT_TYPE = "swipe-left";
13
- export const SWIPE_RIGHT_CUSTOM_EVENT_TYPE = "swipe-right";
14
- export const PINCH_MOVE_CUSTOM_EVENT_TYPE = "pinch-move";
15
- export const PINCH_START_CUSTOM_EVENT_TYPE = "pinch-start";
16
- export const DOUBLE_TAP_CUSTOM_EVENT_TYPE = "double-tap";
17
- export const FULL_SCREEN_CHANGE_CUSTOM_EVENT_TYPE = "full-screen-change";
@@ -1,40 +0,0 @@
1
- "use strict";
2
-
3
- import { STATE_KEY } from "./constants";
4
- import { createState } from "./state/version_1";
5
- import { migrateState } from "./migrate";
6
-
7
- const state = createState(),
8
- defaultState = state; ///
9
-
10
- export function getPersistentState() {
11
- let persistentState,
12
- state;
13
-
14
- const key = STATE_KEY,
15
- value = localStorage.getItem(key);
16
-
17
- if (value === null) {
18
- state = defaultState; ///
19
- } else {
20
- const jsonString = value, ///
21
- json = JSON.parse(jsonString);
22
-
23
- state = json; ///
24
-
25
- state = migrateState(state);
26
- }
27
-
28
- persistentState = state; ///
29
-
30
- return persistentState;
31
- }
32
-
33
- export function setPersistentState(persistentState) {
34
- const json = persistentState, ///
35
- jsonString = JSON.stringify(json),
36
- key = STATE_KEY,
37
- value = jsonString; ///
38
-
39
- localStorage.setItem(key, value);
40
- }