div-deck 0.1.0 → 0.1.2
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 +48 -60
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,73 +1,61 @@
|
|
|
1
|
-
#
|
|
1
|
+
# div.deck
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Browser-based editor for HTML slide decks. Edit slides visually with click-to-select, inline text editing, drag-to-reorder, and full-screen presentation mode.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Built for editing slide decks generated by the [visual-explainer](https://github.com/nicobailon/visual-explainer) skill. Expects decks using the `<section class="slide slide--{type}">` structure that skill produces.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)
|
|
7
|
+
## Quick Start
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
```bash
|
|
10
|
+
npx div-deck init
|
|
11
|
+
```
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
This walks you through setup:
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
1. **Picks your presentations folder** — where your `.html` slide decks live (default: `./presentations`)
|
|
16
|
+
2. **Adds an npm script** — so you can run `npm run deck` to launch the editor
|
|
17
|
+
3. **Installs a Claude Code command** — type `/presentations` in Claude Code to start editing
|
|
15
18
|
|
|
16
|
-
|
|
19
|
+
Once set up, launch the editor anytime with:
|
|
17
20
|
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
{
|
|
22
|
-
files: ['**/*.{ts,tsx}'],
|
|
23
|
-
extends: [
|
|
24
|
-
// Other configs...
|
|
21
|
+
```bash
|
|
22
|
+
npm run deck
|
|
23
|
+
```
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
tseslint.configs.recommendedTypeChecked,
|
|
28
|
-
// Alternatively, use this for stricter rules
|
|
29
|
-
tseslint.configs.strictTypeChecked,
|
|
30
|
-
// Optionally, add this for stylistic rules
|
|
31
|
-
tseslint.configs.stylisticTypeChecked,
|
|
25
|
+
Or run it directly:
|
|
32
26
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
languageOptions: {
|
|
36
|
-
parserOptions: {
|
|
37
|
-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
38
|
-
tsconfigRootDir: import.meta.dirname,
|
|
39
|
-
},
|
|
40
|
-
// other options...
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
])
|
|
27
|
+
```bash
|
|
28
|
+
npx div-deck ./path/to/slides
|
|
44
29
|
```
|
|
45
30
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
// Enable lint rules for React DOM
|
|
62
|
-
reactDom.configs.recommended,
|
|
63
|
-
],
|
|
64
|
-
languageOptions: {
|
|
65
|
-
parserOptions: {
|
|
66
|
-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
67
|
-
tsconfigRootDir: import.meta.dirname,
|
|
68
|
-
},
|
|
69
|
-
// other options...
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
])
|
|
31
|
+
## What It Does
|
|
32
|
+
|
|
33
|
+
- **File browser** — list, open, and delete `.html` slide decks
|
|
34
|
+
- **Visual editing** — click any element to select it, click again to edit text inline
|
|
35
|
+
- **Drag to reorder** — reorder slides in the sidebar or elements within a slide
|
|
36
|
+
- **Undo/redo** — full history with Cmd+Z / Cmd+Shift+Z
|
|
37
|
+
- **Presentation mode** — full-screen slideshow with keyboard navigation
|
|
38
|
+
- **Auto-save friendly** — saves preserve your editing state (active tab, open file)
|
|
39
|
+
|
|
40
|
+
## Usage with Claude Code
|
|
41
|
+
|
|
42
|
+
After running `div-deck init`, you get a `/presentations` command in Claude Code. This starts the editor and opens your browser — handy when you're generating slide decks with [visual-explainer](https://github.com/nicobailon/visual-explainer) and want to preview or tweak them.
|
|
43
|
+
|
|
44
|
+
## Options
|
|
45
|
+
|
|
73
46
|
```
|
|
47
|
+
div-deck [directory] Start the editor
|
|
48
|
+
div-deck init Interactive project setup
|
|
49
|
+
div-deck --port 8080 ./slides Use a custom port (default: 3001)
|
|
50
|
+
div-deck --help Show help
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## How It Works
|
|
54
|
+
|
|
55
|
+
div.deck runs a single local server that serves both the editor UI and a file API. Slides render in iframes for perfect style isolation — your deck's CSS never leaks into the editor and vice versa.
|
|
56
|
+
|
|
57
|
+
The editor never modifies your HTML structure. It parses the deck, lets you edit visually, and serializes back to clean HTML.
|
|
58
|
+
|
|
59
|
+
## License
|
|
60
|
+
|
|
61
|
+
MIT
|