@davmash/bygone 0.5.2 → 0.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@davmash/bygone",
3
- "version": "0.5.2",
3
+ "version": "0.7.1",
4
4
  "description": "See how change happened. Visual diff and file history.",
5
5
  "author": "David Mashburn",
6
6
  "license": "MIT",
@@ -18,9 +18,15 @@
18
18
  "main": "./out/standalone-main.js",
19
19
  "files": [
20
20
  "bin/",
21
+ "cli/",
22
+ "completions/",
21
23
  "out/",
22
24
  "media/",
25
+ "web/",
23
26
  "standalone/",
27
+ "docs/",
28
+ "examples/",
29
+ "schemas/",
24
30
  "README.md",
25
31
  "LICENSE.txt",
26
32
  "CHANGELOG.md"
@@ -33,7 +39,8 @@
33
39
  "electron"
34
40
  ],
35
41
  "dependencies": {
36
- "electron": "^31.7.7",
37
- "electron-updater": "^6.8.3"
42
+ "electron": "^43.1.1",
43
+ "electron-updater": "^6.8.9",
44
+ "js-yaml": "^4.3.0"
38
45
  }
39
46
  }
@@ -0,0 +1,287 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/davidmashburn/bygone/schemas/change-tour-source.schema.json",
4
+ "title": "Bygone Change Tour Source",
5
+ "description": "An agent- or human-authored, evidence-linked narrative compiled by Bygone.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["version", "anchors", "connections", "chapters"],
9
+ "properties": {
10
+ "version": { "const": 1 },
11
+ "title": { "$ref": "#/$defs/nonEmptyString" },
12
+ "sourceUrl": { "type": "string", "minLength": 1 },
13
+ "range": {
14
+ "type": "object",
15
+ "additionalProperties": false,
16
+ "required": ["base", "head"],
17
+ "properties": {
18
+ "base": { "$ref": "#/$defs/nonEmptyString" },
19
+ "head": { "$ref": "#/$defs/nonEmptyString" }
20
+ }
21
+ },
22
+ "coverage": {
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": ["exclusions"],
26
+ "properties": {
27
+ "exclusions": {
28
+ "type": "array",
29
+ "items": { "$ref": "#/$defs/coverageExclusion" }
30
+ }
31
+ }
32
+ },
33
+ "anchors": {
34
+ "type": "object",
35
+ "propertyNames": { "minLength": 1 },
36
+ "additionalProperties": { "$ref": "#/$defs/anchor" }
37
+ },
38
+ "connections": {
39
+ "oneOf": [
40
+ {
41
+ "type": "object",
42
+ "propertyNames": { "minLength": 1 },
43
+ "additionalProperties": { "$ref": "#/$defs/connectionWithoutId" }
44
+ },
45
+ {
46
+ "type": "array",
47
+ "items": { "$ref": "#/$defs/connectionWithId" }
48
+ }
49
+ ]
50
+ },
51
+ "chapters": {
52
+ "type": "array",
53
+ "minItems": 1,
54
+ "items": { "$ref": "#/$defs/chapter" }
55
+ }
56
+ },
57
+ "$defs": {
58
+ "nonEmptyString": { "type": "string", "minLength": 1 },
59
+ "stringArray": {
60
+ "type": "array",
61
+ "items": { "type": "string" }
62
+ },
63
+ "anchor": {
64
+ "type": "object",
65
+ "additionalProperties": false,
66
+ "required": ["file", "revision", "contains"],
67
+ "properties": {
68
+ "file": { "$ref": "#/$defs/nonEmptyString" },
69
+ "revision": { "enum": ["base", "head"] },
70
+ "contains": { "$ref": "#/$defs/nonEmptyString" },
71
+ "occurrence": { "type": "integer", "minimum": 1 }
72
+ }
73
+ },
74
+ "connectionWithoutId": {
75
+ "type": "object",
76
+ "additionalProperties": false,
77
+ "required": ["from", "to", "label"],
78
+ "properties": {
79
+ "from": { "$ref": "#/$defs/nonEmptyString" },
80
+ "to": { "$ref": "#/$defs/nonEmptyString" },
81
+ "label": { "$ref": "#/$defs/nonEmptyString" }
82
+ }
83
+ },
84
+ "connectionWithId": {
85
+ "type": "object",
86
+ "additionalProperties": false,
87
+ "required": ["id", "from", "to", "label"],
88
+ "properties": {
89
+ "id": { "$ref": "#/$defs/nonEmptyString" },
90
+ "from": { "$ref": "#/$defs/nonEmptyString" },
91
+ "to": { "$ref": "#/$defs/nonEmptyString" },
92
+ "label": { "$ref": "#/$defs/nonEmptyString" }
93
+ }
94
+ },
95
+ "narrative": {
96
+ "type": "object",
97
+ "required": ["summary", "bullets", "tags", "takeaway"],
98
+ "properties": {
99
+ "summary": { "$ref": "#/$defs/nonEmptyString" },
100
+ "bullets": { "$ref": "#/$defs/stringArray" },
101
+ "tags": { "$ref": "#/$defs/stringArray" },
102
+ "takeaway": { "$ref": "#/$defs/nonEmptyString" }
103
+ }
104
+ },
105
+ "step": {
106
+ "type": "object",
107
+ "additionalProperties": false,
108
+ "required": ["id", "title", "body", "focus"],
109
+ "properties": {
110
+ "id": { "$ref": "#/$defs/nonEmptyString" },
111
+ "title": { "$ref": "#/$defs/nonEmptyString" },
112
+ "body": { "$ref": "#/$defs/nonEmptyString" },
113
+ "focus": { "$ref": "#/$defs/nonEmptyString" },
114
+ "connection": { "$ref": "#/$defs/nonEmptyString" },
115
+ "depth": { "enum": ["mentioned", "explained", "contextualized"] }
116
+ }
117
+ },
118
+ "coverageExclusion": {
119
+ "type": "object",
120
+ "additionalProperties": false,
121
+ "required": ["path", "reason"],
122
+ "properties": {
123
+ "path": { "$ref": "#/$defs/nonEmptyString" },
124
+ "hunks": { "$ref": "#/$defs/stringArray" },
125
+ "reason": { "$ref": "#/$defs/nonEmptyString" }
126
+ }
127
+ },
128
+ "scene": {
129
+ "allOf": [
130
+ { "$ref": "#/$defs/narrative" },
131
+ {
132
+ "type": "object",
133
+ "additionalProperties": false,
134
+ "required": ["id", "title", "summary", "bullets", "tags", "takeaway", "steps"],
135
+ "properties": {
136
+ "id": { "$ref": "#/$defs/nonEmptyString" },
137
+ "title": { "$ref": "#/$defs/nonEmptyString" },
138
+ "summary": { "$ref": "#/$defs/nonEmptyString" },
139
+ "bullets": { "$ref": "#/$defs/stringArray" },
140
+ "tags": { "$ref": "#/$defs/stringArray" },
141
+ "takeaway": { "$ref": "#/$defs/nonEmptyString" },
142
+ "steps": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/step" } }
143
+ }
144
+ }
145
+ ]
146
+ },
147
+ "stackEntry": {
148
+ "type": "object",
149
+ "additionalProperties": false,
150
+ "required": ["id", "ref"],
151
+ "properties": {
152
+ "id": { "$ref": "#/$defs/nonEmptyString" },
153
+ "ref": { "$ref": "#/$defs/nonEmptyString" },
154
+ "label": { "$ref": "#/$defs/nonEmptyString" }
155
+ }
156
+ },
157
+ "stackStep": {
158
+ "type": "object",
159
+ "additionalProperties": false,
160
+ "required": ["id", "title", "body", "file", "pair"],
161
+ "properties": {
162
+ "id": { "$ref": "#/$defs/nonEmptyString" },
163
+ "title": { "$ref": "#/$defs/nonEmptyString" },
164
+ "body": { "$ref": "#/$defs/nonEmptyString" },
165
+ "file": { "$ref": "#/$defs/nonEmptyString" },
166
+ "pair": {
167
+ "type": "array",
168
+ "minItems": 2,
169
+ "maxItems": 2,
170
+ "items": { "$ref": "#/$defs/nonEmptyString" }
171
+ },
172
+ "side": { "enum": ["left", "right"] },
173
+ "lines": {
174
+ "type": "array",
175
+ "minItems": 2,
176
+ "maxItems": 2,
177
+ "items": { "type": "integer", "minimum": 1 }
178
+ }
179
+ }
180
+ },
181
+ "stackedScene": {
182
+ "type": "object",
183
+ "additionalProperties": false,
184
+ "required": ["id", "kind", "title", "summary", "bullets", "tags", "takeaway", "stack", "steps"],
185
+ "properties": {
186
+ "id": { "$ref": "#/$defs/nonEmptyString" },
187
+ "kind": { "const": "stacked-diff" },
188
+ "title": { "$ref": "#/$defs/nonEmptyString" },
189
+ "summary": { "$ref": "#/$defs/nonEmptyString" },
190
+ "bullets": { "$ref": "#/$defs/stringArray" },
191
+ "tags": { "$ref": "#/$defs/stringArray" },
192
+ "takeaway": { "$ref": "#/$defs/nonEmptyString" },
193
+ "stack": { "type": "array", "minItems": 3, "maxItems": 6, "items": { "$ref": "#/$defs/stackEntry" } },
194
+ "files": { "$ref": "#/$defs/stringArray" },
195
+ "steps": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/stackStep" } }
196
+ }
197
+ },
198
+ "deconstructedChange": {
199
+ "type": "object",
200
+ "additionalProperties": false,
201
+ "required": ["file", "hunks"],
202
+ "properties": {
203
+ "file": { "$ref": "#/$defs/nonEmptyString" },
204
+ "hunks": {
205
+ "type": "array",
206
+ "minItems": 1,
207
+ "items": { "$ref": "#/$defs/nonEmptyString" }
208
+ }
209
+ }
210
+ },
211
+ "deconstructedExclusion": {
212
+ "type": "object",
213
+ "additionalProperties": false,
214
+ "required": ["file", "reason"],
215
+ "properties": {
216
+ "file": { "$ref": "#/$defs/nonEmptyString" },
217
+ "hunks": {
218
+ "type": "array",
219
+ "minItems": 1,
220
+ "items": { "$ref": "#/$defs/nonEmptyString" }
221
+ },
222
+ "reason": { "$ref": "#/$defs/nonEmptyString" }
223
+ }
224
+ },
225
+ "deconstructedStage": {
226
+ "type": "object",
227
+ "additionalProperties": false,
228
+ "required": ["id", "title", "narration", "changes"],
229
+ "properties": {
230
+ "id": { "$ref": "#/$defs/nonEmptyString" },
231
+ "title": { "$ref": "#/$defs/nonEmptyString" },
232
+ "narration": { "$ref": "#/$defs/nonEmptyString" },
233
+ "changes": {
234
+ "type": "array",
235
+ "minItems": 1,
236
+ "items": { "$ref": "#/$defs/deconstructedChange" }
237
+ }
238
+ }
239
+ },
240
+ "deconstructedScene": {
241
+ "type": "object",
242
+ "additionalProperties": false,
243
+ "required": ["id", "kind", "title", "summary", "bullets", "tags", "takeaway", "stages"],
244
+ "properties": {
245
+ "id": { "$ref": "#/$defs/nonEmptyString" },
246
+ "kind": { "const": "deconstructed-diff" },
247
+ "title": { "$ref": "#/$defs/nonEmptyString" },
248
+ "summary": { "$ref": "#/$defs/nonEmptyString" },
249
+ "bullets": { "$ref": "#/$defs/stringArray" },
250
+ "tags": { "$ref": "#/$defs/stringArray" },
251
+ "takeaway": { "$ref": "#/$defs/nonEmptyString" },
252
+ "base": { "$ref": "#/$defs/nonEmptyString" },
253
+ "target": { "$ref": "#/$defs/nonEmptyString" },
254
+ "stages": {
255
+ "type": "array",
256
+ "minItems": 1,
257
+ "maxItems": 12,
258
+ "items": { "$ref": "#/$defs/deconstructedStage" }
259
+ },
260
+ "exclusions": {
261
+ "type": "array",
262
+ "items": { "$ref": "#/$defs/deconstructedExclusion" }
263
+ }
264
+ }
265
+ },
266
+ "chapter": {
267
+ "type": "object",
268
+ "additionalProperties": false,
269
+ "required": ["id", "title", "scenes"],
270
+ "properties": {
271
+ "id": { "$ref": "#/$defs/nonEmptyString" },
272
+ "title": { "$ref": "#/$defs/nonEmptyString" },
273
+ "scenes": {
274
+ "type": "array",
275
+ "minItems": 1,
276
+ "items": {
277
+ "oneOf": [
278
+ { "$ref": "#/$defs/scene" },
279
+ { "$ref": "#/$defs/stackedScene" },
280
+ { "$ref": "#/$defs/deconstructedScene" }
281
+ ]
282
+ }
283
+ }
284
+ }
285
+ }
286
+ }
287
+ }
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="UTF-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <meta http-equiv="Content-Security-Policy" content="default-src 'self'; img-src 'self' data:; font-src 'self' data:; style-src 'self' 'unsafe-inline'; script-src 'self'; worker-src 'self' blob:;">
6
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self'; base-uri 'none'; object-src 'none'; frame-src 'none'; form-action 'none'; img-src 'self' data:; font-src 'self' data:; style-src 'self' 'unsafe-inline'; script-src 'self'; worker-src 'self' blob:;">
7
7
  <title>Bygone</title>
