@twick/video-editor 0.14.5 → 0.14.6

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 CHANGED
@@ -17520,67 +17520,67 @@ This message will only show in development mode. It won't appear in production.
17520
17520
  setZoomLevel(zoomLevel - ZOOM_STEP);
17521
17521
  }
17522
17522
  }, [zoomLevel, setZoomLevel]);
17523
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `h-16 bg-gray-800 border-t border-gray-700 p-4 ${className}`, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
17524
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [
17525
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
17526
- /* @__PURE__ */ jsxRuntime.jsx(
17527
- "button",
17528
- {
17529
- onClick: handleDelete,
17530
- disabled: !selectedItem,
17531
- title: "Delete",
17532
- className: `btn btn-ghost ${!!selectedItem ? "text-red-400 hover:text-red-300" : "text-gray-500 cursor-not-allowed"}`,
17533
- children: /* @__PURE__ */ jsxRuntime.jsx(Trash2, { className: "w-5 h-5" })
17534
- }
17535
- ),
17536
- /* @__PURE__ */ jsxRuntime.jsx(
17537
- "button",
17538
- {
17539
- onClick: handleSplit,
17540
- disabled: !(selectedItem instanceof timeline.TrackElement),
17541
- title: "Split",
17542
- className: `btn btn-ghost ${selectedItem instanceof timeline.TrackElement ? "text-purple-400 hover:text-purple-300" : "text-gray-500 cursor-not-allowed"}`,
17543
- children: /* @__PURE__ */ jsxRuntime.jsx(Scissors, { className: "w-5 h-5" })
17544
- }
17545
- ),
17546
- /* @__PURE__ */ jsxRuntime.jsx(
17547
- UndoRedoControls,
17548
- {
17549
- canUndo,
17550
- canRedo,
17551
- onUndo,
17552
- onRedo
17553
- }
17554
- )
17555
- ] }),
17523
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `player-controls ${className}`, children: [
17524
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "edit-controls", children: [
17525
+ /* @__PURE__ */ jsxRuntime.jsx(
17526
+ "button",
17527
+ {
17528
+ onClick: handleDelete,
17529
+ disabled: !selectedItem,
17530
+ title: "Delete",
17531
+ className: `control-btn delete-btn ${!selectedItem ? "btn-disabled" : ""}`,
17532
+ children: /* @__PURE__ */ jsxRuntime.jsx(Trash2, { className: "icon-md" })
17533
+ }
17534
+ ),
17535
+ /* @__PURE__ */ jsxRuntime.jsx(
17536
+ "button",
17537
+ {
17538
+ onClick: handleSplit,
17539
+ disabled: !(selectedItem instanceof timeline.TrackElement),
17540
+ title: "Split",
17541
+ className: `control-btn split-btn ${!(selectedItem instanceof timeline.TrackElement) ? "btn-disabled" : ""}`,
17542
+ children: /* @__PURE__ */ jsxRuntime.jsx(Scissors, { className: "icon-md" })
17543
+ }
17544
+ ),
17545
+ /* @__PURE__ */ jsxRuntime.jsx(
17546
+ UndoRedoControls,
17547
+ {
17548
+ canUndo,
17549
+ canRedo,
17550
+ onUndo,
17551
+ onRedo
17552
+ }
17553
+ )
17554
+ ] }),
17555
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "playback-controls", children: [
17556
17556
  /* @__PURE__ */ jsxRuntime.jsx(
17557
17557
  "button",
17558
17558
  {
17559
17559
  onClick: togglePlayback,
17560
17560
  disabled: playerState === livePlayer.PLAYER_STATE.REFRESH,
17561
17561
  title: playerState === livePlayer.PLAYER_STATE.PLAYING ? "Pause" : playerState === livePlayer.PLAYER_STATE.REFRESH ? "Refreshing" : "Play",
17562
- className: "btn btn-ghost text-white",
17563
- children: playerState === livePlayer.PLAYER_STATE.PLAYING ? /* @__PURE__ */ jsxRuntime.jsx(Pause, { className: "w-6 h-6" }) : playerState === livePlayer.PLAYER_STATE.REFRESH ? /* @__PURE__ */ jsxRuntime.jsx(LoaderCircle, { className: "w-6 h-6 animate-spin" }) : /* @__PURE__ */ jsxRuntime.jsx(Play, { className: "w-6 h-6" })
17562
+ className: "control-btn play-pause-btn",
17563
+ children: playerState === livePlayer.PLAYER_STATE.PLAYING ? /* @__PURE__ */ jsxRuntime.jsx(Pause, { className: "icon-lg" }) : playerState === livePlayer.PLAYER_STATE.REFRESH ? /* @__PURE__ */ jsxRuntime.jsx(LoaderCircle, { className: "icon-lg animate-spin" }) : /* @__PURE__ */ jsxRuntime.jsx(Play, { className: "icon-lg" })
17564
17564
  }
17565
17565
  ),
17566
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-gray-300", children: [
17567
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium", children: formatTime(currentTime) }),
17568
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-500", children: "/" }),
17569
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: formatTime(duration) })
17566
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "time-display", children: [
17567
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "current-time", children: formatTime(currentTime) }),
17568
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "time-separator", children: "/" }),
17569
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "total-time", children: formatTime(duration) })
17570
17570
  ] })
17571
17571
  ] }),
17572
- setZoomLevel && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
17572
+ setZoomLevel && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "twick-track-zoom-container", children: [
17573
17573
  /* @__PURE__ */ jsxRuntime.jsx(
17574
17574
  "button",
17575
17575
  {
17576
17576
  onClick: handleZoomOut,
17577
17577
  disabled: zoomLevel <= MIN_ZOOM,
17578
17578
  title: "Zoom Out",
17579
- className: `btn btn-ghost ${zoomLevel > MIN_ZOOM ? "text-gray-300 hover:text-white" : "text-gray-500 cursor-not-allowed"}`,
17580
- children: /* @__PURE__ */ jsxRuntime.jsx(ZoomOut, { className: "w-5 h-5" })
17579
+ className: `control-btn ${zoomLevel <= MIN_ZOOM ? "btn-disabled" : ""}`,
17580
+ children: /* @__PURE__ */ jsxRuntime.jsx(ZoomOut, { className: "icon-md" })
17581
17581
  }
17582
17582
  ),
17583
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-sm text-gray-300 font-medium min-w-[3rem] text-center", children: [
17583
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "zoom-level", children: [
17584
17584
  Math.round(zoomLevel * 100),
17585
17585
  "%"
17586
17586
  ] }),
@@ -17590,12 +17590,12 @@ This message will only show in development mode. It won't appear in production.
17590
17590
  onClick: handleZoomIn,
17591
17591
  disabled: zoomLevel >= MAX_ZOOM,
17592
17592
  title: "Zoom In",
17593
- className: `btn btn-ghost ${zoomLevel < MAX_ZOOM ? "text-gray-300 hover:text-white" : "text-gray-500 cursor-not-allowed"}`,
17594
- children: /* @__PURE__ */ jsxRuntime.jsx(ZoomIn, { className: "w-5 h-5" })
17593
+ className: `control-btn ${zoomLevel >= MAX_ZOOM ? "btn-disabled" : ""}`,
17594
+ children: /* @__PURE__ */ jsxRuntime.jsx(ZoomIn, { className: "icon-md" })
17595
17595
  }
17596
17596
  )
17597
17597
  ] })
17598
- ] }) });
17598
+ ] });
17599
17599
  };
17600
17600
  const usePlayerControl = () => {
17601
17601
  const { playerState, setPlayerState } = livePlayer.useLivePlayerContext();