@braccato/core 1.12.0 → 1.12.1
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/constants.d.ts +1 -0
- package/dist/constants.js +1 -0
- package/dist/styles/lyrics.css +5 -2
- package/dist/view.js +6 -2
- package/package.json +1 -1
package/dist/constants.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export declare const WORD_CLASS: "blyrics--word";
|
|
|
5
5
|
export declare const LETTER_CLASS: "blyrics--letter";
|
|
6
6
|
export declare const FOOTER_CLASS: "blyrics-footer";
|
|
7
7
|
export declare const CREDITS_CLASS: "blyrics-credits";
|
|
8
|
+
export declare const CREDITS_TEXT_CLASS: "blyrics-credits__text";
|
|
8
9
|
export declare const CREDITS_NAMES_CLASS: "blyrics-credits__names";
|
|
9
10
|
export declare const CURRENT_LYRICS_CLASS: "blyrics--active";
|
|
10
11
|
export declare const ANIMATING_CLASS: "blyrics--animating";
|
package/dist/constants.js
CHANGED
|
@@ -8,6 +8,7 @@ export const WORD_CLASS = "blyrics--word";
|
|
|
8
8
|
export const LETTER_CLASS = "blyrics--letter";
|
|
9
9
|
export const FOOTER_CLASS = "blyrics-footer";
|
|
10
10
|
export const CREDITS_CLASS = "blyrics-credits";
|
|
11
|
+
export const CREDITS_TEXT_CLASS = "blyrics-credits__text";
|
|
11
12
|
export const CREDITS_NAMES_CLASS = "blyrics-credits__names";
|
|
12
13
|
// -- Playback state --------------------------------------------
|
|
13
14
|
export const CURRENT_LYRICS_CLASS = "blyrics--active";
|
package/dist/styles/lyrics.css
CHANGED
|
@@ -245,12 +245,15 @@
|
|
|
245
245
|
|
|
246
246
|
.blyrics-credits {
|
|
247
247
|
color: var(--blyrics-ui-text-color);
|
|
248
|
-
font-size: var(--blyrics-credits-font-size);
|
|
249
248
|
opacity: var(--blyrics-credits-opacity);
|
|
250
249
|
transition: opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1);
|
|
251
250
|
}
|
|
252
251
|
|
|
253
|
-
.blyrics-
|
|
252
|
+
.blyrics-credits__text {
|
|
253
|
+
font-size: var(--blyrics-credits-font-size);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.blyrics-credits__text::before {
|
|
254
257
|
content: var(--blyrics-credits-label) " ";
|
|
255
258
|
}
|
|
256
259
|
|
package/dist/view.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// This is also the one place outside the engine that writes engine view state, because building the
|
|
10
10
|
// lines is where those values are first knowable: the container, the records, the sync type, the
|
|
11
11
|
// size they were measured at, and the scrolls to swallow before the view has settled.
|
|
12
|
-
import { CREDITS_CLASS, CREDITS_NAMES_CLASS, LINE_CLASS, LYRICS_CLASS, RTL_CLASS } from "./constants.js";
|
|
12
|
+
import { CREDITS_CLASS, CREDITS_NAMES_CLASS, CREDITS_TEXT_CLASS, LINE_CLASS, LYRICS_CLASS, RTL_CLASS, } from "./constants.js";
|
|
13
13
|
import { setupLineCullObserver } from "./engine.js";
|
|
14
14
|
import { addSeekHandler, applyDirection, buildLineSyncedParts, createLyricsLine, deriveSyncType, disableRichsync, findNearestAgent, hideCredits, isNearestLyricRtl, newLineData, } from "./inject.js";
|
|
15
15
|
import { createInstrumentalElement } from "./instrumental.js";
|
|
@@ -47,11 +47,15 @@ function formatSongwriters(names) {
|
|
|
47
47
|
function buildCredits(doc, songwriters) {
|
|
48
48
|
const credits = doc.createElement("div");
|
|
49
49
|
credits.className = CREDITS_CLASS;
|
|
50
|
+
// The smaller size lives on an inner block so the credits keep the lines' em, and with it their inset.
|
|
51
|
+
const text = doc.createElement("div");
|
|
52
|
+
text.className = CREDITS_TEXT_CLASS;
|
|
50
53
|
const names = doc.createElement("span");
|
|
51
54
|
names.className = CREDITS_NAMES_CLASS;
|
|
52
55
|
names.dir = "auto";
|
|
53
56
|
names.textContent = formatSongwriters(songwriters);
|
|
54
|
-
|
|
57
|
+
text.appendChild(names);
|
|
58
|
+
credits.appendChild(text);
|
|
55
59
|
return credits;
|
|
56
60
|
}
|
|
57
61
|
/**
|