vintage-frames 0.13.0 → 0.14.1
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/README.md +16 -0
- package/custom-elements.json +184 -20
- package/dist/components/vf-checkbox.d.ts +6 -5
- package/dist/components/vf-checkbox.js +41 -37
- package/dist/components/vf-container.d.ts +14 -14
- package/dist/components/vf-container.js +58 -28
- package/dist/components/vf-desktop.d.ts +114 -12
- package/dist/components/vf-desktop.js +119 -58
- package/dist/components/vf-fieldset.js +30 -22
- package/dist/components/vf-icon-field.d.ts +1 -1
- package/dist/components/vf-icon.js +111 -104
- package/dist/components/vf-list.js +30 -29
- package/dist/components/vf-menu-bar.d.ts +5 -0
- package/dist/components/vf-menu-bar.js +67 -43
- package/dist/components/vf-menu.js +24 -22
- package/dist/components/vf-number-field.js +32 -30
- package/dist/components/vf-progress-bar.js +28 -29
- package/dist/components/vf-radio.js +3 -4
- package/dist/components/vf-scroll-area.js +27 -26
- package/dist/components/vf-select.js +108 -90
- package/dist/components/vf-separator.d.ts +5 -5
- package/dist/components/vf-separator.js +36 -10
- package/dist/components/vf-swatch.js +47 -45
- package/dist/components/vf-text-area.js +37 -35
- package/dist/components/vf-text-field.js +20 -18
- package/dist/components/vf-window.d.ts +13 -0
- package/dist/components/vf-window.js +101 -72
- package/dist/index.d.ts +12 -1
- package/dist/index.js +61 -59
- package/dist/pattern-fill.d.ts +11 -8
- package/dist/pattern-fill.js +2 -4
- package/dist/position.d.ts +25 -7
- package/dist/position.js +6 -3
- package/dist/shell/alert.d.ts +32 -0
- package/dist/shell/alert.js +44 -0
- package/dist/shell/catalog.d.ts +168 -0
- package/dist/shell/catalog.js +278 -0
- package/dist/shell/clock.d.ts +16 -0
- package/dist/shell/clock.js +36 -0
- package/dist/shell/filing.d.ts +39 -0
- package/dist/shell/filing.js +68 -0
- package/dist/shell/finder.d.ts +116 -0
- package/dist/shell/finder.js +564 -0
- package/dist/shell/geometry.d.ts +196 -0
- package/dist/shell/geometry.js +241 -0
- package/dist/shell/index.d.ts +29 -0
- package/dist/shell/index.js +11 -0
- package/dist/shell/shell.d.ts +150 -0
- package/dist/shell/shell.js +213 -0
- package/dist/shell/state.d.ts +88 -0
- package/dist/shell/state.js +103 -0
- package/dist/shell/storage.d.ts +14 -0
- package/dist/shell/storage.js +41 -0
- package/dist/shell/windows.d.ts +215 -0
- package/dist/shell/windows.js +343 -0
- package/dist/styles/base.d.ts +3 -1
- package/dist/styles/recipes/field.d.ts +10 -6
- package/dist/styles/recipes/field.js +8 -7
- package/dist/styles/recipes/focus.d.ts +7 -3
- package/dist/styles/recipes/rule.d.ts +11 -8
- package/dist/styles/recipes/rule.js +31 -13
- package/dist/styles/recipes/scroll-rail.d.ts +7 -6
- package/dist/styles/recipes/scroll-rail.js +18 -18
- package/dist/styles/recipes/shadow.d.ts +10 -6
- package/dist/styles/recipes/shadow.js +4 -2
- package/dist/styles/recipes/stroke.d.ts +85 -0
- package/dist/styles/recipes/stroke.js +53 -0
- package/dist/styles/recipes/surface.d.ts +8 -4
- package/dist/styles/recipes/surface.js +23 -17
- package/dist/styles/recipes/title-bar.d.ts +7 -0
- package/dist/styles/recipes/title-bar.js +25 -22
- package/dist/styles/recipes/toggle.js +3 -3
- package/dist/window-chrome.d.ts +43 -0
- package/dist/window-chrome.js +13 -0
- package/dist/zoom.d.ts +9 -9
- package/docs/SPEC.md +34 -32
- package/editor/vscode.html-custom-data.json +12 -7
- package/editor/web-types.json +50 -14
- package/package.json +10 -2
|
@@ -6,39 +6,41 @@ import { PlacementController as c, VfPositioned as l, placementIn as u, warnMova
|
|
|
6
6
|
import { vfBase as f } from "../styles/recipes/host.js";
|
|
7
7
|
import { RepeatTileController as p, patternOverride as m, tileGrid as h, vfTileGrid as g } from "../tile-grid.js";
|
|
8
8
|
import { DOTS as _, DOT_SPAN as v, vfDots as y, vfStripes as b } from "../styles/recipes/pattern.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
9
|
+
import { vfStrokeDecls as x, vfStrokeInset as S } from "../styles/recipes/stroke.js";
|
|
10
|
+
import { vfChromeFrame as C } from "../styles/recipes/surface.js";
|
|
11
|
+
import { vfRule as w } from "../styles/recipes/rule.js";
|
|
12
|
+
import { vfTitleBar as T, vfWindowWidgets as E } from "../styles/recipes/title-bar.js";
|
|
13
|
+
import { vfFocus as D } from "../styles/recipes/focus.js";
|
|
14
|
+
import { GridSnapController as O } from "../grid-snap.js";
|
|
15
|
+
import { DocumentListenersController as k } from "../document-listeners.js";
|
|
16
|
+
import { VfSized as A } from "../size.js";
|
|
17
|
+
import { DragController as j } from "../drag.js";
|
|
18
|
+
import { TitleCenterController as M, chromeTitleBar as N, closeBox as P, widgetLabel as F, zoomBox as I } from "../chrome.js";
|
|
19
|
+
import { prefersReducedMotion as L, windowRectFraction as R } from "../motion.js";
|
|
20
|
+
import { paintSelectionRect as z, penPhase as B, xorPenCanvas as V } from "../open-art.js";
|
|
21
|
+
import "../window-chrome.js";
|
|
20
22
|
import "./vf-scroll-area.js";
|
|
21
|
-
import { LitElement as
|
|
22
|
-
import { property as
|
|
23
|
+
import { LitElement as H, css as U, html as W, nothing as G } from "lit";
|
|
24
|
+
import { property as K, query as q, state as J } from "lit/decorators.js";
|
|
23
25
|
//#region src/components/vf-window.ts
|
|
24
|
-
var
|
|
25
|
-
function
|
|
26
|
+
var Y = 80, X = 54;
|
|
27
|
+
function Z(e, t, n) {
|
|
26
28
|
let r = Math.max(t, e);
|
|
27
29
|
return n == null ? r : Math.min(n, r);
|
|
28
30
|
}
|
|
29
|
-
var
|
|
31
|
+
var Q = 24, $ = class extends A(l(H)) {
|
|
30
32
|
constructor(...e) {
|
|
31
|
-
super(...e), this.heading = "", this.active = !0, this.closable = !0, this.zoomable = !1, this.movable = !1, this.outlineDrag = !1, this.resizable = !1, this._hasHeader = !1, this._hasStatus = !1, this.scale = new n(this), this.gridSnap = new
|
|
33
|
+
super(...e), this.heading = "", this.active = !0, this.closable = !0, this.zoomable = !1, this.movable = !1, this.outlineDrag = !1, this.resizable = !1, this._hasHeader = !1, this._hasStatus = !1, this.scale = new n(this), this.gridSnap = new O(this), this.titleCenter = new M(this), this._dotsPattern = "", this.#e = new p(this, {
|
|
32
34
|
getBox: () => this.renderRoot?.querySelector(".vf-dots"),
|
|
33
35
|
getArt: () => this.variant === "utility" && !this._dotsPattern ? _ : null,
|
|
34
36
|
property: "--_vf-dots-tile"
|
|
35
37
|
}), this.#t = (e, t, n) => {
|
|
36
38
|
let r = o(this.offsetWidth, this);
|
|
37
39
|
return {
|
|
38
|
-
x: Math.min(Math.max(e,
|
|
39
|
-
y: Math.min(Math.max(t,
|
|
40
|
+
x: Math.min(Math.max(e, Q - r), n.width - Q),
|
|
41
|
+
y: Math.min(Math.max(t, n.top), Math.max(n.top, n.height - Q))
|
|
40
42
|
};
|
|
41
|
-
}, this._placement = new c(this, (e, t, n) => this.#t(e, t, n)), this._drag = new
|
|
43
|
+
}, this._placement = new c(this, (e, t, n) => this.#t(e, t, n)), this._drag = new j(this, {
|
|
42
44
|
onDragStart: (e) => {
|
|
43
45
|
if (!this.movable || e.button !== 0 || e.composedPath().some((e) => e instanceof HTMLElement && e.classList.contains("box"))) return null;
|
|
44
46
|
this.#S();
|
|
@@ -51,7 +53,7 @@ var X = 24, Z = class extends O(l(B)) {
|
|
|
51
53
|
onDragEnd: (e, t) => {
|
|
52
54
|
this.#y(t);
|
|
53
55
|
}
|
|
54
|
-
}), this._resizeState = null, this.#n = this.attachInternals(), this.#r = null, this.#i = new
|
|
56
|
+
}), this._resizeState = null, this.#n = this.attachInternals(), this.#r = null, this.#i = new k(this, () => [[
|
|
55
57
|
document,
|
|
56
58
|
"pointerdown",
|
|
57
59
|
this.#a,
|
|
@@ -65,7 +67,7 @@ var X = 24, Z = class extends O(l(B)) {
|
|
|
65
67
|
this.#s("finish");
|
|
66
68
|
}, this.#o = (e) => {
|
|
67
69
|
e.key !== "Escape" || !this.#r || (e.preventDefault(), e.stopPropagation(), this.#s("finish"));
|
|
68
|
-
}, this.#f = null, this.#p = new
|
|
70
|
+
}, this.#f = null, this.#p = new k(this, () => [[
|
|
69
71
|
document,
|
|
70
72
|
"keydown",
|
|
71
73
|
this.#m,
|
|
@@ -80,12 +82,12 @@ var X = 24, Z = class extends O(l(B)) {
|
|
|
80
82
|
b,
|
|
81
83
|
y,
|
|
82
84
|
g,
|
|
83
|
-
|
|
84
|
-
x,
|
|
85
|
-
S,
|
|
85
|
+
D,
|
|
86
86
|
C,
|
|
87
87
|
w,
|
|
88
|
-
|
|
88
|
+
T,
|
|
89
|
+
E,
|
|
90
|
+
U`
|
|
89
91
|
:host {
|
|
90
92
|
display: block;
|
|
91
93
|
position: relative;
|
|
@@ -147,12 +149,12 @@ var X = 24, Z = class extends O(l(B)) {
|
|
|
147
149
|
a focused widget out of the tree, so focus can't be dropped to
|
|
148
150
|
<body> by a click on another window. */
|
|
149
151
|
:host(:not([active])) .box {
|
|
150
|
-
|
|
152
|
+
--_vf-stroke-ink: transparent;
|
|
151
153
|
background-color: transparent;
|
|
152
154
|
box-shadow: none;
|
|
153
155
|
}
|
|
154
156
|
:host(:not([active])) .zoom::after {
|
|
155
|
-
|
|
157
|
+
--_vf-stroke-ink: transparent;
|
|
156
158
|
}
|
|
157
159
|
|
|
158
160
|
/* --- Utility (windoid) variant --------------------------------- */
|
|
@@ -195,7 +197,7 @@ var X = 24, Z = class extends O(l(B)) {
|
|
|
195
197
|
a white (invisible, over the patch ring) borderline — rather than the
|
|
196
198
|
big bar's 9×9 sunburst, which cannot land whole on a 5×5 interior. */
|
|
197
199
|
:host([variant='utility']) .box:active {
|
|
198
|
-
|
|
200
|
+
--_vf-stroke-ink: var(--vf-white, #ffffff);
|
|
199
201
|
background-color: var(--vf-black, #000000);
|
|
200
202
|
background-image: none;
|
|
201
203
|
}
|
|
@@ -272,11 +274,19 @@ var X = 24, Z = class extends O(l(B)) {
|
|
|
272
274
|
vertical rail's arrows begin under it. Takes no space until the slot
|
|
273
275
|
is populated. Clipped like the body; a drop-open panel still escapes
|
|
274
276
|
(see the body's note). A div with a class, never a <header>: that
|
|
275
|
-
element maps to a banner landmark (see render()).
|
|
277
|
+
element maps to a banner landmark (see render()).
|
|
278
|
+
|
|
279
|
+
The rule is a stroke, so the header's own box runs under it: the
|
|
280
|
+
slot is the box content lays out, places and clips in, above the
|
|
281
|
+
rule. */
|
|
276
282
|
.header {
|
|
277
|
-
position: relative;
|
|
278
283
|
flex: none;
|
|
279
284
|
background: var(--vf-white, #ffffff);
|
|
285
|
+
}
|
|
286
|
+
.header > slot {
|
|
287
|
+
display: block;
|
|
288
|
+
position: relative;
|
|
289
|
+
height: 100%;
|
|
280
290
|
overflow: hidden;
|
|
281
291
|
}
|
|
282
292
|
.header.empty {
|
|
@@ -296,7 +306,6 @@ var X = 24, Z = class extends O(l(B)) {
|
|
|
296
306
|
.status {
|
|
297
307
|
flex: none;
|
|
298
308
|
display: flex;
|
|
299
|
-
align-items: center;
|
|
300
309
|
height: calc(var(--vf-scale, 1) * var(--vf-status-bar-height, 15px));
|
|
301
310
|
/* The rule is vfRule's vf-rule-top on the element. */
|
|
302
311
|
background: var(--vf-white, #ffffff);
|
|
@@ -305,6 +314,16 @@ var X = 24, Z = class extends O(l(B)) {
|
|
|
305
314
|
white-space: nowrap;
|
|
306
315
|
overflow: hidden;
|
|
307
316
|
}
|
|
317
|
+
/* The rule is a stroke, so the strip's own box runs under it: the slot
|
|
318
|
+
centers the content in the 14px below the rule and clips it there.
|
|
319
|
+
Sideways it still runs to the strip's edges, as before. */
|
|
320
|
+
.status > slot {
|
|
321
|
+
display: flex;
|
|
322
|
+
align-items: center;
|
|
323
|
+
flex: 1 1 auto;
|
|
324
|
+
min-width: 0;
|
|
325
|
+
overflow-y: clip;
|
|
326
|
+
}
|
|
308
327
|
/* Clear the grow box: its 15px cell plus the strip's own 6px inset. */
|
|
309
328
|
:host([resizable]) .status {
|
|
310
329
|
padding-inline-end: calc(var(--vf-scale, 1) * 21px);
|
|
@@ -314,18 +333,20 @@ var X = 24, Z = class extends O(l(B)) {
|
|
|
314
333
|
}
|
|
315
334
|
|
|
316
335
|
/* --- Grow box --------------------------------------------------- */
|
|
336
|
+
/* Flush inside the frame's stroke, which is padding (vfChromeFrame);
|
|
337
|
+
the two nested squares place against the box the same way, the
|
|
338
|
+
lower-right one clear of its top/left stroke. */
|
|
317
339
|
.grow {
|
|
318
340
|
position: absolute;
|
|
319
|
-
right: 0;
|
|
320
|
-
bottom: 0;
|
|
341
|
+
right: ${S(0)};
|
|
342
|
+
bottom: ${S(0)};
|
|
321
343
|
z-index: 1;
|
|
322
344
|
width: calc(var(--vf-scale, 1) * 15px);
|
|
323
345
|
height: calc(var(--vf-scale, 1) * 15px);
|
|
324
|
-
border-top: calc(var(--vf-scale, 1) * 1px) solid var(--vf-black, #000000);
|
|
325
|
-
border-left: calc(var(--vf-scale, 1) * 1px) solid var(--vf-black, #000000);
|
|
326
346
|
background: var(--vf-white, #ffffff);
|
|
327
347
|
touch-action: none;
|
|
328
348
|
cursor: var(--vf-cursor, default);
|
|
349
|
+
${x({ edges: ["top", "left"] })}
|
|
329
350
|
}
|
|
330
351
|
.grow::before {
|
|
331
352
|
content: '';
|
|
@@ -334,17 +355,17 @@ var X = 24, Z = class extends O(l(B)) {
|
|
|
334
355
|
bottom: calc(var(--vf-scale, 1) * 1px);
|
|
335
356
|
width: calc(var(--vf-scale, 1) * 9px);
|
|
336
357
|
height: calc(var(--vf-scale, 1) * 9px);
|
|
337
|
-
|
|
358
|
+
${x()}
|
|
338
359
|
}
|
|
339
360
|
.grow::after {
|
|
340
361
|
content: '';
|
|
341
362
|
position: absolute;
|
|
342
|
-
top:
|
|
343
|
-
left:
|
|
363
|
+
top: ${S(2)};
|
|
364
|
+
left: ${S(2)};
|
|
344
365
|
width: calc(var(--vf-scale, 1) * 7px);
|
|
345
366
|
height: calc(var(--vf-scale, 1) * 7px);
|
|
346
|
-
border: calc(var(--vf-scale, 1) * 1px) solid var(--vf-black, #000000);
|
|
347
367
|
background: var(--vf-white, #ffffff);
|
|
368
|
+
${x()}
|
|
348
369
|
}
|
|
349
370
|
/* Inactive window: the size box empties with the scroll rails (the same
|
|
350
371
|
HIG no-interactive-UX treatment ScrollStateController drives for the
|
|
@@ -356,6 +377,14 @@ var X = 24, Z = class extends O(l(B)) {
|
|
|
356
377
|
`
|
|
357
378
|
];
|
|
358
379
|
}
|
|
380
|
+
get sizeLimits() {
|
|
381
|
+
return {
|
|
382
|
+
minWidth: this.minWidth ?? Y,
|
|
383
|
+
minHeight: this.minHeight ?? X,
|
|
384
|
+
maxWidth: this.maxWidth ?? Infinity,
|
|
385
|
+
maxHeight: this.maxHeight ?? Infinity
|
|
386
|
+
};
|
|
387
|
+
}
|
|
359
388
|
#e;
|
|
360
389
|
willUpdate(e) {
|
|
361
390
|
super.willUpdate(e), this.variant === "utility" && (this._dotsPattern = m(this, "--vf-dots-pattern"));
|
|
@@ -380,7 +409,7 @@ var X = 24, Z = class extends O(l(B)) {
|
|
|
380
409
|
async show(e = {}) {
|
|
381
410
|
this.#s("finish"), this.hidden = !1;
|
|
382
411
|
let t = e.from;
|
|
383
|
-
if (!t ||
|
|
412
|
+
if (!t || L()) return !1;
|
|
384
413
|
let n = {
|
|
385
414
|
closing: !1,
|
|
386
415
|
animations: []
|
|
@@ -396,7 +425,7 @@ var X = 24, Z = class extends O(l(B)) {
|
|
|
396
425
|
async hide(e = {}) {
|
|
397
426
|
let t = this.#r?.closing === !1, n = !this.hidden && !t;
|
|
398
427
|
this.#s(t ? "cancel" : "finish");
|
|
399
|
-
let r = e.to, i = r && n && this.isConnected && !
|
|
428
|
+
let r = e.to, i = r && n && this.isConnected && !L() ? this.#u(r, this.getBoundingClientRect(), !0) : null;
|
|
400
429
|
if (this.hidden = !0, !i) return !1;
|
|
401
430
|
let a = {
|
|
402
431
|
closing: !0,
|
|
@@ -439,8 +468,8 @@ var X = 24, Z = class extends O(l(B)) {
|
|
|
439
468
|
animations: []
|
|
440
469
|
};
|
|
441
470
|
for (let e = 0; e < 14; e++) {
|
|
442
|
-
let t =
|
|
443
|
-
m.position = "absolute", m.left = a(o), m.top = a(s), m.width = a(c), m.height = a(f), m.visibility = "hidden",
|
|
471
|
+
let t = R(e), r = (e, n) => e + Math.trunc((n - e) * t), o = r(l.left, u.left), s = r(l.top, u.top), c = Math.max(1, r(l.right, u.right) - o), f = Math.max(1, r(l.bottom, u.bottom) - s), p = V("window-rect"), m = p.style;
|
|
472
|
+
m.position = "absolute", m.left = a(o), m.top = a(s), m.width = a(c), m.height = a(f), m.visibility = "hidden", z(p, c, f, B(o, s)), i.append(p), d.canvases.push(p);
|
|
444
473
|
let h = n ? 13 - e : e;
|
|
445
474
|
d.animations.push(p.animate([{ visibility: "visible" }, { visibility: "visible" }], {
|
|
446
475
|
delay: h * 17,
|
|
@@ -475,13 +504,13 @@ var X = 24, Z = class extends O(l(B)) {
|
|
|
475
504
|
#_(e, t, n) {
|
|
476
505
|
let r = e.base.x + t, i = e.base.y + n;
|
|
477
506
|
e.canvas.style.left = a(r), e.canvas.style.top = a(i);
|
|
478
|
-
let o =
|
|
479
|
-
o !== e.phase && (e.phase = o,
|
|
507
|
+
let o = B(r, i);
|
|
508
|
+
o !== e.phase && (e.phase = o, z(e.canvas, e.width, e.height, o));
|
|
480
509
|
}
|
|
481
510
|
#v(e) {
|
|
482
511
|
let t = this.#d();
|
|
483
512
|
if (!t) return null;
|
|
484
|
-
let n = r(this), i = t.getBoundingClientRect(), o = Math.max(1, Math.round(e.width / n)), s = Math.max(1, Math.round(e.height / n)), c =
|
|
513
|
+
let n = r(this), i = t.getBoundingClientRect(), o = Math.max(1, Math.round(e.width / n)), s = Math.max(1, Math.round(e.height / n)), c = V("drag-outline"), l = c.style;
|
|
485
514
|
return l.position = "absolute", l.width = a(o), l.height = a(s), t.append(c), {
|
|
486
515
|
canvas: c,
|
|
487
516
|
base: {
|
|
@@ -554,7 +583,7 @@ var X = 24, Z = class extends O(l(B)) {
|
|
|
554
583
|
_onGrowPointerMove(e) {
|
|
555
584
|
let t = this._resizeState;
|
|
556
585
|
if (!t || e.pointerId !== t.pointerId) return;
|
|
557
|
-
let n =
|
|
586
|
+
let n = Z(i(t.baseWidth + o(e.clientX - t.startX, this), this), this.minWidth ?? Y, this.maxWidth), r = Z(i(t.baseHeight + o(e.clientY - t.startY, this), this), this.minHeight ?? X, this.maxHeight);
|
|
558
587
|
(n !== this.width || r !== this.height) && (t.emitPending = !0, t.resized = !0), this.width = n, this.height = r;
|
|
559
588
|
}
|
|
560
589
|
_onGrowPointerEnd(t) {
|
|
@@ -569,42 +598,42 @@ var X = 24, Z = class extends O(l(B)) {
|
|
|
569
598
|
});
|
|
570
599
|
}
|
|
571
600
|
render() {
|
|
572
|
-
return
|
|
601
|
+
return W`
|
|
573
602
|
<div
|
|
574
603
|
class="vf-frame vf-snap"
|
|
575
604
|
part="frame"
|
|
576
605
|
role="group"
|
|
577
|
-
aria-labelledby=${this.heading ? "title" :
|
|
606
|
+
aria-labelledby=${this.heading ? "title" : G}
|
|
578
607
|
>
|
|
579
|
-
${
|
|
580
|
-
${this.closable ?
|
|
608
|
+
${N(this._drag, W`
|
|
609
|
+
${this.closable ? P(F("Close", this.heading), this._onCloseClick) : G}
|
|
581
610
|
<span class="vf-title" part="title" id="title">${this.heading}</span>
|
|
582
|
-
${this.zoomable ?
|
|
611
|
+
${this.zoomable ? I(F("Zoom", this.heading), this._onZoomClick) : G}
|
|
583
612
|
`, this.variant === "utility" ? this._dotsPattern ? "vf-dots vf-dots-token" : "vf-dots" : "vf-stripes", this.variant === "utility" ? this._dotsTexture() : void 0)}
|
|
584
613
|
<div
|
|
585
614
|
class="header vf-rule-bottom ${this._hasHeader ? "" : "empty"}"
|
|
586
615
|
part="header"
|
|
587
|
-
style=${this.headerHeight == null ?
|
|
616
|
+
style=${this.headerHeight == null ? G : `height:${a(this.headerHeight)}`}
|
|
588
617
|
>
|
|
589
618
|
<slot name="header" @slotchange=${this._onHeaderSlotChange}></slot>
|
|
590
619
|
</div>
|
|
591
620
|
<div class="body" part="body">
|
|
592
|
-
${this.scrollbars ?
|
|
621
|
+
${this.scrollbars ? W`
|
|
593
622
|
<vf-scroll-area
|
|
594
623
|
class="edge-scroll"
|
|
595
624
|
axis=${this.scrollbars}
|
|
596
625
|
?corner=${this.resizable && !this._hasStatus}
|
|
597
|
-
label=${this.heading ||
|
|
626
|
+
label=${this.heading || G}
|
|
598
627
|
exportparts="viewport"
|
|
599
628
|
>
|
|
600
629
|
<slot></slot>
|
|
601
630
|
</vf-scroll-area>
|
|
602
|
-
` :
|
|
631
|
+
` : W`<slot></slot>`}
|
|
603
632
|
</div>
|
|
604
633
|
<div class="status vf-rule-top ${this._hasStatus ? "" : "empty"}" part="status-bar">
|
|
605
634
|
<slot name="status" @slotchange=${this._onStatusSlotChange}></slot>
|
|
606
635
|
</div>
|
|
607
|
-
${this.resizable ?
|
|
636
|
+
${this.resizable ? W`
|
|
608
637
|
<div
|
|
609
638
|
class="grow"
|
|
610
639
|
part="grow-box"
|
|
@@ -614,45 +643,45 @@ var X = 24, Z = class extends O(l(B)) {
|
|
|
614
643
|
@pointercancel=${this._onGrowPointerEnd}
|
|
615
644
|
@lostpointercapture=${this._onGrowPointerEnd}
|
|
616
645
|
></div>
|
|
617
|
-
` :
|
|
646
|
+
` : G}
|
|
618
647
|
</div>
|
|
619
648
|
`;
|
|
620
649
|
}
|
|
621
650
|
};
|
|
622
|
-
s([
|
|
651
|
+
s([K({ reflect: !0 })], $.prototype, "variant", void 0), s([K()], $.prototype, "heading", void 0), s([K({
|
|
623
652
|
type: Boolean,
|
|
624
653
|
reflect: !0
|
|
625
|
-
})],
|
|
654
|
+
})], $.prototype, "active", void 0), s([K({
|
|
626
655
|
type: Boolean,
|
|
627
656
|
reflect: !0
|
|
628
|
-
})],
|
|
657
|
+
})], $.prototype, "closable", void 0), s([K({
|
|
629
658
|
type: Boolean,
|
|
630
659
|
reflect: !0
|
|
631
|
-
})],
|
|
660
|
+
})], $.prototype, "zoomable", void 0), s([K({
|
|
632
661
|
type: Boolean,
|
|
633
662
|
reflect: !0
|
|
634
|
-
})],
|
|
663
|
+
})], $.prototype, "movable", void 0), s([K({
|
|
635
664
|
type: Boolean,
|
|
636
665
|
reflect: !0,
|
|
637
666
|
attribute: "outline-drag"
|
|
638
|
-
})],
|
|
667
|
+
})], $.prototype, "outlineDrag", void 0), s([K({
|
|
639
668
|
type: Boolean,
|
|
640
669
|
reflect: !0
|
|
641
|
-
})],
|
|
670
|
+
})], $.prototype, "resizable", void 0), s([K({
|
|
642
671
|
type: Number,
|
|
643
672
|
attribute: "min-width"
|
|
644
|
-
})],
|
|
673
|
+
})], $.prototype, "minWidth", void 0), s([K({
|
|
645
674
|
type: Number,
|
|
646
675
|
attribute: "min-height"
|
|
647
|
-
})],
|
|
676
|
+
})], $.prototype, "minHeight", void 0), s([K({
|
|
648
677
|
type: Number,
|
|
649
678
|
attribute: "max-width"
|
|
650
|
-
})],
|
|
679
|
+
})], $.prototype, "maxWidth", void 0), s([K({
|
|
651
680
|
type: Number,
|
|
652
681
|
attribute: "max-height"
|
|
653
|
-
})],
|
|
682
|
+
})], $.prototype, "maxHeight", void 0), s([K({ reflect: !0 })], $.prototype, "scrollbars", void 0), s([K({
|
|
654
683
|
type: Number,
|
|
655
684
|
attribute: "header-height"
|
|
656
|
-
})],
|
|
685
|
+
})], $.prototype, "headerHeight", void 0), s([J()], $.prototype, "_hasHeader", void 0), s([J()], $.prototype, "_hasStatus", void 0), s([q(".body")], $.prototype, "body", void 0), s([q("vf-scroll-area")], $.prototype, "scrollArea", void 0), $ = s([t("vf-window")], $);
|
|
657
686
|
//#endregion
|
|
658
|
-
export {
|
|
687
|
+
export { $ as VfWindow };
|
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
export { VfDesktop } from './components/vf-desktop.js';
|
|
14
14
|
export { VfWindow } from './components/vf-window.js';
|
|
15
15
|
export type { VfViewportBox, VfWindowHideOptions, VfWindowShowOptions, } from './components/vf-window.js';
|
|
16
|
+
export { windowChrome, WINDOW_MIN_WIDTH, WINDOW_MIN_HEIGHT } from './window-chrome.js';
|
|
17
|
+
export type { VfInsets, VfWindowChromeOptions } from './window-chrome.js';
|
|
16
18
|
export { VfDialog } from './components/vf-dialog.js';
|
|
17
19
|
export { VfSeparator } from './components/vf-separator.js';
|
|
18
20
|
export { VfButton } from './components/vf-button.js';
|
|
@@ -92,7 +94,7 @@ export { CURSOR_ARROW, CURSOR_I_BEAM, CURSOR_CROSSHAIR, CURSOR_WAIT, } from './c
|
|
|
92
94
|
* `static styles` to inherit the kit's type, panel frame, window chrome, focus
|
|
93
95
|
* ring, field well and System 7 scroll-rail skin.
|
|
94
96
|
*/
|
|
95
|
-
export { vfBase, vfBodyDecls, vfDisplay, vfDisplayDecls, vfStaticText, vfPanel, vfChromeFrame, vfModalFrame, vfRule, vfTitleBar, vfWindowWidgets, vfHardShadowDecls, vfStripes, vfDots, vfFocus, vfFocusRing, vfFocusUnderline, vfToggle, vfField, vfScrollRail, vfTileSize, vfTileMaskSize, tileImage, tileRaster, tileRects, tileSpan, TILE_LATTICE, } from './styles/base.js';
|
|
97
|
+
export { vfBase, vfBodyDecls, vfDisplay, vfDisplayDecls, vfStaticText, vfPanel, vfChromeFrame, vfModalFrame, vfRule, vfTitleBar, vfWindowWidgets, vfHardShadow, vfHardShadowDecls, vfStripes, vfDots, vfFocus, vfFocusRing, vfFocusUnderline, vfToggle, vfField, vfScrollRail, vfTileSize, vfTileMaskSize, tileImage, tileRaster, tileRects, tileSpan, TILE_LATTICE, } from './styles/base.js';
|
|
96
98
|
export type { TileRect } from './styles/base.js';
|
|
97
99
|
/**
|
|
98
100
|
* The 1px rule's attribute grammar (`vf-container rule="top bottom"`): the
|
|
@@ -101,6 +103,15 @@ export type { TileRect } from './styles/base.js';
|
|
|
101
103
|
*/
|
|
102
104
|
export { RULE_EDGES, parseRule, ruleClasses } from './styles/base.js';
|
|
103
105
|
export type { RuleEdge } from './styles/base.js';
|
|
106
|
+
/**
|
|
107
|
+
* A 1-bit stroke for a box of your own: `vfStrokeDecls()` draws the line as
|
|
108
|
+
* padding plus an inset shadow, the way every kit frame is drawn, because a
|
|
109
|
+
* CSS `border` of `calc(var(--vf-scale, 1) * 1px)` renders thin under Safari's
|
|
110
|
+
* page zoom. `vfStrokeInset()` offsets a child placed against the box, and
|
|
111
|
+
* `vfStrokeShadow()` restates the painted width alone.
|
|
112
|
+
*/
|
|
113
|
+
export { vfStrokeDecls, vfStrokeInset, vfStrokeShadow } from './styles/base.js';
|
|
114
|
+
export type { VfStrokeOptions } from './styles/base.js';
|
|
104
115
|
/**
|
|
105
116
|
* The exact tiled fill (src/tile-grid.ts): a surface's own art as a CSS
|
|
106
117
|
* repeat of one tile drawn at the display's resolution — `repeatTile()` for
|
package/dist/index.js
CHANGED
|
@@ -14,62 +14,64 @@ import { TILE_LATTICE as R, tileImage as z, tileRaster as B, tileRects as V, til
|
|
|
14
14
|
import { REPEAT_TILE as G, RepeatTileController as K, devicePxAt as q, patternOverride as J, repeatTile as Y, tileGrid as X, vfRepeatTileSize as Z, vfTileGrid as Q } from "./tile-grid.js";
|
|
15
15
|
import { PATTERNS as $, PATTERN_NAMES as ee, PATTERN_SIZE as te, parsePattern as ne, patternHex as re, patternMotif as ie, patternRects as ae } from "./patterns.js";
|
|
16
16
|
import { vfDots as oe, vfStripes as se } from "./styles/recipes/pattern.js";
|
|
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
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
|
|
17
|
+
import { vfHardShadow as ce, vfHardShadowDecls as le } from "./styles/recipes/shadow.js";
|
|
18
|
+
import { vfStrokeDecls as ue, vfStrokeInset as de, vfStrokeShadow as fe } from "./styles/recipes/stroke.js";
|
|
19
|
+
import { vfChromeFrame as pe, vfModalFrame as me, vfPanel as he } from "./styles/recipes/surface.js";
|
|
20
|
+
import { RULE_EDGES as ge, parseRule as _e, ruleClasses as ve, vfRule as ye } from "./styles/recipes/rule.js";
|
|
21
|
+
import { vfTitleBar as be, vfWindowWidgets as xe } from "./styles/recipes/title-bar.js";
|
|
22
|
+
import { vfFocus as Se, vfFocusRing as Ce, vfFocusUnderline as we } from "./styles/recipes/focus.js";
|
|
23
|
+
import { vfToggle as Te } from "./styles/recipes/toggle.js";
|
|
24
|
+
import { vfField as Ee } from "./styles/recipes/field.js";
|
|
25
|
+
import { vfScrollRail as De } from "./styles/recipes/scroll-rail.js";
|
|
26
|
+
import { PatternFillController as Oe, vfPatternFill as ke } from "./pattern-fill.js";
|
|
27
|
+
import { GridSnapController as Ae, requestGridSnap as je } from "./grid-snap.js";
|
|
28
|
+
import { DocumentListenersController as Me } from "./document-listeners.js";
|
|
29
|
+
import { BUTTON_FACE as Ne, BUTTON_FRAME as Pe, RING_FRAME as Fe, RING_HOLE as Ie, RING_INSET as Le, SCREEN_CORNER as Re, steppedCornerClip as ze, steppedRectClip as Be, steppedRingClip as Ve } from "./pixel-frame.js";
|
|
30
|
+
import { VfDesktop as He } from "./components/vf-desktop.js";
|
|
31
|
+
import { VfSized as Ue } from "./size.js";
|
|
32
|
+
import { DragController as We } from "./drag.js";
|
|
33
|
+
import { BLINK_FLIPS as Ge, BLINK_INTERVAL_MS as Ke, DRAG_SLOP_COARSE_PX as qe, DRAG_SLOP_PX as Je, PRESS_HOLD_MS as Ye, RENAME_DELAY_MS as Xe, TAP_PAIR_MS as Ze, TAP_PAIR_SLOP_PX as Qe, WALK_BEAT_MS as $e, WALK_STEP_MS as et, WALK_STEP_PX as tt, WINDOW_RECTS_VISIBLE as nt, WINDOW_RECT_RATIO as rt, WINDOW_RECT_STEPS as it, WINDOW_RECT_STEP_MS as at, dragSlop as ot, prefersReducedMotion as st, runOutlineTravel as ct, runSelectionBlink as lt, windowRectFraction as ut } from "./motion.js";
|
|
34
|
+
import { WINDOW_MIN_HEIGHT as dt, WINDOW_MIN_WIDTH as ft, windowChrome as pt } from "./window-chrome.js";
|
|
35
|
+
import { ScrollStateController as mt } from "./scroll-state.js";
|
|
36
|
+
import { CARET_DOWN as ht, CARET_DOWN_SMALL as gt, CHECKBOX_X as _t, CHECKMARK as vt, RADIO_DOT as yt, RADIO_FACE as bt, RADIO_RING as xt, RADIO_RING_PRESSED as St, SLIDER_THUMB as Ct, SLIDER_THUMB_FACE as wt, STEPPER as Tt, STEPPER_DOWN_FILL as Et, STEPPER_UP_FILL as Dt, glyphSvg as Ot } from "./glyphs.js";
|
|
37
|
+
import { ScrollRailController as kt, renderScrollRail as At } from "./scroll-rail.js";
|
|
38
|
+
import { VfScrollArea as jt } from "./components/vf-scroll-area.js";
|
|
39
|
+
import { VfWindow as Mt } from "./components/vf-window.js";
|
|
40
|
+
import { VfModalDialog as Nt, modalDialogStyles as Pt } from "./modal-dialog.js";
|
|
41
|
+
import { VfDialog as Ft } from "./components/vf-dialog.js";
|
|
42
|
+
import { VfSeparator as It } from "./components/vf-separator.js";
|
|
43
|
+
import { VfFormControl as Lt } from "./form-control.js";
|
|
44
|
+
import { VfButton as Rt } from "./components/vf-button.js";
|
|
45
|
+
import { VfButtonGroup as zt } from "./components/vf-button-group.js";
|
|
46
|
+
import { VfSwatch as Bt } from "./components/vf-swatch.js";
|
|
47
|
+
import { VfToggleControl as Vt } from "./toggle-control.js";
|
|
48
|
+
import { VfCheckbox as Ht } from "./components/vf-checkbox.js";
|
|
49
|
+
import { VfRadio as Ut } from "./components/vf-radio.js";
|
|
50
|
+
import { VfRadioGroup as Wt } from "./components/vf-radio-group.js";
|
|
51
|
+
import { FocusRuleController as Gt, focusModality as Kt, trackFocusModality as qt } from "./focus-modality.js";
|
|
52
|
+
import { VfTextControlBase as Jt } from "./text-control.js";
|
|
53
|
+
import { VfTextField as Yt } from "./components/vf-text-field.js";
|
|
54
|
+
import { VfTextArea as Xt } from "./components/vf-text-area.js";
|
|
55
|
+
import { VfNumberField as Zt } from "./components/vf-number-field.js";
|
|
56
|
+
import { VfOption as Qt } from "./components/vf-option.js";
|
|
57
|
+
import { VfSelect as $t } from "./components/vf-select.js";
|
|
58
|
+
import { TrackWidthController as en } from "./track-width.js";
|
|
59
|
+
import { VfProgressBar as tn } from "./components/vf-progress-bar.js";
|
|
60
|
+
import { VfSlider as nn } from "./components/vf-slider.js";
|
|
61
|
+
import { VfLabel as rn } from "./components/vf-label.js";
|
|
62
|
+
import { VfParagraph as an } from "./components/vf-paragraph.js";
|
|
63
|
+
import { VfImg as on } from "./components/vf-img.js";
|
|
64
|
+
import { VfIcon as sn } from "./components/vf-icon.js";
|
|
65
|
+
import { VfIconField as cn } from "./components/vf-icon-field.js";
|
|
66
|
+
import { VfMenuBar as ln } from "./components/vf-menu-bar.js";
|
|
67
|
+
import { VfMenu as un } from "./components/vf-menu.js";
|
|
68
|
+
import { VfMenuItem as dn } from "./components/vf-menu-item.js";
|
|
69
|
+
import { VfList as fn } from "./components/vf-list.js";
|
|
70
|
+
import { VfListItem as pn } from "./components/vf-list-item.js";
|
|
71
|
+
import { VfFieldset as mn } from "./components/vf-fieldset.js";
|
|
72
|
+
import { VfGrid as hn } from "./components/vf-grid.js";
|
|
73
|
+
import { VfStack as gn } from "./components/vf-stack.js";
|
|
74
|
+
import { VfContainer as _n } from "./components/vf-container.js";
|
|
75
|
+
import { CURSOR_ARROW as vn, CURSOR_CROSSHAIR as yn, CURSOR_I_BEAM as bn, CURSOR_WAIT as xn } from "./cursor-art.js";
|
|
76
|
+
import { applyCursor as Sn } from "./cursor.js";
|
|
77
|
+
export { Ge as BLINK_FLIPS, Ke as BLINK_INTERVAL_MS, Ne as BUTTON_FACE, Pe as BUTTON_FRAME, ht as CARET_DOWN, gt as CARET_DOWN_SMALL, _t as CHECKBOX_X, vt as CHECKMARK, r as CLASSIC_DPI, i as CSS_REFERENCE_DPI, vn as CURSOR_ARROW, yn as CURSOR_CROSSHAIR, bn as CURSOR_I_BEAM, xn as CURSOR_WAIT, qe as DRAG_SLOP_COARSE_PX, Je as DRAG_SLOP_PX, Me as DocumentListenersController, We as DragController, Gt as FocusRuleController, Ae as GridSnapController, $ as PATTERNS, ee as PATTERN_NAMES, te as PATTERN_SIZE, D as PIXEL_GRID_METRICS, Ye as PRESS_HOLD_MS, Oe as PatternFillController, T as PlacementController, yt as RADIO_DOT, bt as RADIO_FACE, xt as RADIO_RING, St as RADIO_RING_PRESSED, Xe as RENAME_DELAY_MS, G as REPEAT_TILE, Fe as RING_FRAME, Ie as RING_HOLE, Le as RING_INSET, ge as RULE_EDGES, K as RepeatTileController, Re as SCREEN_CORNER, Ct as SLIDER_THUMB, wt as SLIDER_THUMB_FACE, Tt as STEPPER, Et as STEPPER_DOWN_FILL, Dt as STEPPER_UP_FILL, a as SYSTEM_PX_IN_CSS_PX, d as ScaleController, kt as ScrollRailController, mt as ScrollStateController, Ze as TAP_PAIR_MS, Qe as TAP_PAIR_SLOP_PX, R as TILE_LATTICE, en as TrackWidthController, k as VF_BODY_FAMILY, M as VF_DISPLAY_FAMILY, Rt as VfButton, zt as VfButtonGroup, Ht as VfCheckbox, _n as VfContainer, He as VfDesktop, Ft as VfDialog, mn as VfFieldset, Lt as VfFormControl, hn as VfGrid, sn as VfIcon, cn as VfIconField, on as VfImg, rn as VfLabel, fn as VfList, pn as VfListItem, un as VfMenu, ln as VfMenuBar, dn as VfMenuItem, Nt as VfModalDialog, Zt as VfNumberField, Qt as VfOption, an as VfParagraph, E as VfPositioned, tn as VfProgressBar, Ut as VfRadio, Wt as VfRadioGroup, jt as VfScrollArea, $t as VfSelect, It as VfSeparator, Ue as VfSized, nn as VfSlider, gn as VfStack, Bt as VfSwatch, Xt as VfTextArea, Jt as VfTextControlBase, Yt as VfTextField, Vt as VfToggleControl, Mt as VfWindow, $e as WALK_BEAT_MS, et as WALK_STEP_MS, tt as WALK_STEP_PX, dt as WINDOW_MIN_HEIGHT, ft as WINDOW_MIN_WIDTH, nt as WINDOW_RECTS_VISIBLE, rt as WINDOW_RECT_RATIO, it as WINDOW_RECT_STEPS, at as WINDOW_RECT_STEP_MS, Sn as applyCursor, f as applyScale, t as defineElement, q as devicePxAt, o as devicePxPerSystemPx, ot as dragSlop, p as effectiveScale, e as emit, Kt as focusModality, m as getScale, s as getZoom, Ot as glyphSvg, Pt as modalDialogStyles, h as onScaleChange, c as onZoomChange, ne as parsePattern, _e as parseRule, re as patternHex, ie as patternMotif, J as patternOverride, ae as patternRects, st as prefersReducedMotion, A as registerBodyFace, N as registerDisplayFace, O as registerEmbeddedFont, At as renderScrollRail, Y as repeatTile, je as requestGridSnap, l as resetZoomBaseline, ve as ruleClasses, ct as runOutlineTravel, lt as runSelectionBlink, g as snapSys, _ as snapToDevicePx, v as snapToSystemPx, ze as steppedCornerClip, Be as steppedRectClip, Ve as steppedRingClip, y as sys, b as sysLength, x as sysLengths, S as systemPxQuantum, X as tileGrid, z as tileImage, B as tileRaster, V as tileRects, H as tileSpan, C as toSys, w as toSysExact, qt as trackFocusModality, u as truePixelRatio, I as vfBase, j as vfBodyDecls, pe as vfChromeFrame, P as vfDisplay, F as vfDisplayDecls, oe as vfDots, n as vfElement, Ee as vfField, Se as vfFocus, Ce as vfFocusRing, we as vfFocusUnderline, ce as vfHardShadow, le as vfHardShadowDecls, me as vfModalFrame, he as vfPanel, ke as vfPatternFill, Z as vfRepeatTileSize, ye as vfRule, De as vfScrollRail, L as vfStaticText, se as vfStripes, ue as vfStrokeDecls, de as vfStrokeInset, fe as vfStrokeShadow, Q as vfTileGrid, U as vfTileMaskSize, W as vfTileSize, be as vfTitleBar, Te as vfToggle, xe as vfWindowWidgets, pt as windowChrome, ut as windowRectFraction };
|
package/dist/pattern-fill.d.ts
CHANGED
|
@@ -47,14 +47,17 @@ export declare class PatternFillController extends RepeatTileController {
|
|
|
47
47
|
* a pattern is resolved (the component's template knows).
|
|
48
48
|
*
|
|
49
49
|
* Painting: the tile the controller wrote, repeated from the padding box's
|
|
50
|
-
* corner at {@link vfRepeatTileSize}, nearest-neighbor.
|
|
51
|
-
*
|
|
52
|
-
* exactly nothing
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
50
|
+
* corner at {@link vfRepeatTileSize}, nearest-neighbor. All of it rides the
|
|
51
|
+
* `vf-patterned` state, the image included, so an unpatterned box paints
|
|
52
|
+
* exactly nothing. The tile's custom property inherits like any other: a
|
|
53
|
+
* box that read it unpatterned would paint the tile of the nearest
|
|
54
|
+
* patterned box around it — a desktop's dither inside a window.
|
|
55
|
+
* `image-rendering` inherits too, so the slot hands `auto` back to slotted
|
|
56
|
+
* content: a consumer's own `<img>` renders as it would anywhere else, and a
|
|
57
|
+
* kit element that wants nearest-neighbor (`vf-img`, a `vf-icon`) says so
|
|
58
|
+
* itself. A page that set `pixelated` on an ancestor gets `auto` inside a
|
|
59
|
+
* patterned box — its own declaration on the child still wins, as
|
|
60
|
+
* everywhere.
|
|
58
61
|
*
|
|
59
62
|
* Forced colors: the image goes, the paper is the remapped Canvas — the
|
|
60
63
|
* desktop's posture, a backdrop being decoration.
|
package/dist/pattern-fill.js
CHANGED
|
@@ -17,12 +17,10 @@ var i = /* @__PURE__ */ new WeakMap(), a = (e) => {
|
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
}, s = r`
|
|
20
|
-
.vf-pattern-fill {
|
|
20
|
+
.vf-pattern-fill.vf-patterned {
|
|
21
21
|
background-image: var(--_vf-pattern-image, none);
|
|
22
22
|
${t}
|
|
23
23
|
background-repeat: repeat;
|
|
24
|
-
}
|
|
25
|
-
.vf-pattern-fill.vf-patterned {
|
|
26
24
|
background-color: var(--vf-white, #fff);
|
|
27
25
|
image-rendering: pixelated;
|
|
28
26
|
}
|
|
@@ -30,7 +28,7 @@ var i = /* @__PURE__ */ new WeakMap(), a = (e) => {
|
|
|
30
28
|
image-rendering: auto;
|
|
31
29
|
}
|
|
32
30
|
@media (forced-colors: active) {
|
|
33
|
-
.vf-pattern-fill {
|
|
31
|
+
.vf-pattern-fill.vf-patterned {
|
|
34
32
|
background-image: none;
|
|
35
33
|
}
|
|
36
34
|
}
|