vintage-frames 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/custom-elements.json +181 -32
  2. package/dist/components/vf-button.js +25 -25
  3. package/dist/components/vf-checkbox.js +15 -15
  4. package/dist/components/vf-container.d.ts +37 -3
  5. package/dist/components/vf-container.js +32 -10
  6. package/dist/components/vf-desktop.d.ts +103 -22
  7. package/dist/components/vf-desktop.js +100 -121
  8. package/dist/components/vf-dialog.d.ts +19 -15
  9. package/dist/components/vf-dialog.js +45 -53
  10. package/dist/components/vf-icon.js +56 -56
  11. package/dist/components/vf-list-item.js +16 -16
  12. package/dist/components/vf-list.js +26 -26
  13. package/dist/components/vf-menu-item.js +24 -24
  14. package/dist/components/vf-menu.js +27 -27
  15. package/dist/components/vf-number-field.js +17 -17
  16. package/dist/components/vf-progress-bar.js +3 -3
  17. package/dist/components/vf-radio-group.js +13 -13
  18. package/dist/components/vf-radio.js +16 -16
  19. package/dist/components/vf-select.js +27 -27
  20. package/dist/components/vf-slider.js +32 -32
  21. package/dist/components/vf-window.js +69 -69
  22. package/dist/index.d.ts +14 -0
  23. package/dist/index.js +73 -71
  24. package/dist/modal-dialog.js +21 -21
  25. package/dist/pattern-fill.d.ts +91 -0
  26. package/dist/pattern-fill.js +74 -0
  27. package/dist/patterns.d.ts +80 -0
  28. package/dist/patterns.js +477 -0
  29. package/dist/scroll-rail.js +37 -37
  30. package/dist/styles/recipes/pattern.d.ts +2 -12
  31. package/dist/styles/recipes/pattern.js +11 -15
  32. package/dist/styles/recipes/scroll-rail.d.ts +3 -12
  33. package/dist/styles/recipes/scroll-rail.js +7 -15
  34. package/dist/styles/recipes/surface.d.ts +18 -7
  35. package/dist/styles/recipes/surface.js +15 -0
  36. package/dist/text-control.js +11 -11
  37. package/dist/tile-grid.d.ts +4 -2
  38. package/dist/tile-grid.js +3 -3
  39. package/dist/toggle-control.js +5 -5
  40. package/dist/track-width.d.ts +7 -0
  41. package/dist/track-width.js +6 -3
  42. package/docs/SPEC.md +14 -10
  43. package/editor/vscode.html-custom-data.json +14 -4
  44. package/editor/web-types.json +46 -8
  45. package/package.json +3 -1
@@ -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 };
@@ -1,14 +1,14 @@
1
- import { vfElement as e } from "../define.js";
2
- import { ScaleController as t, effectiveScale as n, toSysExact as r } from "../scale.js";
3
- import i from "../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js";
4
- import { PlacementController as a, VfPositioned as o, warnMovableContract as s } from "../position.js";
5
- import { vfBodyDecls as c } from "../styles/recipes/body-face.js";
6
- import { vfBase as l } from "../styles/recipes/host.js";
7
- import { vfFocusUnderline as u } from "../styles/recipes/focus.js";
8
- import { GridSnapController as d } from "../grid-snap.js";
9
- import { DocumentListenersController as f } from "../document-listeners.js";
10
- import { DragController as p } from "../drag.js";
11
- import { emit as m } from "../events.js";
1
+ import { emit as e } from "../events.js";
2
+ import { vfElement as t } from "../define.js";
3
+ import { ScaleController as n, effectiveScale as r, toSysExact as i } from "../scale.js";
4
+ import a from "../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js";
5
+ import { PlacementController as o, VfPositioned as s, warnMovableContract as c } from "../position.js";
6
+ import { vfBodyDecls as l } from "../styles/recipes/body-face.js";
7
+ import { vfBase as u } from "../styles/recipes/host.js";
8
+ import { vfFocusUnderline as d } from "../styles/recipes/focus.js";
9
+ import { GridSnapController as f } from "../grid-snap.js";
10
+ import { DocumentListenersController as p } from "../document-listeners.js";
11
+ import { DragController as m } from "../drag.js";
12
12
  import "../motion.js";
