From 6ec259a0e71174651bae95d4628138bf6fd68742 Mon Sep 17 00:00:00 2001
From: kj_sh604
Date: Sun, 15 Mar 2026 16:19:35 -0400
Subject: refactor: packages/

---
 packages/excalidraw/actions/actionToggleStats.tsx | 26 +++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 packages/excalidraw/actions/actionToggleStats.tsx

(limited to 'packages/excalidraw/actions/actionToggleStats.tsx')

diff --git a/packages/excalidraw/actions/actionToggleStats.tsx b/packages/excalidraw/actions/actionToggleStats.tsx
new file mode 100644
index 0000000..e28d099
--- /dev/null
+++ b/packages/excalidraw/actions/actionToggleStats.tsx
@@ -0,0 +1,26 @@
+import { register } from "./register";
+import { CODES, KEYS } from "../keys";
+import { abacusIcon } from "../components/icons";
+import { CaptureUpdateAction } from "../store";
+
+export const actionToggleStats = register({
+  name: "stats",
+  label: "stats.fullTitle",
+  icon: abacusIcon,
+  paletteName: "Toggle stats",
+  viewMode: true,
+  trackEvent: { category: "menu" },
+  keywords: ["edit", "attributes", "customize"],
+  perform(elements, appState) {
+    return {
+      appState: {
+        ...appState,
+        stats: { ...appState.stats, open: !this.checked!(appState) },
+      },
+      captureUpdate: CaptureUpdateAction.EVENTUALLY,
+    };
+  },
+  checked: (appState) => appState.stats.open,
+  keyTest: (event) =>
+    !event[KEYS.CTRL_OR_CMD] && event.altKey && event.code === CODES.SLASH,
+});
-- 
cgit v1.2.3