8
8
  <link href="../media/webview.css" rel="stylesheet">
9
9
  </head>
@@ -11,7 +11,7 @@
11
11
  <div id="container">
12
12
  <div id="header">
13
13
  <div id="file-info" class="header-align-diff">Choose a compare command to render a diff.</div>
14
- <div id="status-banner" class="status-banner header-align-diff" hidden></div>
14
+ <div id="status-banner" class="status-banner header-align-diff" role="status" aria-live="polite" aria-atomic="true" hidden></div>
15
15
  <div id="directory-return-toolbar" class="directory-return-toolbar header-align-diff" hidden>
16
16
  <button id="back-to-directory" class="directory-return-button" type="button" title="Back to directory view (Cmd/Ctrl+[)">
17
17
  <svg viewBox="0 0 24 24" aria-hidden="true">
@@ -20,6 +20,9 @@
20
20
  </svg>
21
21
  <span>Back</span>
22
22
  </button>
23
+ <button id="toggle-directory-sidebar" class="directory-return-button" type="button" title="Hide directory files" aria-label="Hide directory files" aria-pressed="true">
24
+ <span>Files</span>
25
+ </button>
23
26
  </div>
24
27
  <div id="edit-mode-toolbar" class="edit-mode-toolbar header-align-diff" hidden>
