@davmash/bygone 0.5.2 → 0.7.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/CHANGELOG.md +10 -2
- package/README.md +64 -22
- package/bin/bygone.js +72 -38
- package/cli/commandSpec.js +178 -0
- package/cli/completions.js +321 -0
- package/cli/present.js +166 -0
- package/cli/tour.js +189 -0
- package/cli/tourFile.js +26 -0
- package/completions/_bygone +131 -0
- package/completions/bygone +83 -0
- package/completions/bygone.fish +34 -0
- package/docs/change-explanation-plan.md +358 -0
- package/docs/change-tour-format.md +62 -0
- package/docs/generating-change-tours.md +75 -0
- package/docs/releasing.md +342 -0
- package/docs/walkthrough.md +103 -0
- package/examples/bygone-history.bygone.yaml +80 -0
- package/media/editor.worker.js +26 -14250
- package/media/icon.png +0 -0
- package/media/webview.css +1 -9818
- package/media/webview.js +358 -132939
- package/out/changeTour.js +1901 -0
- package/out/standalone-main.js +14698 -8507
- package/out/standalone-preload.js +5 -4
- package/package.json +10 -3
- package/schemas/change-tour-source.schema.json +287 -0
- package/standalone/index.html +23 -6
- package/web/index.html +266 -0
- package/web/presenter.css +725 -0
- package/web/web-host.js +149 -0
package/web/index.html
ADDED
|
@@ -0,0 +1,266 @@
|
|
|
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.0">
|
|
6
|
+
<title>Bygone Tour</title>
|
|
7
|
+
<link href="/media/webview.css" rel="stylesheet">
|
|
8
|
+
<link href="/web/presenter.css" rel="stylesheet">
|
|
9
|
+
</head>
|
|
10
|
+
<body class="web-host">
|
|
11
|
+
<aside id="tour-shell" class="tour-shell" hidden>
|
|
12
|
+
<header class="tour-overview">
|
|
13
|
+
<button id="tour-sidebar-hide" class="tour-sidebar-hide" type="button" title="Hide tour sidebar" aria-label="Hide tour sidebar">‹</button>
|
|
14
|
+
<h1 id="tour-title"></h1>
|
|
15
|
+
<a id="tour-source" class="tour-source" target="_blank" rel="noreferrer" hidden>Open source ↗</a>
|
|
16
|
+
<div class="tour-meta">
|
|
17
|
+
<div id="tour-range" class="tour-range"></div>
|
|
18
|
+
<div id="tour-stats" class="tour-stats"></div>
|
|
19
|
+
</div>
|
|
20
|
+
</header>
|
|
21
|
+
<div class="tour-rail-sections">
|
|
22
|
+
<section class="tour-rail-section">
|
|
23
|
+
<header class="tour-rail-heading">
|
|
24
|
+
<span>Tour</span>
|
|
25
|
+
<span id="tour-scene-count" class="tour-rail-count"></span>
|
|
26
|
+
</header>
|
|
27
|
+
<nav id="tour-scenes" class="tour-scenes" aria-label="Change tour scenes"></nav>
|
|
28
|
+
</section>
|
|
29
|
+
<section class="tour-rail-section tour-files-section">
|
|
30
|
+
<header class="tour-rail-heading">
|
|
31
|
+
<span>Files</span>
|
|
32
|
+
<span id="tour-file-count" class="tour-rail-count"></span>
|
|
33
|
+
<button id="tour-return-focus" class="tour-return-focus" type="button" title="Return to the file focused by the current tour step" hidden>Return to tour</button>
|
|
34
|
+
</header>
|
|
35
|
+
<nav id="tour-files" class="tour-files" aria-label="Changed files"></nav>
|
|
36
|
+
</section>
|
|
37
|
+
</div>
|
|
38
|
+
<details class="tour-commits-section">
|
|
39
|
+
<summary id="tour-commits-summary">0 commits</summary>
|
|
40
|
+
<ol id="tour-commits" class="tour-commits"></ol>
|
|
41
|
+
</details>
|
|
42
|
+
<div id="tour-sidebar-resizer" class="tour-sidebar-resizer" role="separator" aria-label="Resize tour sidebar" aria-orientation="vertical" aria-valuemin="240" aria-valuemax="600" tabindex="0"></div>
|
|
43
|
+
</aside>
|
|
44
|
+
<button id="tour-sidebar-show" class="tour-sidebar-show" type="button" title="Show tour sidebar" aria-label="Show tour sidebar" hidden>›</button>
|
|
45
|
+
<section id="tour-narrative" class="tour-narrative" hidden>
|
|
46
|
+
<nav class="tour-narrative-nav" aria-label="Tour navigation">
|
|
47
|
+
<button id="tour-previous" type="button" title="Previous tour item (Left or Page Up)">← Prev</button>
|
|
48
|
+
<span id="tour-breadcrumb" class="tour-breadcrumb"></span>
|
|
49
|
+
<button id="tour-next" type="button" title="Next tour item (Right or Page Down)">Next →</button>
|
|
50
|
+
</nav>
|
|
51
|
+
<div class="tour-narrative-layout">
|
|
52
|
+
<div class="tour-narrative-prose">
|
|
53
|
+
<div id="tour-narrative-chapter" class="tour-narrative-chapter"></div>
|
|
54
|
+
<h2 id="tour-narrative-title"></h2>
|
|
55
|
+
<p id="tour-narrative-summary" class="tour-narrative-summary"></p>
|
|
56
|
+
<ul id="tour-narrative-bullets" class="tour-narrative-bullets"></ul>
|
|
57
|
+
<div id="tour-narrative-tags" class="tour-narrative-tags"></div>
|
|
58
|
+
</div>
|
|
59
|
+
<div class="tour-narrative-side">
|
|
60
|
+
<div id="tour-step" class="tour-step" hidden>
|
|
61
|
+
<div id="tour-step-title" class="tour-step-title"></div>
|
|
62
|
+
<p id="tour-step-body" class="tour-step-body"></p>
|
|
63
|
+
<div id="tour-connection" class="tour-connection" hidden></div>
|
|
64
|
+
</div>
|
|
65
|
+
<div id="tour-narrative-takeaway" class="tour-narrative-takeaway"></div>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
</section>
|
|
69
|
+
<div class="web-toolbar">
|
|
70
|
+
<div class="web-toolbar-group">
|
|
71
|
+
<button id="web-compare-test" type="button" title="Compare sample files">Compare Test Files</button>
|
|
72
|
+
<button id="web-open-diff" type="button" title="Choose two files to compare">Open 2 Files</button>
|
|
73
|
+
<button id="web-open-diff3" type="button" title="Choose one or more files">Open Files</button>
|
|
74
|
+
</div>
|
|
75
|
+
<div id="web-status" class="web-status" role="status" aria-live="polite" aria-atomic="true">Browser host ready.</div>
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
<input id="web-diff-input" type="file" multiple hidden>
|
|
79
|
+
<input id="web-diff3-input" type="file" multiple hidden>
|
|
80
|
+
|
|
81
|
+
<div id="container">
|
|
82
|
+
<div id="header">
|
|
83
|
+
<div id="file-info" class="header-align-diff">Choose a compare command to render a diff.</div>
|
|
84
|
+
<div id="status-banner" class="status-banner header-align-diff" role="status" aria-live="polite" aria-atomic="true" hidden></div>
|
|
85
|
+
<div id="directory-return-toolbar" class="directory-return-toolbar header-align-diff" hidden>
|
|
86
|
+
<button id="back-to-directory" class="directory-return-button" type="button" title="Back to directory view (Cmd/Ctrl+[)">
|
|
87
|
+
<svg viewBox="0 0 24 24" aria-hidden="true">
|
|
88
|
+
<path d="M15 18l-6-6 6-6"></path>
|
|
89
|
+
<path d="M9 12h10"></path>
|
|
90
|
+
</svg>
|
|
91
|
+
<span>Back</span>
|
|
92
|
+
</button>
|
|
93
|
+
<button id="toggle-directory-sidebar" class="directory-return-button" type="button" title="Hide directory files" aria-label="Hide directory files" aria-pressed="true">
|
|
94
|
+
<span>Files</span>
|
|
95
|
+
</button>
|
|
96
|
+
</div>
|
|
97
|
+
<div id="edit-mode-toolbar" class="edit-mode-toolbar header-align-diff" hidden>
|
|
98
|
+
<button id="toggle-readonly" class="edit-mode-button" type="button" title="Toggle read-only mode">Editing On</button>
|
|
99
|
+
</div>
|
|
100
|
+
<div id="change-toolbar" class="change-toolbar header-align-diff" hidden>
|
|
101
|
+
<div class="change-toolbar-main">
|
|
102
|
+
<div class="change-toolbar-nav">
|
|
103
|
+
<button id="previous-file" class="change-button icon-button" type="button" title="Previous file" aria-label="Previous file">
|
|
104
|
+
<svg viewBox="0 0 24 24" aria-hidden="true">
|
|
105
|
+
<path d="M17 11l-5-5-5 5"></path>
|
|
106
|
+
<path d="M17 18l-5-5-5 5"></path>
|
|
107
|
+
</svg>
|
|
108
|
+
</button>
|
|
109
|
+
<button id="next-file" class="change-button icon-button" type="button" title="Next file" aria-label="Next file">
|
|
110
|
+
<svg viewBox="0 0 24 24" aria-hidden="true">
|
|
111
|
+
<path d="M7 13l5 5 5-5"></path>
|
|
112
|
+
<path d="M7 6l5 5 5-5"></path>
|
|
113
|
+
</svg>
|
|
114
|
+
</button>
|
|
115
|
+
</div>
|
|
116
|
+
<div class="change-toolbar-center">
|
|
117
|
+
<button id="previous-change" class="change-button icon-button" type="button" title="Previous difference (Cmd/Ctrl+Alt+Up)" aria-label="Previous difference">
|
|
118
|
+
<svg viewBox="0 0 24 24" aria-hidden="true">
|
|
119
|
+
<path d="M12 19V5"></path>
|
|
120
|
+
<path d="M6 11l6-6 6 6"></path>
|
|
121
|
+
</svg>
|
|
122
|
+
</button>
|
|
123
|
+
<button id="copy-left-to-right" class="change-button change-button-primary icon-button" type="button" title="Copy current change from left to right (Cmd/Ctrl+Alt+Right)" aria-label="Copy current change from left to right">
|
|
124
|
+
<svg viewBox="0 0 24 24" aria-hidden="true">
|
|
125
|
+
<path d="M5 12h10"></path>
|
|
126
|
+
<path d="M11 8l4 4-4 4"></path>
|
|
127
|
+
<path d="M19 5v14"></path>
|
|
128
|
+
</svg>
|
|
129
|
+
</button>
|
|
130
|
+
<div id="change-position" class="change-position" role="status" aria-live="polite" aria-atomic="true"></div>
|
|
131
|
+
<button id="copy-right-to-left" class="change-button change-button-primary icon-button" type="button" title="Copy current change from right to left (Cmd/Ctrl+Alt+Left)" aria-label="Copy current change from right to left">
|
|
132
|
+
<svg viewBox="0 0 24 24" aria-hidden="true">
|
|
133
|
+
<path d="M19 12H9"></path>
|
|
134
|
+
<path d="M13 8l-4 4 4 4"></path>
|
|
135
|
+
<path d="M5 5v14"></path>
|
|
136
|
+
</svg>
|
|
137
|
+
</button>
|
|
138
|
+
<button id="next-change" class="change-button change-button-primary icon-button" type="button" title="Next difference (Cmd/Ctrl+Alt+Down)" aria-label="Next difference">
|
|
139
|
+
<svg viewBox="0 0 24 24" aria-hidden="true">
|
|
140
|
+
<path d="M12 5v14"></path>
|
|
141
|
+
<path d="M6 13l6 6 6-6"></path>
|
|
142
|
+
</svg>
|
|
143
|
+
</button>
|
|
144
|
+
</div>
|
|
145
|
+
<button id="toggle-word-wrap" class="change-button icon-button" type="button" title="Enable line wrapping (Alt+Z)" aria-label="Enable line wrapping" aria-pressed="false" hidden>
|
|
146
|
+
<svg viewBox="0 0 24 24" aria-hidden="true">
|
|
147
|
+
<path d="M4 6h13a3 3 0 0 1 0 6H9"></path>
|
|
148
|
+
<path d="M12 9l-3 3 3 3"></path>
|
|
149
|
+
<path d="M4 18h8"></path>
|
|
150
|
+
</svg>
|
|
151
|
+
</button>
|
|
152
|
+
<button id="refresh-session" class="change-button refresh-session-button icon-button" type="button" title="Refresh Session (Cmd/Ctrl+R)" aria-label="Refresh Session" disabled>
|
|
153
|
+
<svg viewBox="0 0 24 24" aria-hidden="true">
|
|
154
|
+
<path d="M20 11a8 8 0 1 0-2.3 5.7"></path>
|
|
155
|
+
<path d="M20 5v6h-6"></path>
|
|
156
|
+
</svg>
|
|
157
|
+
</button>
|
|
158
|
+
</div>
|
|
159
|
+
<div class="change-hint">Cmd/Ctrl+Alt+Up/Down to jump.</div>
|
|
160
|
+
</div>
|
|
161
|
+
<div id="history-toolbar" class="history-toolbar header-align-diff" hidden>
|
|
162
|
+
<div class="history-side history-side-left">
|
|
163
|
+
<div id="history-left-commit" class="history-commit"></div>
|
|
164
|
+
<div id="history-left-time" class="history-time"></div>
|
|
165
|
+
</div>
|
|
166
|
+
<div class="history-nav">
|
|
167
|
+
<button id="history-back" class="history-button icon-button" type="button" title="Older commit" aria-label="Older commit">
|
|
168
|
+
<svg viewBox="0 0 24 24" aria-hidden="true">
|
|
169
|
+
<path d="M15 18l-6-6 6-6"></path>
|
|
170
|
+
<path d="M10 18l-6-6 6-6" opacity="0.7"></path>
|
|
171
|
+
</svg>
|
|
172
|
+
</button>
|
|
173
|
+
<div id="history-position" class="history-position" role="status" aria-live="polite" aria-atomic="true"></div>
|
|
174
|
+
<button id="history-forward" class="history-button icon-button" type="button" title="Newer commit" aria-label="Newer commit">
|
|
175
|
+
<svg viewBox="0 0 24 24" aria-hidden="true">
|
|
176
|
+
<path d="M9 18l6-6-6-6"></path>
|
|
177
|
+
<path d="M14 18l6-6-6-6" opacity="0.7"></path>
|
|
178
|
+
</svg>
|
|
179
|
+
</button>
|
|
180
|
+
<button id="history-toggle-staged" class="history-button history-toggle-button" type="button" title="Include staged changes in history" aria-label="Include staged changes in history" aria-pressed="false">
|
|
181
|
+
Staged
|
|
182
|
+
</button>
|
|
183
|
+
<button id="history-toggle-skip-unchanged" class="history-button history-toggle-button" type="button" title="Skip revisions where the current file did not change" aria-label="Skip revisions where the current file did not change" aria-pressed="false">
|
|
184
|
+
Changed
|
|
185
|
+
</button>
|
|
186
|
+
</div>
|
|
187
|
+
<div class="history-side history-side-right">
|
|
188
|
+
<div id="history-right-commit" class="history-commit"></div>
|
|
189
|
+
<div id="history-right-time" class="history-time"></div>
|
|
190
|
+
</div>
|
|
191
|
+
</div>
|
|
192
|
+
<div id="directory-tree-toolbar" class="directory-tree-toolbar header-align-diff" hidden>
|
|
193
|
+
<button id="directory-expand-all" class="directory-tree-button icon-button" type="button" title="Expand all folders" aria-label="Expand all folders">
|
|
194
|
+
<svg viewBox="0 0 24 24" aria-hidden="true">
|
|
195
|
+
<path d="M4 7h16"></path>
|
|
196
|
+
<path d="M4 12h16"></path>
|
|
197
|
+
<path d="M4 17h16"></path>
|
|
198
|
+
<path d="M12 4v16"></path>
|
|
199
|
+
</svg>
|
|
200
|
+
</button>
|
|
201
|
+
<button id="directory-collapse-all" class="directory-tree-button icon-button" type="button" title="Collapse all folders" aria-label="Collapse all folders">
|
|
202
|
+
<svg viewBox="0 0 24 24" aria-hidden="true">
|
|
203
|
+
<path d="M4 7h16"></path>
|
|
204
|
+
<path d="M4 12h16"></path>
|
|
205
|
+
<path d="M4 17h16"></path>
|
|
206
|
+
</svg>
|
|
207
|
+
</button>
|
|
208
|
+
<button id="directory-collapse-unchanged" class="directory-tree-button icon-button" type="button" title="Collapse unchanged folders" aria-label="Collapse unchanged folders">
|
|
209
|
+
<svg viewBox="0 0 24 24" aria-hidden="true">
|
|
210
|
+
<path d="M4 7h16"></path>
|
|
211
|
+
<path d="M4 12h10"></path>
|
|
212
|
+
<path d="M4 17h16"></path>
|
|
213
|
+
<path d="M17 9l3 3-3 3"></path>
|
|
214
|
+
</svg>
|
|
215
|
+
</button>
|
|
216
|
+
</div>
|
|
217
|
+
</div>
|
|
218
|
+
<div id="diff-workspace">
|
|
219
|
+
<aside id="history-rail" class="history-rail hidden" hidden></aside>
|
|
220
|
+
<button id="show-navigation-sidebar" class="navigation-sidebar-show" type="button" title="Show navigation sidebar" aria-label="Show navigation sidebar" hidden>›</button>
|
|
221
|
+
<div id="diff-container">
|
|
222
|
+
<div id="two-way-diff" class="diff-view">
|
|
223
|
+
<div class="file-panel">
|
|
224
|
+
<button id="file1-header" class="file-header" type="button" title="Select left pane" aria-pressed="false">File 1</button>
|
|
225
|
+
<div id="file1-content" class="file-content"></div>
|
|
226
|
+
</div>
|
|
227
|
+
<div class="file-panel">
|
|
228
|
+
<button id="file2-header" class="file-header" type="button" title="Select right pane" aria-pressed="false">File 2</button>
|
|
229
|
+
<div id="file2-content" class="file-content"></div>
|
|
230
|
+
</div>
|
|
231
|
+
</div>
|
|
232
|
+
<div id="directory-diff" class="dir-view hidden">
|
|
233
|
+
<div class="dir-headers">
|
|
234
|
+
<div class="dir-col-header" id="dir-left-header">Left</div>
|
|
235
|
+
<div class="dir-header-gutter" aria-hidden="true"></div>
|
|
236
|
+
<div class="dir-col-header" id="dir-right-header">Right</div>
|
|
237
|
+
</div>
|
|
238
|
+
<div id="dir-rows" class="dir-rows-container"></div>
|
|
239
|
+
</div>
|
|
240
|
+
<div id="multi-way-diff" class="multi-view hidden"></div>
|
|
241
|
+
<div id="three-way-diff" class="diff-view hidden">
|
|
242
|
+
<div class="file-panel">
|
|
243
|
+
<div id="base-header" class="file-header">Base</div>
|
|
244
|
+
<div id="base-content" class="file-content"></div>
|
|
245
|
+
</div>
|
|
246
|
+
<div class="file-panel">
|
|
247
|
+
<div id="left-header" class="file-header">Left</div>
|
|
248
|
+
<div id="left-content" class="file-content"></div>
|
|
249
|
+
</div>
|
|
250
|
+
<div class="file-panel">
|
|
251
|
+
<div id="right-header" class="file-header">Right</div>
|
|
252
|
+
<div id="right-content" class="file-content"></div>
|
|
253
|
+
</div>
|
|
254
|
+
<div class="file-panel">
|
|
255
|
+
<div id="result-header" class="file-header">Result</div>
|
|
256
|
+
<div id="result-content" class="file-content"></div>
|
|
257
|
+
</div>
|
|
258
|
+
</div>
|
|
259
|
+
</div>
|
|
260
|
+
</div>
|
|
261
|
+
</div>
|
|
262
|
+
|
|
263
|
+
<script src="/web/web-host.js"></script>
|
|
264
|
+
<script src="/media/webview.js"></script>
|
|
265
|
+
</body>
|
|
266
|
+
</html>
|