@blackglory/observe 0.1.1 → 0.1.5
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/dist/es2015/index.min.mjs +1 -8
- package/dist/es2015/index.min.mjs.map +1 -1
- package/dist/es2015/index.mjs +971 -7553
- package/dist/es2015/index.mjs.map +1 -1
- package/dist/es2015/index.umd.js +973 -7555
- package/dist/es2015/index.umd.js.map +1 -1
- package/dist/es2015/index.umd.min.js +2 -9
- package/dist/es2015/index.umd.min.js.map +1 -1
- package/dist/es2018/index.min.mjs +1 -8
- package/dist/es2018/index.min.mjs.map +1 -1
- package/dist/es2018/index.mjs +971 -7553
- package/dist/es2018/index.mjs.map +1 -1
- package/dist/es2018/index.umd.js +973 -7555
- package/dist/es2018/index.umd.js.map +1 -1
- package/dist/es2018/index.umd.min.js +2 -9
- package/dist/es2018/index.umd.min.js.map +1 -1
- package/lib/es2015/observe-addtion-of-descendant-nodes.js +2 -2
- package/lib/es2015/observe-addtion-of-descendant-nodes.js.map +1 -1
- package/lib/es2015/observe-removal-of-descendant-nodes.js +2 -2
- package/lib/es2015/observe-removal-of-descendant-nodes.js.map +1 -1
- package/lib/es2015/observe-state-changes.js +5 -3
- package/lib/es2015/observe-state-changes.js.map +1 -1
- package/lib/es2015/observe-url-changes.js +1 -1
- package/lib/es2015/observe-url-changes.js.map +1 -1
- package/lib/es2018/observe-addtion-of-descendant-nodes.js +2 -2
- package/lib/es2018/observe-addtion-of-descendant-nodes.js.map +1 -1
- package/lib/es2018/observe-removal-of-descendant-nodes.js +2 -2
- package/lib/es2018/observe-removal-of-descendant-nodes.js.map +1 -1
- package/lib/es2018/observe-state-changes.js +5 -3
- package/lib/es2018/observe-state-changes.js.map +1 -1
- package/lib/es2018/observe-url-changes.js +1 -1
- package/lib/es2018/observe-url-changes.js.map +1 -1
- package/package.json +22 -22
- package/CHANGELOG.md +0 -12
|
@@ -5,10 +5,10 @@ const from_mutation_observer_1 = require("./utils/from-mutation-observer");
|
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
const chaining_1 = require("iterable-operator/lib/es2015/style/chaining");
|
|
7
7
|
function observeAdditionOfDescendantNodes(node) {
|
|
8
|
-
return from_mutation_observer_1.fromMutationObserver(node, { childList: true, subtree: true }).pipe(operators_1.map(records => new chaining_1.IterableOperator(records)
|
|
8
|
+
return (0, from_mutation_observer_1.fromMutationObserver)(node, { childList: true, subtree: true }).pipe((0, operators_1.map)(records => new chaining_1.IterableOperator(records)
|
|
9
9
|
.map(x => x.addedNodes)
|
|
10
10
|
.flatten()
|
|
11
|
-
.toArray()), operators_1.filter(addedNodes => addedNodes.length > 0));
|
|
11
|
+
.toArray()), (0, operators_1.filter)(addedNodes => addedNodes.length > 0));
|
|
12
12
|
}
|
|
13
13
|
exports.observeAdditionOfDescendantNodes = observeAdditionOfDescendantNodes;
|
|
14
14
|
//# 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,0EAA8E;AAE9E,SAAgB,gCAAgC,CAAC,IAAU;IACzD,OAAO,6CAAoB,
|
|
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,0EAA8E;AAE9E,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,2BAAgB,CAAC,OAAO,CAAC;SACzC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC;SACtB,OAAO,EAAQ;SACf,OAAO,EAAE,CACX,EACD,IAAA,kBAAM,EAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAC5C,CAAA;AACH,CAAC;AAZD,4EAYC"}
|
|
@@ -5,10 +5,10 @@ const from_mutation_observer_1 = require("./utils/from-mutation-observer");
|
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
const chaining_1 = require("iterable-operator/lib/es2015/style/chaining");
|
|
7
7
|
function observeRemovalOfDescendantNodes(node) {
|
|
8
|
-
return from_mutation_observer_1.fromMutationObserver(node, { childList: true, subtree: true }).pipe(operators_1.map(records => new chaining_1.IterableOperator(records)
|
|
8
|
+
return (0, from_mutation_observer_1.fromMutationObserver)(node, { childList: true, subtree: true }).pipe((0, operators_1.map)(records => new chaining_1.IterableOperator(records)
|
|
9
9
|
.map(x => x.removedNodes)
|
|
10
10
|
.flatten()
|
|
11
|
-
.toArray()), operators_1.filter(removedNodes => removedNodes.length > 0));
|
|
11
|
+
.toArray()), (0, operators_1.filter)(removedNodes => removedNodes.length > 0));
|
|
12
12
|
}
|
|
13
13
|
exports.observeRemovalOfDescendantNodes = observeRemovalOfDescendantNodes;
|
|
14
14
|
//# 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,0EAA8E;AAE9E,SAAgB,+BAA+B,CAAC,IAAU;IACxD,OAAO,6CAAoB,
|
|
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,0EAA8E;AAE9E,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,2BAAgB,CAAC,OAAO,CAAC;SACzC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC;SACxB,OAAO,EAAQ;SACf,OAAO,EAAE,CACX,EACD,IAAA,kBAAM,EAAC,YAAY,CAAC,EAAE,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAChD,CAAA;AACH,CAAC;AAZD,0EAYC"}
|
|
@@ -8,21 +8,23 @@ const replaceStateHooks = new Set();
|
|
|
8
8
|
let pushStateHookRegistered = false;
|
|
9
9
|
let replaceStateHookRegistered = false;
|
|
10
10
|
function observeStateChanges() {
|
|
11
|
-
return rxjs_1.merge(observePushState(), observeReplaceState(), rxjs_1.fromEvent(window, 'popstate')).pipe(operators_1.map(_ => undefined));
|
|
11
|
+
return (0, rxjs_1.merge)(observePushState(), observeReplaceState(), (0, rxjs_1.fromEvent)(window, 'popstate')).pipe((0, operators_1.map)(_ => undefined));
|
|
12
12
|
}
|
|
13
13
|
exports.observeStateChanges = observeStateChanges;
|
|
14
14
|
function observePushState() {
|
|
15
15
|
return new rxjs_1.Observable(observer => {
|
|
16
|
-
if (!pushStateHookRegistered)
|
|
16
|
+
if (!pushStateHookRegistered) {
|
|
17
17
|
registerPushStateHook();
|
|
18
|
+
}
|
|
18
19
|
pushStateHooks.add(observer);
|
|
19
20
|
return () => pushStateHooks.delete(observer);
|
|
20
21
|
});
|
|
21
22
|
}
|
|
22
23
|
function observeReplaceState() {
|
|
23
24
|
return new rxjs_1.Observable(observer => {
|
|
24
|
-
if (!replaceStateHookRegistered)
|
|
25
|
+
if (!replaceStateHookRegistered) {
|
|
25
26
|
registerReplaceStateHook();
|
|
27
|
+
}
|
|
26
28
|
replaceStateHooks.add(observer);
|
|
27
29
|
return () => replaceStateHooks.delete(observer);
|
|
28
30
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observe-state-changes.js","sourceRoot":"","sources":["../../src/observe-state-changes.ts"],"names":[],"mappings":";;;AAAA,+BAA+D;AAC/D,8CAAoC;AAEpC,MAAM,cAAc,GAAG,IAAI,GAAG,EAAoB,CAAA;AAClD,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAoB,CAAA;AACrD,IAAI,uBAAuB,GAAG,KAAK,CAAA;AACnC,IAAI,0BAA0B,GAAG,KAAK,CAAA;AAEtC,SAAgB,mBAAmB;IACjC,OAAO,YAAK,
|
|
1
|
+
{"version":3,"file":"observe-state-changes.js","sourceRoot":"","sources":["../../src/observe-state-changes.ts"],"names":[],"mappings":";;;AAAA,+BAA+D;AAC/D,8CAAoC;AAEpC,MAAM,cAAc,GAAG,IAAI,GAAG,EAAoB,CAAA;AAClD,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAoB,CAAA;AACrD,IAAI,uBAAuB,GAAG,KAAK,CAAA;AACnC,IAAI,0BAA0B,GAAG,KAAK,CAAA;AAEtC,SAAgB,mBAAmB;IACjC,OAAO,IAAA,YAAK,EACV,gBAAgB,EAAE,EAClB,mBAAmB,EAAE,EACrB,IAAA,gBAAS,EAAC,MAAM,EAAE,UAAU,CAAC,CAC9B,CAAC,IAAI,CACJ,IAAA,eAAG,EAAC,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,CACpB,CAAA;AACH,CAAC;AARD,kDAQC;AAED,SAAS,gBAAgB;IACvB,OAAO,IAAI,iBAAU,CAAC,QAAQ,CAAC,EAAE;QAC/B,IAAI,CAAC,uBAAuB,EAAE;YAC5B,qBAAqB,EAAE,CAAA;SACxB;QACD,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;QAC5B,OAAO,GAAG,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;IAC9C,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,SAAS,mBAAmB;IAC1B,OAAO,IAAI,iBAAU,CAAC,QAAQ,CAAC,EAAE;QAC/B,IAAI,CAAC,0BAA0B,EAAE;YAC/B,wBAAwB,EAAE,CAAA;SAC3B;QACD,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;QAC/B,OAAO,GAAG,EAAE,CAAC,iBAAiB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;IACjD,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,SAAS,qBAAqB;IAC5B,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAA;IACnC,OAAO,CAAC,SAAS,GAAG,UAAU,GAAG,IAAI;QACnC,OAAO,CAAC,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;QACpC,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAA;IACrD,CAAC,CAAA;IACD,uBAAuB,GAAG,IAAI,CAAA;AAChC,CAAC;AAED,SAAS,wBAAwB;IAC/B,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,CAAA;IACzC,OAAO,CAAC,YAAY,GAAG,UAAU,GAAG,IAAI;QACtC,OAAO,CAAC,KAAK,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;QACvC,iBAAiB,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAA;IACxD,CAAC,CAAA;IACD,0BAA0B,GAAG,IAAI,CAAA;AACnC,CAAC"}
|
|
@@ -5,7 +5,7 @@ const rxjs_1 = require("rxjs");
|
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
function observeUrlChanges() {
|
|
7
7
|
let url = document.URL;
|
|
8
|
-
return rxjs_1.animationFrames().pipe(operators_1.filter(() => url !== document.URL), operators_1.tap(() => url = document.URL), operators_1.map(() => undefined));
|
|
8
|
+
return (0, rxjs_1.animationFrames)().pipe((0, operators_1.filter)(() => url !== document.URL), (0, operators_1.tap)(() => url = document.URL), (0, operators_1.map)(() => undefined));
|
|
9
9
|
}
|
|
10
10
|
exports.observeUrlChanges = observeUrlChanges;
|
|
11
11
|
//# sourceMappingURL=observe-url-changes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observe-url-changes.js","sourceRoot":"","sources":["../../src/observe-url-changes.ts"],"names":[],"mappings":";;;AAAA,+BAAkD;AAClD,8CAAiD;AAEjD,SAAgB,iBAAiB;IAC/B,IAAI,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAA;IACtB,OAAO,sBAAe,
|
|
1
|
+
{"version":3,"file":"observe-url-changes.js","sourceRoot":"","sources":["../../src/observe-url-changes.ts"],"names":[],"mappings":";;;AAAA,+BAAkD;AAClD,8CAAiD;AAEjD,SAAgB,iBAAiB;IAC/B,IAAI,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAA;IACtB,OAAO,IAAA,sBAAe,GAAE,CAAC,IAAI,CAC3B,IAAA,kBAAM,EAAC,GAAG,EAAE,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,EAClC,IAAA,eAAG,EAAC,GAAG,EAAE,CAAC,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,EAC7B,IAAA,eAAG,EAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CACrB,CAAA;AACH,CAAC;AAPD,8CAOC"}
|
|
@@ -5,10 +5,10 @@ const from_mutation_observer_1 = require("./utils/from-mutation-observer");
|
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
const chaining_1 = require("iterable-operator/lib/es2015/style/chaining");
|
|
7
7
|
function observeAdditionOfDescendantNodes(node) {
|
|
8
|
-
return from_mutation_observer_1.fromMutationObserver(node, { childList: true, subtree: true }).pipe(operators_1.map(records => new chaining_1.IterableOperator(records)
|
|
8
|
+
return (0, from_mutation_observer_1.fromMutationObserver)(node, { childList: true, subtree: true }).pipe((0, operators_1.map)(records => new chaining_1.IterableOperator(records)
|
|
9
9
|
.map(x => x.addedNodes)
|
|
10
10
|
.flatten()
|
|
11
|
-
.toArray()), operators_1.filter(addedNodes => addedNodes.length > 0));
|
|
11
|
+
.toArray()), (0, operators_1.filter)(addedNodes => addedNodes.length > 0));
|
|
12
12
|
}
|
|
13
13
|
exports.observeAdditionOfDescendantNodes = observeAdditionOfDescendantNodes;
|
|
14
14
|
//# 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,0EAA8E;AAE9E,SAAgB,gCAAgC,CAAC,IAAU;IACzD,OAAO,6CAAoB,
|
|
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,0EAA8E;AAE9E,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,2BAAgB,CAAC,OAAO,CAAC;SACzC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC;SACtB,OAAO,EAAQ;SACf,OAAO,EAAE,CACX,EACD,IAAA,kBAAM,EAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAC5C,CAAA;AACH,CAAC;AAZD,4EAYC"}
|
|
@@ -5,10 +5,10 @@ const from_mutation_observer_1 = require("./utils/from-mutation-observer");
|
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
const chaining_1 = require("iterable-operator/lib/es2015/style/chaining");
|
|
7
7
|
function observeRemovalOfDescendantNodes(node) {
|
|
8
|
-
return from_mutation_observer_1.fromMutationObserver(node, { childList: true, subtree: true }).pipe(operators_1.map(records => new chaining_1.IterableOperator(records)
|
|
8
|
+
return (0, from_mutation_observer_1.fromMutationObserver)(node, { childList: true, subtree: true }).pipe((0, operators_1.map)(records => new chaining_1.IterableOperator(records)
|
|
9
9
|
.map(x => x.removedNodes)
|
|
10
10
|
.flatten()
|
|
11
|
-
.toArray()), operators_1.filter(removedNodes => removedNodes.length > 0));
|
|
11
|
+
.toArray()), (0, operators_1.filter)(removedNodes => removedNodes.length > 0));
|
|
12
12
|
}
|
|
13
13
|
exports.observeRemovalOfDescendantNodes = observeRemovalOfDescendantNodes;
|
|
14
14
|
//# 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,0EAA8E;AAE9E,SAAgB,+BAA+B,CAAC,IAAU;IACxD,OAAO,6CAAoB,
|
|
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,0EAA8E;AAE9E,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,2BAAgB,CAAC,OAAO,CAAC;SACzC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC;SACxB,OAAO,EAAQ;SACf,OAAO,EAAE,CACX,EACD,IAAA,kBAAM,EAAC,YAAY,CAAC,EAAE,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAChD,CAAA;AACH,CAAC;AAZD,0EAYC"}
|
|
@@ -8,21 +8,23 @@ const replaceStateHooks = new Set();
|
|
|
8
8
|
let pushStateHookRegistered = false;
|
|
9
9
|
let replaceStateHookRegistered = false;
|
|
10
10
|
function observeStateChanges() {
|
|
11
|
-
return rxjs_1.merge(observePushState(), observeReplaceState(), rxjs_1.fromEvent(window, 'popstate')).pipe(operators_1.map(_ => undefined));
|
|
11
|
+
return (0, rxjs_1.merge)(observePushState(), observeReplaceState(), (0, rxjs_1.fromEvent)(window, 'popstate')).pipe((0, operators_1.map)(_ => undefined));
|
|
12
12
|
}
|
|
13
13
|
exports.observeStateChanges = observeStateChanges;
|
|
14
14
|
function observePushState() {
|
|
15
15
|
return new rxjs_1.Observable(observer => {
|
|
16
|
-
if (!pushStateHookRegistered)
|
|
16
|
+
if (!pushStateHookRegistered) {
|
|
17
17
|
registerPushStateHook();
|
|
18
|
+
}
|
|
18
19
|
pushStateHooks.add(observer);
|
|
19
20
|
return () => pushStateHooks.delete(observer);
|
|
20
21
|
});
|
|
21
22
|
}
|
|
22
23
|
function observeReplaceState() {
|
|
23
24
|
return new rxjs_1.Observable(observer => {
|
|
24
|
-
if (!replaceStateHookRegistered)
|
|
25
|
+
if (!replaceStateHookRegistered) {
|
|
25
26
|
registerReplaceStateHook();
|
|
27
|
+
}
|
|
26
28
|
replaceStateHooks.add(observer);
|
|
27
29
|
return () => replaceStateHooks.delete(observer);
|
|
28
30
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observe-state-changes.js","sourceRoot":"","sources":["../../src/observe-state-changes.ts"],"names":[],"mappings":";;;AAAA,+BAA+D;AAC/D,8CAAoC;AAEpC,MAAM,cAAc,GAAG,IAAI,GAAG,EAAoB,CAAA;AAClD,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAoB,CAAA;AACrD,IAAI,uBAAuB,GAAG,KAAK,CAAA;AACnC,IAAI,0BAA0B,GAAG,KAAK,CAAA;AAEtC,SAAgB,mBAAmB;IACjC,OAAO,YAAK,
|
|
1
|
+
{"version":3,"file":"observe-state-changes.js","sourceRoot":"","sources":["../../src/observe-state-changes.ts"],"names":[],"mappings":";;;AAAA,+BAA+D;AAC/D,8CAAoC;AAEpC,MAAM,cAAc,GAAG,IAAI,GAAG,EAAoB,CAAA;AAClD,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAoB,CAAA;AACrD,IAAI,uBAAuB,GAAG,KAAK,CAAA;AACnC,IAAI,0BAA0B,GAAG,KAAK,CAAA;AAEtC,SAAgB,mBAAmB;IACjC,OAAO,IAAA,YAAK,EACV,gBAAgB,EAAE,EAClB,mBAAmB,EAAE,EACrB,IAAA,gBAAS,EAAC,MAAM,EAAE,UAAU,CAAC,CAC9B,CAAC,IAAI,CACJ,IAAA,eAAG,EAAC,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,CACpB,CAAA;AACH,CAAC;AARD,kDAQC;AAED,SAAS,gBAAgB;IACvB,OAAO,IAAI,iBAAU,CAAC,QAAQ,CAAC,EAAE;QAC/B,IAAI,CAAC,uBAAuB,EAAE;YAC5B,qBAAqB,EAAE,CAAA;SACxB;QACD,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;QAC5B,OAAO,GAAG,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;IAC9C,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,SAAS,mBAAmB;IAC1B,OAAO,IAAI,iBAAU,CAAC,QAAQ,CAAC,EAAE;QAC/B,IAAI,CAAC,0BAA0B,EAAE;YAC/B,wBAAwB,EAAE,CAAA;SAC3B;QACD,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;QAC/B,OAAO,GAAG,EAAE,CAAC,iBAAiB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;IACjD,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,SAAS,qBAAqB;IAC5B,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAA;IACnC,OAAO,CAAC,SAAS,GAAG,UAAU,GAAG,IAAI;QACnC,OAAO,CAAC,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;QACpC,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAA;IACrD,CAAC,CAAA;IACD,uBAAuB,GAAG,IAAI,CAAA;AAChC,CAAC;AAED,SAAS,wBAAwB;IAC/B,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,CAAA;IACzC,OAAO,CAAC,YAAY,GAAG,UAAU,GAAG,IAAI;QACtC,OAAO,CAAC,KAAK,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;QACvC,iBAAiB,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAA;IACxD,CAAC,CAAA;IACD,0BAA0B,GAAG,IAAI,CAAA;AACnC,CAAC"}
|
|
@@ -5,7 +5,7 @@ const rxjs_1 = require("rxjs");
|
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
function observeUrlChanges() {
|
|
7
7
|
let url = document.URL;
|
|
8
|
-
return rxjs_1.animationFrames().pipe(operators_1.filter(() => url !== document.URL), operators_1.tap(() => url = document.URL), operators_1.map(() => undefined));
|
|
8
|
+
return (0, rxjs_1.animationFrames)().pipe((0, operators_1.filter)(() => url !== document.URL), (0, operators_1.tap)(() => url = document.URL), (0, operators_1.map)(() => undefined));
|
|
9
9
|
}
|
|
10
10
|
exports.observeUrlChanges = observeUrlChanges;
|
|
11
11
|
//# sourceMappingURL=observe-url-changes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observe-url-changes.js","sourceRoot":"","sources":["../../src/observe-url-changes.ts"],"names":[],"mappings":";;;AAAA,+BAAkD;AAClD,8CAAiD;AAEjD,SAAgB,iBAAiB;IAC/B,IAAI,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAA;IACtB,OAAO,sBAAe,
|
|
1
|
+
{"version":3,"file":"observe-url-changes.js","sourceRoot":"","sources":["../../src/observe-url-changes.ts"],"names":[],"mappings":";;;AAAA,+BAAkD;AAClD,8CAAiD;AAEjD,SAAgB,iBAAiB;IAC/B,IAAI,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAA;IACtB,OAAO,IAAA,sBAAe,GAAE,CAAC,IAAI,CAC3B,IAAA,kBAAM,EAAC,GAAG,EAAE,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,EAClC,IAAA,eAAG,EAAC,GAAG,EAAE,CAAC,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,EAC7B,IAAA,eAAG,EAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CACrB,CAAA;AACH,CAAC;AAPD,8CAOC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blackglory/observe",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "A module for observing things happening.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"DOM"
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
],
|
|
12
12
|
"main": "lib/es2018/index.js",
|
|
13
13
|
"types": "lib/es2018/index.d.ts",
|
|
14
|
+
"sideEffects": false,
|
|
14
15
|
"repository": "git@github.com:BlackGlory/observe.git",
|
|
15
16
|
"author": "BlackGlory <woshenmedoubuzhidao@blackglory.me>",
|
|
16
17
|
"license": "MIT",
|
|
@@ -39,35 +40,34 @@
|
|
|
39
40
|
}
|
|
40
41
|
},
|
|
41
42
|
"devDependencies": {
|
|
42
|
-
"@blackglory/jest-matchers": "^0.1
|
|
43
|
-
"@blackglory/wait-for": "^0.
|
|
44
|
-
"@commitlint/cli": "^
|
|
45
|
-
"@commitlint/config-conventional": "^
|
|
46
|
-
"@rollup/plugin-commonjs": "^
|
|
43
|
+
"@blackglory/jest-matchers": "^0.2.1",
|
|
44
|
+
"@blackglory/wait-for": "^0.4.1",
|
|
45
|
+
"@commitlint/cli": "^16.0.1",
|
|
46
|
+
"@commitlint/config-conventional": "^16.0.0",
|
|
47
|
+
"@rollup/plugin-commonjs": "^21.0.1",
|
|
47
48
|
"@rollup/plugin-json": "^4.1.0",
|
|
48
|
-
"@rollup/plugin-node-resolve": "^13.
|
|
49
|
-
"@rollup/plugin-replace": "^
|
|
50
|
-
"@rollup/plugin-typescript": "^8.
|
|
51
|
-
"@types/jest": "^
|
|
52
|
-
"@
|
|
53
|
-
"@typescript-eslint/
|
|
54
|
-
"
|
|
55
|
-
"eslint": "^7.26.0",
|
|
49
|
+
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
50
|
+
"@rollup/plugin-replace": "^3.0.1",
|
|
51
|
+
"@rollup/plugin-typescript": "^8.3.0",
|
|
52
|
+
"@types/jest": "^27.4.0",
|
|
53
|
+
"@typescript-eslint/eslint-plugin": "^5.9.0",
|
|
54
|
+
"@typescript-eslint/parser": "^5.9.0",
|
|
55
|
+
"eslint": "^8.6.0",
|
|
56
56
|
"husky": "^4.3.6",
|
|
57
|
-
"jest": "^
|
|
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.63.0",
|
|
61
61
|
"rollup-plugin-analyzer": "^4.0.0",
|
|
62
62
|
"rollup-plugin-terser": "^7.0.2",
|
|
63
|
-
"standard-version": "^9.3.
|
|
64
|
-
"ts-jest": "^
|
|
63
|
+
"standard-version": "^9.3.2",
|
|
64
|
+
"ts-jest": "^27.1.2",
|
|
65
65
|
"tscpaths": "^0.0.9",
|
|
66
|
-
"tslib": "^2.
|
|
67
|
-
"typescript": "^4.
|
|
66
|
+
"tslib": "^2.3.1",
|
|
67
|
+
"typescript": "^4.5.4"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"iterable-operator": "^0.14.
|
|
71
|
-
"rxjs": "^7.
|
|
70
|
+
"iterable-operator": "^0.14.5",
|
|
71
|
+
"rxjs": "^7.5.1"
|
|
72
72
|
}
|
|
73
73
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
|
-
|
|
5
|
-
### [0.1.1](https://github.com/BlackGlory/observe/compare/v0.1.0...v0.1.1) (2021-05-16)
|
|
6
|
-
|
|
7
|
-
## 0.1.0 (2021-04-24)
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
### Features
|
|
11
|
-
|
|
12
|
-
* init ([99a95b0](https://github.com/BlackGlory/observe/commit/99a95b0c5cc9d638f861a2952c940fd56775caf8))
|