immerslides 1.0.0-beta-6 → 1.0.0-beta-7
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 +165 -80
- package/README.zh-TW.md +221 -74
- package/bin/immerslides.mjs +8 -5
- package/dist/code/HighlightedCode.d.ts +1 -0
- package/dist/code/HighlightedCode.js +11 -2
- package/dist/code/highlighting.js +3 -2
- package/dist/code/languages.d.ts +11 -0
- package/dist/code/languages.js +167 -0
- package/dist/i18n/messages.d.ts +7 -0
- package/dist/i18n/messages.js +14 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/player/index.d.ts +8 -0
- package/dist/player/index.js +8 -0
- package/dist/presentation/Player.js +41 -3
- package/dist/presentation/PlayerToolbar.d.ts +6 -2
- package/dist/presentation/PlayerToolbar.js +3 -3
- package/dist/presentation/Presenter.js +8 -50
- package/dist/presentation/PresenterPanels.d.ts +23 -0
- package/dist/presentation/PresenterPanels.js +27 -0
- package/dist/presentation/Stage.js +1 -1
- package/dist/presentation/types.d.ts +9 -0
- package/dist/presentation/useTimer.d.ts +7 -0
- package/dist/presentation/useTimer.js +40 -0
- package/dist/presenter-console/Clock.d.ts +4 -0
- package/dist/presenter-console/Clock.js +7 -0
- package/dist/presenter-console/ConsoleHeader.d.ts +10 -0
- package/dist/presenter-console/ConsoleHeader.js +8 -0
- package/dist/presenter-console/ConsoleLayout.d.ts +15 -0
- package/dist/presenter-console/ConsoleLayout.js +9 -0
- package/dist/presenter-console/ConsoleNavigation.d.ts +12 -0
- package/dist/presenter-console/ConsoleNavigation.js +8 -0
- package/dist/presenter-console/JumpSelect.d.ts +6 -0
- package/dist/presenter-console/JumpSelect.js +11 -0
- package/dist/presenter-console/PresenterConsole.d.ts +14 -0
- package/dist/presenter-console/PresenterConsole.js +26 -0
- package/dist/presenter-console/channel.d.ts +27 -0
- package/dist/presenter-console/channel.js +31 -0
- package/dist/presenter-console/index.d.ts +3 -0
- package/dist/presenter-console/index.js +5 -0
- package/dist/presenter-console/sync.d.ts +7 -0
- package/dist/presenter-console/sync.js +31 -0
- package/dist/presenter-console/usePresenterConsole.d.ts +19 -0
- package/dist/presenter-console/usePresenterConsole.js +70 -0
- package/dist/site/Site.js +10 -175
- package/dist/site/SitePage.d.ts +16 -0
- package/dist/site/SitePage.js +51 -0
- package/dist/site/hooks.d.ts +8 -0
- package/dist/site/hooks.js +137 -0
- package/dist/site/model.d.ts +22 -0
- package/dist/site/model.js +8 -0
- package/dist/slides/ChapterRail.js +3 -1
- package/dist/slides/SlideFrame.d.ts +7 -3
- package/dist/slides/SlideFrame.js +4 -2
- package/dist/styles/base.css +1208 -0
- package/dist/styles/presenter.css +260 -0
- package/dist/styles/site.css +239 -0
- package/dist/styles.css +61 -1
- package/package.json +18 -3
- package/skills/immerslides/SKILL.md +44 -34
- package/skills/immerslides/references/authoring.md +4 -2
- package/skills/immerslides/references/composition.md +18 -26
- package/skills/immerslides/references/features.md +31 -28
- package/skills/immerslides/references/presenter.md +28 -0
- package/skills/immerslides/references/site.md +1 -1
- package/skills/immerslides-en/SKILL.md +40 -30
- package/skills/immerslides-en/references/authoring.md +4 -2
- package/skills/immerslides-en/references/composition.md +18 -26
- package/skills/immerslides-en/references/features.md +31 -28
- package/skills/immerslides-en/references/presenter.md +28 -0
- package/skills/immerslides-en/references/site.md +1 -1
- package/starter/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,51 +10,38 @@
|
|
|
10
10
|

