vintage-frames 0.12.8 → 0.13.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.
@@ -3,17 +3,17 @@ import { ScaleController as t, sysLength as n } from "../scale.js";
3
3
  import r from "../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js";
4
4
  import { VfPositioned as i } from "../position.js";
5
5
  import { vfBase as a } from "../styles/recipes/host.js";
6
- import { tileImage as o, tileRects as s, tileSpan as c, vfTileSize as l } from "../styles/recipes/tile.js";
7
- import { vfHardShadowDecls as u } from "../styles/recipes/shadow.js";
8
- import { vfFocusUnderline as d } from "../styles/recipes/focus.js";
9
- import { TileRasterCache as f, patternOverride as p, tileGrid as m, vfTileGrid as h } from "../tile-grid.js";
6
+ import { tileImage as o, tileRects as s, tileSpan as c } from "../styles/recipes/tile.js";
7
+ import { RepeatTileController as l, patternOverride as u, tileGrid as d, vfRepeatTileSize as f, vfTileGrid as p } from "../tile-grid.js";
8
+ import { vfHardShadowDecls as m } from "../styles/recipes/shadow.js";
9
+ import { vfFocusUnderline as h } from "../styles/recipes/focus.js";
10
10
  import { GridSnapController as g } from "../grid-snap.js";
11
11
  import { VfShadowRoleControl as _ } from "../form-control.js";
12
12
  import { css as v, html as y, unsafeCSS as b } from "lit";
13
13
  import { property as x } from "lit/decorators.js";
14
14
  import { styleMap as S } from "lit/directives/style-map.js";
15
15
  //#region src/components/vf-swatch.ts
