vintage-frames 0.14.1 → 0.16.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.
Files changed (55) hide show
  1. package/custom-elements.json +770 -74
  2. package/dist/chrome.d.ts +10 -1
  3. package/dist/chrome.js +8 -3
  4. package/dist/components/vf-button.d.ts +5 -1
  5. package/dist/components/vf-button.js +1 -1
  6. package/dist/components/vf-desktop.d.ts +5 -2
  7. package/dist/components/vf-desktop.js +5 -5
  8. package/dist/components/vf-dialog.d.ts +13 -2
  9. package/dist/components/vf-dialog.js +27 -27
  10. package/dist/components/vf-menu-bar.js +9 -10
  11. package/dist/components/vf-menu-item.js +18 -13
  12. package/dist/components/vf-menu.d.ts +8 -3
  13. package/dist/components/vf-menu.js +85 -61
  14. package/dist/components/vf-number-field.d.ts +4 -0
  15. package/dist/components/vf-number-field.js +28 -25
  16. package/dist/components/vf-paragraph.d.ts +3 -1
  17. package/dist/components/vf-paragraph.js +7 -0
  18. package/dist/components/vf-scroll-area.d.ts +16 -1
  19. package/dist/components/vf-scroll-area.js +39 -29
  20. package/dist/components/vf-select.d.ts +5 -4
  21. package/dist/components/vf-select.js +26 -17
  22. package/dist/components/vf-text-field.d.ts +5 -5
  23. package/dist/components/vf-text-field.js +1 -1
  24. package/dist/components/vf-window.d.ts +22 -5
  25. package/dist/components/vf-window.js +113 -98
  26. package/dist/cursor.d.ts +8 -0
  27. package/dist/cursor.js +70 -73
  28. package/dist/events.d.ts +3 -2
  29. package/dist/events.js +3 -3
  30. package/dist/index.d.ts +2 -1
  31. package/dist/modal-dialog.d.ts +49 -4
  32. package/dist/modal-dialog.js +115 -87
  33. package/dist/position.js +25 -20
  34. package/dist/shell/alert.d.ts +17 -9
  35. package/dist/shell/alert.js +25 -28
  36. package/dist/shell/catalog.d.ts +1 -1
  37. package/dist/shell/catalog.js +32 -18
  38. package/dist/shell/finder.d.ts +46 -1
  39. package/dist/shell/finder.js +166 -126
  40. package/dist/shell/index.d.ts +2 -4
  41. package/dist/shell/index.js +5 -6
  42. package/dist/shell/pure.d.ts +10 -0
  43. package/dist/shell/pure.js +4 -0
  44. package/dist/shell/shell.d.ts +40 -13
  45. package/dist/shell/shell.js +87 -51
  46. package/dist/shell/windows.d.ts +69 -12
  47. package/dist/shell/windows.js +245 -144
  48. package/dist/text-control.d.ts +30 -1
  49. package/dist/text-control.js +27 -6
  50. package/dist/top-layer.d.ts +13 -0
  51. package/dist/top-layer.js +16 -0
  52. package/docs/SPEC.md +25 -24
  53. package/editor/vscode.html-custom-data.json +22 -12
  54. package/editor/web-types.json +58 -25
  55. package/package.json +5 -1
package/dist/cursor.js CHANGED
@@ -2,14 +2,10 @@ import { truePixelRatio as e } from "./zoom.js";
2
2
  import { effectiveScale as t, onScaleChange as n } from "./scale.js";
3
3
  import { prefersReducedMotion as r } from "./motion.js";
4
4
  import { VfModalDialog as i } from "./modal-dialog.js";
5
- import { CURSOR_ARROW as a, CURSOR_CROSSHAIR as o, CURSOR_I_BEAM as s, CURSOR_WAIT as c } from "./cursor-art.js";
5
+ import { onTopLayerEntry as a } from "./top-layer.js";
6
+ import { CURSOR_ARROW as o, CURSOR_CROSSHAIR as s, CURSOR_I_BEAM as c, CURSOR_WAIT as l } from "./cursor-art.js";
6
7
  //#region src/cursor.ts
