@waveform-playlist/ui-components 9.2.0 → 9.2.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/index.mjs CHANGED
@@ -2184,6 +2184,7 @@ function BeatsAndBarsProvider({
2184
2184
  bpm,
2185
2185
  timeSignature,
2186
2186
  snapTo,
2187
+ scaleMode = "beats",
2187
2188
  children
2188
2189
  }) {
2189
2190
  const [numerator, denominator] = timeSignature;
@@ -2195,10 +2196,11 @@ function BeatsAndBarsProvider({
2195
2196
  bpm,
2196
2197
  timeSignature: ts,
2197
2198
  snapTo,
2199
+ scaleMode,
2198
2200
  ticksPerBeat: tpBeat,
2199
2201
  ticksPerBar: tpBar
2200
2202
  };
2201
- }, [bpm, numerator, denominator, snapTo]);
2203
+ }, [bpm, numerator, denominator, snapTo, scaleMode]);
2202
2204
  return /* @__PURE__ */ jsx19(BeatsAndBarsContext.Provider, { value, children });
2203
2205
  }
2204
2206
  function useBeatsAndBars() {
@@ -2943,7 +2945,7 @@ var SmartScale = ({ renderTick }) => {
2943
2945
  const beatsAndBars = useBeatsAndBars();
2944
2946
  const tickData = useMemo4(() => {
2945
2947
  const widthX = secondsToPixels(duration / 1e3, samplesPerPixel, sampleRate);
2946
- if (beatsAndBars) {
2948
+ if (beatsAndBars && beatsAndBars.scaleMode === "beats") {
2947
2949
  const { bpm, timeSignature, ticksPerBar: tpBar, ticksPerBeat: tpBeat } = beatsAndBars;
2948
2950
  const canvasInfo2 = /* @__PURE__ */ new Map();
2949
2951
  const timeMarkersWithPositions2 = [];