@daybook/feedback 1.4.3 → 1.6.0

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/widget.js CHANGED
@@ -2,6 +2,8 @@ import { captureAnchor } from './anchor.js';
2
2
  import { fromPaste, MAX_FILES, revoke, stage } from './files.js';
3
3
  import { isTyping } from './hotkey.js';
4
4
  import { measureClearance } from './clearance.js';
5
+ import { overlaps } from './blur.js';
6
+ import { PRIVATE_ATTRIBUTE } from './redact.js';
5
7
  /**
6
8
  * The reporter-facing UI, rendered inside a shadow root.
7
9
  *
@@ -21,6 +23,16 @@ export class FeedbackWidget {
21
23
  * more complex feedbacks". One stays the normal answer; the composer offers another.
22
24
  */
23
25
  this.pins = [];
26
+ /**
27
+ * What the reporter has blurred. PM-T-0682.
28
+ *
29
+ * Picked with the pin's own gesture, so there is nothing new to learn: click an element, or — the
30
+ * one thing a pin does not need — drag across an area. Held as pins because they need what a pin
31
+ * needs, an element to follow and a box to fall back on, but kept apart from them: a blur is not
32
+ * what the report is about, is never numbered among the pins, and never goes on the wire. Not even
33
+ * its text — a blur's anchor is recorded without it.
34
+ */
35
+ this.blurs = [];
24
36
  /** Set while the composer is hidden for "Add another pin"; calling it puts the panel back. */
25
37
  this.cancelAdding = null;
26
38
  /** Takes the page markers down when the composer goes. */
