@braccato/core 1.12.3 → 1.12.5
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 +1 -1
- package/dist/inject.d.ts +1 -0
- package/dist/inject.js +4 -2
- package/dist/styles/lyrics.css +2 -2
- package/package.json +1 -1
package/dist/engine.js
CHANGED
|
@@ -917,7 +917,7 @@ function startWordAnimations(engine, part, config, currentTime, appliedTimingOff
|
|
|
917
917
|
fill: "forwards",
|
|
918
918
|
};
|
|
919
919
|
const wobbleStartMs = correctedAnimationTimeMs(wordTimeMs, appliedTimingOffsetMs, config.word.wobbleDurationMs);
|
|
920
|
-
for (const wordElement of
|
|
920
|
+
for (const wordElement of part.wobbleElements) {
|
|
921
921
|
const animation = trackLyricAnimationTiming(engine, wordElement.animate(wobbleKeyframes, wobbleOptions), {
|
|
922
922
|
appliedTimingOffsetMs,
|
|
923
923
|
offsetMs: 0,
|
package/dist/inject.d.ts
CHANGED
package/dist/inject.js
CHANGED
|
@@ -64,7 +64,7 @@ export function deriveSyncType(lyrics) {
|
|
|
64
64
|
return "richsync";
|
|
65
65
|
return lyrics.every(item => item.startTimeMs === 0) ? "none" : "synced";
|
|
66
66
|
}
|
|
67
|
-
function newPartData(part, span, highlight, letterElements, highlightLetterElements) {
|
|
67
|
+
function newPartData(part, span, highlight, wobbleElements, letterElements, highlightLetterElements) {
|
|
68
68
|
return {
|
|
69
69
|
time: part.startTimeMs / 1000,
|
|
70
70
|
duration: part.durationMs / 1000,
|
|
@@ -72,6 +72,7 @@ function newPartData(part, span, highlight, letterElements, highlightLetterEleme
|
|
|
72
72
|
highlightElement: highlight,
|
|
73
73
|
letterElements,
|
|
74
74
|
highlightLetterElements,
|
|
75
|
+
wobbleElements,
|
|
75
76
|
animations: [],
|
|
76
77
|
wordState: WORD_STATE_UPCOMING,
|
|
77
78
|
};
|
|
@@ -278,7 +279,8 @@ function createWordGroup(doc, group, lineData) {
|
|
|
278
279
|
if (token.kind === "space")
|
|
279
280
|
continue;
|
|
280
281
|
const { span, highlight, letters, highlightLetters } = createTimedWordSpan(doc, token.part, wrapThreshold, perLetter);
|
|
281
|
-
|
|
282
|
+
const wobbleElements = lyricGroup.childNodes.length === 0 ? [lyricGroup, highlightGroup] : [];
|
|
283
|
+
lineData.parts.push(newPartData(token.part, span, highlight, wobbleElements, letters, highlightLetters));
|
|
282
284
|
lyricGroup.appendChild(span);
|
|
283
285
|
highlightGroup.appendChild(highlight);
|
|
284
286
|
}
|
package/dist/styles/lyrics.css
CHANGED
|
@@ -224,7 +224,7 @@
|
|
|
224
224
|
font-family: var(--blyrics-translated-font-family, var(--blyrics-font-family, var(--blyrics-default-font-family)));
|
|
225
225
|
font-size: var(--blyrics-translated-font-size);
|
|
226
226
|
font-weight: var(--blyrics-translated-font-weight);
|
|
227
|
-
line-height:
|
|
227
|
+
line-height: normal;
|
|
228
228
|
margin-top: 8px;
|
|
229
229
|
max-width: 100%;
|
|
230
230
|
text-align: inherit;
|
|
@@ -275,7 +275,7 @@
|
|
|
275
275
|
box-sizing: border-box;
|
|
276
276
|
display: block;
|
|
277
277
|
font-size: calc(var(--blyrics-translated-font-size) / 1.25);
|
|
278
|
-
padding: 0.
|
|
278
|
+
padding: 0.25rem 0.75rem;
|
|
279
279
|
width: fit-content;
|
|
280
280
|
}
|
|
281
281
|
|