checkpoint-cli 0.3.3 → 0.3.4
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/dist/index.js +1 -1
- package/dist/tracking-script-minimal.js +28 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1606,7 +1606,7 @@ const program = new commander_1.Command();
|
|
|
1606
1606
|
program
|
|
1607
1607
|
.name('checkpoint')
|
|
1608
1608
|
.description('Share your localhost with reviewers — get visual feedback directly on the page')
|
|
1609
|
-
.version('0.3.
|
|
1609
|
+
.version('0.3.4');
|
|
1610
1610
|
// ── checkpoint login ──
|
|
1611
1611
|
program
|
|
1612
1612
|
.command('login')
|
|
@@ -9,6 +9,7 @@ function buildMinimalTrackingScript() {
|
|
|
9
9
|
var pickClickHandler=null;
|
|
10
10
|
var pickEscHandler=null;
|
|
11
11
|
var pickKeydownHandler=null;
|
|
12
|
+
var pickBlockHandler=null;
|
|
12
13
|
var hoverRaf=0;
|
|
13
14
|
var lastMouseX=0;
|
|
14
15
|
var lastMouseY=0;
|
|
@@ -449,11 +450,23 @@ function buildMinimalTrackingScript() {
|
|
|
449
450
|
if(pickClickHandler) window.removeEventListener('click',pickClickHandler,true);
|
|
450
451
|
if(pickEscHandler) window.removeEventListener('keydown',pickEscHandler,true);
|
|
451
452
|
if(pickKeydownHandler) window.removeEventListener('keydown',pickKeydownHandler,true);
|
|
453
|
+
if(pickBlockHandler){
|
|
454
|
+
window.removeEventListener('mousedown',pickBlockHandler,true);
|
|
455
|
+
window.removeEventListener('mouseup',pickBlockHandler,true);
|
|
456
|
+
window.removeEventListener('pointerup',pickBlockHandler,true);
|
|
457
|
+
window.removeEventListener('touchstart',pickBlockHandler,true);
|
|
458
|
+
window.removeEventListener('touchend',pickBlockHandler,true);
|
|
459
|
+
window.removeEventListener('auxclick',pickBlockHandler,true);
|
|
460
|
+
window.removeEventListener('dblclick',pickBlockHandler,true);
|
|
461
|
+
window.removeEventListener('contextmenu',pickBlockHandler,true);
|
|
462
|
+
window.removeEventListener('submit',pickBlockHandler,true);
|
|
463
|
+
}
|
|
452
464
|
pickMoveHandler=null;
|
|
453
465
|
pickPointerDownHandler=null;
|
|
454
466
|
pickClickHandler=null;
|
|
455
467
|
pickEscHandler=null;
|
|
456
468
|
pickKeydownHandler=null;
|
|
469
|
+
pickBlockHandler=null;
|
|
457
470
|
pendingPickCommit=false;
|
|
458
471
|
if(hoverRaf){
|
|
459
472
|
cancelAnimationFrame(hoverRaf);
|
|
@@ -509,12 +522,27 @@ function buildMinimalTrackingScript() {
|
|
|
509
522
|
if(typeof ev.stopImmediatePropagation==='function') ev.stopImmediatePropagation();
|
|
510
523
|
}
|
|
511
524
|
};
|
|
525
|
+
pickBlockHandler=function(ev){
|
|
526
|
+
if(!pickMode) return;
|
|
527
|
+
ev.preventDefault();
|
|
528
|
+
ev.stopPropagation();
|
|
529
|
+
if(typeof ev.stopImmediatePropagation==='function') ev.stopImmediatePropagation();
|
|
530
|
+
};
|
|
512
531
|
|
|
513
532
|
document.addEventListener('mousemove',pickMoveHandler,true);
|
|
514
533
|
window.addEventListener('pointerdown',pickPointerDownHandler,true);
|
|
515
534
|
window.addEventListener('click',pickClickHandler,true);
|
|
516
535
|
window.addEventListener('keydown',pickEscHandler,true);
|
|
517
536
|
window.addEventListener('keydown',pickKeydownHandler,true);
|
|
537
|
+
window.addEventListener('mousedown',pickBlockHandler,true);
|
|
538
|
+
window.addEventListener('mouseup',pickBlockHandler,true);
|
|
539
|
+
window.addEventListener('pointerup',pickBlockHandler,true);
|
|
540
|
+
window.addEventListener('touchstart',pickBlockHandler,{ capture:true, passive:false });
|
|
541
|
+
window.addEventListener('touchend',pickBlockHandler,{ capture:true, passive:false });
|
|
542
|
+
window.addEventListener('auxclick',pickBlockHandler,true);
|
|
543
|
+
window.addEventListener('dblclick',pickBlockHandler,true);
|
|
544
|
+
window.addEventListener('contextmenu',pickBlockHandler,true);
|
|
545
|
+
window.addEventListener('submit',pickBlockHandler,true);
|
|
518
546
|
}
|
|
519
547
|
|
|
520
548
|
function reportScroll(){
|