@braccato/core 1.16.2 → 1.16.3

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.
Files changed (2) hide show
  1. package/dist/engine.js +7 -0
  2. 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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@braccato/core",
3
- "version": "1.16.2",
3
+ "version": "1.16.3",
4
4
  "description": "Synchronized lyrics renderer with word-by-word animations",
5
5
  "type": "module",
6
6
  "license": "MIT",