pindeck 2.8.1 → 2.8.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 +10 -0
- package/lib/platform-notice.mjs +34 -0
- package/package.json +3 -2
- package/server.mjs +5 -0
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# PinDeck
|
|
2
2
|
|
|
3
|
+
> **macOS only.** Windows and Linux are not supported.
|
|
4
|
+
|
|
3
5
|
**Pin it. Say it. Done.** PinDeck is a local editor for HTML slide decks (reveal.js): the slides on
|
|
4
6
|
the left, the slide in the middle, and a chat with Claude Code on the right. You click elements to
|
|
5
7
|
pin them, write what to change, and Claude edits the HTML and CSS. The slide updates in place.
|
|
@@ -26,6 +28,10 @@ checked the layout; the next request, still being typed, refers to the new pins
|
|
|
26
28
|
|
|
27
29
|
## Quick start
|
|
28
30
|
|
|
31
|
+
Requires macOS. The npm package declares `"os": ["darwin"]`, so normal npm installation
|
|
32
|
+
rejects other operating systems. Overriding that check does not make those platforms supported. Running the server from a cloned
|
|
33
|
+
repository on another OS shows a local support notice instead of opening the deck or starting Claude.
|
|
34
|
+
|
|
29
35
|
```bash
|
|
30
36
|
npx pindeck path/to/deck # from npm
|
|
31
37
|
|
|
@@ -249,6 +255,10 @@ Without PowerPoint or Keynote (or on other systems than macOS) only the text and
|
|
|
249
255
|
|
|
250
256
|
## Versions
|
|
251
257
|
|
|
258
|
+
* **2.8.2**: declares macOS-only support in npm metadata and the README to prevent accidental
|
|
259
|
+
installation on unsupported operating systems. Source launches on other platforms show a support
|
|
260
|
+
notice without opening the deck.
|
|
261
|
+
|
|
252
262
|
* **2.8.1**: fixes from a review. Speaker notes that fail to load leave the field empty and locked, instead
|
|
253
263
|
of showing the previous slide's notes and saving your edits over them. A save that fails because the
|
|
254
264
|
server cannot be reached is reported, and the edits after it (drags, text, bullets, notes) are still
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import http from 'node:http';
|
|
2
|
+
|
|
3
|
+
export function createPlatformNoticeServer(platform) {
|
|
4
|
+
const windows = platform === 'win32';
|
|
5
|
+
const heading = windows ? 'Windows support is on the roadmap' : 'PinDeck currently requires macOS';
|
|
6
|
+
const explanation = windows
|
|
7
|
+
? 'PinDeck is currently available for macOS only. Windows support is planned for a future version; there is no release date yet.'
|
|
8
|
+
: 'This version of PinDeck supports macOS only. Linux and other operating systems are not supported yet.';
|
|
9
|
+
const html = `<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>PinDeck · macOS required</title><style>
|
|
10
|
+
:root{font-family:system-ui,sans-serif;color:#243348;background:#f4f6f8;color-scheme:light}*{box-sizing:border-box}body{margin:0;min-height:100vh;display:grid;place-items:center;padding:24px}main{width:min(100%,620px);padding:40px;background:white;border:1px solid #dde3ea;border-radius:18px;box-shadow:0 12px 40px #20334d0a}.brand{font-weight:700;color:#c36516;margin:0 0 32px}h1{font-size:clamp(26px,5vw,36px);line-height:1.2;margin:0 0 20px}p{line-height:1.65}a{color:#945012}footer{margin-top:28px;font-size:14px;color:#596577}
|
|
11
|
+
</style></head><body><main><p class="brand">PinDeck</p><h1>${heading}</h1><p>${explanation}</p><p>Your deck has not been opened or changed, and no AI backend has been started.</p><p>You can use PinDeck on a Mac or follow updates on <a href="https://github.com/ehabets/PinDeck">GitHub</a>.</p><footer>Close this tab and press Ctrl+C in the terminal to stop this notice.</footer></main></body></html>`;
|
|
12
|
+
return http.createServer((req, res) => {
|
|
13
|
+
if (req.method !== 'GET' && req.method !== 'HEAD') { res.writeHead(405, { Allow: 'GET, HEAD' }); return res.end(); }
|
|
14
|
+
res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8', 'Cache-Control': 'no-store',
|
|
15
|
+
'Content-Security-Policy': "default-src 'none'; style-src 'unsafe-inline'; base-uri 'none'; frame-ancestors 'none'" });
|
|
16
|
+
res.end(req.method === 'HEAD' ? undefined : html);
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Keep startup here until the notice is closed: no deck/state initialization runs on unsupported OSes.
|
|
21
|
+
export async function showPlatformNotice(port, platform = process.platform) {
|
|
22
|
+
const server = createPlatformNoticeServer(platform);
|
|
23
|
+
await new Promise((resolve, reject) => {
|
|
24
|
+
const stop = () => server.close();
|
|
25
|
+
server.once('error', reject);
|
|
26
|
+
server.once('close', () => {
|
|
27
|
+
process.off('SIGINT', stop); process.off('SIGTERM', stop); resolve();
|
|
28
|
+
});
|
|
29
|
+
server.listen(port, '127.0.0.1', () => {
|
|
30
|
+
process.once('SIGINT', stop); process.once('SIGTERM', stop);
|
|
31
|
+
console.log(`PinDeck requires macOS. Open http://127.0.0.1:${server.address().port}/ for details. Press Ctrl+C to stop.`);
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pindeck",
|
|
3
|
-
"version": "2.8.
|
|
4
|
-
"description": "PinDeck: a local editor for HTML slide decks. Pin elements, describe the change, and Claude Code edits the slides.",
|
|
3
|
+
"version": "2.8.2",
|
|
4
|
+
"description": "PinDeck: a local macOS editor for HTML slide decks. Pin elements, describe the change, and Claude Code edits the slides.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"slides",
|
|
7
7
|
"presentation",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"start": "node server.mjs",
|
|
36
36
|
"test": "node --test"
|
|
37
37
|
},
|
|
38
|
+
"os": ["darwin"],
|
|
38
39
|
"engines": {
|
|
39
40
|
"node": ">=20"
|
|
40
41
|
}
|
package/server.mjs
CHANGED
|
@@ -41,6 +41,11 @@ const argv = process.argv.slice(2);
|
|
|
41
41
|
if (argv.includes("--help") || argv.includes("-h")) { console.log(USAGE); process.exit(0); }
|
|
42
42
|
const opt = (name, dflt) => { const i = argv.indexOf(name); return i >= 0 ? argv.splice(i, 2)[1] : dflt; };
|
|
43
43
|
const PORT = +opt("--port", process.env.PORT || 5180);
|
|
44
|
+
if (process.platform !== "darwin") {
|
|
45
|
+
const { showPlatformNotice } = await import("./lib/platform-notice.mjs");
|
|
46
|
+
await showPlatformNotice(PORT);
|
|
47
|
+
process.exit(0);
|
|
48
|
+
}
|
|
44
49
|
const MODEL = opt("--model", process.env.CLAUDE_MODEL || "");
|
|
45
50
|
const DECK_DIR = path.resolve(argv[0] || process.cwd());
|
|
46
51
|
const DECK_FILE = "index.html";
|