7
- var l = [
8
- "arrow",
9
- "text",
10
- "crosshair",
11
- "wait"
12
- ], u = typeof navigator < "u" && (navigator.vendor ?? "").startsWith("Apple"), d = /* @__PURE__ */ new Set([
8
+ var u = typeof navigator < "u" && (navigator.vendor ?? "").startsWith("Apple"), d = /* @__PURE__ */ new Set([
13
9
  "text",
14
10
  "password",
15
11
  "search",
@@ -21,7 +17,7 @@ var l = [
21
17
  function f(e) {
22
18
  return e instanceof HTMLTextAreaElement ? !e.disabled : e instanceof HTMLInputElement ? !e.disabled && d.has(e.type) : e instanceof HTMLElement && e.isContentEditable;
23
19
  }
24
- function p(e, t) {
20
+ function ee(e, t) {
25
21
  let n = document.elementFromPoint(e, t);
26
22
  for (; n?.shadowRoot;) {
27
23
  let r = n.shadowRoot.elementFromPoint(e, t);
@@ -30,7 +26,7 @@ function p(e, t) {
30
26
  }
31
27
  return n;
32
28
  }
33
- function m(e) {
29
+ function p(e) {
34
30
  let t = [];
35
31
  for (; e;) {
36
32
  t.push(e);
@@ -39,22 +35,23 @@ function m(e) {
39
35
  }
40
36
  return t;
41
37
  }
42
- function h() {
38
+ function m() {
43
39
  for (let e of document.querySelectorAll("[aria-busy=\"true\"]")) if (e instanceof i && e.open) return !0;
44
40
  return !1;
45
41
  }
46
- function g(d = {}) {
47
- let { anchor: g = document.querySelector("vf-desktop") ?? document.documentElement, waitFrameMs: _ = 250, arrow: v = a, text: y = s, crosshair: b = o, wait: x = c } = d, S = {
48
- arrow: v,
49
- text: y,
50
- crosshair: b,
51
- wait: x
52
- }, C = document.documentElement, w = new AbortController(), { signal: T } = w, E = document.createElement("style");
53
- E.textContent = "* { cursor: none !important }";
54
- let D = document.createElement("img");
55
- D.alt = "", D.setAttribute("aria-hidden", "true");
56
- let O = "showPopover" in D;
57
- O && D.setAttribute("popover", "manual"), Object.assign(D.style, {
42
+ function h(d = {}) {
43
+ let { anchor: h = document.querySelector("vf-desktop") ?? document.documentElement, waitFrameMs: g = 250, arrow: _ = o, text: v = c, crosshair: y = s, wait: b = l, kinds: x = {} } = d, S = {
44
+ ...x,
45
+ arrow: _,
46
+ text: v,
47
+ crosshair: y,
48
+ wait: b
49
+ }, C = new Set(Object.keys(S)), w = document.documentElement, T = new AbortController(), { signal: E } = T, D = document.createElement("style");
50
+ D.textContent = "* { cursor: none !important }";
51
+ let O = document.createElement("img");
52
+ O.alt = "", O.setAttribute("aria-hidden", "true");
53
+ let k = "showPopover" in O;
54
+ k && O.setAttribute("popover", "manual"), Object.assign(O.style, {
58
55
  position: "fixed",
59
56
  inset: "0 auto auto 0",
60
57
  margin: "0",
@@ -67,15 +64,15 @@ function g(d = {}) {
67
64
  visibility: "hidden",
68
65
  zIndex: "2147483647"
69
66
  });
70
- let k = /* @__PURE__ */ new Map();
71
- for (let e of l) {
67
+ let A = /* @__PURE__ */ new Map();
68
+ for (let e of C) {
72
69
  let t = S[e];
73
70
  if (!t) continue;
74
71
  let n = t.invert && u ? t.staticSrc ?? t.src : t.src, r = Array.isArray(n) ? n : [n], i = r.map((e) => {
75
72
  let t = new Image();
76
73
  return t.src = e, t;
77
74
  });
78
- k.set(e, {
75
+ A.set(e, {
79
76
  art: t,
80
77
  frames: r,
81
78
  xor: !!t.invert && !u,
@@ -83,68 +80,68 @@ function g(d = {}) {
83
80
  ready: !1
84
81
  });
85
82
  }
86
- let A = (e) => Promise.all(e.images.map((e) => e.decode())).then(() => {
83
+ let j = (e) => Promise.all(e.images.map((e) => e.decode())).then(() => {
87
84
  e.ready = !0;
88
- }), j = 1, M = 3, N = 0, P = 0, F = -1, I = -1, L = "arrow", R = k.get("arrow"), z = 0, B = 0, V = () => {
89
- if (F < 0) return;
90
- let { hotspotX: e = 0, hotspotY: t = 0 } = R.art, n = Math.floor((F * j - N) / M), r = Math.floor((I * j - P) / M), i = (N + (n - e) * M) / j, a = (P + (r - t) * M) / j;
91
- D.style.transform = `translate(${i}px, ${a}px)`;
92
- }, H = () => {
93
- j = e() || 1, M = Math.max(1, Math.round(t(g) * j));
94
- let n = g.getBoundingClientRect();
95
- N = Math.round(n.left * j), P = Math.round(n.top * j), D.style.width = `${R.art.width * M / j}px`, D.style.height = `${R.art.height * M / j}px`, V();
96
- }, U = (e) => {
97
- let t = k.get(e), n = t?.ready ? t : k.get("arrow");
98
- (e !== L || n !== R) && (L = e, R = n, D.dataset.kind = e, window.clearInterval(B), z = 0, D.src = R.frames[0], D.style.filter = R.xor ? "invert(1)" : "", D.style.mixBlendMode = R.xor ? "difference" : "", R.frames.length > 1 && !r() && (B = window.setInterval(() => {
99
- z = (z + 1) % R.frames.length, D.src = R.frames[z];
100
- }, _)), H());
101
- }, W = () => {
102
- if (h()) return "wait";
103
- let e = m(p(F, I));
85
+ }), M = 1, N = 3, P = 0, F = 0, I = -1, L = -1, R = "arrow", z = A.get("arrow"), B = 0, V = 0, H = () => {
86
+ if (I < 0) return;
87
+ let { hotspotX: e = 0, hotspotY: t = 0 } = z.art, n = Math.floor((I * M - P) / N), r = Math.floor((L * M - F) / N), i = (P + (n - e) * N) / M, a = (F + (r - t) * N) / M;
88
+ O.style.transform = `translate(${i}px, ${a}px)`;
89
+ }, U = () => {
90
+ M = e() || 1, N = Math.max(1, Math.round(t(h) * M));
91
+ let n = h.getBoundingClientRect();
92
+ P = Math.round(n.left * M), F = Math.round(n.top * M), O.style.width = `${z.art.width * N / M}px`, O.style.height = `${z.art.height * N / M}px`, H();
93
+ }, W = (e) => {
94
+ let t = A.get(e), n = t?.ready ? t : A.get("arrow");
95
+ (e !== R || n !== z) && (R = e, z = n, O.dataset.kind = e, window.clearInterval(V), B = 0, O.src = z.frames[0], O.style.filter = z.xor ? "invert(1)" : "", O.style.mixBlendMode = z.xor ? "difference" : "", z.frames.length > 1 && !r() && (V = window.setInterval(() => {
96
+ B = (B + 1) % z.frames.length, O.src = z.frames[B];
97
+ }, g)), U());
98
+ }, G = () => {
99
+ if (m()) return "wait";
100
+ let e = p(ee(I, L));
104
101
  if (e.some((e) => e.getAttribute("aria-busy") === "true")) return "wait";
105
102
  for (let t of e) {
106
103
  let e = t.getAttribute("data-vf-cursor");
107
- if (e && l.includes(e)) return e;
104
+ if (e && C.has(e)) return e;
108
105
  }
109
106
  return e[0] && f(e[0]) ? "text" : "arrow";
110
- }, G = () => {
111
- F < 0 || U(W());
112
- }, K = 0, q = () => {
113
- cancelAnimationFrame(K), K = requestAnimationFrame(() => {
114
- K = requestAnimationFrame(H);
107
+ }, K = () => {
108
+ I < 0 || W(G());
109
+ }, q = 0, J = () => {
110
+ cancelAnimationFrame(q), q = requestAnimationFrame(() => {
111
+ q = requestAnimationFrame(U);
115
112
  });
116
- }, J = () => {
117
- if (!(!O || !D.isConnected)) try {
118
- D.hidePopover(), D.showPopover();
113
+ }, Y = () => {
114
+ if (!(!k || !O.isConnected)) try {
115
+ O.hidePopover(), O.showPopover();
119
116
  } catch {}
120
- }, Y = new MutationObserver((e) => {
117
+ }, X = new MutationObserver((e) => {
121
118
  for (let t of e) {
122
119
  let e = t.target;
123
120
  if (t.attributeName === "open" && e instanceof i && e.open) {
124
- J();
121
+ Y();
125
122
  break;
126
123
  }
127
124
  }
128
- G();
129
- }), X = () => {
130
- D.style.visibility = "hidden";
131
- }, Z = (e) => {
125
+ K();
126
+ }), Z = () => {
127
+ O.style.visibility = "hidden";
128
+ }, Q = (e) => {
132
129
  if (e.pointerType === "touch") {
133
- X();
130
+ Z();
134
131
  return;
135
132
  }
136
- F = e.clientX, I = e.clientY, G(), V(), D.style.visibility = "visible";
137
- }, Q = !1, $ = () => {
138
- if (Q) return;
139
- document.body.append(D), O && D.showPopover(), D.dataset.kind = "arrow", H(), document.head.append(E), C.style.setProperty("--vf-cursor", "none");
133
+ I = e.clientX, L = e.clientY, K(), H(), O.style.visibility = "visible";
134
+ }, $ = !1, te = () => {
135
+ if ($) return;
136
+ document.body.append(O), k && O.showPopover(), O.dataset.kind = "arrow", U(), document.head.append(D), w.style.setProperty("--vf-cursor", "none");
140
137
  let e = {
141
138
  capture: !0,
142
139
  passive: !0,
143
- signal: T
140
+ signal: E
144
141
  };
145
- window.addEventListener("pointermove", Z, e), window.addEventListener("pointerdown", Z, e), window.addEventListener("pointercancel", X, e), document.addEventListener("mouseleave", X, { signal: T }), window.addEventListener("blur", X, { signal: T }), document.addEventListener("visibilitychange", () => {
146
- document.hidden && X();
147
- }, { signal: T }), window.addEventListener("resize", q, { signal: T }), Y.observe(document.body, {
142
+ window.addEventListener("pointermove", Q, e), window.addEventListener("pointerdown", Q, e), window.addEventListener("pointercancel", Z, e), document.addEventListener("mouseleave", Z, { signal: E }), window.addEventListener("blur", Z, { signal: E }), document.addEventListener("visibilitychange", () => {
143
+ document.hidden && Z();
144
+ }, { signal: E }), window.addEventListener("resize", J, { signal: E }), X.observe(document.body, {
148
145
  subtree: !0,
149
146
  attributes: !0,
150
147
  attributeFilter: [
@@ -153,19 +150,19 @@ function g(d = {}) {
153
150
  "data-vf-cursor"
154
151
  ]
155
152
  });
156
- }, ee = n(q);
157
- A(k.get("arrow")).then(() => (D.src = R.frames[0], D.decode())).then($, () => {
153
+ }, ne = n(J), re = a(Y);
154
+ j(A.get("arrow")).then(() => (O.src = z.frames[0], O.decode())).then(te, () => {
158
155
  console.warn("applyCursor: could not load the arrow art; keeping the native pointer");
159
156
  });
160
- for (let [e, t] of k) e !== "arrow" && A(t).then(() => G(), () => {
157
+ for (let [e, t] of A) e !== "arrow" && j(t).then(() => K(), () => {
161
158
  console.warn(`applyCursor: could not load the "${e}" art; it will fall back to the arrow`);
162
159
  });
163
160
  return () => {
164
- if (Q = !0, w.abort(), Y.disconnect(), ee(), cancelAnimationFrame(K), window.clearInterval(B), O && D.isConnected) try {
165
- D.hidePopover();
161
+ if ($ = !0, T.abort(), X.disconnect(), ne(), re(), cancelAnimationFrame(q), window.clearInterval(V), k && O.isConnected) try {
162
+ O.hidePopover();
166
163
  } catch {}
167
- D.remove(), E.remove(), C.style.removeProperty("--vf-cursor");
164
+ O.remove(), D.remove(), w.style.removeProperty("--vf-cursor");
168
165
  };
169
166
  }
170
167
  //#endregion
171
- export { g as applyCursor };
168
+ export { h as applyCursor };
package/dist/events.d.ts CHANGED
@@ -46,7 +46,8 @@ export declare function emitNative(host: EventTarget, type: 'input' | 'change'):
46
46
  /**
47
47
  * Run a control's **activation behavior** the way HTML runs a native one's: at
48
48
  * the *end* of the click's propagation, and not at all if anything on the path
49
- * called `preventDefault()`.
49
+ * called `preventDefault()`. A form's `submit` defers the same way: the
50
+ * listener waits on the event's own type.
50
51
  *
51
52
  * This is what makes `preventDefault()` on a native checkbox — or on any
52
53
  * ancestor — actually stop it from checking. A handler that acts where it sits
@@ -73,7 +74,7 @@ export declare function emitNative(host: EventTarget, type: 'input' | 'change'):
73
74
  * submit proxy's re-entrancy guard woven through it.
74
75
  *
75
76
  * @param host the element whose ownerDocument supplies the window to defer on
76
- * @param event the click being deferred; its `defaultPrevented` is the verdict
77
+ * @param event the click (or submit) being deferred; its `defaultPrevented` is the verdict
77
78
  * @param action run once, at the end of the path, unless cancelled
78
79
  */
79
80
  export declare function deferActivation(host: Element, event: Event, action: () => void): void;
package/dist/events.js CHANGED
@@ -16,10 +16,10 @@ function t(e, t) {
16
16
  function n(e, t, n) {
17
17
  let r = e.ownerDocument.defaultView;
18
18
  if (!r) return;
19
- let i = 0, a = () => {
20
- r.removeEventListener("click", a), r.clearTimeout(i), !t.defaultPrevented && n();
19
+ let i = t.type, a = 0, o = () => {
20
+ r.removeEventListener(i, o), r.clearTimeout(a), !t.defaultPrevented && n();
21
21
  };
22
- r.addEventListener("click", a), i = r.setTimeout(a, 0);
22
+ r.addEventListener(i, o), a = r.setTimeout(o, 0);
23
23
  }
24
24
  //#endregion
25
25
  export { n as deferActivation, e as emit, t as emitNative };
package/dist/index.d.ts CHANGED
@@ -174,7 +174,8 @@ export type { PlacementBounds, PlacementClamp, PlacementOrigin, VfPositionedInte
174
174
  export { VfSized } from './size.js';
175
175
  export type { VfSizedInterface } from './size.js';
176
176
  export { VfModalDialog, modalDialogStyles } from './modal-dialog.js';
177
- export type { VfCloseReason } from './modal-dialog.js';
177
+ export type { VfCloseDetail, VfCloseReason, VfShowDetail } from './modal-dialog.js';
178
+ export type { VfCloseKeys } from './chrome.js';
178
179
  /** The embedded System 7 bitmap faces and the registration helper. */
179
180
  export { registerEmbeddedFont, PIXEL_GRID_METRICS } from './styles/register-embedded-font.js';
180
181
  export type { EmbeddedFontMetrics } from './styles/register-embedded-font.js';
@@ -1,12 +1,33 @@
1
1
  import { LitElement } from 'lit';
2
2
  import type { PropertyValues } from 'lit';
3
3
  import { ScaleController } from './scale.js';
4
+ import type { VfCloseKeys } from './chrome.js';
4
5
  /**
5
6
  * Reason a modal closed, carried by the `vf-close` event's detail: the Escape
6
7
  * key, the close box or `close()`, or — with {@link VfModalDialog.lightDismiss}
7
8
  * — a click outside the frame.
8
9
  */
9
10
  export type VfCloseReason = 'escape' | 'close' | 'outside';
11
+ /**
12
+ * The `vf-show` event's detail: the element the modal gave its initial focus
13
+ * to, or null where it left the browser's choice alone.
14
+ */
15
+ export interface VfShowDetail {
16
+ focus: HTMLElement | null;
17
+ }
18
+ /**
19
+ * The `vf-close` event's detail. A close box's close also carries the
20
+ * modifier keys held on its click; no other close does.
21
+ */
22
+ export interface VfCloseDetail extends Partial<VfCloseKeys> {
23
+ reason: VfCloseReason;
24
+ /**
25
+ * The value this close carried — the submitting button's `value`, or
26
+ * `close(value)`'s — or null when it carried none: Escape, a click
27
+ * outside, `close()` alone, or removal from the DOM.
28
+ */
29
+ returnValue: string | null;
30
+ }
10
31
  /**
11
32
  * The width an undeclared modal falls back to, in system px — a classic
12
33
  * dialog's own measure, wide enough for a line of chrome text and a button row.
@@ -49,12 +70,23 @@ export declare const modalDialogStyles: import("lit").CSSResult;
49
70
  * closed and re-centered, and focus returns to the element that was focused
50
71
  * when the modal opened.
51
72
  *
73
+ * A `<form method="dialog">` inside the modal closes it with the submitting
74
+ * button's `value` as {@link returnValue}, as a form inside a native
75
+ * `<dialog>` does. The platform's own rule looks for a `<dialog>` around the
76
+ * form, and this one is in the shadow root, so the modal listens for the
77
+ * submit itself.
78
+ *
52
79
  * Subclasses supply only the frame chrome: a `render()` returning
53
80
  * `<dialog @cancel=${this._onNativeCancel} @close=${this._onNativeClose}>` with
54
81
  * their role/ARIA and body, and {@link modalDialogStyles} in `static styles`.
55
82
  *
83
+ * @fires vf-show - The modal opened: it is in the top layer, placed, and its
84
+ * initial focus is set. `detail: { focus }`, the element focused. The page's
85
+ * moment to finish composing it — select a field's default text, measure
86
+ * copy that varies. Fired inside `show()` once the modal has rendered, else
87
+ * at its first render.
56
88
  * @fires vf-close - The modal closed. `detail: { reason: 'escape' | 'close' |
57
- * 'outside' }`.
89
+ * 'outside', returnValue: string | null }`.
58
90
  */
59
91
  export declare class VfModalDialog extends LitElement {
60
92
  #private;
@@ -62,6 +94,13 @@ export declare class VfModalDialog extends LitElement {
62
94
  protected readonly scale: ScaleController;
63
95
  /** Whether the modal is open. Kept in sync with the native `<dialog>`. */
64
96
  open: boolean;
97
+ /**
98
+ * The modal's answer, as on `<dialog>`: set by `close(value)` and by a
99
+ * submit from a `<form method="dialog">` inside it (the submitting
100
+ * button's `value`). Cleared on each open, so a dialog asked again doesn't
101
+ * start with its last answer.
102
+ */
103
+ returnValue: string;
65
104
  /**
66
105
  * Modal width in whole system px — the art's own unit, so the box holds its
67
106
  * proportion to the chrome inside it at every display density.
@@ -130,6 +169,7 @@ export declare class VfModalDialog extends LitElement {
130
169
  * drag from squeezing the box.
131
170
  */
132
171
  protected get dialogSize(): Record<string, string | null>;
172
+ constructor();
133
173
  /**
134
174
  * The dialog's default button — the one wearing the bold ring
135
175
  * (`vf-button[variant="default"]`) — or null with none, or none enabled.
@@ -159,8 +199,13 @@ export declare class VfModalDialog extends LitElement {
159
199
  protected get initialFocusTarget(): HTMLElement | null;
160
200
  /** Open the modal (native `showModal()`), pinned onto the device grid. */
161
201
  show(): void;
162
- /** Close the modal. Fires `vf-close` with `{ reason: 'close' }`. */
163
- close(): void;
202
+ /**
203
+ * Close the modal, with `returnValue` as its answer when one is given.
204
+ * Fires `vf-close` with `{ reason: 'close', returnValue }`.
205
+ */
206
+ close(returnValue?: string): void;
207
+ /** Close from a close box, its `vf-close` carrying the modifier keys held on the click. */
208
+ protected closeFromBox(keys: VfCloseKeys): void;
164
209
  protected updated(changed: PropertyValues<this>): void;
165
210
  /**
166
211
  * State the origin, in system px — clamped on screen and snapped onto the
@@ -197,7 +242,7 @@ export declare class VfModalDialog extends LitElement {
197
242
  * the written origin so the next open re-derives it from the box it will
198
243
  * actually have (a stated `top`/`left` is the author's or the user's and
199
244
  * survives, and is re-applied by that open), syncs `open`, and fires
200
- * `vf-close` with the reason.
245
+ * `vf-close` with the reason and the value the close carried.
201
246
  */
202
247
  protected _onNativeClose(): void;
203
248
  }