@@ -322,6 +334,7 @@ export class FeedbackWidget {
322
334
  if (this.mode === 'picking') {
323
335
  this.mode = 'idle';
324
336
  this.pins = [];
337
+ this.blurs = [];
325
338
  this.dragged = null;
326
339
  this.render();
327
340
  }
@@ -383,17 +396,103 @@ export class FeedbackWidget {
383
396
  * the whole reason to do it here rather than on the page: a report used to arrive as a selector,
384
397
  * a text snapshot and a picture of a whole screen, leaving whoever read it to work out which of
385
398
  * forty things on that screen the sentence was about. Now the picture says.
399
+ *
400
+ * The same layer covers what must not be in the picture (PM-T-0682): the reporter's blurs, exactly
401
+ * as they saw them while writing, and `cover` — credentials the capture found on screen, in
402
+ * viewport pixels. Covers go in first and rings after, so a pin on something blurred still shows.
386
403
  */
387
- conceal() {
404
+ conceal(cover = []) {
388
405
  const layer = this.root.getElementById('layer');
389
406
  const previous = layer.style.visibility;
390
407
  layer.style.visibility = 'hidden';
391
- const rings = this.ringPins();
408
+ const origin = this.origin();
409
+ const drawn = [
410
+ ...this.veilBlurs(this.root),
411
+ ...cover.map(box => this.root.appendChild(veil(box, origin, null, true))),
412
+ ...this.ringPins(),
413
+ ];
392
414
  return () => {
393
415
  layer.style.visibility = previous;
394
- rings.forEach(ring => ring.remove());
416
+ drawn.forEach(element => element.remove());
395
417
  };
396
418
  }
419
+ /**
420
+ * Where the reporter's blurs are now, for the captures.
421
+ *
422
+ * An element blur hands over the element, so the snapshot can withhold its subtree and the picture
423
+ * can blur it as it does a private one. If the element cannot be found any more — re-rendered,
424
+ * its selector stale — the box it was picked in goes over as an area instead. A blur that quietly
425
+ * stopped applying because the page re-rendered would be the worst way for this to fail.
426
+ */
427
+ blurred() {
428
+ const elements = [];
429
+ const regions = [];
430
+ for (const blur of this.blurs) {
431
+ const rect = this.pinRect(blur);
432
+ if (!rect)
433
+ continue;
434
+ const element = this.elementOf(blur);
435
+ if (element)
436
+ elements.push(element);
437
+ else
438
+ regions.push(rect);
439
+ }
440
+ return { elements, regions };
441
+ }
442
+ /** A pin's element on this page now: the one picked, or what its selector finds. */
443
+ elementOf(pin) {
444
+ if ((pin.anchor.page ?? currentPage()) !== currentPage())
445
+ return null;
446
+ if (pin.element?.isConnected)
447
+ return pin.element;
448
+ if (!pin.anchor.selector || pin.anchor.selector === 'body')
449
+ return null;
450
+ try {
451
+ return document.querySelector(pin.anchor.selector);
452
+ }
453
+ catch {
454
+ return null;
455
+ }
456
+ }
457
+ /** The reporter's blurs, drawn into `into`. For the page while composing and for the picture. */
458
+ veilBlurs(into) {
459
+ const origin = this.origin();
460
+ const numbered = this.blurs.length > 1;
461
+ return this.blurs.flatMap((blur, index) => {
462
+ const rect = this.pinRect(blur);
463
+ if (!rect)
464
+ return [];
465
+ const label = numbered ? `Blurred ${index + 1}` : 'Blurred';
466
+ return [into.appendChild(veil(rect, origin, label, false))];
467
+ });
468
+ }
469
+ /**
470
+ * A pin as it may leave the page.
471
+ *
472
+ * Its text is dropped when it is something the report must not describe: a pin on an element the
473
+ * reporter blurred, or on one around it, or on a spot inside an area they blurred — they pointed at
474
+ * the balance and blurred the balance, and the pin's text snapshot would otherwise carry the
475
+ * balance. With redaction on, the same goes for a pin on or around a data-daybook-private element,
476
+ * which the snapshot and the picture already withhold and the anchor did not. The selector stays:
477
+ * it says which element, not what it says.
478
+ */
479
+ sendable(pin) {
480
+ if (!pin.anchor.elementText)
481
+ return pin.anchor;
482
+ const element = this.elementOf(pin);
483
+ const rect = this.pinRect(pin);
484
+ const blurred = this.blurs.some(blur => {
485
+ const target = this.elementOf(blur);
486
+ if (target && element)
487
+ return target.contains(element) || element.contains(target);
488
+ const area = this.pinRect(blur);
489
+ return !!area && !!rect && overlaps(area, rect);
490
+ });
491
+ const marked = `[${PRIVATE_ATTRIBUTE}]`;
492
+ const hidden = blurred || (this.options.redact !== false && !!element
493
+ && (!!element.closest(marked) || !!element.querySelector(marked)));
494
+ return hidden ? { ...pin.anchor, elementText: null } : pin.anchor;
495
+ }
397
496
  /**
398
497
  * A ring over the pinned element, drawn in our own shadow root.
399
498
  *
@@ -491,6 +590,9 @@ export class FeedbackWidget {
491
590
  * three pins the reporter cannot tell which number is which without them. Drawn in the layer, so
492
591
  * the capture's conceal takes them away and the rings, which are the picture's version of the
493
592
  * same thing, go in instead.
593
+ *
594
+ * The blurs are drawn here as well, and drawn the way the picture will have them: the reporter
595
+ * decides what is safe to send by looking at it, so what they look at has to be what is sent.
494
596
  */
495
597
  markPins(layer) {
496
598
  this.unmark?.();
@@ -500,6 +602,7 @@ export class FeedbackWidget {
500
602
  const draw = () => {
501
603
  frame = 0;
502
604
  holder.innerHTML = '';
605
+ this.veilBlurs(holder);
503
606
  if (this.pins.length < 1)
504
607
  return;
505
608
  const origin = this.origin();
@@ -536,8 +639,11 @@ export class FeedbackWidget {
536
639
  this.unmark = null;
537
640
  };
538
641
  }
539
- /** The picker over a hidden composer, for one more pin. Esc or a click puts the panel back. */
540
- pickAnother(panel, done) {
642
+ /**
643
+ * The picker over a hidden composer, for one more pin — or, with `blur`, for something to blur.
644
+ * Esc or a pick puts the panel back.
645
+ */
646
+ pickAnother(panel, done, blur = false) {
541
647
  const layer = this.root.getElementById('layer');
542
648
  const restore = () => {
543
649
  mask.remove();
@@ -545,11 +651,17 @@ export class FeedbackWidget {
545
651
  this.cancelAdding = null;
546
652
  this.redrawMarks?.();
547
653
  };
548
- const mask = this.picker(pin => {
549
- this.pins.push(pin);
550
- restore();
551
- done();
552
- }, `Click what else is involved (pin ${this.pins.length + 1})`);
654
+ const mask = blur
655
+ ? this.picker(found => {
656
+ this.blurs.push(found);
657
+ restore();
658
+ done();
659
+ }, 'Click what to blur, or drag across an area', true)
660
+ : this.picker(pin => {
661
+ this.pins.push(pin);
662
+ restore();
663
+ done();
664
+ }, `Click what else is involved (pin ${this.pins.length + 1})`);
553
665
  panel.style.visibility = 'hidden';
554
666
  this.cancelAdding = restore;
555
667
  layer.appendChild(mask);
@@ -822,13 +934,67 @@ export class FeedbackWidget {
822
934
  /**
823
935
  * The crosshair over the page. The first pin opens the composer; "Add another pin" passes
824
936
  * `onPin` and gets the new pin back instead, with the composer left exactly as it was.
937
+ *
938
+ * With `blur` it picks something to blur (PM-T-0682), and takes a drag as well as a click: an
939
+ * element is the right unit for a card or a field, and the wrong one for half a table, a corner of
940
+ * a chart or a canvas that has no elements inside it at all. What a click would blur is shown
941
+ * blurred under the pointer before the click, and a drag shows its area blurred as it is drawn.
825
942
  */
826
- picker(onPin, hint = 'Click the thing that is wrong') {
943
+ picker(onPin, hint = 'Click the thing that is wrong', blur = false) {
827
944
  const mask = document.createElement('div');
828
- mask.className = 'mask';
829
- mask.innerHTML = `<div class="hover" hidden></div>`
945
+ mask.className = blur ? 'mask mask--blur' : 'mask';
946
+ mask.innerHTML = `<div class="${blur ? 'hover hover--blur' : 'hover'}" hidden></div>`
830
947
  + `<div class="hint">${escapeHtml(hint)} · <kbd>Esc</kbd> to cancel</div>`;
831
948
  const hover = mask.querySelector('.hover');
949
+ // The area being dragged out, while it is: from where the press began to where the pointer is.
950
+ let area = null;
951
+ let pressed = null;
952
+ // A drag ends in a click on the mask, which must not also blur whatever is under the pointer.
953
+ let swallow = false;
954
+ const show = (box) => {
955
+ const origin = this.origin();
956
+ hover.hidden = false;
957
+ hover.style.left = `${box.left - origin.left}px`;
958
+ hover.style.top = `${box.top - origin.top}px`;
959
+ hover.style.width = `${box.width}px`;
960
+ hover.style.height = `${box.height}px`;
961
+ };
962
+ if (blur) {
963
+ const between = (event) => ({
964
+ left: Math.min(pressed.x, event.clientX),
965
+ top: Math.min(pressed.y, event.clientY),
966
+ width: Math.abs(event.clientX - pressed.x),
967
+ height: Math.abs(event.clientY - pressed.y),
968
+ });
969
+ mask.addEventListener('pointerdown', (event) => {
970
+ if (event.button !== 0)
971
+ return;
972
+ pressed = { x: event.clientX, y: event.clientY };
973
+ mask.setPointerCapture(event.pointerId);
974
+ });
975
+ mask.addEventListener('pointermove', (event) => {
976
+ if (!pressed)
977
+ return;
978
+ // The same slop as the launcher's: a shaky click is still a click.
979
+ if (!area && Math.hypot(event.clientX - pressed.x, event.clientY - pressed.y) < DRAG_SLOP)
980
+ return;
981
+ area = between(event);
982
+ show(area);
983
+ });
984
+ const release = (event) => {
985
+ if (mask.hasPointerCapture(event.pointerId))
986
+ mask.releasePointerCapture(event.pointerId);
987
+ const drawn = area;
988
+ pressed = null;
989
+ area = null;
990
+ if (!drawn || event.type === 'pointercancel')
991
+ return;
992
+ swallow = true;
993
+ onPin?.(areaPin(drawn));
994
+ };
995
+ mask.addEventListener('pointerup', release);
996
+ mask.addEventListener('pointercancel', release);
997
+ }
832
998
  // What is under the pointer, found the only way it can be with the mask on top: look through it.
833
999
  const beneath = (x, y) => {
834
1000
  mask.style.pointerEvents = 'none';
@@ -845,36 +1011,49 @@ export class FeedbackWidget {
845
1011
  */
846
1012
  let frame = 0;
847
1013
  mask.onmousemove = (event) => {
848
- if (frame)
1014
+ if (frame || area)
849
1015
  return;
850
1016
  const { clientX, clientY } = event;
851
1017
  frame = requestAnimationFrame(() => {
852
1018
  frame = 0;
1019
+ // A drag began after this frame was asked for; the outline is the area's now.
1020
+ if (area)
1021
+ return;
853
1022
  const element = beneath(clientX, clientY);
854
1023
  if (!element || element === document.body || element === document.documentElement) {
855
1024
  hover.hidden = true;
856
1025
  return;
857
1026
  }
858
1027
  const rect = element.getBoundingClientRect();
859
- const origin = this.origin();
860
- hover.hidden = false;
861
- hover.style.left = `${rect.left - origin.left}px`;
862
- hover.style.top = `${rect.top - origin.top}px`;
863
- hover.style.width = `${rect.width}px`;
864
- hover.style.height = `${rect.height}px`;
1028
+ show({ left: rect.left, top: rect.top, width: rect.width, height: rect.height });
865
1029
  });
866
1030
  };
867
1031
  mask.onclick = (event) => {
1032
+ if (swallow) {
1033
+ swallow = false;
1034
+ return;
1035
+ }
868
1036
  // The mask has to stop intercepting before elementFromPoint runs, or every anchor resolves to
869
1037
  // the mask itself. The predecessor hit this too.
870
1038
  mask.style.pointerEvents = 'none';
871
1039
  const pin = pinAt(event.clientX, event.clientY);
872
1040
  mask.style.pointerEvents = '';
1041
+ if (blur) {
1042
+ // Empty page is not a thing to blur — a pin there is a spot, and a 24px blur hides nothing.
1043
+ // Nothing happens, and the hint already says what does: drag across the area instead.
1044
+ if (!pin.element)
1045
+ return;
1046
+ // Without its text: the anchor is only how the blur finds its element again, and the text is
1047
+ // the very thing being hidden.
1048
+ onPin?.({ ...pin, anchor: { ...pin.anchor, elementText: null } });
1049
+ return;
1050
+ }
873
1051
  if (onPin) {
874
1052
  onPin(pin);
875
1053
  return;
876
1054
  }
877
1055
  this.pins = [pin];
1056
+ this.blurs = [];
878
1057
  this.mode = 'composing';
879
1058
  this.render();
880
1059
  };
@@ -1039,14 +1218,53 @@ export class FeedbackWidget {
1039
1218
  pinList.appendChild(row);
1040
1219
  });
1041
1220
  }
1221
+ // The blurs, each with its own remove. Listed from the first, unlike the pins: a single pin is
1222
+ // already named in the heading, and a blur is named nowhere else in the panel.
1223
+ this.blurs.forEach((blur, index) => {
1224
+ const row = document.createElement('div');
1225
+ row.className = 'pin';
1226
+ const number = document.createElement('span');
1227
+ number.className = 'pin__n pin__n--blur';
1228
+ number.textContent = String(index + 1);
1229
+ row.appendChild(number);
1230
+ const label = document.createElement('span');
1231
+ label.className = 'pin__label';
1232
+ label.textContent = blurLabel(blur);
1233
+ row.appendChild(label);
1234
+ const remove = document.createElement('button');
1235
+ remove.className = 'link';
1236
+ remove.textContent = '×';
1237
+ remove.setAttribute('aria-label', `Remove blur ${index + 1}`);
1238
+ remove.onclick = () => {
1239
+ this.blurs.splice(index, 1);
1240
+ renderPins();
1241
+ };
1242
+ row.appendChild(remove);
1243
+ pinList.appendChild(row);
1244
+ });
1245
+ const actions = document.createElement('div');
1246
+ actions.className = 'pins__actions';
1042
1247
  if (this.pins.length < MAX_PINS) {
1043
1248
  const add = document.createElement('button');
1044
1249
  add.className = 'link pins__add';
1045
1250
  add.id = 'add-pin';
1046
1251
  add.textContent = this.pins.length > 0 ? '+ Add another pin' : '+ Pin something on the page';
1047
1252
  add.onclick = () => this.pickAnother(panel, renderPins);
1048
- pinList.appendChild(add);
1253
+ actions.appendChild(add);
1049
1254
  }
1255
+ // Beside "Add another pin", because it is the same gesture for the opposite purpose: one
1256
+ // points at what the report is about, the other at what it must not show.
1257
+ if (this.blurs.length < MAX_BLURS) {
1258
+ const hide = document.createElement('button');
1259
+ hide.className = 'link pins__add';
1260
+ hide.id = 'add-blur';
1261
+ hide.textContent = this.blurs.length > 0 ? 'Blur something else' : 'Blur something';
1262
+ hide.title = 'Hide part of the page from the screenshot and the page snapshot';
1263
+ hide.onclick = () => this.pickAnother(panel, renderPins, true);
1264
+ actions.appendChild(hide);
1265
+ }
1266
+ if (actions.childElementCount > 0)
1267
+ pinList.appendChild(actions);
1050
1268
  this.redrawMarks?.();
1051
1269
  };
1052
1270
  renderPins();
@@ -1072,6 +1290,7 @@ export class FeedbackWidget {
1072
1290
  revoke(files);
1073
1291
  this.mode = 'idle';
1074
1292
  this.pins = [];
1293
+ this.blurs = [];
1075
1294
  this.dragged = null;
1076
1295
  this.render();
1077
1296
  };
@@ -1089,7 +1308,7 @@ export class FeedbackWidget {
1089
1308
  message: message.value.trim(),
1090
1309
  kind,
1091
1310
  email: email.value.trim() || undefined,
1092
- anchors: this.pins.map(pin => pin.anchor),
1311
+ anchors: this.pins.map(pin => this.sendable(pin)),
1093
1312
  withScreenshot: shot?.checked ?? false,
1094
1313
  files: files.filter(f => !f.error),
1095
1314
  });
@@ -1104,6 +1323,7 @@ export class FeedbackWidget {
1104
1323
  // cannot do if they never see it.
1105
1324
  this.mode = 'sent';
1106
1325
  this.pins = [];
1326
+ this.blurs = [];
1107
1327
  this.render();
1108
1328
  }
1109
1329
  catch (error) {
@@ -1235,6 +1455,8 @@ function putAt(element, at, width, height) {
1235
1455
  * slipped hand from filing a report whose picture is nothing but rings.
1236
1456
  */
1237
1457
  const MAX_PINS = 10;
1458
+ /** The same limit for blurs, and for the same reason: a picture that is all blur shows nothing. */
1459
+ const MAX_BLURS = 10;
1238
1460
  function currentPage() {
1239
1461
  return location.pathname + location.search;
1240
1462
  }
@@ -1249,6 +1471,60 @@ function pinAt(clientX, clientY) {
1249
1471
  : { left: clientX - 12 + window.scrollX, top: clientY - 12 + window.scrollY, width: 24, height: 24 };
1250
1472
  return { anchor, element, box };
1251
1473
  }
1474
+ /**
1475
+ * An area dragged out to blur, held as a pin with no element: pinRect then falls through to the box,
1476
+ * in page coordinates like any pin's, so it stays over the same content when the page scrolls.
1477
+ */
1478
+ function areaPin(area) {
1479
+ return {
1480
+ anchor: { selector: null, offsetX: 0, offsetY: 0, elementText: null, page: currentPage() },
1481
+ element: null,
1482
+ box: {
1483
+ left: area.left + window.scrollX,
1484
+ top: area.top + window.scrollY,
1485
+ width: area.width,
1486
+ height: area.height,
1487
+ },
1488
+ };
1489
+ }
1490
+ /**
1491
+ * A blur's line in the panel. Never its text, which is what it hides; its kind and its size are
1492
+ * enough to match it to the numbered blur on the page.
1493
+ */
1494
+ function blurLabel(blur) {
1495
+ const size = `${Math.round(blur.box.width)} × ${Math.round(blur.box.height)}`;
1496
+ return `${blur.element ? 'Blurred element' : 'Blurred area'} · ${size}`;
1497
+ }
1498
+ /**
1499
+ * One cover over the page, in our own layer.
1500
+ *
1501
+ * A blur is a backdrop filter: it blurs whatever is painted under it without touching the element
1502
+ * that painted it, so nothing on the host page changes and there is nothing to undo there. Where the
1503
+ * browser has no backdrop-filter the stylesheet makes it solid instead, because a cover that quietly
1504
+ * shows what it covers is worse than an ugly one.
1505
+ *
1506
+ * `secret` is a cover the capture asked for over a credential it found: solid, not blurred, and
1507
+ * without a label. A blurred key of a known shape can be read back more often than one would like; a
1508
+ * grey bar cannot, and nobody needs to see the shape of a key to understand the report.
1509
+ */
1510
+ function veil(rect, origin, label, secret) {
1511
+ const pad = secret ? 2 : 0;
1512
+ const cover = document.createElement('div');
1513
+ cover.className = secret ? 'veil veil--secret' : 'veil';
1514
+ cover.style.left = `${rect.left - origin.left - pad}px`;
1515
+ cover.style.top = `${rect.top - origin.top - pad}px`;
1516
+ cover.style.width = `${rect.width + pad * 2}px`;
1517
+ cover.style.height = `${rect.height + pad * 2}px`;
1518
+ // Said in the picture too, so whoever reads it knows the smudge was put there on purpose — where it
1519
+ // fits. On a blurred line of text the tag would cover more of the page than the blur does.
1520
+ if (label && rect.width >= 72 && rect.height >= 22) {
1521
+ const tag = document.createElement('span');
1522
+ tag.className = 'veil__tag';
1523
+ tag.textContent = label;
1524
+ cover.appendChild(tag);
1525
+ }
1526
+ return cover;
1527
+ }
1252
1528
  function labelFor(anchor) {
1253
1529
  if (anchor.elementText)
1254
1530
  return `“${anchor.elementText}”`;
@@ -1550,6 +1826,47 @@ const STYLES = `
1550
1826
  position: fixed; pointer-events: none; border-radius: 3px;
1551
1827
  border: 2px solid #ef4444; box-shadow: 0 0 0 2px rgba(255,255,255,.85);
1552
1828
  }
1829
+ /*
1830
+ A blur (PM-T-0682): the reporter's, on the page while they write and in the picture after.
1831
+
1832
+ A backdrop filter, so it blurs what is painted under it and touches nothing of the host's. The grey
1833
+ tint and the hairline make it read as a cover rather than as a page that failed to render. Neutral,
1834
+ not red: red on this layer means "this is what the report is about", and a blur means the opposite.
1835
+ */
1836
+ .veil {
1837
+ position: fixed; pointer-events: none; border-radius: 3px;
1838
+ -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
1839
+ background: rgba(115,115,115,.35);
1840
+ box-shadow: inset 0 0 0 1px rgba(255,255,255,.55), 0 0 0 1px rgba(23,23,23,.3);
1841
+ }
1842
+ /*
1843
+ Solid where nothing can be blurred behind an element: a cover that shows what it covers is worse
1844
+ than a grey box. That is Firefox before 103 and Chrome before 76, which say so.
1845
+
1846
+ One engine has been seen to claim it and not draw it — WebKit's Windows port, which no shipping
1847
+ browser uses — and the preview there is a tint over legible text. It has no getDisplayMedia, so it
1848
+ never takes a picture; the snapshot does not depend on any of this; and an element blur is also
1849
+ blurred on the element itself for the frame (screenshot.ts). Checked drawing in Chromium.
1850
+ */
1851
+ @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
1852
+ .veil { background: #8a8a8a }
1853
+ }
1854
+ /* Over a credential the capture found: solid, because a blurred key of a known shape can sometimes be
1855
+ read back, and nobody needs its shape to understand the report. */
1856
+ .veil--secret { background: #737373; box-shadow: none; border-radius: 2px }
1857
+ .veil__tag {
1858
+ position: absolute; right: 3px; bottom: 3px; padding: 0 5px; border-radius: 4px;
1859
+ background: rgba(23,23,23,.72); color: #fff; font: 600 10px/16px system-ui, sans-serif;
1860
+ white-space: nowrap;
1861
+ }
1862
+ /* What a click would blur, blurred already: the reporter sees the result before committing to it. */
1863
+ .hover--blur {
1864
+ outline-color: #525252;
1865
+ -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
1866
+ background: rgba(115,115,115,.25);
1867
+ }
1868
+ /* A touch drag draws the area rather than scrolling the page underneath it. */
1869
+ .mask--blur { touch-action: none }
1553
1870
  /*
1554
1871
  Bottom, not top.
1555
1872
 
@@ -1603,6 +1920,8 @@ kbd {
1603
1920
  font: 600 11px/18px system-ui, sans-serif; text-align: center;
1604
1921
  }
1605
1922
  .pin__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1923
+ .pin__n--blur { background: #737373 }
1924
+ .pins__actions { display: flex; flex-wrap: wrap; gap: 4px 14px }
1606
1925
  .pins__add { align-self: flex-start; font-size: 12px; }
1607
1926
  .panel__anchor {
1608
1927
  color: var(--pm-muted); font-size: 11px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daybook/feedback",
3
- "version": "1.4.3",
3
+ "version": "1.6.0",
4
4
  "description": "In-app feedback for the web: point at what is wrong, and everything a triager needs is captured automatically.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -10,10 +10,10 @@
10
10
  "README.md"
11
11
  ],
12
12
  "scripts": {
13
- "build": "tsc -p tsconfig.json && npm run bundle",
13
+ "build": "tsc -p ../core/tsconfig.json && tsc -p tsconfig.json && npm run bundle",
14
14
  "typecheck": "tsc -p tsconfig.json --noEmit",
15
15
  "test": "node --test test/*.test.js",
16
- "bundle": "esbuild src/index.ts --bundle --format=iife --global-name=DaybookFeedback --minify --target=es2019 --outfile=dist/feedback.js",
16
+ "bundle": "esbuild dist/index.js --bundle --format=iife --global-name=DaybookFeedback --minify --target=es2019 --outfile=dist/feedback.js",
17
17
  "prepublishOnly": "npm run build && npm test"
18
18
  },
19
19
  "devDependencies": {
@@ -30,7 +30,11 @@
30
30
  },
31
31
  "./browser": "./dist/feedback.js"
32
32
  },
33
- "sideEffects": false,
33
+ "sideEffects": [
34
+ "./dist/index.js",
35
+ "./dist/module.js",
36
+ "./dist/feedback.js"
37
+ ],
34
38
  "license": "MIT",
35
39
  "publishConfig": {
36
40
  "access": "public"
@@ -42,5 +46,8 @@
42
46
  "widget",
43
47
  "in-app-feedback",
44
48
  "screenshot"
45
- ]
49
+ ],
50
+ "dependencies": {
51
+ "@daybook/core": "^0.1.0"
52
+ }
46
53
  }