vintage-frames 0.18.0 → 0.19.1
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.
- package/README.md +1 -1
- package/custom-elements.json +278 -51
- package/dist/build/app-file.d.ts +2 -2
- package/dist/build/app-file.js +1 -0
- package/dist/build/plugins.d.ts +2 -2
- package/dist/build/plugins.js +62 -59
- package/dist/components/vf-icon.d.ts +7 -0
- package/dist/components/vf-icon.js +101 -81
- package/dist/components/vf-menu-bar.d.ts +6 -4
- package/dist/components/vf-menu-bar.js +26 -56
- package/dist/components/vf-menu-item.d.ts +33 -5
- package/dist/components/vf-menu-item.js +128 -61
- package/dist/components/vf-menu.d.ts +35 -0
- package/dist/components/vf-menu.js +171 -111
- package/dist/glyphs.d.ts +6 -0
- package/dist/glyphs.js +18 -14
- package/dist/index.d.ts +1 -0
- package/dist/index.js +15 -14
- package/dist/menu-navigation.d.ts +34 -0
- package/dist/menu-navigation.js +53 -0
- package/dist/menu-press.d.ts +25 -7
- package/dist/menu-press.js +78 -44
- package/dist/motion.d.ts +10 -0
- package/dist/shell/app-file.d.ts +20 -4
- package/dist/shell/app-file.js +65 -53
- package/dist/shell/catalog.d.ts +79 -1
- package/dist/shell/catalog.js +206 -153
- package/dist/shell/finder.d.ts +28 -9
- package/dist/shell/finder.js +339 -267
- package/dist/shell/geometry.d.ts +7 -0
- package/dist/shell/geometry.js +19 -3
- package/dist/shell/index.d.ts +4 -4
- package/dist/shell/index.js +12 -12
- package/dist/shell/pure.d.ts +1 -1
- package/dist/shell/pure.js +6 -6
- package/dist/shell/shell.d.ts +14 -10
- package/dist/shell/shell.js +148 -116
- package/dist/shell/version.d.ts +1 -1
- package/dist/shell/version.js +1 -1
- package/dist/styles/body-italic-font.d.ts +2 -0
- package/dist/styles/body-italic-font.js +10 -0
- package/dist/styles/register-embedded-font.d.ts +5 -4
- package/dist/styles/register-embedded-font.js +11 -10
- package/docs/SPEC.md +11 -7
- package/editor/vscode.html-custom-data.json +15 -5
- package/editor/web-types.json +55 -9
- package/package.json +7 -3
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ There is no need to import a stylesheet. The components carry their styles with
|
|
|
25
25
|
|
|
26
26
|
## The shell
|
|
27
27
|
|
|
28
|
-
`vintage-frames/shell` is an experimental second entry point that runs applications over one desktop: a window manager, a menu bar that shows the front application's menus, and a Finder with folders, filing, Clean Up and the Trash.
|
|
28
|
+
`vintage-frames/shell` is an experimental second entry point that runs applications over one desktop: a window manager, a menu bar that shows the front application's menus, and a Finder with folders, aliases, filing, Clean Up and the Trash. A System Folder's contents set the Apple menu and what opens at startup.
|
|
29
29
|
|
|
30
30
|
```ts
|
|
31
31
|
import 'vintage-frames'
|
package/custom-elements.json
CHANGED
|
@@ -5681,6 +5681,17 @@
|
|
|
5681
5681
|
"attribute": "open",
|
|
5682
5682
|
"reflects": true
|
|
5683
5683
|
},
|
|
5684
|
+
{
|
|
5685
|
+
"kind": "field",
|
|
5686
|
+
"name": "alias",
|
|
5687
|
+
"type": {
|
|
5688
|
+
"text": "boolean"
|
|
5689
|
+
},
|
|
5690
|
+
"default": "false",
|
|
5691
|
+
"description": "The icon is an alias, an item standing for another: its name is set in\nitalics, the body face's own, and the plate widens to the slant's last\npixel.",
|
|
5692
|
+
"attribute": "alias",
|
|
5693
|
+
"reflects": true
|
|
5694
|
+
},
|
|
5684
5695
|
{
|
|
5685
5696
|
"kind": "field",
|
|
5686
5697
|
"name": "movable",
|
|
@@ -6272,6 +6283,25 @@
|
|
|
6272
6283
|
},
|
|
6273
6284
|
"description": "Size the plate to a whole, EVEN number of system pixels.\n\nThis is the whole alignment argument, so it is worth stating plainly. The\nframe centers two things over one axis — the art cell and the name — and a\ncentered child's offset is `(box − child) / 2`. That is a whole number\nexactly when the box and the child have the SAME PARITY. The cell is 32 or\n16 and a declared `width` is required even, so if the plate is even too,\nevery offset in the component is whole by construction: no correction, no\nsnapping, nothing for the compositor to round.\n\nThe text is measured rather than the plate, with a Range over its own\ncontents — the plate already carries the width this computed last time, so\nreading the element back would just return it. The measurement is in\nsystem px and so is scale-invariant: the same name is the same number of\nart pixels wide at every display density, which is why nothing here\nre-runs when the scale changes.\n\nRounding UP to even (never down) means the plate never clips the run it\nwas measured from; the leftover is at most one system pixel of extra plate\nafter the text, since the embedded faces advance in whole pixels and only\na fallback face measures fractionally."
|
|
6274
6285
|
},
|
|
6286
|
+
{
|
|
6287
|
+
"kind": "method",
|
|
6288
|
+
"name": "#lean",
|
|
6289
|
+
"privacy": "private",
|
|
6290
|
+
"return": {
|
|
6291
|
+
"type": {
|
|
6292
|
+
"text": "number"
|
|
6293
|
+
}
|
|
6294
|
+
},
|
|
6295
|
+
"parameters": [
|
|
6296
|
+
{
|
|
6297
|
+
"name": "plate",
|
|
6298
|
+
"type": {
|
|
6299
|
+
"text": "HTMLElement"
|
|
6300
|
+
}
|
|
6301
|
+
}
|
|
6302
|
+
],
|
|
6303
|
+
"description": "How far an alias's italic name runs past its advance, in whole system px:\nthe slant leans the tops of the last letters right, by up to 5. Read off\nthe glyphs' ink, in a canvas set in the plate's own font."
|
|
6304
|
+
},
|
|
6275
6305
|
{
|
|
6276
6306
|
"kind": "field",
|
|
6277
6307
|
"name": "#plateWidthCss",
|
|
@@ -6769,6 +6799,15 @@
|
|
|
6769
6799
|
"description": "The icon's window is on screen, so the art paints as the Finder's open\nghost — outline held, interior re-filled with the kit's loose dither —\nderived in the client from the slotted art itself (see the class doc).\nSet it when handling `vf-open`, clear it when the window goes away.\nSelection inverts the ghost exactly as it inverts the art.",
|
|
6770
6800
|
"fieldName": "open"
|
|
6771
6801
|
},
|
|
6802
|
+
{
|
|
6803
|
+
"name": "alias",
|
|
6804
|
+
"type": {
|
|
6805
|
+
"text": "boolean"
|
|
6806
|
+
},
|
|
6807
|
+
"default": "false",
|
|
6808
|
+
"description": "The icon is an alias, an item standing for another: its name is set in\nitalics, the body face's own, and the plate widens to the slant's last\npixel.",
|
|
6809
|
+
"fieldName": "alias"
|
|
6810
|
+
},
|
|
6772
6811
|
{
|
|
6773
6812
|
"name": "movable",
|
|
6774
6813
|
"type": {
|
|
@@ -8377,7 +8416,7 @@
|
|
|
8377
8416
|
"declarations": [
|
|
8378
8417
|
{
|
|
8379
8418
|
"kind": "class",
|
|
8380
|
-
"description": "`<vf-menu-bar>` — the System 7 menu bar: white strip, 1px black bottom\nrule, slotted `<vf-menu>` children laid out from the left. `rounded` adds\nthe classic screen-corner mask to the top corners.\n\nCoordinates its menus: pressing a label opens that menu (and inverts the\nlabel); while any menu is open, hovering another label switches to it;\nEscape, an outside click, or item selection closes.
|
|
8419
|
+
"description": "`<vf-menu-bar>` — the System 7 menu bar: white strip, 1px black bottom\nrule, slotted `<vf-menu>` children laid out from the left. `rounded` adds\nthe classic screen-corner mask to the top corners.\n\nCoordinates its menus: pressing a label opens that menu (and inverts the\nlabel); while any menu is open, hovering another label switches to it;\nEscape, an outside click, or item selection closes. While a menu is open\nthe keyboard is src/menu-navigation.ts's: ArrowDown/ArrowUp move focus\nthrough the open menu's items, Home/End jump to its first/last, typed\nletters run the shared Finder first-letter type-ahead (src/type-ahead.ts),\nArrowRight opens an item's submenu and ArrowLeft closes it, and at the top\nlevel ArrowLeft/ArrowRight move between menus.\n\nThe bar also owns the **press-drag-release** gesture (see src/menu-press.ts)\n— press a title, slide onto a command, release over it — because one press\nmay travel across several of its menus. `vf-select` drives its popup by the\nsame mechanic.",
|
|
8381
8420
|
"name": "VfMenuBar",
|
|
8382
8421
|
"cssProperties": [
|
|
8383
8422
|
{
|
|
@@ -8654,7 +8693,8 @@
|
|
|
8654
8693
|
{
|
|
8655
8694
|
"kind": "field",
|
|
8656
8695
|
"name": "#onDocKeydown",
|
|
8657
|
-
"privacy": "private"
|
|
8696
|
+
"privacy": "private",
|
|
8697
|
+
"description": "The open menu's keyboard and its submenus', src/menu-navigation.ts's.\n#onBarKeydown's arrows and Home/End only run while no menu is open."
|
|
8658
8698
|
},
|
|
8659
8699
|
{
|
|
8660
8700
|
"kind": "field",
|
|
@@ -8681,25 +8721,6 @@
|
|
|
8681
8721
|
],
|
|
8682
8722
|
"description": "Opens the previous/next menu in the bar, wrapping at the ends."
|
|
8683
8723
|
},
|
|
8684
|
-
{
|
|
8685
|
-
"kind": "method",
|
|
8686
|
-
"name": "#moveItemFocus",
|
|
8687
|
-
"privacy": "private",
|
|
8688
|
-
"return": {
|
|
8689
|
-
"type": {
|
|
8690
|
-
"text": "void"
|
|
8691
|
-
}
|
|
8692
|
-
},
|
|
8693
|
-
"parameters": [
|
|
8694
|
-
{
|
|
8695
|
-
"name": "direction",
|
|
8696
|
-
"type": {
|
|
8697
|
-
"text": "1 | -1"
|
|
8698
|
-
}
|
|
8699
|
-
}
|
|
8700
|
-
],
|
|
8701
|
-
"description": "Moves keyboard focus through the open menu's enabled items, wrapping."
|
|
8702
|
-
},
|
|
8703
8724
|
{
|
|
8704
8725
|
"kind": "field",
|
|
8705
8726
|
"name": "top",
|
|
@@ -8873,7 +8894,7 @@
|
|
|
8873
8894
|
"declarations": [
|
|
8874
8895
|
{
|
|
8875
8896
|
"kind": "class",
|
|
8876
|
-
"description": "`<vf-menu-item>` — a single command inside a `<vf-menu>` panel.\n\nRenders the classic System 7 menu row: optional ✓ check in the\n`--vf-select-gutter` left column (16px, shared with vf-select/vf-option),\nlabel, and the keyboard shortcut left-aligned in a right-anchored column,\nso every ⌘ lands at the same x. On activation the item performs the classic\n3-blink inversion (~250ms), then dispatches `vf-menu-select` and asks its\nancestors to close the menu.\n\nTakes `top`/`left` like every other element (VfPositioned), for the\nconsumer who wants a row somewhere other than a pulldown. Inside its parent\n`<vf-menu>` the panel is as wide as its widest row and stacks them in flow,\nso stating an origin takes that row out of both: it no longer contributes to\nthe panel's width and the rows below close the gap. The placement doing what\nit says — but not how a pulldown is laid out.",
|
|
8897
|
+
"description": "`<vf-menu-item>` — a single command inside a `<vf-menu>` panel.\n\nRenders the classic System 7 menu row: optional ✓ check in the\n`--vf-select-gutter` left column (16px, shared with vf-select/vf-option),\nlabel, and the keyboard shortcut left-aligned in a right-anchored column,\nso every ⌘ lands at the same x. On activation the item performs the classic\n3-blink inversion (~250ms), then dispatches `vf-menu-select` and asks its\nancestors to close the menu.\n\nA `<vf-menu>` in the `submenu` slot makes the item open a submenu: it ends\nin ▶ where a shortcut would go, and choosing it opens the submenu beside\nit rather than firing `vf-menu-select`. The item stays highlighted while\nits submenu is open.\n\nTakes `top`/`left` like every other element (VfPositioned), for the\nconsumer who wants a row somewhere other than a pulldown. Inside its parent\n`<vf-menu>` the panel is as wide as its widest row and stacks them in flow,\nso stating an origin takes that row out of both: it no longer contributes to\nthe panel's width and the rows below close the gap. The placement doing what\nit says — but not how a pulldown is laid out.",
|
|
8877
8898
|
"name": "VfMenuItem",
|
|
8878
8899
|
"cssProperties": [
|
|
8879
8900
|
{
|
|
@@ -8908,12 +8929,20 @@
|
|
|
8908
8929
|
{
|
|
8909
8930
|
"description": "The shortcut text, left-aligned in the shared column.",
|
|
8910
8931
|
"name": "shortcut"
|
|
8932
|
+
},
|
|
8933
|
+
{
|
|
8934
|
+
"description": "The ▶ of an item that opens a submenu.",
|
|
8935
|
+
"name": "arrow"
|
|
8911
8936
|
}
|
|
8912
8937
|
],
|
|
8913
8938
|
"slots": [
|
|
8914
8939
|
{
|
|
8915
8940
|
"description": "The item label.",
|
|
8916
8941
|
"name": ""
|
|
8942
|
+
},
|
|
8943
|
+
{
|
|
8944
|
+
"description": "A `vf-menu`, the submenu the item opens.",
|
|
8945
|
+
"name": "submenu"
|
|
8917
8946
|
}
|
|
8918
8947
|
],
|
|
8919
8948
|
"members": [
|
|
@@ -8953,10 +8982,21 @@
|
|
|
8953
8982
|
"text": "boolean"
|
|
8954
8983
|
},
|
|
8955
8984
|
"default": "false",
|
|
8956
|
-
"description": "Transient highlight — the full-row inversion
|
|
8985
|
+
"description": "Transient highlight — the full-row inversion on the row under the pointer\nwhile its menu is open, button down or not (`:hover` can't: under touch\nthe pointer is captured by the title the press started on), or on the\nitem whose submenu is open while the pointer is elsewhere. Managed by the\nmenu, mirroring `vf-option[active]`; not part of the authoring API.",
|
|
8957
8986
|
"attribute": "active",
|
|
8958
8987
|
"reflects": true
|
|
8959
8988
|
},
|
|
8989
|
+
{
|
|
8990
|
+
"kind": "field",
|
|
8991
|
+
"name": "expanded",
|
|
8992
|
+
"type": {
|
|
8993
|
+
"text": "boolean"
|
|
8994
|
+
},
|
|
8995
|
+
"default": "false",
|
|
8996
|
+
"description": "Whether this item's submenu is open. Reflected, and announced as\n`aria-expanded`. Managed by the menu (VfMenu.expand), like\nactive; not part of the authoring API.",
|
|
8997
|
+
"attribute": "expanded",
|
|
8998
|
+
"reflects": true
|
|
8999
|
+
},
|
|
8960
9000
|
{
|
|
8961
9001
|
"kind": "field",
|
|
8962
9002
|
"name": "checkable",
|
|
@@ -8984,7 +9024,7 @@
|
|
|
8984
9024
|
"type": {
|
|
8985
9025
|
"text": "string | undefined"
|
|
8986
9026
|
},
|
|
8987
|
-
"description": "Value reported in the `vf-menu-select` event detail. Defaults to the item's\
|
|
9027
|
+
"description": "Value reported in the `vf-menu-select` event detail. Defaults to the item's\nlabelText when unset.",
|
|
8988
9028
|
"attribute": "value"
|
|
8989
9029
|
},
|
|
8990
9030
|
{
|
|
@@ -8997,6 +9037,34 @@
|
|
|
8997
9037
|
"default": "null",
|
|
8998
9038
|
"description": "`'on' | 'off'` while the selection blink runs, otherwise `null`."
|
|
8999
9039
|
},
|
|
9040
|
+
{
|
|
9041
|
+
"kind": "field",
|
|
9042
|
+
"name": "_hasSubmenu",
|
|
9043
|
+
"type": {
|
|
9044
|
+
"text": "boolean"
|
|
9045
|
+
},
|
|
9046
|
+
"privacy": "private",
|
|
9047
|
+
"default": "false",
|
|
9048
|
+
"description": "Whether a `vf-menu` sits in the `submenu` slot."
|
|
9049
|
+
},
|
|
9050
|
+
{
|
|
9051
|
+
"kind": "field",
|
|
9052
|
+
"name": "submenu",
|
|
9053
|
+
"type": {
|
|
9054
|
+
"text": "VfMenu | null"
|
|
9055
|
+
},
|
|
9056
|
+
"description": "The submenu this item opens: the `vf-menu` in its `submenu` slot, or null.",
|
|
9057
|
+
"readonly": true
|
|
9058
|
+
},
|
|
9059
|
+
{
|
|
9060
|
+
"kind": "field",
|
|
9061
|
+
"name": "labelText",
|
|
9062
|
+
"type": {
|
|
9063
|
+
"text": "string"
|
|
9064
|
+
},
|
|
9065
|
+
"description": "The item's label as text: what its default slot holds, trimmed, without\nthe rows of a submenu. The default value and the menus'\ntype-ahead read it, and it names an item that opens a submenu.",
|
|
9066
|
+
"readonly": true
|
|
9067
|
+
},
|
|
9000
9068
|
{
|
|
9001
9069
|
"kind": "field",
|
|
9002
9070
|
"name": "#blinkHandle",
|
|
@@ -9060,7 +9128,37 @@
|
|
|
9060
9128
|
"text": "void"
|
|
9061
9129
|
}
|
|
9062
9130
|
},
|
|
9063
|
-
"description": "Mirrors shortcut as the host's `aria-keyshortcuts`, normalised from\nthe Mac display glyphs to the ARIA grammar (\"⌘⇧S\" → \"Meta+Shift+S\"). A\nconsumer's own attribute overrides this the way it overrides the role."
|
|
9131
|
+
"description": "Mirrors shortcut as the host's `aria-keyshortcuts`, normalised from\nthe Mac display glyphs to the ARIA grammar (\"⌘⇧S\" → \"Meta+Shift+S\"). A\nconsumer's own attribute overrides this the way it overrides the role.\nAn item that opens a submenu has ▶ where the shortcut would be, and no key."
|
|
9132
|
+
},
|
|
9133
|
+
{
|
|
9134
|
+
"kind": "field",
|
|
9135
|
+
"name": "#syncSubmenu",
|
|
9136
|
+
"privacy": "private",
|
|
9137
|
+
"description": "An item that opens a submenu says so (`aria-haspopup`, `aria-expanded`)\nand is named by its label alone: a name computed from its content would\ntake in the open submenu's rows."
|
|
9138
|
+
},
|
|
9139
|
+
{
|
|
9140
|
+
"kind": "field",
|
|
9141
|
+
"name": "#onSubmenuSlotChange",
|
|
9142
|
+
"privacy": "private"
|
|
9143
|
+
},
|
|
9144
|
+
{
|
|
9145
|
+
"kind": "method",
|
|
9146
|
+
"name": "#fromSubmenu",
|
|
9147
|
+
"privacy": "private",
|
|
9148
|
+
"return": {
|
|
9149
|
+
"type": {
|
|
9150
|
+
"text": "boolean"
|
|
9151
|
+
}
|
|
9152
|
+
},
|
|
9153
|
+
"parameters": [
|
|
9154
|
+
{
|
|
9155
|
+
"name": "event",
|
|
9156
|
+
"type": {
|
|
9157
|
+
"text": "Event"
|
|
9158
|
+
}
|
|
9159
|
+
}
|
|
9160
|
+
],
|
|
9161
|
+
"description": "Whether `event` came from inside this item's submenu, so belongs to a row there."
|
|
9064
9162
|
},
|
|
9065
9163
|
{
|
|
9066
9164
|
"kind": "method",
|
|
@@ -9081,7 +9179,15 @@
|
|
|
9081
9179
|
"type": {
|
|
9082
9180
|
"text": "void"
|
|
9083
9181
|
}
|
|
9084
|
-
}
|
|
9182
|
+
},
|
|
9183
|
+
"parameters": [
|
|
9184
|
+
{
|
|
9185
|
+
"name": "event",
|
|
9186
|
+
"type": {
|
|
9187
|
+
"text": "PointerEvent"
|
|
9188
|
+
}
|
|
9189
|
+
}
|
|
9190
|
+
]
|
|
9085
9191
|
},
|
|
9086
9192
|
{
|
|
9087
9193
|
"kind": "method",
|
|
@@ -9100,7 +9206,7 @@
|
|
|
9100
9206
|
}
|
|
9101
9207
|
}
|
|
9102
9208
|
],
|
|
9103
|
-
"description": "The gesture latch is read *now* — it is about a press that already\nresolved this click — but the activation itself defers to the end of the\npath, so `preventDefault()` on the item (or above it) cancels the command\nthe way it cancels a native control's. See deferActivation."
|
|
9209
|
+
"description": "The gesture latch is read *now* — it is about a press that already\nresolved this click — but the activation itself defers to the end of the\npath, so `preventDefault()` on the item (or above it) cancels the command\nthe way it cancels a native control's. See deferActivation.\nA click on a row of this item's submenu bubbles through here, and is\nthat row's alone."
|
|
9104
9210
|
},
|
|
9105
9211
|
{
|
|
9106
9212
|
"kind": "method",
|
|
@@ -9134,7 +9240,7 @@
|
|
|
9134
9240
|
"text": "void"
|
|
9135
9241
|
}
|
|
9136
9242
|
},
|
|
9137
|
-
"description": "Runs the classic 3-blink inversion, then dispatches `vf-menu-select` and an\ninternal `vf-menu-close-request` so ancestor menu/menu-bar close. Public\nbecause the menu's press gesture activates the row a drag was released\nover, which the row's own `click` never sees (a press that started on the\ntitle dispatches its click above both of them). No-op while disabled or\nalready blinking."
|
|
9243
|
+
"description": "Runs the classic 3-blink inversion, then dispatches `vf-menu-select` and an\ninternal `vf-menu-close-request` so ancestor menu/menu-bar close. Public\nbecause the menu's press gesture activates the row a drag was released\nover, which the row's own `click` never sees (a press that started on the\ntitle dispatches its click above both of them). No-op while disabled or\nalready blinking.\n\nAn item that opens a submenu is never chosen: it opens the submenu and\nmoves focus to its first enabled item, as Enter, Space and → do."
|
|
9138
9244
|
},
|
|
9139
9245
|
{
|
|
9140
9246
|
"kind": "method",
|
|
@@ -9244,9 +9350,18 @@
|
|
|
9244
9350
|
"text": "boolean"
|
|
9245
9351
|
},
|
|
9246
9352
|
"default": "false",
|
|
9247
|
-
"description": "Transient highlight — the full-row inversion
|
|
9353
|
+
"description": "Transient highlight — the full-row inversion on the row under the pointer\nwhile its menu is open, button down or not (`:hover` can't: under touch\nthe pointer is captured by the title the press started on), or on the\nitem whose submenu is open while the pointer is elsewhere. Managed by the\nmenu, mirroring `vf-option[active]`; not part of the authoring API.",
|
|
9248
9354
|
"fieldName": "active"
|
|
9249
9355
|
},
|
|
9356
|
+
{
|
|
9357
|
+
"name": "expanded",
|
|
9358
|
+
"type": {
|
|
9359
|
+
"text": "boolean"
|
|
9360
|
+
},
|
|
9361
|
+
"default": "false",
|
|
9362
|
+
"description": "Whether this item's submenu is open. Reflected, and announced as\n`aria-expanded`. Managed by the menu (VfMenu.expand), like\nactive; not part of the authoring API.",
|
|
9363
|
+
"fieldName": "expanded"
|
|
9364
|
+
},
|
|
9250
9365
|
{
|
|
9251
9366
|
"name": "checkable",
|
|
9252
9367
|
"type": {
|
|
@@ -9270,7 +9385,7 @@
|
|
|
9270
9385
|
"type": {
|
|
9271
9386
|
"text": "string | undefined"
|
|
9272
9387
|
},
|
|
9273
|
-
"description": "Value reported in the `vf-menu-select` event detail. Defaults to the item's\
|
|
9388
|
+
"description": "Value reported in the `vf-menu-select` event detail. Defaults to the item's\nlabelText when unset.",
|
|
9274
9389
|
"fieldName": "value"
|
|
9275
9390
|
},
|
|
9276
9391
|
{
|
|
@@ -9362,7 +9477,7 @@
|
|
|
9362
9477
|
"declarations": [
|
|
9363
9478
|
{
|
|
9364
9479
|
"kind": "class",
|
|
9365
|
-
"description": "`<vf-menu>` — a pull-down menu: a bar label plus a dropped panel of\n`<vf-menu-item>` / `<vf-separator>` children.\n\nInside a `<vf-menu-bar>` the bar coordinates open state (only one menu open,\nhover-switching, outside-click/Escape dismissal) and owns the pointer\ngesture, which may travel between its menus. Used standalone, the menu\ntoggles itself on label click and manages its own dismissal, its own press\ngesture and item keyboard navigation (ArrowUp/ArrowDown, Home/End, and the\nshared first-letter type-ahead — src/type-ahead.ts) while open.\n\nPointer — the two styles `vf-select` supports, on the same terms (see\nsrc/menu-press.ts): the System 7 press-drag-release (press the title, slide\nonto a command, release over it) and a modern quick tap that leaves the menu\ndropped for a second click.\n\nTakes `top`/`left` like every other element (VfPositioned) — the\nnatural fit being a standalone menu, which is a free-standing menu button and\nplaces like any other control. The panel is anchored to the host's own box\n(`top: 100%`), so it follows a placed menu down without any further work.\nInside a `<vf-menu-bar>`, the bar lays its titles out in flow — placing one\nlifts it off the bar and the titles beside it close the gap. Slotted straight\ninto a `<vf-desktop>`, a free-standing menu sits on the desktop's menu tier\nabove every window, palettes included, as a bar does.",
|
|
9480
|
+
"description": "`<vf-menu>` — a pull-down menu: a bar label plus a dropped panel of\n`<vf-menu-item>` / `<vf-separator>` children.\n\nInside a `<vf-menu-bar>` the bar coordinates open state (only one menu open,\nhover-switching, outside-click/Escape dismissal) and owns the pointer\ngesture, which may travel between its menus. Used standalone, the menu\ntoggles itself on label click and manages its own dismissal, its own press\ngesture and item keyboard navigation (ArrowUp/ArrowDown, Home/End, and the\nshared first-letter type-ahead — src/type-ahead.ts) while open.\n\nPointer — the two styles `vf-select` supports, on the same terms (see\nsrc/menu-press.ts): the System 7 press-drag-release (press the title, slide\nonto a command, release over it) and a modern quick tap that leaves the menu\ndropped for a second click.\n\nA `vf-menu` in a `vf-menu-item`'s `submenu` slot is a **submenu**: no title,\nonly its panel, opened beside its item by the menu holding the item\n(expand). The pointer resting on the item opens it in either style,\nand so do a click or tap on the item, →, Enter and Space. It overlaps its\nparent as System 7.5's did: its first row level with its item, its frame\n5px inside the parent's right edge, covering the parent's frame and\nshadow. It opens on the side its parent opened toward, the right first,\nflips where that side has no room, and moves up to fit the screen. Menus\nnest to any depth.\n\nTakes `top`/`left` like every other element (VfPositioned) — the\nnatural fit being a standalone menu, which is a free-standing menu button and\nplaces like any other control. The panel is anchored to the host's own box\n(`top: 100%`), so it follows a placed menu down without any further work.\nInside a `<vf-menu-bar>`, the bar lays its titles out in flow — placing one\nlifts it off the bar and the titles beside it close the gap. Slotted straight\ninto a `<vf-desktop>`, a free-standing menu sits on the desktop's menu tier\nabove every window, palettes included, as a bar does.",
|
|
9366
9481
|
"name": "VfMenu",
|
|
9367
9482
|
"cssProperties": [
|
|
9368
9483
|
{
|
|
@@ -9537,6 +9652,137 @@
|
|
|
9537
9652
|
"description": "Whether a `vf-menu-bar` is coordinating this menu.",
|
|
9538
9653
|
"readonly": true
|
|
9539
9654
|
},
|
|
9655
|
+
{
|
|
9656
|
+
"kind": "field",
|
|
9657
|
+
"name": "#isSubmenu",
|
|
9658
|
+
"privacy": "private",
|
|
9659
|
+
"type": {
|
|
9660
|
+
"text": "boolean"
|
|
9661
|
+
},
|
|
9662
|
+
"description": "Whether this menu is a submenu: in a `vf-menu-item`'s `submenu` slot.",
|
|
9663
|
+
"readonly": true
|
|
9664
|
+
},
|
|
9665
|
+
{
|
|
9666
|
+
"kind": "field",
|
|
9667
|
+
"name": "_panelEl",
|
|
9668
|
+
"type": {
|
|
9669
|
+
"text": "HTMLElement | null"
|
|
9670
|
+
},
|
|
9671
|
+
"privacy": "private"
|
|
9672
|
+
},
|
|
9673
|
+
{
|
|
9674
|
+
"kind": "field",
|
|
9675
|
+
"name": "panelRect",
|
|
9676
|
+
"type": {
|
|
9677
|
+
"text": "DOMRect | null"
|
|
9678
|
+
},
|
|
9679
|
+
"description": "Viewport rect of the dropped panel, or `null` while closed. The press\ngesture hit-tests the open menus by their panels, deepest first.",
|
|
9680
|
+
"readonly": true
|
|
9681
|
+
},
|
|
9682
|
+
{
|
|
9683
|
+
"kind": "field",
|
|
9684
|
+
"name": "#expanded",
|
|
9685
|
+
"privacy": "private",
|
|
9686
|
+
"type": {
|
|
9687
|
+
"text": "VfMenuItem | null"
|
|
9688
|
+
},
|
|
9689
|
+
"default": "null",
|
|
9690
|
+
"description": "The item whose submenu is open."
|
|
9691
|
+
},
|
|
9692
|
+
{
|
|
9693
|
+
"kind": "field",
|
|
9694
|
+
"name": "#pointer",
|
|
9695
|
+
"privacy": "private",
|
|
9696
|
+
"type": {
|
|
9697
|
+
"text": "VfMenuItem | null | undefined"
|
|
9698
|
+
},
|
|
9699
|
+
"default": "undefined",
|
|
9700
|
+
"description": "Where the pointer is: on a row, on none of this panel (null), or not in it (undefined)."
|
|
9701
|
+
},
|
|
9702
|
+
{
|
|
9703
|
+
"kind": "field",
|
|
9704
|
+
"name": "#side",
|
|
9705
|
+
"privacy": "private",
|
|
9706
|
+
"type": {
|
|
9707
|
+
"text": "'left' | 'right'"
|
|
9708
|
+
},
|
|
9709
|
+
"default": "'right'",
|
|
9710
|
+
"description": "The side this menu opened toward, which its own submenus open toward first."
|
|
9711
|
+
},
|
|
9712
|
+
{
|
|
9713
|
+
"kind": "field",
|
|
9714
|
+
"name": "expandedItem",
|
|
9715
|
+
"type": {
|
|
9716
|
+
"text": "VfMenuItem | null"
|
|
9717
|
+
},
|
|
9718
|
+
"description": "The item in this menu whose submenu is open, or `null`.",
|
|
9719
|
+
"readonly": true
|
|
9720
|
+
},
|
|
9721
|
+
{
|
|
9722
|
+
"kind": "method",
|
|
9723
|
+
"name": "expand",
|
|
9724
|
+
"return": {
|
|
9725
|
+
"type": {
|
|
9726
|
+
"text": "void"
|
|
9727
|
+
}
|
|
9728
|
+
},
|
|
9729
|
+
"parameters": [
|
|
9730
|
+
{
|
|
9731
|
+
"name": "item",
|
|
9732
|
+
"type": {
|
|
9733
|
+
"text": "VfMenuItem | null"
|
|
9734
|
+
}
|
|
9735
|
+
},
|
|
9736
|
+
{
|
|
9737
|
+
"name": "options",
|
|
9738
|
+
"default": "{}",
|
|
9739
|
+
"type": {
|
|
9740
|
+
"text": "{ focus?: boolean }"
|
|
9741
|
+
}
|
|
9742
|
+
}
|
|
9743
|
+
],
|
|
9744
|
+
"description": "Opens `item`'s submenu, closing the one open in this menu and everything\nunder it; `null` closes it. With `focus`, keyboard focus goes on to the\nsubmenu's first enabled item. The press gesture, the keyboard and an\nitem's `activate()` all open submenus through here. Does nothing while\nthis menu is closed, or for a disabled item or one without a submenu."
|
|
9745
|
+
},
|
|
9746
|
+
{
|
|
9747
|
+
"kind": "method",
|
|
9748
|
+
"name": "pointerOver",
|
|
9749
|
+
"return": {
|
|
9750
|
+
"type": {
|
|
9751
|
+
"text": "void"
|
|
9752
|
+
}
|
|
9753
|
+
},
|
|
9754
|
+
"parameters": [
|
|
9755
|
+
{
|
|
9756
|
+
"name": "row",
|
|
9757
|
+
"type": {
|
|
9758
|
+
"text": "VfMenuItem | null | undefined"
|
|
9759
|
+
}
|
|
9760
|
+
}
|
|
9761
|
+
],
|
|
9762
|
+
"description": "Where the pointer is, from the press gesture: on `row` of this menu's\npanel, on none of its rows (`null`), or not in its panel (`undefined`).\nThe row under the pointer is highlighted; with the pointer elsewhere, the\nitem whose submenu is open is. Not part of the authoring API."
|
|
9763
|
+
},
|
|
9764
|
+
{
|
|
9765
|
+
"kind": "method",
|
|
9766
|
+
"name": "#paintRows",
|
|
9767
|
+
"privacy": "private",
|
|
9768
|
+
"return": {
|
|
9769
|
+
"type": {
|
|
9770
|
+
"text": "void"
|
|
9771
|
+
}
|
|
9772
|
+
},
|
|
9773
|
+
"description": "Lights the one row this menu highlights: the pointer's, else the open submenu's item."
|
|
9774
|
+
},
|
|
9775
|
+
{
|
|
9776
|
+
"kind": "method",
|
|
9777
|
+
"name": "#place",
|
|
9778
|
+
"privacy": "private",
|
|
9779
|
+
"return": {
|
|
9780
|
+
"type": {
|
|
9781
|
+
"text": "void"
|
|
9782
|
+
}
|
|
9783
|
+
},
|
|
9784
|
+
"description": "Places a submenu just opened: on the side its parent opened toward,\nflipped where that side has no room and the other has, and raised by\nwhole system px to fit above the screen's bottom, never past its top.\nWritten onto the panel directly, before the frame paints."
|
|
9785
|
+
},
|
|
9540
9786
|
{
|
|
9541
9787
|
"kind": "field",
|
|
9542
9788
|
"name": "#internals",
|
|
@@ -9612,25 +9858,6 @@
|
|
|
9612
9858
|
"name": "#onDocKeydown",
|
|
9613
9859
|
"privacy": "private"
|
|
9614
9860
|
},
|
|
9615
|
-
{
|
|
9616
|
-
"kind": "method",
|
|
9617
|
-
"name": "#moveItemFocus",
|
|
9618
|
-
"privacy": "private",
|
|
9619
|
-
"return": {
|
|
9620
|
-
"type": {
|
|
9621
|
-
"text": "void"
|
|
9622
|
-
}
|
|
9623
|
-
},
|
|
9624
|
-
"parameters": [
|
|
9625
|
-
{
|
|
9626
|
-
"name": "direction",
|
|
9627
|
-
"type": {
|
|
9628
|
-
"text": "1 | -1"
|
|
9629
|
-
}
|
|
9630
|
-
}
|
|
9631
|
-
],
|
|
9632
|
-
"description": "Moves keyboard focus through the enabled items, wrapping at the ends."
|
|
9633
|
-
},
|
|
9634
9861
|
{
|
|
9635
9862
|
"kind": "field",
|
|
9636
9863
|
"name": "#docListeners",
|
|
@@ -9648,7 +9875,7 @@
|
|
|
9648
9875
|
"text": "void"
|
|
9649
9876
|
}
|
|
9650
9877
|
},
|
|
9651
|
-
"description": "In a bar the host is `role=\"none\"`: the `menubar`'s items are the shadow\n`.label`s (`menuitem`), and while browsers do compute that ownership\nthrough a role-less generic, declaring it keeps the chain explicit
|
|
9878
|
+
"description": "In a bar the host is `role=\"none\"`: the `menubar`'s items are the shadow\n`.label`s (`menuitem`), and while browsers do compute that ownership\nthrough a role-less generic, declaring it keeps the chain explicit. A\nsubmenu's host is `role=\"none\"` too: its item is the `menuitem`, its\npanel the `menu`. Standalone, the host stays role-less — the label is a\n`button` there."
|
|
9652
9879
|
},
|
|
9653
9880
|
{
|
|
9654
9881
|
"kind": "field",
|
package/dist/build/app-file.d.ts
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
import type { AppManifest } from '../shell/app-file.js';
|
|
7
7
|
/** What {@link packApp} packs. */
|
|
8
8
|
export interface PackAppInput {
|
|
9
|
-
/** The manifest's fields but its format and icon, which the packer fills in. */
|
|
10
|
-
manifest: Omit<AppManifest, 'format' | 'icon'>;
|
|
9
|
+
/** The manifest's fields but its format, app API and icon, which the packer fills in. */
|
|
10
|
+
manifest: Omit<AppManifest, 'format' | 'api' | 'icon'>;
|
|
11
11
|
/** The icon's PNG, 32 × 32. */
|
|
12
12
|
icon: Uint8Array;
|
|
13
13
|
/** The application's code: one ES module whose default export is its factory. */
|
package/dist/build/app-file.js
CHANGED
package/dist/build/plugins.d.ts
CHANGED
|
@@ -32,8 +32,8 @@ export interface AppFileOptions {
|
|
|
32
32
|
export declare function appFile(options: AppFileOptions): Plugin;
|
|
33
33
|
/**
|
|
34
34
|
* Builds app files into a site. An import of `*.png?app` reads the file and
|
|
35
|
-
* refuses one that isn't an app file, or
|
|
36
|
-
*
|
|
35
|
+
* refuses one that isn't an app file, or one this kit doesn't run
|
|
36
|
+
* (`appRuns`). Its default export is the application's factory,
|
|
37
37
|
* its definition given the manifest's icon, and `manifest` is the manifest.
|
|
38
38
|
* The code imports the kit by name, so the page keeps one copy of it. A new
|
|
39
39
|
* file reloads the dev server's page.
|