@shotstack/shotstack-studio 2.11.7 → 2.12.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.d.ts CHANGED
@@ -256,6 +256,10 @@ export declare class Edit {
256
256
  deleteTrack(trackIdx: number): void;
257
257
  undo(): Promise<void>;
258
258
  redo(): Promise<void>;
259
+ /** True when there is a command to undo (the history pointer is not before the first command). */
260
+ get canUndo(): boolean;
261
+ /** True when there is a command ahead to redo (the history pointer is not at the latest command). */
262
+ get canRedo(): boolean;
259
263
  /**
260
264
  * Add a command to history without executing it.
261
265
  */
@@ -145,6 +145,10 @@ export declare class Edit {
145
145
  deleteTrack(trackIdx: number): void;
146
146
  undo(): Promise<void>;
147
147
  redo(): Promise<void>;
148
+ /** True when there is a command to undo (the history pointer is not before the first command). */
149
+ get canUndo(): boolean;
150
+ /** True when there is a command ahead to redo (the history pointer is not at the latest command). */
151
+ get canRedo(): boolean;
148
152
  /**
149
153
  * Add a command to history without executing it.
150
154
  */
@@ -42855,6 +42855,14 @@ class Da {
42855
42855
  }
42856
42856
  });
42857
42857
  }
42858
+ /** True when there is a command to undo (the history pointer is not before the first command). */
42859
+ get canUndo() {
42860
+ return this.commandIndex >= 0;
42861
+ }
42862
+ /** True when there is a command ahead to redo (the history pointer is not at the latest command). */
42863
+ get canRedo() {
42864
+ return this.commandIndex < this.commandHistory.length - 1;
42865
+ }
42858
42866
  /** @internal */
42859
42867
  setUpdatedClip(e, r = null, n = null) {
42860
42868
  const i = e.layer - 1, a = this.tracks[i], s = a ? a.indexOf(e) : -1, o = new i0(r, n, {