13
13
  import { FocusRuleController as h } from "../focus-modality.js";
14
14
  import { deriveOpenArt as g } from "../open-art.js";
@@ -18,20 +18,20 @@ import { property as x, state as S } from "lit/decorators.js";
18
18
  var C = {
19
19
  large: 32,
20
20
  small: 16
21
- }, w = 1, T = 8, E = (e, t) => t <= 0 ? Math.max(e, 0) : Math.min(Math.max(e, 0), t), D = class extends o(_) {
22
- constructor(...e) {
23
- super(...e), this.label = "", this.size = "large", this.selectable = !1, this.selected = !1, this.color = !1, this.open = !1, this.movable = !1, this.editable = !1, this.maxlength = 31, this.scale = new t(this), this.gridSnap = new d(this), this.focusRule = new h(this), this._editing = !1, this._draft = "", this.#e = 0, this._ghost = null, this.#t = null, this.#n = this.attachInternals(), this.#i = "", this.#a = "", this.#o = 0, this.#s = -Infinity, this.#c = new f(this, () => [[
21
+ }, w = 1, T = 8, E = (e, t) => t <= 0 ? Math.max(e, 0) : Math.min(Math.max(e, 0), t), D = class extends s(_) {
22
+ constructor(...t) {
23
+ super(...t), this.label = "", this.size = "large", this.selectable = !1, this.selected = !1, this.color = !1, this.open = !1, this.movable = !1, this.editable = !1, this.maxlength = 31, this.scale = new n(this), this.gridSnap = new f(this), this.focusRule = new h(this), this._editing = !1, this._draft = "", this.#e = 0, this._ghost = null, this.#t = null, this.#n = this.attachInternals(), this.#i = "", this.#a = "", this.#o = 0, this.#s = -Infinity, this.#c = new p(this, () => [[
24
24
  document,
25
25
  "pointerdown",
26
26
  this.#A,
27
27
  !0
28
28
  ]]), this.#l = (e, t, n) => ({
29
- x: E(e, n.width - r(this.offsetWidth, this)),
30
- y: E(t, n.height - r(this.offsetHeight, this))
31
- }), this.#u = new a(this, (e, t, n) => this.#l(e, t, n)), this.#d = {
29
+ x: E(e, n.width - i(this.offsetWidth, this)),
30
+ y: E(t, n.height - i(this.offsetHeight, this))
31
+ }), this.#u = new o(this, (e, t, n) => this.#l(e, t, n)), this.#d = {
32
32
  x: 0,
33
33
  y: 0
34
- }, this.#f = new p(this, {
34
+ }, this.#f = new m(this, {
35
35
  onDragStart: (e) => !this.movable || e.button !== 0 || this._editing ? null : (this.#m(), this.#d = this.#u.seed()),
36
36
  onDrag: (e, t) => {
37
37
  (e !== this.#d.x || t !== this.#d.y) && this.#S(), this.#u.moveTo(e, t);
@@ -45,7 +45,7 @@ var C = {
45
45
  let t = e.composedPath().some((e) => e instanceof HTMLElement && e.classList.contains("label")), n = this.selected, r = e.timeStamp - this.#s < 800;
46
46
  this.#s = e.timeStamp, this.#S(), this.selectable && (e.shiftKey || e.metaKey ? this.#D(!this.selected) : this.#D(!0)), this.editable && t && n && !r && !e.shiftKey && !e.metaKey && this.#x(), this.#T && (this.focus({ preventScroll: !0 }), this.focusRule.suppress()), this.#f.onPointerDown(e);
47
47
  }, this.#k = () => {
48
- this._editing || m(this, "vf-open", {});
48
+ this._editing || e(this, "vf-open", {});
49
49
  }, this.#A = (e) => {
50
50
  e.composedPath().includes(this) || (this.#S(), !(e.shiftKey || e.metaKey) && this.#D(!1));
51
51
  }, this.#j = (e) => {
@@ -62,28 +62,28 @@ var C = {
62
62
  this._draft = t.value;
63
63
  }, this.#P = (e) => {
64
64
  e.key === "Enter" ? (e.preventDefault(), this.commitEditing(), this.focus()) : e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), this.cancelEditing(), this.focus());
