@marimo-team/frontend 0.23.6-dev10 → 0.23.6-dev11

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.
@@ -8,6 +8,7 @@ import {
8
8
  CookieIcon,
9
9
  PanelRightCloseIcon,
10
10
  PanelRightOpenIcon,
11
+ KeyboardIcon,
11
12
  } from "lucide-react";
12
13
  import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";
13
14
  import {
@@ -28,6 +29,7 @@ import type {
28
29
  import { useState } from "react";
29
30
  import { Tooltip } from "../ui/tooltip";
30
31
  import { Button } from "../ui/button";
32
+ import { Kbd } from "../ui/kbd";
31
33
  import type { RuntimeCell } from "@/core/cells/types";
32
34
 
33
35
  export const DEFAULT_SLIDE_TYPE: SlideType = "slide";
@@ -132,10 +134,51 @@ const SlidesForm = ({
132
134
  <TabsContent value="deck" className="mt-0 flex-1">
133
135
  <DeckConfigForm layout={layout} setLayout={setLayout} />
134
136
  </TabsContent>
137
+ <hr />
138
+ <KeyboardTips />
135
139
  </Tabs>
136
140
  );
137
141
  };
138
142
 
143
+ const KEYBOARD_TIPS: { keys: string[]; description: string }[] = [
144
+ { keys: ["F"], description: "Enter fullscreen" },
145
+ { keys: ["C"], description: "Toggle code editor" },
146
+ ];
147
+
148
+ const KEYBOARD_SHORTCUTS_URL =
149
+ "https://vlaaad.github.io/reveal/keyboard-shortcuts";
150
+
151
+ const KeyboardTips = () => {
152
+ return (
153
+ <div className="flex flex-col gap-2 text-xs text-muted-foreground">
154
+ <div className="flex items-center gap-1.5 font-medium text-foreground/80">
155
+ <KeyboardIcon className="h-3.5 w-3.5" />
156
+ <span>Shortcuts</span>
157
+ </div>
158
+ <ul className="flex flex-col gap-1.5">
159
+ {KEYBOARD_TIPS.map(({ keys, description }) => (
160
+ <li key={description} className="flex items-center justify-between">
161
+ <span>{description}</span>
162
+ <span className="flex gap-1">
163
+ {keys.map((key) => (
164
+ <Kbd key={key}>{key}</Kbd>
165
+ ))}
166
+ </span>
167
+ </li>
168
+ ))}
169
+ </ul>
170
+ <a
171
+ href={KEYBOARD_SHORTCUTS_URL}
172
+ target="_blank"
173
+ rel="noopener noreferrer"
174
+ className="text-link hover:underline"
175
+ >
176
+ See all shortcuts
177
+ </a>
178
+ </div>
179
+ );
180
+ };
181
+
139
182
  const SlideConfigForm = ({
140
183
  layout,
141
184
  setLayout,