vintage-frames 0.3.0 → 0.5.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 +181 -32
- package/dist/components/vf-button.js +25 -25
- package/dist/components/vf-checkbox.js +15 -15
- package/dist/components/vf-container.d.ts +37 -3
- package/dist/components/vf-container.js +32 -10
- package/dist/components/vf-desktop.d.ts +103 -22
- package/dist/components/vf-desktop.js +100 -121
- package/dist/components/vf-dialog.d.ts +19 -15
- package/dist/components/vf-dialog.js +45 -53
- package/dist/components/vf-icon.js +56 -56
- package/dist/components/vf-list-item.js +16 -16
- package/dist/components/vf-list.js +26 -26
- package/dist/components/vf-menu-item.js +24 -24
- package/dist/components/vf-menu.js +27 -27
- package/dist/components/vf-number-field.js +17 -17
- package/dist/components/vf-progress-bar.js +3 -3
- package/dist/components/vf-radio-group.js +13 -13
- package/dist/components/vf-radio.js +16 -16
- package/dist/components/vf-select.js +27 -27
- package/dist/components/vf-slider.js +32 -32
- package/dist/components/vf-window.js +69 -69
- package/dist/index.d.ts +14 -0
- package/dist/index.js +73 -71
- package/dist/modal-dialog.js +21 -21
- package/dist/pattern-fill.d.ts +91 -0
- package/dist/pattern-fill.js +74 -0
- package/dist/patterns.d.ts +80 -0
- package/dist/patterns.js +477 -0
- package/dist/scroll-rail.js +37 -37
- package/dist/styles/recipes/pattern.d.ts +2 -12
- package/dist/styles/recipes/pattern.js +11 -15
- package/dist/styles/recipes/scroll-rail.d.ts +3 -12
- package/dist/styles/recipes/scroll-rail.js +7 -15
- package/dist/styles/recipes/surface.d.ts +18 -7
- package/dist/styles/recipes/surface.js +15 -0
- package/dist/text-control.js +11 -11
- package/dist/tile-grid.d.ts +4 -2
- package/dist/tile-grid.js +3 -3
- package/dist/toggle-control.js +5 -5
- package/dist/track-width.d.ts +7 -0
- package/dist/track-width.js +6 -3
- package/docs/SPEC.md +14 -10
- package/editor/vscode.html-custom-data.json +14 -4
- package/editor/web-types.json +46 -8
- package/package.json +3 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import i from "../
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
1
|
+
import { emit as e, emitNative as t } from "../events.js";
|
|
2
|
+
import { vfElement as n } from "../define.js";
|
|
3
|
+
import { ScaleController as r, sys as i, toSys as a } from "../scale.js";
|
|
4
|
+
import o from "../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js";
|
|
5
|
+
import { VfPositioned as s } from "../position.js";
|
|
6
|
+
import { vfBase as c } from "../styles/recipes/host.js";
|
|
7
|
+
import { vfFocusUnderline as l } from "../styles/recipes/focus.js";
|
|
8
|
+
import { TrackWidthController as u } from "../track-width.js";
|
|
9
|
+
import { GridSnapController as d } from "../grid-snap.js";
|
|
10
|
+
import { SLIDER_THUMB as f, SLIDER_THUMB_FACE as p } from "../glyphs.js";
|
|
11
|
+
import { VfFormControl as m } from "../form-control.js";
|
|
12
|
+
import { FocusRuleController as h } from "../focus-modality.js";
|
|
13
|
+
import { decimalsOf as g } from "../number.js";
|
|
14
14
|
import { css as _, html as v } from "lit";
|
|
15
15
|
import { property as y, query as b } from "lit/decorators.js";
|
|
16
16
|
//#region src/components/vf-slider.ts
|
|
@@ -21,9 +21,9 @@ function D(e, t) {
|
|
|
21
21
|
};
|
|
22
22
|
return r(1, 0, e - 2, 1), r(1, 3, e - 2, 1), r(0, 1, 1, 2), r(e - 1, 1, 1, 2), r(1, 1, Math.min(Math.max(t, 0), e - 1) - 1, 2), n.join("");
|
|
23
23
|
}
|
|
24
|
-
var O = class extends
|
|
24
|
+
var O = class extends s(m) {
|
|
25
25
|
static {
|
|
26
|
-
this.styles = [
|
|
26
|
+
this.styles = [c, _`
|
|
27
27
|
:host {
|
|
28
28
|
/* Padding just leaves room for the thumb's focus ring; the thumb itself
|
|
29
29
|
stays within the rail (its travel is inset by half its width). */
|
|
@@ -102,7 +102,7 @@ var O = class extends a(p) {
|
|
|
102
102
|
}
|
|
103
103
|
.track.vf-focus-rule::after {
|
|
104
104
|
--vf-focus-underline-offset: ${3}px;
|
|
105
|
-
${
|
|
105
|
+
${l}
|
|
106
106
|
}
|
|
107
107
|
`];
|
|
108
108
|
}
|
|
@@ -110,7 +110,7 @@ var O = class extends a(p) {
|
|
|
110
110
|
#t;
|
|
111
111
|
#n;
|
|
112
112
|
constructor() {
|
|
113
|
-
super(), this.value = 0, this.min = 0, this.max = 100, this.step = 1, this.name = "", this.label = "", this.trackSize = new
|
|
113
|
+
super(), this.value = 0, this.min = 0, this.max = 100, this.step = 1, this.name = "", this.label = "", this.trackSize = new u(this, () => this.track), this.scale = new r(this), this.gridSnap = new d(this), this.selfManagedTabIndex = !1, this.#e = new h(this), this.#t = 0, this.#n = !1, this.#f = (e) => {
|
|
114
114
|
if (!(this.isDisabled || e.button !== 0)) {
|
|
115
115
|
e.preventDefault(), this.#e.suppress(), this.focus(), this.#n = !0, this.#t = this.value;
|
|
116
116
|
try {
|
|
@@ -181,7 +181,7 @@ var O = class extends a(p) {
|
|
|
181
181
|
}
|
|
182
182
|
#o(e) {
|
|
183
183
|
let t = this.#i, n = Math.round((e - this.min) / t), r = this.#a(this.min + n * t);
|
|
184
|
-
return Number(r.toFixed(
|
|
184
|
+
return Number(r.toFixed(g(t)));
|
|
185
185
|
}
|
|
186
186
|
get #s() {
|
|
187
187
|
let e = Number.isFinite(this.value) ? this.value : this.min;
|
|
@@ -193,16 +193,16 @@ var O = class extends a(p) {
|
|
|
193
193
|
#l(e) {
|
|
194
194
|
e !== this.value && (this.value = e, this.#u("vf-input"));
|
|
195
195
|
}
|
|
196
|
-
#u(
|
|
197
|
-
|
|
196
|
+
#u(n) {
|
|
197
|
+
e(this, n, { value: this.value }), t(this, n === "vf-input" ? "input" : "change");
|
|
198
198
|
}
|
|
199
199
|
#d(e) {
|
|
200
200
|
let t = this.track?.getBoundingClientRect();
|
|
201
201
|
if (!t) return this.value;
|
|
202
|
-
let
|
|
203
|
-
if (
|
|
204
|
-
let
|
|
205
|
-
return this.#o(this.min +
|
|
202
|
+
let n = t.width - i(x, this);
|
|
203
|
+
if (n <= 0) return this.value;
|
|
204
|
+
let r = Math.min(Math.max((e - t.left - i(w, this)) / n, 0), 1);
|
|
205
|
+
return this.#o(this.min + r * this.#r);
|
|
206
206
|
}
|
|
207
207
|
#f;
|
|
208
208
|
#p;
|
|
@@ -213,7 +213,7 @@ var O = class extends a(p) {
|
|
|
213
213
|
(n || t) && this.syncFormValue(String(this.#s)), e.has("min") && (this.internals.ariaValueMin = String(this.min)), e.has("max") && (this.internals.ariaValueMax = String(this.max)), n && (this.internals.ariaValueNow = String(this.#s)), e.has("label") && (this.internals.ariaLabel = this.label || null), t && (this.internals.ariaDisabled = this.isDisabled ? "true" : "false", this.selfManagedTabIndex && (this.tabIndex = this.isDisabled ? -1 : 0));
|
|
214
214
|
}
|
|
215
215
|
render() {
|
|
216
|
-
let e =
|
|
216
|
+
let e = a(this.trackSize.width, this), t = Math.round(this.#c * Math.max(0, e - x)), n = i(t, this), r = t + C;
|
|
217
217
|
return v`
|
|
218
218
|
<div
|
|
219
219
|
class="track vf-snap ${this.#e.marked ? "vf-focus-rule" : ""} ${this.isDisabled ? "disabled" : ""}"
|
|
@@ -227,29 +227,29 @@ var O = class extends a(p) {
|
|
|
227
227
|
${e >= 2 ? v`<svg
|
|
228
228
|
class="rail"
|
|
229
229
|
part="rail"
|
|
230
|
-
width=${
|
|
231
|
-
height=${
|
|
230
|
+
width=${i(e, this)}
|
|
231
|
+
height=${i(T, this)}
|
|
232
232
|
viewBox="0 0 ${e} ${T}"
|
|
233
233
|
shape-rendering="crispEdges"
|
|
234
234
|
aria-hidden="true"
|
|
235
235
|
>
|
|
236
|
-
<path d=${D(e,
|
|
236
|
+
<path d=${D(e, r)}></path>
|
|
237
237
|
</svg>` : null}
|
|
238
|
-
<span class="thumb" part="thumb" style="left: ${
|
|
238
|
+
<span class="thumb" part="thumb" style="left: ${n}px">
|
|
239
239
|
<svg
|
|
240
240
|
class="thumb-glyph"
|
|
241
241
|
viewBox="0 0 ${x} ${S}"
|
|
242
242
|
shape-rendering="crispEdges"
|
|
243
243
|
aria-hidden="true"
|
|
244
244
|
>
|
|
245
|
-
<path class="thumb-face" d=${
|
|
246
|
-
<path class="thumb-outline" d=${
|
|
245
|
+
<path class="thumb-face" d=${p.d}></path>
|
|
246
|
+
<path class="thumb-outline" d=${f.d}></path>
|
|
247
247
|
</svg>
|
|
248
248
|
</span>
|
|
249
249
|
</div>
|
|
250
250
|
`;
|
|
251
251
|
}
|
|
252
252
|
};
|
|
253
|
-
|
|
253
|
+
o([y({ type: Number })], O.prototype, "value", void 0), o([y({ type: Number })], O.prototype, "min", void 0), o([y({ type: Number })], O.prototype, "max", void 0), o([y({ type: Number })], O.prototype, "step", void 0), o([y({ reflect: !0 })], O.prototype, "name", void 0), o([y()], O.prototype, "label", void 0), o([b(".track")], O.prototype, "track", void 0), O = o([n("vf-slider")], O);
|
|
254
254
|
//#endregion
|
|
255
255
|
export { O as VfSlider };
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import a from "../
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
1
|
+
import { emit as e } from "../events.js";
|
|
2
|
+
import { vfElement as t } from "../define.js";
|
|
3
|
+
import { ScaleController as n, snapSys as r, sysLength as i, toSysExact as a } from "../scale.js";
|
|
4
|
+
import o from "../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js";
|
|
5
|
+
import { PlacementController as s, VfPositioned as c, warnMovableContract as l } from "../position.js";
|
|
6
|
+
import { vfBase as u } from "../styles/recipes/host.js";
|
|
7
|
+
import { DOT_MOTIF as d, DOT_RECTS as f, DOT_SPAN as p, vfDots as m, vfStripes as h } from "../styles/recipes/pattern.js";
|
|
8
|
+
import { vfChromeFrame as g } from "../styles/recipes/surface.js";
|
|
9
|
+
import { vfTitleBar as _, vfWindowWidgets as v } from "../styles/recipes/title-bar.js";
|
|
10
|
+
import { vfFocus as y } from "../styles/recipes/focus.js";
|
|
11
|
+
import { TileRasterCache as b, patternOverride as x, tileGrid as S, vfTileGrid as C } from "../tile-grid.js";
|
|
12
|
+
import { GridSnapController as w } from "../grid-snap.js";
|
|
13
|
+
import { VfSized as T } from "../size.js";
|
|
14
|
+
import { DragController as E } from "../drag.js";
|
|
15
|
+
import { TitleCenterController as D, chromeTitleBar as O, closeBox as k, widgetLabel as A, zoomBox as j } from "../chrome.js";
|
|
16
16
|
import "./vf-scroll-area.js";
|
|
17
|
-
import { LitElement as
|
|
18
|
-
import { property as
|
|
17
|
+
import { LitElement as M, css as N, html as P, nothing as F } from "lit";
|
|
18
|
+
import { property as I, state as L } from "lit/decorators.js";
|
|
19
19
|
//#region src/components/vf-window.ts
|
|
20
|
-
var
|
|
20
|
+
var R = 80, z = 54, B = 24, V = 8, H = class extends T(c(M)) {
|
|
21
21
|
constructor(...e) {
|
|
22
|
-
super(...e), this.heading = "", this.active = !0, this.closable = !0, this.zoomable = !1, this.movable = !1, this.resizable = !1, this.flush = !1, this._hasStatus = !1, this.scale = new
|
|
23
|
-
let r =
|
|
22
|
+
super(...e), this.heading = "", this.active = !0, this.closable = !0, this.zoomable = !1, this.movable = !1, this.resizable = !1, this.flush = !1, this._hasStatus = !1, this.scale = new n(this), this.gridSnap = new w(this), this.titleCenter = new D(this), this._dotsPattern = "", this.#e = new b(), this.#t = (e, t, n) => {
|
|
23
|
+
let r = a(this.offsetWidth, this);
|
|
24
24
|
return {
|
|
25
|
-
x: Math.min(Math.max(e,
|
|
26
|
-
y: Math.min(Math.max(t, 0), Math.max(0, n.height -
|
|
25
|
+
x: Math.min(Math.max(e, B - r), n.width - B),
|
|
26
|
+
y: Math.min(Math.max(t, 0), Math.max(0, n.height - B))
|
|
27
27
|
};
|
|
28
|
-
}, this._placement = new
|
|
28
|
+
}, this._placement = new s(this, (e, t, n) => this.#t(e, t, n)), this._drag = new E(this, {
|
|
29
29
|
onDragStart: (e) => !this.movable || e.button !== 0 || e.composedPath().some((e) => e instanceof HTMLElement && e.classList.contains("box")) ? null : (this.#i(), this._placement.seed()),
|
|
30
30
|
onDrag: (e, t) => this._placement.moveTo(e, t)
|
|
31
31
|
}), this._resizeState = null, this.#n = !1, this.#r = !1;
|
|
32
32
|
}
|
|
33
33
|
static {
|
|
34
34
|
this.styles = [
|
|
35
|
-
|
|
36
|
-
p,
|
|
37
|
-
f,
|
|
38
|
-
x,
|
|
39
|
-
_,
|
|
40
|
-
m,
|
|
35
|
+
u,
|
|
41
36
|
h,
|
|
37
|
+
m,
|
|
38
|
+
C,
|
|
39
|
+
y,
|
|
42
40
|
g,
|
|
43
|
-
|
|
41
|
+
_,
|
|
42
|
+
v,
|
|
43
|
+
N`
|
|
44
44
|
:host {
|
|
45
45
|
display: block;
|
|
46
46
|
position: relative;
|
|
@@ -281,27 +281,27 @@ var L = 80, R = 54, z = 24, B = 8, V = class extends C(s(j)) {
|
|
|
281
281
|
}
|
|
282
282
|
#e;
|
|
283
283
|
willUpdate(e) {
|
|
284
|
-
super.willUpdate(e), this.variant === "utility" && (this._dotsPattern =
|
|
284
|
+
super.willUpdate(e), this.variant === "utility" && (this._dotsPattern = x(this, "--vf-dots-pattern"));
|
|
285
285
|
}
|
|
286
286
|
_dotsTexture() {
|
|
287
287
|
if (this.width == null) return;
|
|
288
288
|
let e = Math.max(1, this.width - 2);
|
|
289
|
-
if (this._dotsPattern) return
|
|
290
|
-
cols: Math.ceil(e /
|
|
289
|
+
if (this._dotsPattern) return S({
|
|
290
|
+
cols: Math.ceil(e / p),
|
|
291
291
|
rows: 1,
|
|
292
|
-
tile:
|
|
292
|
+
tile: p
|
|
293
293
|
});
|
|
294
|
-
let t = Math.ceil((e +
|
|
295
|
-
return
|
|
294
|
+
let t = Math.ceil((e + d) / p) * p, n = V + d;
|
|
295
|
+
return P`<div
|
|
296
296
|
class="vf-tile-raster"
|
|
297
|
-
style="width:${
|
|
297
|
+
style="width:${i(t)};height:${i(n)};background-image:${this.#e.for(d, d, f, t, n)}"
|
|
298
298
|
></div>`;
|
|
299
299
|
}
|
|
300
300
|
#t;
|
|
301
301
|
updated() {
|
|
302
302
|
this.#a();
|
|
303
|
-
let
|
|
304
|
-
|
|
303
|
+
let t = this._resizeState;
|
|
304
|
+
t?.emitPending && (t.emitPending = !1, e(this, "vf-resize", {
|
|
305
305
|
width: this.width,
|
|
306
306
|
height: this.height,
|
|
307
307
|
commit: !1
|
|
@@ -310,7 +310,7 @@ var L = 80, R = 54, z = 24, B = 8, V = class extends C(s(j)) {
|
|
|
310
310
|
#n;
|
|
311
311
|
#r;
|
|
312
312
|
#i() {
|
|
313
|
-
this.#r ||=
|
|
313
|
+
this.#r ||= l(this, `vf-window${this.heading ? ` ("${this.heading}")` : ""}`, "<vf-window movable top=\"30\" left=\"40\" width=\"240\" height=\"176\">");
|
|
314
314
|
}
|
|
315
315
|
#a() {
|
|
316
316
|
if (this.#n) return;
|
|
@@ -325,10 +325,10 @@ var L = 80, R = 54, z = 24, B = 8, V = class extends C(s(j)) {
|
|
|
325
325
|
this._hasStatus = t.assignedElements().length > 0;
|
|
326
326
|
}
|
|
327
327
|
_onCloseClick() {
|
|
328
|
-
|
|
328
|
+
e(this, "vf-close", { reason: "close" });
|
|
329
329
|
}
|
|
330
330
|
_onZoomClick() {
|
|
331
|
-
|
|
331
|
+
e(this, "vf-zoom", {});
|
|
332
332
|
}
|
|
333
333
|
_onGrowPointerDown(e) {
|
|
334
334
|
if (!this.resizable || e.button !== 0) return;
|
|
@@ -337,8 +337,8 @@ var L = 80, R = 54, z = 24, B = 8, V = class extends C(s(j)) {
|
|
|
337
337
|
pointerId: e.pointerId,
|
|
338
338
|
startX: e.clientX,
|
|
339
339
|
startY: e.clientY,
|
|
340
|
-
baseWidth:
|
|
341
|
-
baseHeight:
|
|
340
|
+
baseWidth: a(t.width, this),
|
|
341
|
+
baseHeight: a(t.height, this),
|
|
342
342
|
emitPending: !1,
|
|
343
343
|
resized: !1
|
|
344
344
|
}, e.currentTarget.setPointerCapture(e.pointerId), e.preventDefault();
|
|
@@ -346,49 +346,49 @@ var L = 80, R = 54, z = 24, B = 8, V = class extends C(s(j)) {
|
|
|
346
346
|
_onGrowPointerMove(e) {
|
|
347
347
|
let t = this._resizeState;
|
|
348
348
|
if (!t || e.pointerId !== t.pointerId) return;
|
|
349
|
-
let
|
|
350
|
-
(
|
|
349
|
+
let n = r(Math.max(R, t.baseWidth + a(e.clientX - t.startX, this)), this), i = r(Math.max(z, t.baseHeight + a(e.clientY - t.startY, this)), this);
|
|
350
|
+
(n !== this.width || i !== this.height) && (t.emitPending = !0, t.resized = !0), this.width = n, this.height = i;
|
|
351
351
|
}
|
|
352
|
-
_onGrowPointerEnd(
|
|
353
|
-
let
|
|
354
|
-
if (!
|
|
352
|
+
_onGrowPointerEnd(t) {
|
|
353
|
+
let n = this._resizeState;
|
|
354
|
+
if (!n || t.pointerId !== n.pointerId) return;
|
|
355
355
|
this._resizeState = null;
|
|
356
|
-
let
|
|
357
|
-
|
|
356
|
+
let r = t.currentTarget;
|
|
357
|
+
r.hasPointerCapture(t.pointerId) && r.releasePointerCapture(t.pointerId), n.resized && e(this, "vf-resize", {
|
|
358
358
|
width: this.width,
|
|
359
359
|
height: this.height,
|
|
360
360
|
commit: !0
|
|
361
361
|
});
|
|
362
362
|
}
|
|
363
363
|
render() {
|
|
364
|
-
return
|
|
364
|
+
return P`
|
|
365
365
|
<div
|
|
366
366
|
class="vf-frame vf-snap"
|
|
367
367
|
part="frame"
|
|
368
368
|
role="group"
|
|
369
|
-
aria-labelledby=${this.heading ? "title" :
|
|
369
|
+
aria-labelledby=${this.heading ? "title" : F}
|
|
370
370
|
>
|
|
371
|
-
${
|
|
372
|
-
${this.closable ?
|
|
371
|
+
${O(this._drag, P`
|
|
372
|
+
${this.closable ? k(A("Close", this.heading), this._onCloseClick) : F}
|
|
373
373
|
<span class="vf-title" part="title" id="title">${this.heading}</span>
|
|
374
|
-
${this.zoomable ?
|
|
374
|
+
${this.zoomable ? j(A("Zoom", this.heading), this._onZoomClick) : F}
|
|
375
375
|
`, this.variant === "utility" ? "vf-dots" : "vf-stripes", this.variant === "utility" ? this._dotsTexture() : void 0)}
|
|
376
376
|
<div class="body" part="body">
|
|
377
|
-
${this.scrollbars ?
|
|
377
|
+
${this.scrollbars ? P`
|
|
378
378
|
<vf-scroll-area
|
|
379
379
|
class="edge-scroll"
|
|
380
380
|
axis=${this.scrollbars}
|
|
381
|
-
label=${this.heading ||
|
|
381
|
+
label=${this.heading || F}
|
|
382
382
|
exportparts="viewport"
|
|
383
383
|
>
|
|
384
384
|
<slot></slot>
|
|
385
385
|
</vf-scroll-area>
|
|
386
|
-
` :
|
|
386
|
+
` : P`<slot></slot>`}
|
|
387
387
|
</div>
|
|
388
388
|
<div class="status ${this._hasStatus ? "" : "empty"}" part="status-bar">
|
|
389
389
|
<slot name="status" @slotchange=${this._onStatusSlotChange}></slot>
|
|
390
390
|
</div>
|
|
391
|
-
${this.resizable ?
|
|
391
|
+
${this.resizable ? P`
|
|
392
392
|
<div
|
|
393
393
|
class="grow"
|
|
394
394
|
part="grow-box"
|
|
@@ -398,29 +398,29 @@ var L = 80, R = 54, z = 24, B = 8, V = class extends C(s(j)) {
|
|
|
398
398
|
@pointercancel=${this._onGrowPointerEnd}
|
|
399
399
|
@lostpointercapture=${this._onGrowPointerEnd}
|
|
400
400
|
></div>
|
|
401
|
-
` :
|
|
401
|
+
` : F}
|
|
402
402
|
</div>
|
|
403
403
|
`;
|
|
404
404
|
}
|
|
405
405
|
};
|
|
406
|
-
|
|
406
|
+
o([I({ reflect: !0 })], H.prototype, "variant", void 0), o([I()], H.prototype, "heading", void 0), o([I({
|
|
407
407
|
type: Boolean,
|
|
408
408
|
reflect: !0
|
|
409
|
-
})],
|
|
409
|
+
})], H.prototype, "active", void 0), o([I({
|
|
410
410
|
type: Boolean,
|
|
411
411
|
reflect: !0
|
|
412
|
-
})],
|
|
412
|
+
})], H.prototype, "closable", void 0), o([I({
|
|
413
413
|
type: Boolean,
|
|
414
414
|
reflect: !0
|
|
415
|
-
})],
|
|
415
|
+
})], H.prototype, "zoomable", void 0), o([I({
|
|
416
416
|
type: Boolean,
|
|
417
417
|
reflect: !0
|
|
418
|
-
})],
|
|
418
|
+
})], H.prototype, "movable", void 0), o([I({
|
|
419
419
|
type: Boolean,
|
|
420
420
|
reflect: !0
|
|
421
|
-
})],
|
|
421
|
+
})], H.prototype, "resizable", void 0), o([I({
|
|
422
422
|
type: Boolean,
|
|
423
423
|
reflect: !0
|
|
424
|
-
})],
|
|
424
|
+
})], H.prototype, "flush", void 0), o([I({ reflect: !0 })], H.prototype, "scrollbars", void 0), o([L()], H.prototype, "_hasStatus", void 0), H = o([t("vf-window")], H);
|
|
425
425
|
//#endregion
|
|
426
|
-
export {
|
|
426
|
+
export { H as VfWindow };
|
package/dist/index.d.ts
CHANGED
|
@@ -101,6 +101,20 @@ export type { TileRect } from './styles/base.js';
|
|
|
101
101
|
* memoizes the encoded raster against its size.
|
|
102
102
|
*/
|
|
103
103
|
export { vfTileGrid, tileGrid, patternOverride, TileRasterCache } from './tile-grid.js';
|
|
104
|
+
/**
|
|
105
|
+
* The standard pattern set — the 38 MacPaint fills as 8-byte QuickDraw
|
|
106
|
+
* patterns (`PATTERNS`, named; `PATTERN_NAMES` in palette order), the
|
|
107
|
+
* attribute grammar (`parsePattern` reads a name or sixteen hex digits,
|
|
108
|
+
* `patternHex` writes one back), and the adapters onto the tile machinery
|
|
109
|
+
* (`patternMotif` on the minimal cell, `patternRects` on the full 8×8). The
|
|
110
|
+
* fill itself is `PatternFillController` + `vfPatternFill`: a pattern
|
|
111
|
+
* painted as a box's own background, exact at every density and zoom — what
|
|
112
|
+
* `vf-container pattern="…"` does.
|
|
113
|
+
*/
|
|
114
|
+
export { PATTERNS, PATTERN_NAMES, PATTERN_SIZE, parsePattern, patternHex, patternMotif, patternRects, } from './patterns.js';
|
|
115
|
+
export type { Pattern, PatternMotif, PatternName } from './patterns.js';
|
|
116
|
+
export { PatternFillController, vfPatternFill } from './pattern-fill.js';
|
|
117
|
+
export type { PatternFillOptions } from './pattern-fill.js';
|
|
104
118
|
/** Glyph sprites (`glyphSvg(CHECKMARK, 'check')`) and their pixel geometry. */
|
|
105
119
|
export { glyphSvg, CHECKBOX_X, RADIO_FACE, RADIO_RING, RADIO_RING_PRESSED, RADIO_DOT, CHECKMARK, CARET_DOWN, STEPPER, STEPPER_UP_FILL, STEPPER_DOWN_FILL, SLIDER_THUMB, SLIDER_THUMB_FACE, } from './glyphs.js';
|
|
106
120
|
export type { Glyph } from './glyphs.js';
|
package/dist/index.js
CHANGED
|
@@ -1,71 +1,73 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
|
|
1
|
+
import { emit as e } from "./events.js";
|
|
2
|
+
import { defineElement as t, vfElement as n } from "./define.js";
|
|
3
|
+
import { CLASSIC_DPI as r, CSS_REFERENCE_DPI as i, SYSTEM_PX_IN_CSS_PX as a, devicePxPerSystemPx as o, getZoom as s, onZoomChange as c, resetZoomBaseline as l, truePixelRatio as u } from "./zoom.js";
|
|
4
|
+
import { ScaleController as d, applyScale as f, effectiveScale as p, getScale as m, onScaleChange as h, snapSys as g, snapToDevicePx as _, snapToSystemPx as v, sys as y, sysLength as b, sysLengths as x, systemPxQuantum as S, toSys as C, toSysExact as w } from "./scale.js";
|
|
5
|
+
import { PlacementController as T, VfPositioned as E } from "./position.js";
|
|
6
|
+
import { PIXEL_GRID_METRICS as D, registerEmbeddedFont as O } from "./styles/register-embedded-font.js";
|
|
7
|
+
import { VF_BODY_FAMILY as k, registerBodyFace as A } from "./styles/body-font.js";
|
|
8
|
+
import { vfBodyDecls as j } from "./styles/recipes/body-face.js";
|
|
9
|
+
import { VF_DISPLAY_FAMILY as M, registerDisplayFace as N } from "./styles/display-font.js";
|
|
10
|
+
import { vfDisplay as P, vfDisplayDecls as F } from "./styles/recipes/display-face.js";
|
|
11
|
+
import { vfBase as I } from "./styles/recipes/host.js";
|
|
12
|
+
import { vfStaticText as L } from "./styles/recipes/static-text.js";
|
|
13
|
+
import { TILE_LATTICE as R, tileImage as z, tileRaster as B, tileRects as V, tileSpan as H, vfTileMaskSize as U, vfTileSize as W } from "./styles/recipes/tile.js";
|
|
14
|
+
import { PATTERNS as G, PATTERN_NAMES as K, PATTERN_SIZE as q, parsePattern as J, patternHex as Y, patternMotif as X, patternRects as Z } from "./patterns.js";
|
|
15
|
+
import { vfDots as Q, vfStripes as $ } from "./styles/recipes/pattern.js";
|
|
16
|
+
import { vfHardShadowDecls as ee } from "./styles/recipes/shadow.js";
|
|
17
|
+
import { vfChromeFrame as te, vfModalFrame as ne, vfPanel as re } from "./styles/recipes/surface.js";
|
|
18
|
+
import { vfTitleBar as ie, vfWindowWidgets as ae } from "./styles/recipes/title-bar.js";
|
|
19
|
+
import { vfFocus as oe, vfFocusRing as se, vfFocusUnderline as ce } from "./styles/recipes/focus.js";
|
|
20
|
+
import { vfToggle as le } from "./styles/recipes/toggle.js";
|
|
21
|
+
import { vfField as ue } from "./styles/recipes/field.js";
|
|
22
|
+
import { vfScrollRail as de } from "./styles/recipes/scroll-rail.js";
|
|
23
|
+
import { TileRasterCache as fe, patternOverride as pe, tileGrid as me, vfTileGrid as he } from "./tile-grid.js";
|
|
24
|
+
import { TrackWidthController as ge } from "./track-width.js";
|
|
25
|
+
import { PatternFillController as _e, vfPatternFill as ve } from "./pattern-fill.js";
|
|
26
|
+
import { GridSnapController as ye, requestGridSnap as be } from "./grid-snap.js";
|
|
27
|
+
import { DocumentListenersController as xe } from "./document-listeners.js";
|
|
28
|
+
import { BUTTON_FACE as Se, BUTTON_FRAME as Ce, RING_FRAME as we, RING_HOLE as Te, RING_INSET as Ee, SCREEN_CORNER as De, steppedCornerClip as Oe, steppedRectClip as ke, steppedRingClip as Ae } from "./pixel-frame.js";
|
|
29
|
+
import { VfDesktop as je } from "./components/vf-desktop.js";
|
|
30
|
+
import { VfSized as Me } from "./size.js";
|
|
31
|
+
import { DragController as Ne } from "./drag.js";
|
|
32
|
+
import { ScrollStateController as Pe } from "./scroll-state.js";
|
|
33
|
+
import { BLINK_FLIPS as Fe, BLINK_INTERVAL_MS as Ie, PRESS_HOLD_MS as Le, RENAME_DELAY_MS as Re, prefersReducedMotion as ze, runSelectionBlink as Be } from "./motion.js";
|
|
34
|
+
import { CARET_DOWN as Ve, CHECKBOX_X as He, CHECKMARK as Ue, RADIO_DOT as We, RADIO_FACE as Ge, RADIO_RING as Ke, RADIO_RING_PRESSED as qe, SLIDER_THUMB as Je, SLIDER_THUMB_FACE as Ye, STEPPER as Xe, STEPPER_DOWN_FILL as Ze, STEPPER_UP_FILL as Qe, glyphSvg as $e } from "./glyphs.js";
|
|
35
|
+
import { ScrollRailController as et, renderScrollRail as tt } from "./scroll-rail.js";
|
|
36
|
+
import { VfScrollArea as nt } from "./components/vf-scroll-area.js";
|
|
37
|
+
import { VfWindow as rt } from "./components/vf-window.js";
|
|
38
|
+
import { VfModalDialog as it, modalDialogStyles as at } from "./modal-dialog.js";
|
|
39
|
+
import { VfButtonGroup as ot } from "./components/vf-button-group.js";
|
|
40
|
+
import { VfDialog as st } from "./components/vf-dialog.js";
|
|
41
|
+
import { VfSeparator as ct } from "./components/vf-separator.js";
|
|
42
|
+
import { VfFormControl as lt } from "./form-control.js";
|
|
43
|
+
import { VfButton as ut } from "./components/vf-button.js";
|
|
44
|
+
import { VfSwatch as dt } from "./components/vf-swatch.js";
|
|
45
|
+
import { VfToggleControl as ft } from "./toggle-control.js";
|
|
46
|
+
import { VfCheckbox as pt } from "./components/vf-checkbox.js";
|
|
47
|
+
import { VfRadio as mt } from "./components/vf-radio.js";
|
|
48
|
+
import { VfRadioGroup as ht } from "./components/vf-radio-group.js";
|
|
49
|
+
import { FocusRuleController as gt, focusModality as _t, trackFocusModality as vt } from "./focus-modality.js";
|
|
50
|
+
import { VfTextControlBase as yt } from "./text-control.js";
|
|
51
|
+
import { VfTextField as bt } from "./components/vf-text-field.js";
|
|
52
|
+
import { VfTextArea as xt } from "./components/vf-text-area.js";
|
|
53
|
+
import { VfNumberField as St } from "./components/vf-number-field.js";
|
|
54
|
+
import { VfOption as Ct } from "./components/vf-option.js";
|
|
55
|
+
import { VfSelect as wt } from "./components/vf-select.js";
|
|
56
|
+
import { VfProgressBar as Tt } from "./components/vf-progress-bar.js";
|
|
57
|
+
import { VfSlider as Et } from "./components/vf-slider.js";
|
|
58
|
+
import { VfLabel as Dt } from "./components/vf-label.js";
|
|
59
|
+
import { VfParagraph as Ot } from "./components/vf-paragraph.js";
|
|
60
|
+
import { VfImg as kt } from "./components/vf-img.js";
|
|
61
|
+
import { VfIcon as At } from "./components/vf-icon.js";
|
|
62
|
+
import { VfMenuBar as jt } from "./components/vf-menu-bar.js";
|
|
63
|
+
import { VfMenu as Mt } from "./components/vf-menu.js";
|
|
64
|
+
import { VfMenuItem as Nt } from "./components/vf-menu-item.js";
|
|
65
|
+
import { VfList as Pt } from "./components/vf-list.js";
|
|
66
|
+
import { VfListItem as Ft } from "./components/vf-list-item.js";
|
|
67
|
+
import { VfFieldset as It } from "./components/vf-fieldset.js";
|
|
68
|
+
import { VfGrid as Lt } from "./components/vf-grid.js";
|
|
69
|
+
import { VfStack as Rt } from "./components/vf-stack.js";
|
|
70
|
+
import { VfContainer as zt } from "./components/vf-container.js";
|
|
71
|
+
import { CURSOR_ARROW as Bt, CURSOR_CROSSHAIR as Vt, CURSOR_I_BEAM as Ht, CURSOR_WAIT as Ut } from "./cursor-art.js";
|
|
72
|
+
import { applyCursor as Wt } from "./cursor.js";
|
|
73
|
+
export { Fe as BLINK_FLIPS, Ie as BLINK_INTERVAL_MS, Se as BUTTON_FACE, Ce as BUTTON_FRAME, Ve as CARET_DOWN, He as CHECKBOX_X, Ue as CHECKMARK, r as CLASSIC_DPI, i as CSS_REFERENCE_DPI, Bt as CURSOR_ARROW, Vt as CURSOR_CROSSHAIR, Ht as CURSOR_I_BEAM, Ut as CURSOR_WAIT, xe as DocumentListenersController, Ne as DragController, gt as FocusRuleController, ye as GridSnapController, G as PATTERNS, K as PATTERN_NAMES, q as PATTERN_SIZE, D as PIXEL_GRID_METRICS, Le as PRESS_HOLD_MS, _e as PatternFillController, T as PlacementController, We as RADIO_DOT, Ge as RADIO_FACE, Ke as RADIO_RING, qe as RADIO_RING_PRESSED, Re as RENAME_DELAY_MS, we as RING_FRAME, Te as RING_HOLE, Ee as RING_INSET, De as SCREEN_CORNER, Je as SLIDER_THUMB, Ye as SLIDER_THUMB_FACE, Xe as STEPPER, Ze as STEPPER_DOWN_FILL, Qe as STEPPER_UP_FILL, a as SYSTEM_PX_IN_CSS_PX, d as ScaleController, et as ScrollRailController, Pe as ScrollStateController, R as TILE_LATTICE, fe as TileRasterCache, ge as TrackWidthController, k as VF_BODY_FAMILY, M as VF_DISPLAY_FAMILY, ut as VfButton, ot as VfButtonGroup, pt as VfCheckbox, zt as VfContainer, je as VfDesktop, st as VfDialog, It as VfFieldset, lt as VfFormControl, Lt as VfGrid, At as VfIcon, kt as VfImg, Dt as VfLabel, Pt as VfList, Ft as VfListItem, Mt as VfMenu, jt as VfMenuBar, Nt as VfMenuItem, it as VfModalDialog, St as VfNumberField, Ct as VfOption, Ot as VfParagraph, E as VfPositioned, Tt as VfProgressBar, mt as VfRadio, ht as VfRadioGroup, nt as VfScrollArea, wt as VfSelect, ct as VfSeparator, Me as VfSized, Et as VfSlider, Rt as VfStack, dt as VfSwatch, xt as VfTextArea, yt as VfTextControlBase, bt as VfTextField, ft as VfToggleControl, rt as VfWindow, Wt as applyCursor, f as applyScale, t as defineElement, o as devicePxPerSystemPx, p as effectiveScale, e as emit, _t as focusModality, m as getScale, s as getZoom, $e as glyphSvg, at as modalDialogStyles, h as onScaleChange, c as onZoomChange, J as parsePattern, Y as patternHex, X as patternMotif, pe as patternOverride, Z as patternRects, ze as prefersReducedMotion, A as registerBodyFace, N as registerDisplayFace, O as registerEmbeddedFont, tt as renderScrollRail, be as requestGridSnap, l as resetZoomBaseline, Be as runSelectionBlink, g as snapSys, _ as snapToDevicePx, v as snapToSystemPx, Oe as steppedCornerClip, ke as steppedRectClip, Ae as steppedRingClip, y as sys, b as sysLength, x as sysLengths, S as systemPxQuantum, me as tileGrid, z as tileImage, B as tileRaster, V as tileRects, H as tileSpan, C as toSys, w as toSysExact, vt as trackFocusModality, u as truePixelRatio, I as vfBase, j as vfBodyDecls, te as vfChromeFrame, P as vfDisplay, F as vfDisplayDecls, Q as vfDots, n as vfElement, ue as vfField, oe as vfFocus, se as vfFocusRing, ce as vfFocusUnderline, ee as vfHardShadowDecls, ne as vfModalFrame, re as vfPanel, ve as vfPatternFill, de as vfScrollRail, L as vfStaticText, $ as vfStripes, he as vfTileGrid, U as vfTileMaskSize, W as vfTileSize, ie as vfTitleBar, le as vfToggle, ae as vfWindowWidgets };
|