vintage-frames 0.4.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.
@@ -4,39 +4,26 @@ import { ScaleController as n, effectiveScale as r, sysLength as i } from "../sc
4
4
  import a from "../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js";
5
5
  import { VfPositioned as o } from "../position.js";
6
6
  import { vfBase as s } from "../styles/recipes/host.js";
7
- import { tileImage as c, tileRaster as l, tileRects as u, tileSpan as d, vfTileSize as f } from "../styles/recipes/tile.js";
8
- import { TileRasterCache as p, patternOverride as m, tileGrid as h, vfTileGrid as g } from "../tile-grid.js";
9
- import { GridSnapController as _ } from "../grid-snap.js";
10
- import { DocumentListenersController as v } from "../document-listeners.js";
11
- import { SCREEN_CORNER as y, steppedCornerClip as b } from "../pixel-frame.js";
12
- import { LitElement as x, css as S, html as C, unsafeCSS as w } from "lit";
13
- import { property as T, queryAssignedElements as E } from "lit/decorators.js";
7
+ import { tileImage as c, tileRects as l, tileSpan as u } from "../styles/recipes/tile.js";
8
+ import { PATTERNS as d, parsePattern as f, patternMotif as p } from "../patterns.js";
9
+ import { patternOverride as m, tileGrid as h, vfTileGrid as g } from "../tile-grid.js";
10
+ import { PatternFillController as _, vfPatternFill as v } from "../pattern-fill.js";
11
+ import { GridSnapController as y } from "../grid-snap.js";
12
+ import { DocumentListenersController as b } from "../document-listeners.js";
13
+ import { SCREEN_CORNER as x, steppedCornerClip as S } from "../pixel-frame.js";
14
+ import { LitElement as C, css as w, html as T, unsafeCSS as E } from "lit";
15
+ import { property as D, query as O, queryAssignedElements as k } from "lit/decorators.js";
14
16
  //#region src/components/vf-desktop.ts
