@waveform-playlist/ui-components 9.4.1 → 9.5.0
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/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -24
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -894,7 +894,7 @@ var Channel = (props) => {
|
|
|
894
894
|
const { canvasRef, canvasMapRef } = useChunkedCanvasRefs();
|
|
895
895
|
const clipOriginX = useClipViewportOrigin();
|
|
896
896
|
const visibleChunkIndices = useVisibleChunkIndices(length, import_core.MAX_CANVAS_WIDTH, clipOriginX);
|
|
897
|
-
(0, import_react4.
|
|
897
|
+
(0, import_react4.useLayoutEffect)(() => {
|
|
898
898
|
const step = barWidth + barGap;
|
|
899
899
|
for (const [canvasIdx, canvas] of canvasMapRef.current.entries()) {
|
|
900
900
|
const globalPixelOffset = canvasIdx * import_core.MAX_CANVAS_WIDTH;
|
|
@@ -1466,7 +1466,7 @@ var PianoRollChannel = ({
|
|
|
1466
1466
|
return { minMidi: Math.max(0, min - 1), maxMidi: Math.min(127, max + 1) };
|
|
1467
1467
|
}, [midiNotes]);
|
|
1468
1468
|
const color = isSelected ? selectedNoteColor : noteColor;
|
|
1469
|
-
(0, import_react8.
|
|
1469
|
+
(0, import_react8.useLayoutEffect)(() => {
|
|
1470
1470
|
const noteRange = maxMidi - minMidi + 1;
|
|
1471
1471
|
const noteHeight = Math.max(2, waveHeight / noteRange);
|
|
1472
1472
|
const pixelsPerSecond = sampleRate / samplesPerPixel;
|
|
@@ -2556,7 +2556,7 @@ var SpectrogramChannel = ({
|
|
|
2556
2556
|
registeredIdsRef.current = [];
|
|
2557
2557
|
};
|
|
2558
2558
|
}, []);
|
|
2559
|
-
(0, import_react20.
|
|
2559
|
+
(0, import_react20.useLayoutEffect)(() => {
|
|
2560
2560
|
if (isWorkerMode || !data) return;
|
|
2561
2561
|
const {
|
|
2562
2562
|
frequencyBinCount,
|