reifyui 0.10.1 → 0.10.2

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.cjs CHANGED
@@ -4602,11 +4602,14 @@ function Clip({
4602
4602
  const tileW = Math.round((LANE_H - CLIP_INSET * 2) * (16 / 9));
4603
4603
  const startTrim = (e, edge) => {
4604
4604
  if (!onTrim || !known) return;
4605
+ const room = clip.headroom || {};
4606
+ const outward = Math.max(0, Number(edge === "end" ? room.end : room.start) || 0);
4607
+ const maxDur = clip.duration + outward;
4605
4608
  beginGesture(e, {
4606
4609
  kind: "trim",
4607
4610
  snapTimes,
4608
4611
  preview: (t) => {
4609
- const dur = edge === "end" ? clamp(t - t0, TL_MIN_CLIP_S, clip.duration) : clamp(t0 + clip.duration - t, TL_MIN_CLIP_S, clip.duration);
4612
+ const dur = edge === "end" ? clamp(t - t0, TL_MIN_CLIP_S, maxDur) : clamp(t0 + clip.duration - t, TL_MIN_CLIP_S, maxDur);
4610
4613
  const nextW = dur * pps;
4611
4614
  const nextLeft = edge === "end" ? x : x + (w - nextW);
4612
4615
  return {
@@ -4618,7 +4621,7 @@ function Clip({
4618
4621
  };
4619
4622
  },
4620
4623
  commit: (t) => {
4621
- const dur = edge === "end" ? clamp(t - t0, TL_MIN_CLIP_S, clip.duration) : clamp(t0 + clip.duration - t, TL_MIN_CLIP_S, clip.duration);
4624
+ const dur = edge === "end" ? clamp(t - t0, TL_MIN_CLIP_S, maxDur) : clamp(t0 + clip.duration - t, TL_MIN_CLIP_S, maxDur);
4622
4625
  if (Math.abs(dur - clip.duration) > 1e-3) onTrim(clip, edge, dur, track);
4623
4626
  }
4624
4627
  });