@ethlete/core 4.29.1 → 4.29.2
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/CHANGELOG.md +6 -0
- package/fesm2022/ethlete-core.mjs +13 -6
- package/fesm2022/ethlete-core.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @ethlete/core
|
|
2
2
|
|
|
3
|
+
## 4.29.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`11dc4d3`](https://github.com/ethlete-io/ethdk/commit/11dc4d32d6ae7f3681c50029d3c7e2468cbec3a0) Thanks [@TomTomB](https://github.com/TomTomB)! - Raise an error if signal utils detect a non html element being used as an element
|
|
8
|
+
|
|
3
9
|
## 4.29.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -1699,12 +1699,19 @@ const buildElementSignal = (el) => {
|
|
|
1699
1699
|
else {
|
|
1700
1700
|
mElSignal = signal([coerceElement(el)]);
|
|
1701
1701
|
}
|
|
1702
|
-
const elSig = toSignal(toObservable(mElSignal).pipe(startWith(null), pairwise(), map(([previousElements, currentElements]) =>
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1702
|
+
const elSig = toSignal(toObservable(mElSignal).pipe(startWith(null), pairwise(), map(([previousElements, currentElements]) => {
|
|
1703
|
+
const previousEl = previousElements?.[0] ?? null;
|
|
1704
|
+
const currentEl = currentElements?.[0] ?? null;
|
|
1705
|
+
if (currentEl && !(currentEl instanceof HTMLElement)) {
|
|
1706
|
+
console.error('Received an element that is not an HTMLElement. You are probably using viewChild or contentChild on a component without the read option set to ElementRef. This will cause issues. Received:', currentEl);
|
|
1707
|
+
}
|
|
1708
|
+
return {
|
|
1709
|
+
previousElements: previousElements ?? [],
|
|
1710
|
+
currentElements: currentElements ?? [],
|
|
1711
|
+
currentElement: currentEl,
|
|
1712
|
+
previousElement: previousEl,
|
|
1713
|
+
};
|
|
1714
|
+
})), { initialValue: { currentElement: null, previousElement: null, previousElements: [], currentElements: [] } });
|
|
1708
1715
|
return computed(() => elSig(), {
|
|
1709
1716
|
equal: (a, b) => a.currentElement === b.currentElement &&
|
|
1710
1717
|
a.previousElement === b.previousElement &&
|