@ethlete/core 5.0.0-next.1 → 5.0.0-next.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 +10 -0
- package/fesm2022/ethlete-core.mjs +18 -5
- package/fesm2022/ethlete-core.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ethlete-core.d.ts +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @ethlete/core
|
|
2
2
|
|
|
3
|
+
## 5.0.0-next.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`95e656d`](https://github.com/ethlete-io/ethdk/commit/95e656d036368a48cbd17a399f7c0c61c49ab0fa) Thanks [@TomTomB](https://github.com/TomTomB)! - Fix angular root element discovery failing if its not there during the first check
|
|
8
|
+
|
|
9
|
+
- [`95e656d`](https://github.com/ethlete-io/ethdk/commit/95e656d036368a48cbd17a399f7c0c61c49ab0fa) Thanks [@TomTomB](https://github.com/TomTomB)! - Fix animated lifecycle skipping interrupted transitions
|
|
10
|
+
|
|
11
|
+
- [`95e656d`](https://github.com/ethlete-io/ethdk/commit/95e656d036368a48cbd17a399f7c0c61c49ab0fa) Thanks [@TomTomB](https://github.com/TomTomB)! - Fix scrollbar dimensions signal not returning the actual scrollbar dimensions
|
|
12
|
+
|
|
3
13
|
## 5.0.0-next.1
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -1565,9 +1565,18 @@ const injectScrollbarDimensions = memoizeSignal(() => {
|
|
|
1565
1565
|
scrollbarRuler.style.overflow = 'scroll';
|
|
1566
1566
|
scrollbarRuler.style.position = 'absolute';
|
|
1567
1567
|
scrollbarRuler.style.top = '-9999px';
|
|
1568
|
+
scrollbarRuler.style.scrollbarWidth = getComputedStyle(document.documentElement).scrollbarWidth;
|
|
1568
1569
|
renderer.appendChild(document.body, scrollbarRuler);
|
|
1569
1570
|
const scrollContainerDimensions = signalElementDimensions(scrollbarRuler);
|
|
1570
|
-
return
|
|
1571
|
+
return computed(() => {
|
|
1572
|
+
const client = scrollContainerDimensions().client;
|
|
1573
|
+
if (!client)
|
|
1574
|
+
return null;
|
|
1575
|
+
return {
|
|
1576
|
+
width: Math.max(0, 100 - client.width),
|
|
1577
|
+
height: Math.max(0, 100 - client.height),
|
|
1578
|
+
};
|
|
1579
|
+
});
|
|
1571
1580
|
});
|
|
1572
1581
|
|
|
1573
1582
|
let hasWrittenScrollbarSizes = false;
|
|
@@ -1588,7 +1597,7 @@ const writeScrollbarSizeToCssVariables = () => {
|
|
|
1588
1597
|
const renderer = injectRenderer();
|
|
1589
1598
|
const scrollbarDimensions = injectScrollbarDimensions();
|
|
1590
1599
|
effect(() => {
|
|
1591
|
-
const dimensions = scrollbarDimensions()
|
|
1600
|
+
const dimensions = scrollbarDimensions();
|
|
1592
1601
|
if (!dimensions)
|
|
1593
1602
|
return;
|
|
1594
1603
|
renderer.setCssProperties(document.documentElement, {
|
|
@@ -2290,12 +2299,16 @@ const scrollToElement = (options) => {
|
|
|
2290
2299
|
const [, injectAngularRootElement] = createRootProvider(() => {
|
|
2291
2300
|
const appRef = inject(ApplicationRef);
|
|
2292
2301
|
const rootElement = signal(null, ...(ngDevMode ? [{ debugName: "rootElement" }] : []));
|
|
2293
|
-
|
|
2302
|
+
const poll = () => {
|
|
2294
2303
|
const appComponents = appRef.components;
|
|
2295
2304
|
if (appComponents.length > 0) {
|
|
2296
2305
|
rootElement.set(appComponents[0]?.location.nativeElement);
|
|
2297
2306
|
}
|
|
2298
|
-
|
|
2307
|
+
else {
|
|
2308
|
+
setTimeout(poll, 25);
|
|
2309
|
+
}
|
|
2310
|
+
};
|
|
2311
|
+
setTimeout(poll);
|
|
2299
2312
|
return rootElement;
|
|
2300
2313
|
});
|
|
2301
2314
|
|
|
@@ -2838,7 +2851,7 @@ class AnimatedLifecycleDirective {
|
|
|
2838
2851
|
const { removeClasses, addClasses, expectedState, transitionId, onComplete, cancelSignal } = config;
|
|
2839
2852
|
this.removeClasses(...removeClasses);
|
|
2840
2853
|
addClasses.forEach((cls) => this.addClass(cls));
|
|
2841
|
-
|
|
2854
|
+
fromNextFrame()
|
|
2842
2855
|
.pipe(switchMap(() => this.animatable.isAnimating$), take(1), switchMap((isAnimating) => {
|
|
2843
2856
|
if (!isAnimating && this.state$.value === expectedState) {
|
|
2844
2857
|
return of({ cancelled: false, transitionId });
|