@blackglory/observe 0.1.5 → 0.1.7
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/README.md +18 -5
- package/dist/es2015/index.min.mjs +1 -1
- package/dist/es2015/index.min.mjs.map +1 -1
- package/dist/es2015/index.mjs +3343 -3801
- package/dist/es2015/index.mjs.map +1 -1
- package/dist/es2015/index.umd.js +3343 -3801
- package/dist/es2015/index.umd.js.map +1 -1
- package/dist/es2015/index.umd.min.js +2 -2
- package/dist/es2015/index.umd.min.js.map +1 -1
- package/dist/es2018/index.min.mjs +1 -1
- package/dist/es2018/index.min.mjs.map +1 -1
- package/dist/es2018/index.mjs +3343 -3801
- package/dist/es2018/index.mjs.map +1 -1
- package/dist/es2018/index.umd.js +3343 -3801
- package/dist/es2018/index.umd.js.map +1 -1
- package/dist/es2018/index.umd.min.js +2 -2
- package/dist/es2018/index.umd.min.js.map +1 -1
- package/lib/es2015/index.js +5 -1
- package/lib/es2015/index.js.map +1 -1
- package/lib/es2015/observe-addtion-of-descendant-nodes.js +2 -5
- package/lib/es2015/observe-addtion-of-descendant-nodes.js.map +1 -1
- package/lib/es2015/observe-removal-of-descendant-nodes.js +2 -5
- package/lib/es2015/observe-removal-of-descendant-nodes.js.map +1 -1
- package/lib/es2018/index.js +5 -1
- package/lib/es2018/index.js.map +1 -1
- package/lib/es2018/observe-addtion-of-descendant-nodes.js +2 -5
- package/lib/es2018/observe-addtion-of-descendant-nodes.js.map +1 -1
- package/lib/es2018/observe-removal-of-descendant-nodes.js +2 -5
- package/lib/es2018/observe-removal-of-descendant-nodes.js.map +1 -1
- package/package.json +17 -17
package/lib/es2015/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/lib/es2015/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wEAAqD;AACrD,wEAAqD;AACrD,0DAAuC;AACvC,wDAAqC"}
|
|
@@ -3,12 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.observeAdditionOfDescendantNodes = void 0;
|
|
4
4
|
const from_mutation_observer_1 = require("./utils/from-mutation-observer");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const
|
|
6
|
+
const Iter = require("iterable-operator");
|
|
7
7
|
function observeAdditionOfDescendantNodes(node) {
|
|
8
|
-
return (0, from_mutation_observer_1.fromMutationObserver)(node, { childList: true, subtree: true }).pipe((0, operators_1.map)(records =>
|
|
9
|
-
.map(x => x.addedNodes)
|
|
10
|
-
.flatten()
|
|
11
|
-
.toArray()), (0, operators_1.filter)(addedNodes => addedNodes.length > 0));
|
|
8
|
+
return (0, from_mutation_observer_1.fromMutationObserver)(node, { childList: true, subtree: true }).pipe((0, operators_1.map)(records => Iter.toArray(Iter.flatten(Iter.map(records, x => x.addedNodes)))), (0, operators_1.filter)(addedNodes => addedNodes.length > 0));
|
|
12
9
|
}
|
|
13
10
|
exports.observeAdditionOfDescendantNodes = observeAdditionOfDescendantNodes;
|
|
14
11
|
//# sourceMappingURL=observe-addtion-of-descendant-nodes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observe-addtion-of-descendant-nodes.js","sourceRoot":"","sources":["../../src/observe-addtion-of-descendant-nodes.ts"],"names":[],"mappings":";;;AAAA,0EAAoE;AACpE,8CAA4C;AAE5C,
|
|
1
|
+
{"version":3,"file":"observe-addtion-of-descendant-nodes.js","sourceRoot":"","sources":["../../src/observe-addtion-of-descendant-nodes.ts"],"names":[],"mappings":";;;AAAA,0EAAoE;AACpE,8CAA4C;AAE5C,0CAAyC;AAEzC,SAAgB,gCAAgC,CAAC,IAAU;IACzD,OAAO,IAAA,6CAAoB,EACzB,IAAI,EACJ,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CACnC,CAAC,IAAI,CACJ,IAAA,eAAG,EAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CACzB,IAAI,CAAC,OAAO,CACV,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CACrC,CACF,CAAC,EACF,IAAA,kBAAM,EAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAC5C,CAAA;AACH,CAAC;AAZD,4EAYC"}
|
|
@@ -3,12 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.observeRemovalOfDescendantNodes = void 0;
|
|
4
4
|
const from_mutation_observer_1 = require("./utils/from-mutation-observer");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const
|
|
6
|
+
const Iter = require("iterable-operator");
|
|
7
7
|
function observeRemovalOfDescendantNodes(node) {
|
|
8
|
-
return (0, from_mutation_observer_1.fromMutationObserver)(node, { childList: true, subtree: true }).pipe((0, operators_1.map)(records =>
|
|
9
|
-
.map(x => x.removedNodes)
|
|
10
|
-
.flatten()
|
|
11
|
-
.toArray()), (0, operators_1.filter)(removedNodes => removedNodes.length > 0));
|
|
8
|
+
return (0, from_mutation_observer_1.fromMutationObserver)(node, { childList: true, subtree: true }).pipe((0, operators_1.map)(records => Iter.toArray(Iter.flatten(Iter.map(records, x => x.removedNodes)))), (0, operators_1.filter)(removedNodes => removedNodes.length > 0));
|
|
12
9
|
}
|
|
13
10
|
exports.observeRemovalOfDescendantNodes = observeRemovalOfDescendantNodes;
|
|
14
11
|
//# sourceMappingURL=observe-removal-of-descendant-nodes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observe-removal-of-descendant-nodes.js","sourceRoot":"","sources":["../../src/observe-removal-of-descendant-nodes.ts"],"names":[],"mappings":";;;AAAA,0EAAoE;AACpE,8CAA4C;AAE5C,
|
|
1
|
+
{"version":3,"file":"observe-removal-of-descendant-nodes.js","sourceRoot":"","sources":["../../src/observe-removal-of-descendant-nodes.ts"],"names":[],"mappings":";;;AAAA,0EAAoE;AACpE,8CAA4C;AAE5C,0CAAyC;AAEzC,SAAgB,+BAA+B,CAAC,IAAU;IACxD,OAAO,IAAA,6CAAoB,EACzB,IAAI,EACJ,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CACnC,CAAC,IAAI,CACJ,IAAA,eAAG,EAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CACzB,IAAI,CAAC,OAAO,CACV,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CACvC,CACF,CAAC,EACF,IAAA,kBAAM,EAAC,YAAY,CAAC,EAAE,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAChD,CAAA;AACH,CAAC;AAZD,0EAYC"}
|
package/lib/es2018/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/lib/es2018/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wEAAqD;AACrD,wEAAqD;AACrD,0DAAuC;AACvC,wDAAqC"}
|
|
@@ -3,12 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.observeAdditionOfDescendantNodes = void 0;
|
|
4
4
|
const from_mutation_observer_1 = require("./utils/from-mutation-observer");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const
|
|
6
|
+
const Iter = require("iterable-operator");
|
|
7
7
|
function observeAdditionOfDescendantNodes(node) {
|
|
8
|
-
return (0, from_mutation_observer_1.fromMutationObserver)(node, { childList: true, subtree: true }).pipe((0, operators_1.map)(records =>
|
|
9
|
-
.map(x => x.addedNodes)
|
|
10
|
-
.flatten()
|
|
11
|
-
.toArray()), (0, operators_1.filter)(addedNodes => addedNodes.length > 0));
|
|
8
|
+
return (0, from_mutation_observer_1.fromMutationObserver)(node, { childList: true, subtree: true }).pipe((0, operators_1.map)(records => Iter.toArray(Iter.flatten(Iter.map(records, x => x.addedNodes)))), (0, operators_1.filter)(addedNodes => addedNodes.length > 0));
|
|
12
9
|
}
|
|
13
10
|
exports.observeAdditionOfDescendantNodes = observeAdditionOfDescendantNodes;
|
|
14
11
|
//# sourceMappingURL=observe-addtion-of-descendant-nodes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observe-addtion-of-descendant-nodes.js","sourceRoot":"","sources":["../../src/observe-addtion-of-descendant-nodes.ts"],"names":[],"mappings":";;;AAAA,0EAAoE;AACpE,8CAA4C;AAE5C,
|
|
1
|
+
{"version":3,"file":"observe-addtion-of-descendant-nodes.js","sourceRoot":"","sources":["../../src/observe-addtion-of-descendant-nodes.ts"],"names":[],"mappings":";;;AAAA,0EAAoE;AACpE,8CAA4C;AAE5C,0CAAyC;AAEzC,SAAgB,gCAAgC,CAAC,IAAU;IACzD,OAAO,IAAA,6CAAoB,EACzB,IAAI,EACJ,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CACnC,CAAC,IAAI,CACJ,IAAA,eAAG,EAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CACzB,IAAI,CAAC,OAAO,CACV,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CACrC,CACF,CAAC,EACF,IAAA,kBAAM,EAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAC5C,CAAA;AACH,CAAC;AAZD,4EAYC"}
|
|
@@ -3,12 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.observeRemovalOfDescendantNodes = void 0;
|
|
4
4
|
const from_mutation_observer_1 = require("./utils/from-mutation-observer");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const
|
|
6
|
+
const Iter = require("iterable-operator");
|
|
7
7
|
function observeRemovalOfDescendantNodes(node) {
|
|
8
|
-
return (0, from_mutation_observer_1.fromMutationObserver)(node, { childList: true, subtree: true }).pipe((0, operators_1.map)(records =>
|
|
9
|
-
.map(x => x.removedNodes)
|
|
10
|
-
.flatten()
|
|
11
|
-
.toArray()), (0, operators_1.filter)(removedNodes => removedNodes.length > 0));
|
|
8
|
+
return (0, from_mutation_observer_1.fromMutationObserver)(node, { childList: true, subtree: true }).pipe((0, operators_1.map)(records => Iter.toArray(Iter.flatten(Iter.map(records, x => x.removedNodes)))), (0, operators_1.filter)(removedNodes => removedNodes.length > 0));
|
|
12
9
|
}
|
|
13
10
|
exports.observeRemovalOfDescendantNodes = observeRemovalOfDescendantNodes;
|
|
14
11
|
//# sourceMappingURL=observe-removal-of-descendant-nodes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observe-removal-of-descendant-nodes.js","sourceRoot":"","sources":["../../src/observe-removal-of-descendant-nodes.ts"],"names":[],"mappings":";;;AAAA,0EAAoE;AACpE,8CAA4C;AAE5C,
|
|
1
|
+
{"version":3,"file":"observe-removal-of-descendant-nodes.js","sourceRoot":"","sources":["../../src/observe-removal-of-descendant-nodes.ts"],"names":[],"mappings":";;;AAAA,0EAAoE;AACpE,8CAA4C;AAE5C,0CAAyC;AAEzC,SAAgB,+BAA+B,CAAC,IAAU;IACxD,OAAO,IAAA,6CAAoB,EACzB,IAAI,EACJ,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CACnC,CAAC,IAAI,CACJ,IAAA,eAAG,EAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CACzB,IAAI,CAAC,OAAO,CACV,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CACvC,CACF,CAAC,EACF,IAAA,kBAAM,EAAC,YAAY,CAAC,EAAE,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAChD,CAAA;AACH,CAAC;AAZD,0EAYC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blackglory/observe",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "A module for observing things happening.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"DOM"
|
|
@@ -41,33 +41,33 @@
|
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@blackglory/jest-matchers": "^0.2.1",
|
|
44
|
-
"@blackglory/wait-for": "^0.
|
|
45
|
-
"@commitlint/cli": "^
|
|
46
|
-
"@commitlint/config-conventional": "^
|
|
47
|
-
"@rollup/plugin-commonjs": "^
|
|
44
|
+
"@blackglory/wait-for": "^0.5.1",
|
|
45
|
+
"@commitlint/cli": "^17.2.0",
|
|
46
|
+
"@commitlint/config-conventional": "^17.2.0",
|
|
47
|
+
"@rollup/plugin-commonjs": "^22.0.2",
|
|
48
48
|
"@rollup/plugin-json": "^4.1.0",
|
|
49
|
-
"@rollup/plugin-node-resolve": "^13.
|
|
50
|
-
"@rollup/plugin-replace": "^
|
|
51
|
-
"@rollup/plugin-typescript": "^8.3.
|
|
49
|
+
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
50
|
+
"@rollup/plugin-replace": "^4.0.0",
|
|
51
|
+
"@rollup/plugin-typescript": "^8.3.4",
|
|
52
52
|
"@types/jest": "^27.4.0",
|
|
53
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
54
|
-
"@typescript-eslint/parser": "^5.
|
|
55
|
-
"eslint": "^8.
|
|
53
|
+
"@typescript-eslint/eslint-plugin": "^5.42.0",
|
|
54
|
+
"@typescript-eslint/parser": "^5.42.0",
|
|
55
|
+
"eslint": "^8.26.0",
|
|
56
56
|
"husky": "^4.3.6",
|
|
57
57
|
"jest": "^27.4.7",
|
|
58
58
|
"npm-run-all": "^4.1.5",
|
|
59
59
|
"rimraf": "^3.0.2",
|
|
60
|
-
"rollup": "^2.
|
|
60
|
+
"rollup": "^2.77.2",
|
|
61
61
|
"rollup-plugin-analyzer": "^4.0.0",
|
|
62
62
|
"rollup-plugin-terser": "^7.0.2",
|
|
63
|
-
"standard-version": "^9.
|
|
63
|
+
"standard-version": "^9.5.0",
|
|
64
64
|
"ts-jest": "^27.1.2",
|
|
65
65
|
"tscpaths": "^0.0.9",
|
|
66
|
-
"tslib": "^2.
|
|
67
|
-
"typescript": "^4.
|
|
66
|
+
"tslib": "^2.4.0",
|
|
67
|
+
"typescript": "^4.7.4"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"iterable-operator": "^
|
|
71
|
-
"rxjs": "^7.5.
|
|
70
|
+
"iterable-operator": "^2.1.0",
|
|
71
|
+
"rxjs": "^7.5.6"
|
|
72
72
|
}
|
|
73
73
|
}
|