|
|
11
11
|
[](LICENSE)
|
|
12
12
|
|
|
13
|
-
React presentations with immersive code and flow walkthroughs.
|
|
13
|
+
React presentations with immersive code and flow walkthroughs. Write slides as React components, reveal code and flows one focus at a time, and publish the same deck as a scrolling reading site.
|
|
14
14
|
|
|
15
15
|
**English** | [繁體中文](README.zh-TW.md)
|
|
16
16
|
|
|
17
17
|
## Features
|
|
18
18
|
|
|
19
|
-
- **Full-page clicks.** One click advances to the next complete slide.
|
|
20
|
-
- **
|
|
21
|
-
- **Flow timelines.** `Timeline`, `FlowNode`, and `FlowConnector` show
|
|
22
|
-
- **Presenter mode.** Press `P`
|
|
23
|
-
- **
|
|
24
|
-
- **Shareable URLs.** Every slide and step has a
|
|
25
|
-
- **
|
|
26
|
-
- **Reduced motion.**
|
|
19
|
+
- **Full-page clicks.** One click advances to the next complete slide. Add extra steps only where the talk needs them.
|
|
20
|
+
- **Code walkthroughs.** `CodeBlock` highlights code in TypeScript, Python, Java, SQL, JSON, YAML, Bash, HTML, CSS, and more, and steps through it one focus at a time.
|
|
21
|
+
- **Flow timelines.** `Timeline`, `FlowNode`, and `FlowConnector` show a process and its steps.
|
|
22
|
+
- **Presenter mode.** Press `P` for a window with the current slide, the next slide, speaker notes, and a timer.
|
|
23
|
+
- **Navigator.** Press `O` to browse chapters and slides as an outline or thumbnails, and filter the slides you marked.
|
|
24
|
+
- **Shareable URLs.** Every slide and step has a link, such as `/#/code-walkthrough?step=2`.
|
|
25
|
+
- **Reading version.** `Site` publishes the same deck as a scrolling page.
|
|
26
|
+
- **Reduced motion.** Transitions turn off for people who prefer less motion, and all content stays visible.
|
|
27
27
|
- **Agent skill.** A bundled skill helps AI coding agents write and revise decks.
|
|
28
28
|
|
|
29
|
-
##
|
|
29
|
+
## Quick start
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
- pnpm 12.20.0 (pinned by the `packageManager` field)
|
|
31
|
+
### Try the demo
|
|
33
32
|
|
|
34
|
-
|
|
35
|
-
nvm install
|
|
36
|
-
nvm use
|
|
37
|
-
npm install --global pnpm@12.20.0
|
|
38
|
-
pnpm install
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## Quick start: run the demo
|
|
33
|
+
You need Node.js 26 or later and pnpm 12.20.0. The repository pins pnpm in its `packageManager` field, and `.nvmrc` pins Node.
|
|
42
34
|
|
|
43
35
|
```sh
|
|
36
|
+
pnpm install
|
|
44
37
|
pnpm dev
|
|
45
38
|
```
|
|
46
39
|
|
|
47
|
-
Open the URL
|
|
48
|
-
|
|
49
|
-
The demo lives in [`starter/`](starter/):
|
|
50
|
-
|
|
51
|
-
- `/` shows the view set by `defaultView` in `starter/src/config.ts`.
|
|
52
|
-
- `/slides/` always shows the presentation.
|
|
53
|
-
- `/site/` always shows the scrolling site.
|
|
40
|
+
Open the URL Vite prints, usually `http://127.0.0.1:5173/`. The demo covers layouts, flow diagrams, code highlighting, step-by-step focus, presenter mode, and playback. Three routes are fixed: `/` shows the view set in `starter/src/config.ts`, `/slides/` shows the presentation, and `/site/` shows the scrolling reading view.
|
|
54
41
|
|
|
55
|
-
|
|
42
|
+
### Create your own presentation
|
|
56
43
|
|
|
57
|
-
The package is not
|
|
44
|
+
The package is not on npm yet. From this repository, pack it, then create a project from the tarball:
|
|
58
45
|
|
|
59
46
|
```sh
|
|
60
47
|
pnpm pack --out immerslides.tgz
|
|
@@ -65,31 +52,25 @@ pnpm add "$TARBALL"
|
|
|
65
52
|
pnpm dev
|
|
66
53
|
```
|
|
67
54
|
|
|
68
|
-
The `create` command copies the starter project and the agent
|
|
55
|
+
The `create` command copies the starter project and the two agent skills into the new directory. It refuses to write into a non-empty directory and does not install dependencies, so run `pnpm add` before `pnpm dev`.
|
|
69
56
|
|
|
70
|
-
After the package is published, you
|
|
57
|
+
After the package is published, you can run `pnpm dlx immerslides create my-presentation`, then `pnpm install` and `pnpm dev`.
|
|
71
58
|
|
|
72
|
-
|
|
73
|
-
pnpm dlx immerslides create my-presentation
|
|
74
|
-
cd my-presentation
|
|
75
|
-
pnpm install
|
|
76
|
-
pnpm dev
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
## Use with an AI agent
|
|
80
|
-
|
|
81
|
-
New projects include two skills under `.agents/skills/`: `immerslides` (Chinese) and `immerslides-en` (English). In an agent that supports project skills, invoke one of them with a prompt such as:
|
|
59
|
+
To install from GitHub Packages instead, set the registry for the `@<repository-owner>` scope and log in with a token that has `read:packages`. Projects created by the CLI map the scoped package to `immerslides` with an npm alias, so the import paths stay the same.
|
|
82
60
|
|
|
83
|
-
|
|
84
|
-
$immerslides-en Turn this material into a CI talk.
|
|
85
|
-
One click should advance one full slide. Do not split a flow into one click per node.
|
|
86
|
-
```
|
|
61
|
+
Start with these files:
|
|
87
62
|
|
|
88
|
-
|
|
63
|
+
| File | What to change |
|
|
64
|
+
| ----------------- | --------------------------------------------------------------------------------------------- |
|
|
65
|
+
| `src/deck.tsx` | Your slides, their order, the chapters, and the speaker notes. It holds the demo content now. |
|
|
66
|
+
| `src/config.ts` | `defaultView` (what `/` shows) and `locale` (`zh-Hant` or `en`). |
|
|
67
|
+
| `src/site.tsx` | The reading view. Usually no change is needed. |
|
|
68
|
+
| `src/styles.css` | Styles for the demo only. Replace them with your own, or delete them. |
|
|
69
|
+
| `src/examples.ts` | Sample code and timeline data for the demo. Delete it when your deck no longer uses it. |
|
|
89
70
|
|
|
90
|
-
## Use in
|
|
71
|
+
## Use in your React project
|
|
91
72
|
|
|
92
|
-
Import the
|
|
73
|
+
Import the styles once, in the entry file, and pass a deck to `Player`:
|
|
93
74
|
|
|
94
75
|
```tsx
|
|
95
76
|
import { Player } from 'immerslides/player';
|
|
@@ -101,7 +82,9 @@ export function App() {
|
|
|
101
82
|
}
|
|
102
83
|
```
|
|
103
84
|
|
|
104
|
-
|
|
85
|
+
The stylesheet is required. Without it the player renders with no layout.
|
|
86
|
+
|
|
87
|
+
Define the deck with `defineDeck`. It sets the slides, their order, the chapters, and a `RenderSlide` component that draws each slide:
|
|
105
88
|
|
|
106
89
|
```tsx
|
|
107
90
|
import { defineDeck, SlideFrame, type SlideRenderProps } from 'immerslides';
|
|
@@ -128,48 +111,77 @@ export const deck = defineDeck({
|
|
|
128
111
|
});
|
|
129
112
|
```
|
|
130
113
|
|
|
131
|
-
|
|
114
|
+
Each slide advances with one click by default, which is `steps: 1`. Set a larger `steps` only when a slide needs focus states. `steps` counts the initial state, so `steps: 2` gives the values `0` and `1`.
|
|
115
|
+
|
|
116
|
+
Slide and deck options:
|
|
117
|
+
|
|
118
|
+
- `SlideFrame` takes `layout="image"` for a full-slide picture with no chapter rail, heading, or footer. Use `header={false}` to hide the heading and `footer={false}` to hide the footer.
|
|
119
|
+
- `presenter: false` removes the presenter button and the `P` shortcut from a deck that does not need them.
|
|
120
|
+
- `chapterRail: { toggle: true }` lets the audience collapse the chapter rail. A chapter with `numbered: false` is listed without a number, and the other chapters still count from 01.
|
|
121
|
+
|
|
122
|
+
### Choosing an entry point
|
|
123
|
+
|
|
124
|
+
The main entry exports everything: the authoring components, the player, and the site view. Bundlers remove the parts you do not use, so `import { CodeWindow } from 'immerslides'` adds only the code window to your bundle. When a file needs only one job, use the entry for that job:
|
|
125
|
+
|
|
126
|
+
| Import | Provides | Use it for |
|
|
127
|
+
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------- | --------------------------------- |
|
|
128
|
+
| `immerslides` | Everything: `defineDeck`, `SlideFrame`, the code and flow components, `Player`, `Site`, and hooks | Most code |
|
|
129
|
+
| `immerslides/player` | `Player`, `SlideNavigator`, `SlidePreview`, `usePlayback`, `getSlideHref`, `fadeTransition` | Files that only play a deck |
|
|
130
|
+
| `immerslides/site` | `Site`, `SiteStory`, `getSiteHref` | The reading view |
|
|
131
|
+
| `immerslides/presenter` | `PresenterConsole`, `PresenterSync`, `stepCue` (optional, see below) | The console and the audience sync |
|
|
132
|
+
| `immerslides/styles.css` | All global styles. Import once. | Styles |
|
|
133
|
+
| `immerslides/styles/base.css`, `immerslides/styles/presenter.css`, `immerslides/styles/site.css` | The style parts. Import `base.css` first, then the parts you use. | Shipping less CSS |
|
|
134
|
+
|
|
135
|
+
#### Deprecated entries
|
|
136
|
+
|
|
137
|
+
These entries still work, but they will be removed in a future release. Move to the entry in the right column:
|
|
132
138
|
|
|
133
|
-
|
|
139
|
+
| Deprecated | Use instead |
|
|
140
|
+
| ------------------------------------------------------------------------------------------------------------- | -------------------------------------- |
|
|
141
|
+
| `immerslides/deck` | `immerslides` |
|
|
142
|
+
| `immerslides/slide-frame`, `immerslides/chapter-guide` | `immerslides` |
|
|
143
|
+
| `immerslides/slide-navigator`, `immerslides/slide-preview` | `immerslides/player`, or `immerslides` |
|
|
144
|
+
| `immerslides/code-block`, `immerslides/code-window`, `immerslides/highlighted-code` | `immerslides` |
|
|
145
|
+
| `immerslides/timeline`, `immerslides/flow-node`, `immerslides/flow-connector`, `immerslides/step-description` | `immerslides` |
|
|
146
|
+
| `immerslides/presenter-console`, `immerslides/presenter-sync` | `immerslides/presenter` |
|
|
134
147
|
|
|
135
|
-
|
|
136
|
-
| ----------------------------------------------------------------------------------- | ----------------------------------------------------------- |
|
|
137
|
-
| `immerslides` | Everything below, plus `usePlayback` and `useReducedMotion` |
|
|
138
|
-
| `immerslides/player` | `Player` |
|
|
139
|
-
| `immerslides/deck` | `defineDeck` and the deck types |
|
|
140
|
-
| `immerslides/site` | `Site`, `SiteStory`, `getSiteHref` |
|
|
141
|
-
| `immerslides/slide-frame`, `immerslides/chapter-guide` | `SlideFrame`, `ChapterGuide` |
|
|
142
|
-
| `immerslides/slide-navigator`, `immerslides/slide-preview` | `SlideNavigator`, `SlidePreview` |
|
|
143
|
-
| `immerslides/code-block`, `immerslides/code-window`, `immerslides/highlighted-code` | `CodeBlock`, `CodeWindow`, `HighlightedCode` |
|
|
144
|
-
| `immerslides/timeline`, `immerslides/flow-node`, `immerslides/flow-connector` | `Timeline`, `FlowNode`, `FlowConnector` |
|
|
145
|
-
| `immerslides/step-description` | `StepDescription` |
|
|
146
|
-
| `immerslides/styles.css` | Global styles. Import once. |
|
|
148
|
+
To ship less CSS, import `immerslides/styles/base.css` first and then only the parts you use. `styles.css` is the three parts together.
|
|
147
149
|
|
|
148
|
-
|
|
150
|
+
Syntax highlighting loads the language the first time a code block needs it, so the main entry does not include highlight.js. Until then, code shows as plain text with the same layout.
|
|
151
|
+
|
|
152
|
+
## Writing slides
|
|
153
|
+
|
|
154
|
+
- **Keep the click rhythm.** Advance whole slides by default. A flow slide shows at most three nodes; carry a longer flow onto a continuation slide.
|
|
155
|
+
- **Walk through code and flows.** `CodeBlock` and `Timeline` take `steps`, which focus one section at a time. See [immersive walkthroughs](skills/immerslides-en/references/immersive.md).
|
|
156
|
+
- **Write speaker notes.** Add `notes` to a slide. The notes appear only in the presenter window, never on the audience slide.
|
|
157
|
+
- **Share links.** Give a slide a `slug` for a stable link, and build links inside the content with `getSlideHref(deck, id, step)`.
|
|
158
|
+
- **Translate.** Use `translations` in `defineDeck`. See [Localization](#localization).
|
|
159
|
+
|
|
160
|
+
The guides cover the rest:
|
|
149
161
|
|
|
150
162
|
- [Authoring guide](skills/immerslides-en/references/authoring.md): deck definitions and the public API
|
|
151
163
|
- [Features](skills/immerslides-en/references/features.md): what each feature is for
|
|
152
164
|
- [Immersive walkthroughs](skills/immerslides-en/references/immersive.md): step-by-step code and flow focus
|
|
153
165
|
- [Composition](skills/immerslides-en/references/composition.md): custom layouts with the standalone components
|
|
154
|
-
- [Presenter mode](skills/immerslides-en/references/presenter.md): notes, next-slide preview, and
|
|
166
|
+
- [Presenter mode](skills/immerslides-en/references/presenter.md): notes, next-slide preview, timer, and the console
|
|
155
167
|
- [Slide URLs](skills/immerslides-en/references/urls.md): slugs, hash URLs, and `getSlideHref`
|
|
156
168
|
- [Site view](skills/immerslides-en/references/site.md): publishing the deck as a reading page
|
|
157
169
|
|
|
158
|
-
The Chinese versions
|
|
170
|
+
The Chinese versions are in [`skills/immerslides/references/`](skills/immerslides/references/).
|
|
159
171
|
|
|
160
|
-
##
|
|
172
|
+
## Reading view
|
|
161
173
|
|
|
162
|
-
|
|
174
|
+
`Site` from `immerslides/site` renders the same deck as a scrolling page. The starter's `src/site.tsx` shows the usage:
|
|
163
175
|
|
|
164
176
|
```tsx
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
177
|
+
import { Site } from 'immerslides/site';
|
|
178
|
+
|
|
179
|
+
<Site deck={deck} presentationHref="./slides/" locale="en" />;
|
|
168
180
|
```
|
|
169
181
|
|
|
170
|
-
|
|
182
|
+
`presentationHref` is the address of the presentation, so readers can switch to it.
|
|
171
183
|
|
|
172
|
-
##
|
|
184
|
+
## Playing and sharing
|
|
173
185
|
|
|
174
186
|
| Key | Action |
|
|
175
187
|
| ------------------- | -------------------------------------------------------- |
|
|
@@ -180,18 +192,91 @@ Translate slide titles, notes, chapter titles, and the handout with `translation
|
|
|
180
192
|
| `O` | Open the chapter and slide navigator. |
|
|
181
193
|
| `F` | Toggle fullscreen. |
|
|
182
194
|
| `P` | Open or focus the presenter window. |
|
|
183
|
-
| `?` | Open the help dialog.
|
|
195
|
+
| `?` | Open the help dialog, which also restarts the deck. |
|
|
184
196
|
| Esc | Close menus. |
|
|
185
197
|
|
|
186
|
-
Reloading restores the slide and step from the URL. If the URL does not name a slide, the player restores the progress saved in the same tab.
|
|
198
|
+
Reloading restores the slide and step from the URL. If the URL does not name a slide, the player restores the progress saved in the same tab. Start from the beginning with `<Player deck={deck} fresh />`, or restart from the help dialog.
|
|
199
|
+
|
|
200
|
+
Marks made with the star in the navigator last for the current playback. Reloading or restarting clears them.
|
|
201
|
+
|
|
202
|
+
## Presenter console (optional)
|
|
203
|
+
|
|
204
|
+
The presenter console is a separate page for the speaker. It drives an audience page in another window of the same browser over a `BroadcastChannel`. It is not part of `Player`, and a deck works without it.
|
|
205
|
+
|
|
206
|
+
Put `PresenterSync` in the deck's `Controls` on the audience page, and mount `PresenterConsole` on its own route. Both sides use the same channel name:
|
|
207
|
+
|
|
208
|
+
```tsx
|
|
209
|
+
import { PresenterConsole, PresenterSync } from 'immerslides/presenter';
|
|
210
|
+
|
|
211
|
+
const Controls = (props) => (
|
|
212
|
+
<>
|
|
213
|
+
<PresenterSync
|
|
214
|
+
deck={deck}
|
|
215
|
+
channel="my-deck"
|
|
216
|
+
slideId={props.state.slideId}
|
|
217
|
+
step={props.state.step}
|
|
218
|
+
/>
|
|
219
|
+
</>
|
|
220
|
+
);
|
|
221
|
+
|
|
222
|
+
<PresenterConsole
|
|
223
|
+
deck={deck}
|
|
224
|
+
channel="my-deck"
|
|
225
|
+
audienceHref="../"
|
|
226
|
+
header={<SignOut />}
|
|
227
|
+
/>;
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
The console has no sign-in of its own. Pass anything your app needs, such as a sign-out form, as `header`.
|
|
231
|
+
|
|
232
|
+
## Localization
|
|
233
|
+
|
|
234
|
+
The player, presenter view, navigator, and site support `zh-Hant` (the default) and `en`. Pass `locale` to `Player` or `Site`:
|
|
235
|
+
|
|
236
|
+
```tsx
|
|
237
|
+
export function App() {
|
|
238
|
+
return <Player deck={deck} locale="en" />;
|
|
239
|
+
}
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
Translate slide titles, notes, chapter titles, and the handout with `translations` in `defineDeck`, keyed by locale. Text without a translation falls back to the authored text. Links are built from the authored titles, so they are the same in every language. Slide renderers receive `locale`, and `useI18n()` gives your own components the current `locale` and a translator `t` for the built-in interface text.
|
|
243
|
+
|
|
244
|
+
## Use with an AI agent
|
|
245
|
+
|
|
246
|
+
New projects include two skills under `.agents/skills/`: `immerslides` (Chinese) and `immerslides-en` (English). In an agent that supports project skills, invoke one of them with a prompt such as:
|
|
247
|
+
|
|
248
|
+
```text
|
|
249
|
+
$immerslides-en Turn this material into a CI talk.
|
|
250
|
+
One click should advance one full slide. Do not split a flow into one click per node.
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
The skills are written for the agent: they say which reference to read for each task and which mistakes to avoid. The sources are [`skills/immerslides/`](skills/immerslides/) (Chinese) and [`skills/immerslides-en/`](skills/immerslides-en/) (English). Keep the two versions in sync when you change one. To add a skill to an existing project, copy the matching folder to `.agents/skills/` in that project.
|
|
254
|
+
|
|
255
|
+
## Troubleshooting
|
|
256
|
+
|
|
257
|
+
| Symptom | What to check |
|
|
258
|
+
| ------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
259
|
+
| The slides have no layout or colors. | The entry file must import `immerslides/styles.css`. |
|
|
260
|
+
| Code appears as plain text for a moment. | Highlighting loads a language the first time it is needed. This is expected. For server rendering, await `preloadCodeLanguages([...])` before rendering, and call it with the same languages on the client before hydrating. |
|
|
261
|
+
| The presenter window does not open. | Allow pop-ups for the site. The player shows a message when the browser blocks the window. |
|
|
262
|
+
| The console does not follow the audience. | Both pages must use the same `channel` name, and both must be open in the same browser. |
|
|
263
|
+
| Saved progress lands on the wrong step after you edit slides. | Increase `version` when you change slides or steps. Start over with `fresh`, or restart from the help dialog. |
|
|
264
|
+
| Install or dev server fails with a Node version error. | Use Node.js 26 or later (see `.nvmrc`). |
|
|
187
265
|
|
|
188
266
|
## Deploy
|
|
189
267
|
|
|
190
268
|
The production build is a static site with a page for the player (`/`, `/slides/`) and the reading view (`/site/`). Deploy the entire build output directory to any static host, and keep the subfolders intact.
|
|
191
269
|
|
|
192
|
-
##
|
|
270
|
+
## For contributors
|
|
271
|
+
|
|
272
|
+
Set up the repository from its root:
|
|
193
273
|
|
|
194
|
-
|
|
274
|
+
```sh
|
|
275
|
+
nvm install
|
|
276
|
+
nvm use
|
|
277
|
+
npm install --global pnpm@12.20.0
|
|
278
|
+
pnpm install
|
|
279
|
+
```
|
|
195
280
|
|
|
196
281
|
| Command | Purpose |
|
|
197
282
|
| ----------------------- | -------------------------------------------------------------------- |
|
|
@@ -212,15 +297,15 @@ Project layout:
|
|
|
212
297
|
- `src/`: the library source (components, player, presenter, and site view)
|
|
213
298
|
- `bin/`: the `immerslides` CLI, which provides `create`
|
|
214
299
|
- `starter/`: the project template that the CLI copies, and the demo app for `pnpm dev`
|
|
215
|
-
- `skills/immerslides/`: the agent
|
|
300
|
+
- `skills/immerslides/` and `skills/immerslides-en/`: the agent skills and their reference documents
|
|
216
301
|
- `tests/`: Vitest unit tests and Playwright browser tests
|
|
217
302
|
- `scripts/`: build, package smoke test, and favicon generation
|
|
218
303
|
|
|
219
|
-
|
|
304
|
+
### Continuous integration
|
|
220
305
|
|
|
221
306
|
Pull requests and pushes to `main` run [`verify.yml`](.github/workflows/verify.yml). It runs lint, type checks, unit tests, package verification, and the Chromium browser tests. CodeQL analyzes JavaScript and TypeScript. For private repositories, GitHub Code Security must be enabled first. Dependabot checks the root project, the starter, and GitHub Actions every week.
|
|
222
307
|
|
|
223
|
-
|
|
308
|
+
### Releasing
|
|
224
309
|
|
|
225
310
|
The **Release** workflow is started manually from `main`. It runs the shared verification, publishes to npm and GitHub Packages, and creates a GitHub Release.
|
|
226
311
|
|