@braccato/core 1.16.2 → 1.16.4
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/engine.js +7 -0
- package/dist/styles/instrumental.css +0 -5
- package/package.json +1 -1
package/dist/engine.js
CHANGED
|
@@ -2604,6 +2604,10 @@ function applyScrollPadding(engine) {
|
|
|
2604
2604
|
const tabRenderer = engine.host.getScrollElement();
|
|
2605
2605
|
if (!lyricsElement || !tabRenderer)
|
|
2606
2606
|
return;
|
|
2607
|
+
if (hasNoLyricsPlaceholder(engine)) {
|
|
2608
|
+
setScrollPadding(engine, lyricsElement, { top: 0, bottom: 0 });
|
|
2609
|
+
return;
|
|
2610
|
+
}
|
|
2607
2611
|
const tabRendererHeight = tabRenderer.getBoundingClientRect().height;
|
|
2608
2612
|
const scrollPosOffsetRatio = getTargetScrollRatio(engine, lyricsElement);
|
|
2609
2613
|
const currentPaddingBottom = Number.parseFloat(engine.window.getComputedStyle(lyricsElement).paddingBottom) || 0;
|
|
@@ -2629,6 +2633,9 @@ function applyScrollPadding(engine) {
|
|
|
2629
2633
|
lastLineHeight: lastLyricBounds?.height ?? 0,
|
|
2630
2634
|
footerHeight: footer ? getRelativeLayoutBounds(lyricsElement, footer).height : 0,
|
|
2631
2635
|
});
|
|
2636
|
+
setScrollPadding(engine, lyricsElement, { top, bottom });
|
|
2637
|
+
}
|
|
2638
|
+
function setScrollPadding(engine, lyricsElement, { top, bottom }) {
|
|
2632
2639
|
engine.document.documentElement.style.setProperty("--blyrics-padding-top", top + "px");
|
|
2633
2640
|
engine.document.documentElement.style.setProperty("--blyrics-padding-bottom", bottom + "px");
|
|
2634
2641
|
// Inline, because a theme's own `.blyrics-container { padding }` is appended after the package's
|
|
@@ -57,11 +57,6 @@
|
|
|
57
57
|
transform: translateY(-4%);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
.blyrics--paused .blyrics--wave-clip {
|
|
61
|
-
transition-duration: 100000000s !important;
|
|
62
|
-
transform: translateY(100%) !important;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
60
|
.blyrics--wave-path {
|
|
66
61
|
/* Set the transform origin to the bottom of the wave shape (y=4). */
|
|
67
62
|
transform-box: fill-box;
|