excalideck 0.0.1 → 0.2.1

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.
@@ -0,0 +1,267 @@
1
+ // excalideck builder — write a talk as code, get a normal .excalidraw file.
2
+ //
3
+ // import { Deck } from "excalideck";
4
+ // const deck = new Deck();
5
+ // const f = deck.frame("The big picture", { transition: "morph", appear: "draw" });
6
+ // f.title("The big picture");
7
+ // const a = f.box("Web App", { x: 200, y: 400, color: "blue" });
8
+ // const b = f.box("Orders API", { x: 600, y: 400, color: "green" });
9
+ // f.arrow(a, b, { label: "places order" });
10
+ // deck.save("talk.excalidraw");
11
+ //
12
+ // Every frame is a slide. Shapes with the same label on consecutive frames morph into each other.
13
+ import { writeFileSync } from "node:fs";
14
+ import { textWidth, TRANSITIONS, APPEARS } from "../src/scene.js";
15
+
16
+ /** Excalidraw's own palette: [stroke, fill]. Suggested meanings are just conventions. */
17
+ export const PALETTE = {
18
+ blue: ["#1971c2", "#a5d8ff"], // services
19
+ green: ["#2f9e44", "#b2f2bb"], // the thing in focus / new
20
+ violet: ["#6741d9", "#d0bfff"], // databases, storage
21
+ yellow: ["#f08c00", "#ffec99"], // queues, events, messaging
22
+ orange: ["#e8590c", "#ffd8a8"], // people, actors
23
+ red: ["#e03131", "#ffc9c9"], // caches, problems, highlights
24
+ cyan: ["#0c8599", "#99e9f2"], // edge, CDN, networking
25
+ teal: ["#099268", "#96f2d7"], // workers, jobs
26
+ pink: ["#c2255c", "#fcc2d7"],
27
+ gray: ["#495057", "#e9ecef"], // external systems
28
+ };
29
+ const REGION_FILL = { blue: "#e7f5ff", green: "#ebfbee", violet: "#f3f0ff", yellow: "#fff9db", orange: "#fff4e6",
30
+ red: "#fff5f5", cyan: "#e3fafc", teal: "#e6fcf5", pink: "#fff0f6", gray: "#f8f9fa" };
31
+
32
+ const FONT = { excalifont: 5, virgil: 1, helvetica: 2, mono: 3 };
33
+ const LINE_HEIGHT = 1.25;
34
+
35
+ // small deterministic RNG so the same script always produces the same file
36
+ function rng(seed) { let s = seed >>> 0 || 1; return () => ((s = (s * 1664525 + 1013904223) >>> 0) / 2 ** 32); }
37
+
38
+ export class Deck {
39
+ /**
40
+ * @param {object} [o]
41
+ * @param {number} [o.width=1600] frame width
42
+ * @param {number} [o.height=900] frame height
43
+ * @param {number} [o.columns=4] frames per row when auto-placing on the canvas
44
+ * @param {number} [o.seed=1] change to get different hand-drawn wobble
45
+ * @param {string} [o.font="excalifont"] excalifont | virgil | helvetica | mono
46
+ * @param {number} [o.roughness=1] 0 = clean lines, 1 = sketchy (default), 2 = very sketchy
47
+ * @param {string} [o.background="#ffffff"]
48
+ */
49
+ constructor(o = {}) {
50
+ this.w = o.width ?? 1600; this.h = o.height ?? 900; this.columns = o.columns ?? 4;
51
+ this.rand = rng(o.seed ?? 1); this.font = FONT[o.font ?? "excalifont"] ?? 5;
52
+ this.roughness = o.roughness ?? 1; this.background = o.background ?? "#ffffff";
53
+ this.elements = []; this.frames = []; this.n = 0;
54
+ }
55
+ id() { return "x" + (++this.n).toString(36) + Math.floor(this.rand() * 36 ** 6).toString(36); }
56
+ seed() { return Math.floor(this.rand() * 2 ** 31); }
57
+
58
+ /**
59
+ * Add a slide.
60
+ * @param {string} title shown in the frame name (and the presenter HUD) — not drawn; use f.title() for that
61
+ * @param {object} [o]
62
+ * @param {"morph"|"zoom"|"camera"|"fade"|"cut"} [o.transition] how to arrive at this slide (default morph)
63
+ * @param {"fade"|"pop"|"draw"|"rise"} [o.appear] how new shapes appear (default fade)
64
+ * @param {"slow"|"fast"} [o.speed]
65
+ * @param {boolean} [o.stagger=true]
66
+ * @param {[number, number]} [o.at] canvas position; default is a grid. Put a frame far away to make a `camera` flight dramatic.
67
+ */
68
+ frame(title, o = {}) {
69
+ if (o.transition && !TRANSITIONS.includes(o.transition)) throw new Error(`unknown transition "${o.transition}" (use ${TRANSITIONS.join(", ")})`);
70
+ if (o.appear && !APPEARS.includes(o.appear)) throw new Error(`unknown appear "${o.appear}" (use ${APPEARS.join(", ")})`);
71
+ const i = this.frames.length;
72
+ const [x, y] = o.at ?? [(i % this.columns) * (this.w + 200), Math.floor(i / this.columns) * (this.h + 200)];
73
+ const tags = [o.transition, o.appear, o.speed, o.stagger === false ? "nostagger" : null].filter(Boolean);
74
+ const name = `${String(i + 1).padStart(2, "0")} ${title}${tags.length ? ` [${tags.join(" ")}]` : ""}`;
75
+ const f = new Frame(this, this.id(), name, x, y);
76
+ this.frames.push(f);
77
+ return f;
78
+ }
79
+
80
+ toJSON() {
81
+ const out = [];
82
+ for (const f of this.frames) {
83
+ out.push(...this.elements.filter((e) => e.frameId === f.id));
84
+ out.push(this.base("frame", null, f.x, f.y, this.w, this.h, { id: f.id, name: f.name, strokeColor: "#bbb", roundness: null }));
85
+ }
86
+ return { type: "excalidraw", version: 2, source: "https://github.com/edspencer/excalideck", elements: out,
87
+ appState: { viewBackgroundColor: this.background, gridSize: 20 }, files: {} };
88
+ }
89
+ /** Write the .excalidraw file. Returns the path. */
90
+ save(path) { writeFileSync(path, JSON.stringify(this.toJSON(), null, 1)); return path; }
91
+
92
+ base(type, frameId, x, y, w, h, extra = {}) {
93
+ return {
94
+ id: extra.id ?? this.id(), type, x, y, width: w, height: h, angle: 0,
95
+ strokeColor: "#1e1e1e", backgroundColor: "transparent", fillStyle: "solid", strokeWidth: 2,
96
+ strokeStyle: "solid", roughness: this.roughness, opacity: 100, groupIds: [], frameId,
97
+ roundness: null, seed: this.seed(), version: 1, versionNonce: this.seed(), isDeleted: false,
98
+ boundElements: [], updated: 1, link: null, locked: false, ...extra,
99
+ };
100
+ }
101
+ }
102
+
103
+ class Frame {
104
+ constructor(deck, id, name, x, y) { Object.assign(this, { deck, id, name, x, y }); this.width = deck.w; this.height = deck.h; }
105
+
106
+ add(type, x, y, w, h, extra) {
107
+ const el = this.deck.base(type, this.id, this.x + x, this.y + y, w, h, extra);
108
+ this.deck.elements.push(el);
109
+ return el;
110
+ }
111
+ wrap(el) { // what the user gets back: frame-relative geometry + the element
112
+ return { el, id: el.id, x: el.x - this.x, y: el.y - this.y, w: el.width, h: el.height, frame: this,
113
+ get cx() { return this.x + this.w / 2; }, get cy() { return this.y + this.h / 2; },
114
+ get right() { return this.x + this.w; }, get bottom() { return this.y + this.h; } };
115
+ }
116
+
117
+ /** Measure text: { w, h } in px. */
118
+ measure(text, size = 20) {
119
+ const lines = String(text).split("\n");
120
+ return { w: Math.max(...lines.map((l) => textWidth(l, size, this.deck.font))), h: lines.length * size * LINE_HEIGHT };
121
+ }
122
+
123
+ text(str, o = {}) {
124
+ const size = o.size ?? 20, m = this.measure(str, size), align = o.align ?? "left";
125
+ let x = o.x ?? 64; if (align === "center") x -= m.w / 2; if (align === "right") x -= m.w;
126
+ const el = this.add("text", x, o.y ?? 64, m.w, m.h, {
127
+ strokeColor: o.color ?? "#1e1e1e", opacity: o.opacity ?? 100, roundness: null,
128
+ text: str, originalText: str, fontSize: size, fontFamily: this.deck.font, textAlign: align,
129
+ verticalAlign: "top", containerId: null, autoResize: true, lineHeight: LINE_HEIGHT,
130
+ });
131
+ return this.wrap(el);
132
+ }
133
+ /** Slide heading, top-left. Different text per slide is fine — it cross-fades. */
134
+ title(str, o = {}) { return this.text(str, { x: 64, y: 44, size: 48, ...o }); }
135
+ /** Small grey note along the bottom edge. */
136
+ caption(str, o = {}) { return this.text(str, { x: 64, y: this.height - 54, size: 20, color: "#868e96", ...o }); }
137
+
138
+ label(container, str, o = {}) {
139
+ const size = o.size ?? 20, m = this.measure(str, size);
140
+ const align = o.align ?? "center", valign = o.valign ?? "middle";
141
+ let tx, ty;
142
+ if (container.type === "arrow") {
143
+ const p = container.points, mid = p.length % 2 ? p[(p.length - 1) / 2] : [(p[p.length / 2 - 1][0] + p[p.length / 2][0]) / 2, (p[p.length / 2 - 1][1] + p[p.length / 2][1]) / 2];
144
+ tx = container.x + mid[0] - m.w / 2; ty = container.y + mid[1] - m.h / 2;
145
+ } else {
146
+ tx = align === "left" ? container.x + 5 : container.x + (container.width - m.w) / 2;
147
+ ty = valign === "top" ? container.y + 5 : container.y + (container.height - m.h) / 2;
148
+ }
149
+ const t = this.deck.base("text", this.id, tx, ty, m.w, m.h, {
150
+ strokeColor: o.color ?? "#1e1e1e", opacity: container.opacity, roundness: null,
151
+ text: str, originalText: str, fontSize: size, fontFamily: this.deck.font, textAlign: align,
152
+ verticalAlign: valign, containerId: container.id, autoResize: true, lineHeight: LINE_HEIGHT,
153
+ });
154
+ this.deck.elements.push(t);
155
+ container.boundElements.push({ type: "text", id: t.id });
156
+ return t;
157
+ }
158
+
159
+ /**
160
+ * A labelled shape. Omit w/h to size it to the label. Use "\n" to break lines (keep labels to ~4 words).
161
+ * @param {string} label
162
+ * @param {object} o x, y (top-left) or cx, cy (centre); w, h; color (PALETTE key); shape rectangle|ellipse|diamond;
163
+ * size (font px, default 20); dashed; opacity (0-100); strokeWidth; stroke/fill (override colours); textColor
164
+ */
165
+ box(label, o = {}) {
166
+ const [stroke, fill] = PALETTE[o.color ?? "blue"] ?? PALETTE.blue;
167
+ const shape = o.shape ?? "rectangle", size = o.size ?? 20, m = this.measure(label, size);
168
+ const k = shape === "rectangle" ? 1 : shape === "ellipse" ? 1.42 : 1.9; // ellipses/diamonds need more room
169
+ const w = o.w ?? Math.max(shape === "rectangle" ? 160 : 150, Math.ceil((m.w * k + 48) / 10) * 10);
170
+ const h = o.h ?? Math.max(shape === "rectangle" ? 80 : 90, Math.ceil((m.h * (shape === "rectangle" ? 1 : k) + 36) / 10) * 10);
171
+ const x = o.x ?? (o.cx ?? 0) - w / 2, y = o.y ?? (o.cy ?? 0) - h / 2;
172
+ const el = this.add(shape, x, y, w, h, {
173
+ strokeColor: o.stroke ?? stroke, backgroundColor: o.fill ?? fill, strokeStyle: o.dashed ? "dashed" : "solid",
174
+ opacity: o.opacity ?? 100, strokeWidth: o.strokeWidth ?? 2, roundness: shape === "ellipse" ? { type: 2 } : { type: 3 },
175
+ });
176
+ this.label(el, label, { size, color: o.textColor ?? "#1e1e1e" });
177
+ return this.wrap(el);
178
+ }
179
+
180
+ /**
181
+ * A dashed grouping box with its label in the top-left corner (a service boundary, a VPC, a team…).
182
+ * Give x/y/w/h, or `around: [boxes]` (+ `pad`) to fit it to its contents.
183
+ * A region whose label matches a box on the previous slide grows out of that box — that's the drill-down.
184
+ */
185
+ region(label, o = {}) {
186
+ let { x, y, w, h } = o;
187
+ if (o.around?.length) {
188
+ const pad = o.pad ?? 40, top = o.top ?? 50;
189
+ x = Math.min(...o.around.map((b) => b.x)) - pad; y = Math.min(...o.around.map((b) => b.y)) - top;
190
+ w = Math.max(...o.around.map((b) => b.right)) + pad - x; h = Math.max(...o.around.map((b) => b.bottom)) + pad - y;
191
+ }
192
+ const c = o.color ?? "blue", [stroke] = PALETTE[c] ?? PALETTE.blue;
193
+ const el = this.add("rectangle", x, y, w, h, {
194
+ strokeColor: stroke, backgroundColor: o.fill ?? REGION_FILL[c] ?? "transparent", strokeStyle: o.solid ? "solid" : "dashed",
195
+ opacity: o.opacity ?? 100, roundness: { type: 3 },
196
+ });
197
+ // a region goes just behind the first shape it contains (so nested regions stack correctly)
198
+ const els = this.deck.elements; els.splice(els.indexOf(el), 1);
199
+ const inside = (e) => e.frameId === this.id && e.type !== "text" && e.x >= el.x && e.y >= el.y &&
200
+ e.x + e.width <= el.x + el.width && e.y + e.height <= el.y + el.height;
201
+ const first = els.findIndex(inside);
202
+ els.splice(first < 0 ? els.length : first, 0, el);
203
+ this.label(el, label, { size: o.size ?? 24, color: stroke, align: "left", valign: "top" });
204
+ return this.wrap(el);
205
+ }
206
+
207
+ /** Small numbered circle, e.g. to number the steps of a flow. */
208
+ badge(text, o = {}) {
209
+ return this.box(String(text), { shape: "ellipse", w: 46, h: 46, size: 22, color: "red", ...o });
210
+ }
211
+
212
+ /**
213
+ * Arrow from one shape to another, bound at both ends (it stays attached when shapes move).
214
+ * @param {object} from a value returned by box()/region()
215
+ * @param {object} to
216
+ * @param {object} [o] label; dashed; color (stroke colour, e.g. "#e03131"); strokeWidth; opacity;
217
+ * via: [[x,y],…] bend points (frame coords; sharp corners, or curved: true); both (arrowheads both ends); none (plain line)
218
+ */
219
+ arrow(from, to, o = {}) {
220
+ const gap = 8, via = (o.via ?? []).map(([vx, vy]) => [this.x + vx, this.y + vy]);
221
+ const A = from.el, B = to.el;
222
+ const ca = [A.x + A.width / 2, A.y + A.height / 2], cb = [B.x + B.width / 2, B.y + B.height / 2];
223
+ let p0 = edgePoint(A, via[0] ?? cb), p1 = edgePoint(B, via.at(-1) ?? ca);
224
+ const nudge = (p, q) => { const d = Math.hypot(q[0] - p[0], q[1] - p[1]) || 1; return [p[0] + ((q[0] - p[0]) / d) * gap, p[1] + ((q[1] - p[1]) / d) * gap]; };
225
+ p0 = nudge(p0, via[0] ?? p1); p1 = nudge(p1, via.at(-1) ?? p0);
226
+ const pts = [p0, ...via, p1], xs = pts.map((p) => p[0]), ys = pts.map((p) => p[1]);
227
+ const el = this.deck.base("arrow", this.id, p0[0], p0[1], Math.max(...xs) - Math.min(...xs), Math.max(...ys) - Math.min(...ys), {
228
+ strokeColor: o.color ?? "#1e1e1e", strokeStyle: o.dashed ? "dashed" : "solid", strokeWidth: o.strokeWidth ?? 2,
229
+ opacity: o.opacity ?? 100, roundness: via.length && !o.curved ? null : { type: 2 }, // bends are sharp unless curved: true
230
+ points: pts.map((p) => [p[0] - p0[0], p[1] - p0[1]]), lastCommittedPoint: null,
231
+ startBinding: { elementId: A.id, focus: 0, gap }, endBinding: { elementId: B.id, focus: 0, gap },
232
+ startArrowhead: o.both ? "arrow" : null, endArrowhead: o.none ? null : "arrow", elbowed: false,
233
+ });
234
+ this.deck.elements.push(el);
235
+ A.boundElements.push({ type: "arrow", id: el.id });
236
+ B.boundElements.push({ type: "arrow", id: el.id });
237
+ if (o.label) this.label(el, o.label, { size: o.labelSize ?? 18, color: "#495057" });
238
+ return { el, id: el.id };
239
+ }
240
+
241
+ /** Lay out boxes in a row: row(["A", "B"], { x, y, gap, ...boxOptions }) → boxes */
242
+ row(labels, o = {}) {
243
+ const out = []; let x = o.x ?? 0;
244
+ for (const l of labels) { const b = this.box(l, { ...o, x, y: o.y ?? 0 }); out.push(b); x += b.w + (o.gap ?? 60); }
245
+ return out;
246
+ }
247
+ /** Lay out boxes in a column: column(["A", "B"], { x, y, gap, ...boxOptions }) → boxes */
248
+ column(labels, o = {}) {
249
+ const out = []; let y = o.y ?? 0;
250
+ for (const l of labels) { const b = this.box(l, { ...o, x: o.x ?? 0, y }); out.push(b); y += b.h + (o.gap ?? 40); }
251
+ return out;
252
+ }
253
+ }
254
+
255
+ function edgePoint(el, toward) {
256
+ const cx = el.x + el.width / 2, cy = el.y + el.height / 2, dx = toward[0] - cx, dy = toward[1] - cy;
257
+ if (el.type === "ellipse") {
258
+ const a = el.width / 2, b = el.height / 2, t = 1 / Math.sqrt((dx * dx) / (a * a) + (dy * dy) / (b * b) || 1);
259
+ return [cx + dx * t, cy + dy * t];
260
+ }
261
+ if (el.type === "diamond") {
262
+ const t = 1 / ((Math.abs(dx) / (el.width / 2) + Math.abs(dy) / (el.height / 2)) || 1);
263
+ return [cx + dx * t, cy + dy * t];
264
+ }
265
+ const t = Math.min(el.width / 2 / Math.abs(dx || 1e-9), el.height / 2 / Math.abs(dy || 1e-9));
266
+ return [cx + dx * t, cy + dy * t];
267
+ }
package/package.json CHANGED
@@ -1 +1,62 @@
1
- {"name":"excalideck","version":"0.0.1","description":"Placeholder; the real package is published from GitHub Actions","license":"MIT","repository":{"type":"git","url":"https://github.com/edspencer/excalideck.git"}}
1
+ {
2
+ "name": "excalideck",
3
+ "version": "0.2.1",
4
+ "description": "Present Excalidraw files as slide decks where shapes morph between slides — plus a builder library, a layout checker and a Claude Code skill for generating them.",
5
+ "type": "module",
6
+ "bin": {
7
+ "excalideck": "bin/excalideck"
8
+ },
9
+ "main": "lib/excalideck.mjs",
10
+ "exports": {
11
+ ".": "./lib/excalideck.mjs",
12
+ "./check": "./src/check.js",
13
+ "./scene": "./src/scene.js"
14
+ },
15
+ "files": [
16
+ "bin",
17
+ "cli",
18
+ "lib",
19
+ "src",
20
+ "player",
21
+ "skills",
22
+ "examples",
23
+ ".claude-plugin",
24
+ "AGENTS.md"
25
+ ],
26
+ "scripts": {
27
+ "test": "node --test test/*.test.mjs",
28
+ "build:example": "node examples/snapline/build.mjs",
29
+ "check:example": "node bin/excalideck check examples/snapline/snapline.excalidraw",
30
+ "conformance": "cli-conformance",
31
+ "changeset": "changeset",
32
+ "changeset:version": "changeset version && node scripts/sync-plugin-version.mjs && npm install --package-lock-only --ignore-scripts"
33
+ },
34
+ "keywords": [
35
+ "excalidraw",
36
+ "slides",
37
+ "presentation",
38
+ "architecture",
39
+ "diagrams",
40
+ "animation",
41
+ "claude-code"
42
+ ],
43
+ "author": "Ed Spencer",
44
+ "license": "MIT",
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "https://github.com/edspencer/excalideck.git"
48
+ },
49
+ "homepage": "https://excalideck.edspencer.net",
50
+ "engines": {
51
+ "node": ">=20.6"
52
+ },
53
+ "publishConfig": {
54
+ "access": "public",
55
+ "provenance": true
56
+ },
57
+ "devDependencies": {
58
+ "@changesets/changelog-github": "^2.0.0",
59
+ "@changesets/cli": "^3.1.0",
60
+ "@edspencer/cli-conformance": "^0.2.1"
61
+ }
62
+ }
@@ -0,0 +1,5 @@
1
+ # Third-party files in this folder
2
+
3
+ - `vendor/rough.js` — [rough.js](https://github.com/rough-stuff/rough) 4.6.6 by Preet Shihn, MIT licence (`vendor/LICENSE-roughjs`). Excalidraw draws with the same library.
4
+ - `fonts/Excalifont-Latin.woff2` — Excalifont (Latin subset) from [Excalidraw](https://github.com/excalidraw/excalidraw), SIL Open Font License 1.1.
5
+ - `fonts/Virgil.woff2` — Virgil from [Excalidraw](https://github.com/excalidraw/excalidraw), SIL Open Font License 1.1.
Binary file
@@ -0,0 +1,63 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>excalideck</title>
7
+ <style>
8
+ @font-face { font-family: "Excalifont"; src: url("fonts/Excalifont-Latin.woff2") format("woff2"); }
9
+ @font-face { font-family: "Virgil"; src: url("fonts/Virgil.woff2") format("woff2"); }
10
+ html, body { margin: 0; height: 100%; overflow: hidden; background: #fff; font: 15px/1.4 system-ui, sans-serif; }
11
+ canvas { display: block; }
12
+ #hud, #toast {
13
+ position: fixed; padding: 8px 14px; border-radius: 8px; background: rgba(30,30,30,.82); color: #eee;
14
+ opacity: 0; transition: opacity .35s; pointer-events: none;
15
+ }
16
+ #hud { left: 16px; bottom: 16px; }
17
+ #hud span { color: #aaa; } #hud em { color: #ffd43b; font-style: normal; margin-left: 6px; }
18
+ #toast { left: 50%; top: 18px; transform: translateX(-50%); }
19
+ #hud.show, #toast.show { opacity: 1; }
20
+ #help {
21
+ position: fixed; right: 16px; top: 16px; width: 380px; padding: 18px 22px; border-radius: 10px;
22
+ background: rgba(30,30,30,.92); color: #ddd;
23
+ }
24
+ #help h2 { margin: 0 0 8px; font-size: 17px; color: #fff; }
25
+ #help dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 16px; margin: 0 0 10px; }
26
+ #help dt { color: #fff; font-weight: 600; } #help dd { margin: 0; }
27
+ #help p { margin: 6px 0 0; color: #aaa; font-size: 13px; }
28
+ #drop {
29
+ position: fixed; inset: 40px; border: 3px dashed #bbb; border-radius: 18px; display: grid; place-items: center;
30
+ color: #666; font-size: 22px; text-align: center;
31
+ }
32
+ #drop[hidden] { display: none; }
33
+ body.static #hud, body.static #toast { display: none; }
34
+ body.dragging #drop { display: grid !important; border-color: #6741d9; color: #6741d9; background: rgba(103,65,217,.05); }
35
+ </style>
36
+ </head>
37
+ <body>
38
+ <canvas id="c"></canvas>
39
+ <div id="hud"></div>
40
+ <div id="toast"></div>
41
+ <div id="drop" hidden><div>Drop an <b>.excalidraw</b> file here<br><small>or press L to choose one</small></div></div>
42
+ <input id="file" type="file" accept=".excalidraw,.json,application/json" hidden>
43
+ <div id="help" hidden>
44
+ <h2>Keys</h2>
45
+ <dl>
46
+ <dt>→ Space PgDn</dt><dd>next (clickers work)</dd>
47
+ <dt>← PgUp</dt><dd>back</dd>
48
+ <dt>1–9, 0</dt><dd>jump to slide</dd>
49
+ <dt>O</dt><dd>overview of the whole board (click a frame to fly to it)</dd>
50
+ <dt>R</dt><dd>replay the transition into this slide</dd>
51
+ <dt>T</dt><dd>try a different transition: morph · zoom · camera · fade · cut</dd>
52
+ <dt>A</dt><dd>try a different appear style: fade · pop · draw · rise</dd>
53
+ <dt>S</dt><dd>speed: normal · slow-mo ×2 · ×4 · fast</dd>
54
+ <dt>L</dt><dd>load another .excalidraw file (or drag one on)</dd>
55
+ <dt>F</dt><dd>full screen</dd>
56
+ </dl>
57
+ <p>Each frame is a slide, ordered by the number at the start of its name. Tags in the name pick the
58
+ transition into it, e.g. <code>03 Opening the box [zoom pop]</code>.</p>
59
+ </div>
60
+ <script src="vendor/rough.js"></script>
61
+ <script type="module" src="player.js"></script>
62
+ </body>
63
+ </html>