@davmash/bygone 0.5.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.
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ // standalone/preload.js
4
+ var path = require("path");
5
+ var { pathToFileURL } = require("url");
6
+ var { contextBridge, ipcRenderer } = require("electron");
7
+ var editorWorkerUrl = pathToFileURL(path.join(__dirname, "..", "media", "editor.worker.js")).toString();
8
+ ipcRenderer.on("bygone:host-message", (_event, payload) => {
9
+ window.postMessage({
10
+ __bygoneHostMessage: payload
11
+ }, "*");
12
+ });
13
+ contextBridge.exposeInMainWorld("__BYGONE_HOST__", {
14
+ environment: "standalone",
15
+ editorWorkerUrl,
16
+ postMessage(message) {
17
+ ipcRenderer.send("bygone:renderer-message", message);
18
+ }
19
+ });
20
+ //# sourceMappingURL=standalone-preload.js.map
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@davmash/bygone",
3
+ "version": "0.5.2",
4
+ "description": "See how change happened. Visual diff and file history.",
5
+ "author": "David Mashburn",
6
+ "license": "MIT",
7
+ "homepage": "https://github.com/davidmashburn/bygone",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/davidmashburn/bygone.git"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/davidmashburn/bygone/issues"
14
+ },
15
+ "bin": {
16
+ "bygone": "./bin/bygone.js"
17
+ },
18
+ "main": "./out/standalone-main.js",
19
+ "files": [
20
+ "bin/",
21
+ "out/",
22
+ "media/",
23
+ "standalone/",
24
+ "README.md",
25
+ "LICENSE.txt",
26
+ "CHANGELOG.md"
27
+ ],
28
+ "keywords": [
29
+ "diff",
30
+ "git",
31
+ "history",
32
+ "visual",
33
+ "electron"
34
+ ],
35
+ "dependencies": {
36
+ "electron": "^31.7.7",
37
+ "electron-updater": "^6.8.3"
38
+ }
39
+ }
@@ -0,0 +1,177 @@
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
+ <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:;">
7
+ <title>Bygone</title>
8
+ <link href="../media/webview.css" rel="stylesheet">
9
+ </head>
10
+ <body>
11
+ <div id="container">
12
+ <div id="header">
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>
15
+ <div id="directory-return-toolbar" class="directory-return-toolbar header-align-diff" hidden>
16
+ <button id="back-to-directory" class="directory-return-button" type="button" title="Back to directory view (Cmd/Ctrl+[)">
17
+ <svg viewBox="0 0 24 24" aria-hidden="true">
18
+ <path d="M15 18l-6-6 6-6"></path>
19
+ <path d="M9 12h10"></path>
20
+ </svg>
21
+ <span>Back</span>
22
+ </button>
23
+ </div>
24
+ <div id="edit-mode-toolbar" class="edit-mode-toolbar header-align-diff" hidden>
25
+ <button id="toggle-readonly" class="edit-mode-button" type="button" title="Toggle read-only mode">Editing On</button>
26
+ </div>
27
+ <div id="change-toolbar" class="change-toolbar header-align-diff" hidden>
28
+ <div class="change-toolbar-main">
29
+ <div class="change-toolbar-nav">
30
+ <button id="previous-file" class="change-button icon-button" type="button" title="Previous file" aria-label="Previous file">
31
+ <svg viewBox="0 0 24 24" aria-hidden="true">
32
+ <path d="M17 11l-5-5-5 5"></path>
33
+ <path d="M17 18l-5-5-5 5" opacity="0.7"></path>
34
+ </svg>
35
+ </button>
36
+ <button id="next-file" class="change-button change-button-primary icon-button" type="button" title="Next file" aria-label="Next file">
37
+ <svg viewBox="0 0 24 24" aria-hidden="true">
38
+ <path d="M7 13l5 5 5-5"></path>
39
+ <path d="M7 6l5 5 5-5" opacity="0.7"></path>
40
+ </svg>
41
+ </button>
42
+ </div>
43
+ <div class="change-toolbar-center">
44
+ <button id="previous-change" class="change-button icon-button" type="button" title="Previous difference (Cmd/Ctrl+Alt+Up)" aria-label="Previous difference">
45
+ <svg viewBox="0 0 24 24" aria-hidden="true">
46
+ <path d="M12 19V5"></path>
47
+ <path d="M6 11l6-6 6 6"></path>
48
+ </svg>
49
+ </button>
50
+ <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">
51
+ <svg viewBox="0 0 24 24" aria-hidden="true">
52
+ <path d="M5 12h10"></path>
53
+ <path d="M11 8l4 4-4 4"></path>
54
+ <path d="M19 5v14"></path>
55
+ </svg>
56
+ </button>
57
+ <div id="change-position" class="change-position"></div>
58
+ <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
+ <svg viewBox="0 0 24 24" aria-hidden="true">
60
+ <path d="M19 12H9"></path>
61
+ <path d="M13 8l-4 4 4 4"></path>
62
+ <path d="M5 5v14"></path>
63
+ </svg>
64
+ </button>
65
+ <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">
66
+ <svg viewBox="0 0 24 24" aria-hidden="true">
67
+ <path d="M12 5v14"></path>
68
+ <path d="M6 13l6 6 6-6"></path>
69
+ </svg>
70
+ </button>
71
+ </div>
72
+ </div>
73
+ <div class="change-hint">Cmd/Ctrl+Alt+Up/Down to jump.</div>
74
+ </div>
75
+ <div id="history-toolbar" class="history-toolbar header-align-diff" hidden>
76
+ <div class="history-side history-side-left">
77
+ <div id="history-left-commit" class="history-commit"></div>
78
+ <div id="history-left-time" class="history-time"></div>
79
+ </div>
80
+ <div class="history-nav">
81
+ <button id="history-back" class="history-button icon-button" type="button" title="Older commit" aria-label="Older commit">
82
+ <svg viewBox="0 0 24 24" aria-hidden="true">
83
+ <path d="M15 18l-6-6 6-6"></path>
84
+ <path d="M10 18l-6-6 6-6" opacity="0.7"></path>
85
+ </svg>
86
+ </button>
87
+ <div id="history-position" class="history-position"></div>
88
+ <button id="history-forward" class="history-button icon-button" type="button" title="Newer commit" aria-label="Newer commit">
89
+ <svg viewBox="0 0 24 24" aria-hidden="true">
90
+ <path d="M9 18l6-6-6-6"></path>
91
+ <path d="M14 18l6-6-6-6" opacity="0.7"></path>
92
+ </svg>
93
+ </button>
94
+ <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">
95
+ Staged
96
+ </button>
97
+ <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">
98
+ Changed
99
+ </button>
100
+ </div>
101
+ <div class="history-side history-side-right">
102
+ <div id="history-right-commit" class="history-commit"></div>
103
+ <div id="history-right-time" class="history-time"></div>
104
+ </div>
105
+ </div>
106
+ <div id="directory-tree-toolbar" class="directory-tree-toolbar header-align-diff" hidden>
107
+ <button id="directory-expand-all" class="directory-tree-button icon-button" type="button" title="Expand all folders" aria-label="Expand all folders">
108
+ <svg viewBox="0 0 24 24" aria-hidden="true">
109
+ <path d="M4 7h16"></path>
110
+ <path d="M4 12h16"></path>
111
+ <path d="M4 17h16"></path>
112
+ <path d="M12 4v16"></path>
113
+ </svg>
114
+ </button>
115
+ <button id="directory-collapse-all" class="directory-tree-button icon-button" type="button" title="Collapse all folders" aria-label="Collapse all folders">
116
+ <svg viewBox="0 0 24 24" aria-hidden="true">
117
+ <path d="M4 7h16"></path>
118
+ <path d="M4 12h16"></path>
119
+ <path d="M4 17h16"></path>
120
+ </svg>
121
+ </button>
122
+ <button id="directory-collapse-unchanged" class="directory-tree-button icon-button" type="button" title="Collapse unchanged folders" aria-label="Collapse unchanged folders">
123
+ <svg viewBox="0 0 24 24" aria-hidden="true">
124
+ <path d="M4 7h16"></path>
125
+ <path d="M4 12h10"></path>
126
+ <path d="M4 17h16"></path>
127
+ <path d="M17 9l3 3-3 3"></path>
128
+ </svg>
129
+ </button>
130
+ </div>
131
+ </div>
132
+ <div id="diff-workspace">
133
+ <aside id="history-rail" class="history-rail hidden" hidden></aside>
134
+ <div id="diff-container">
135
+ <div id="two-way-diff" class="diff-view">
136
+ <div class="file-panel">
137
+ <div id="file1-header" class="file-header">File 1</div>
138
+ <div id="file1-content" class="file-content"></div>
139
+ </div>
140
+ <div class="file-panel">
141
+ <div id="file2-header" class="file-header">File 2</div>
142
+ <div id="file2-content" class="file-content"></div>
143
+ </div>
144
+ </div>
145
+ <div id="directory-diff" class="dir-view hidden">
146
+ <div class="dir-headers">
147
+ <div class="dir-col-header" id="dir-left-header">Left</div>
148
+ <div class="dir-header-gutter" aria-hidden="true"></div>
149
+ <div class="dir-col-header" id="dir-right-header">Right</div>
150
+ </div>
151
+ <div id="dir-rows" class="dir-rows-container"></div>
152
+ </div>
153
+ <div id="multi-way-diff" class="multi-view hidden"></div>
154
+ <div id="three-way-diff" class="diff-view hidden">
155
+ <div class="file-panel">
156
+ <div id="base-header" class="file-header">Base</div>
157
+ <div id="base-content" class="file-content"></div>
158
+ </div>
159
+ <div class="file-panel">
160
+ <div id="left-header" class="file-header">Left</div>
161
+ <div id="left-content" class="file-content"></div>
162
+ </div>
163
+ <div class="file-panel">
164
+ <div id="right-header" class="file-header">Right</div>
165
+ <div id="right-content" class="file-content"></div>
166
+ </div>
167
+ <div class="file-panel">
168
+ <div id="result-header" class="file-header">Result</div>
169
+ <div id="result-content" class="file-content"></div>
170
+ </div>
171
+ </div>
172
+ </div>
173
+ </div>
174
+ </div>
175
+ <script src="../media/webview.js"></script>
176
+ </body>
177
+ </html>