@hyperframes/studio 0.8.110 → 0.8.111

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperframes/studio",
3
- "version": "0.8.110",
3
+ "version": "0.8.111",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
@@ -60,12 +60,12 @@
60
60
  "dockview-react": "8.3.1",
61
61
  "gsap": "^3.13.0",
62
62
  "mediabunny": "^1.45.3",
63
- "@hyperframes/parsers": "0.8.110",
64
- "@hyperframes/player": "0.8.110",
65
- "@hyperframes/core": "0.8.110",
66
- "@hyperframes/studio-server": "0.8.110",
67
- "@hyperframes/shader-transitions": "0.8.110",
68
- "@hyperframes/sdk": "0.8.110"
63
+ "@hyperframes/player": "0.8.111",
64
+ "@hyperframes/core": "0.8.111",
65
+ "@hyperframes/shader-transitions": "0.8.111",
66
+ "@hyperframes/parsers": "0.8.111",
67
+ "@hyperframes/sdk": "0.8.111",
68
+ "@hyperframes/studio-server": "0.8.111"
69
69
  },
70
70
  "devDependencies": {
71
71
  "@tailwindcss/vite": "^4.3.3",
@@ -81,7 +81,7 @@
81
81
  "vite": "^6.4.2",
82
82
  "vitest": "^4.1.11",
83
83
  "zustand": "^5.0.0",
84
- "@hyperframes/producer": "0.8.110"
84
+ "@hyperframes/producer": "0.8.111"
85
85
  },
86
86
  "peerDependencies": {
87
87
  "react": "19",
package/src/index.ts CHANGED
@@ -148,6 +148,7 @@ export type {
148
148
  // A host's own waitForPendingDomEditSaves must also call this, or undo/redo
149
149
  // can race a write still in flight (see useTrackPendingTimelineEdit.ts).
150
150
  export { flushStudioPendingEdits } from "./utils/studioPendingEdits";
151
+ export { revertNewestStudioPendingEdit } from "./utils/studioPendingEdits";
151
152
  export type { StudioPendingEditsDrainResult } from "./utils/studioPendingEdits";
152
153
  export type {
153
154
  CanEditTimelineElement,
@@ -10,6 +10,7 @@ import {
10
10
  trackedStudioEdit,
11
11
  } from "./studioPendingEdits";
12
12
  import { StudioFileConflictError } from "./studioSaveDiagnostics";
13
+ import { revertNewestStudioPendingEdit as hostRevert } from "../index";
13
14
 
14
15
  describe("studio pending edit flush", () => {
15
16
  it("waits for mounted panels to persist pending local edits", async () => {
@@ -277,3 +278,20 @@ describe("a pending edit whose start throws", () => {
277
278
  expect(hasStudioPendingEdits()).toBe(false);
278
279
  });
279
280
  });
281
+
282
+ describe("the package's public revert", () => {
283
+ it("lets a host's own undo key paint a still-saving move back at once", async () => {
284
+ let left = "120px";
285
+ const edit = beginStudioPendingEdit(() => ((left = "0px"), () => void (left = "120px")));
286
+ try {
287
+ const putBack = hostRevert();
288
+ expect(left).toBe("0px");
289
+ expect(hostRevert()).toBeNull();
290
+ putBack?.();
291
+ expect(left).toBe("120px");
292
+ } finally {
293
+ edit.settle();
294
+ await flushStudioPendingEdits();
295
+ }
296
+ });
297
+ });