@graphlearning/shell 0.6.0 → 0.8.0

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/README.md CHANGED
@@ -88,6 +88,23 @@ The recorder (`scripts/record-course.mjs` in each content repo) drives these, so
88
88
  - `?capture=1` — suppress every interactive control, leaving a clean frame
89
89
  - `window.__scene.plan()` — the active course's sections, for the recorder to walk
90
90
 
91
+ ## Keyboard
92
+
93
+ Interactive only — `?capture=1` suppresses nothing here because none of it fires without a reader.
94
+
95
+ | Key | What it does |
96
+ | --- | --- |
97
+ | `←` / `→` | seek the narration −10s / +10s **when the section has a clip** (exactly when the scrub bar is on screen); otherwise page to the previous/next section |
98
+ | `Shift`+`←` / `→` | always page, clip or no clip |
99
+ | `Space` | play/pause the narration |
100
+ | `Esc` | back to the catalog (and from the catalog, up to graphl.in) |
101
+ | `←` / `→` / `Home` / `End` | with the scrub bar focused: seek ∓10s / to the start / to the end |
102
+
103
+ The arrows seek rather than page because the footer's `‹` `›` buttons are the pager's real home and
104
+ `Esc` still leaves — while the only thing a *listening* reader has no control for is a 10s jump.
105
+ Where there is no clip to seek (the catalog, a bare scene view, a repo whose wavs are not generated
106
+ yet) the old paging meaning stands, so the keyboard never goes dead.
107
+
91
108
  ## Develop
92
109
 
93
110
  `npm run dev` serves a fixture harness on :5176 — two throwaway courses with a diagram scene, a code
@@ -0,0 +1,4 @@
1
+ export declare const SEEK_S = 10;
2
+ export declare function NarrationBar({ audio }: {
3
+ audio: HTMLAudioElement | null;
4
+ }): import("react").JSX.Element | null;
@@ -1,6 +1,6 @@
1
1
  import { type ThemeKey } from '@graphlearning/flow';
2
2
  import type { Section, SceneLookup } from './types';
3
- export declare function SectionView({ section, getScene, capture, eyebrow, index, total, onHome, onPrev, onNext, narrating, onToggleNarration, theme, onToggleTheme, }: {
3
+ export declare function SectionView({ section, getScene, capture, eyebrow, index, total, onHome, onPrev, onNext, narrating, onToggleNarration, narrationAudio, theme, onToggleTheme, }: {
4
4
  section: Section;
5
5
  getScene: SceneLookup;
6
6
  capture?: boolean;
@@ -12,6 +12,7 @@ export declare function SectionView({ section, getScene, capture, eyebrow, index
12
12
  onNext?: () => void;
13
13
  narrating?: boolean;
14
14
  onToggleNarration?: () => void;
15
+ narrationAudio?: HTMLAudioElement | null;
15
16
  theme?: ThemeKey;
16
17
  onToggleTheme?: () => void;
17
18
  }): import("react").JSX.Element;