@markdstage/markdstage 0.1.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.
- package/README.md +90 -0
- package/bin/markdstage.mjs +12 -0
- package/package.json +45 -0
- package/shared/README.md +1014 -0
- package/shared/THIRD-PARTY-NOTICES.md +19 -0
- package/shared/deck-state.mjs +105 -0
- package/shared/docs/custom-theme-authoring.md +208 -0
- package/shared/markdown-deck.mjs +220 -0
- package/shared/markdstage-guide.mjs +276 -0
- package/shared/presenter-window.mjs +17 -0
- package/shared/renderer/architecture-document.mjs +596 -0
- package/shared/renderer/architecture-edit.mjs +298 -0
- package/shared/renderer/architecture-editor.mjs +449 -0
- package/shared/renderer/architecture.mjs +4033 -0
- package/shared/renderer/import-path.mjs +11 -0
- package/shared/renderer/index.html +106 -0
- package/shared/renderer/renderer.js +2082 -0
- package/shared/renderer/slides.css +614 -0
- package/shared/renderer/speaker-notes.mjs +106 -0
- package/shared/renderer/theme.mjs +205 -0
- package/shared/runtime/browser.mjs +539 -0
- package/shared/runtime/custom-theme.mjs +135 -0
- package/shared/runtime/deck-session.mjs +188 -0
- package/shared/runtime/errors.mjs +17 -0
- package/shared/runtime/output-paths.mjs +159 -0
- package/shared/runtime/output.mjs +385 -0
- package/shared/runtime/presentation-server.mjs +505 -0
- package/shared/runtime/static-files.mjs +70 -0
- package/shared/schema/README.md +228 -0
- package/shared/schema/architecture-v1.schema.json +664 -0
- package/shared/schema/examples/web-app.architecture.json +119 -0
- package/shared/schema/theme-metadata-v1.schema.json +75 -0
- package/shared/schema/theme-v1.json +84 -0
- package/shared/scripts/architecture-assets.mjs +226 -0
- package/shared/scripts/asset-paths.mjs +92 -0
- package/shared/scripts/atomic-markdown-replace.mjs +46 -0
- package/shared/scripts/markdown-blocks.mjs +182 -0
- package/shared/scripts/markdown-files.mjs +63 -0
- package/shared/scripts/markdown-save-coordinator.mjs +18 -0
- package/shared/scripts/markdown-watcher.mjs +80 -0
- package/shared/scripts/theme-paths.mjs +108 -0
- package/shared/scripts/vendor-assets.mjs +132 -0
- package/shared/scripts/workspace-root.mjs +32 -0
- package/shared/vendor/highlight.LICENSE +29 -0
- package/shared/vendor/highlight.min.js +1244 -0
- package/shared/vendor/marked.min.js +6 -0
- package/shared/vendor/mermaid.min.js.part-0001 +268 -0
- package/shared/vendor/mermaid.min.js.part-0002 +304 -0
- package/shared/vendor/mermaid.min.js.part-0003 +324 -0
- package/shared/vendor/mermaid.min.js.part-0004 +374 -0
- package/shared/vendor/mermaid.min.js.part-0005 +564 -0
- package/shared/vendor/mermaid.min.js.part-0006 +1308 -0
- package/shared/vendor/mermaid.min.js.part-0007 +269 -0
- package/shared/vendor/purify.min.js +3 -0
- package/shared/vendor/vendor-assets.lock.json +60 -0
- package/src/cli.mjs +347 -0
- package/src/commands/capture.mjs +23 -0
- package/src/commands/export.mjs +18 -0
- package/src/commands/guide.mjs +23 -0
- package/src/commands/inspect.mjs +35 -0
- package/src/commands/present.mjs +91 -0
- package/src/commands/skill.mjs +114 -0
- package/src/commands/validate.mjs +79 -0
- package/src/deck.mjs +63 -0
- package/src/exit.mjs +58 -0
- package/src/runtime.mjs +77 -0
- package/src/skills.mjs +155 -0
package/README.md
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# MarkdStage CLI
|
|
2
|
+
|
|
3
|
+
Present, validate, inspect, capture, and export MarkdStage Markdown decks from a
|
|
4
|
+
terminal — no GitHub Copilot canvas required.
|
|
5
|
+
|
|
6
|
+
The CLI reuses the very same Markdown parser, renderer, Architecture DSL
|
|
7
|
+
validation, theme handling, and PDF/PNG pipeline as the MarkdStage canvas
|
|
8
|
+
Extension, so a deck looks identical in Copilot, MarkdStage Desktop, the CLI, and
|
|
9
|
+
the exported PDF.
|
|
10
|
+
|
|
11
|
+
## Requirements
|
|
12
|
+
|
|
13
|
+
- Node.js 24 or later.
|
|
14
|
+
- An installed Microsoft Edge, Google Chrome, or Chromium. MarkdStage never
|
|
15
|
+
downloads a browser.
|
|
16
|
+
|
|
17
|
+
## Install
|
|
18
|
+
|
|
19
|
+
```console
|
|
20
|
+
npx @markdstage/markdstage present slides.md
|
|
21
|
+
npm install --global @markdstage/markdstage
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Commands
|
|
25
|
+
|
|
26
|
+
```console
|
|
27
|
+
markdstage present slides.md --watch
|
|
28
|
+
markdstage validate slides.md --json
|
|
29
|
+
markdstage inspect slides.md --json
|
|
30
|
+
markdstage capture slides.md --pages 2,4
|
|
31
|
+
markdstage export slides.md --output slides.pdf
|
|
32
|
+
markdstage guide architecture-dsl
|
|
33
|
+
markdstage skill install --target codex
|
|
34
|
+
markdstage skill install --target claude
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
| Command | Description |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| `present` | Serves the deck on loopback and opens the MarkdStage presenter window: navigation, presenter view, next-slide preview, speaker notes, overview, custom themes, Mermaid, Architecture DSL, and local assets. `--watch` reloads on save while preserving the current slide and keeping the last valid deck when a save is broken. `--no-open` serves the deck only. |
|
|
40
|
+
| `validate` | Checks deck structure, Architecture DSL blocks, themes, and theme paths. |
|
|
41
|
+
| `inspect` | Reports the same compact 1280x720 clipping diagnostics as the canvas `inspect_layout` action. `--slide <n>` limits it to one page, `--all` includes slides that fit, `--fail-on-issues` exits with code 5. |
|
|
42
|
+
| `capture` | Writes 1280x720 PNG files. Without `--pages` only the slides reported as clipped are captured. |
|
|
43
|
+
| `export` | Produces the same 16:9 PDF as the canvas Extension. |
|
|
44
|
+
| `guide` | Prints the canonical `markdstage_guide` topics. |
|
|
45
|
+
| `skill` | Installs or checks the portable Agent Skills for Codex (`.agents/skills/markdstage/`), Claude Code (`.claude/skills/markdstage/`), and GitHub Copilot (`.github/skills/markdstage/`). Locally modified files are never overwritten without `--force`. |
|
|
46
|
+
| `help` | Shows the overview, or the help for one command. `markdstage help <command>` prints the same text as `markdstage <command> --help`. |
|
|
47
|
+
|
|
48
|
+
Global options: `--workspace <dir>`, `--theme <name>`, `--theme-file <path>`,
|
|
49
|
+
`--json`, `--help`, `--version`.
|
|
50
|
+
|
|
51
|
+
```console
|
|
52
|
+
markdstage help
|
|
53
|
+
markdstage help capture
|
|
54
|
+
markdstage capture --help
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Exit codes
|
|
58
|
+
|
|
59
|
+
| Code | Meaning |
|
|
60
|
+
| --- | --- |
|
|
61
|
+
| 0 | success |
|
|
62
|
+
| 1 | usage error |
|
|
63
|
+
| 2 | deck or input error |
|
|
64
|
+
| 3 | environment error (no Chromium-based browser) |
|
|
65
|
+
| 4 | rendering or output failure |
|
|
66
|
+
| 5 | layout or validation issues were found |
|
|
67
|
+
|
|
68
|
+
## Security
|
|
69
|
+
|
|
70
|
+
- Presentation servers bind to loopback only and serve every route below an
|
|
71
|
+
unguessable per-process URL token.
|
|
72
|
+
- Requests must carry a loopback `Host` header, and mutating routes require a
|
|
73
|
+
same-origin `Origin` header. Mutable state is served with `no-store`.
|
|
74
|
+
- Deck files, assets, themes, and generated output stay inside the resolved
|
|
75
|
+
workspace (canonical paths, symlink checks, and size limits included).
|
|
76
|
+
|
|
77
|
+
## Development
|
|
78
|
+
|
|
79
|
+
The package mirrors the canonical runtime from
|
|
80
|
+
`.github/extensions/markdstage/` into `shared/` before packing and testing:
|
|
81
|
+
|
|
82
|
+
```console
|
|
83
|
+
npm run sync # refresh shared/
|
|
84
|
+
npm test # node --test
|
|
85
|
+
npm run skills # regenerate the repository Agent Skills
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## License
|
|
89
|
+
|
|
90
|
+
MIT
|
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@markdstage/markdstage",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Present, validate, inspect, capture, and export MarkdStage Markdown decks from the command line — no Copilot canvas required.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "runceel",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"engines": {
|
|
9
|
+
"node": ">=24.0.0"
|
|
10
|
+
},
|
|
11
|
+
"bin": {
|
|
12
|
+
"markdstage": "bin/markdstage.mjs"
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/runceel/markdstage.git",
|
|
17
|
+
"directory": "packages/markdstage-cli"
|
|
18
|
+
},
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public",
|
|
21
|
+
"registry": "https://registry.npmjs.org/"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [
|
|
24
|
+
"markdown",
|
|
25
|
+
"slides",
|
|
26
|
+
"presentation",
|
|
27
|
+
"pdf",
|
|
28
|
+
"cli",
|
|
29
|
+
"agent-skills"
|
|
30
|
+
],
|
|
31
|
+
"files": [
|
|
32
|
+
"bin",
|
|
33
|
+
"src",
|
|
34
|
+
"shared",
|
|
35
|
+
"README.md"
|
|
36
|
+
],
|
|
37
|
+
"scripts": {
|
|
38
|
+
"sync": "node scripts/sync-shared.mjs",
|
|
39
|
+
"pretest": "node scripts/sync-shared.mjs",
|
|
40
|
+
"test": "node --test \"test/*.test.mjs\"",
|
|
41
|
+
"skills": "node scripts/generate-skills.mjs",
|
|
42
|
+
"skills:check": "node scripts/generate-skills.mjs --check",
|
|
43
|
+
"prepack": "node scripts/sync-shared.mjs"
|
|
44
|
+
}
|
|
45
|
+
}
|