@ai-matrx/office 0.8.55 → 0.8.57

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/pdf.js CHANGED
@@ -1296,6 +1296,17 @@ function PdfWorkspace({ host, className }) {
1296
1296
  if (action === "undo" || action === "redo") e.stopPropagation();
1297
1297
  runAction(action);
1298
1298
  };
1299
+ useEffect4(() => {
1300
+ if (!read) return void 0;
1301
+ scrollerRef.current?.focus({ preventScroll: true });
1302
+ const onWindowKey = (e) => {
1303
+ if (e.key !== "Escape" || e.defaultPrevented) return;
1304
+ if (rootRef.current?.contains(e.target)) return;
1305
+ setRead(false);
1306
+ };
1307
+ window.addEventListener("keydown", onWindowKey);
1308
+ return () => window.removeEventListener("keydown", onWindowKey);
1309
+ }, [read]);
1299
1310
  const unsaved = dirty || markupPending > 0;
1300
1311
  const saveState = !online ? "Offline" : busy || markupBusy ? "Saving" : error && dirty || markupError && markupPending ? "Not saved" : unsaved ? "Unsaved" : "Saved";
1301
1312
  const savePill = /* @__PURE__ */ jsx4(