vintage-frames 0.2.1 → 0.3.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.
@@ -3881,7 +3881,7 @@
3881
3881
  "declarations": [
3882
3882
  {
3883
3883
  "kind": "class",
3884
- "description": "`<vf-icon>` — a Finder icon: pixel art in a reserved cell with its name on a\nplate below, selectable, movable and renameable in place.\n\nIt is the one composite in the kit whose parts already existed separately —\n`vf-img` draws the art, `vf-list-item` inverts on selection, `vf-window`\ndrags — and the reason to have it anyway is that the *icon* is the unit the\nFinder actually manipulates. A picture and a caption that select together,\nmove together and rename together is a control, not a layout.\n\n### The art arrives by slot\n\nTwo slots, one per resource size — `large` is the 32×32 `ICN#` and `small`\nthe 16×16 `ics#` — each holding a `vf-img` around the consumer's own `<img>`:\n\n```html\n<vf-icon label=\"Macintosh HD\" selectable movable editable>\n <vf-img slot=\"large\"><img src=\"hd-32.png\" alt=\"\"></vf-img>\n <vf-img slot=\"small\"><img src=\"hd-16.png\" alt=\"\"></vf-img>\n</vf-icon>\n```\n\nSlots rather than `src` properties, for the reason `vf-img` exists at all:\nthe kit ships no raster files and never builds an `<img>` on a consumer's\nbehalf, so the graphic stays a real element in the light DOM with its own\n`alt`, `srcset`, loading behavior and asset URLs. A `src` string can express\nnone of that, and it could not hold an inline `<svg>` or a `<canvas>` either.\n`vf-list-item`'s `icon` slot makes the same trade.\n\nThe cost is that both files fetch even though one paints — pay it with two\ndata URIs, or slot only the size that view uses.\n\n### The cell is reserved, the art is registered in it\n\n`size` picks which slot paints *and* the cell it paints in: 32×32 or 16×16,\nheld whether or not there is art for it. A folder is 32×20 of ink and a\ndocument 25×32, and a row of them keeps one baseline only because the cell —\nnot the ink — is the unit, which is what an icon resource always was.\n\n### Everything centered lands on a whole pixel, by parity\n\nThe frame centers two things over one axis — the art cell and the name — and\na centered child sits at `(box − child) / 2`. That is a whole number exactly\nwhen the box and the child have the **same parity**. Half a system pixel is\nwhat fringes 1-bit art: the glyph stems smear across two device columns and\ngo gray, while the plate behind them stays sharp, because backgrounds are\npixel-snapped by the compositor and glyphs are not. A crisp plate under a\ngrey name is the signature of exactly this.\n\nSo the component makes the parities agree instead of correcting afterwards.\nThe cell is 32 or 16, and #measurePlate sizes the name plate to a\nwhole **even** number of system px — measured from the text, rounded up. Both\nchildren are then even, and so is every offset, at every display density and\nwhether or not a `width` is declared. Nothing is snapped, nothing leans on\nthe rasterizer, and `verify:icon` asserts both the geometry and that a field\nof names renders without a single gray pixel — with the kit's normal\nantialiasing left on, since a run on whole pixels gives it nothing to smooth.\n\nYour side of it is one rule: **a declared `width` must be even**, since the\ncomponent cannot round a number you chose. Supply art at the cell size too —\nwhich \"one image pixel is one system pixel\" already implies — because art\ndiffering from its cell by an odd number centers the same way.\n\n### Selection inverts, because the art is a 1-bit mask\n\nA System 7 icon is black ink and opaque white on a transparent surround —\nprecisely an image plus its mask — so inverting it flips ink and fill and\nleaves the surround alone, which is the whole of the classic selected\nappearance. `filter: invert(1)` reproduces it exactly for 1-bit art. Color\nart inverts too, into a photographic negative rather than the darkening\nSystem 7 gave it; that is the case to revisit if the kit ever grows a\nselected-state treatment of its own. The label plate inverts to the\n`--vf-highlight` pair, sharing one selection color with `vf-list-item`.\n\n### Open is derived, not shipped\n\nWith `open`, the art redraws as the Finder's open ghost: the outline held\nin solid black, the interior re-filled with the kit's loose 25% dither (the\nscrollbar trough's lattice), the transparent surround untouched. There is\nno second raster and no second fetch — the same alpha channel that makes\nselection an inversion makes the ghost derivable, and `src/open-art.ts`\nderives it from the slotted art by canvas compositing alone. No pixels are\never read back, so a cross-origin image that taints its canvas still works:\ntaint forbids reading, not drawing or displaying.\n\nThe ghost keeps the shape selection expects — ink and opaque white on a\ntransparent surround — so a selected open icon inverts exactly as a closed\none does, with no second treatment. The slot stays in the tree while the\nghost paints, hidden (it is where the art loads, and re-loads, from), and\nart the pipeline cannot draw — nothing slotted yet, a failed load, an\ninline `<svg>` — keeps rendering as itself rather than vanishing behind a\nstate it cannot show.\n\n### `movable`, not `draggable`\n\n`draggable` is a global HTML attribute *and* an `HTMLElement` accessor, so\ndeclaring it would both shadow a platform member and hand the element to the\nbrowser's own drag-and-drop machinery. This is the `align` trap from\n`vf-stack` in a second costume — `align`, `hidden`, `dir`, `draggable` and\n`title` all carry behavior a custom element never asked for. The kit already\nspells this parameter `movable` on `vf-window`, so the icon does too, and it\nmoves the same way: `DragController` tracks the gesture and\n`PlacementController` writes the result into `left`/`top` in whole system px,\nthe art's own unit — the same pair markup places an icon with, so a moved\nicon is still where it was dropped after a zoom.\n\nDragging is a pointer gesture with no keyboard equivalent, which is the kind\nof gap the kit closes rather than inherits (SPEC §1): a focused movable icon\nalso moves under the arrow keys, one system px at a time and eight with\nShift. Focus is what `selectable` grants, so the keyboard half of `movable`\nand `editable` presupposes it — see the role section below.\n\nOpening gets the same treatment. The double-click is the pointer gesture,\nand its keyboard route is ⌘O / ⌘↓ — the System 7 Open shortcuts, with Ctrl\nstanding in for ⌘ off the Mac. Return is deliberately not one of them: the\nFinder's Return renamed, never opened, so on an editable icon it starts the\nedit and on a non-editable one it does nothing at all.\n\n### The name and the art are one target, and the second click decides\n\nA double-click opens the icon *wherever it lands* — the name is as much the\nicon as the picture is, and the Finder never made you aim at the 32 pixels of\nart. But the name is also where a single click renames, so the two gestures\nbegin with the same press and only the second one tells them apart.\n\nSo the rename waits for it. A press on the plate of an already-selected icon\narms the field rather than opening it, and the next press inside\nRENAME_DELAY_MS calls it off — leaving the double-click to open, with\nno rename box flashing up behind it. Nothing needs to *undo* an edit that\nbegan: the press that starts one and the press that opens are the same\npress, so the only thing that can be got right is not committing early.\n\nThe window is generous in the one direction that is cheap. Reading a lone\nclick as a pair costs a wait before the box appears; reading a pair as a lone\nclick renames when the user asked to open. The same reasoning covers a press\nthat turns into a drag, a press elsewhere, and any key — each calls the\npending rename off, because none of them is the click it is waiting for.\n\n### An icon alone is a picture; an icon in a field is an option\n\n`role=\"option\"` is only meaningful inside a `listbox` that owns it. Written\nunconditionally it is not merely untidy — the browser *drops* it, and\n`aria-selected` with it, so a `selectable` icon announced as a bare generic\nand its selection state reached assistive tech nowhere at all.\n\nSo the role follows the container. Owned, the icon is an `option` that names\nitself from its plate and publishes `aria-selected`. Unowned, it degrades to\n`role=\"img\"` with a name — the same vocabulary the derived open ghost uses,\nand true of what it is. Deliberately not `button`: that would promise Enter\nand Space activate, and here Return *renames* while the open route is ⌘O / ⌘↓.\n\nDeclaring the owner is one attribute on whatever already holds the field, and\nit is what buys the selection state back:\n\n```html\n<div role=\"listbox\" aria-label=\"Desktop\" aria-multiselectable=\"true\">\n <vf-icon label=\"Macintosh HD\" selectable movable editable>…</vf-icon>\n <vf-icon label=\"Trash\" selectable movable editable>…</vf-icon>\n</div>\n```\n\nA `vf-desktop` cannot be that container itself: it also holds windows and a\nmenu bar, and a non-`option` child of a listbox is invalid the same way the\norphaned option was. The plain wrapper above is layout-neutral — placed icons\nanchor to the nearest *positioned* ancestor, which is still the desktop's\nraster. One divergence from the APG listbox is deliberate: its options share\na single roving tab stop, while these stay one stop each, the way a Finder\nicon is reached on its own.\n\n**`selectable` is what makes an icon focusable**, and `movable`/`editable`\npresuppose it. That is the Finder's own model — you cannot move or rename\nwhat you have not selected — and the pointer path already assumed it: the\nrename opens on a press on the plate of an *already-selected* icon. A\n`movable`-only icon is a picture you can drag, not a widget.\n\n### The label is a property, because it is editable\n\nThe caption is `label` rather than slotted content: renaming means the\ncomponent owns the string and hands it back on `vf-change`, and it cannot own\ntext that lives in the consumer's DOM. An empty `label` draws no plate at\nall — that *is* the \"no label\" parameter, in preference to a second attribute\nthat could disagree with it. `editable` then lets a click on the plate of an\nalready-selected icon open the rename box a moment later, as the Finder's\ndoes (see above), with Return committing, Escape reverting, and the plate\nwidening as you type.\n\n### A name is never abbreviated, and never folded\n\nThere is no ellipsis, no clipping and no wrapping: one line, always. System 7\nsolved the long-name problem at the *other* end — HFS capped a filename at 31\ncharacters — so the Finder could afford to always draw the name in full, and\ndid. A name wider than its cell simply overflows it, centered, the way a name\nwider than a 32-pixel icon always did.\n\nStaying on one line is also what keeps the name on the grid: a single run has\na single measured width, so the even-plate rule above is one number rather\nthan one per line, each with its own parity. `width` is therefore the cell —\nthe grid pitch — not a bound on the name.\n\n`maxlength` (31) bounds the rename field rather than the `label` property:\nthe name belongs to the consumer's model, and truncating one handed to us\nwould lose data.\n\nThe box hugs its text while you type it, not only once you are done, which is\nwhat keeps the name from moving when the edit commits: the plate is the same\nwidth either side of it, so the glyphs stay exactly where they were.\n\nA file also has to be called *something*, so a rename committed empty — or\nas nothing but spaces — is refused rather than applied, and the previous name\ncomes back, which is what System 7 did. An empty `label` is still a perfectly\ngood state to *start* in, though: a freshly made icon has no name until it is\ngiven one. Such an icon draws no plate but stays selectable, focusable and\nrenameable — Return opens a field, and an edit with nothing in it yet is the\none time the box stops hugging and reserves a cell's width, since a field you\ncannot see is one you cannot type into.",
3884
+ "description": "`<vf-icon>` — a Finder icon: pixel art in a reserved cell with its name on a\nplate below, selectable, movable and renameable in place.\n\nIt is the one composite in the kit whose parts already existed separately —\n`vf-img` draws the art, `vf-list-item` inverts on selection, `vf-window`\ndrags — and the reason to have it anyway is that the *icon* is the unit the\nFinder actually manipulates. A picture and a caption that select together,\nmove together and rename together is a control, not a layout.\n\n### The art arrives by slot\n\nTwo slots, one per resource size — `large` is the 32×32 `ICN#` and `small`\nthe 16×16 `ics#` — each holding a `vf-img` around the consumer's own `<img>`:\n\n```html\n<vf-icon label=\"Macintosh HD\" selectable movable editable>\n <vf-img slot=\"large\"><img src=\"hd-32.png\" alt=\"\"></vf-img>\n <vf-img slot=\"small\"><img src=\"hd-16.png\" alt=\"\"></vf-img>\n</vf-icon>\n```\n\nSlots rather than `src` properties, for the reason `vf-img` exists at all:\nthe kit ships no raster files and never builds an `<img>` on a consumer's\nbehalf, so the graphic stays a real element in the light DOM with its own\n`alt`, `srcset`, loading behavior and asset URLs. A `src` string can express\nnone of that, and it could not hold an inline `<svg>` or a `<canvas>` either.\n`vf-list-item`'s `icon` slot makes the same trade.\n\nThe cost is that both files fetch even though one paints — pay it with two\ndata URIs, or slot only the size that view uses.\n\n### The cell is reserved, the art is registered in it\n\n`size` picks which slot paints *and* the cell it paints in: 32×32 or 16×16,\nheld whether or not there is art for it. A folder is 32×20 of ink and a\ndocument 25×32, and a row of them keeps one baseline only because the cell —\nnot the ink — is the unit, which is what an icon resource always was.\n\n### Everything centered lands on a whole pixel, by parity\n\nThe frame centers two things over one axis — the art cell and the name — and\na centered child sits at `(box − child) / 2`. That is a whole number exactly\nwhen the box and the child have the **same parity**. Half a system pixel is\nwhat fringes 1-bit art: the glyph stems smear across two device columns and\ngo gray, while the plate behind them stays sharp, because backgrounds are\npixel-snapped by the compositor and glyphs are not. A crisp plate under a\ngrey name is the signature of exactly this.\n\nSo the component makes the parities agree instead of correcting afterwards.\nThe cell is 32 or 16, and #measurePlate sizes the name plate to a\nwhole **even** number of system px — measured from the text, rounded up. Both\nchildren are then even, and so is every offset, at every display density and\nwhether or not a `width` is declared. Nothing is snapped, nothing leans on\nthe rasterizer, and `verify:icon` asserts both the geometry and that a field\nof names renders without a single gray pixel — with the kit's normal\nantialiasing left on, since a run on whole pixels gives it nothing to smooth.\n\nYour side of it is one rule: **a declared `width` must be even**, since the\ncomponent cannot round a number you chose. Supply art at the cell size too —\nwhich \"one image pixel is one system pixel\" already implies — because art\ndiffering from its cell by an odd number centers the same way.\n\n### Selection inverts, because the art is a 1-bit mask\n\nA System 7 icon is black ink and opaque white on a transparent surround —\nprecisely an image plus its mask — so inverting it flips ink and fill and\nleaves the surround alone, which is the whole of the classic selected\nappearance. `filter: invert(1)` reproduces it exactly for 1-bit art. Color\nart would invert into a photographic negative, which was never what\nSystem 7 showed: declare `color` and selection **darkens** the art\ninstead — Icon Utilities' ttSelected transform, every color blended\nhalfway toward black (`brightness(0.5)`), whites going gray, the\ntransparent surround still untouched. The declaration is the consumer's\nbecause the component cannot tell color art from a mask by looking at a\nslotted image. It covers whatever the cell shows, the derived open ghost\nincluded, so a color icon has one selected treatment open or closed. The\nlabel plate inverts to the `--vf-highlight` pair either way, sharing one\nselection color with `vf-list-item` — the selected name was inverted\nwhatever the art.\n\n### Open is derived, not shipped\n\nWith `open`, the art redraws as the Finder's open ghost: the outline held\nin solid black, the interior re-filled with the kit's loose 25% dither (the\nscrollbar trough's lattice), the transparent surround untouched. There is\nno second raster and no second fetch — the same alpha channel that makes\nselection an inversion makes the ghost derivable, and `src/open-art.ts`\nderives it from the slotted art by canvas compositing alone. No pixels are\never read back, so a cross-origin image that taints its canvas still works:\ntaint forbids reading, not drawing or displaying.\n\nThe ghost keeps the shape selection expects — ink and opaque white on a\ntransparent surround — so a selected open icon inverts exactly as a closed\none does, with no second treatment. The slot stays in the tree while the\nghost paints, hidden (it is where the art loads, and re-loads, from), and\nart the pipeline cannot draw — nothing slotted yet, a failed load, an\ninline `<svg>` — keeps rendering as itself rather than vanishing behind a\nstate it cannot show.\n\n### `movable`, not `draggable`\n\n`draggable` is a global HTML attribute *and* an `HTMLElement` accessor, so\ndeclaring it would both shadow a platform member and hand the element to the\nbrowser's own drag-and-drop machinery. This is the `align` trap from\n`vf-stack` in a second costume — `align`, `hidden`, `dir`, `draggable` and\n`title` all carry behavior a custom element never asked for. The kit already\nspells this parameter `movable` on `vf-window`, so the icon does too, and it\nmoves the same way: `DragController` tracks the gesture and\n`PlacementController` writes the result into `left`/`top` in whole system px,\nthe art's own unit — the same pair markup places an icon with, so a moved\nicon is still where it was dropped after a zoom.\n\nDragging is a pointer gesture with no keyboard equivalent, which is the kind\nof gap the kit closes rather than inherits (SPEC §1): a focused movable icon\nalso moves under the arrow keys, one system px at a time and eight with\nShift. Focus is what `selectable` grants, so the keyboard half of `movable`\nand `editable` presupposes it — see the role section below.\n\nOpening gets the same treatment. The double-click is the pointer gesture,\nand its keyboard route is ⌘O / ⌘↓ — the System 7 Open shortcuts, with Ctrl\nstanding in for ⌘ off the Mac. Return is deliberately not one of them: the\nFinder's Return renamed, never opened, so on an editable icon it starts the\nedit and on a non-editable one it does nothing at all.\n\n### The name and the art are one target, and the second click decides\n\nA double-click opens the icon *wherever it lands* — the name is as much the\nicon as the picture is, and the Finder never made you aim at the 32 pixels of\nart. But the name is also where a single click renames, so the two gestures\nbegin with the same press and only the second one tells them apart.\n\nSo the rename waits for it. A press on the plate of an already-selected icon\narms the field rather than opening it, and the next press inside\nRENAME_DELAY_MS calls it off — leaving the double-click to open, with\nno rename box flashing up behind it. Nothing needs to *undo* an edit that\nbegan: the press that starts one and the press that opens are the same\npress, so the only thing that can be got right is not committing early.\n\nThe window is generous in the one direction that is cheap. Reading a lone\nclick as a pair costs a wait before the box appears; reading a pair as a lone\nclick renames when the user asked to open. The same reasoning covers a press\nthat turns into a drag, a press elsewhere, and any key — each calls the\npending rename off, because none of them is the click it is waiting for.\n\n### An icon alone is a picture; an icon in a field is an option\n\n`role=\"option\"` is only meaningful inside a `listbox` that owns it. Written\nunconditionally it is not merely untidy — the browser *drops* it, and\n`aria-selected` with it, so a `selectable` icon announced as a bare generic\nand its selection state reached assistive tech nowhere at all.\n\nSo the role follows the container. Owned, the icon is an `option` that names\nitself from its plate and publishes `aria-selected`. Unowned, it degrades to\n`role=\"img\"` with a name — the same vocabulary the derived open ghost uses,\nand true of what it is. Deliberately not `button`: that would promise Enter\nand Space activate, and here Return *renames* while the open route is ⌘O / ⌘↓.\n\nDeclaring the owner is one attribute on whatever already holds the field, and\nit is what buys the selection state back:\n\n```html\n<div role=\"listbox\" aria-label=\"Desktop\" aria-multiselectable=\"true\">\n <vf-icon label=\"Macintosh HD\" selectable movable editable>…</vf-icon>\n <vf-icon label=\"Trash\" selectable movable editable>…</vf-icon>\n</div>\n```\n\nA `vf-desktop` cannot be that container itself: it also holds windows and a\nmenu bar, and a non-`option` child of a listbox is invalid the same way the\norphaned option was. The plain wrapper above is layout-neutral — placed icons\nanchor to the nearest *positioned* ancestor, which is still the desktop's\nraster. One divergence from the APG listbox is deliberate: its options share\na single roving tab stop, while these stay one stop each, the way a Finder\nicon is reached on its own.\n\n**`selectable` is what makes an icon focusable**, and `movable`/`editable`\npresuppose it. That is the Finder's own model — you cannot move or rename\nwhat you have not selected — and the pointer path already assumed it: the\nrename opens on a press on the plate of an *already-selected* icon. A\n`movable`-only icon is a picture you can drag, not a widget.\n\n### The label is a property, because it is editable\n\nThe caption is `label` rather than slotted content: renaming means the\ncomponent owns the string and hands it back on `vf-change`, and it cannot own\ntext that lives in the consumer's DOM. An empty `label` draws no plate at\nall — that *is* the \"no label\" parameter, in preference to a second attribute\nthat could disagree with it. `editable` then lets a click on the plate of an\nalready-selected icon open the rename box a moment later, as the Finder's\ndoes (see above), with Return committing, Escape reverting, and the plate\nwidening as you type.\n\n### A name is never abbreviated, and never folded\n\nThere is no ellipsis, no clipping and no wrapping: one line, always. System 7\nsolved the long-name problem at the *other* end — HFS capped a filename at 31\ncharacters — so the Finder could afford to always draw the name in full, and\ndid. A name wider than its cell simply overflows it, centered, the way a name\nwider than a 32-pixel icon always did.\n\nStaying on one line is also what keeps the name on the grid: a single run has\na single measured width, so the even-plate rule above is one number rather\nthan one per line, each with its own parity. `width` is therefore the cell —\nthe grid pitch — not a bound on the name.\n\n`maxlength` (31) bounds the rename field rather than the `label` property:\nthe name belongs to the consumer's model, and truncating one handed to us\nwould lose data.\n\nThe box hugs its text while you type it, not only once you are done, which is\nwhat keeps the name from moving when the edit commits: the plate is the same\nwidth either side of it, so the glyphs stay exactly where they were.\n\nA file also has to be called *something*, so a rename committed empty — or\nas nothing but spaces — is refused rather than applied, and the previous name\ncomes back, which is what System 7 did. An empty `label` is still a perfectly\ngood state to *start* in, though: a freshly made icon has no name until it is\ngiven one. Such an icon draws no plate but stays selectable, focusable and\nrenameable — Return opens a field, and an edit with nothing in it yet is the\none time the box stops hugging and reserves a cell's width, since a field you\ncannot see is one you cannot type into.",
3885
3885
  "name": "VfIcon",
3886
3886
  "cssProperties": [
3887
3887
  {
@@ -3969,6 +3969,17 @@
3969
3969
  "attribute": "selected",
3970
3970
  "reflects": true
3971
3971
  },
3972
+ {
3973
+ "kind": "field",
3974
+ "name": "color",
3975
+ "type": {
3976
+ "text": "boolean"
3977
+ },
3978
+ "default": "false",
3979
+ "description": "Declares the slotted art a **color icon**, so selection darkens it — the\nttSelected transform, every color blended halfway toward black — instead\nof inverting it into a photographic negative (see the class doc). Yours\nto declare because the component cannot tell color art from a 1-bit mask\nby looking at a slotted image. The label plate inverts either way.",
3980
+ "attribute": "color",
3981
+ "reflects": true
3982
+ },
3972
3983
  {
3973
3984
  "kind": "field",
3974
3985
  "name": "open",
@@ -4517,6 +4528,15 @@
4517
4528
  "description": "Whether the icon is selected: the art inverts and the plate goes black.",
4518
4529
  "fieldName": "selected"
4519
4530
  },
4531
+ {
4532
+ "name": "color",
4533
+ "type": {
4534
+ "text": "boolean"
4535
+ },
4536
+ "default": "false",
4537
+ "description": "Declares the slotted art a **color icon**, so selection darkens it — the\nttSelected transform, every color blended halfway toward black — instead\nof inverting it into a photographic negative (see the class doc). Yours\nto declare because the component cannot tell color art from a 1-bit mask\nby looking at a slotted image. The label plate inverts either way.",
4538
+ "fieldName": "color"
4539
+ },
4520
4540
  {
4521
4541
  "name": "open",
4522
4542
  "type": {
@@ -5951,6 +5971,17 @@
5951
5971
  "attribute": "rounded",
5952
5972
  "reflects": true
5953
5973
  },
5974
+ {
5975
+ "kind": "field",
5976
+ "name": "shortcuts",
5977
+ "type": {
5978
+ "text": "boolean"
5979
+ },
5980
+ "default": "false",
5981
+ "description": "Makes every slotted menu's item `shortcut`s live key equivalents — one\ndeclaration for the whole bar, the way MenuKey() answered for every menu\nat once. See `vf-menu.shortcuts` (the per-menu grant) and\n`vf-menu-item.shortcut` for the claim contract. Off by default: key\nequivalents are page-global, and only *the* menu bar should own them.",
5982
+ "attribute": "shortcuts",
5983
+ "reflects": true
5984
+ },
5954
5985
  {
5955
5986
  "kind": "field",
5956
5987
  "name": "_menus",
@@ -6218,6 +6249,15 @@
6218
6249
  "description": "Rounds the bar's top corners the way System 7's were: not a curve of the\nbar itself but the black stair-step mask the compact Mac's ROM painted\nover the CRT's rounded corners, which the menu bar wore by sitting flush\nwith the screen top. Drawn as the traced 5-px staircase in `--vf-black`\nink over the bar's own corners — over any backdrop, as the hardware\nmask was.",
6219
6250
  "fieldName": "rounded"
6220
6251
  },
6252
+ {
6253
+ "name": "shortcuts",
6254
+ "type": {
6255
+ "text": "boolean"
6256
+ },
6257
+ "default": "false",
6258
+ "description": "Makes every slotted menu's item `shortcut`s live key equivalents — one\ndeclaration for the whole bar, the way MenuKey() answered for every menu\nat once. See `vf-menu.shortcuts` (the per-menu grant) and\n`vf-menu-item.shortcut` for the claim contract. Off by default: key\nequivalents are page-global, and only *the* menu bar should own them.",
6259
+ "fieldName": "shortcuts"
6260
+ },
6221
6261
  {
6222
6262
  "name": "top",
6223
6263
  "type": {
@@ -6384,7 +6424,7 @@
6384
6424
  "text": "string"
6385
6425
  },
6386
6426
  "default": "''",
6387
- "description": "Keyboard shortcut text, e.g. `\"⌘H\"`, drawn left-aligned in the panel's\nshared shortcut column. Display only in the\nvisual sense — the span is `aria-hidden` so the glyphs never concatenate\ninto the item's accessible name (\"Print… place of interest sign P\") —\nwhile the host mirrors it as `aria-keyshortcuts` (\"Meta+H\"), so AT\nannounces it *as* a shortcut. A consumer's own `aria-keyshortcuts` wins.",
6427
+ "description": "Keyboard shortcut, e.g. `\"⌘H\"`, drawn left-aligned in the panel's\nshared shortcut column. The span is `aria-hidden` so the glyphs never\nconcatenate into the item's accessible name (\"Print… place of interest\nsign P\") the host mirrors it as `aria-keyshortcuts` (\"Meta+H\") instead,\nso AT announces it *as* a shortcut. A consumer's own `aria-keyshortcuts`\nwins.\n\nInside a `vf-menu`/`vf-menu-bar` that declares `shortcuts`, this is a\nLIVE key equivalent, not a legend: a matching keydown anywhere on the\npage activates the item — menu open or not — claiming the stroke with\n`preventDefault()` (see the document keydown handler below for the full\ncontract).",
6388
6428
  "attribute": "shortcut"
6389
6429
  },
6390
6430
  {
@@ -6529,6 +6569,12 @@
6529
6569
  }
6530
6570
  ]
6531
6571
  },
6572
+ {
6573
+ "kind": "field",
6574
+ "name": "#onDocKeydown",
6575
+ "privacy": "private",
6576
+ "description": "The MenuKey() half of shortcut: a document-level ear that answers\nthe item's key equivalent from anywhere on the page, menu open or not —\nso File → Save shows ⌘S *and* answers it, with no page-side plumbing.\n\nLive only under a grant: an ancestor `vf-menu` or `vf-menu-bar` declaring\n`shortcuts`. Key equivalents are page-global — the one thing in the kit\nthat is — and a page may hold several menus (a component reference, a\ndialog mock-up) of which only one is *the* menu bar; the grant says which,\nthe way `applyCursor()` is the page's own call. Checked per event, so\ntoggling the grant needs no re-wiring.\n\nContract, in claim order:\n- A `defaultPrevented` stroke is already someone's — a page handler that\n ran first keeps its key. A match claims with `preventDefault()` (no\n `stopPropagation`), so with several items contesting one key the first\n connected wins and later page listeners still observe the claimed event.\n- A disabled item claims nothing: the stroke falls through untouched, so\n a grayed Undo leaves ⌘Z to the focused field's own native undo.\n- Auto-repeat strokes are claimed but activate only once per press.\n- Activation is the normal path — blink, `vf-menu-select` — plus an\n internal flash request so a *closed* ancestor menu answers by flashing\n its bar title, exactly MenuKey's acknowledgment; the panel never opens\n and focus never moves. An open menu shows the item blink and closes."
6577
+ },
6532
6578
  {
6533
6579
  "kind": "method",
6534
6580
  "name": "activate",
@@ -6636,7 +6682,7 @@
6636
6682
  "text": "string"
6637
6683
  },
6638
6684
  "default": "''",
6639
- "description": "Keyboard shortcut text, e.g. `\"⌘H\"`, drawn left-aligned in the panel's\nshared shortcut column. Display only in the\nvisual sense — the span is `aria-hidden` so the glyphs never concatenate\ninto the item's accessible name (\"Print… place of interest sign P\") —\nwhile the host mirrors it as `aria-keyshortcuts` (\"Meta+H\"), so AT\nannounces it *as* a shortcut. A consumer's own `aria-keyshortcuts` wins.",
6685
+ "description": "Keyboard shortcut, e.g. `\"⌘H\"`, drawn left-aligned in the panel's\nshared shortcut column. The span is `aria-hidden` so the glyphs never\nconcatenate into the item's accessible name (\"Print… place of interest\nsign P\") the host mirrors it as `aria-keyshortcuts` (\"Meta+H\") instead,\nso AT announces it *as* a shortcut. A consumer's own `aria-keyshortcuts`\nwins.\n\nInside a `vf-menu`/`vf-menu-bar` that declares `shortcuts`, this is a\nLIVE key equivalent, not a legend: a matching keydown anywhere on the\npage activates the item — menu open or not — claiming the stroke with\n`preventDefault()` (see the document keydown handler below for the full\ncontract).",
6640
6686
  "fieldName": "shortcut"
6641
6687
  },
6642
6688
  {
@@ -6727,7 +6773,7 @@
6727
6773
  ],
6728
6774
  "cssParts": [
6729
6775
  {
6730
- "description": "The menu title in the bar (inverts while open).",
6776
+ "description": "The menu title in the bar (inverts while open; flashes when a closed menu's item is activated by its key equivalent).",
6731
6777
  "name": "label"
6732
6778
  },
6733
6779
  {
@@ -6790,6 +6836,17 @@
6790
6836
  "attribute": "open",
6791
6837
  "reflects": true
6792
6838
  },
6839
+ {
6840
+ "kind": "field",
6841
+ "name": "shortcuts",
6842
+ "type": {
6843
+ "text": "boolean"
6844
+ },
6845
+ "default": "false",
6846
+ "description": "Makes the items' `shortcut`s live key equivalents: a matching keydown\nanywhere on the page activates the item — menu open or not — and a\nclosed menu answers by flashing its bar title, MenuKey's acknowledgment.\nOff by default because key equivalents are page-global and a page may\nhold several menus of which only one is *the* menu bar; on a bar, declare\nit there once for every menu in it. The full claim contract lives on\n`vf-menu-item.shortcut`.",
6847
+ "attribute": "shortcuts",
6848
+ "reflects": true
6849
+ },
6793
6850
  {
6794
6851
  "kind": "field",
6795
6852
  "name": "barTabIndex",
@@ -6890,6 +6947,41 @@
6890
6947
  "name": "#onCloseRequest",
6891
6948
  "privacy": "private"
6892
6949
  },
6950
+ {
6951
+ "kind": "field",
6952
+ "name": "_flashOn",
6953
+ "type": {
6954
+ "text": "boolean"
6955
+ },
6956
+ "privacy": "private",
6957
+ "default": "false",
6958
+ "description": "`true` while the key-equivalent flash paints the title inverted."
6959
+ },
6960
+ {
6961
+ "kind": "field",
6962
+ "name": "#flashHandle",
6963
+ "privacy": "private",
6964
+ "type": {
6965
+ "text": "BlinkHandle | undefined"
6966
+ }
6967
+ },
6968
+ {
6969
+ "kind": "field",
6970
+ "name": "#onFlashRequest",
6971
+ "privacy": "private",
6972
+ "description": "A key equivalent activated one of this menu's items through the closed\npanel: flash the bar title on the item blink's own cadence, so the\nacknowledgment lands where the user can see it — the item's own blink\nruns unseen inside the hidden panel. An open menu skips it: the dropped\npanel already shows the blink, and the title is inverted the whole time."
6973
+ },
6974
+ {
6975
+ "kind": "method",
6976
+ "name": "#cancelFlash",
6977
+ "privacy": "private",
6978
+ "return": {
6979
+ "type": {
6980
+ "text": "void"
6981
+ }
6982
+ },
6983
+ "description": "Stops an in-flight title flash — opening or teardown takes over."
6984
+ },
6893
6985
  {
6894
6986
  "kind": "field",
6895
6987
  "name": "#onDocPointerDown",
@@ -7105,6 +7197,15 @@
7105
7197
  "description": "Whether the panel is dropped. Reflected. Managed by the parent\n`vf-menu-bar` when present, otherwise by the menu itself.",
7106
7198
  "fieldName": "open"
7107
7199
  },
7200
+ {
7201
+ "name": "shortcuts",
7202
+ "type": {
7203
+ "text": "boolean"
7204
+ },
7205
+ "default": "false",
7206
+ "description": "Makes the items' `shortcut`s live key equivalents: a matching keydown\nanywhere on the page activates the item — menu open or not — and a\nclosed menu answers by flashing its bar title, MenuKey's acknowledgment.\nOff by default because key equivalents are page-global and a page may\nhold several menus of which only one is *the* menu bar; on a bar, declare\nit there once for every menu in it. The full claim contract lives on\n`vf-menu-item.shortcut`.",
7207
+ "fieldName": "shortcuts"
7208
+ },
7108
7209
  {
7109
7210
  "name": "top",
7110
7211
  "type": {
@@ -16733,6 +16834,16 @@
16733
16834
  "description": "the slim `vf-window[variant=\"utility\"]` (windoid) bar — 11px interior + 1px bottom rule, traced from `Windows/utility-window.png`",
16734
16835
  "name": "--vf-titlebar-height-utility",
16735
16836
  "default": "12px"
16837
+ },
16838
+ {
16839
+ "description": "the status strip: 1px rule + 14px interior — the grow box's own height, so the two compose flush",
16840
+ "name": "--vf-status-bar-height",
16841
+ "default": "15px"
16842
+ },
16843
+ {
16844
+ "description": "the body face's native line, which the status strip's text rides (whole-pixel centered in the 14px interior)",
16845
+ "name": "--vf-line-height",
16846
+ "default": "12px"
16736
16847
  }
16737
16848
  ],
16738
16849
  "cssParts": [
@@ -16760,6 +16871,10 @@
16760
16871
  "description": "The content area.",
16761
16872
  "name": "body"
16762
16873
  },
16874
+ {
16875
+ "description": "The bottom status strip (when the `status` slot is populated).",
16876
+ "name": "status-bar"
16877
+ },
16763
16878
  {
16764
16879
  "description": "The resize widget (bottom-right, when `resizable`).",
16765
16880
  "name": "grow-box"
@@ -16773,6 +16888,10 @@
16773
16888
  {
16774
16889
  "description": "Default slot: window body content.",
16775
16890
  "name": ""
16891
+ },
16892
+ {
16893
+ "description": "Optional status-bar content — the classic bottom readout strip (\"40px x 40px\"): a 1px rule over a 15px white band under the body, body-face text on its native line. Takes no space until populated; a `resizable` window's grow box sits flush in its right end.",
16894
+ "name": "status"
16776
16895
  }
16777
16896
  ],
16778
16897
  "members": [
@@ -16872,6 +16991,16 @@
16872
16991
  "attribute": "scrollbars",
16873
16992
  "reflects": true
16874
16993
  },
16994
+ {
16995
+ "kind": "field",
16996
+ "name": "_hasStatus",
16997
+ "type": {
16998
+ "text": "boolean"
16999
+ },
17000
+ "privacy": "private",
17001
+ "default": "false",
17002
+ "description": "Whether the `status` slot has assigned content (drives the strip)."
17003
+ },
16875
17004
  {
16876
17005
  "kind": "field",
16877
17006
  "name": "scale",
@@ -16998,6 +17127,25 @@
16998
17127
  },
16999
17128
  "description": "Both dimensions are required: a window is a fixed box in both axes, and\neach one left out falls back to a different wrong thing.\n\nAn inline `width`/`height` is the other honest way to declare it — the grow\nbox writes exactly that — so it counts. A stylesheet rule we cannot tell\napart from normal block layout, so it still warns."
17000
17129
  },
17130
+ {
17131
+ "kind": "method",
17132
+ "name": "_onStatusSlotChange",
17133
+ "privacy": "private",
17134
+ "return": {
17135
+ "type": {
17136
+ "text": "void"
17137
+ }
17138
+ },
17139
+ "parameters": [
17140
+ {
17141
+ "name": "event",
17142
+ "type": {
17143
+ "text": "Event"
17144
+ }
17145
+ }
17146
+ ],
17147
+ "description": "The `.empty` gate: the strip renders only while the slot is populated."
17148
+ },
17001
17149
  {
17002
17150
  "kind": "method",
17003
17151
  "name": "_onCloseClick",
@@ -17134,6 +17282,10 @@
17134
17282
  {
17135
17283
  "description": "Zoom box clicked. Detail `{}`.",
17136
17284
  "name": "vf-zoom"
17285
+ },
17286
+ {
17287
+ "description": "The grow box resized the window. Detail `{ width, height, commit }`, sizes in whole system px: one event per size the drag writes (`commit: false`), fired after the new box is applied so a handler that measures reads the resized layout, then a final `commit: true` as the gesture settles — only when it changed the size. Fired by the gesture alone: a programmatic `width`/`height` write fires nothing, the way a value set fires no `vf-change`.",
17288
+ "name": "vf-resize"
17137
17289
  }
17138
17290
  ],
17139
17291
  "attributes": [
@@ -71,10 +71,17 @@ declare const VfIcon_base: (new (...args: any[]) => import("../position.js").VfP
71
71
  * precisely an image plus its mask — so inverting it flips ink and fill and
72
72
  * leaves the surround alone, which is the whole of the classic selected
73
73
  * appearance. `filter: invert(1)` reproduces it exactly for 1-bit art. Color
74
- * art inverts too, into a photographic negative rather than the darkening
75
- * System 7 gave it; that is the case to revisit if the kit ever grows a
76
- * selected-state treatment of its own. The label plate inverts to the
77
- * `--vf-highlight` pair, sharing one selection color with `vf-list-item`.
74
+ * art would invert into a photographic negative, which was never what
75
+ * System 7 showed: declare `color` and selection **darkens** the art
76
+ * instead Icon Utilities' ttSelected transform, every color blended
77
+ * halfway toward black (`brightness(0.5)`), whites going gray, the
78
+ * transparent surround still untouched. The declaration is the consumer's
79
+ * because the component cannot tell color art from a mask by looking at a
80
+ * slotted image. It covers whatever the cell shows, the derived open ghost
81
+ * included, so a color icon has one selected treatment open or closed. The
82
+ * label plate inverts to the `--vf-highlight` pair either way, sharing one
83
+ * selection color with `vf-list-item` — the selected name was inverted
84
+ * whatever the art.
78
85
  *
79
86
  * ### Open is derived, not shipped
80
87
  *
@@ -265,6 +272,14 @@ export declare class VfIcon extends VfIcon_base {
265
272
  selectable: boolean;
266
273
  /** Whether the icon is selected: the art inverts and the plate goes black. */
267
274
  selected: boolean;
275
+ /**
276
+ * Declares the slotted art a **color icon**, so selection darkens it — the
277
+ * ttSelected transform, every color blended halfway toward black — instead
278
+ * of inverting it into a photographic negative (see the class doc). Yours
279
+ * to declare because the component cannot tell color art from a 1-bit mask
280
+ * by looking at a slotted image. The label plate inverts either way.
281
+ */
282
+ color: boolean;
268
283
  /**
269
284
  * The icon's window is on screen, so the art paints as the Finder's open
270
285
  * ghost — outline held, interior re-filled with the kit's loose dither —
@@ -20,7 +20,7 @@ var C = {
20
20
  small: 16
21
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
22
  constructor(...e) {
23
- super(...e), this.label = "", this.size = "large", this.selectable = !1, this.selected = !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, () => [[
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, () => [[
24
24
  document,
25
25
  "pointerdown",
26
26
  this.#A,
@@ -128,6 +128,13 @@ var C = {
128
128
  :host([selected]) .art {
129
129
  filter: invert(1);
130
130
  }
131
+ /* A color icon's selection darkens instead — ttSelected, colors
132
+ blended halfway toward black — since a photographic negative was
133
+ never what System 7 showed for color art (see the class doc). One
134
+ treatment for whatever the cell shows, the open ghost included. */
135
+ :host([selected][color]) .art {
136
+ filter: brightness(0.5);
137
+ }
131
138
  /* The open ghost replaces the slotted art while there is one — the
132
139
  slot stays in the tree (it is where the art loads and re-loads
133
140
  from) but paints nothing. Gated on the class, not :host([open]):
@@ -496,6 +503,9 @@ i([x()], D.prototype, "label", void 0), i([x({ reflect: !0 })], D.prototype, "si
496
503
  })], D.prototype, "selected", void 0), i([x({
497
504
  type: Boolean,
498
505
  reflect: !0
506
+ })], D.prototype, "color", void 0), i([x({
507
+ type: Boolean,
508
+ reflect: !0
499
509
  })], D.prototype, "open", void 0), i([x({
500
510
  type: Boolean,
501
511
  reflect: !0
@@ -43,6 +43,14 @@ export declare class VfMenuBar extends VfMenuBar_base {
43
43
  * mask was.
44
44
  */
45
45
  rounded: boolean;
46
+ /**
47
+ * Makes every slotted menu's item `shortcut`s live key equivalents — one
48
+ * declaration for the whole bar, the way MenuKey() answered for every menu
49
+ * at once. See `vf-menu.shortcuts` (the per-menu grant) and
50
+ * `vf-menu-item.shortcut` for the claim contract. Off by default: key
51
+ * equivalents are page-global, and only *the* menu bar should own them.
52
+ */
53
+ shortcuts: boolean;
46
54
  private _menus;
47
55
  connectedCallback(): void;
48
56
  disconnectedCallback(): void;
@@ -13,7 +13,7 @@ import { property as h, queryAssignedElements as g } from "lit/decorators.js";
13
13
  //#region src/components/vf-menu-bar.ts
14
14
  var _ = class extends r(d) {
15
15
  constructor(...e) {
16
- super(...e), this.scale = new t(this), this.gridSnap = new a(this), this.label = "", this.rounded = !1, this.#e = null, this.#t = this.attachInternals(), this.#n = new l(), this.#r = null, this.#i = new o(this, () => [[
16
+ super(...e), this.scale = new t(this), this.gridSnap = new a(this), this.label = "", this.rounded = !1, this.shortcuts = !1, this.#e = null, this.#t = this.attachInternals(), this.#n = new l(), this.#r = null, this.#i = new o(this, () => [[
17
17
  document,
18
18
  "pointerdown",
19
19
  this.#h,
@@ -228,7 +228,10 @@ var _ = class extends r(d) {
228
228
  n([h()], _.prototype, "label", void 0), n([h({
229
229
  type: Boolean,
230
230
  reflect: !0
231
- })], _.prototype, "rounded", void 0), n([g({
231
+ })], _.prototype, "rounded", void 0), n([h({
232
+ type: Boolean,
233
+ reflect: !0
234
+ })], _.prototype, "shortcuts", void 0), n([g({
232
235
  selector: "vf-menu",
233
236
  flatten: !0
234
237
  })], _.prototype, "_menus", void 0), _ = n([e("vf-menu-bar")], _);
@@ -62,12 +62,18 @@ export declare class VfMenuItem extends VfMenuItem_base {
62
62
  */
63
63
  checkable: boolean;
64
64
  /**
65
- * Keyboard shortcut text, e.g. `"⌘H"`, drawn left-aligned in the panel's
66
- * shared shortcut column. Display only in the
67
- * visual sense the span is `aria-hidden` so the glyphs never concatenate
68
- * into the item's accessible name ("Print… place of interest sign P")
69
- * while the host mirrors it as `aria-keyshortcuts` ("Meta+H"), so AT
70
- * announces it *as* a shortcut. A consumer's own `aria-keyshortcuts` wins.
65
+ * Keyboard shortcut, e.g. `"⌘H"`, drawn left-aligned in the panel's
66
+ * shared shortcut column. The span is `aria-hidden` so the glyphs never
67
+ * concatenate into the item's accessible name ("Print… place of interest
68
+ * sign P") the host mirrors it as `aria-keyshortcuts` ("Meta+H") instead,
69
+ * so AT announces it *as* a shortcut. A consumer's own `aria-keyshortcuts`
70
+ * wins.
71
+ *
72
+ * Inside a `vf-menu`/`vf-menu-bar` that declares `shortcuts`, this is a
73
+ * LIVE key equivalent, not a legend: a matching keydown anywhere on the
74
+ * page activates the item — menu open or not — claiming the stroke with
75
+ * `preventDefault()` (see the document keydown handler below for the full
76
+ * contract).
71
77
  */
72
78
  shortcut: string;
73
79
  /**
@@ -24,7 +24,20 @@ function b(e) {
24
24
  let r = t.join("");
25
25
  return r ? [...n, r].join("+") : "";
26
26
  }
27
- var x = class extends r(f) {
27
+ function x(e, t) {
28
+ let n = [...t.trim()], r = {
29
+ Meta: !1,
30
+ Control: !1,
31
+ Alt: !1,
32
+ Shift: !1
33
+ };
34
+ for (; n.length > 0 && y.has(n[0]);) r[y.get(n.shift())] = !0;
35
+ let i = n.join("");
36
+ if (!i || !r.Meta && !r.Control && !r.Alt && [...i].length === 1) return !1;
37
+ let a = r.Meta ? e.metaKey || e.ctrlKey : !e.metaKey, o = r.Control ? e.ctrlKey : r.Meta || !e.ctrlKey;
38
+ return a && o && e.altKey === r.Alt && e.shiftKey === r.Shift && e.key.toLowerCase() === i.toLowerCase();
39
+ }
40
+ var S = class extends r(f) {
28
41
  static {
29
42
  this.styles = [
30
43
  a,
@@ -161,19 +174,21 @@ var x = class extends r(f) {
161
174
  #r;
162
175
  #i;
163
176
  constructor() {
164
- super(), this.scale = new t(this), this.disabled = !1, this.checked = !1, this.active = !1, this.checkable = !1, this.shortcut = "", this._blinkPhase = null, this.#t = !1, this.#n = !1, this.#r = this.attachInternals(), this.#i = !1, this.addEventListener("keydown", this.#u), this.addEventListener("pointerdown", this.#c), this.addEventListener("click", this.#l);
177
+ super(), this.scale = new t(this), this.disabled = !1, this.checked = !1, this.active = !1, this.checkable = !1, this.shortcut = "", this._blinkPhase = null, this.#t = !1, this.#n = !1, this.#r = this.attachInternals(), this.#i = !1, this.#d = (e) => {
178
+ e.defaultPrevented || e.isComposing || this.disabled || !this.shortcut || this.closest("vf-menu[shortcuts], vf-menu-bar[shortcuts]") && x(e, this.shortcut) && (e.preventDefault(), !(e.repeat || this.#t) && (c(this, "vf-menu-flash-request", { item: this }, { composed: !1 }), this.activate()));
179
+ }, this.addEventListener("keydown", this.#u), this.addEventListener("pointerdown", this.#c), this.addEventListener("click", this.#l);
165
180
  }
166
181
  get #a() {
167
182
  return this.checkable || this.#n;
168
183
  }
169
184
  connectedCallback() {
170
- super.connectedCallback(), this.#s(), this.#o(), this.hasAttribute("tabindex") || (this.tabIndex = -1);
185
+ super.connectedCallback(), this.#s(), this.#o(), this.hasAttribute("tabindex") || (this.tabIndex = -1), document.addEventListener("keydown", this.#d);
171
186
  }
172
187
  disconnectedCallback() {
173
- super.disconnectedCallback(), this.#d();
188
+ super.disconnectedCallback(), document.removeEventListener("keydown", this.#d), this.#f();
174
189
  }
175
190
  updated(e) {
176
- e.has("disabled") && (this.#r.ariaDisabled = this.disabled ? "true" : null, this.disabled && this.#d()), e.has("checked") && this.checked && (this.#n = !0), (e.has("checked") || e.has("checkable")) && this.#s(), e.has("shortcut") && this.#o();
191
+ e.has("disabled") && (this.#r.ariaDisabled = this.disabled ? "true" : null, this.disabled && this.#f()), e.has("checked") && this.checked && (this.#n = !0), (e.has("checked") || e.has("checkable")) && this.#s(), e.has("shortcut") && this.#o();
177
192
  }
178
193
  #o() {
179
194
  this.#r.ariaKeyShortcuts = b(this.shortcut) || null;
@@ -215,39 +230,42 @@ var x = class extends r(f) {
215
230
  #u(e) {
216
231
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), this.activate());
217
232
  }
233
+ #d;
218
234
  activate() {
219
235
  if (this.disabled || this.#t) return;
220
236
  this.#t = !0;
221
237
  let e = l((e) => {
222
238
  this._blinkPhase = e ? "on" : "off";
223
239
  }, () => {
224
- this._blinkPhase = null, this.#t = !1, this.#e = void 0, this.#f();
240
+ this._blinkPhase = null, this.#t = !1, this.#e = void 0, this.#p();
225
241
  });
226
242
  this.#t && (this.#e = e);
227
243
  }
228
- #d() {
244
+ #f() {
229
245
  this.#t && (this.#e?.cancel(), this.#e = void 0, this.#t = !1, this._blinkPhase = null);
230
246
  }
231
- #f() {
247
+ #p() {
232
248
  let e = this.value ?? (this.textContent ?? "").trim();
233
249
  c(this, "vf-menu-select", {
234
250
  value: e,
235
251
  item: this
236
- }), c(this, "vf-menu-close-request", { item: this }, { composed: !1 });
252
+ });
253
+ let t = this.closest("vf-menu");
254
+ (!t || t.hasAttribute("open")) && c(this, "vf-menu-close-request", { item: this }, { composed: !1 });
237
255
  }
238
256
  };
239
257
  n([g({
240
258
  type: Boolean,
241
259
  reflect: !0
242
- })], x.prototype, "disabled", void 0), n([g({
260
+ })], S.prototype, "disabled", void 0), n([g({
243
261
  type: Boolean,
244
262
  reflect: !0
245
- })], x.prototype, "checked", void 0), n([g({
263
+ })], S.prototype, "checked", void 0), n([g({
246
264
  type: Boolean,
247
265
  reflect: !0
248
- })], x.prototype, "active", void 0), n([g({
266
+ })], S.prototype, "active", void 0), n([g({
249
267
  type: Boolean,
250
268
  reflect: !0
251
- })], x.prototype, "checkable", void 0), n([g()], x.prototype, "shortcut", void 0), n([g()], x.prototype, "value", void 0), n([_()], x.prototype, "_blinkPhase", void 0), x = n([e("vf-menu-item")], x);
269
+ })], S.prototype, "checkable", void 0), n([g()], S.prototype, "shortcut", void 0), n([g()], S.prototype, "value", void 0), n([_()], S.prototype, "_blinkPhase", void 0), S = n([e("vf-menu-item")], S);
252
270
  //#endregion
253
- export { x as VfMenuItem };
271
+ export { S as VfMenuItem };
@@ -29,7 +29,8 @@ declare const VfMenu_base: (new (...args: any[]) => import("../position.js").VfP
29
29
  * icon for the Apple menu. Keep the `label` attribute set too: it stays the
30
30
  * menu's accessible name (the bar item's `aria-label` and the panel's) when
31
31
  * the visible title is an image.
32
- * @csspart label - The menu title in the bar (inverts while open).
32
+ * @csspart label - The menu title in the bar (inverts while open; flashes
33
+ * when a closed menu's item is activated by its key equivalent).
33
34
  * @csspart panel - The dropped `.vf-panel` containing the items.
34
35
  * @cssprop [--vf-menubar-height=20px] - `vf-menu-bar`
35
36
  * @cssprop [--vf-menu-row-height=16px] - `vf-menu-item` row pitch; the panel
@@ -53,6 +54,16 @@ export declare class VfMenu extends VfMenu_base {
53
54
  * `vf-menu-bar` when present, otherwise by the menu itself.
54
55
  */
55
56
  open: boolean;
57
+ /**
58
+ * Makes the items' `shortcut`s live key equivalents: a matching keydown
59
+ * anywhere on the page activates the item — menu open or not — and a
60
+ * closed menu answers by flashing its bar title, MenuKey's acknowledgment.
61
+ * Off by default because key equivalents are page-global and a page may
62
+ * hold several menus of which only one is *the* menu bar; on a bar, declare
63
+ * it there once for every menu in it. The full claim contract lives on
64
+ * `vf-menu-item.shortcut`.
65
+ */
66
+ shortcuts: boolean;
56
67
  /**
57
68
  * The bar label's tabindex. A parent `vf-menu-bar` owns a roving tabindex
58
69
  * across its menus and sets this to 0 on the active menu, -1 on the rest,
@@ -77,6 +88,8 @@ export declare class VfMenu extends VfMenu_base {
77
88
  * src/menu-press.ts), so it wants the box, not the element.
78
89
  */
79
90
  get labelRect(): DOMRect | null;
91
+ /** `true` while the key-equivalent flash paints the title inverted. */
92
+ private _flashOn;
80
93
  connectedCallback(): void;
81
94
  disconnectedCallback(): void;
82
95
  protected updated(changed: Map<PropertyKey, unknown>): void;