@antv/l7-map 2.9.32 → 2.9.34

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 (56) hide show
  1. package/lib/camera.js +766 -508
  2. package/lib/earthmap.js +389 -223
  3. package/lib/geo/edge_insets.js +117 -64
  4. package/lib/geo/lng_lat.js +86 -65
  5. package/lib/geo/lng_lat_bounds.js +162 -123
  6. package/lib/geo/mercator.js +91 -62
  7. package/lib/geo/point.js +234 -171
  8. package/lib/geo/simple.js +93 -61
  9. package/lib/geo/transform.js +982 -472
  10. package/lib/handler/IHandler.js +4 -16
  11. package/lib/handler/blockable_map_event.js +84 -63
  12. package/lib/handler/box_zoom.js +201 -123
  13. package/lib/handler/click_zoom.js +63 -55
  14. package/lib/handler/events/event.js +20 -35
  15. package/lib/handler/events/index.js +28 -35
  16. package/lib/handler/events/map_mouse_event.js +85 -42
  17. package/lib/handler/events/map_touch_event.js +116 -45
  18. package/lib/handler/events/map_wheel_event.js +70 -34
  19. package/lib/handler/events/render_event.js +50 -31
  20. package/lib/handler/handler_inertia.js +158 -114
  21. package/lib/handler/handler_manager.js +640 -381
  22. package/lib/handler/handler_util.js +11 -29
  23. package/lib/handler/keyboard.js +155 -114
  24. package/lib/handler/map_event.js +133 -84
  25. package/lib/handler/mouse/index.js +28 -35
  26. package/lib/handler/mouse/mouse_handler.js +126 -90
  27. package/lib/handler/mouse/mousepan_handler.js +64 -46
  28. package/lib/handler/mouse/mousepitch_hander.js +64 -44
  29. package/lib/handler/mouse/mouserotate_hander.js +64 -44
  30. package/lib/handler/mouse/util.js +22 -40
  31. package/lib/handler/scroll_zoom.js +318 -176
  32. package/lib/handler/shim/dblclick_zoom.js +76 -42
  33. package/lib/handler/shim/drag_pan.js +98 -48
  34. package/lib/handler/shim/drag_rotate.js +82 -43
  35. package/lib/handler/shim/touch_zoom_rotate.js +127 -59
  36. package/lib/handler/tap/single_tap_recognizer.js +113 -84
  37. package/lib/handler/tap/tap_drag_zoom.js +111 -93
  38. package/lib/handler/tap/tap_recognizer.js +72 -60
  39. package/lib/handler/tap/tap_zoom.js +113 -88
  40. package/lib/handler/touch/index.js +36 -38
  41. package/lib/handler/touch/touch_pan.js +126 -98
  42. package/lib/handler/touch/touch_pitch.js +108 -74
  43. package/lib/handler/touch/touch_rotate.js +93 -59
  44. package/lib/handler/touch/touch_zoom.js +71 -49
  45. package/lib/handler/touch/two_touch.js +129 -90
  46. package/lib/hash.js +149 -100
  47. package/lib/index.js +43 -20
  48. package/lib/interface.js +4 -16
  49. package/lib/map.js +420 -240
  50. package/lib/util.js +88 -69
  51. package/lib/utils/Aabb.js +134 -81
  52. package/lib/utils/dom.js +162 -88
  53. package/lib/utils/performance.js +46 -54
  54. package/lib/utils/primitives.js +53 -59
  55. package/lib/utils/task_queue.js +104 -61
  56. package/package.json +3 -3
@@ -1,105 +1,144 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
-
22
- // src/handler/touch/two_touch.ts
23
- var two_touch_exports = {};
24
- __export(two_touch_exports, {
25
- default: () => TwoTouchHandler
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
26
7
  });