16
- var C = 4, w = [
16
+ var C = [
17
17
  [
18
18
  0,
19
19
  0,
@@ -35,9 +35,17 @@ var C = 4, w = [
35
35
  2,
36
36
  "#c0c0c0"
37
37
  ]
38
- ], T = o(C, C, s(w)), E = c(C), D = class extends i(_) {
38
+ ], w = {
39
+ width: 4,
40
+ height: 4,
41
+ rects: C
42
+ }, T = o(w.width, w.height, s(C)), E = c(w.width), D = class extends i(_) {
39
43
  constructor(...e) {
40
- super(...e), this.width = 24, this.height = 18, this.shadow = !1, this.label = "", this.disabled = !1, this.scale = new t(this), this.gridSnap = new g(this), this._pattern = "", this.#e = new f();
44
+ super(...e), this.width = 24, this.height = 18, this.shadow = !1, this.label = "", this.disabled = !1, this.scale = new t(this), this.gridSnap = new g(this), this._pattern = "", this.#e = new l(this, {
45
+ getBox: () => this.renderRoot?.querySelector(".fill"),
46
+ getArt: () => this._pattern ? null : w,
47
+ property: "--_vf-checker-tile"
48
+ });
41
49
  }
42
50
  static {
43
51
  this.shadowRootOptions = {
@@ -48,19 +56,15 @@ var C = 4, w = [
48
56
  static {
49
57
  this.styles = [
50
58
  a,
51
- h,
59
+ p,
52
60
  v`
53
61
  :host {
54
62
  display: inline-flex;
55
63
  cursor: var(--vf-cursor, default);
56
- /* The transparency checker: 2×2-system-px white/#c0c0c0 checks on a
57
- 4×4 motif. Resolved into a private property once so the underlay
58
- rule and the tile grid's art channel below share one definition;
59
- override the public token to retheme the whole tile. What actually
60
- shows is the exact fill rendered into .fill (see src/tile-grid.ts):
61
- the whole-surface raster for the kit checker, or the placed tile
62
- grid at the token's documented 60-px tile geometry for a consumer
63
- override. */
64
+ /* The consumer's checker token, as the art channel of the placed
65
+ tile grid .fill renders for it at the token's documented 60-px
66
+ tile geometry (src/tile-grid.ts). The kit checker is .fill's own
67
+ repeating tile instead. */
64
68
  --_checker: var(--vf-swatch-checker, ${b(T)});
65
69
  /* How deep a shadow this swatch actually casts — nothing unless the
66
70
  shadow attribute is set. Resolved here once so the focus rule below
@@ -88,7 +92,7 @@ var C = 4, w = [
88
92
  /* Opt-in depth: the kit's one hard shadow, painted outside the border
89
93
  box like every raised surface's. */
90
94
  :host([shadow]) button {
91
- ${u}
95
+ ${m}
92
96
  }
93
97
  /* Pressed: the white inset inverts to black — instant 1-bit feedback. */
94
98
  button:active:not(:disabled) {
@@ -112,37 +116,35 @@ var C = 4, w = [
112
116
  }
113
117
  button:focus-visible::after {
114
118
  --vf-focus-underline-offset: calc(-3px - var(--_shadow-depth));
115
- ${d}
119
+ ${h}
116
120
  left: calc(var(--vf-scale, 1) * -1px);
117
121
  right: calc(var(--vf-scale, 1) * -1px);
118
122
  }
119
123
  .fill {
120
124
  display: block;
121
- /* The containing block for the exact fill and the tint. */
125
+ /* The containing block for the token's tile grid and the tint. */
122
126
  position: relative;
123
127
  width: 100%;
124
128
  height: 100%;
125
- /* The CSS-repeated underlay, occluded by the (opaque) kit raster —
126
- belt-and-braces paint only, like vf-desktop's. */
127
- background-image: var(--_checker);
128
- ${l(C)}
129
+ /* The kit checker: the repeating tile the swatch writes
130
+ (src/tile-grid.ts). */
131
+ background-image: var(--_vf-checker-tile, none);
132
+ ${f}
133
+ image-rendering: pixelated;
129
134
  /* Forced colors would delete the color layer and keep the checker,
130
135
  showing "transparent" for every color. The fill is CONTENT, not
131
136
  chrome — the color is the one thing the control exists to show,
132
137
  the case forced-color-adjust's own spec exempts (its example is a
133
- color picker). It inherits to the raster, tiles and tint. Frame,
134
- inset and press feedback stay on the forced palette like every
135
- other control's. */
138
+ color picker). It inherits to the tiles and tint. Frame, inset
139
+ and press feedback stay on the forced palette like every other
140
+ control's. */
136
141
  @media (forced-colors: active) {
137
142
  forced-color-adjust: none;
138
143
  }
139
144
  }
140
- /* A consumer checker token switches the fill to the placed tile grid;
141
- the underlay must not paint beneath it — a translucent consumer tile
142
- would show the underlay's drifting copy of itself. The grid's tiles
143
- resolve the token through the shared private property. */
145
+ /* A consumer checker token switches the fill to the placed tile grid,
146
+ whose tiles resolve the token through the shared private property. */
144
147
  .fill.patterned {
145
- background-image: none;
146
148
  --_vf-tile-image: var(--_checker);
147
149
  }
148
150
  /* The color, painted over the checker so a translucent value reads as
@@ -156,17 +158,14 @@ var C = 4, w = [
156
158
  }
157
159
  #e;
158
160
  willUpdate(e) {
159
- super.willUpdate(e), this._pattern = p(this, "--vf-swatch-checker");
161
+ super.willUpdate(e), this._pattern = u(this, "--vf-swatch-checker");
160
162
  }
161
163
  render() {
162
- let e = Math.max(1, (this.width ?? 24) - 4), t = Math.max(1, (this.height ?? 18) - 4), r = (e) => Math.ceil((e + C) / C) * C, i = this._pattern ? m({
164
+ let e = Math.max(1, (this.width ?? 24) - 4), t = Math.max(1, (this.height ?? 18) - 4), r = this._pattern ? d({
163
165
  cols: Math.ceil(e / E),
164
166
  rows: Math.ceil(t / E),
165
167
  tile: E
166
- }) : y`<span
167
- class="vf-tile-raster"
168
- style="width:${n(r(e))};height:${n(r(t))};background-image:${this.#e.for(C, C, w, r(e), r(t))}"
169
- ></span>`, a = this.color ? y`<span
168
+ }) : null, i = this.color ? y`<span
170
169
  class="tint"
171
170
  style=${S({ "background-color": this.color })}
172
171
  ></span>` : null;
@@ -183,7 +182,7 @@ var C = 4, w = [
183
182
  <span
184
183
  class="fill vf-tile-grid${this._pattern ? " patterned" : ""}"
185
184
  part="fill"
186
- >${i}${a}</span
185
+ >${r}${i}</span
187
186
  >
188
187
  </button>
189
188
  ${this.renderDescription()}
@@ -227,20 +227,17 @@ export declare class VfWindow extends VfWindow_base {
227
227
  private readonly titleCenter;
228
228
  /**
229
229
  * The consumer's `--vf-dots-pattern` override, or `''` for the kit dots —
230
- * which exact-fill path the utility bar takes (src/tile-grid.ts). Re-read
231
- * every update; a runtime token swap wants a `requestUpdate()`.
230
+ * which path the utility bar takes (src/tile-grid.ts). Re-read every
231
+ * update; a runtime token swap wants a `requestUpdate()`.
232
232
  */
233
233
  private _dotsPattern;
234
234
  protected willUpdate(changed: PropertyValues<this>): void;
235
235
  /**
236
- * The exact dots fill rendered into the utility bar's `.vf-dots` layer
236
+ * A consumer `--vf-dots-pattern`'s placed tile grid, rendered into the
237
+ * utility bar's `.vf-dots` layer at the token's documented 30-px geometry
237
238
  * (src/tile-grid.ts): the bar interior is the declared width minus the
238
- * frame borders. The kit raster is ceiled to whole 30-px tiles so a
239
- * grow-box resize only re-encodes the image when it crosses a tile
240
- * boundary — the layer's clip crops the overdraw; a consumer
241
- * `--vf-dots-pattern` renders the placed tile grid at the token's
242
- * documented 30-px geometry instead. A window with no declared width
243
- * renders neither and the layer keeps its CSS-repeated tile.
239
+ * frame borders. A window with no declared width renders none, and the
240
+ * layer repeats the token in CSS instead (`vf-dots-token`).
244
241
  */
245
242
  private _dotsTexture;
246
243
  /**
@@ -4,37 +4,41 @@ import { ScaleController as n, effectiveScale as r, snapSys as i, sysLength as a
4
4
  import s from "../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js";
5
5
  import { PlacementController as c, VfPositioned as l, placementIn as u, warnMovableContract as d } from "../position.js";
6
6
  import { vfBase as f } from "../styles/recipes/host.js";
7
- import { DOT_MOTIF as p, DOT_RECTS as m, DOT_SPAN as h, vfDots as g, vfStripes as _ } from "../styles/recipes/pattern.js";
8
- import { vfChromeFrame as v } from "../styles/recipes/surface.js";
9
- import { vfRule as y } from "../styles/recipes/rule.js";
10
- import { vfTitleBar as b, vfWindowWidgets as x } from "../styles/recipes/title-bar.js";
11
- import { vfFocus as S } from "../styles/recipes/focus.js";
12
- import { TileRasterCache as C, patternOverride as w, tileGrid as T, vfTileGrid as E } from "../tile-grid.js";
13
- import { GridSnapController as D } from "../grid-snap.js";
14
- import { DocumentListenersController as O } from "../document-listeners.js";
15
- import { VfSized as k } from "../size.js";
16
- import { DragController as A } from "../drag.js";
17
- import { TitleCenterController as j, chromeTitleBar as M, closeBox as N, widgetLabel as P, zoomBox as F } from "../chrome.js";
18
- import { prefersReducedMotion as I, windowRectFraction as L } from "../motion.js";
19
- import { paintSelectionRect as R, penPhase as z, xorPenCanvas as B } from "../open-art.js";
7
+ import { RepeatTileController as p, patternOverride as m, tileGrid as h, vfTileGrid as g } from "../tile-grid.js";
8
+ import { DOTS as _, DOT_SPAN as v, vfDots as y, vfStripes as b } from "../styles/recipes/pattern.js";
9
+ import { vfChromeFrame as x } from "../styles/recipes/surface.js";
10
+ import { vfRule as S } from "../styles/recipes/rule.js";
11
+ import { vfTitleBar as C, vfWindowWidgets as w } from "../styles/recipes/title-bar.js";
12
+ import { vfFocus as T } from "../styles/recipes/focus.js";
13
+ import { GridSnapController as E } from "../grid-snap.js";
14
+ import { DocumentListenersController as D } from "../document-listeners.js";
15
+ import { VfSized as O } from "../size.js";
16
+ import { DragController as k } from "../drag.js";
17
+ import { TitleCenterController as A, chromeTitleBar as j, closeBox as M, widgetLabel as N, zoomBox as P } from "../chrome.js";
18
+ import { prefersReducedMotion as F, windowRectFraction as I } from "../motion.js";
19
+ import { paintSelectionRect as L, penPhase as R, xorPenCanvas as z } from "../open-art.js";
20
20
  import "./vf-scroll-area.js";
21
- import { LitElement as V, css as H, html as U, nothing as W } from "lit";
22
- import { property as G, query as K, state as q } from "lit/decorators.js";
21
+ import { LitElement as B, css as V, html as H, nothing as U } from "lit";
22
+ import { property as W, query as G, state as K } from "lit/decorators.js";
23
23
  //#region src/components/vf-window.ts
24
- var J = 80, Y = 54;
25
- function X(e, t, n) {
24
+ var q = 80, J = 54;
25
+ function Y(e, t, n) {
26
26
  let r = Math.max(t, e);
27
27
  return n == null ? r : Math.min(n, r);
28
28
  }
29
- var Z = 24, Q = 8, $ = class extends k(l(V)) {
29
+ var X = 24, Z = class extends O(l(B)) {
30
30
  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 D(this), this.titleCenter = new j(this), this._dotsPattern = "", this.#e = new C(), this.#t = (e, t, n) => {
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 E(this), this.titleCenter = new A(this), this._dotsPattern = "", this.#e = new p(this, {
32
+ getBox: () => this.renderRoot?.querySelector(".vf-dots"),
33
+ getArt: () => this.variant === "utility" && !this._dotsPattern ? _ : null,
34
+ property: "--_vf-dots-tile"
35
+ }), this.#t = (e, t, n) => {
32
36
  let r = o(this.offsetWidth, this);
33
37
  return {
34
- x: Math.min(Math.max(e, Z - r), n.width - Z),
35
- y: Math.min(Math.max(t, 0), Math.max(0, n.height - Z))
38
+ x: Math.min(Math.max(e, X - r), n.width - X),
39
+ y: Math.min(Math.max(t, 0), Math.max(0, n.height - X))
36
40
  };
37
- }, this._placement = new c(this, (e, t, n) => this.#t(e, t, n)), this._drag = new A(this, {
41
+ }, this._placement = new c(this, (e, t, n) => this.#t(e, t, n)), this._drag = new k(this, {
38
42
  onDragStart: (e) => {
39
43
  if (!this.movable || e.button !== 0 || e.composedPath().some((e) => e instanceof HTMLElement && e.classList.contains("box"))) return null;
40
44
  this.#S();
@@ -47,7 +51,7 @@ var Z = 24, Q = 8, $ = class extends k(l(V)) {
47
51
  onDragEnd: (e, t) => {
48
52
  this.#y(t);
49
53
  }
50
- }), this._resizeState = null, this.#n = this.attachInternals(), this.#r = null, this.#i = new O(this, () => [[
54
+ }), this._resizeState = null, this.#n = this.attachInternals(), this.#r = null, this.#i = new D(this, () => [[
51
55
  document,
52
56
  "pointerdown",
53
57
  this.#a,
@@ -61,7 +65,7 @@ var Z = 24, Q = 8, $ = class extends k(l(V)) {
61
65
  this.#s("finish");
62
66
  }, this.#o = (e) => {
63
67
  e.key !== "Escape" || !this.#r || (e.preventDefault(), e.stopPropagation(), this.#s("finish"));
64
- }, this.#f = null, this.#p = new O(this, () => [[
68
+ }, this.#f = null, this.#p = new D(this, () => [[
65
69
  document,
66
70
  "keydown",
67
71
  this.#m,
@@ -73,15 +77,15 @@ var Z = 24, Q = 8, $ = class extends k(l(V)) {
73
77
  static {
74
78
  this.styles = [
75
79
  f,
76
- _,
77
- g,
78
- E,
79
- S,
80
- v,
81
- y,
82
80
  b,
81
+ y,
82
+ g,
83
+ T,
83
84
  x,
84
- H`
85
+ S,
86
+ C,
87
+ w,
88
+ V`
85
89
  :host {
86
90
  display: block;
87
91
  position: relative;
@@ -354,21 +358,16 @@ var Z = 24, Q = 8, $ = class extends k(l(V)) {
354
358
  }
355
359
  #e;
356
360
  willUpdate(e) {
357
- super.willUpdate(e), this.variant === "utility" && (this._dotsPattern = w(this, "--vf-dots-pattern"));
361
+ super.willUpdate(e), this.variant === "utility" && (this._dotsPattern = m(this, "--vf-dots-pattern"));
358
362
  }
359
363
  _dotsTexture() {
360
- if (this.width == null) return;
364
+ if (!this._dotsPattern || this.width == null) return;
361
365
  let e = Math.max(1, this.width - 2);
362
- if (this._dotsPattern) return T({
363
- cols: Math.ceil(e / h),
366
+ return h({
367
+ cols: Math.ceil(e / v),
364
368
  rows: 1,
365
- tile: h
369
+ tile: v
366
370
  });
367
- let t = Math.ceil((e + p) / h) * h, n = Q + p;
368
- return U`<div
369
- class="vf-tile-raster"
370
- style="width:${a(t)};height:${a(n)};background-image:${this.#e.for(p, p, m, t, n)}"
371
- ></div>`;
372
371
  }
373
372
  #t;
374
373
  placementAt(e, t, n) {
@@ -381,7 +380,7 @@ var Z = 24, Q = 8, $ = class extends k(l(V)) {
381
380
  async show(e = {}) {
382
381
  this.#s("finish"), this.hidden = !1;
383
382
  let t = e.from;
384
- if (!t || I()) return !1;
383
+ if (!t || F()) return !1;
385
384
  let n = {
386
385
  closing: !1,
387
386
  animations: []
@@ -397,7 +396,7 @@ var Z = 24, Q = 8, $ = class extends k(l(V)) {
397
396
  async hide(e = {}) {
398
397
  let t = this.#r?.closing === !1, n = !this.hidden && !t;
399
398
  this.#s(t ? "cancel" : "finish");
400
- let r = e.to, i = r && n && this.isConnected && !I() ? this.#u(r, this.getBoundingClientRect(), !0) : null;
399
+ let r = e.to, i = r && n && this.isConnected && !F() ? this.#u(r, this.getBoundingClientRect(), !0) : null;
401
400
  if (this.hidden = !0, !i) return !1;
402
401
  let a = {
403
402
  closing: !0,
@@ -440,8 +439,8 @@ var Z = 24, Q = 8, $ = class extends k(l(V)) {
440
439
  animations: []
441
440
  };
442
441
  for (let e = 0; e < 14; e++) {
443
- let t = L(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 = B("window-rect"), m = p.style;
444
- m.position = "absolute", m.left = a(o), m.top = a(s), m.width = a(c), m.height = a(f), m.visibility = "hidden", R(p, c, f, z(o, s)), i.append(p), d.canvases.push(p);
442
+ let t = I(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 = z("window-rect"), m = p.style;
443
+ m.position = "absolute", m.left = a(o), m.top = a(s), m.width = a(c), m.height = a(f), m.visibility = "hidden", L(p, c, f, R(o, s)), i.append(p), d.canvases.push(p);
445
444
  let h = n ? 13 - e : e;
446
445
  d.animations.push(p.animate([{ visibility: "visible" }, { visibility: "visible" }], {
447
446
  delay: h * 17,
@@ -476,13 +475,13 @@ var Z = 24, Q = 8, $ = class extends k(l(V)) {
476
475
  #_(e, t, n) {
477
476
  let r = e.base.x + t, i = e.base.y + n;
478
477
  e.canvas.style.left = a(r), e.canvas.style.top = a(i);
479
- let o = z(r, i);
480
- o !== e.phase && (e.phase = o, R(e.canvas, e.width, e.height, o));
478
+ let o = R(r, i);
479
+ o !== e.phase && (e.phase = o, L(e.canvas, e.width, e.height, o));
481
480
  }
482
481
  #v(e) {
483
482
  let t = this.#d();
484
483
  if (!t) return null;
485
- 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 = B("drag-outline"), l = c.style;
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 = z("drag-outline"), l = c.style;
486
485
  return l.position = "absolute", l.width = a(o), l.height = a(s), t.append(c), {
487
486
  canvas: c,
488
487
  base: {
@@ -555,7 +554,7 @@ var Z = 24, Q = 8, $ = class extends k(l(V)) {
555
554
  _onGrowPointerMove(e) {
556
555
  let t = this._resizeState;
557
556
  if (!t || e.pointerId !== t.pointerId) return;
558
- let n = X(i(t.baseWidth + o(e.clientX - t.startX, this), this), this.minWidth ?? J, this.maxWidth), r = X(i(t.baseHeight + o(e.clientY - t.startY, this), this), this.minHeight ?? Y, this.maxHeight);
557
+ let n = Y(i(t.baseWidth + o(e.clientX - t.startX, this), this), this.minWidth ?? q, this.maxWidth), r = Y(i(t.baseHeight + o(e.clientY - t.startY, this), this), this.minHeight ?? J, this.maxHeight);
559
558
  (n !== this.width || r !== this.height) && (t.emitPending = !0, t.resized = !0), this.width = n, this.height = r;
560
559
  }
561
560
  _onGrowPointerEnd(t) {
@@ -570,42 +569,42 @@ var Z = 24, Q = 8, $ = class extends k(l(V)) {
570
569
  });
571
570
  }
572
571
  render() {
573
- return U`
572
+ return H`
574
573
  <div
575
574
  class="vf-frame vf-snap"
576
575
  part="frame"
577
576
  role="group"
578
- aria-labelledby=${this.heading ? "title" : W}
577
+ aria-labelledby=${this.heading ? "title" : U}
579
578
  >
580
- ${M(this._drag, U`
581
- ${this.closable ? N(P("Close", this.heading), this._onCloseClick) : W}
579
+ ${j(this._drag, H`
580
+ ${this.closable ? M(N("Close", this.heading), this._onCloseClick) : U}
582
581
  <span class="vf-title" part="title" id="title">${this.heading}</span>
583
- ${this.zoomable ? F(P("Zoom", this.heading), this._onZoomClick) : W}
584
- `, this.variant === "utility" ? "vf-dots" : "vf-stripes", this.variant === "utility" ? this._dotsTexture() : void 0)}
582
+ ${this.zoomable ? P(N("Zoom", this.heading), this._onZoomClick) : U}
583
+ `, this.variant === "utility" ? this._dotsPattern ? "vf-dots vf-dots-token" : "vf-dots" : "vf-stripes", this.variant === "utility" ? this._dotsTexture() : void 0)}
585
584
  <div
586
585
  class="header vf-rule-bottom ${this._hasHeader ? "" : "empty"}"
587
586
  part="header"
588
- style=${this.headerHeight == null ? W : `height:${a(this.headerHeight)}`}
587
+ style=${this.headerHeight == null ? U : `height:${a(this.headerHeight)}`}
589
588
  >
590
589
  <slot name="header" @slotchange=${this._onHeaderSlotChange}></slot>
591
590
  </div>
592
591
  <div class="body" part="body">
593
- ${this.scrollbars ? U`
592
+ ${this.scrollbars ? H`
594
593
  <vf-scroll-area
595
594
  class="edge-scroll"
596
595
  axis=${this.scrollbars}
597
596
  ?corner=${this.resizable && !this._hasStatus}
598
- label=${this.heading || W}
597
+ label=${this.heading || U}
599
598
  exportparts="viewport"
600
599
  >
601
600
  <slot></slot>
602
601
  </vf-scroll-area>
603
- ` : U`<slot></slot>`}
602
+ ` : H`<slot></slot>`}
604
603
  </div>
605
604
  <div class="status vf-rule-top ${this._hasStatus ? "" : "empty"}" part="status-bar">
606
605
  <slot name="status" @slotchange=${this._onStatusSlotChange}></slot>
607
606
  </div>
608
- ${this.resizable ? U`
607
+ ${this.resizable ? H`
609
608
  <div
610
609
  class="grow"
611
610
  part="grow-box"
@@ -615,45 +614,45 @@ var Z = 24, Q = 8, $ = class extends k(l(V)) {
615
614
  @pointercancel=${this._onGrowPointerEnd}
616
615
  @lostpointercapture=${this._onGrowPointerEnd}
617
616
  ></div>
618
- ` : W}
617
+ ` : U}
619
618
  </div>
620
619
  `;
621
620
  }
622
621
  };
623
- s([G({ reflect: !0 })], $.prototype, "variant", void 0), s([G()], $.prototype, "heading", void 0), s([G({
622
+ s([W({ reflect: !0 })], Z.prototype, "variant", void 0), s([W()], Z.prototype, "heading", void 0), s([W({
624
623
  type: Boolean,
625
624
  reflect: !0
626
- })], $.prototype, "active", void 0), s([G({
625
+ })], Z.prototype, "active", void 0), s([W({
627
626
  type: Boolean,
628
627
  reflect: !0
629
- })], $.prototype, "closable", void 0), s([G({
628
+ })], Z.prototype, "closable", void 0), s([W({
630
629
  type: Boolean,
631
630
  reflect: !0
632
- })], $.prototype, "zoomable", void 0), s([G({
631
+ })], Z.prototype, "zoomable", void 0), s([W({
633
632
  type: Boolean,
634
633
  reflect: !0
635
- })], $.prototype, "movable", void 0), s([G({
634
+ })], Z.prototype, "movable", void 0), s([W({
636
635
  type: Boolean,
637
636
  reflect: !0,
638
637
  attribute: "outline-drag"
639
- })], $.prototype, "outlineDrag", void 0), s([G({
638
+ })], Z.prototype, "outlineDrag", void 0), s([W({
640
639
  type: Boolean,
641
640
  reflect: !0
642
- })], $.prototype, "resizable", void 0), s([G({
641
+ })], Z.prototype, "resizable", void 0), s([W({
643
642
  type: Number,
644
643
  attribute: "min-width"
645
- })], $.prototype, "minWidth", void 0), s([G({
644
+ })], Z.prototype, "minWidth", void 0), s([W({
646
645
  type: Number,
647
646
  attribute: "min-height"
648
- })], $.prototype, "minHeight", void 0), s([G({
647
+ })], Z.prototype, "minHeight", void 0), s([W({
649
648
  type: Number,
650
649
  attribute: "max-width"
651
- })], $.prototype, "maxWidth", void 0), s([G({
650
+ })], Z.prototype, "maxWidth", void 0), s([W({
652
651
  type: Number,
653
652
  attribute: "max-height"
654
- })], $.prototype, "maxHeight", void 0), s([G({ reflect: !0 })], $.prototype, "scrollbars", void 0), s([G({
653
+ })], Z.prototype, "maxHeight", void 0), s([W({ reflect: !0 })], Z.prototype, "scrollbars", void 0), s([W({
655
654
  type: Number,
656
655
  attribute: "header-height"
657
- })], $.prototype, "headerHeight", void 0), s([q()], $.prototype, "_hasHeader", void 0), s([q()], $.prototype, "_hasStatus", void 0), s([K(".body")], $.prototype, "body", void 0), s([K("vf-scroll-area")], $.prototype, "scrollArea", void 0), $ = s([t("vf-window")], $);
656
+ })], Z.prototype, "headerHeight", void 0), s([K()], Z.prototype, "_hasHeader", void 0), s([K()], Z.prototype, "_hasStatus", void 0), s([G(".body")], Z.prototype, "body", void 0), s([G("vf-scroll-area")], Z.prototype, "scrollArea", void 0), Z = s([t("vf-window")], Z);
658
657
  //#endregion
659
- export { $ as VfWindow };
658
+ export { Z as VfWindow };
package/dist/index.d.ts CHANGED
@@ -102,16 +102,17 @@ export type { TileRect } from './styles/base.js';
102
102
  export { RULE_EDGES, parseRule, ruleClasses } from './styles/base.js';
103
103
  export type { RuleEdge } from './styles/base.js';
104
104
  /**
105
- * The exact tiled fill (TILE-GRID-PLAN.md): a surface's own art as one
106
- * whole-surface raster (`tileRaster` + the `vf-tile-raster` rules), and a
107
- * consumer pattern token as a flat grid of absolutely placed tiles
108
- * (`tileGrid()`), each box paint-snapped to the device grid on its own — so
109
- * the fill stays 1-bit at the zoom-minted scales a CSS `background-repeat`
110
- * length cannot hold. `vfTileGrid` carries the container and tile rules;
111
- * `patternOverride` reads whether a token is in play; `TileRasterCache`
112
- * memoizes the encoded raster against its size.
105
+ * The exact tiled fill (src/tile-grid.ts): a surface's own art as a CSS
106
+ * repeat of one tile drawn at the display's resolution — `repeatTile()` for
107
+ * the image at `devicePxAt()` a box, `vfRepeatTileSize` for its
108
+ * `background-size`, `RepeatTileController` to keep a box's tile current —
109
+ * and a consumer pattern token as a flat grid of absolutely placed tiles
110
+ * (`tileGrid()`, with `vfTileGrid`'s container and tile rules), each box
111
+ * paint-snapped to the device grid on its own. `patternOverride` reads
112
+ * whether a token is in play.
113
113
  */
114
- export { vfTileGrid, tileGrid, patternOverride, TileRasterCache } from './tile-grid.js';
114
+ export { vfTileGrid, tileGrid, patternOverride, REPEAT_TILE, vfRepeatTileSize, repeatTile, devicePxAt, RepeatTileController, } from './tile-grid.js';
115
+ export type { TileMotif, RepeatTileOptions } from './tile-grid.js';
115
116
  /**
116
117
  * The standard pattern set — the 38 MacPaint fills as 8-byte QuickDraw
117
118
  * patterns (`PATTERNS`, named; `PATTERN_NAMES` in palette order), the