vintage-frames 0.12.6 → 0.12.8

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.
@@ -6289,7 +6289,7 @@
6289
6289
  "kind": "field",
6290
6290
  "name": "#onPointerUp",
6291
6291
  "privacy": "private",
6292
- "description": "The release of a press on this icon. The drag controller hears it first\n(a started drag ends there); then a press that was kept from collapsing\nthe selection — a plain press on an already-selected member of a field —\ncollapses it now, if no drag ever began: a click on one of several\nselected icons selects that one alone, on the release rather than the\npress, so the same press could have dragged them all. A cancel collapses\nnothing. Last, the second tap of a pair opens the icon, where a\n`dblclick` would have landed in the order of things."
6292
+ "description": "The release of a press on this icon. The drag controller hears it first\n(a started drag ends there); then a press that was kept from collapsing\nthe selection — a plain press on an already-selected member of a field —\ncollapses it now, if no drag ever began: a click on one of several\nselected icons selects that one alone, on the release rather than the\npress, so the same press could have dragged them all. A cancel collapses\nnothing. Last, the second tap of a pair opens the icon, where a\n`dblclick` would have landed in the order of things. A capture lost\nbefore the release is the release (see `DragController.onPointerUp`);\none lost after it finds all three already done."
6293
6293
  },
6294
6294
  {
6295
6295
  "kind": "method",
package/dist/chrome.js CHANGED
@@ -29,6 +29,7 @@ var a = i`${[
29
29
  @pointermove=${e.onPointerMove}
30
30
  @pointerup=${e.onPointerUp}
31
31
  @pointercancel=${e.onPointerUp}
32
+ @lostpointercapture=${e.onPointerUp}
32
33
  >
33
34
  <div class=${r ? `${n} vf-tile-grid` : n}>
34
35
  ${r ?? (n === "vf-stripes" ? a : null)}
@@ -108,7 +108,7 @@ var g = (e, t, n) => Math.min(Math.max(e, t), n), _ = class extends c(a(f)) {
108
108
  !t || e.pointerId !== t.pointerId || this.#m(e.type === "pointercancel");
109
109
  }, this.#p = (e) => {
110
110
  e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), this.#m(!0));
111
- }, this.#e.role = "listbox", this.#e.ariaMultiSelectable = "true", this.addEventListener("pointerdown", this.#u), this.addEventListener("pointermove", this.#d), this.addEventListener("pointerup", this.#f), this.addEventListener("pointercancel", this.#f);
111
+ }, this.#e.role = "listbox", this.#e.ariaMultiSelectable = "true", this.addEventListener("pointerdown", this.#u), this.addEventListener("pointermove", this.#d), this.addEventListener("pointerup", this.#f), this.addEventListener("pointercancel", this.#f), this.addEventListener("lostpointercapture", this.#f);
112
112
  }
113
113
  disconnectedCallback() {
114
114
  super.disconnectedCallback(), this.#t?.canvas?.remove(), this.#t = null, this.#S();
@@ -110,7 +110,7 @@ var j, M = {
110
110
  let r = this.#ee(t, n);
111
111
  if (this.#a) {
112
112
  this.#a = !1;
113
- let e = t.type === "pointerup" ? this.#i : null;
113
+ let e = t.type === "pointercancel" ? null : this.#i;
114
114
  for (let t of e?.querySelectorAll("vf-icon") ?? []) t !== this && t.selected && t.setSelected(!1);
115
115
  }
116
116
  r && e(this, "vf-open", {});
@@ -709,6 +709,7 @@ var j, M = {
709
709
  @pointermove=${this.#v.onPointerMove}
710
710
  @pointerup=${this.#$}
711
711
  @pointercancel=${this.#$}
712
+ @lostpointercapture=${this.#$}
712
713
  @dblclick=${this.#Q}
713
714
  >
714
715
  <div class=${a} part="icon">
@@ -798,7 +799,7 @@ var j, M = {
798
799
  #$;
799
800
  #ee(e, t) {
800
801
  let n = this.#d;
801
- return !n || n.pointerId !== e.pointerId || (this.#d = null, !(e.type === "pointerup" && !t && !this._editing && Math.hypot(e.clientX - n.x, e.clientY - n.y) < g(e))) ? !1 : n.second ? !0 : (this.#f = {
802
+ return !n || n.pointerId !== e.pointerId || (this.#d = null, !(e.type !== "pointercancel" && !t && !this._editing && Math.hypot(e.clientX - n.x, e.clientY - n.y) < g(e))) ? !1 : n.second ? !0 : (this.#f = {
802
803
  time: n.time,
803
804
  x: n.x,
804
805
  y: n.y
@@ -445,11 +445,11 @@ var Z = 24, Q = 8, $ = class extends k(l(V)) {
445
445
  let h = n ? 13 - e : e;
446
446
  d.animations.push(p.animate([{ visibility: "visible" }, { visibility: "visible" }], {
447
447
  delay: h * 17,
448
- duration: 68,
449
- endDelay: (14 - h) * 17
448
+ duration: 68
450
449
  }));
451
450
  }
452
- return d;
451
+ let f = new Animation(new KeyframeEffect(null, null, 306));
452
+ return f.play(), d.animations.push(f), d;
453
453
  }
454
454
  #d() {
455
455
  let t = { surface: null };
package/dist/drag.d.ts CHANGED
@@ -42,7 +42,8 @@ export interface DragTarget {
42
42
  /**
43
43
  * Drag-to-move for 1-bit chrome. Bind {@link onPointerDown} / {@link onPointerMove}
44
44
  * / {@link onPointerUp} to a handle element (`vf-window`'s title bar,
45
- * `vf-dialog`'s title bar); the controller captures the pointer on that handle,
45
+ * `vf-dialog`'s title bar) — the last to `pointerup`, `pointercancel` and
46
+ * `lostpointercapture` alike; the controller captures the pointer on that handle,
46
47
  * tracks the delta from the press point, and hands the {@link DragTarget} a new
47
48
  * origin in system px, snapped onto the placement lattice — whole art pixels,
48
49
  * the way QuickDraw moved windows, which is also what keeps the pixel art
@@ -61,7 +62,11 @@ export declare class DragController implements ReactiveController {
61
62
  /**
62
63
  * The release — or, bound to `pointercancel` as every handle binds it, the
63
64
  * platform abandoning the gesture (a touch the browser took for a scroll),
64
- * which the target hears as a cancel.
65
+ * which the target hears as a cancel. Bound to `lostpointercapture` too: a
66
+ * capture lost first ends the gesture as a release. Chrome drops it on a
67
+ * mouse move that reports no button down, which a trackpad can send just
68
+ * before its release, and the `pointerup` then lands wherever the pointer
69
+ * is. Idempotent: the capture released here re-enters with no gesture left.
65
70
  */
66
71
  onPointerUp: (event: PointerEvent) => void;
67
72
  /**
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "vintage-frames",
4
- "version": "0.12.6",
4
+ "version": "0.12.8",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vintage-frames",
3
- "version": "0.12.6",
3
+ "version": "0.12.8",
4
4
  "description": "Lit web components that emulate the look and feel of classic Mac OS System 7",
5
5
  "type": "module",
6
6
  "license": "MIT",