25
28
  <button id="toggle-readonly" class="edit-mode-button" type="button" title="Toggle read-only mode">Editing On</button>
@@ -54,7 +57,7 @@
54
57
  <path d="M19 5v14"></path>
55
58
  </svg>
56
59
  </button>
57
- <div id="change-position" class="change-position"></div>
60
+ <div id="change-position" class="change-position" role="status" aria-live="polite" aria-atomic="true"></div>
58
61
  <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">
59
62
  <svg viewBox="0 0 24 24" aria-hidden="true">
60
63
  <path d="M19 12H9"></path>
@@ -69,6 +72,19 @@
69
72
  </svg>
70
73
  </button>
71
74
  </div>
75
+ <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>
76
+ <svg viewBox="0 0 24 24" aria-hidden="true">
77
+ <path d="M4 6h13a3 3 0 0 1 0 6H9"></path>
78
+ <path d="M12 9l-3 3 3 3"></path>
79
+ <path d="M4 18h8"></path>
80
+ </svg>
81
+ </button>
82
+ <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>
83
+ <svg viewBox="0 0 24 24" aria-hidden="true">
84
+ <path d="M20 11a8 8 0 1 0-2.3 5.7"></path>
85
+ <path d="M20 5v6h-6"></path>
86
+ </svg>
87
+ </button>
72
88
  </div>
