@ai-matrx/office 0.8.54 → 0.8.56

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.cjs CHANGED
@@ -1324,6 +1324,17 @@ function PdfWorkspace({ host, className }) {
1324
1324
  if (action === "undo" || action === "redo") e.stopPropagation();
1325
1325
  runAction(action);
1326
1326
  };
1327
+ (0, import_react4.useEffect)(() => {
1328
+ if (!read) return void 0;
1329
+ scrollerRef.current?.focus({ preventScroll: true });
1330
+ const onWindowKey = (e) => {
1331
+ if (e.key !== "Escape" || e.defaultPrevented) return;
1332
+ if (rootRef.current?.contains(e.target)) return;
1333
+ setRead(false);
1334
+ };
1335
+ window.addEventListener("keydown", onWindowKey);
1336
+ return () => window.removeEventListener("keydown", onWindowKey);
1337
+ }, [read]);
1327
1338
  const unsaved = dirty || markupPending > 0;
1328
1339
  const saveState = !online ? "Offline" : busy || markupBusy ? "Saving" : error && dirty || markupError && markupPending ? "Not saved" : unsaved ? "Unsaved" : "Saved";
1329
1340
  const savePill = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(