version-history-widget 0.1.0 → 0.1.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/package.json +2 -1
- package/widget.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "version-history-widget",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Zero-dependency version history for web projects: snapshots every change and adds a floating widget to browse, search, and restore any version.",
|
|
5
5
|
"keywords": ["version history", "undo", "snapshot", "restore", "dev-tool", "widget"],
|
|
6
6
|
"license": "MIT",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"engines": { "node": ">=14" },
|
|
9
9
|
"main": "./middleware.js",
|
|
10
10
|
"bin": {
|
|
11
|
+
"version-history-widget": "./vh.js",
|
|
11
12
|
"vh": "./vh.js",
|
|
12
13
|
"vh-singlefile": "./singlefile.js"
|
|
13
14
|
},
|
package/widget.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
if (window.__vhLoaded) return; window.__vhLoaded = true;
|
|
4
4
|
var Z = 2147483647, MODE = document.getElementById('vh-store') ? 'single' : 'project';
|
|
5
5
|
var css = '\
|
|
6
|
-
.vh-pill{position:fixed;right:16px;
|
|
7
|
-
.vh-panel{position:fixed;right:16px;
|
|
6
|
+
.vh-pill{position:fixed;right:16px;top:16px;z-index:' + Z + ';font:13px/1 system-ui,sans-serif;background:#111;color:#fff;border:0;border-radius:999px;padding:10px 14px;cursor:pointer;box-shadow:0 6px 20px rgba(0,0,0,.35)}\
|
|
7
|
+
.vh-panel{position:fixed;right:16px;top:56px;width:440px;max-width:calc(100vw - 32px);max-height:70vh;z-index:' + Z + ';background:#fff;color:#111;border:1px solid #ddd;border-radius:12px;box-shadow:0 12px 40px rgba(0,0,0,.35);font:13px/1.4 system-ui,sans-serif;display:flex;flex-direction:column;overflow:hidden}\
|
|
8
8
|
.vh-head{display:flex;gap:8px;padding:10px;border-bottom:1px solid #eee;align-items:center}\
|
|
9
9
|
.vh-search{flex:1;padding:8px 10px;border:1px solid #ccc;border-radius:8px;font:inherit;outline:none}.vh-search:focus{border-color:#111}\
|
|
10
10
|
.vh-clear{border:0;background:#eee;border-radius:6px;padding:6px 8px;cursor:pointer}\
|