15
- var D = 1e6, O = 512, k = 342, A = 2, j = [
16
- [
17
- 0,
18
- 0,
19
- 2,
20
- 2,
21
- "#ffffff"
22
- ],
23
- [
24
- 0,
25
- 0,
26
- 1,
27
- 1,
28
- "#000000"
29
- ],
30
- [
31
- 1,
32
- 1,
33
- 1,
34
- 1,
35
- "#000000"
36
- ]
37
- ], M = c(A, A, u(j)), N = l(A, A, j), P = d(A), F = class extends o(x) {
17
+ var A = 1e6, j = 512, M = 342, N = "gray-50", P = p(d[N], "#000000", "#ffffff"), F = c(P.width, P.height, l(P.rects)), I = u(P.width), L = class extends o(C) {
38
18
  constructor(...e) {
39
- super(...e), this.width = O, this.height = k, this.bezel = 0, this.scale = new n(this), this.gridSnap = new _(this), this._pattern = "", this.#e = new p(), this._zCounter = 0, this._activeWindow = null, this._deactivated = !1, this._awaitingUpgrade = !1, this._pointerGesture = !1, this._restoringFocus = !1, this._gestureEnd = new v(this, () => [[
19
+ super(...e), this.width = j, this.height = M, this.bezel = 0, this.pattern = N, this.scale = new n(this), this.gridSnap = new y(this), this._token = "", this._desktopPattern = d[N], this.#e = !1, this.patternFill = new _(this, {
20
+ getBox: () => this.screen,
21
+ getPattern: () => this._token ? null : this._desktopPattern,
22
+ getSize: () => ({
23
+ width: this.width ?? j,
24
+ height: this.height ?? M
25
+ })
26
+ }), this._zCounter = 0, this._activeWindow = null, this._deactivated = !1, this._awaitingUpgrade = !1, this._pointerGesture = !1, this._restoringFocus = !1, this._gestureEnd = new b(this, () => [[
40
27
  document,
41
28
  "pointerup",
42
29
  this._onGestureEnd,
@@ -62,7 +49,8 @@ var D = 1e6, O = 512, k = 342, A = 2, j = [
62
49
  this.styles = [
63
50
  s,
64
51
  g,
65
- S`
52
+ v,
53
+ w`
66
54
  :host {
67
55
  display: block;
68
56
  position: relative;
@@ -88,69 +76,48 @@ var D = 1e6, O = 512, k = 342, A = 2, j = [
88
76
  raster's corrected edge, not the host's possibly-fractional one. */
89
77
  overflow: hidden;
90
78
  /* An isolated stacking context, so the tile grid's z-index: -1 below
91
- resolves HERE — above this element's own underlay background, under
92
- every slotted child. Without it the negative z-index would resolve
79
+ resolves HERE — above this element's own background, under every
80
+ slotted child. Without it the negative z-index would resolve
93
81
  against some ancestor stacking context and paint the tiles beneath
94
82
  this background. */
95
83
  isolation: isolate;
84
+ /* The base color. Under the kit pattern it is covered by the fill's
85
+ opaque white paper (vfPatternFill) — the authentic black-on-white
86
+ dither — and shows only through a consumer token's translucent
87
+ tile (see the --vf-desktop note in the class doc). The pattern
88
+ itself is this element's own background, written by the
89
+ PatternFillController: one whole-surface raster at one image px
90
+ per system px, magnified nearest-neighbor, which is what keeps it
91
+ 1-bit at the zoom-minted scales a repeating fill cannot hold
92
+ (src/tile-grid.ts, src/pattern-fill.ts). */
96
93
  background-color: var(--vf-desktop, #808080);
97
- /* Classic 50% checker dither as a crisp 1-bit SVG tile — a 2×2 motif
98
- painting an opaque white base with two black pixels on the diagonal.
99
- Black-on-white is the authentic System 7 dither, so the tile is
100
- deliberately opaque and covers the background-color above (see the
101
- --vf-desktop note in the class doc). Scaled with --vf-scale so each
102
- system pixel lands on whole device pixels; unlike a conic-gradient
103
- (whose hard stops the browser feathers into a blur), the SVG rects are
104
- pixel-exact.
105
-
106
- This CSS-repeated layer is the UNDERLAY: what actually shows is the
107
- whole-surface raster (or, under a consumer pattern token, the
108
- placed tile grid) rendered over it — see src/tile-grid.ts — which
109
- is what keeps the dither 1-bit at the zoom-minted scales a
110
- repeating fill cannot hold. The declaration stays as
111
- belt-and-braces paint beneath the (opaque) kit fill. Override the
112
- whole tile via --vf-desktop-pattern — the tile grid renders the
113
- same token at the same documented geometry. */
114
- background-image: var(--vf-desktop-pattern, ${w(M)});
115
- ${f(A)}
116
- /* Forced colors: the checker is opaque literal white-and-black (a
117
- preserved url() tile), which ignores a dark theme entirely. A
118
- backdrop is decoration, and high-contrast mode is a request for
119
- less of that — so the desktop goes flat Canvas (the forced
120
- background-color) rather than re-dithering in the user's pair.
121
- Deliberate; the windoid dot bar, which carries meaning, IS
122
- re-inked (see vfDots). */
94
+ /* Forced colors: the pattern is literal black ink on white, which
95
+ ignores a dark theme entirely. A backdrop is decoration, and
96
+ high-contrast mode is a request for less of that — so the desktop
97
+ goes flat Canvas (the forced background-color) rather than
98
+ re-dithering in the user's pair. Deliberate; the windoid dot bar,
99
+ which carries meaning, IS re-inked (see vfDots). The recipe drops
100
+ the image too; stated here as well so the posture lives with the
101
+ surface. */
123
102
  @media (forced-colors: active) {
124
103
  background-image: none;
125
104
  }
126
105
  }
127
- /* With a consumer pattern token in play the exact fill is the placed
128
- tile grid, and the CSS-repeated underlay must not paint: a
129
- translucent consumer tile would show the underlay's *drifting* copy
130
- of the same art through itself. The base color stays that is the
131
- layer translucent art composites over, as documented. */
132
- .screen.patterned {
133
- background-image: none;
134
- }
135
- /* The dither's exact fill — the whole-surface raster (kit art) or the
136
- placed tile grid (consumer art) — kept under every slotted child
137
- (menu bar, windows) by the negative z-index the .screen isolation
138
- scopes. The grid's tiles resolve the pattern token stated once here
139
- rather than per tile. */
140
- .screen > .vf-tile-grid,
141
- .screen > .vf-tile-raster {
106
+ /* A consumer token's exact fill the placed tile grid kept under
107
+ every slotted child (menu bar, windows) by the negative z-index the
108
+ .screen isolation scopes. The grid's tiles resolve the token stated
109
+ once here rather than per tile; the fallback is the kit dither for
110
+ the record, never reached (the grid renders only under a set token). */
111
+ .screen > .vf-tile-grid {
112
+ position: absolute;
113
+ inset: 0;
142
114
  z-index: -1;
143
- /* Forced colors: hidden with the underlay's tile, same posture — the
144
- desktop goes flat Canvas (a backdrop is decoration). */
115
+ --_vf-tile-image: var(--vf-desktop-pattern, ${E(F)});
116
+ /* Forced colors: hidden with the pattern, same posture. */
145
117
  @media (forced-colors: active) {
146
118
  display: none;
147
119
  }
148
120
  }
149
- .screen > .vf-tile-grid {
150
- position: absolute;
151
- inset: 0;
152
- --_vf-tile-image: var(--vf-desktop-pattern, ${w(N)});
153
- }
154
121
  /* Bezeled, the screen is inset by exactly one bezel width. The host
155
122
  is always the declared screen + 2×bezel (written in updated()), so
156
123
  this subtraction is exact and the raster is whole by construction —
@@ -176,19 +143,19 @@ var D = 1e6, O = 512, k = 342, A = 2, j = [
176
143
  .corner {
177
144
  position: absolute;
178
145
  top: 0;
179
- width: calc(var(--vf-scale, 1) * ${y[0]}px);
180
- height: calc(var(--vf-scale, 1) * ${y.length}px);
146
+ width: calc(var(--vf-scale, 1) * ${x[0]}px);
147
+ height: calc(var(--vf-scale, 1) * ${x.length}px);
181
148
  background: var(--vf-black, #000);
182
149
  pointer-events: none;
183
150
  z-index: 2147483647;
184
151
  }
185
152
  .corner.tl {
186
153
  left: 0;
187
- clip-path: ${w(b(y, "left"))};
154
+ clip-path: ${E(S(x, "left"))};
188
155
  }
189
156
  .corner.tr {
190
157
  right: 0;
191
- clip-path: ${w(b(y, "right"))};
158
+ clip-path: ${E(S(x, "right"))};
192
159
  }
193
160
  `
194
161
  ];
@@ -221,7 +188,7 @@ var D = 1e6, O = 512, k = 342, A = 2, j = [
221
188
  }
222
189
  _restack(e) {
223
190
  let t = this._isUtility(e);
224
- e.style.zIndex = String(++this._zCounter + (t ? D : 0)), t || this._setActive(e);
191
+ e.style.zIndex = String(++this._zCounter + (t ? A : 0)), t || this._setActive(e);
225
192
  }
226
193
  _requestDomSync() {
227
194
  this._pointerGesture || this._syncDomOrder();
@@ -238,7 +205,7 @@ var D = 1e6, O = 512, k = 342, A = 2, j = [
238
205
  let e = this._windows, t = null;
239
206
  for (let n of e) if (!n.style.zIndex) {
240
207
  let e = this._isUtility(n);
241
- n.style.zIndex = String(++this._zCounter + (e ? D : 0)), e || (t = n);
208
+ n.style.zIndex = String(++this._zCounter + (e ? A : 0)), e || (t = n);
242
209
  }
243
210
  let n = e.filter((e) => !this._isUtility(e)), r = this._activeWindow && n.includes(this._activeWindow) ? this._activeWindow : null;
244
211
  this._setActive(t ?? r ?? (this._deactivated ? null : this._topmost(n))), customElements.get("vf-window") || this._normalizeAfterUpgrade();
@@ -283,37 +250,40 @@ var D = 1e6, O = 512, k = 342, A = 2, j = [
283
250
  r && n instanceof HTMLElement && n.isConnected && this._deepActiveElement() !== n && (this._restoringFocus = !0, n.focus({ preventScroll: !0 }), this._restoringFocus = !1);
284
251
  }
285
252
  willUpdate(e) {
286
- super.willUpdate(e), this._pattern = m(this, "--vf-desktop-pattern");
253
+ if (super.willUpdate(e), this._token = m(this, "--vf-desktop-pattern"), e.has("pattern")) {
254
+ let e = f(this.pattern);
255
+ e === null && this.pattern?.trim() && !this.#e && (this.#e = !0, console.warn(`vf-desktop: unknown pattern "${this.pattern}" — a library name (docs/PATTERNS.md) or sixteen hex digits. Keeping ${N}.`)), this._desktopPattern = e ?? d[N];
256
+ }
287
257
  }
288
258
  updated(e) {
289
259
  if (e.has("bezel") && (this.bezel > 0 ? this.style.setProperty("--vf-desktop-bezel", i(this.bezel)) : this.style.removeProperty("--vf-desktop-bezel")), e.has("width") || e.has("height") || e.has("bezel")) {
290
- let e = this.width ?? O, t = this.height ?? k;
260
+ let e = this.width ?? j, t = this.height ?? M;
291
261
  this.style.width = i(e + 2 * this.bezel), this.style.height = i(t + 2 * this.bezel);
292
262
  }
293
263
  }
294
264
  render() {
295
- let e = this.width ?? O, t = this.height ?? k, n = Math.ceil(e / P), r = Math.ceil(t / P), a = this._pattern ? C`<div class="vf-tile-grid">
265
+ let e = this.width ?? j, t = this.height ?? M, n = this._token ? T`<div class="vf-tile-grid">
296
266
  ${h({
297
- cols: n,
298
- rows: r,
299
- tile: P
267
+ cols: Math.ceil(e / I),
268
+ rows: Math.ceil(t / I),
269
+ tile: I
300
270
  })}
301
- </div>` : C`<div
302
- class="vf-tile-raster"
303
- style="width:${i(n * P)};height:${i(r * P)};background-image:${this.#e.for(A, A, j, n * P, r * P)}"
304
- ></div>`;
305
- return C`
271
+ </div>` : null;
272
+ return T`
306
273
  <div class=${this.bezel > 0 ? "desktop vf-snap bezeled" : "desktop vf-snap"}>
307
- <div class="screen${this._pattern ? " patterned" : ""}" part="desktop">
308
- ${a}
274
+ <div
275
+ class="screen vf-pattern-fill${this._token ? "" : " vf-patterned"}"
276
+ part="desktop"
277
+ >
278
+ ${n}
309
279
  <slot @slotchange=${this._onSlotChange}></slot>
310
- ${this.bezel > 0 ? C`<div class="corner tl"></div>
280
+ ${this.bezel > 0 ? T`<div class="corner tl"></div>
311
281
  <div class="corner tr"></div>` : null}
312
282
  </div>
313
283
  </div>
314
284
  `;
315
285
  }
316
286
  };
317
- a([T({ type: Number })], F.prototype, "width", void 0), a([T({ type: Number })], F.prototype, "height", void 0), a([T({ type: Number })], F.prototype, "bezel", void 0), a([E({ selector: "vf-window" })], F.prototype, "_windows", void 0), F = a([t("vf-desktop")], F);
287
+ a([D({ type: Number })], L.prototype, "width", void 0), a([D({ type: Number })], L.prototype, "height", void 0), a([D({ type: Number })], L.prototype, "bezel", void 0), a([D()], L.prototype, "pattern", void 0), a([k({ selector: "vf-window" })], L.prototype, "_windows", void 0), a([O(".screen")], L.prototype, "screen", void 0), L = a([t("vf-desktop")], L);
318
288
  //#endregion
319
- export { F as VfDesktop };
289
+ export { L as VfDesktop };
@@ -4,19 +4,21 @@ import './vf-button-group.js';
4
4
  * `<vf-dialog>` — the System 7 modal dialog shell.
5
5
  *
6
6
  * Two chromes, one modal lifecycle (native `<dialog>` for top-layer rendering
7
- * and focus trapping, with a fully transparent backdrop — no dimming):
7
+ * and focus trapping, with a fully transparent backdrop — no dimming). Both
8
+ * are the same dBoxProc double frame — 1px outer rule, 2px gap, 2px inner
9
+ * band, no shadow ({@link vfModalFrame}):
8
10
  *
9
- * - **Default:** a striped title bar with a centered title over a white body —
10
- * the movable-modal look. Drag the title bar to move it. `closable` adds the
11
- * standard close box (left of the bar) the HIG's own figures disagree on
12
- * whether a movable modal carries one (Figure 5-1 says yes, Figure 6-1 and
13
- * the Chapter 6 text say no), so the component enables either reading rather
14
- * than enforcing one.
15
- * - **`frame="plain"`:** the classic dBoxProc modal-dialog frame — 1px outer
16
- * border, 2px gap, 2px inner band, no shadow, no title bar — and immovable,
17
- * like the original. A `heading` renders as a centered display-face heading
18
- * at the top of the body (the reference art's "Dialog title"); `closable` is
19
- * ignored, there being no bar to carry the widget.
11
+ * - **Default:** the movable modal (movableDBoxProc) the striped title bar
12
+ * set into the top of that frame, with a centered title over a white body.
13
+ * Drag the title bar to move it. `closable` adds the standard close box
14
+ * (left of the bar) the HIG's own figures disagree on whether a movable
15
+ * modal carries one (Figure 5-1 says yes, Figure 6-1 and the Chapter 6 text
16
+ * say no), so the component enables either reading rather than enforcing
17
+ * one.
18
+ * - **`frame="plain"`:** the modal dialog box — the bare frame, no title bar —
19
+ * and immovable, like the original. A `heading` renders as a centered
20
+ * display-face heading at the top of the body (the reference art's "Dialog
21
+ * title"); `closable` is ignored, there being no bar to carry the widget.
20
22
  *
21
23
  * Open it with `show()` (or set the `open` attribute/property); close with
22
24
  * `close()`. Escape closes it and fires `vf-close` with
@@ -27,7 +29,8 @@ import './vf-button-group.js';
27
29
  * @slot buttons - Optional action buttons. Rendered as a bottom-right
28
30
  * `vf-button-group` (equal-width, faces aligned); the footer only takes
29
31
  * space when the slot is populated.
30
- * @csspart frame - The outer chrome frame (striped-bar or plain).
32
+ * @csspart frame - The outer frame (the double frame's 1px rule; the bar and
33
+ * the inner band sit inside it).
31
34
  * @csspart title-bar - The striped title bar (default chrome only).
32
35
  * @csspart title - The centered title patch (or the plain-frame heading).
33
36
  * @csspart close-box - The close widget (`closable`, default chrome only).
@@ -76,8 +79,9 @@ export declare class VfDialog extends VfModalDialog {
76
79
  */
77
80
  closable: boolean;
78
81
  /**
79
- * Frame chrome. Omit for the striped title bar (movable modal); `'plain'`
80
- * for the immovable dBoxProc double frame with no bar (modal dialog box).
82
+ * Frame chrome. Omit for the movable modal (the double frame with the
83
+ * striped title bar set into it); `'plain'` for the immovable modal dialog
84
+ * box (the bare double frame, no bar).
81
85
  */
82
86
  frame?: 'plain';
83
87
  /** Whether the `buttons` slot has assigned content (drives the footer). */
@@ -4,23 +4,23 @@ import r from "../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js
4
4
  import { vfDisplayDecls as i } from "../styles/recipes/display-face.js";
5
5
  import { vfBase as a } from "../styles/recipes/host.js";
6
6
  import { vfStripes as o } from "../styles/recipes/pattern.js";
7
- import { vfChromeFrame as s, vfModalFrame as c } from "../styles/recipes/surface.js";
8
- import { vfTitleBar as l, vfWindowWidgets as u } from "../styles/recipes/title-bar.js";
9
- import { vfFocus as d, vfFocusRing as f } from "../styles/recipes/focus.js";
10
- import { vfScrollRail as p } from "../styles/recipes/scroll-rail.js";
11
- import { DragController as m } from "../drag.js";
12
- import { TitleCenterController as h, chromeTitleBar as g, closeBox as _, widgetLabel as v } from "../chrome.js";
13
- import { ScrollStateController as y } from "../scroll-state.js";
14
- import { ScrollRailController as b, renderScrollRail as x } from "../scroll-rail.js";
15
- import { VfModalDialog as S, modalDialogStyles as C } from "../modal-dialog.js";
7
+ import { vfModalFrame as s } from "../styles/recipes/surface.js";
8
+ import { vfTitleBar as c, vfWindowWidgets as l } from "../styles/recipes/title-bar.js";
9
+ import { vfFocus as u, vfFocusRing as d } from "../styles/recipes/focus.js";
10
+ import { vfScrollRail as f } from "../styles/recipes/scroll-rail.js";
11
+ import { DragController as p } from "../drag.js";
12
+ import { TitleCenterController as m, chromeTitleBar as h, closeBox as g, widgetLabel as _ } from "../chrome.js";
13
+ import { ScrollStateController as v } from "../scroll-state.js";
14
+ import { ScrollRailController as y, renderScrollRail as b } from "../scroll-rail.js";
15
+ import { VfModalDialog as x, modalDialogStyles as S } from "../modal-dialog.js";
16
16
  import "./vf-button-group.js";
17
- import { css as w, html as T, nothing as E } from "lit";
18
- import { property as D, query as O, state as k } from "lit/decorators.js";
19
- import { styleMap as A } from "lit/directives/style-map.js";
17
+ import { css as C, html as w, nothing as T } from "lit";
18
+ import { property as E, query as D, state as O } from "lit/decorators.js";
19
+ import { styleMap as k } from "lit/directives/style-map.js";
20
20
  //#region src/components/vf-dialog.ts
21
- var j = class extends S {
21
+ var A = class extends x {
22
22
  constructor(...e) {
23
- super(...e), this._drag = new m(this, {
23
+ super(...e), this._drag = new p(this, {
24
24
  onDragStart: (e) => {
25
25
  if (e.button !== 0 || e.composedPath().some((e) => e instanceof HTMLElement && e.classList.contains("box"))) return null;
26
26
  let r = this._dialog;
@@ -36,34 +36,32 @@ var j = class extends S {
36
36
  };
37
37
  },
38
38
  onDrag: (e, t) => this.placeAt(e, t)
39
- }), this._titleCenter = new h(this), this.heading = "", this.label = "", this.closable = !1, this._hasButtons = !1, this._scrollable = !1, this._scrollState = new y(this, () => this._content, void 0, (e) => {
39
+ }), this._titleCenter = new m(this), this.heading = "", this.label = "", this.closable = !1, this._hasButtons = !1, this._scrollable = !1, this._scrollState = new v(this, () => this._content, void 0, (e) => {
40
40
  this._scrollable = e.y;
41
- }), this._rail = new b(this, { getScroll: () => this._content });
41
+ }), this._rail = new y(this, { getScroll: () => this._content });
42
42
  }
43
43
  static {
44
44
  this.styles = [
45
45
  a,
46
46
  o,
47
- d,
47
+ u,
48
48
  s,
49
49
  c,
50
50
  l,
51
- u,
52
- p,
53
- C,
54
- w`
51
+ f,
52
+ S,
53
+ C`
55
54
  :host {
56
55
  display: contents;
57
56
  }
58
57
  /* A declared height lands on the <dialog> (dialogSize), so the frame has
59
- to be told to fill it — vfChromeFrame is skin only. Both chromes are
60
- full-height flex columns for the same reason vf-window's is: the body
58
+ to be told to fill it — vfModalFrame is skin only. The frame is a
59
+ full-height flex column for the same reason vf-window's is: the body
61
60
  takes the slack the title bar doesn't. The frame is the flex child of
62
61
  the <dialog> itself (modalDialogStyles), not a height: 100% block —
63
62
  a percentage can't resolve against the undeclared-height dialog that
64
63
  only the UA's dialog:modal max-height caps, and that spill was
65
64
  exactly how a tall modal used to strand its buttons off-screen. */
66
- .vf-frame,
67
65
  .vf-modal-frame {
68
66
  display: flex;
69
67
  flex-direction: column;
@@ -182,7 +180,7 @@ var j = class extends S {
182
180
  treatment as vf-scroll-area's viewport. */
183
181
  .content:focus-visible {
184
182
  --vf-focus-offset: -2px;
185
- ${f}
183
+ ${d}
186
184
  }
187
185
  /* The plain frame's heading: centered chrome type at the top of the
188
186
  body, the way dBoxProc dialogs drew their title in content (see
@@ -214,21 +212,21 @@ var j = class extends S {
214
212
  this.close();
215
213
  }
216
214
  render() {
217
- let e = !this.label && this.heading !== "", t = this.frame === "plain", n = T`
215
+ let e = !this.label && this.heading !== "", t = this.frame === "plain", n = w`
218
216
  <div class="body" part="body">
219
217
  <div class="content-wrap">
220
218
  <div
221
219
  class="content vf-scroll"
222
220
  part="content"
223
- tabindex=${this._scrollable ? "0" : E}
224
- role=${this._scrollable ? "group" : E}
221
+ tabindex=${this._scrollable ? "0" : T}
222
+ role=${this._scrollable ? "group" : T}
225
223
  >
226
- ${t && this.heading !== "" ? T`<span class="plain-heading" part="title" id="title"
224
+ ${t && this.heading !== "" ? w`<span class="plain-heading" part="title" id="title"
227
225
  >${this.heading}</span
228
- >` : E}
226
+ >` : T}
229
227
  <slot @slotchange=${this._onBodySlotChange}></slot>
230
228
  </div>
231
- ${x(this._rail, "vertical")}
229
+ ${b(this._rail, "vertical")}
232
230
  <div class="scroll-frame" aria-hidden="true"></div>
233
231
  </div>
234
232
  <div class="footer ${this._hasButtons ? "" : "empty"}" part="footer">
@@ -241,29 +239,23 @@ var j = class extends S {
241
239
  </div>
242
240
  </div>
243
241
  `;
244
- return T`
242
+ return w`
245
243
  <dialog
246
- style=${A(this.dialogSize)}
247
- aria-labelledby=${e ? "title" : E}
248
- aria-label=${e ? E : this.label || "Dialog"}
244
+ style=${k(this.dialogSize)}
245
+ aria-labelledby=${e ? "title" : T}
246
+ aria-label=${e ? T : this.label || "Dialog"}
249
247
  @cancel=${this._onNativeCancel}
250
248
  @close=${this._onNativeClose}
251
249
  >
252
- ${t ? T`
253
- <div class="vf-modal-frame" part="frame">
254
- <div class="vf-modal-frame-inner">${n}</div>
255
- </div>
256
- ` : T`
257
- <div class="vf-frame" part="frame">
258
- ${g(this._drag, T`
259
- ${this.closable ? _(v("Close", this.heading), this._onCloseClick) : E}
260
- <span class="vf-title" part="title" id="title"
261
- >${this.heading}</span
262
- >
263
- `)}
264
- ${n}
265
- </div>
266
- `}
250
+ <div class="vf-modal-frame" part="frame">
251
+ ${t ? T : h(this._drag, w`
252
+ ${this.closable ? g(_("Close", this.heading), this._onCloseClick) : T}
253
+ <span class="vf-title" part="title" id="title"
254
+ >${this.heading}</span
255
+ >
256
+ `)}
257
+ <div class="vf-modal-frame-inner">${n}</div>
258
+ </div>
267
259
  </dialog>
268
260
  `;
269
261
  }
@@ -272,9 +264,9 @@ var j = class extends S {
272
264
  this._hasButtons = t.assignedElements().length > 0;
273
265
  }
274
266
  };
275
- r([D()], j.prototype, "heading", void 0), r([D()], j.prototype, "label", void 0), r([D({
267
+ r([E()], A.prototype, "heading", void 0), r([E()], A.prototype, "label", void 0), r([E({
276
268
  type: Boolean,
277
269
  reflect: !0
278
- })], j.prototype, "closable", void 0), r([D({ reflect: !0 })], j.prototype, "frame", void 0), r([k()], j.prototype, "_hasButtons", void 0), r([O(".content")], j.prototype, "_content", void 0), r([k()], j.prototype, "_scrollable", void 0), j = r([e("vf-dialog")], j);
270
+ })], A.prototype, "closable", void 0), r([E({ reflect: !0 })], A.prototype, "frame", void 0), r([O()], A.prototype, "_hasButtons", void 0), r([D(".content")], A.prototype, "_content", void 0), r([O()], A.prototype, "_scrollable", void 0), A = r([e("vf-dialog")], A);
279
271
  //#endregion
280
- export { j as VfDialog };
272
+ export { A as VfDialog };
@@ -5,8 +5,8 @@ import { VfPositioned as o } from "../position.js";
5
5
  import { vfBase as s } from "../styles/recipes/host.js";
6
6
  import { tileImage as c, tileRects as l, tileSpan as u, vfTileMaskSize as d } from "../styles/recipes/tile.js";
7
7
  import { TileRasterCache as f, patternOverride as p, tileGrid as m, vfTileGrid as h } from "../tile-grid.js";
8
- import { GridSnapController as g } from "../grid-snap.js";
9
- import { TrackWidthController as _ } from "../track-width.js";
8
+ import { TrackWidthController as g } from "../track-width.js";
9
+ import { GridSnapController as _ } from "../grid-snap.js";
10
10
  import { LitElement as v, css as y, html as b, unsafeCSS as x } from "lit";
11
11
  import { property as S, query as C } from "lit/decorators.js";
12
12
  //#region src/components/vf-progress-bar.ts
@@ -220,7 +220,7 @@ var w = 12, T = [
220
220
  #e;
221
221
  #t;
222
222
  constructor() {
223
- super(), this.scale = new t(this), this.gridSnap = new g(this), this.value = 0, this.max = 100, this.indeterminate = !1, this.label = "", this.trackSize = new _(this, () => this.track), this._pattern = "", this.#e = new f(), this.#t = this.attachInternals(), this.#t.role = "progressbar", this.#t.ariaValueMin = "0";
223
+ super(), this.scale = new t(this), this.gridSnap = new _(this), this.value = 0, this.max = 100, this.indeterminate = !1, this.label = "", this.trackSize = new g(this, () => this.track), this._pattern = "", this.#e = new f(), this.#t = this.attachInternals(), this.#t.role = "progressbar", this.#t.ariaValueMin = "0";
224
224
  }
225
225
  get effectiveMax() {
226
226
  return this.max > 0 ? this.max : 100;
@@ -5,12 +5,12 @@ import o from "../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js
5
5
  import { VfPositioned as s } from "../position.js";
6
6
  import { vfBase as c } from "../styles/recipes/host.js";
7
7
  import { vfFocusUnderline as l } from "../styles/recipes/focus.js";
8
- import { GridSnapController as u } from "../grid-snap.js";
9
- import { SLIDER_THUMB as d, SLIDER_THUMB_FACE as f } from "../glyphs.js";
10
- import { VfFormControl as p } from "../form-control.js";
11
- import { FocusRuleController as m } from "../focus-modality.js";
12
- import { decimalsOf as h } from "../number.js";
13
- import { TrackWidthController as g } from "../track-width.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,7 +21,7 @@ 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 s(p) {
24
+ var O = class extends s(m) {
25
25
  static {
26
26
  this.styles = [c, _`
27
27
  :host {
@@ -110,7 +110,7 @@ var O = class extends s(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 g(this, () => this.track), this.scale = new r(this), this.gridSnap = new u(this), this.selfManagedTabIndex = !1, this.#e = new m(this), this.#t = 0, this.#n = !1, this.#f = (e) => {
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 s(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(h(t)));
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;
@@ -242,8 +242,8 @@ var O = class extends s(p) {
242
242
  shape-rendering="crispEdges"
243
243
  aria-hidden="true"
244
244
  >
245
- <path class="thumb-face" d=${f.d}></path>
246
- <path class="thumb-outline" d=${d.d}></path>
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>