65
- }, this.#F = (e) => {
66
- if (this.#S(), !(this._editing || e.defaultPrevented)) {
67
- if ((e.metaKey || e.ctrlKey) && !e.altKey && (e.key.toLowerCase() === "o" || e.key === "ArrowDown")) {
68
- e.preventDefault(), m(this, "vf-open", {});
65
+ }, this.#F = (t) => {
66
+ if (this.#S(), !(this._editing || t.defaultPrevented)) {
67
+ if ((t.metaKey || t.ctrlKey) && !t.altKey && (t.key.toLowerCase() === "o" || t.key === "ArrowDown")) {
68
+ t.preventDefault(), e(this, "vf-open", {});
69
69
  return;
70
70
  }
71
- switch (e.key) {
71
+ switch (t.key) {
72
72
  case "Enter":
73
73
  if (!this.editable) return;
74
- e.preventDefault(), this.startEditing();
74
+ t.preventDefault(), this.startEditing();
75
75
  return;
76
76
  case " ":
77
77
  if (!this.selectable) return;
78
- e.preventDefault(), this.focusRule.reveal(), this.#D(!this.selected);
78
+ t.preventDefault(), this.focusRule.reveal(), this.#D(!this.selected);
79
79
  return;
80
80
  case "ArrowLeft":
81
81
  case "ArrowRight":
82
82
  case "ArrowUp":
83
83
  case "ArrowDown": {
84
84
  if (!this.movable) return;
85
- e.preventDefault(), this.focusRule.reveal();
86
- let t = e.shiftKey ? T : w, n = e.key === "ArrowLeft" ? -t : e.key === "ArrowRight" ? t : 0, r = e.key === "ArrowUp" ? -t : e.key === "ArrowDown" ? t : 0;
85
+ t.preventDefault(), this.focusRule.reveal();
86
+ let e = t.shiftKey ? T : w, n = t.key === "ArrowLeft" ? -e : t.key === "ArrowRight" ? e : 0, r = t.key === "ArrowUp" ? -e : t.key === "ArrowDown" ? e : 0;
87
87
  this.#m();
88
88
  let i = this.#u.seed();
89
89
  this.#u.moveTo(i.x + n, i.y + r);
@@ -93,7 +93,7 @@ var C = {
93
93
  };
94
94
  }
95
95
  static {
96
- this.styles = [l, v`
96
+ this.styles = [u, v`
97
97
  :host {
98
98
  display: inline-block;
99
99
  cursor: var(--vf-cursor, default);
@@ -161,7 +161,7 @@ var C = {
161
161
  margin-top: calc(var(--vf-scale, 1) * var(--vf-icon-gap, 2px));
162
162
  }
163
163
  .label {
164
- ${c}
164
+ ${l}
165
165
  font-weight: var(--vf-font-weight, 700);
166
166
  /* Whole system px, never a ratio — layout contract rule 2. 12, not
167
167
  the face's 16px em: the Finder's plate is 12 system px tall, and
@@ -249,7 +249,7 @@ var C = {
249
249
  selection paint at this edge, which is the whole reason it has no
250
250
  border of its own (see .rename-box). */
251
251
  height: calc(var(--vf-scale, 1) * var(--vf-icon-label-height, 12px));
252
- ${c}
252
+ ${l}
253
253
  font-weight: var(--vf-font-weight, 700);
254
254
  line-height: calc(
255
255
  var(--vf-scale, 1) * var(--vf-icon-label-height, 12px)
@@ -292,12 +292,12 @@ var C = {
292
292
  as a visible focus (see focus-modality.ts). */
293
293
  .caption.focus-rule .label::after {
294
294
  --vf-focus-underline-offset: -2px;
295
- ${u}
295
+ ${d}
296
296
  }
297
297
  /* No name, no plate — the rule falls back to the art cell. */
298
298
  .art.focus-rule::after {
299
299
  --vf-focus-underline-offset: -2px;
300
- ${u}
300
+ ${d}
301
301
  }
302
302
  :host(:focus) {
303
303
  outline: none;
@@ -334,7 +334,7 @@ var C = {
334
334
  }
335
335
  #p;
336
336
  #m() {
337
- this.#p ||= s(this, `vf-icon${this.label ? ` ("${this.label}")` : ""}`, "<vf-icon movable label=\"Read Me\" width=\"64\" top=\"16\" left=\"16\">");
337
+ this.#p ||= c(this, `vf-icon${this.label ? ` ("${this.label}")` : ""}`, "<vf-icon movable label=\"Read Me\" width=\"64\" top=\"16\" left=\"16\">");
338
338
  }
339
339
  firstUpdated() {
340
340
  document.fonts.ready.then(() => this.#h());
@@ -350,7 +350,7 @@ var C = {
350
350
  let n = document.createRange();
351
351
  n.selectNodeContents(e), t = n.getBoundingClientRect().width, n.detach();
352
352
  }
353
- let r = t / n(this) + 2, i = Math.max(2, Math.ceil(r / 2) * 2);
353
+ let n = t / r(this) + 2, i = Math.max(2, Math.ceil(n / 2) * 2);
354
354
  this.#e = this._editing && t === 0 ? Math.max(i, C[this.size]) : i, e.style.width = this.#g;
355
355
  }
356
356
  get #g() {
@@ -399,18 +399,18 @@ var C = {
399
399
  commitEditing() {
400
400
  if (!this._editing) return;
401
401
  this._editing = !1;
402
- let e = this.#a, t = this._draft;
403
- if (t.trim() === "") {
404
- this._draft = e, t !== e && m(this, "vf-name-rejected", {
405
- attempted: t,
406
- kept: e,
402
+ let t = this.#a, n = this._draft;
403
+ if (n.trim() === "") {
404
+ this._draft = t, n !== t && e(this, "vf-name-rejected", {
405
+ attempted: n,
406
+ kept: t,
407
407
  reason: "empty"
408
408
  });
409
409
  return;
410
410
  }
411
- t !== e && (this.label = t, m(this, "vf-change", {
412
- label: t,
413
- previous: e
411
+ n !== t && (this.label = n, e(this, "vf-change", {
412
+ label: n,
413
+ previous: t
414
414
  }));
415
415
  }
416
416
  cancelEditing() {
@@ -476,42 +476,42 @@ var C = {
476
476
  #E() {
477
477
  this.hasAttribute("tabindex") || (this.#T ? this.tabIndex = 0 : this.removeAttribute("tabindex"));
478
478
  }
479
- #D(e) {
480
- e !== this.selected && (this.selected = e, m(this, "vf-select", { selected: e }));
479
+ #D(t) {
480
+ t !== this.selected && (this.selected = t, e(this, "vf-select", { selected: t }));
481
481
  }
482
482
  #O;
483
483
  #k;
484
484
  #A;
485
485
  #j;
486
486
  #M;
487
- #N(e) {
488
- m(this, "vf-name-too-long", {
489
- attempted: e,
490
- accepted: e.slice(0, this.maxlength),
487
+ #N(t) {
488
+ e(this, "vf-name-too-long", {
489
+ attempted: t,
490
+ accepted: t.slice(0, this.maxlength),
491
491
  limit: this.maxlength
492
492
  });
493
493
  }
494
494
  #P;
495
495
  #F;
496
496
  };
497
- i([x()], D.prototype, "label", void 0), i([x({ reflect: !0 })], D.prototype, "size", void 0), i([x({
497
+ a([x()], D.prototype, "label", void 0), a([x({ reflect: !0 })], D.prototype, "size", void 0), a([x({
498
498
  type: Boolean,
499
499
  reflect: !0
500
- })], D.prototype, "selectable", void 0), i([x({
500
+ })], D.prototype, "selectable", void 0), a([x({
501
501
  type: Boolean,
502
502
  reflect: !0
503
- })], D.prototype, "selected", void 0), i([x({
503
+ })], D.prototype, "selected", void 0), a([x({
504
504
  type: Boolean,
505
505
  reflect: !0
506
- })], D.prototype, "color", void 0), i([x({
506
+ })], D.prototype, "color", void 0), a([x({
507
507
  type: Boolean,
508
508
  reflect: !0
509
- })], D.prototype, "open", void 0), i([x({
509
+ })], D.prototype, "open", void 0), a([x({
510
510
  type: Boolean,
511
511
  reflect: !0
512
- })], D.prototype, "movable", void 0), i([x({
512
+ })], D.prototype, "movable", void 0), a([x({
513
513
  type: Boolean,
514
514
  reflect: !0
515
- })], D.prototype, "editable", void 0), i([x({ type: Number })], D.prototype, "width", void 0), i([x({ type: Number })], D.prototype, "maxlength", void 0), i([S()], D.prototype, "_editing", void 0), i([S()], D.prototype, "_draft", void 0), i([S()], D.prototype, "_ghost", void 0), D = i([e("vf-icon")], D);
515
+ })], D.prototype, "editable", void 0), a([x({ type: Number })], D.prototype, "width", void 0), a([x({ type: Number })], D.prototype, "maxlength", void 0), a([S()], D.prototype, "_editing", void 0), a([S()], D.prototype, "_draft", void 0), a([S()], D.prototype, "_ghost", void 0), D = a([t("vf-icon")], D);
516
516
  //#endregion
517
517
  export { D as VfIcon };
@@ -1,16 +1,16 @@
1
- import { vfElement as e } from "../define.js";
2
- import { ScaleController as t } from "../scale.js";
3
- import n from "../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js";
4
- import { VfPositioned as r } from "../position.js";
5
- import { vfBase as i } from "../styles/recipes/host.js";
6
- import { vfFocusRing as a } from "../styles/recipes/focus.js";
7
- import { emit as o } from "../events.js";
1
+ import { emit as e } from "../events.js";
2
+ import { vfElement as t } from "../define.js";
3
+ import { ScaleController as n } from "../scale.js";
4
+ import r from "../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js";
5
+ import { VfPositioned as i } from "../position.js";
6
+ import { vfBase as a } from "../styles/recipes/host.js";
7
+ import { vfFocusRing as o } from "../styles/recipes/focus.js";
8
8
  import { LitElement as s, css as c, html as l } from "lit";
9
9
  import { property as u } from "lit/decorators.js";
10
10
  //#region src/components/vf-list-item.ts
11
- var d = class extends r(s) {
11
+ var d = class extends i(s) {
12
12
  static {
13
- this.styles = [i, c`
13
+ this.styles = [a, c`
14
14
  :host {
15
15
  display: flex;
16
16
  align-items: center;
@@ -48,7 +48,7 @@ var d = class extends r(s) {
48
48
  across selected rows while Space still acts on it. */
49
49
  :host(:focus) {
50
50
  --vf-focus-offset: -1px;
51
- ${a}
51
+ ${o}
52
52
  }
53
53
  :host([selected]) {
54
54
  background: var(--vf-highlight, #000);
@@ -75,25 +75,25 @@ var d = class extends r(s) {
75
75
  }
76
76
  #e;
77
77
  constructor() {
78
- super(), this.scale = new t(this), this.value = "", this.selected = !1, this.disabled = !1, this.listDisabled = !1, this.#e = this.attachInternals(), this.#e.role = "option";
78
+ super(), this.scale = new n(this), this.value = "", this.selected = !1, this.disabled = !1, this.listDisabled = !1, this.#e = this.attachInternals(), this.#e.role = "option";
79
79
  }
80
80
  connectedCallback() {
81
81
  super.connectedCallback(), this.hasAttribute("tabindex") || (this.tabIndex = -1);
82
82
  }
83
- updated(e) {
84
- e.has("selected") && (this.#e.ariaSelected = this.selected ? "true" : "false"), (e.has("disabled") || e.has("listDisabled")) && (this.#e.ariaDisabled = this.disabled || this.listDisabled ? "true" : null), e.has("disabled") && e.get("disabled") !== void 0 && o(this, "vf-list-item-disabled-change", { item: this }, { composed: !1 });
83
+ updated(t) {
84
+ t.has("selected") && (this.#e.ariaSelected = this.selected ? "true" : "false"), (t.has("disabled") || t.has("listDisabled")) && (this.#e.ariaDisabled = this.disabled || this.listDisabled ? "true" : null), t.has("disabled") && t.get("disabled") !== void 0 && e(this, "vf-list-item-disabled-change", { item: this }, { composed: !1 });
85
85
  }
86
86
  render() {
87
87
  return l`<slot name="icon"></slot
88
88
  ><span class="text" part="text"><slot></slot></span>`;
89
89
  }
90
90
  };
91
- n([u()], d.prototype, "value", void 0), n([u({
91
+ r([u()], d.prototype, "value", void 0), r([u({
92
92
  type: Boolean,
93
93
  reflect: !0
94
- })], d.prototype, "selected", void 0), n([u({
94
+ })], d.prototype, "selected", void 0), r([u({
95
95
  type: Boolean,
96
96
  reflect: !0
97
- })], d.prototype, "disabled", void 0), n([u({ attribute: !1 })], d.prototype, "listDisabled", void 0), d = n([e("vf-list-item")], d);
97
+ })], d.prototype, "disabled", void 0), r([u({ attribute: !1 })], d.prototype, "listDisabled", void 0), d = r([t("vf-list-item")], d);
98
98
  //#endregion
99
99
  export { d as VfListItem };
@@ -1,23 +1,23 @@
1
- import { vfElement as e } from "../define.js";
2
- import { ScaleController as t } from "../scale.js";
3
- import n from "../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js";
4
- import { VfPositioned as r } from "../position.js";
5
- import { vfBase as i } from "../styles/recipes/host.js";
6
- import { vfFocusRing as a } from "../styles/recipes/focus.js";
7
- import { vfScrollRail as o } from "../styles/recipes/scroll-rail.js";
8
- import { GridSnapController as s } from "../grid-snap.js";
9
- import { emit as c } from "../events.js";
1
+ import { emit as e } from "../events.js";
2
+ import { vfElement as t } from "../define.js";
3
+ import { ScaleController as n } from "../scale.js";
4
+ import r from "../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js";
5
+ import { VfPositioned as i } from "../position.js";
6
+ import { vfBase as a } from "../styles/recipes/host.js";
7
+ import { vfFocusRing as o } from "../styles/recipes/focus.js";
8
+ import { vfScrollRail as s } from "../styles/recipes/scroll-rail.js";
9
+ import { GridSnapController as c } from "../grid-snap.js";
10
10
  import { ScrollStateController as l } from "../scroll-state.js";
11
11
  import { ScrollRailController as u, renderScrollRail as d } from "../scroll-rail.js";
12
12
  import { TypeAheadBuffer as f } from "../type-ahead.js";
13
13
  import { LitElement as p, css as m, html as h, nothing as g } from "lit";
14
14
  import { property as _, query as v, queryAssignedElements as y, state as b } from "lit/decorators.js";
15
15
  //#region src/components/vf-list.ts
16
- var x = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]), S = class extends r(p) {
16
+ var x = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]), S = class extends i(p) {
17
17
  static {
18
18
  this.styles = [
19
- i,
20
- o,
19
+ a,
20
+ s,
21
21
  m`
22
22
  :host {
23
23
  display: block;
@@ -66,7 +66,7 @@ var x = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]), S = cl
66
66
  render()); the ring keeps that stop visible, inset to stay in-box. */
67
67
  .list:focus-visible {
68
68
  --vf-focus-offset: -2px;
69
- ${a}
69
+ ${o}
70
70
  }
71
71
  `
72
72
  ];
@@ -77,7 +77,7 @@ var x = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]), S = cl
77
77
  #r;
78
78
  #i;
79
79
  constructor() {
80
- super(), this.scale = new t(this), this.gridSnap = new s(this), this.scrollState = new l(this, () => this.viewport, () => this.content, (e) => {
80
+ super(), this.scale = new n(this), this.gridSnap = new c(this), this.scrollState = new l(this, () => this.viewport, () => this.content, (e) => {
81
81
  this._scrollable = e.x || e.y;
82
82
  }), this.rail = new u(this, {
83
83
  getScroll: () => this.viewport,
@@ -192,15 +192,15 @@ var x = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]), S = cl
192
192
  this.#s(e, !1);
193
193
  }
194
194
  }
195
- #s(e, t) {
196
- let n = this._items, r = this.multiple ? e : e.slice(0, 1), i = n.filter((e) => e.selected).map((e) => e.value);
197
- for (let e of n) e.selected = r.includes(e.value) && !e.disabled;
198
- let a = n.filter((e) => e.selected).map((e) => e.value);
199
- this.#r = [...a];
200
- let o = a[0] ?? "";
201
- this.value !== o && (this.value = o), x(this.values, a) || (this.values = a), this.#c(), t && !x(i, a) && c(this, "vf-change", {
195
+ #s(t, n) {
196
+ let r = this._items, i = this.multiple ? t : t.slice(0, 1), a = r.filter((e) => e.selected).map((e) => e.value);
197
+ for (let e of r) e.selected = i.includes(e.value) && !e.disabled;
198
+ let o = r.filter((e) => e.selected).map((e) => e.value);
199
+ this.#r = [...o];
200
+ let s = o[0] ?? "";
201
+ this.value !== s && (this.value = s), x(this.values, o) || (this.values = o), this.#c(), n && !x(a, o) && e(this, "vf-change", {
202
202
  value: this.value,
203
- values: [...a]
203
+ values: [...o]
204
204
  });
205
205
  }
206
206
  #c() {
@@ -242,15 +242,15 @@ var x = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]), S = cl
242
242
  !t || t.disabled || (t.focus(), t.scrollIntoView({ block: "nearest" }));
243
243
  }
244
244
  };
245
- n([v(".list")], S.prototype, "viewport", void 0), n([v(".list-content")], S.prototype, "content", void 0), n([b()], S.prototype, "_scrollable", void 0), n([_({
245
+ r([v(".list")], S.prototype, "viewport", void 0), r([v(".list-content")], S.prototype, "content", void 0), r([b()], S.prototype, "_scrollable", void 0), r([_({
246
246
  type: Boolean,
247
247
  reflect: !0
248
- })], S.prototype, "multiple", void 0), n([_()], S.prototype, "value", void 0), n([_({ attribute: !1 })], S.prototype, "values", void 0), n([_({
248
+ })], S.prototype, "multiple", void 0), r([_()], S.prototype, "value", void 0), r([_({ attribute: !1 })], S.prototype, "values", void 0), r([_({
249
249
  type: Boolean,
250
250
  reflect: !0
251
- })], S.prototype, "disabled", void 0), n([_()], S.prototype, "label", void 0), n([y({
251
+ })], S.prototype, "disabled", void 0), r([_()], S.prototype, "label", void 0), r([y({
252
252
  selector: "vf-list-item",
253
253
  flatten: !0
254
- })], S.prototype, "_items", void 0), S = n([e("vf-list")], S);
254
+ })], S.prototype, "_items", void 0), S = r([t("vf-list")], S);
255
255
  //#endregion
256
256
  export { S as VfList };