create-slide-deck 0.1.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/dist/index.js +119 -0
- package/package.json +36 -0
- package/template-full/README.md +99 -0
- package/template-full/package.json +47 -0
- package/template-full/src/reveal/components/auto-layout.ts +229 -0
- package/template-full/src/reveal/components/charts.tsx +213 -0
- package/template-full/src/reveal/core/blocks.ts +172 -0
- package/template-full/src/reveal/core/deck-init.ts +60 -0
- package/template-full/src/reveal/core/design.ts +46 -0
- package/template-full/src/reveal/core/layout.ts +187 -0
- package/template-full/src/reveal/core/mount-registry.ts +41 -0
- package/template-full/src/reveal/core/presets.ts +189 -0
- package/template-full/src/reveal/core/runtime.ts +141 -0
- package/template-full/src/reveal/core/types.ts +114 -0
- package/template-full/src/reveal/data/algorithms.ts +78 -0
- package/template-full/src/reveal/data/benchmark.ts +79 -0
- package/template-full/src/reveal/decks/demo-showcase/components/demo-arc-progress.tsx +153 -0
- package/template-full/src/reveal/decks/demo-showcase/components/demo-before-after.tsx +164 -0
- package/template-full/src/reveal/decks/demo-showcase/components/demo-bigtext.tsx +70 -0
- package/template-full/src/reveal/decks/demo-showcase/components/demo-card-flip.tsx +118 -0
- package/template-full/src/reveal/decks/demo-showcase/components/demo-chat-bubbles.tsx +257 -0
- package/template-full/src/reveal/decks/demo-showcase/components/demo-code.tsx +136 -0
- package/template-full/src/reveal/decks/demo-showcase/components/demo-concept-map.tsx +336 -0
- package/template-full/src/reveal/decks/demo-showcase/components/demo-counter.tsx +194 -0
- package/template-full/src/reveal/decks/demo-showcase/components/demo-cover.tsx +188 -0
- package/template-full/src/reveal/decks/demo-showcase/components/demo-dark-dashboard.tsx +166 -0
- package/template-full/src/reveal/decks/demo-showcase/components/demo-eval-matrix.tsx +191 -0
- package/template-full/src/reveal/decks/demo-showcase/components/demo-force-graph.tsx +169 -0
- package/template-full/src/reveal/decks/demo-showcase/components/demo-fullbleed-bars.tsx +109 -0
- package/template-full/src/reveal/decks/demo-showcase/components/demo-fullbleed-flow.tsx +177 -0
- package/template-full/src/reveal/decks/demo-showcase/components/demo-heatmap.tsx +135 -0
- package/template-full/src/reveal/decks/demo-showcase/components/demo-icon-wall.tsx +143 -0
- package/template-full/src/reveal/decks/demo-showcase/components/demo-math.tsx +103 -0
- package/template-full/src/reveal/decks/demo-showcase/components/demo-number-morph.tsx +126 -0
- package/template-full/src/reveal/decks/demo-showcase/components/demo-path.tsx +185 -0
- package/template-full/src/reveal/decks/demo-showcase/components/demo-radar.tsx +124 -0
- package/template-full/src/reveal/decks/demo-showcase/components/demo-rough.tsx +169 -0
- package/template-full/src/reveal/decks/demo-showcase/components/demo-sankey.tsx +144 -0
- package/template-full/src/reveal/decks/demo-showcase/components/demo-screenshot-annotate.tsx +181 -0
- package/template-full/src/reveal/decks/demo-showcase/components/demo-stacked-cards.tsx +159 -0
- package/template-full/src/reveal/decks/demo-showcase/components/demo-tabs.tsx +206 -0
- package/template-full/src/reveal/decks/demo-showcase/components/demo-timeline.tsx +162 -0
- package/template-full/src/reveal/decks/demo-showcase/components/demo-treemap.tsx +161 -0
- package/template-full/src/reveal/decks/demo-showcase/components/demo-zoom-focus.tsx +223 -0
- package/template-full/src/reveal/decks/demo-showcase/components/registry.ts +63 -0
- package/template-full/src/reveal/decks/demo-showcase/demo.css +237 -0
- package/template-full/src/reveal/decks/demo-showcase/index.html +24 -0
- package/template-full/src/reveal/decks/demo-showcase/main.ts +7 -0
- package/template-full/src/reveal/decks/demo-showcase/slides.ts +271 -0
- package/template-full/src/reveal/decks/fse26-rca/components/aws-cascade.tsx +295 -0
- package/template-full/src/reveal/decks/fse26-rca/components/bench-compare.tsx +64 -0
- package/template-full/src/reveal/decks/fse26-rca/components/bench-deficiency.tsx +104 -0
- package/template-full/src/reveal/decks/fse26-rca/components/bench-loop.tsx +402 -0
- package/template-full/src/reveal/decks/fse26-rca/components/bench-needs.tsx +78 -0
- package/template-full/src/reveal/decks/fse26-rca/components/closing-takeaway.tsx +165 -0
- package/template-full/src/reveal/decks/fse26-rca/components/cloud-incidents.tsx +88 -0
- package/template-full/src/reveal/decks/fse26-rca/components/failure-modes.tsx +59 -0
- package/template-full/src/reveal/decks/fse26-rca/components/fault-heatmap.tsx +85 -0
- package/template-full/src/reveal/decks/fse26-rca/components/hierarchy-tree.tsx +93 -0
- package/template-full/src/reveal/decks/fse26-rca/components/incident-hard.tsx +72 -0
- package/template-full/src/reveal/decks/fse26-rca/components/rca-pipeline.tsx +193 -0
- package/template-full/src/reveal/decks/fse26-rca/components/registry.ts +37 -0
- package/template-full/src/reveal/decks/fse26-rca/components/simple-rca.tsx +216 -0
- package/template-full/src/reveal/decks/fse26-rca/components/sota-collapse.tsx +63 -0
- package/template-full/src/reveal/decks/fse26-rca/components/srca-results.tsx +115 -0
- package/template-full/src/reveal/decks/fse26-rca/images/aws-outage-2025-deployflow.png +0 -0
- package/template-full/src/reveal/decks/fse26-rca/images/aws-post-event-summary.png +0 -0
- package/template-full/src/reveal/decks/fse26-rca/images/bbc-crowdstrike.png +0 -0
- package/template-full/src/reveal/decks/fse26-rca/images/cnn-meta-outage-2021.png +0 -0
- package/template-full/src/reveal/decks/fse26-rca/images/cover.png +0 -0
- package/template-full/src/reveal/decks/fse26-rca/images/nyt-facebook-2021.png +0 -0
- package/template-full/src/reveal/decks/fse26-rca/images/qr-repo.png +0 -0
- package/template-full/src/reveal/decks/fse26-rca/images/verge-crowdstrike-2024.png +0 -0
- package/template-full/src/reveal/decks/fse26-rca/images/wiki-meta-outage-2021.png +0 -0
- package/template-full/src/reveal/decks/fse26-rca/index.html +30 -0
- package/template-full/src/reveal/decks/fse26-rca/main.ts +8 -0
- package/template-full/src/reveal/decks/fse26-rca/slides.ts +175 -0
- package/template-full/src/reveal/env.d.ts +38 -0
- package/template-full/src/reveal/theme.css +762 -0
- package/template-full/src/reveal/tools/dev.mjs +120 -0
- package/template-full/src/reveal/tools/export-pdf.mjs +86 -0
- package/template-full/src/reveal/tools/preview.mjs +132 -0
- package/template-full/tsconfig.json +19 -0
- package/template-full/vite.config.ts +95 -0
- package/template-minimal/package.json +42 -0
- package/template-minimal/src/reveal/components/auto-layout.ts +229 -0
- package/template-minimal/src/reveal/components/charts.tsx +213 -0
- package/template-minimal/src/reveal/core/blocks.ts +172 -0
- package/template-minimal/src/reveal/core/deck-init.ts +60 -0
- package/template-minimal/src/reveal/core/design.ts +46 -0
- package/template-minimal/src/reveal/core/layout.ts +187 -0
- package/template-minimal/src/reveal/core/mount-registry.ts +41 -0
- package/template-minimal/src/reveal/core/presets.ts +189 -0
- package/template-minimal/src/reveal/core/runtime.ts +141 -0
- package/template-minimal/src/reveal/core/types.ts +114 -0
- package/template-minimal/src/reveal/data/.gitkeep +0 -0
- package/template-minimal/src/reveal/decks/my-deck/components/example-component.tsx +28 -0
- package/template-minimal/src/reveal/decks/my-deck/components/registry.ts +9 -0
- package/template-minimal/src/reveal/decks/my-deck/index.html +14 -0
- package/template-minimal/src/reveal/decks/my-deck/main.ts +5 -0
- package/template-minimal/src/reveal/decks/my-deck/slides.ts +34 -0
- package/template-minimal/src/reveal/env.d.ts +38 -0
- package/template-minimal/src/reveal/theme.css +762 -0
- package/template-minimal/tsconfig.json +19 -0
- package/template-minimal/vite.config.ts +95 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type { ComponentType } from "react";
|
|
2
|
+
|
|
3
|
+
export interface SlideComponentProps {
|
|
4
|
+
Reveal: RevealInstance;
|
|
5
|
+
anime?: typeof import("animejs");
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface RevealInstance {
|
|
9
|
+
initialize(): Promise<void>;
|
|
10
|
+
on(event: string, callback: (e: any) => void): void;
|
|
11
|
+
off(event: string, callback: (e: any) => void): void;
|
|
12
|
+
getCurrentSlide(): HTMLElement | null;
|
|
13
|
+
getState(): { indexh: number; indexf: number };
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface Slide {
|
|
17
|
+
className?: string;
|
|
18
|
+
attrs?: Record<string, string | number>;
|
|
19
|
+
html: string;
|
|
20
|
+
notes: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type LayerName = "background" | "connector" | "content" | "overlay" | "chrome";
|
|
24
|
+
|
|
25
|
+
export interface BlockOptions {
|
|
26
|
+
id?: string;
|
|
27
|
+
kind?: "html" | "svg" | "image" | "mount";
|
|
28
|
+
html?: string;
|
|
29
|
+
src?: string;
|
|
30
|
+
alt?: string;
|
|
31
|
+
x?: number;
|
|
32
|
+
y?: number;
|
|
33
|
+
w?: number;
|
|
34
|
+
h?: number;
|
|
35
|
+
layer?: LayerName;
|
|
36
|
+
fragment?: boolean | number | null;
|
|
37
|
+
animation?: string;
|
|
38
|
+
className?: string;
|
|
39
|
+
attrs?: Record<string, string | number | boolean>;
|
|
40
|
+
css?: Record<string, string | number>;
|
|
41
|
+
styleText?: string;
|
|
42
|
+
flow?: boolean;
|
|
43
|
+
mount?: MountSpec | null;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface Block extends Required<Pick<BlockOptions, "kind" | "html" | "alt" | "layer" | "animation" | "className" | "flow">> {
|
|
47
|
+
id?: string;
|
|
48
|
+
src?: string;
|
|
49
|
+
x?: number;
|
|
50
|
+
y?: number;
|
|
51
|
+
w?: number;
|
|
52
|
+
h?: number;
|
|
53
|
+
fragment: boolean | number | null;
|
|
54
|
+
attrs: Record<string, string | number | boolean>;
|
|
55
|
+
css: Record<string, string | number>;
|
|
56
|
+
styleText: string;
|
|
57
|
+
mount: MountSpec | null;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface MountSpec {
|
|
61
|
+
library: string;
|
|
62
|
+
exportName?: string;
|
|
63
|
+
props?: Record<string, unknown>;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface StepNote {
|
|
67
|
+
step: string;
|
|
68
|
+
visible: string;
|
|
69
|
+
say: string;
|
|
70
|
+
why?: string;
|
|
71
|
+
next?: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface SlideOptions {
|
|
75
|
+
className?: string;
|
|
76
|
+
attrs?: Record<string, string | number>;
|
|
77
|
+
html?: string;
|
|
78
|
+
blocks?: (Block | string)[];
|
|
79
|
+
notes?: string | (string | StepNote)[];
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface ReactSlideOptions<C extends string = string> {
|
|
83
|
+
title?: string;
|
|
84
|
+
component: C;
|
|
85
|
+
steps?: number;
|
|
86
|
+
notes?: string;
|
|
87
|
+
page?: number;
|
|
88
|
+
x?: number;
|
|
89
|
+
y?: number;
|
|
90
|
+
w?: number;
|
|
91
|
+
h?: number;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface BlockSlideOptions {
|
|
95
|
+
title?: string;
|
|
96
|
+
blocks?: (Block | string)[];
|
|
97
|
+
page?: number;
|
|
98
|
+
notes?: string;
|
|
99
|
+
html?: string;
|
|
100
|
+
className?: string;
|
|
101
|
+
attrs?: Record<string, string | number>;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export type ComponentRegistry = Record<string, ComponentType<SlideComponentProps>>;
|
|
105
|
+
|
|
106
|
+
export interface MountContext {
|
|
107
|
+
Reveal: RevealInstance;
|
|
108
|
+
anime: typeof import("animejs");
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export interface DeckConfig<C extends ComponentRegistry = ComponentRegistry> {
|
|
112
|
+
buildSlides: (() => Promise<Slide[]> | Slide[]) | Slide[];
|
|
113
|
+
components: C;
|
|
114
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { SlideComponentProps } from "../../../core/types.ts";
|
|
3
|
+
import { CANVAS, SlideCanvas, vis } from "../../../core/presets.ts";
|
|
4
|
+
|
|
5
|
+
export default function ExampleComponent({ Reveal }: SlideComponentProps) {
|
|
6
|
+
return (
|
|
7
|
+
<SlideCanvas Reveal={Reveal} W={1200} H={560}>{(step, instant) => <>
|
|
8
|
+
<g style={vis(step, -1, instant)}>
|
|
9
|
+
<text x={600} y={200} textAnchor="middle" fontSize={40} fontWeight={800} fill="#313131" fontFamily={CANVAS.fontFamily}>
|
|
10
|
+
Hello, Slides!
|
|
11
|
+
</text>
|
|
12
|
+
<text x={600} y={260} textAnchor="middle" fontSize={20} fontWeight={600} fill="#767676" fontFamily={CANVAS.fontFamily}>
|
|
13
|
+
Edit components/ to build your presentation
|
|
14
|
+
</text>
|
|
15
|
+
</g>
|
|
16
|
+
<g style={vis(step, 0, instant)}>
|
|
17
|
+
<text x={600} y={360} textAnchor="middle" fontSize={20} fontWeight={700} fill="#4361ee" fontFamily={CANVAS.fontFamily}>
|
|
18
|
+
Step 1: This appears on first click
|
|
19
|
+
</text>
|
|
20
|
+
</g>
|
|
21
|
+
<g style={vis(step, 1, instant)}>
|
|
22
|
+
<text x={600} y={420} textAnchor="middle" fontSize={20} fontWeight={700} fill="#7c3aed" fontFamily={CANVAS.fontFamily}>
|
|
23
|
+
Step 2: This appears on second click
|
|
24
|
+
</text>
|
|
25
|
+
</g>
|
|
26
|
+
</>}</SlideCanvas>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ComponentType } from "react";
|
|
2
|
+
import type { SlideComponentProps } from "../../../core/types.ts";
|
|
3
|
+
import ExampleComponent from "./example-component.tsx";
|
|
4
|
+
|
|
5
|
+
export const components = {
|
|
6
|
+
ExampleComponent,
|
|
7
|
+
} satisfies Record<string, ComponentType<SlideComponentProps>>;
|
|
8
|
+
|
|
9
|
+
export type ComponentName = keyof typeof components;
|
|
@@ -0,0 +1,14 @@
|
|
|
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.0">
|
|
6
|
+
<title>{{PROJECT_NAME}}</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div class="reveal">
|
|
10
|
+
<div class="slides"></div>
|
|
11
|
+
</div>
|
|
12
|
+
<script type="module" src="./main.ts"></script>
|
|
13
|
+
</body>
|
|
14
|
+
</html>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { blockSlide, reactSlide } from "../../core/layout.ts";
|
|
2
|
+
import type { ComponentName } from "./components/registry.ts";
|
|
3
|
+
import type { Slide } from "../../core/types.ts";
|
|
4
|
+
|
|
5
|
+
function cover(): Slide {
|
|
6
|
+
return blockSlide({
|
|
7
|
+
html: `
|
|
8
|
+
<div style="display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%">
|
|
9
|
+
<h1 style="font-size:48px;font-weight:800;color:#313131;margin:0">{{PROJECT_NAME}}</h1>
|
|
10
|
+
<p style="font-size:20px;color:#767676;margin-top:16px">Your Name</p>
|
|
11
|
+
</div>
|
|
12
|
+
`,
|
|
13
|
+
notes: "Cover slide.",
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function example(): Slide {
|
|
18
|
+
return reactSlide<ComponentName>({
|
|
19
|
+
title: "Example Slide",
|
|
20
|
+
component: "ExampleComponent",
|
|
21
|
+
steps: 2,
|
|
22
|
+
notes: "An example React component slide.",
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function buildSlides(): Slide[] {
|
|
27
|
+
const builders = [cover, example];
|
|
28
|
+
const slides = builders.map((b) => b());
|
|
29
|
+
slides.forEach((slide, i) => {
|
|
30
|
+
const pageDiv = `\n<div class="page-no">${String(i + 1).padStart(2, "0")}</div>`;
|
|
31
|
+
if (!slide.html.includes('class="page-no"')) slide.html += pageDiv;
|
|
32
|
+
});
|
|
33
|
+
return slides;
|
|
34
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
|
|
3
|
+
declare module "reveal.js" {
|
|
4
|
+
export default class Reveal {
|
|
5
|
+
constructor(config: Record<string, any>);
|
|
6
|
+
initialize(): Promise<void>;
|
|
7
|
+
on(event: string, callback: (e: any) => void): void;
|
|
8
|
+
off(event: string, callback: (e: any) => void): void;
|
|
9
|
+
getCurrentSlide(): HTMLElement | null;
|
|
10
|
+
getState(): { indexh: number; indexf: number };
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare module "reveal.js/plugin/notes" {
|
|
15
|
+
const RevealNotes: any;
|
|
16
|
+
export default RevealNotes;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare module "*.css" {}
|
|
20
|
+
|
|
21
|
+
declare module "roughjs" {
|
|
22
|
+
export function svg(el: SVGSVGElement): any;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare module "roughjs/bundled/rough.esm.js" {
|
|
26
|
+
const rough: {
|
|
27
|
+
svg(el: SVGSVGElement): any;
|
|
28
|
+
};
|
|
29
|
+
export default rough;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
declare module "prismjs" {
|
|
33
|
+
const Prism: {
|
|
34
|
+
highlight(code: string, grammar: any, language: string): string;
|
|
35
|
+
languages: Record<string, any>;
|
|
36
|
+
};
|
|
37
|
+
export default Prism;
|
|
38
|
+
}
|