pindeck 0.0.0-stage → 2.8.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/LICENSE +21 -0
- package/README.md +315 -2
- package/cli.mjs +97 -0
- package/lib/claude.mjs +70 -0
- package/lib/diff.mjs +46 -0
- package/lib/eids.mjs +608 -0
- package/lib/layout.mjs +37 -0
- package/lib/omml.mjs +175 -0
- package/lib/pdf-render.jxa.js +54 -0
- package/lib/pdf.mjs +68 -0
- package/lib/pptx-import.mjs +682 -0
- package/lib/pptx-render.mjs +100 -0
- package/lib/pptx.mjs +340 -0
- package/lib/system-prompt.md +97 -0
- package/lib/waveform.mjs +67 -0
- package/lib/xml.mjs +55 -0
- package/lib/zip.mjs +46 -0
- package/package.json +38 -4
- package/public/apple-touch-icon.png +0 -0
- package/public/bridge.js +963 -0
- package/public/editor.css +281 -0
- package/public/editor.js +1089 -0
- package/public/favicon.png +0 -0
- package/public/favicon.svg +8 -0
- package/public/index.html +165 -0
- package/server.mjs +1163 -0
|
Binary file
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
|
2
|
+
<!-- The PinDeck pin, as .brand-pin in editor.css: a square with three round corners, turned so the
|
|
3
|
+
sharp one points down; orange rim, white centre -->
|
|
4
|
+
<g transform="translate(16 13.9) rotate(-45)">
|
|
5
|
+
<path d="M-10 10V0A10 10 0 0 1 0-10A10 10 0 0 1 10 0A10 10 0 0 1 0 10Z" fill="#ED8C01"/>
|
|
6
|
+
<path d="M-4.3 4.3V0A4.3 4.3 0 0 1 0-4.3A4.3 4.3 0 0 1 4.3 0A4.3 4.3 0 0 1 0 4.3Z" fill="#fff"/>
|
|
7
|
+
</g>
|
|
8
|
+
</svg>
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<meta name="editor-token" content="%%TOKEN%%">
|
|
7
|
+
<title>PinDeck</title>
|
|
8
|
+
<link rel="icon" href="/editor/favicon.svg" type="image/svg+xml">
|
|
9
|
+
<link rel="icon" href="/editor/favicon.png" type="image/png" sizes="64x64">
|
|
10
|
+
<link rel="apple-touch-icon" href="/editor/apple-touch-icon.png">
|
|
11
|
+
<link rel="stylesheet" href="/editor/editor.css">
|
|
12
|
+
</head>
|
|
13
|
+
<body>
|
|
14
|
+
<div class="app">
|
|
15
|
+
|
|
16
|
+
<!-- Left: slides -->
|
|
17
|
+
<nav class="slides-pane" aria-label="Slides">
|
|
18
|
+
<div class="pane-head"><span class="brand"><span class="brand-pin" aria-hidden="true"></span>PinDeck</span></div>
|
|
19
|
+
<div class="slides-actions menu-wrap">
|
|
20
|
+
<button id="add-slide-btn" class="add-slide" aria-haspopup="menu" aria-expanded="false" title="Add a slide after the current one">+ New slide</button>
|
|
21
|
+
<div id="add-slide-menu" class="menu left" role="menu" hidden>
|
|
22
|
+
<button role="menuitem" data-slide="content"><strong>Content slide</strong><span>Title and bullets, in the style of this deck</span></button>
|
|
23
|
+
<button role="menuitem" data-slide="section"><strong>Section divider</strong><span>Opens a new part of the talk</span></button>
|
|
24
|
+
<button role="menuitem" data-slide="duplicate"><strong>Duplicate this slide</strong><span>A copy to start from</span></button>
|
|
25
|
+
<button role="menuitem" data-slide="import"><strong>Import from PowerPoint…</strong><span>Slides from a .pptx file, in the style of this deck</span></button>
|
|
26
|
+
</div>
|
|
27
|
+
<input type="file" id="import-file" accept=".pptx,application/vnd.openxmlformats-officedocument.presentationml.presentation" hidden>
|
|
28
|
+
</div>
|
|
29
|
+
<ol id="slide-list" class="slide-list"></ol>
|
|
30
|
+
</nav>
|
|
31
|
+
|
|
32
|
+
<!-- Middle: canvas -->
|
|
33
|
+
<main class="canvas-pane">
|
|
34
|
+
<div class="toolbar">
|
|
35
|
+
<div class="group">
|
|
36
|
+
<button id="prev" class="icon" title="Previous slide (←)" aria-label="Previous slide">‹</button>
|
|
37
|
+
<span id="slide-pos" class="pos">– / –</span>
|
|
38
|
+
<button id="next" class="icon" title="Next slide (→)" aria-label="Next slide">›</button>
|
|
39
|
+
<span id="deck-name" class="deck-name"></span>
|
|
40
|
+
</div>
|
|
41
|
+
<div class="group">
|
|
42
|
+
<button id="undo" class="icon" aria-label="Undo" title="Undo (⌘Z)" disabled>↶</button>
|
|
43
|
+
<button id="redo" class="icon" aria-label="Redo" title="Redo (⇧⌘Z)" disabled>↷</button>
|
|
44
|
+
<span class="seg" role="group" aria-label="Mode">
|
|
45
|
+
<button id="select-toggle" class="toggle" aria-pressed="true"
|
|
46
|
+
title="Select (V): click to select, drag to move, handles to resize, arrows to nudge (Shift: 10 px), Alt: no snapping. Double-click or Enter to edit text.">
|
|
47
|
+
<svg class="ic" viewBox="0 0 16 16" aria-hidden="true"><path d="M3 2l9 5-4 1.2L6.3 13z"/></svg> Select <kbd>V</kbd></button>
|
|
48
|
+
<button id="pin-toggle" class="toggle" title="Pin (P): click elements to pin them for Claude, Esc to stop" aria-pressed="false">
|
|
49
|
+
<span class="dot">1</span> Pin <kbd>P</kbd></button>
|
|
50
|
+
</span>
|
|
51
|
+
<span class="menu-wrap">
|
|
52
|
+
<button id="export-btn" aria-haspopup="menu" aria-expanded="false" title="Export the deck as a PDF">Export ▾</button>
|
|
53
|
+
<div id="export-menu" class="menu" role="menu" hidden>
|
|
54
|
+
<button role="menuitem" data-export="handout"><strong>Handout PDF</strong>
|
|
55
|
+
<span>One page per slide</span></button>
|
|
56
|
+
<button role="menuitem" data-export="presentation"><strong>Presentation PDF</strong>
|
|
57
|
+
<span>One page per click</span></button>
|
|
58
|
+
<label class="menu-check"><input type="checkbox" id="export-hidden"> Include hidden slides</label>
|
|
59
|
+
</div>
|
|
60
|
+
</span>
|
|
61
|
+
<button id="present" title="Open the deck in a new tab to present">Present ↗</button>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
<div id="pin-hint" class="pin-hint" hidden>Pin mode: click elements on the slide. Click a marker to remove it. <kbd>Esc</kbd> to stop.</div>
|
|
65
|
+
<div id="stage" class="stage"><div id="toast" class="toast" role="status" hidden></div></div>
|
|
66
|
+
<section id="notes-panel" class="notes-panel" aria-label="Speaker notes">
|
|
67
|
+
<div id="notes-split" class="notes-split" role="separator" aria-orientation="horizontal" aria-controls="notes" tabindex="0"
|
|
68
|
+
title="Drag to resize the notes (double-click: default size)" aria-label="Resize the speaker notes"></div>
|
|
69
|
+
<button id="notes-toggle" class="notes-head" aria-expanded="true" aria-controls="notes" title="Show or hide the speaker notes">
|
|
70
|
+
<span class="caret" aria-hidden="true">▾</span> Notes <span id="notes-status" class="notes-status"></span></button>
|
|
71
|
+
<textarea id="notes" spellcheck="true" aria-label="Speaker notes of this slide"
|
|
72
|
+
placeholder="Speaker notes for this slide, shown in the speaker view (S) when presenting. Saved when you click elsewhere or press ⌘Enter; Esc undoes your typing."></textarea>
|
|
73
|
+
</section>
|
|
74
|
+
</main>
|
|
75
|
+
|
|
76
|
+
<!-- Right: chat with Claude -->
|
|
77
|
+
<aside class="chat-pane" aria-label="Claude">
|
|
78
|
+
<div class="pane-head chat-head">
|
|
79
|
+
<span class="menu-wrap">
|
|
80
|
+
<button id="model-btn" class="model-btn" aria-haspopup="menu" aria-expanded="false"
|
|
81
|
+
title="Model and effort for Claude">Claude <span id="model" class="muted"></span> ▾</button>
|
|
82
|
+
<div id="model-menu" class="menu left model-menu" role="menu" hidden></div>
|
|
83
|
+
</span>
|
|
84
|
+
<span class="head-actions">
|
|
85
|
+
<span id="conn" class="conn" title="Claude Code session"></span>
|
|
86
|
+
<button id="new-chat" class="small" title="Start a new conversation">New chat</button>
|
|
87
|
+
</span>
|
|
88
|
+
</div>
|
|
89
|
+
<div id="chat" class="chat" aria-live="polite">
|
|
90
|
+
<div class="empty" id="chat-empty">
|
|
91
|
+
<p><strong>Pin, then ask.</strong></p>
|
|
92
|
+
<p>Press <kbd>P</kbd> and click elements on the slide. Each click gets a number. Then write what to change, e.g.
|
|
93
|
+
<em>“1: align with 2, make 3 smaller”</em>.</p>
|
|
94
|
+
<p>Or edit yourself: click to select, drag to move, pull a handle to resize, arrow keys to nudge,
|
|
95
|
+
double-click to change the text. A selected element is what Claude takes “this” to mean.</p>
|
|
96
|
+
<p>Add figures, audio, a PDF or a screenshot with <strong>+</strong>, or drag and drop or paste a file; Claude can put it on a slide
|
|
97
|
+
or, for a paper or report, take the details from it.</p>
|
|
98
|
+
<p>Claude edits <code>index.html</code> and <code>theme.css</code>, checks the layout, and the slide updates here.
|
|
99
|
+
<code>brand.css</code> is locked.</p>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
<div id="drop-hint" class="drop-hint" hidden><div>Drop figures, audio or PDFs to attach them</div></div>
|
|
103
|
+
<div id="working" class="working" hidden><span class="spinner"></span> <span id="working-text">Claude is working…</span></div>
|
|
104
|
+
<div class="composer">
|
|
105
|
+
<div id="pin-tray" class="pin-tray"></div>
|
|
106
|
+
<div id="attach-tray" class="attach-tray"></div>
|
|
107
|
+
<textarea id="input" rows="3" placeholder="Ask Claude… refer to pins by number (1, 2, …)"></textarea>
|
|
108
|
+
<div class="composer-row">
|
|
109
|
+
<span class="menu-wrap">
|
|
110
|
+
<button id="add-btn" class="add-round" aria-haspopup="menu" aria-expanded="false" aria-label="Add to the message"
|
|
111
|
+
title="Add a file or a screenshot to the message">+</button>
|
|
112
|
+
<div id="add-menu" class="menu up" role="menu" hidden>
|
|
113
|
+
<button role="menuitem" data-add="file"><strong>File…</strong><span>A figure, audio file or PDF (a figure, table, paper or report) for Claude to use (or drop or paste it)</span></button>
|
|
114
|
+
<button role="menuitem" data-add="shot" id="add-shot"><strong>Screenshot</strong><span>This slide with its pins, for questions about how it looks</span></button>
|
|
115
|
+
</div>
|
|
116
|
+
</span>
|
|
117
|
+
<input type="file" id="file-input" multiple accept="image/*,audio/*,.svg,.pdf,application/pdf" hidden>
|
|
118
|
+
<span class="spacer"></span>
|
|
119
|
+
<button id="clear-pins" class="small" hidden>Clear pins</button>
|
|
120
|
+
<button id="send" class="primary">Send</button>
|
|
121
|
+
<button id="stop" class="danger" hidden>Stop</button>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
</aside>
|
|
125
|
+
</div>
|
|
126
|
+
|
|
127
|
+
<dialog id="delete-dialog" class="delete-dialog">
|
|
128
|
+
<form method="dialog">
|
|
129
|
+
<h3 id="delete-title">Delete this element?</h3>
|
|
130
|
+
<p id="delete-what" class="muted"></p>
|
|
131
|
+
<div id="delete-files"></div>
|
|
132
|
+
<p class="muted small-note">You can undo this with ⌘Z.</p>
|
|
133
|
+
<div class="dialog-buttons">
|
|
134
|
+
<button value="cancel" autofocus>Cancel</button>
|
|
135
|
+
<button value="delete" class="danger" id="delete-confirm">Delete</button>
|
|
136
|
+
</div>
|
|
137
|
+
</form>
|
|
138
|
+
</dialog>
|
|
139
|
+
|
|
140
|
+
<dialog id="import-dialog" class="import-dialog">
|
|
141
|
+
<form method="dialog">
|
|
142
|
+
<div class="dialog-head"><span id="import-title">Import from PowerPoint</span>
|
|
143
|
+
<button type="button" class="small" id="import-all">Select none</button></div>
|
|
144
|
+
<p id="import-status" class="import-status muted"></p>
|
|
145
|
+
<ol id="import-list" class="import-list"></ol>
|
|
146
|
+
<div class="dialog-buttons">
|
|
147
|
+
<span class="import-notes">
|
|
148
|
+
<label class="check" id="import-refine-wrap" hidden><input type="checkbox" id="import-refine" checked>
|
|
149
|
+
<span id="import-refine-label">Then ask Claude to improve the complex slides</span></label>
|
|
150
|
+
<span class="muted small-note">Added after the current slide. You can undo this with ⌘Z.</span>
|
|
151
|
+
</span>
|
|
152
|
+
<button value="cancel">Cancel</button>
|
|
153
|
+
<button value="import" class="primary" id="import-go">Import</button>
|
|
154
|
+
</div>
|
|
155
|
+
</form>
|
|
156
|
+
</dialog>
|
|
157
|
+
|
|
158
|
+
<dialog id="diff-dialog" class="diff-dialog">
|
|
159
|
+
<div class="dialog-head"><span id="diff-title">Changes</span><button class="small" id="diff-close">Close</button></div>
|
|
160
|
+
<pre id="diff-body" class="diff"></pre>
|
|
161
|
+
</dialog>
|
|
162
|
+
|
|
163
|
+
<script type="module" src="/editor/editor.js"></script>
|
|
164
|
+
</body>
|
|
165
|
+
</html>
|