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.
- package/custom-elements.json +770 -74
- package/dist/chrome.d.ts +10 -1
- package/dist/chrome.js +8 -3
- package/dist/components/vf-button.d.ts +5 -1
- package/dist/components/vf-button.js +1 -1
- package/dist/components/vf-desktop.d.ts +5 -2
- package/dist/components/vf-desktop.js +5 -5
- package/dist/components/vf-dialog.d.ts +13 -2
- package/dist/components/vf-dialog.js +27 -27
- package/dist/components/vf-menu-bar.js +9 -10
- package/dist/components/vf-menu-item.js +18 -13
- package/dist/components/vf-menu.d.ts +8 -3
- package/dist/components/vf-menu.js +85 -61
- package/dist/components/vf-number-field.d.ts +4 -0
- package/dist/components/vf-number-field.js +28 -25
- package/dist/components/vf-paragraph.d.ts +3 -1
- package/dist/components/vf-paragraph.js +7 -0
- package/dist/components/vf-scroll-area.d.ts +16 -1
- package/dist/components/vf-scroll-area.js +39 -29
- package/dist/components/vf-select.d.ts +5 -4
- package/dist/components/vf-select.js +26 -17
- package/dist/components/vf-text-field.d.ts +5 -5
- package/dist/components/vf-text-field.js +1 -1
- package/dist/components/vf-window.d.ts +22 -5
- package/dist/components/vf-window.js +113 -98
- package/dist/cursor.d.ts +8 -0
- package/dist/cursor.js +70 -73
- package/dist/events.d.ts +3 -2
- package/dist/events.js +3 -3
- package/dist/index.d.ts +2 -1
- package/dist/modal-dialog.d.ts +49 -4
- package/dist/modal-dialog.js +115 -87
- package/dist/position.js +25 -20
- package/dist/shell/alert.d.ts +17 -9
- package/dist/shell/alert.js +25 -28
- package/dist/shell/catalog.d.ts +1 -1
- package/dist/shell/catalog.js +32 -18
- package/dist/shell/finder.d.ts +46 -1
- package/dist/shell/finder.js +166 -126
- package/dist/shell/index.d.ts +2 -4
- package/dist/shell/index.js +5 -6
- package/dist/shell/pure.d.ts +10 -0
- package/dist/shell/pure.js +4 -0
- package/dist/shell/shell.d.ts +40 -13
- package/dist/shell/shell.js +87 -51
- package/dist/shell/windows.d.ts +69 -12
- package/dist/shell/windows.js +245 -144
- package/dist/text-control.d.ts +30 -1
- package/dist/text-control.js +27 -6
- package/dist/top-layer.d.ts +13 -0
- package/dist/top-layer.js +16 -0
- package/docs/SPEC.md +25 -24
- package/editor/vscode.html-custom-data.json +22 -12
- package/editor/web-types.json +58 -25
- 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 {
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
47
|
-
let { anchor:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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
|
|
71
|
-
for (let e of
|
|
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
|
-
|
|
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
|
|
83
|
+
let j = (e) => Promise.all(e.images.map((e) => e.decode())).then(() => {
|
|
87
84
|
e.ready = !0;
|
|
88
|
-
}),
|
|
89
|
-
if (
|
|
90
|
-
let { hotspotX: e = 0, hotspotY: t = 0 } =
|
|
91
|
-
|
|
92
|
-
},
|
|
93
|
-
|
|
94
|
-
let n =
|
|
95
|
-
|
|
96
|
-
},
|
|
97
|
-
let t =
|
|
98
|
-
(e !==
|
|
99
|
-
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
if (
|
|
103
|
-
let e =
|
|
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 &&
|
|
104
|
+
if (e && C.has(e)) return e;
|
|
108
105
|
}
|
|
109
106
|
return e[0] && f(e[0]) ? "text" : "arrow";
|
|
110
|
-
},
|
|
111
|
-
|
|
112
|
-
},
|
|
113
|
-
cancelAnimationFrame(
|
|
114
|
-
|
|
107
|
+
}, K = () => {
|
|
108
|
+
I < 0 || W(G());
|
|
109
|
+
}, q = 0, J = () => {
|
|
110
|
+
cancelAnimationFrame(q), q = requestAnimationFrame(() => {
|
|
111
|
+
q = requestAnimationFrame(U);
|
|
115
112
|
});
|
|
116
|
-
},
|
|
117
|
-
if (!(!
|
|
118
|
-
|
|
113
|
+
}, Y = () => {
|
|
114
|
+
if (!(!k || !O.isConnected)) try {
|
|
115
|
+
O.hidePopover(), O.showPopover();
|
|
119
116
|
} catch {}
|
|
120
|
-
},
|
|
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
|
-
|
|
121
|
+
Y();
|
|
125
122
|
break;
|
|
126
123
|
}
|
|
127
124
|
}
|
|
128
|
-
|
|
129
|
-
}),
|
|
130
|
-
|
|
131
|
-
},
|
|
125
|
+
K();
|
|
126
|
+
}), Z = () => {
|
|
127
|
+
O.style.visibility = "hidden";
|
|
128
|
+
}, Q = (e) => {
|
|
132
129
|
if (e.pointerType === "touch") {
|
|
133
|
-
|
|
130
|
+
Z();
|
|
134
131
|
return;
|
|
135
132
|
}
|
|
136
|
-
|
|
137
|
-
},
|
|
138
|
-
if (
|
|
139
|
-
document.body.append(
|
|
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:
|
|
140
|
+
signal: E
|
|
144
141
|
};
|
|
145
|
-
window.addEventListener("pointermove",
|
|
146
|
-
document.hidden &&
|
|
147
|
-
}, { signal:
|
|
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
|
-
},
|
|
157
|
-
A
|
|
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
|
|
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 (
|
|
165
|
-
|
|
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
|
-
|
|
164
|
+
O.remove(), D.remove(), w.style.removeProperty("--vf-cursor");
|
|
168
165
|
};
|
|
169
166
|
}
|
|
170
167
|
//#endregion
|
|
171
|
-
export {
|
|
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 =
|
|
20
|
-
r.removeEventListener(
|
|
19
|
+
let i = t.type, a = 0, o = () => {
|
|
20
|
+
r.removeEventListener(i, o), r.clearTimeout(a), !t.defaultPrevented && n();
|
|
21
21
|
};
|
|
22
|
-
r.addEventListener(
|
|
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';
|
package/dist/modal-dialog.d.ts
CHANGED
|
@@ -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
|
-
/**
|
|
163
|
-
|
|
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
|
}
|