@ne1410s/menu 0.0.39 → 0.0.42

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.
@@ -2,7 +2,7 @@
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
3
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ne_menu = {}));
5
- }(this, (function (exports) { 'use strict';
5
+ })(this, (function (exports) { 'use strict';
6
6
 
7
7
  /*! *****************************************************************************
8
8
  Copyright (c) Microsoft Corporation.
@@ -19,19 +19,23 @@
19
19
  PERFORMANCE OF THIS SOFTWARE.
20
20
  ***************************************************************************** */
21
21
 
22
- function __spreadArray(to, from) {
23
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
24
- to[j] = from[i];
25
- return to;
22
+ function __spreadArray(to, from, pack) {
23
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
24
+ if (ar || !(i in from)) {
25
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
26
+ ar[i] = from[i];
27
+ }
28
+ }
29
+ return to.concat(ar || Array.prototype.slice.call(from));
26
30
  }
27
31
 
28
32
  var ChainedQuery = /** @class */ (function () {
29
33
  function ChainedQuery(mapper) {
30
- var _this = this;
31
34
  var sources = [];
32
35
  for (var _i = 1; _i < arguments.length; _i++) {
33
36
  sources[_i - 1] = arguments[_i];
34
37
  }
38
+ var _this = this;
35
39
  this.mapper = mapper;
36
40
  this._items = [];
37
41
  this.get = function (index) { return _this._items[index]; };
@@ -142,7 +146,7 @@
142
146
  if (handle)
143
147
  it.parentNode.removeChild(it);
144
148
  return !handle;
145
- }))))();
149
+ }), false)))();
146
150
  };
147
151
  //#endregion
148
152
  //#region Containers
@@ -161,20 +165,20 @@
161
165
  sources[_i] = arguments[_i];
162
166
  }
163
167
  return new (ChainedQuery.bind.apply(ChainedQuery, __spreadArray([void 0, this.mapper], this.containers.reduce(function (acc, parent) {
164
- var nodes = new (ChainedQuery.bind.apply(ChainedQuery, __spreadArray([void 0, _this.mapper], sources)))().nodes;
168
+ var nodes = new (ChainedQuery.bind.apply(ChainedQuery, __spreadArray([void 0, _this.mapper], sources, false)))().nodes;
165
169
  parent.append.apply(parent, nodes);
166
170
  acc.push.apply(acc, nodes);
167
171
  return acc;
168
- }, []))))();
172
+ }, []), false)))();
169
173
  };
170
174
  ChainedQuery.prototype.find = function (selector) {
171
175
  return new (ChainedQuery.bind.apply(ChainedQuery, __spreadArray([void 0, this.mapper], this.containers.reduce(function (acc, parent) {
172
176
  acc.push.apply(acc, Array.from(parent.querySelectorAll(selector)));
173
177
  return acc;
174
- }, []))))();
178
+ }, []), false)))();
175
179
  };
176
180
  ChainedQuery.prototype.first = function (selector) {
177
- return new (ChainedQuery.bind.apply(ChainedQuery, __spreadArray([void 0, this.mapper], this.containers.map(function (parent) { return parent.querySelector(selector); }).filter(function (found) { return !!found; }))))();
181
+ return new (ChainedQuery.bind.apply(ChainedQuery, __spreadArray([void 0, this.mapper], this.containers.map(function (parent) { return parent.querySelector(selector); }).filter(function (found) { return !!found; }), false)))();
178
182
  };
179
183
  ChainedQuery.WHITESPACE_RGX = /\s+/;
180
184
  return ChainedQuery;
@@ -236,7 +240,7 @@
236
240
  for (var _i = 0; _i < arguments.length; _i++) {
237
241
  input[_i] = arguments[_i];
238
242
  }
239
- return new (ChainedQuery.bind.apply(ChainedQuery, __spreadArray([void 0, mapper], input)))();
243
+ return new (ChainedQuery.bind.apply(ChainedQuery, __spreadArray([void 0, mapper], input, false)))();
240
244
  }
241
245
 
242
246
  class CustomElementBase extends HTMLElement {
@@ -438,4 +442,4 @@
438
442
 
439
443
  Object.defineProperty(exports, '__esModule', { value: true });
440
444
 
441
- })));
445
+ }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ne1410s/menu",
3
- "version": "0.0.39",
3
+ "version": "0.0.42",
4
4
  "description": "Lightweight ES context menu.",
5
5
  "main": "dist/ne14_menu.cjs.min.js",
6
6
  "module": "dist/ne14_menu.esm.min.js",
@@ -40,18 +40,18 @@
40
40
  },
41
41
  "homepage": "https://github.com/ne1410s/elem.menu#readme",
42
42
  "devDependencies": {
43
- "@rollup/plugin-commonjs": "^20.0.0",
43
+ "@rollup/plugin-commonjs": "^21.0.3",
44
44
  "@rollup/plugin-json": "^4.1.0",
45
- "@rollup/plugin-node-resolve": "^13.0.4",
45
+ "@rollup/plugin-node-resolve": "^13.1.3",
46
46
  "@rollup/plugin-url": "^6.1.0",
47
- "prettier": "^2.4.1",
47
+ "prettier": "^2.6.1",
48
48
  "rimraf": "^3.0.1",
49
- "rollup": "^2.56.3",
50
- "rollup-plugin-typescript2": "^0.30.0",
51
- "typescript": "^4.4.3"
49
+ "rollup": "^2.70.1",
50
+ "rollup-plugin-typescript2": "^0.31.2",
51
+ "typescript": "^4.6.3"
52
52
  },
53
53
  "dependencies": {
54
- "@ne1410s/cust-elems": "^0.2.29",
55
- "@ne1410s/dom": "^0.2.36"
54
+ "@ne1410s/cust-elems": "^0.2.33",
55
+ "@ne1410s/dom": "^0.2.39"
56
56
  }
57
57
  }