73
89
  <div class="change-hint">Cmd/Ctrl+Alt+Up/Down to jump.</div>
74
90
  </div>
@@ -84,7 +100,7 @@
84
100
  <path d="M10 18l-6-6 6-6" opacity="0.7"></path>
85
101
  </svg>
86
102
  </button>
87
- <div id="history-position" class="history-position"></div>
103
+ <div id="history-position" class="history-position" role="status" aria-live="polite" aria-atomic="true"></div>
88
104
  <button id="history-forward" class="history-button icon-button" type="button" title="Newer commit" aria-label="Newer commit">
89
105
  <svg viewBox="0 0 24 24" aria-hidden="true">
90
106
  <path d="M9 18l6-6-6-6"></path>
@@ -131,14 +147,15 @@
131
147
  </div>
132
148
  <div id="diff-workspace">
133
149
  <aside id="history-rail" class="history-rail hidden" hidden></aside>
150
+ <button id="show-navigation-sidebar" class="navigation-sidebar-show" type="button" title="Show navigation sidebar" aria-label="Show navigation sidebar" hidden>›</button>
134
151
  <div id="diff-container">
135
152
  <div id="two-way-diff" class="diff-view">
136
153
  <div class="file-panel">
137
- <div id="file1-header" class="file-header">File 1</div>
154
+ <button id="file1-header" class="file-header" type="button" title="Select left pane" aria-pressed="false">File 1</button>
138
155
  <div id="file1-content" class="file-content"></div>
139
156
  </div>
140
157
  <div class="file-panel">
141
- <div id="file2-header" class="file-header">File 2</div>
158
+ <button id="file2-header" class="file-header" type="button" title="Select right pane" aria-pressed="false">File 2</button>
142
159
  <div id="file2-content" class="file-content"></div>
143
160
  </div>
144
161
  </div>