orz-slides 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/README.md +192 -0
- package/assets/app.js +683 -0
- package/assets/themes/base.css +777 -0
- package/assets/themes/theme-architect.css +64 -0
- package/assets/themes/theme-chalk.css +111 -0
- package/assets/themes/theme-executive.css +65 -0
- package/assets/themes/theme-neon.css +107 -0
- package/assets/themes/theme-paper.css +50 -0
- package/assets/themes/theme-poppy.css +58 -0
- package/assets/themes/theme-sage.css +50 -0
- package/dist/browser-entry.js +615 -0
- package/dist/cli.js +187 -0
- package/dist/layout.js +42 -0
- package/dist/orz-slides.browser.js +388 -0
- package/dist/render-slide.js +149 -0
- package/dist/slide-parser.js +622 -0
- package/dist/template.js +275 -0
- package/dist/types.js +12 -0
- package/orz-slides-skills/SKILL.md +386 -0
- package/package.json +50 -0
package/README.md
ADDED
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# orz-slides
|
|
2
|
+
|
|
3
|
+
Turn notes or Markdown into a **single, self-contained `.slides.html`** — one
|
|
4
|
+
portable file that presents like a slide deck in any browser, is authored in
|
|
5
|
+
[orz-markdown](https://www.npmjs.com/package/orz-markdown) with a small layout
|
|
6
|
+
syntax, and stays *quietly editable*. Built on
|
|
7
|
+
[reveal.js](https://revealjs.com) for the deck mechanics.
|
|
8
|
+
|
|
9
|
+
One file. Open it in a browser to present. Pop out a per-slide editor to change
|
|
10
|
+
a slide. Save it back in place. Nothing to install for the audience.
|
|
11
|
+
|
|
12
|
+
> **Status: functional, not yet published.** The authoring syntax, CLI, engine,
|
|
13
|
+
> and in-file editor all work (see [DESIGN.md](./DESIGN.md)); the npm packages
|
|
14
|
+
> aren't published yet. Speaker view, step-reveal fragments, an on-deck timer,
|
|
15
|
+
> and slide numbers are wired; **PDF export** is the remaining planned extra.
|
|
16
|
+
|
|
17
|
+
## What a `.slides.html` does
|
|
18
|
+
|
|
19
|
+
1. **Presents in any browser.** The deck is a reveal.js presentation —
|
|
20
|
+
keyboard/touch navigation, slide overview (ESC), fullscreen (F) — with no
|
|
21
|
+
install for the viewer.
|
|
22
|
+
2. **Authored in orz-markdown.** Every slide is Markdown (math, mermaid, smiles,
|
|
23
|
+
qr, charts, tabs, containers) — never hand-written HTML — divided into
|
|
24
|
+
regions by a small **comment-based layout syntax**.
|
|
25
|
+
3. **Edits in place.** A per-slide **pop-out editor** (CodeMirror + live preview
|
|
26
|
+
of just that slide) lets you rewrite a slide and **Save** the whole file —
|
|
27
|
+
in-place on Chromium, or as a downloaded copy elsewhere.
|
|
28
|
+
4. **Template-driven structure pages.** Title, section, outline, and closing
|
|
29
|
+
slides come from a small gallery of templates.
|
|
30
|
+
5. **Self-contained.** The deck source is embedded in the file as the single
|
|
31
|
+
source of truth. By default the CLI **inlines** the engine, reveal's core CSS,
|
|
32
|
+
and all seven themes, so a deck **presents and switches themes even offline**.
|
|
33
|
+
Only KaTeX (math), Mermaid, SmilesDrawer, Chart.js, and the editor
|
|
34
|
+
(CodeMirror) load from CDN — so a deck that uses math/diagrams/charts, or
|
|
35
|
+
in-browser editing, needs internet. `--cdn` references the engine + theme from
|
|
36
|
+
jsDelivr instead.
|
|
37
|
+
|
|
38
|
+
The deck source lives in the file as the single source of truth; Save
|
|
39
|
+
re-serializes the whole document around it:
|
|
40
|
+
|
|
41
|
+
```html
|
|
42
|
+
<script type="text/orz-slides" id="orz-deck">
|
|
43
|
+
...deck config + slides (this is what you write)...
|
|
44
|
+
</script>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
> "Self-contained" means *works as one file*. With the default `--inline`, the
|
|
48
|
+
> engine, reveal's core CSS, and all themes are embedded — a text deck presents
|
|
49
|
+
> offline. The math/diagram/chart libraries (KaTeX, Mermaid, SmilesDrawer,
|
|
50
|
+
> Chart.js) and the editor (CodeMirror) load from CDN, so a deck that uses them,
|
|
51
|
+
> or in-browser editing, needs internet. With `--cdn`, the engine + theme load
|
|
52
|
+
> from jsDelivr too. Presenting works in all modern browsers; in-place Save needs
|
|
53
|
+
> a Chromium browser.
|
|
54
|
+
|
|
55
|
+
## Its place in the orz family
|
|
56
|
+
|
|
57
|
+
orz-slides is the slide-deck sibling of
|
|
58
|
+
[orz-mdhtml](https://www.npmjs.com/package/orz-mdhtml), sharing the same
|
|
59
|
+
philosophy — deck-first, quietly editable, self-contained, CDN-delivered
|
|
60
|
+
renderer — and the same in-file editor stack (CodeMirror with a dark theme on
|
|
61
|
+
dark decks, live preview, File System Access save, theme picker, and
|
|
62
|
+
copy-as-markdown — selecting rendered slide content copies its Markdown source).
|
|
63
|
+
Both render content through **orz-markdown**:
|
|
64
|
+
|
|
65
|
+
- **orz-markdown** — the Markdown renderer (parser, plugins, themes) that turns
|
|
66
|
+
region bodies into HTML.
|
|
67
|
+
- **orz-mdhtml** — produces an editable `.md.html` *document* to read and
|
|
68
|
+
annotate.
|
|
69
|
+
- **orz-slides** — produces an editable `.slides.html` *deck* to present.
|
|
70
|
+
|
|
71
|
+
Reach for `.md.html` when the output is a document to read; reach for
|
|
72
|
+
`.slides.html` when it is a deck to present.
|
|
73
|
+
|
|
74
|
+
## Authoring example
|
|
75
|
+
|
|
76
|
+
A deck source is plain text: an optional leading `<!-- deck … -->` config block,
|
|
77
|
+
then a sequence of slides. **Every slide begins with a `<!-- slide … -->`
|
|
78
|
+
marker** — that marker is also the slide separator. There is no bare `---`.
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
<!-- deck
|
|
82
|
+
title: Controlled Polymerization
|
|
83
|
+
theme: executive
|
|
84
|
+
ratio: 16:9
|
|
85
|
+
author: Dr. Yu Wang
|
|
86
|
+
footer: Internal · v3 · 2026
|
|
87
|
+
-->
|
|
88
|
+
|
|
89
|
+
<!-- slide template=title -->
|
|
90
|
+
# Controlled Polymerization
|
|
91
|
+
## RAFT vs ATRP
|
|
92
|
+
**Dr. Yu Wang** · University of Louisiana · 2026
|
|
93
|
+
|
|
94
|
+
<!-- slide -->
|
|
95
|
+
## Why controlled polymerization
|
|
96
|
+
- Narrow dispersity, predictable chain length
|
|
97
|
+
- Block copolymers by sequential addition
|
|
98
|
+
- The tradeoff: rate vs control
|
|
99
|
+
|
|
100
|
+
<!-- slide 2col 3/2 -->
|
|
101
|
+
## Results at a glance
|
|
102
|
+
<!-- @left -->
|
|
103
|
+
- Accuracy **92%** across all runs
|
|
104
|
+
- Latency under **40 ms**
|
|
105
|
+
<!-- @right -->
|
|
106
|
+
{{smiles C(=S)(SC)SC}}
|
|
107
|
+
<!-- @notes -->
|
|
108
|
+
Lead with accuracy; the latency number is the surprise — pause here.
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
The leading `## h2` becomes each slide's title band automatically; layout
|
|
112
|
+
presets (`2col`, `3col`, `main-side`, `quad`, …) and raw `row/col` splits divide
|
|
113
|
+
the content area into named regions filled by `<!-- @name -->`. See
|
|
114
|
+
[orz-slides-skills/SKILL.md](./orz-slides-skills/SKILL.md) for the full layout
|
|
115
|
+
grammar, templates, and per-container capacity budgets.
|
|
116
|
+
|
|
117
|
+
## Use with an AI agent
|
|
118
|
+
|
|
119
|
+
The package ships an **agent skill** that teaches an AI agent the deck format — the
|
|
120
|
+
layout grammar, structure templates, regions, and floats. The quickest way to build a
|
|
121
|
+
deck is to let an agent do it:
|
|
122
|
+
|
|
123
|
+
- **Any agent** — point it at the skill, then describe what you want:
|
|
124
|
+
`https://cdn.jsdelivr.net/npm/orz-slides/orz-slides-skills/SKILL.md`
|
|
125
|
+
- **Claude Code** — copy `orz-slides-skills/` into `~/.claude/skills/orz-slides/`.
|
|
126
|
+
|
|
127
|
+
More install routes: <https://markdown.orz.how/agents.html> · layout reference:
|
|
128
|
+
<https://markdown.orz.how/slides.html>
|
|
129
|
+
|
|
130
|
+
## Key features
|
|
131
|
+
|
|
132
|
+
- **Portable & self-contained** — one `.slides.html` opens and presents in any
|
|
133
|
+
modern browser; with the default `--inline`, the engine and all themes are
|
|
134
|
+
embedded (math/diagram libraries still load from CDN).
|
|
135
|
+
- **Markdown-native slides** — orz-markdown content (math, mermaid, smiles, qr,
|
|
136
|
+
charts) in every region, never hand-written HTML.
|
|
137
|
+
- **Layout by space division** — a recursive `row`/`col` split grammar, with
|
|
138
|
+
terse preset aliases for the common cases.
|
|
139
|
+
- **In-browser per-slide editor** — pop-out CodeMirror + live preview; deck ops
|
|
140
|
+
(add / duplicate / delete / reorder / theme).
|
|
141
|
+
- **Structure templates** — `title` / `section` / `outline` / `closing` pages
|
|
142
|
+
(`title` is fully styled; the others are evolving).
|
|
143
|
+
- **Presenter tools** — navigation, slide overview, fullscreen, slide numbers,
|
|
144
|
+
and a progress bar from reveal.js; a self-contained **speaker view** (press
|
|
145
|
+
**S** — current/next slide, your `@notes`, clock + timer) and an on-deck
|
|
146
|
+
**clock/timer** overlay (press **T**). Speaker notes are authored with
|
|
147
|
+
`<!-- @notes -->` and stored per slide.
|
|
148
|
+
- **Step-reveal fragments** — `<!-- slide step -->` reveals a slide's content
|
|
149
|
+
one piece at a time (lists per item); or tag individual blocks with
|
|
150
|
+
`{{attrs[.fragment]}}`.
|
|
151
|
+
- **Overflow that behaves** — scale-to-fit per region (with `fit=scroll|off`),
|
|
152
|
+
backed by agent capacity budgets so slides are authored within their bounds.
|
|
153
|
+
|
|
154
|
+
## Browser support
|
|
155
|
+
|
|
156
|
+
| Feature | Support |
|
|
157
|
+
|---|---|
|
|
158
|
+
| Present, navigation, overview, fullscreen, theme switch | All modern browsers |
|
|
159
|
+
| Per-slide pop-out editor (CodeMirror, live preview) | All modern browsers |
|
|
160
|
+
| **Save in place** (File System Access API) | Chromium (Chrome/Edge); others fall back to download a copy |
|
|
161
|
+
|
|
162
|
+
A deck that uses math/diagrams/charts needs internet for those libraries (and
|
|
163
|
+
reveal's core CSS), cached after first open. With `--inline` (default) the engine
|
|
164
|
+
and theme are embedded.
|
|
165
|
+
|
|
166
|
+
## Security — treat these as programs, not documents
|
|
167
|
+
|
|
168
|
+
A `.slides.html` is **self-contained executable HTML**: opening one runs the
|
|
169
|
+
JavaScript embedded in it (the engine, the editor, and — because the parser allows
|
|
170
|
+
raw HTML in the source — potentially anything in the content). The trust model is
|
|
171
|
+
the same as **running a downloaded program**, not opening a PDF.
|
|
172
|
+
|
|
173
|
+
- **Only open or edit files from sources you trust.** Anyone can craft a file that
|
|
174
|
+
looks authentic (same chrome, logo, layout) but contains hostile code. The
|
|
175
|
+
format has no built-in authenticity — appearance proves nothing.
|
|
176
|
+
- **What the browser limits.** A page can't run native code or read your disk
|
|
177
|
+
silently (Save uses the File System Access prompt and is scoped to the file you
|
|
178
|
+
pick). Realistic harm from a hostile file is web-context — phishing, exfiltrating
|
|
179
|
+
what you type or paste, beaconing — within the browser sandbox.
|
|
180
|
+
- **The one-click update is opt-in and fixed-source.** It only checks for and
|
|
181
|
+
fetches a new framework after you enter edit mode and click **Update**, always
|
|
182
|
+
from the canonical jsDelivr packages over HTTPS (the source is hardcoded in the
|
|
183
|
+
engine — a tampered file cannot redirect it), and it shows the exact URLs for
|
|
184
|
+
confirmation first. Clicking Update places trust in npm + jsDelivr for those
|
|
185
|
+
packages.
|
|
186
|
+
- **Integrity can't be self-verified.** A file cannot prove its own integrity (a
|
|
187
|
+
forgery would just lie). If you need authenticity, verify it out-of-band — a
|
|
188
|
+
checksum or signature from the publisher over a trusted channel.
|
|
189
|
+
|
|
190
|
+
## License
|
|
191
|
+
|
|
192
|
+
MIT
|