27
- module.exports = __toCommonJS(two_touch_exports);
28
- var import_dom = __toESM(require("../../utils/dom"));
29
- var TwoTouchHandler = class {
30
- constructor() {
8
+ exports.default = void 0;
9
+
10
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
+
12
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
13
+
14
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
15
+
16
+ var _dom = _interopRequireDefault(require("../../utils/dom"));
17
+
18
+ // @ts-ignore
19
+ var TwoTouchHandler = /*#__PURE__*/function () {
20
+ function TwoTouchHandler() {
21
+ (0, _classCallCheck2.default)(this, TwoTouchHandler);
31
22
  this.reset();
32
23
  }
33
- reset() {
34
- this.active = false;
35
- delete this.firstTwoTouches;
36
- }
37
- start(points) {
38
- return;
39
- }
40
- move(points, pinchAround, e) {
41
- return;
42
- }
43
- touchstart(e, points, mapTouches) {
44
- if (this.firstTwoTouches || mapTouches.length < 2) {
45
- return;
24
+
25
+ (0, _createClass2.default)(TwoTouchHandler, [{
26
+ key: "reset",
27
+ value: function reset() {
28
+ this.active = false; //@ts-ignore
29
+
30
+ delete this.firstTwoTouches;
46
31
  }
47
- this.firstTwoTouches = [mapTouches[0].identifier, mapTouches[1].identifier];
48
- this.start([points[0], points[1]]);
49
- }
50
- touchmove(e, points, mapTouches) {
51
- if (!this.firstTwoTouches) {
32
+ }, {
33
+ key: "start",
34
+ value: function start(points) {
52
35
  return;
53
- }
54
- e.preventDefault();
55
- const [idA, idB] = this.firstTwoTouches;
56
- const a = getTouchById(mapTouches, points, idA);
57
- const b = getTouchById(mapTouches, points, idB);
58
- if (!a || !b) {
36
+ } // eslint-disable-line
37
+
38
+ }, {
39
+ key: "move",
40
+ value: function move(points, pinchAround, e) {
59
41
  return;
42
+ } // eslint-disable-line
43
+
44
+ }, {
45
+ key: "touchstart",
46
+ value: function touchstart(e, points, mapTouches) {
47
+ // console.log(e.target, e.targetTouches.length ? e.targetTouches[0].target : null);
48
+ // log('touchstart', points, e.target.innerHTML, e.targetTouches.length ? e.targetTouches[0].target.innerHTML: undefined);
49
+ if (this.firstTwoTouches || mapTouches.length < 2) {
50
+ return;
51
+ }
52
+
53
+ this.firstTwoTouches = [mapTouches[0].identifier, mapTouches[1].identifier]; // implemented by child classes
54
+
55
+ this.start([points[0], points[1]]);
60
56
  }
61
- const pinchAround = this.aroundCenter ? null : a.add(b).div(2);
62
- return this.move([a, b], pinchAround, e);
63
- }
64
- touchend(e, points, mapTouches) {
65
- if (!this.firstTwoTouches) {
66
- return;
57
+ }, {
58
+ key: "touchmove",
59
+ value: function touchmove(e, points, mapTouches) {
60
+ if (!this.firstTwoTouches) {
61
+ return;
62
+ }
63
+
64
+ e.preventDefault();
65
+
66
+ var _this$firstTwoTouches = (0, _slicedToArray2.default)(this.firstTwoTouches, 2),
67
+ idA = _this$firstTwoTouches[0],
68
+ idB = _this$firstTwoTouches[1];
69
+
70
+ var a = getTouchById(mapTouches, points, idA);
71
+ var b = getTouchById(mapTouches, points, idB);
72
+
73
+ if (!a || !b) {
74
+ return;
75
+ }
76
+
77
+ var pinchAround = this.aroundCenter ? null : a.add(b).div(2); // implemented by child classes
78
+
79
+ return this.move([a, b], pinchAround, e);
67
80
  }
68
- const [idA, idB] = this.firstTwoTouches;
69
- const a = getTouchById(mapTouches, points, idA);
70
- const b = getTouchById(mapTouches, points, idB);
71
- if (a && b) {
72
- return;
81
+ }, {
82
+ key: "touchend",
83
+ value: function touchend(e, points, mapTouches) {
84
+ if (!this.firstTwoTouches) {
85
+ return;
86
+ }
87
+
88
+ var _this$firstTwoTouches2 = (0, _slicedToArray2.default)(this.firstTwoTouches, 2),
89
+ idA = _this$firstTwoTouches2[0],
90
+ idB = _this$firstTwoTouches2[1];
91
+
92
+ var a = getTouchById(mapTouches, points, idA);
93
+ var b = getTouchById(mapTouches, points, idB);
94
+
95
+ if (a && b) {
96
+ return;
97
+ }
98
+
99
+ if (this.active) {
100
+ _dom.default.suppressClick();
101
+ }
102
+
103
+ this.reset();
73
104
  }
74
- if (this.active) {
75
- import_dom.default.suppressClick();
105
+ }, {
106
+ key: "touchcancel",
107
+ value: function touchcancel() {
108
+ this.reset();
76
109
  }
77
- this.reset();
78
- }
79
- touchcancel() {
80
- this.reset();
81
- }
82
- enable(options) {
83
- this.enabled = true;
84
- this.aroundCenter = !!options && options.around === "center";
85
- }
86
- disable() {
87
- this.enabled = false;
88
- this.reset();
89
- }
90
- isEnabled() {
91
- return this.enabled;
92
- }
93
- isActive() {
94
- return this.active;
95
- }
96
- };
110
+ }, {
111
+ key: "enable",
112
+ value: function enable(options) {
113
+ this.enabled = true;
114
+ this.aroundCenter = !!options && options.around === 'center';
115
+ }
116
+ }, {
117
+ key: "disable",
118
+ value: function disable() {
119
+ this.enabled = false;
120
+ this.reset();
121
+ }
122
+ }, {
123
+ key: "isEnabled",
124
+ value: function isEnabled() {
125
+ return this.enabled;
126
+ }
127
+ }, {
128
+ key: "isActive",
129
+ value: function isActive() {
130
+ return this.active;
131
+ }
132
+ }]);
133
+ return TwoTouchHandler;
134
+ }();
135
+
136
+ exports.default = TwoTouchHandler;
137
+
97
138
  function getTouchById(mapTouches, points, identifier) {
98
- for (let i = 0; i < mapTouches.length; i++) {
139
+ for (var i = 0; i < mapTouches.length; i++) {
99
140
  if (mapTouches[i].identifier === identifier) {
100
141
  return points[i];
101
142
  }
102
143
  }
103
- }
104
- // Annotate the CommonJS export names for ESM import in node:
105
- 0 && (module.exports = {});
144
+ }
package/lib/hash.js CHANGED
@@ -1,120 +1,169 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/hash.ts
20
- var hash_exports = {};
21
- __export(hash_exports, {
22
- default: () => hash_default
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
23
7
  });
24
- module.exports = __toCommonJS(hash_exports);
25
- var import_l7_utils = require("@antv/l7-utils");
26
- var import_lodash = require("lodash");
27
- var Hash = class {
28
- constructor(hashName) {
29
- this.onHashChange = () => {
30
- const loc = this.getCurrentHash();
31
- if (loc.length >= 3 && !loc.some((v) => isNaN(+v))) {
32
- const bearing = this.map.dragRotate.isEnabled() && this.map.touchZoomRotate.isEnabled() ? +(loc[3] || 0) : this.map.getBearing();
33
- this.map.jumpTo({
8
+ exports.default = void 0;
9
+
10
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
+
12
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
13
+
14
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
+
16
+ var _l7Utils = require("@antv/l7-utils");
17
+
18
+ var _lodash = require("lodash");
19
+
20
+ // @ts-ignore
21
+ // tslint:disable-next-line:no-submodule-imports
22
+
23
+ /*
24
+ * Adds the map's position to its page's location hash.
25
+ * Passed as an option to the map object.
26
+ *
27
+ * @returns {Hash} `this`
28
+ */
29
+ var Hash = /*#__PURE__*/function () {
30
+ function Hash(hashName) {
31
+ var _this = this;
32
+
33
+ (0, _classCallCheck2.default)(this, Hash);
34
+ (0, _defineProperty2.default)(this, "onHashChange", function () {
35
+ var loc = _this.getCurrentHash();
36
+
37
+ if (loc.length >= 3 && !loc.some(function (v) {
38
+ return isNaN(+v);
39
+ })) {
40
+ var bearing = _this.map.dragRotate.isEnabled() && _this.map.touchZoomRotate.isEnabled() ? +(loc[3] || 0) : _this.map.getBearing();
41
+
42
+ _this.map.jumpTo({
34
43
  center: [+loc[2], +loc[1]],
35
44
  zoom: +loc[0],
36
- bearing,
45
+ bearing: bearing,
37
46
  pitch: +(loc[4] || 0)
38
47
  });
48
+
39
49
  return true;
40
50
  }
51
+
41
52
  return false;
42
- };
43
- this.getCurrentHash = () => {
44
- const hash = window.location.hash.replace("#", "");
45
- if (this.hashName) {
46
- let keyval;
47
- hash.split("&").map((part) => part.split("=")).forEach((part) => {
48
- if (part[0] === this.hashName) {
53
+ });
54
+ (0, _defineProperty2.default)(this, "getCurrentHash", function () {
55
+ // Get the current hash from location, stripped from its number sign
56
+ var hash = window.location.hash.replace('#', '');
57
+
58
+ if (_this.hashName) {
59
+ // Split the parameter-styled hash into parts and find the value we need
60
+ var keyval;
61
+ hash.split('&').map(function (part) {
62
+ return part.split('=');
63
+ }).forEach(function (part) {
64
+ if (part[0] === _this.hashName) {
49
65
  keyval = part;
50
66
  }
51
67
  });
52
- return (keyval ? keyval[1] || "" : "").split("/");
68
+ return (keyval ? keyval[1] || '' : '').split('/');
53
69
  }
54
- return hash.split("/");
55
- };
56
- this.updateHashUnthrottled = () => {
57
- const hash = this.getHashString();
70
+
71
+ return hash.split('/');
72
+ });
73
+ (0, _defineProperty2.default)(this, "updateHashUnthrottled", function () {
74
+ var hash = _this.getHashString();
75
+
58
76
  try {
59
- window.history.replaceState(window.history.state, "", hash);
60
- } catch (SecurityError) {
77
+ window.history.replaceState(window.history.state, '', hash);
78
+ } catch (SecurityError) {// IE11 does not allow this if the page is within an iframe created
79
+ // with iframe.contentWindow.document.write(...).
80
+ // https://github.com/mapbox/mapbox-gl-js/issues/7410
61
81
  }
62
- };
63
- this.hashName = hashName && encodeURIComponent(hashName);
64
- this.updateHash = (0, import_lodash.throttle)(this.updateHashUnthrottled, 30 * 1e3 / 100);
65
- }
66
- addTo(map) {
67
- this.map = map;
68
- import_l7_utils.$window.addEventListener("hashchange", this.onHashChange, false);
69
- this.map.on("moveend", this.updateHash);
70
- return this;
71
- }
72
- remove() {
73
- import_l7_utils.$window.removeEventListener("hashchange", this.onHashChange, false);
74
- this.map.off("moveend", this.updateHash);
75
- delete this.map;
76
- return this;
82
+ });
83
+ this.hashName = hashName && encodeURIComponent(hashName); // Mobile Safari doesn't allow updating the hash more than 100 times per 30 seconds.
84
+
85
+ this.updateHash = (0, _lodash.throttle)(this.updateHashUnthrottled, 30 * 1000 / 100);
77
86
  }
78
- getHashString(mapFeedback) {
79
- const center = this.map.getCenter();
80
- const zoom = Math.round(this.map.getZoom() * 100) / 100;
81
- const precision = Math.ceil((zoom * Math.LN2 + Math.log(512 / 360 / 0.5)) / Math.LN10);
82
- const m = Math.pow(10, precision);
83
- const lng = Math.round(center.lng * m) / m;
84
- const lat = Math.round(center.lat * m) / m;
85
- const bearing = this.map.getBearing();
86
- const pitch = this.map.getPitch();
87
- let hash = "";
88
- if (mapFeedback) {
89
- hash += `/${lng}/${lat}/${zoom}`;
90
- } else {
91
- hash += `${zoom}/${lat}/${lng}`;
92
- }
93
- if (bearing || pitch) {
94
- hash += `/${Math.round(bearing * 10) / 10}`;
87
+
88
+ (0, _createClass2.default)(Hash, [{
89
+ key: "addTo",
90
+ value: function addTo(map) {
91
+ this.map = map;
92
+
93
+ _l7Utils.$window.addEventListener('hashchange', this.onHashChange, false);
94
+
95
+ this.map.on('moveend', this.updateHash);
96
+ return this;
95
97
  }
96
- if (pitch) {
97
- hash += `/${Math.round(pitch)}`;
98
+ }, {
99
+ key: "remove",
100
+ value: function remove() {
101
+ _l7Utils.$window.removeEventListener('hashchange', this.onHashChange, false);
102
+
103
+ this.map.off('moveend', this.updateHash); // clearTimeout(this.updateHash());
104
+ // @ts-ignore
105
+
106
+ delete this.map;
107
+ return this;
98
108
  }
99
- if (this.hashName) {
100
- const hashName = this.hashName;
101
- let found = false;
102
- const parts = window.location.hash.slice(1).split("&").map((part) => {
103
- const key = part.split("=")[0];
104
- if (key === hashName) {
105
- found = true;
106
- return `${key}=${hash}`;
109
+ }, {
110
+ key: "getHashString",
111
+ value: function getHashString(mapFeedback) {
112
+ var center = this.map.getCenter();
113
+ var zoom = Math.round(this.map.getZoom() * 100) / 100; // derived from equation: 512px * 2^z / 360 / 10^d < 0.5px
114
+
115
+ var precision = Math.ceil((zoom * Math.LN2 + Math.log(512 / 360 / 0.5)) / Math.LN10);
116
+ var m = Math.pow(10, precision);
117
+ var lng = Math.round(center.lng * m) / m;
118
+ var lat = Math.round(center.lat * m) / m;
119
+ var bearing = this.map.getBearing();
120
+ var pitch = this.map.getPitch();
121
+ var hash = '';
122
+
123
+ if (mapFeedback) {
124
+ // new map feedback site has some constraints that don't allow
125
+ // us to use the same hash format as we do for the Map hash option.
126
+ hash += "/".concat(lng, "/").concat(lat, "/").concat(zoom);
127
+ } else {
128
+ hash += "".concat(zoom, "/").concat(lat, "/").concat(lng);
129
+ }
130
+
131
+ if (bearing || pitch) {
132
+ hash += "/".concat(Math.round(bearing * 10) / 10);
133
+ }
134
+
135
+ if (pitch) {
136
+ hash += "/".concat(Math.round(pitch));
137
+ }
138
+
139
+ if (this.hashName) {
140
+ var hashName = this.hashName;
141
+ var found = false;
142
+ var parts = window.location.hash.slice(1).split('&').map(function (part) {
143
+ var key = part.split('=')[0];
144
+
145
+ if (key === hashName) {
146
+ found = true;
147
+ return "".concat(key, "=").concat(hash);
148
+ }
149
+
150
+ return part;
151
+ }).filter(function (a) {
152
+ return a;
153
+ });
154
+
155
+ if (!found) {
156
+ parts.push("".concat(hashName, "=").concat(hash));
107
157
  }
108
- return part;
109
- }).filter((a) => a);
110
- if (!found) {
111
- parts.push(`${hashName}=${hash}`);
158
+
159
+ return "#".concat(parts.join('&'));
112
160
  }
113
- return `#${parts.join("&")}`;
161
+
162
+ return "#".concat(hash);
114
163
  }
115
- return `#${hash}`;
116
- }
117
- };
118
- var hash_default = Hash;
119
- // Annotate the CommonJS export names for ESM import in node:
120
- 0 && (module.exports = {});
164
+ }]);
165
+ return Hash;
166
+ }();
167
+
168
+ var _default = Hash;
169
+ exports.default = _default;
package/lib/index.js CHANGED
@@ -1,21 +1,44 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from === "object" || typeof from === "function") {
7
- for (let key of __getOwnPropNames(from))
8
- if (!__hasOwnProp.call(to, key) && key !== except)
9
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
- }
11
- return to;
12
- };
13
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
1
+ "use strict";
15
2
 
16
- // src/index.ts
17
- var src_exports = {};
18
- module.exports = __toCommonJS(src_exports);
19
- __reExport(src_exports, require("./map"), module.exports);
20
- __reExport(src_exports, require("./earthmap"), module.exports);
21
- __reExport(src_exports, require("./interface"), module.exports);
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ var _map = require("./map");
8
+
9
+ Object.keys(_map).forEach(function (key) {
10
+ if (key === "default" || key === "__esModule") return;
11
+ if (key in exports && exports[key] === _map[key]) return;
12
+ Object.defineProperty(exports, key, {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return _map[key];
16
+ }
17
+ });
18
+ });
19
+
20
+ var _earthmap = require("./earthmap");
21
+
22
+ Object.keys(_earthmap).forEach(function (key) {
23
+ if (key === "default" || key === "__esModule") return;
24
+ if (key in exports && exports[key] === _earthmap[key]) return;
25
+ Object.defineProperty(exports, key, {
26
+ enumerable: true,
27
+ get: function get() {
28
+ return _earthmap[key];
29
+ }
30
+ });
31
+ });
32
+
33
+ var _interface = require("./interface");
34
+
35
+ Object.keys(_interface).forEach(function (key) {
36
+ if (key === "default" || key === "__esModule") return;
37
+ if (key in exports && exports[key] === _interface[key]) return;
38
+ Object.defineProperty(exports, key, {
39
+ enumerable: true,
40
+ get: function get() {
41
+ return _interface[key];
42
+ }
43
+ });
44
+ });
package/lib/interface.js CHANGED
@@ -1,17 +1,5 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from === "object" || typeof from === "function") {
7
- for (let key of __getOwnPropNames(from))
8
- if (!__hasOwnProp.call(to, key) && key !== except)
9
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
- }
11
- return to;
12
- };
13
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
1
+ "use strict";
14
2
 
15
- // src/interface.ts
16
- var interface_exports = {};
17
- module.exports = __toCommonJS(interface_exports);
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });