vintage-frames 0.13.0 → 0.14.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 (44) hide show
  1. package/custom-elements.json +8 -8
  2. package/dist/components/vf-checkbox.d.ts +6 -5
  3. package/dist/components/vf-checkbox.js +41 -37
  4. package/dist/components/vf-container.d.ts +11 -13
  5. package/dist/components/vf-container.js +24 -12
  6. package/dist/components/vf-fieldset.js +30 -22
  7. package/dist/components/vf-icon.js +55 -55
  8. package/dist/components/vf-list.js +30 -29
  9. package/dist/components/vf-menu.js +24 -22
  10. package/dist/components/vf-number-field.js +32 -30
  11. package/dist/components/vf-progress-bar.js +28 -29
  12. package/dist/components/vf-radio.js +3 -4
  13. package/dist/components/vf-scroll-area.js +27 -26
  14. package/dist/components/vf-select.js +108 -90
  15. package/dist/components/vf-separator.d.ts +5 -5
  16. package/dist/components/vf-separator.js +36 -10
  17. package/dist/components/vf-swatch.js +47 -45
  18. package/dist/components/vf-text-area.js +37 -35
  19. package/dist/components/vf-text-field.js +20 -18
  20. package/dist/components/vf-window.js +92 -72
  21. package/dist/index.d.ts +10 -1
  22. package/dist/index.js +60 -59
  23. package/dist/styles/base.d.ts +3 -1
  24. package/dist/styles/recipes/field.d.ts +10 -6
  25. package/dist/styles/recipes/field.js +8 -7
  26. package/dist/styles/recipes/focus.d.ts +7 -3
  27. package/dist/styles/recipes/rule.d.ts +11 -8
  28. package/dist/styles/recipes/rule.js +31 -13
  29. package/dist/styles/recipes/scroll-rail.d.ts +7 -6
  30. package/dist/styles/recipes/scroll-rail.js +18 -18
  31. package/dist/styles/recipes/shadow.d.ts +10 -6
  32. package/dist/styles/recipes/shadow.js +4 -2
  33. package/dist/styles/recipes/stroke.d.ts +85 -0
  34. package/dist/styles/recipes/stroke.js +53 -0
  35. package/dist/styles/recipes/surface.d.ts +8 -4
  36. package/dist/styles/recipes/surface.js +23 -17
  37. package/dist/styles/recipes/title-bar.d.ts +7 -0
  38. package/dist/styles/recipes/title-bar.js +25 -22
  39. package/dist/styles/recipes/toggle.js +3 -3
  40. package/dist/zoom.d.ts +9 -9
  41. package/docs/SPEC.md +23 -22
  42. package/editor/vscode.html-custom-data.json +4 -4
  43. package/editor/web-types.json +7 -7
  44. package/package.json +1 -1
@@ -1348,11 +1348,11 @@
1348
1348
  "declarations": [
1349
1349
  {
1350
1350
  "kind": "class",
1351
- "description": "The classic System 7 checkbox: a 13×13 white square with a 1px black\nborder whose checked state is the corner-to-corner ✕ glyph — the pixel-exact\ncross traced from the Classic Macintosh UI Kit sprite. The border \"thickens\"\nwhile pressed, exactly like the original control.\n\nForm-associated: submits `value` under `name` when checked (like a native\ncheckbox) and restores its initial checked state on form reset. Toggles on\nclick and Space.",
1351
+ "description": "The classic System 7 checkbox: a 12×12 white square with a 1px black\nborder whose checked state is the corner-to-corner ✕ glyph — the pixel-exact\ncross traced from the Classic Macintosh UI Kit sprite, filling the 10×10\ninterior. The border \"thickens\" while pressed, exactly like the original\ncontrol.\n\nForm-associated: submits `value` under `name` when checked (like a native\ncheckbox) and restores its initial checked state on form reset. Toggles on\nclick and Space.",
1352
1352
  "name": "VfCheckbox",
1353
1353
  "cssParts": [
1354
1354
  {
1355
- "description": "The 13×13 checkbox square.",
1355
+ "description": "The 12×12 checkbox square.",
1356
1356
  "name": "box"
1357
1357
  },
1358
1358
  {
@@ -1362,7 +1362,7 @@
1362
1362
  ],
1363
1363
  "slots": [
1364
1364
  {
1365
- "description": "The label, rendered to the right of the box with a 6px gap. Left empty, the label and its gap collapse: the control is the bare 13×13 box.",
1365
+ "description": "The label, rendered to the right of the box with a 6px gap. Left empty, the label and its gap collapse: the control is the bare 12×12 box.",
1366
1366
  "name": ""
1367
1367
  }
1368
1368
  ],
@@ -2246,7 +2246,7 @@
2246
2246
  "declarations": [
2247
2247
  {
2248
2248
  "kind": "class",
2249
- "description": "`<vf-container>` — a box that is nothing but its declared size.\n\nThe kit's positioned-placement story (src/position.ts) ends with one line of\nCSS it can't write for you: children placed with `top`/`left` need a\npositioned ancestor, and while every kit container is one — a window body, a\nstack, a fieldset — a region of *your own* needs `position: relative` in a\nstylesheet. This component is that region as an element: declare `width` and\n`height` in whole system px, slot anything into it, place children against\nits origin. A DITL's enclosing rectangle, with nothing drawn in it.\n\n```html\n<vf-container width=\"200\" height=\"120\">\n <vf-icon label=\"System\" width=\"64\" top=\"8\" left=\"12\">…</vf-icon>\n <vf-icon label=\"Finder\" width=\"64\" top=\"8\" left=\"104\">…</vf-icon>\n</vf-container>\n```\n\nThe rectangle is the whole API — `width`/`height` here, plus the `top`/`left`\npair nearly every component takes (VfPositioned), so a container is\nitself placeable: inside a window, a desktop, or another container, at whole\nsystem px that keep its box on the device-pixel grid by construction.\n\n**It is not a `vf-stack`.** The stack is a flexbox with opinions — it\ndistributes children along an axis, compiles `fill-width`/`fill-height` into\nflex, defaults a cross-axis alignment. This box has no layout opinion at\nall: in-flow children get normal flow, placed children get a coordinate\nsystem, and that is the whole API. Reach for it when the stack's opinions\nare the thing in the way — a field of placed icons, a fixed stage for\nabsolutely-positioned art, a consumer's own composition that brings its\nlayout with it.\n\n**The declared size is the layout.** `width`/`height` land on the host as a\nlive `calc(var(--vf-scale, 1) * Npx)` (VfSized), so the box scales\nwith the display and sits on the device-pixel grid by construction. Content\nthat outgrows the box overflows it rather than growing it — the number is\nthe layout, and content that doesn't fit is a number to raise. Leave a\ndimension off and that axis shrink-wraps: `fit-content`, not the parent's\nwidth, because a layout box that silently claimed a size nobody declared\nwould be inventing one (the `vf-stack` rule, held here too).\n\n**It paints nothing and means nothing** — unless `pattern` or `rule` say\nwhat to paint. No role, keyboard behavior or selection; what it holds\ndecides what it is.\n\n**`rule` draws the 1px rule on the edges it names** — `rule=\"bottom\"` is\nthe menu bar's anatomy (the box's rows over one row of ink), `rule=\"top\"`\na status strip's, all four a framed box. The rule is the box's own border\n(vfRule), inside the declared size, so a 24px `rule=\"bottom\"`\nstrip is 23 rows of box over the line; content, `fill-width` children and\nplaced children begin inside it, as a rectangle's interior begins inside\nFrameRect's line.\n\n**`pattern` fills the box with a 1-bit pattern**: one of the 38 standard\nMacPaint patterns by name (`pattern=\"bricks\"`, `pattern=\"gray-50\"` —\ndocs/PATTERNS.md has the table), or sixteen hex digits stating a custom\n8×8 pattern row by row, the way a PAT resource did. It is painted as the\nbox's own background — black ink on a `--vf-white` ground, anchored at\nthe box's top-left corner, under the content — by the same repeating tile\nas the desktop dither, so it is 1-bit at every density and zoom and a box\nof any size, declared or not, costs nothing more (src/pattern-fill.ts).\nUnder forced colors the pattern goes flat Canvas.\n\n**It holds its box on the device-pixel grid** — with a `GridSnapController`.\nA container's box is itself the consumer's coordinate system, including for\nnon-`vf` content that cannot correct itself, so the box is the thing to\nhold on the grid. The shadow box below owns the `position: relative` anchor\nand the `vf-snap` class together, so the correction\nmoves the whole coordinate system — everything placed against it rides\nalong instead of being re-corrected child by child. (`vf-stack` shipped\nwithout a controller on the theory that slotted `vf-*` children correct\ntheir own origins; this component is where that theory's gap — consumer\ncontent — became visible, and the stack has since adopted the same\narrangement.)\n\nLike the stack it is **typographically transparent**: `vfBase`'s chrome\ndress is returned to `inherit` on the host, so wrapping content in a sized\nbox changes nothing about how that content reads.\n\n`fill-width` / `fill-height` work here the way they do everywhere: read\nabout the host (be as big as *its* parent allows), and compiled for slotted\nchildren — `width: 100%` in normal flow, so a child filling the cross of a\ndeclared box needs no stylesheet. A height fill needs a declared `height`\nto resolve against; with none it is inert, not an error.",
2249
+ "description": "`<vf-container>` — a box that is nothing but its declared size.\n\nThe kit's positioned-placement story (src/position.ts) ends with one line of\nCSS it can't write for you: children placed with `top`/`left` need a\npositioned ancestor, and while every kit container is one — a window body, a\nstack, a fieldset — a region of *your own* needs `position: relative` in a\nstylesheet. This component is that region as an element: declare `width` and\n`height` in whole system px, slot anything into it, place children against\nits origin. A DITL's enclosing rectangle, with nothing drawn in it.\n\n```html\n<vf-container width=\"200\" height=\"120\">\n <vf-icon label=\"System\" width=\"64\" top=\"8\" left=\"12\">…</vf-icon>\n <vf-icon label=\"Finder\" width=\"64\" top=\"8\" left=\"104\">…</vf-icon>\n</vf-container>\n```\n\nThe rectangle is the whole API — `width`/`height` here, plus the `top`/`left`\npair nearly every component takes (VfPositioned), so a container is\nitself placeable: inside a window, a desktop, or another container, at whole\nsystem px that keep its box on the device-pixel grid by construction.\n\n**It is not a `vf-stack`.** The stack is a flexbox with opinions — it\ndistributes children along an axis, compiles `fill-width`/`fill-height` into\nflex, defaults a cross-axis alignment. This box has no layout opinion at\nall: in-flow children get normal flow, placed children get a coordinate\nsystem, and that is the whole API. Reach for it when the stack's opinions\nare the thing in the way — a field of placed icons, a fixed stage for\nabsolutely-positioned art, a consumer's own composition that brings its\nlayout with it.\n\n**The declared size is the layout.** `width`/`height` land on the host as a\nlive `calc(var(--vf-scale, 1) * Npx)` (VfSized), so the box scales\nwith the display and sits on the device-pixel grid by construction. Content\nthat outgrows the box overflows it rather than growing it — the number is\nthe layout, and content that doesn't fit is a number to raise. Leave a\ndimension off and that axis shrink-wraps: `fit-content`, not the parent's\nwidth, because a layout box that silently claimed a size nobody declared\nwould be inventing one (the `vf-stack` rule, held here too).\n\n**It paints nothing and means nothing** — unless `pattern` or `rule` say\nwhat to paint. No role, keyboard behavior or selection; what it holds\ndecides what it is.\n\n**`rule` draws the 1px rule on the edges it names** — `rule=\"bottom\"` is\nthe menu bar's anatomy (the box's rows over one row of ink), `rule=\"top\"`\na status strip's, all four a framed box. The rule is drawn inside the\ndeclared size (vfRule), so a 24px `rule=\"bottom\"` strip is 23 rows\nof box over the line; content, `fill-width` children and placed children\nbegin inside it, as a rectangle's interior begins inside FrameRect's line.\n\n**`pattern` fills the box with a 1-bit pattern**: one of the 38 standard\nMacPaint patterns by name (`pattern=\"bricks\"`, `pattern=\"gray-50\"` —\ndocs/PATTERNS.md has the table), or sixteen hex digits stating a custom\n8×8 pattern row by row, the way a PAT resource did. It is painted as the\nbox's own background — black ink on a `--vf-white` ground, anchored at\nthe box's top-left corner, under the content — by the same repeating tile\nas the desktop dither, so it is 1-bit at every density and zoom and a box\nof any size, declared or not, costs nothing more (src/pattern-fill.ts).\nUnder forced colors the pattern goes flat Canvas.\n\n**It holds its box on the device-pixel grid** — with a `GridSnapController`.\nA container's box is itself the consumer's coordinate system, including for\nnon-`vf` content that cannot correct itself, so the box is the thing to\nhold on the grid. The correction lands on the shadow box below, and the\ncoordinate system sits inside it, so the correction moves the whole\ncoordinate system — everything placed against it rides along instead of\nbeing re-corrected child by child. (`vf-stack` shipped\nwithout a controller on the theory that slotted `vf-*` children correct\ntheir own origins; this component is where that theory's gap — consumer\ncontent — became visible, and the stack has since adopted the same\narrangement.)\n\nLike the stack it is **typographically transparent**: `vfBase`'s chrome\ndress is returned to `inherit` on the host, so wrapping content in a sized\nbox changes nothing about how that content reads.\n\n`fill-width` / `fill-height` work here the way they do everywhere: read\nabout the host (be as big as *its* parent allows), and compiled for slotted\nchildren — `width: 100%` in normal flow, so a child filling the cross of a\ndeclared box needs no stylesheet. A height fill needs a declared `height`\nto resolve against; with none it is inert, not an error.",
2250
2250
  "name": "VfContainer",
2251
2251
  "slots": [
2252
2252
  {
@@ -2290,7 +2290,7 @@
2290
2290
  "type": {
2291
2291
  "text": "string | null | undefined"
2292
2292
  },
2293
- "description": "The 1px rule on the box's edges: edge names separated by spaces —\n`\"bottom\"`, `\"top bottom\"`, up to all four in any order. Drawn as the\nbox's own border inside the declared size, in `--vf-black`, scaled with\nthe display like every kit frame's border; content and placed children\nbegin inside it.\nUnset, no rule; a value naming anything but an edge draws none and\nwarns once.",
2293
+ "description": "The 1px rule on the box's edges: edge names separated by spaces —\n`\"bottom\"`, `\"top bottom\"`, up to all four in any order. Drawn inside\nthe declared size, in `--vf-black`, scaled with the display like every\nkit frame; content and placed children begin inside it.\nUnset, no rule; a value naming anything but an edge draws none and\nwarns once.",
2294
2294
  "attribute": "rule"
2295
2295
  },
2296
2296
  {
@@ -2443,7 +2443,7 @@
2443
2443
  "type": {
2444
2444
  "text": "string | null | undefined"
2445
2445
  },
2446
- "description": "The 1px rule on the box's edges: edge names separated by spaces —\n`\"bottom\"`, `\"top bottom\"`, up to all four in any order. Drawn as the\nbox's own border inside the declared size, in `--vf-black`, scaled with\nthe display like every kit frame's border; content and placed children\nbegin inside it.\nUnset, no rule; a value naming anything but an edge draws none and\nwarns once.",
2446
+ "description": "The 1px rule on the box's edges: edge names separated by spaces —\n`\"bottom\"`, `\"top bottom\"`, up to all four in any order. Drawn inside\nthe declared size, in `--vf-black`, scaled with the display like every\nkit frame; content and placed children begin inside it.\nUnset, no rule; a value naming anything but an edge draws none and\nwarns once.",
2447
2447
  "fieldName": "rule"
2448
2448
  },
2449
2449
  {
@@ -15308,7 +15308,7 @@
15308
15308
  "declarations": [
15309
15309
  {
15310
15310
  "kind": "class",
15311
- "description": "`<vf-separator>` — a 1px System 7 rule.\n\nHorizontal by default (1px tall, full width); set the `vertical` attribute\nfor a 1px-wide vertical rule (give it a height, or let a flex parent\nstretch it).\n\nContainers may restyle it via custom properties:\n- `--vf-separator-color` — line color (default `var(--vf-black, #000)`).\n- `--vf-separator-style` — line style, e.g. `dotted` (default `solid`).\n `vf-menu` sets these so slotted separators render as the classic dimmed\n dotted menu rule (see Menus.png).",
15311
+ "description": "`<vf-separator>` — a 1px System 7 rule.\n\nHorizontal by default (1px tall, full width); set the `vertical` attribute\nfor a 1px-wide vertical rule (give it a height, or let a flex parent\nstretch it).\n\nContainers may restyle it via custom properties:\n- `--vf-separator-color` — line color (default `var(--vf-black, #000)`).\n- `--vf-separator-style` — `solid` (the default) or `dotted`, one system px\n on and one off. `vf-menu` sets these so slotted separators render as the\n classic dimmed dotted menu rule (see Menus.png).",
15312
15312
  "name": "VfSeparator",
15313
15313
  "cssProperties": [
15314
15314
  {
@@ -15316,7 +15316,7 @@
15316
15316
  "name": "--vf-separator-color"
15317
15317
  },
15318
15318
  {
15319
- "description": "`vf-separator` rule style — `vf-menu` sets `dotted` (see `Menus.png`)",
15319
+ "description": "`vf-separator` rule style: `solid` or `dotted` — `vf-menu` sets `dotted` (see `Menus.png`)",
15320
15320
  "name": "--vf-separator-style",
15321
15321
  "default": "solid"
15322
15322
  }
@@ -2,10 +2,11 @@ import { type PropertyValues } from 'lit';
2
2
  import { VfFormControl } from '../form-control.js';
3
3
  declare const VfCheckbox_base: (new (...args: any[]) => import("../position.js").VfPositionedInterface) & (abstract new (...args: any[]) => import("../toggle-control.js").VfToggleControlInterface) & typeof VfFormControl;
4
4
  /**
5
- * The classic System 7 checkbox: a 13×13 white square with a 1px black
5
+ * The classic System 7 checkbox: a 12×12 white square with a 1px black
6
6
  * border whose checked state is the corner-to-corner ✕ glyph — the pixel-exact
7
- * cross traced from the Classic Macintosh UI Kit sprite. The border "thickens"
8
- * while pressed, exactly like the original control.
7
+ * cross traced from the Classic Macintosh UI Kit sprite, filling the 10×10
8
+ * interior. The border "thickens" while pressed, exactly like the original
9
+ * control.
9
10
  *
10
11
  * Form-associated: submits `value` under `name` when checked (like a native
11
12
  * checkbox) and restores its initial checked state on form reset. Toggles on
@@ -13,8 +14,8 @@ declare const VfCheckbox_base: (new (...args: any[]) => import("../position.js")
13
14
  *
14
15
  * @slot - The label, rendered to the right of the box with a 6px gap.
15
16
  * Left empty, the label and its gap collapse: the control is the bare
16
- * 13×13 box.
17
- * @csspart box - The 13×13 checkbox square.
17
+ * 12×12 box.
18
+ * @csspart box - The 12×12 checkbox square.
18
19
  * @csspart label - The label wrapper around the slot.
19
20
  * @fires vf-change - When toggled by user interaction. `detail: { checked: boolean }`.
20
21
  * @fires input - Native event, dispatched from the host per user toggle (with
@@ -4,33 +4,34 @@ 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 { vfDisplay as a } from "../styles/recipes/display-face.js";
6
6
  import { vfBase as o } from "../styles/recipes/host.js";
7
- import { vfFocusUnderline as s } from "../styles/recipes/focus.js";
8
- import { vfToggle as c } from "../styles/recipes/toggle.js";
9
- import { CHECKBOX_X as l, glyphSvg as u } from "../glyphs.js";
10
- import { VfFormControl as d } from "../form-control.js";
11
- import { VfToggleControl as f } from "../toggle-control.js";
12
- import { css as p, html as m } from "lit";
13
- import { property as h, state as g } from "lit/decorators.js";
14
- import { classMap as _ } from "lit/directives/class-map.js";
7
+ import { vfStrokeDecls as s, vfStrokeInset as c, vfStrokeShadow as l } from "../styles/recipes/stroke.js";
8
+ import { vfFocusUnderline as u } from "../styles/recipes/focus.js";
9
+ import { vfToggle as d } from "../styles/recipes/toggle.js";
10
+ import { CHECKBOX_X as f, glyphSvg as p } from "../glyphs.js";
11
+ import { VfFormControl as m } from "../form-control.js";
12
+ import { VfToggleControl as h } from "../toggle-control.js";
13
+ import { css as g, html as _ } from "lit";
14
+ import { property as v, state as y } from "lit/decorators.js";
15
+ import { classMap as b } from "lit/directives/class-map.js";
15
16
  //#region src/components/vf-checkbox.ts
16
- var v = class extends i(f(d)) {
17
+ var x = class extends i(h(m)) {
17
18
  static {
18
19
  this.styles = [
19
20
  o,
20
21
  a,
21
- c,
22
- p`
22
+ d,
23
+ g`
23
24
  /* Keyboard focus underlines the box itself — not the label, and not a
24
- ring around either (see vfFocusUnderline). Both adjustments below are
25
- the 1px border: an absolutely positioned pseudo sizes to the PADDING
26
- box, which the border sits outside of. So the rule grows 1px each side
27
- to span the whole well, and its offset counts the border before the
28
- blank row and the rule itself: −(1 + 1 + 1). */
25
+ ring around either (see vfFocusUnderline). An absolutely positioned
26
+ pseudo sizes to the padding box, which runs under the box's stroke,
27
+ so the rule spans the whole well and −2 puts it one blank row under
28
+ it. Under forced colors the stroke is a border and the padding box
29
+ sits inside it, so the insets grow by it there. */
29
30
  :host(:focus-visible) .box::after {
30
- --vf-focus-underline-offset: -3px;
31
- ${s}
32
- left: calc(var(--vf-scale, 1) * -1px);
33
- right: calc(var(--vf-scale, 1) * -1px);
31
+ ${u}
32
+ bottom: ${c(-3)};
33
+ left: ${c(-1)};
34
+ right: ${c(-1)};
34
35
  }
35
36
  .box {
36
37
  position: relative;
@@ -38,28 +39,31 @@ var v = class extends i(f(d)) {
38
39
  display: flex;
39
40
  align-items: center;
40
41
  justify-content: center;
41
- width: calc(var(--vf-scale, 1) * 13px);
42
- height: calc(var(--vf-scale, 1) * 13px);
42
+ width: calc(var(--vf-scale, 1) * 12px);
43
+ height: calc(var(--vf-scale, 1) * 12px);
43
44
  background: var(--vf-white, #fff);
44
- border: calc(var(--vf-scale, 1) * 1px) solid var(--vf-black, #000);
45
45
  color: var(--vf-black, #000);
46
+ ${s()}
46
47
  }
47
- /* Pressed: border thickens to 2px (classic press feedback). */
48
+ /* Pressed: the line thickens to 2px (classic press feedback), inward,
49
+ over the padding the 1px stroke leaves the glyph. */
48
50
  :host(:active) .box:not(.dim) {
49
- box-shadow: inset 0 0 0 calc(var(--vf-scale, 1) * 1px) var(--vf-black, #000);
51
+ box-shadow: ${l(2)};
50
52
  }
51
53
  /* Forced colors never paints box-shadow, so the press feedback above
52
54
  goes silent. The same thickening as a real border-width change: with
53
- box-sizing: border-box the 13×13 box holds and the extra pixel grows
54
- inward, exactly where the inset shadow painted. */
55
+ box-sizing: border-box the 12×12 box holds and the extra pixel grows
56
+ inward, exactly where the inset shadow paints. */
55
57
  @media (forced-colors: active) {
56
58
  :host(:active) .box:not(.dim) {
57
59
  border-width: calc(var(--vf-scale, 1) * 2px);
58
60
  }
59
61
  }
60
- /* Native 12×12 sprite — centered in the 13×13 box; the glyph's own 1px
61
- transparent margin lets it overhang onto the border harmlessly. Scales
62
- with the box; crispEdges keeps it whole-device-pixel at any dpr. */
62
+ /* Native 12×12 sprite, the box's own size: centered on the 10×10
63
+ interior it covers the box exactly, its 1px transparent margin over
64
+ the frame, so the ✕ fills the interior corner to corner on whole
65
+ system px — the sprite's own registration. Scales with the box;
66
+ crispEdges keeps it whole-device-pixel at any dpr. */
63
67
  .check {
64
68
  flex: none;
65
69
  width: calc(var(--vf-scale, 1) * 12px);
@@ -93,9 +97,9 @@ var v = class extends i(f(d)) {
93
97
  }
94
98
  render() {
95
99
  let e = this.isDisabled;
96
- return m`
100
+ return _`
97
101
  <span
98
- class=${_({
102
+ class=${b({
99
103
  box: !0,
100
104
  dim: e,
101
105
  "vf-snap": !0
@@ -103,10 +107,10 @@ var v = class extends i(f(d)) {
103
107
  part="box"
104
108
  aria-hidden="true"
105
109
  >
106
- ${u(l, "check")}
110
+ ${p(f, "check")}
107
111
  </span>
108
112
  <span
109
- class=${_({
113
+ class=${b({
110
114
  label: !0,
111
115
  dim: e,
112
116
  empty: !this._hasLabel,
@@ -135,9 +139,9 @@ var v = class extends i(f(d)) {
135
139
  this.checked = !this.checked, this.focus(), e(this, "vf-change", { checked: this.checked }), t(this, "input"), t(this, "change");
136
140
  }
137
141
  };
138
- r([h({
142
+ r([v({
139
143
  type: Boolean,
140
144
  reflect: !0
141
- })], v.prototype, "checked", void 0), r([h({ reflect: !0 })], v.prototype, "name", void 0), r([h()], v.prototype, "value", void 0), r([g()], v.prototype, "_hasLabel", void 0), v = r([n("vf-checkbox")], v);
145
+ })], x.prototype, "checked", void 0), r([v({ reflect: !0 })], x.prototype, "name", void 0), r([v()], x.prototype, "value", void 0), r([y()], x.prototype, "_hasLabel", void 0), x = r([n("vf-checkbox")], x);
142
146
  //#endregion
143
- export { v as VfCheckbox };
147
+ export { x as VfCheckbox };
@@ -47,11 +47,10 @@ declare const VfContainer_base: (new (...args: any[]) => import("../size.js").Vf
47
47
  *
48
48
  * **`rule` draws the 1px rule on the edges it names** — `rule="bottom"` is
49
49
  * the menu bar's anatomy (the box's rows over one row of ink), `rule="top"`
50
- * a status strip's, all four a framed box. The rule is the box's own border
51
- * ({@link vfRule}), inside the declared size, so a 24px `rule="bottom"`
52
- * strip is 23 rows of box over the line; content, `fill-width` children and
53
- * placed children begin inside it, as a rectangle's interior begins inside
54
- * FrameRect's line.
50
+ * a status strip's, all four a framed box. The rule is drawn inside the
51
+ * declared size ({@link vfRule}), so a 24px `rule="bottom"` strip is 23 rows
52
+ * of box over the line; content, `fill-width` children and placed children
53
+ * begin inside it, as a rectangle's interior begins inside FrameRect's line.
55
54
  *
56
55
  * **`pattern` fills the box with a 1-bit pattern**: one of the 38 standard
57
56
  * MacPaint patterns by name (`pattern="bricks"`, `pattern="gray-50"` —
@@ -66,10 +65,10 @@ declare const VfContainer_base: (new (...args: any[]) => import("../size.js").Vf
66
65
  * **It holds its box on the device-pixel grid** — with a `GridSnapController`.
67
66
  * A container's box is itself the consumer's coordinate system, including for
68
67
  * non-`vf` content that cannot correct itself, so the box is the thing to
69
- * hold on the grid. The shadow box below owns the `position: relative` anchor
70
- * and the `vf-snap` class together, so the correction
71
- * moves the whole coordinate system — everything placed against it rides
72
- * along instead of being re-corrected child by child. (`vf-stack` shipped
68
+ * hold on the grid. The correction lands on the shadow box below, and the
69
+ * coordinate system sits inside it, so the correction moves the whole
70
+ * coordinate system — everything placed against it rides along instead of
71
+ * being re-corrected child by child. (`vf-stack` shipped
73
72
  * without a controller on the theory that slotted `vf-*` children correct
74
73
  * their own origins; this component is where that theory's gap — consumer
75
74
  * content — became visible, and the stack has since adopted the same
@@ -106,10 +105,9 @@ export declare class VfContainer extends VfContainer_base {
106
105
  private _pattern;
107
106
  /**
108
107
  * The 1px rule on the box's edges: edge names separated by spaces —
109
- * `"bottom"`, `"top bottom"`, up to all four in any order. Drawn as the
110
- * box's own border inside the declared size, in `--vf-black`, scaled with
111
- * the display like every kit frame's border; content and placed children
112
- * begin inside it.
108
+ * `"bottom"`, `"top bottom"`, up to all four in any order. Drawn inside
109
+ * the declared size, in `--vf-black`, scaled with the display like every
110
+ * kit frame; content and placed children begin inside it.
113
111
  * Unset, no rule; a value naming anything but an edge draws none and
114
112
  * warns once.
115
113
  */
@@ -44,21 +44,33 @@ var v = class extends f(r(p)) {
44
44
  text-align: inherit;
45
45
  }
46
46
 
47
- /* The coordinate system, as one shadow box coinciding with the host box.
48
- vf-snap (vfBase) gives it position: relative plus the controller's
49
- --vf-snap-dx/-dy offset — so it is BOTH the positioning anchor for
50
- children placed with top/left (src/position.ts) AND the element the
51
- grid-snap correction lands on. One element owning both is the point:
52
- corrected, it takes every placed child with it, kit or not. */
47
+ /* The painted box, coinciding with the host box: the pattern, the rule
48
+ and the grid-snap correction (vf-snap, vfBase — position: relative
49
+ plus the controller's --vf-snap-dx/-dy offset). The coordinate system
50
+ rides inside it (the slot, below), so the correction takes every
51
+ placed child with it, kit or not. */
53
52
  .box {
54
- /* flow-root: contain slotted margins, so the box's top edge — the
55
- origin placed children measure from — stays glued to the host's
56
- corner instead of being pushed down by a first child's margin
57
- collapsing through. */
58
- display: flow-root;
59
53
  /* Coincide with a declared height (100% of a definite host height;
60
54
  against an undeclared one it computes to auto and wraps content),
61
- so slotted percentage fills resolve against the stated box. */
55
+ so the slot inside can take the stated box. */
56
+ height: 100%;
57
+ /* The pattern starts inside the rule, as it did when the rule was a
58
+ border. */
59
+ background-origin: content-box;
60
+ }
61
+ /* The coordinate system: the slot, as a box inside the rule — the
62
+ rule's row is the painted box's padding (vfRule) — so content,
63
+ percentage fills and children placed with top/left (src/position.ts)
64
+ all begin inside it. */
65
+ .box > slot {
66
+ position: relative;
67
+ /* flow-root: contain slotted margins, so the top edge — the origin
68
+ placed children measure from — stays glued to the box's corner
69
+ instead of being pushed down by a first child's margin collapsing
70
+ through. */
71
+ display: flow-root;
72
+ /* The stated box less its rules, so slotted percentage fills resolve
73
+ against it; auto against an undeclared height. */
62
74
  height: 100%;
63
75
  }
64
76
 
@@ -4,40 +4,48 @@ import n from "../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js
4
4
  import { VfPositioned as r } from "../position.js";
5
5
  import { vfDisplayDecls as i } from "../styles/recipes/display-face.js";
6
6
  import { vfBase as a } from "../styles/recipes/host.js";
7
- import { GridSnapController as o } from "../grid-snap.js";
8
- import { LitElement as s, css as c, html as l, nothing as u } from "lit";
9
- import { property as d, state as f } from "lit/decorators.js";
10
- import { classMap as p } from "lit/directives/class-map.js";
7
+ import { vfStrokeDecls as o, vfStrokeInset as s } from "../styles/recipes/stroke.js";
8
+ import { GridSnapController as c } from "../grid-snap.js";
9
+ import { LitElement as l, css as u, html as d, nothing as f } from "lit";
10
+ import { property as p, state as m } from "lit/decorators.js";
11
+ import { classMap as h } from "lit/directives/class-map.js";
11
12
  //#region src/components/vf-fieldset.ts
12
- var m = class extends r(s) {
13
+ var g = class extends r(l) {
13
14
  constructor(...e) {
14
- super(...e), this.scale = new t(this), this.gridSnap = new o(this), this.legend = "", this._hasSlottedLegend = !1;
15
+ super(...e), this.scale = new t(this), this.gridSnap = new c(this), this.legend = "", this._hasSlottedLegend = !1;
15
16
  }
16
17
  static {
17
- this.styles = [a, c`
18
+ this.styles = [a, u`
18
19
  :host {
19
20
  display: block;
20
21
  }
21
22
  .fieldset {
22
23
  position: relative;
23
- border: calc(var(--vf-scale, 1) * 1px) solid var(--vf-black, #000);
24
+ margin-top: calc(var(--vf-scale, 1) * 8px);
25
+ ${o()}
26
+ }
27
+ /* The rule is a stroke, so the box's own padding box runs under it: the
28
+ slot is the box inside it, where the content sits 14/12/10px in and
29
+ children placed with top/left measure from the rule's inner edge. */
30
+ .fieldset > slot {
31
+ display: block;
32
+ position: relative;
24
33
  padding: calc(var(--vf-scale, 1) * 14px) calc(var(--vf-scale, 1) * 12px)
25
34
  calc(var(--vf-scale, 1) * 10px);
26
- margin-top: calc(var(--vf-scale, 1) * 8px);
27
35
  }
28
36
  .legend {
29
37
  /* Chicago-style legend (chrome); grouped content keeps the body face. */
30
38
  ${i}
31
39
  position: absolute;
32
- /* Whole system px like every other length here. Authored as -0.7em
33
- this was 11.2px against the 16px display face — off the device grid
34
- at every scale, and it took a slotted legend with it (verify:grid).
35
- 11 keeps the legend straddling the border, a fifth of a system px
36
- lower. */
37
- top: calc(var(--vf-scale, 1) * -11px);
38
- left: calc(var(--vf-scale, 1) * 8px);
40
+ /* Whole system px like every other length here, measured from the
41
+ rule's inner edge. Authored as -0.7em this was 11.2px against the
42
+ 16px display face — off the device grid at every scale, and it took
43
+ a slotted legend with it (verify:grid). 11 keeps the legend
44
+ straddling the rule, a fifth of a system px lower. */
45
+ top: ${s(-11)};
46
+ left: ${s(8)};
39
47
  padding: 0 calc(var(--vf-scale, 1) * 5px);
40
- /* Punches through the border, matching the surface behind it. */
48
+ /* Punches through the rule, matching the surface behind it. */
41
49
  background: var(--vf-surface, var(--vf-white, #fff));
42
50
  white-space: nowrap;
43
51
  }
@@ -48,16 +56,16 @@ var m = class extends r(s) {
48
56
  }
49
57
  render() {
50
58
  let e = !this.legend && !this._hasSlottedLegend;
51
- return l`
59
+ return d`
52
60
  <div
53
61
  class="fieldset vf-snap"
54
62
  part="fieldset"
55
63
  role="group"
56
- aria-labelledby=${e ? u : "legend"}
64
+ aria-labelledby=${e ? f : "legend"}
57
65
  >
58
66
  <span
59
67
  id="legend"
60
- class=${p({
68
+ class=${h({
61
69
  legend: !0,
62
70
  empty: e
63
71
  })}
@@ -76,6 +84,6 @@ var m = class extends r(s) {
76
84
  this._hasSlottedLegend = t.assignedNodes({ flatten: !0 }).length > 0;
77
85
  }
78
86
  };
79
- n([d()], m.prototype, "legend", void 0), n([f()], m.prototype, "_hasSlottedLegend", void 0), m = n([e("vf-fieldset")], m);
87
+ n([p()], g.prototype, "legend", void 0), n([m()], g.prototype, "_hasSlottedLegend", void 0), g = n([e("vf-fieldset")], g);
80
88
  //#endregion
81
- export { m as VfFieldset };
89
+ export { g as VfFieldset };