screengraft 0.63.2 → 0.63.3
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 +1 -1
- package/ui/index.html +31 -22
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "screengraft",
|
|
3
|
-
"version": "0.63.
|
|
3
|
+
"version": "0.63.3",
|
|
4
4
|
"description": "Put a UI screenshot or screen recording onto a photographed device screen with the perspective exactly right \u2014 a homography you confirm by hand, not a generative guess.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mockup",
|
package/ui/index.html
CHANGED
|
@@ -96,10 +96,15 @@
|
|
|
96
96
|
[0] #0F6BFF at 20% saturation
|
|
97
97
|
[1] #FF4646 at 15% luminosity
|
|
98
98
|
[2] #7E7E7E at 20% hue
|
|
99
|
-
|
|
99
|
+
[3] #FFFFFF at 40% soft light -- added 14 Sep: the three above
|
|
100
|
+
cancel on mid-tones (an orange table moved the edge 1 level);
|
|
101
|
+
soft light lifts mid-tones and does nothing at white, so the
|
|
102
|
+
line reads on wood and marble too (+20..+36 vs 16/-18 before).
|
|
103
|
+
Drawn as four rings (see .bgroup::before / ::after / > .ring). */
|
|
100
104
|
--group-edge-sat:rgba(15,107,255,.2);
|
|
101
105
|
--group-edge-lum:rgba(255,70,70,.15);
|
|
102
106
|
--group-edge-hue:rgba(126,126,126,.2);
|
|
107
|
+
--group-edge-lift:rgba(255,255,255,.4);
|
|
103
108
|
--group-shadow:0 2px 4px rgba(0,0,0,.08), 0 3px 10px rgba(0,0,0,.12), 0 4px 24px rgba(0,0,0,.25);
|
|
104
109
|
--pill-shadow:0 2px 2px rgba(0,0,0,.03), 0 3px 5px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.25);
|
|
105
110
|
|
|
@@ -588,6 +593,7 @@
|
|
|
588
593
|
.bgroup::before{border-color:var(--group-edge-sat);mix-blend-mode:saturation;z-index:1}
|
|
589
594
|
.bgroup::after{border-color:var(--group-edge-lum);mix-blend-mode:luminosity;z-index:2}
|
|
590
595
|
.bgroup > .ring{border-color:var(--group-edge-hue);mix-blend-mode:hue;z-index:3}
|
|
596
|
+
.bgroup > .ring.lift{border-color:var(--group-edge-lift);mix-blend-mode:soft-light;z-index:4}
|
|
591
597
|
.bgroup.row{flex-direction:row}
|
|
592
598
|
.bgroup > .segbtn:first-of-type{border-top-left-radius:var(--r-sm);border-top-right-radius:var(--r-sm)}
|
|
593
599
|
.bgroup > .segbtn:last-of-type{border-bottom-left-radius:var(--r-sm);border-bottom-right-radius:var(--r-sm)}
|
|
@@ -618,23 +624,26 @@
|
|
|
618
624
|
recessed surface and the group stroke, hidden while it has nothing to say.
|
|
619
625
|
Glyph + weight + luminance encoding unchanged (see .status.ok/.warn/.err). */
|
|
620
626
|
/* Keyed on the ids, not a class: the JS rewrites className on both pills. */
|
|
621
|
-
/* Status pill 5:7 / 5:10: the same
|
|
622
|
-
Group, 1px OUTSIDE.
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
627
|
+
/* Status pill 5:7 / 5:10: the same four blend-mode paints as the Button
|
|
628
|
+
Group, 1px OUTSIDE. The pill's text (#detSt / #outSt) is rewritten by the
|
|
629
|
+
script and its ::before is the status glyph, so the box and the four rings
|
|
630
|
+
live on a .pillwrap around it. No z-index anywhere in the chain, for the
|
|
631
|
+
same reason as the rails: the rings blend against the photograph only if
|
|
632
|
+
nothing between them and it opens a stacking context. The result pill sits
|
|
633
|
+
AFTER #outWrap in the markup so it paints over it. */
|
|
634
|
+
.pillwrap{position:absolute;top:12px;left:0;right:0;width:fit-content;margin:0 auto;
|
|
635
|
+
height:22px;border-radius:999px;background:var(--inchip-empty);
|
|
636
|
+
box-shadow:var(--pill-shadow);max-width:calc(100% - 96px);display:block}
|
|
637
|
+
.pillwrap:has(> .status:empty){display:none}
|
|
638
|
+
.pillwrap > .ring{position:absolute;inset:-1px;border:1px solid;border-radius:999px;pointer-events:none}
|
|
639
|
+
.pillwrap > .ring.sat{border-color:var(--group-edge-sat);mix-blend-mode:saturation;z-index:1}
|
|
640
|
+
.pillwrap > .ring.lum{border-color:var(--group-edge-lum);mix-blend-mode:luminosity;z-index:2}
|
|
641
|
+
.pillwrap > .ring.hue{border-color:var(--group-edge-hue);mix-blend-mode:hue;z-index:3}
|
|
642
|
+
.pillwrap > .ring.lift{border-color:var(--group-edge-lift);mix-blend-mode:soft-light;z-index:4}
|
|
643
|
+
#detSt,#outSt{position:relative;height:22px;padding:0 10px;border-radius:999px;
|
|
644
|
+
max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
|
|
633
645
|
display:inline-flex;line-height:20px}
|
|
634
646
|
#detSt:empty,#outSt:empty{display:none}
|
|
635
|
-
#detSt::after,#outSt::after{content:"";position:absolute;inset:-1px;
|
|
636
|
-
border:1px solid var(--group-edge-lum);border-radius:999px;pointer-events:none;
|
|
637
|
-
mix-blend-mode:luminosity}
|
|
638
647
|
.lbl{color:var(--ink);text-transform:uppercase;letter-spacing:.06em;font-size:11px;font-weight:600}
|
|
639
648
|
.scroller{overflow:auto;background:var(--well);display:grid;
|
|
640
649
|
min-height:0;min-width:0;
|
|
@@ -1173,22 +1182,22 @@
|
|
|
1173
1182
|
<div class="scroller" id="scroller">
|
|
1174
1183
|
<canvas id="c" tabindex="-1"></canvas>
|
|
1175
1184
|
</div>
|
|
1176
|
-
<span class="status" id="detSt"></span>
|
|
1185
|
+
<span class="pillwrap"><i class="ring sat" aria-hidden="true"></i><i class="ring lum" aria-hidden="true"></i><i class="ring hue" aria-hidden="true"></i><i class="ring lift" aria-hidden="true"></i><span class="status" id="detSt"></span></span>
|
|
1177
1186
|
<span id="czSt" class="sr-only" aria-live="polite"></span>
|
|
1178
1187
|
<!-- Left rail (Figma 137:4025): the zoom group, the fit button, then the
|
|
1179
1188
|
corner rail. Icon-only, so every button carries an aria-label. The
|
|
1180
1189
|
corner glyphs light the corner they name; the one currently picked
|
|
1181
1190
|
on the canvas is also raised (kept in step from draw()). -->
|
|
1182
1191
|
<div class="lrail" id="lrail">
|
|
1183
|
-
<div class="bgroup" role="group" aria-label="Zoom"><i class="ring" aria-hidden="true"></i>
|
|
1192
|
+
<div class="bgroup" role="group" aria-label="Zoom"><i class="ring" aria-hidden="true"></i><i class="ring lift" aria-hidden="true"></i>
|
|
1184
1193
|
<button class="segbtn" id="czIn" aria-label="Zoom in" title="Zoom in (⌘ + scroll zooms to the pointer)"><svg viewBox="0 0 16 16" aria-hidden="true"><path fill="var(--icon)" d="M8.5 7.5H12.5V8.5H8.5V12.5H7.5V8.5H3.5V7.5H7.5V3.5H8.5V7.5Z"/></svg></button>
|
|
1185
1194
|
<button class="segbtn" id="cz100" aria-label="Actual size, 100%" title="Actual size — one photo pixel per screen pixel"><svg viewBox="0 0 16 16" aria-hidden="true"><g transform="translate(2.77 4.245)" fill="var(--ink)"><path d="M4.80713 7.75049L6.78906 4.85547L4.78564 1.96045H5.88672L7.26172 4.11426H7.34766L8.70654 1.96045H9.75391L7.78809 4.81787L9.78076 7.75049H8.68506L7.31543 5.56445H7.22949L5.85449 7.75049H4.80713Z"/><path d="M2.05713 7.75049V1.07422H1.97119L0 2.50293V1.48242L2.0625 0H3.02393V7.75049H2.05713Z"/></g></svg></button>
|
|
1186
1195
|
<button class="segbtn" id="czOut" aria-label="Zoom out" title="Zoom out"><svg viewBox="0 0 16 16" aria-hidden="true"><path fill="var(--icon)" d="M12.5 8.5H3.5V7.5H12.5V8.5Z"/></svg></button>
|
|
1187
1196
|
</div>
|
|
1188
|
-
<div class="bgroup"><i class="ring" aria-hidden="true"></i>
|
|
1197
|
+
<div class="bgroup"><i class="ring" aria-hidden="true"></i><i class="ring lift" aria-hidden="true"></i>
|
|
1189
1198
|
<button class="segbtn" id="czFit" aria-label="Fit the photo to the pane" title="Fit the whole photo in the pane"><svg viewBox="0 0 16 16" fill="none" aria-hidden="true"><path fill="var(--mute)" d="M14.1025 1.00488C14.6067 1.05621 15 1.48232 15 2V14L14.9951 14.1025C14.9472 14.573 14.573 14.9472 14.1025 14.9951L14 15H2C1.48232 15 1.05621 14.6067 1.00488 14.1025L1 14V2C1 1.44772 1.44772 1 2 1H14L14.1025 1.00488ZM2 14H14V2H2V14Z"/><path stroke="var(--icon)" d="M7 11.5H4.5V9M4.5 11.5L7.5 8.5"/><path stroke="var(--icon)" d="M9 4.5H11.5V7M11.5 4.5L8.5 7.5"/></svg></button>
|
|
1190
1199
|
</div>
|
|
1191
|
-
<div class="bgroup corners" role="group" aria-label="Select corner"><i class="ring" aria-hidden="true"></i>
|
|
1200
|
+
<div class="bgroup corners" role="group" aria-label="Select corner"><i class="ring" aria-hidden="true"></i><i class="ring lift" aria-hidden="true"></i>
|
|
1192
1201
|
<button class="segbtn" data-jump="0" aria-label="Top-left corner" title="Jump to the top-left corner"><svg viewBox="0 0 16 16" aria-hidden="true"><path fill="var(--mute)" d="M2 13C2 13.5523 2.44772 14 3 14H6V15H3L2.7959 14.9893C1.85435 14.8938 1.1062 14.1457 1.01074 13.2041L1 13V10H2V13ZM15 13C15 14.0357 14.2128 14.887 13.2041 14.9893L13 15H10V14H13C13.5523 14 14 13.5523 14 13V10H15V13ZM6 2H3C2.44772 2 2 2.44772 2 3V6H1V3C1 1.89543 1.89543 1 3 1H6V2ZM13 1C14.1046 1 15 1.89543 15 3V6H14V3C14 2.44772 13.5523 2 13 2H10V1H13Z"/><path fill="var(--acc-ink)" d="M6 2H3C2.44772 2 2 2.44772 2 3V6H1V3C1 1.89543 1.89543 1 3 1H6V2Z"/></svg></button>
|
|
1193
1202
|
<button class="segbtn" data-jump="1" aria-label="Top-right corner" title="Jump to the top-right corner"><svg viewBox="0 0 16 16" aria-hidden="true"><path fill="var(--mute)" d="M2 13C2 13.5523 2.44772 14 3 14H6V15H3L2.7959 14.9893C1.85435 14.8938 1.1062 14.1457 1.01074 13.2041L1 13V10H2V13ZM15 13C15 14.0357 14.2128 14.887 13.2041 14.9893L13 15H10V14H13C13.5523 14 14 13.5523 14 13V10H15V13ZM6 2H3C2.44772 2 2 2.44772 2 3V6H1V3C1 1.89543 1.89543 1 3 1H6V2ZM13 1C14.1046 1 15 1.89543 15 3V6H14V3C14 2.44772 13.5523 2 13 2H10V1H13Z"/><path fill="var(--acc-ink)" d="M10 2H13C13.5523 2 14 2.44772 14 3V6H15V3C15 1.89543 14.1046 1 13 1H10V2Z"/></svg></button>
|
|
1194
1203
|
<button class="segbtn" data-jump="3" aria-label="Bottom-left corner" title="Jump to the bottom-left corner"><svg viewBox="0 0 16 16" aria-hidden="true"><path fill="var(--mute)" d="M2 13C2 13.5523 2.44772 14 3 14H6V15H3L2.7959 14.9893C1.85435 14.8938 1.1062 14.1457 1.01074 13.2041L1 13V10H2V13ZM15 13C15 14.0357 14.2128 14.887 13.2041 14.9893L13 15H10V14H13C13.5523 14 14 13.5523 14 13V10H15V13ZM6 2H3C2.44772 2 2 2.44772 2 3V6H1V3C1 1.89543 1.89543 1 3 1H6V2ZM13 1C14.1046 1 15 1.89543 15 3V6H14V3C14 2.44772 13.5523 2 13 2H10V1H13Z"/><path fill="var(--acc-ink)" d="M6 14H3C2.44772 14 2 13.5523 2 13V10H1V13C1 14.1046 1.89543 15 3 15H6V14Z"/></svg></button>
|
|
@@ -1206,7 +1215,7 @@
|
|
|
1206
1215
|
not an action on the fit. The frame's last two segments are
|
|
1207
1216
|
placeholders; Rotate and Reset fill them. -->
|
|
1208
1217
|
<div class="brail" id="cvbar">
|
|
1209
|
-
<div class="bgroup row" role="group" aria-label="Fit actions"><i class="ring" aria-hidden="true"></i>
|
|
1218
|
+
<div class="bgroup row" role="group" aria-label="Fit actions"><i class="ring" aria-hidden="true"></i><i class="ring lift" aria-hidden="true"></i>
|
|
1210
1219
|
<button class="segbtn txt" id="redetect">Re-detect</button>
|
|
1211
1220
|
<button class="segbtn txt" id="pointat" title="Click once inside the screen and the detector will use that point. The detectors usually do find the screen — they just cannot tell which region IS one, and that is the part you can answer instantly.">Point at screen</button>
|
|
1212
1221
|
<button class="segbtn txt" id="rotatequad" title="Turn the screenshot inside the same four edges. The edges stay where they are; only which one is the top changes. A portrait screenshot fits a phone only two ways, so on a phone this is a half turn; a quarter turn where the screen is near-square or the screenshot fits the other way.">Rotate</button>
|
|
@@ -1223,7 +1232,7 @@
|
|
|
1223
1232
|
fitted quad by the browser. Not the composite — the composite already
|
|
1224
1233
|
has a frame burned into it, so playing over that would show two screens.
|
|
1225
1234
|
--><div id="liveWrap" hidden><img id="liveBg" alt=""><video id="liveVid" loop muted playsinline></video></div></div>
|
|
1226
|
-
<span class="status" id="outSt">Press Preview</span>
|
|
1235
|
+
<span class="pillwrap"><i class="ring sat" aria-hidden="true"></i><i class="ring lum" aria-hidden="true"></i><i class="ring hue" aria-hidden="true"></i><i class="ring lift" aria-hidden="true"></i><span class="status" id="outSt">Press Preview</span></span>
|
|
1227
1236
|
<!-- Video controls. Hidden entirely for a still source: a scrubber over a
|
|
1228
1237
|
screenshot is a control that can only confuse. The fit itself is
|
|
1229
1238
|
unchanged — you match the edges on one frame and every frame gets the
|