vintage-frames 0.16.0 → 0.16.2

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.
@@ -3399,7 +3399,7 @@
3399
3399
  "declarations": [
3400
3400
  {
3401
3401
  "kind": "class",
3402
- "description": "`<vf-dialog>` — the System 7 modal dialog shell.\n\nTwo chromes, one modal lifecycle (native `<dialog>` for top-layer rendering\nand focus trapping, with a fully transparent backdrop — no dimming). Both\nare the same dBoxProc double frame — 1px outer rule, 2px gap, 2px inner\nband, no shadow (vfModalFrame):\n\n- **Default:** the movable modal (movableDBoxProc) — the striped title bar\n set into the top of that frame, with a centered title over a white body.\n Drag the title bar to move it. `closable` adds the standard close box\n (left of the bar) — the HIG's own figures disagree on whether a movable\n modal carries one (Figure 5-1 says yes, Figure 6-1 and the Chapter 6 text\n say no), so the component enables either reading rather than enforcing\n one.\n- **`frame=\"plain\"`:** the modal dialog box — the bare frame, no title bar —\n and immovable, like the original. With no bar, `heading` only names the\n dialog and `closable` is ignored.\n\nOpen it with `show()` (or set the `open` attribute/property); close with\n`close()`. Escape closes it and fires `vf-close` with\n`{ reason: 'escape' }`; the close box and programmatic closing fire\n`{ reason: 'close' }`. With `light-dismiss`, a click outside the frame\ncloses it too, with `{ reason: 'outside' }` — for the About box; off by\ndefault, since the classic modal ignored an outside click.\n\nAnswers: a `<form method=\"dialog\">` inside it closes it with the\nsubmitting button's `value` as `returnValue`, and `close(value)` does the\nsame. `vf-close` carries it as `detail.returnValue`, null when the close\ncarried none (Escape, a click outside, the close box).\n\nKeyboard, the classic Dialog Manager's two rules (VfModalDialog):\non open, focus goes to the first text-entry control — a slotted control\nwith `autofocus` first — or, with none, to the default button\n(`vf-button variant=\"default\"`). Return or Enter activates the default\nbutton from anywhere in the dialog, a focused Cancel included; Space\npresses the focused control. A link keeps its own Enter, and in a\nmulti-line editor Return inserts the newline while the keypad's Enter\nactivates the button.\n\nSlotted children placed with `top`/`left` measure from the content region's\ncorner — the frame's inner edge, below the title bar — and flow content\nstarts at the same corner.",
3402
+ "description": "`<vf-dialog>` — the System 7 modal dialog shell.\n\nTwo chromes, one modal lifecycle (native `<dialog>` for top-layer rendering\nand focus trapping, with a fully transparent backdrop — no dimming). Both\nare the same dBoxProc double frame — 1px outer rule, 2px gap, 2px inner\nband, no shadow (vfModalFrame):\n\n- **Default:** the movable modal (movableDBoxProc) — the striped title bar\n set into the top of that frame, with a centered title over a white body.\n Drag the title bar to move it. `closable` adds the standard close box\n (left of the bar) — the HIG's own figures disagree on whether a movable\n modal carries one (Figure 5-1 says yes, Figure 6-1 and the Chapter 6 text\n say no), so the component enables either reading rather than enforcing\n one.\n- **`frame=\"plain\"`:** the modal dialog box — the bare frame, no title bar —\n and immovable, like the original. With no bar, `heading` only names the\n dialog and `closable` is ignored.\n\nOpen it with `show()` (or set the `open` attribute/property); close with\n`close()`. Escape closes it and fires `vf-close` with\n`{ reason: 'escape' }`; the close box and programmatic closing fire\n`{ reason: 'close' }`. With `light-dismiss`, a click outside the frame\ncloses it too, with `{ reason: 'outside' }` — for the About box; off by\ndefault, since the classic modal ignored an outside click.\n\nAnswers: a `<form method=\"dialog\">` inside it closes it with the\nsubmitting button's `value` as `returnValue`, and `close(value)` does the\nsame. `vf-close` carries it as `detail.returnValue`, null when the close\ncarried none (Escape, a click outside, the close box).\n\nKeyboard, the classic Dialog Manager's two rules (VfModalDialog):\non open, focus goes to the first text-entry control — a slotted control\nwith `autofocus` or `autoselect` first — or, with none, to the default\nbutton (`vf-button variant=\"default\"`). A field marked `autoselect` opens\nwith its whole text selected, on every open. Return or Enter activates\nthe default button from anywhere in the dialog, a focused Cancel\nincluded; Space presses the focused control. A link keeps its own Enter,\nand in a multi-line editor Return inserts the newline while the keypad's\nEnter activates the button.\n\nSlotted children placed with `top`/`left` measure from the content region's\ncorner — the frame's inner edge, below the title bar — and flow content\nstarts at the same corner.",
3403
3403
  "name": "VfDialog",
3404
3404
  "cssProperties": [
3405
3405
  {
@@ -3833,7 +3833,7 @@
3833
3833
  "text": "HTMLElement | null"
3834
3834
  },
3835
3835
  "privacy": "protected",
3836
- "description": "Where focus lands on open. The classic Dialog Manager put the insertion\npoint in the first editable text item and gave nothing else focus at all;\nthe web needs a focused control for the keyboard to have anywhere to be,\nso with no text field the default button takes it (which is also what\nmakes Return and Space work there without a Tab). In order:\n\n1. a slotted control carrying `autofocus` — the author's say;\n2. the first enabled text-entry control (`vf-text-field`,\n `vf-number-field`, `vf-text-area`, or a native text input/textarea);\n3. the defaultButton;\n4. null — leave the browser's own choice alone.\n\nLeft to itself, `showModal()` focuses the first focusable thing in flat\ntree order, which for a Cancel/OK row is Cancel, and for a body with a\nlink in it is the link — so Return did the one thing a classic dialog's\nReturn never did. Override to choose differently.",
3836
+ "description": "Where focus lands on open. The classic Dialog Manager put the insertion\npoint in the first editable text item and gave nothing else focus at all;\nthe web needs a focused control for the keyboard to have anywhere to be,\nso with no text field the default button takes it (which is also what\nmakes Return and Space work there without a Tab). In order:\n\n1. the first slotted control carrying `autofocus` or `autoselect` — the\n author's say;\n2. the first enabled text-entry control (`vf-text-field`,\n `vf-number-field`, `vf-text-area`, or a native text input/textarea);\n3. the defaultButton;\n4. null — leave the browser's own choice alone.\n\nLeft to itself, `showModal()` focuses the first focusable thing in flat\ntree order, which for a Cancel/OK row is Cancel, and for a body with a\nlink in it is the link — so Return did the one thing a classic dialog's\nReturn never did. Override to choose differently. A target marked\n`autoselect` has its text selected once `vf-show` has fired.",
3837
3837
  "readonly": true,
3838
3838
  "inheritedFrom": {
3839
3839
  "name": "VfModalDialog",
@@ -4205,7 +4205,7 @@
4205
4205
  ],
4206
4206
  "events": [
4207
4207
  {
4208
- "description": "Dialog opened, placed and given its initial focus. Detail `{ focus }`, the element focused: the moment to select a field's default text (`select()`) or measure copy that varies.",
4208
+ "description": "Dialog opened, placed and given its initial focus. Detail `{ focus }`, the element focused: the moment to measure copy that varies. A field marked `autoselect` has its text selected after it.",
4209
4209
  "name": "vf-show",
4210
4210
  "inheritedFrom": {
4211
4211
  "name": "VfModalDialog",
@@ -10304,6 +10304,21 @@
10304
10304
  "module": "src/text-control.ts"
10305
10305
  }
10306
10306
  },
10307
+ {
10308
+ "kind": "field",
10309
+ "name": "autoselect",
10310
+ "type": {
10311
+ "text": "boolean"
10312
+ },
10313
+ "default": "false",
10314
+ "description": "Opens with the whole text selected, so typing replaces it. Implies\n`autofocus`: the first control carrying either takes the opening focus of\nits `vf-dialog`, or of a window the shell's window manager opens. A dialog\nselects the text on every open, a window on its first open only. A click\nstill places the caret.",
10315
+ "attribute": "autoselect",
10316
+ "reflects": true,
10317
+ "inheritedFrom": {
10318
+ "name": "VfTextControlBase",
10319
+ "module": "src/text-control.ts"
10320
+ }
10321
+ },
10307
10322
  {
10308
10323
  "kind": "field",
10309
10324
  "name": "name",
@@ -10464,6 +10479,29 @@
10464
10479
  "module": "src/text-control.ts"
10465
10480
  }
10466
10481
  },
10482
+ {
10483
+ "kind": "method",
10484
+ "name": "focus",
10485
+ "return": {
10486
+ "type": {
10487
+ "text": "void"
10488
+ }
10489
+ },
10490
+ "parameters": [
10491
+ {
10492
+ "name": "options",
10493
+ "optional": true,
10494
+ "type": {
10495
+ "text": "FocusOptions"
10496
+ }
10497
+ }
10498
+ ],
10499
+ "description": "Focuses the inner control, keeping its caret where it was. Chromium\nselects all of an input's text when the host hands the focus on, as a Tab\ndoes; `select()` and autoselect are how a field opens selected.",
10500
+ "inheritedFrom": {
10501
+ "name": "VfTextControlBase",
10502
+ "module": "src/text-control.ts"
10503
+ }
10504
+ },
10467
10505
  {
10468
10506
  "kind": "method",
10469
10507
  "name": "select",
@@ -10472,7 +10510,7 @@
10472
10510
  "text": "void"
10473
10511
  }
10474
10512
  },
10475
- "description": "Select all of the field's text, as a native field's `select()` does.",
10513
+ "description": "Select all of the field's text, as a native field's `select()` does. With\na new value not yet rendered, once it has: writing the value into the\ninput drops its selection, so `field.value = x; field.select()` selects\n`x`, as on a native field.",
10476
10514
  "inheritedFrom": {
10477
10515
  "name": "VfTextControlBase",
10478
10516
  "module": "src/text-control.ts"
@@ -11281,6 +11319,19 @@
11281
11319
  "module": "src/text-control.ts"
11282
11320
  }
11283
11321
  },
11322
+ {
11323
+ "name": "autoselect",
11324
+ "type": {
11325
+ "text": "boolean"
11326
+ },
11327
+ "default": "false",
11328
+ "description": "Opens with the whole text selected, so typing replaces it. Implies\n`autofocus`: the first control carrying either takes the opening focus of\nits `vf-dialog`, or of a window the shell's window manager opens. A dialog\nselects the text on every open, a window on its first open only. A click\nstill places the caret.",
11329
+ "fieldName": "autoselect",
11330
+ "inheritedFrom": {
11331
+ "name": "VfTextControlBase",
11332
+ "module": "src/text-control.ts"
11333
+ }
11334
+ },
11284
11335
  {
11285
11336
  "name": "name",
11286
11337
  "type": {
@@ -18353,6 +18404,21 @@
18353
18404
  "module": "src/text-control.ts"
18354
18405
  }
18355
18406
  },
18407
+ {
18408
+ "kind": "field",
18409
+ "name": "autoselect",
18410
+ "type": {
18411
+ "text": "boolean"
18412
+ },
18413
+ "default": "false",
18414
+ "description": "Opens with the whole text selected, so typing replaces it. Implies\n`autofocus`: the first control carrying either takes the opening focus of\nits `vf-dialog`, or of a window the shell's window manager opens. A dialog\nselects the text on every open, a window on its first open only. A click\nstill places the caret.",
18415
+ "attribute": "autoselect",
18416
+ "reflects": true,
18417
+ "inheritedFrom": {
18418
+ "name": "VfTextControlBase",
18419
+ "module": "src/text-control.ts"
18420
+ }
18421
+ },
18356
18422
  {
18357
18423
  "kind": "field",
18358
18424
  "name": "name",
@@ -18513,6 +18579,29 @@
18513
18579
  "module": "src/text-control.ts"
18514
18580
  }
18515
18581
  },
18582
+ {
18583
+ "kind": "method",
18584
+ "name": "focus",
18585
+ "return": {
18586
+ "type": {
18587
+ "text": "void"
18588
+ }
18589
+ },
18590
+ "parameters": [
18591
+ {
18592
+ "name": "options",
18593
+ "optional": true,
18594
+ "type": {
18595
+ "text": "FocusOptions"
18596
+ }
18597
+ }
18598
+ ],
18599
+ "description": "Focuses the inner control, keeping its caret where it was. Chromium\nselects all of an input's text when the host hands the focus on, as a Tab\ndoes; `select()` and autoselect are how a field opens selected.",
18600
+ "inheritedFrom": {
18601
+ "name": "VfTextControlBase",
18602
+ "module": "src/text-control.ts"
18603
+ }
18604
+ },
18516
18605
  {
18517
18606
  "kind": "method",
18518
18607
  "name": "select",
@@ -18521,7 +18610,7 @@
18521
18610
  "text": "void"
18522
18611
  }
18523
18612
  },
18524
- "description": "Select all of the field's text, as a native field's `select()` does.",
18613
+ "description": "Select all of the field's text, as a native field's `select()` does. With\na new value not yet rendered, once it has: writing the value into the\ninput drops its selection, so `field.value = x; field.select()` selects\n`x`, as on a native field.",
18525
18614
  "inheritedFrom": {
18526
18615
  "name": "VfTextControlBase",
18527
18616
  "module": "src/text-control.ts"
@@ -19344,6 +19433,19 @@
19344
19433
  "module": "src/text-control.ts"
19345
19434
  }
19346
19435
  },
19436
+ {
19437
+ "name": "autoselect",
19438
+ "type": {
19439
+ "text": "boolean"
19440
+ },
19441
+ "default": "false",
19442
+ "description": "Opens with the whole text selected, so typing replaces it. Implies\n`autofocus`: the first control carrying either takes the opening focus of\nits `vf-dialog`, or of a window the shell's window manager opens. A dialog\nselects the text on every open, a window on its first open only. A click\nstill places the caret.",
19443
+ "fieldName": "autoselect",
19444
+ "inheritedFrom": {
19445
+ "name": "VfTextControlBase",
19446
+ "module": "src/text-control.ts"
19447
+ }
19448
+ },
19347
19449
  {
19348
19450
  "name": "name",
19349
19451
  "type": {
@@ -19632,6 +19734,21 @@
19632
19734
  "module": "src/text-control.ts"
19633
19735
  }
19634
19736
  },
19737
+ {
19738
+ "kind": "field",
19739
+ "name": "autoselect",
19740
+ "type": {
19741
+ "text": "boolean"
19742
+ },
19743
+ "default": "false",
19744
+ "description": "Opens with the whole text selected, so typing replaces it. Implies\n`autofocus`: the first control carrying either takes the opening focus of\nits `vf-dialog`, or of a window the shell's window manager opens. A dialog\nselects the text on every open, a window on its first open only. A click\nstill places the caret.",
19745
+ "attribute": "autoselect",
19746
+ "reflects": true,
19747
+ "inheritedFrom": {
19748
+ "name": "VfTextControlBase",
19749
+ "module": "src/text-control.ts"
19750
+ }
19751
+ },
19635
19752
  {
19636
19753
  "kind": "field",
19637
19754
  "name": "name",
@@ -19776,6 +19893,29 @@
19776
19893
  "module": "src/text-control.ts"
19777
19894
  }
19778
19895
  },
19896
+ {
19897
+ "kind": "method",
19898
+ "name": "focus",
19899
+ "return": {
19900
+ "type": {
19901
+ "text": "void"
19902
+ }
19903
+ },
19904
+ "parameters": [
19905
+ {
19906
+ "name": "options",
19907
+ "optional": true,
19908
+ "type": {
19909
+ "text": "FocusOptions"
19910
+ }
19911
+ }
19912
+ ],
19913
+ "description": "Focuses the inner control, keeping its caret where it was. Chromium\nselects all of an input's text when the host hands the focus on, as a Tab\ndoes; `select()` and autoselect are how a field opens selected.",
19914
+ "inheritedFrom": {
19915
+ "name": "VfTextControlBase",
19916
+ "module": "src/text-control.ts"
19917
+ }
19918
+ },
19779
19919
  {
19780
19920
  "kind": "method",
19781
19921
  "name": "select",
@@ -19784,7 +19924,7 @@
19784
19924
  "text": "void"
19785
19925
  }
19786
19926
  },
19787
- "description": "Select all of the field's text, as a native field's `select()` does.",
19927
+ "description": "Select all of the field's text, as a native field's `select()` does. With\na new value not yet rendered, once it has: writing the value into the\ninput drops its selection, so `field.value = x; field.select()` selects\n`x`, as on a native field.",
19788
19928
  "inheritedFrom": {
19789
19929
  "name": "VfTextControlBase",
19790
19930
  "module": "src/text-control.ts"
@@ -20630,6 +20770,19 @@
20630
20770
  "module": "src/text-control.ts"
20631
20771
  }
20632
20772
  },
20773
+ {
20774
+ "name": "autoselect",
20775
+ "type": {
20776
+ "text": "boolean"
20777
+ },
20778
+ "default": "false",
20779
+ "description": "Opens with the whole text selected, so typing replaces it. Implies\n`autofocus`: the first control carrying either takes the opening focus of\nits `vf-dialog`, or of a window the shell's window manager opens. A dialog\nselects the text on every open, a window on its first open only. A click\nstill places the caret.",
20780
+ "fieldName": "autoselect",
20781
+ "inheritedFrom": {
20782
+ "name": "VfTextControlBase",
20783
+ "module": "src/text-control.ts"
20784
+ }
20785
+ },
20633
20786
  {
20634
20787
  "name": "name",
20635
20788
  "type": {
@@ -22915,7 +23068,7 @@
22915
23068
  "declarations": [
22916
23069
  {
22917
23070
  "kind": "class",
22918
- "description": "Shared base for the kit's editable text fields — `vf-text-field`,\n`vf-text-area` and `vf-number-field`. Builds on\nVfShadowRoleControl (form association, the disabled-value guard and\nthe name/description bridge every field needs, its role sitting on the inner\nnative control) and adds the value/label scaffolding\nevery field repeated: the reflected `name`, the `value`/`placeholder`/\n`readonly`/`label` props, the captured default restored on form reset, the\n`updated()` → VfShadowRoleControl.syncFormValue funnel, and the display-\nscaling controller. Pairs with the `vfField` css fragment (the white-well\nskin) in styles/base.ts.\n\nSubclasses render their own native control (`<input>`/`<textarea>` plus any\nadornments), tag it `class=\"vf-field\"`, and may enrich the emitted event\ndetail via emitValue.",
23071
+ "description": "Shared base for the kit's editable text fields — `vf-text-field`,\n`vf-text-area` and `vf-number-field`. Builds on\nVfShadowRoleControl (form association, the disabled-value guard and\nthe name/description bridge every field needs, its role sitting on the inner\nnative control) and adds the value/label scaffolding\nevery field repeated: the reflected `name`, the `value`/`placeholder`/\n`readonly`/`autoselect`/`label` props, the captured default restored on\nform reset, the `updated()` → VfShadowRoleControl.syncFormValue\nfunnel, `select()` and `focus()` on the inner control, and the display-\nscaling controller. Pairs with the `vfField` css fragment (the white-well\nskin) in styles/base.ts.\n\nSubclasses render their own native control (`<input>`/`<textarea>` plus any\nadornments), tag it `class=\"vf-field\"`, and may enrich the emitted event\ndetail via emitValue.",
22919
23072
  "name": "VfTextControlBase",
22920
23073
  "members": [
22921
23074
  {
@@ -22959,6 +23112,17 @@
22959
23112
  "attribute": "readonly",
22960
23113
  "reflects": true
22961
23114
  },
23115
+ {
23116
+ "kind": "field",
23117
+ "name": "autoselect",
23118
+ "type": {
23119
+ "text": "boolean"
23120
+ },
23121
+ "default": "false",
23122
+ "description": "Opens with the whole text selected, so typing replaces it. Implies\n`autofocus`: the first control carrying either takes the opening focus of\nits `vf-dialog`, or of a window the shell's window manager opens. A dialog\nselects the text on every open, a window on its first open only. A click\nstill places the caret.",
23123
+ "attribute": "autoselect",
23124
+ "reflects": true
23125
+ },
22962
23126
  {
22963
23127
  "kind": "field",
22964
23128
  "name": "name",
@@ -23079,6 +23243,25 @@
23079
23243
  "description": "The inner native control every field renders, tagged `vf-field`.",
23080
23244
  "readonly": true
23081
23245
  },
23246
+ {
23247
+ "kind": "method",
23248
+ "name": "focus",
23249
+ "return": {
23250
+ "type": {
23251
+ "text": "void"
23252
+ }
23253
+ },
23254
+ "parameters": [
23255
+ {
23256
+ "name": "options",
23257
+ "optional": true,
23258
+ "type": {
23259
+ "text": "FocusOptions"
23260
+ }
23261
+ }
23262
+ ],
23263
+ "description": "Focuses the inner control, keeping its caret where it was. Chromium\nselects all of an input's text when the host hands the focus on, as a Tab\ndoes; `select()` and autoselect are how a field opens selected."
23264
+ },
23082
23265
  {
23083
23266
  "kind": "method",
23084
23267
  "name": "select",
@@ -23087,7 +23270,7 @@
23087
23270
  "text": "void"
23088
23271
  }
23089
23272
  },
23090
- "description": "Select all of the field's text, as a native field's `select()` does."
23273
+ "description": "Select all of the field's text, as a native field's `select()` does. With\na new value not yet rendered, once it has: writing the value into the\ninput drops its selection, so `field.value = x; field.select()` selects\n`x`, as on a native field."
23091
23274
  },
23092
23275
  {
23093
23276
  "kind": "method",
@@ -23805,6 +23988,15 @@
23805
23988
  "description": "Makes the field read-only (focusable, not editable).",
23806
23989
  "fieldName": "readonly"
23807
23990
  },
23991
+ {
23992
+ "name": "autoselect",
23993
+ "type": {
23994
+ "text": "boolean"
23995
+ },
23996
+ "default": "false",
23997
+ "description": "Opens with the whole text selected, so typing replaces it. Implies\n`autofocus`: the first control carrying either takes the opening focus of\nits `vf-dialog`, or of a window the shell's window manager opens. A dialog\nselects the text on every open, a window on its first open only. A click\nstill places the caret.",
23998
+ "fieldName": "autoselect"
23999
+ },
23808
24000
  {
23809
24001
  "name": "name",
23810
24002
  "type": {
@@ -24124,7 +24316,7 @@
24124
24316
  },
24125
24317
  {
24126
24318
  "kind": "class",
24127
- "description": "Base class for the modal shell `vf-dialog` — and for a consumer's own\nmodal (an alert box, say) authored against the kit.\n\nOwns the native `<dialog>` lifecycle every modal shares: `open` sync, `show()` /\n`close()`, the top/left placement (stated or centered) and the\nsingle `close` funnel that drops the written origin and fires `vf-close` with\nthe reason. Because every close path — Escape, `close()`, the opt-in\nlightDismiss click outside — routes through the native `close`\nevent, an Escape-close no longer leaves a stale origin behind, so the next\nopen re-derives it.\n\nIt also owns the two keyboard rules every classic dialog followed (see\ndefaultButton and initialFocusTarget): Return or Enter\nactivates the default button from anywhere in the dialog, and the box opens\nwith the insertion point in its first text field — or, with none, focus on\nthe default button.\n\nRemoving an open modal from the DOM is a close path too. HTML's dialog\n*removing steps* take the element out of the top layer **without** running\nthe close algorithm — no `close` event, no focus restoration — which is\nexactly what the standard framework pattern of unmounting a dialog instead\nof calling `close()` does. `disconnectedCallback` routes that path through\nthe same funnel: the removed element still fires `vf-close` (heard by\nlisteners on the element itself — it has left the tree, so nothing\nbubbles), `open` and the pinned margins reconcile so a re-append mounts it\nclosed and re-centered, and focus returns to the element that was focused\nwhen the modal opened.\n\nA `<form method=\"dialog\">` inside the modal closes it with the submitting\nbutton's `value` as returnValue, as a form inside a native\n`<dialog>` does. The platform's own rule looks for a `<dialog>` around the\nform, and this one is in the shadow root, so the modal listens for the\nsubmit itself.\n\nSubclasses supply only the frame chrome: a `render()` returning\n`<dialog",
24319
+ "description": "Base class for the modal shell `vf-dialog` — and for a consumer's own\nmodal (an alert box, say) authored against the kit.\n\nOwns the native `<dialog>` lifecycle every modal shares: `open` sync, `show()` /\n`close()`, the top/left placement (stated or centered) and the\nsingle `close` funnel that drops the written origin and fires `vf-close` with\nthe reason. Because every close path — Escape, `close()`, the opt-in\nlightDismiss click outside — routes through the native `close`\nevent, an Escape-close no longer leaves a stale origin behind, so the next\nopen re-derives it.\n\nIt also owns the two keyboard rules every classic dialog followed (see\ndefaultButton and initialFocusTarget): Return or Enter\nactivates the default button from anywhere in the dialog, and the box opens\nwith the insertion point in its first text field — or, with none, focus on\nthe default button. A field marked `autoselect` takes the focus with its\ntext selected, on every open.\n\nRemoving an open modal from the DOM is a close path too. HTML's dialog\n*removing steps* take the element out of the top layer **without** running\nthe close algorithm — no `close` event, no focus restoration — which is\nexactly what the standard framework pattern of unmounting a dialog instead\nof calling `close()` does. `disconnectedCallback` routes that path through\nthe same funnel: the removed element still fires `vf-close` (heard by\nlisteners on the element itself — it has left the tree, so nothing\nbubbles), `open` and the pinned margins reconcile so a re-append mounts it\nclosed and re-centered, and focus returns to the element that was focused\nwhen the modal opened.\n\nA `<form method=\"dialog\">` inside the modal closes it with the submitting\nbutton's `value` as returnValue, as a form inside a native\n`<dialog>` does. The platform's own rule looks for a `<dialog>` around the\nform, and this one is in the shadow root, so the modal listens for the\nsubmit itself.\n\nSubclasses supply only the frame chrome: a `render()` returning\n`<dialog",
24128
24320
  "name": "VfModalDialog",
24129
24321
  "members": [
24130
24322
  {
@@ -24312,7 +24504,7 @@
24312
24504
  "text": "HTMLElement | null"
24313
24505
  },
24314
24506
  "privacy": "protected",
24315
- "description": "Where focus lands on open. The classic Dialog Manager put the insertion\npoint in the first editable text item and gave nothing else focus at all;\nthe web needs a focused control for the keyboard to have anywhere to be,\nso with no text field the default button takes it (which is also what\nmakes Return and Space work there without a Tab). In order:\n\n1. a slotted control carrying `autofocus` — the author's say;\n2. the first enabled text-entry control (`vf-text-field`,\n `vf-number-field`, `vf-text-area`, or a native text input/textarea);\n3. the defaultButton;\n4. null — leave the browser's own choice alone.\n\nLeft to itself, `showModal()` focuses the first focusable thing in flat\ntree order, which for a Cancel/OK row is Cancel, and for a body with a\nlink in it is the link — so Return did the one thing a classic dialog's\nReturn never did. Override to choose differently.",
24507
+ "description": "Where focus lands on open. The classic Dialog Manager put the insertion\npoint in the first editable text item and gave nothing else focus at all;\nthe web needs a focused control for the keyboard to have anywhere to be,\nso with no text field the default button takes it (which is also what\nmakes Return and Space work there without a Tab). In order:\n\n1. the first slotted control carrying `autofocus` or `autoselect` — the\n author's say;\n2. the first enabled text-entry control (`vf-text-field`,\n `vf-number-field`, `vf-text-area`, or a native text input/textarea);\n3. the defaultButton;\n4. null — leave the browser's own choice alone.\n\nLeft to itself, `showModal()` focuses the first focusable thing in flat\ntree order, which for a Cancel/OK row is Cancel, and for a body with a\nlink in it is the link — so Return did the one thing a classic dialog's\nReturn never did. Override to choose differently. A target marked\n`autoselect` has its text selected once `vf-show` has fired.",
24316
24508
  "readonly": true
24317
24509
  },
24318
24510
  {
@@ -24588,7 +24780,7 @@
24588
24780
  ],
24589
24781
  "events": [
24590
24782
  {
24591
- "description": "The modal opened: it is in the top layer, placed, and its initial focus is set. `detail: { focus }`, the element focused. The page's moment to finish composing it — select a field's default text, measure copy that varies. Fired inside `show()` once the modal has rendered, else at its first render.",
24783
+ "description": "The modal opened: it is in the top layer, placed, and its initial focus is set. `detail: { focus }`, the element focused. The page's moment to finish composing it, such as measuring copy that varies. A field marked `autoselect` has its text selected after the event, so a value set in a handler is the one selected. Fired inside `show()` once the modal has rendered, else at its first render.",
24592
24784
  "name": "vf-show"
24593
24785
  },
24594
24786
  {
@@ -32,12 +32,13 @@ import { VfModalDialog } from '../modal-dialog.js';
32
32
  *
33
33
  * Keyboard, the classic Dialog Manager's two rules ({@link VfModalDialog}):
34
34
  * on open, focus goes to the first text-entry control — a slotted control
35
- * with `autofocus` first — or, with none, to the default button
36
- * (`vf-button variant="default"`). Return or Enter activates the default
37
- * button from anywhere in the dialog, a focused Cancel included; Space
38
- * presses the focused control. A link keeps its own Enter, and in a
39
- * multi-line editor Return inserts the newline while the keypad's Enter
40
- * activates the button.
35
+ * with `autofocus` or `autoselect` first — or, with none, to the default
36
+ * button (`vf-button variant="default"`). A field marked `autoselect` opens
37
+ * with its whole text selected, on every open. Return or Enter activates
38
+ * the default button from anywhere in the dialog, a focused Cancel
39
+ * included; Space presses the focused control. A link keeps its own Enter,
40
+ * and in a multi-line editor Return inserts the newline while the keypad's
41
+ * Enter activates the button.
41
42
  *
42
43
  * Slotted children placed with `top`/`left` measure from the content region's
43
44
  * corner — the frame's inner edge, below the title bar — and flow content
@@ -54,8 +55,8 @@ import { VfModalDialog } from '../modal-dialog.js';
54
55
  * content). Inert while the content fits; over-stuffed, it scrolls under a
55
56
  * System 7 rail and becomes a keyboard stop.
56
57
  * @fires vf-show - Dialog opened, placed and given its initial focus. Detail
57
- * `{ focus }`, the element focused: the moment to select a field's default
58
- * text (`select()`) or measure copy that varies.
58
+ * `{ focus }`, the element focused: the moment to measure copy that
59
+ * varies. A field marked `autoselect` has its text selected after it.
59
60
  * @fires vf-close - Dialog closed. Detail `{ reason: 'escape' | 'close' |
60
61
  * 'outside', returnValue: string | null }` — `'outside'` only under
61
62
  * `light-dismiss` — plus `altKey`, `shiftKey`, `metaKey` and `ctrlKey`
@@ -57,7 +57,8 @@ export declare const modalDialogStyles: import("lit").CSSResult;
57
57
  * {@link defaultButton} and {@link initialFocusTarget}): Return or Enter
58
58
  * activates the default button from anywhere in the dialog, and the box opens
59
59
  * with the insertion point in its first text field — or, with none, focus on
60
- * the default button.
60
+ * the default button. A field marked `autoselect` takes the focus with its
61
+ * text selected, on every open.
61
62
  *
62
63
  * Removing an open modal from the DOM is a close path too. HTML's dialog
63
64
  * *removing steps* take the element out of the top layer **without** running
@@ -82,9 +83,10 @@ export declare const modalDialogStyles: import("lit").CSSResult;
82
83
  *
83
84
  * @fires vf-show - The modal opened: it is in the top layer, placed, and its
84
85
  * initial focus is set. `detail: { focus }`, the element focused. The page's
85
- * moment to finish composing it — select a field's default text, measure
86
- * copy that varies. Fired inside `show()` once the modal has rendered, else
87
- * at its first render.
86
+ * moment to finish composing it, such as measuring copy that varies. A
87
+ * field marked `autoselect` has its text selected after the event, so a
88
+ * value set in a handler is the one selected. Fired inside `show()` once
89
+ * the modal has rendered, else at its first render.
88
90
  * @fires vf-close - The modal closed. `detail: { reason: 'escape' | 'close' |
89
91
  * 'outside', returnValue: string | null }`.
90
92
  */
@@ -185,7 +187,8 @@ export declare class VfModalDialog extends LitElement {
185
187
  * so with no text field the default button takes it (which is also what
186
188
  * makes Return and Space work there without a Tab). In order:
187
189
  *
188
- * 1. a slotted control carrying `autofocus` — the author's say;
190
+ * 1. the first slotted control carrying `autofocus` or `autoselect` — the
191
+ * author's say;
189
192
  * 2. the first enabled text-entry control (`vf-text-field`,
190
193
  * `vf-number-field`, `vf-text-area`, or a native text input/textarea);
191
194
  * 3. the {@link defaultButton};
@@ -194,7 +197,8 @@ export declare class VfModalDialog extends LitElement {
194
197
  * Left to itself, `showModal()` focuses the first focusable thing in flat
195
198
  * tree order, which for a Cancel/OK row is Cancel, and for a body with a
196
199
  * link in it is the link — so Return did the one thing a classic dialog's
197
- * Return never did. Override to choose differently.
200
+ * Return never did. Override to choose differently. A target marked
201
+ * `autoselect` has its text selected once `vf-show` has fired.
198
202
  */
199
203
  protected get initialFocusTarget(): HTMLElement | null;
200
204
  /** Open the modal (native `showModal()`), pinned onto the device grid. */
@@ -12,7 +12,7 @@ var p = 24, m = /* @__PURE__ */ new Set([
12
12
  "email",
13
13
  "password",
14
14
  "number"
15
- ]), h = (e) => e instanceof HTMLInputElement ? m.has(e.type) : !0, g = "vf-text-field, vf-number-field, vf-text-area, textarea, input", _ = u`
15
+ ]), h = (e) => e instanceof HTMLInputElement ? m.has(e.type) : !0, g = "vf-text-field, vf-number-field, vf-text-area, textarea, input", _ = (e) => e.autoselect ?? e.hasAttribute("autoselect"), v = u`
16
16
  dialog {
17
17
  padding: 0;
18
18
  margin: auto;
@@ -51,7 +51,7 @@ var p = 24, m = /* @__PURE__ */ new Set([
51
51
  the fallback is the arrow it always showed. */
52
52
  cursor: var(--vf-cursor, default);
53
53
  }
54
- `, v = class extends l {
54
+ `, y = class extends l {
55
55
  get dialogSize() {
56
56
  return {
57
57
  width: a(this.width ?? 260),
@@ -73,7 +73,7 @@ var p = 24, m = /* @__PURE__ */ new Set([
73
73
  constructor() {
74
74
  super(), this.scale = new n(this), this.open = !1, this.returnValue = "", this.lightDismiss = !1, this.#e = !1, this.#n = null, this.#r = null, this.#i = null, this.#a = (t) => {
75
75
  let n = t.target;
76
- if (!(n instanceof HTMLFormElement) || y(n) !== this) return;
76
+ if (!(n instanceof HTMLFormElement) || b(n) !== this) return;
77
77
  let r = t.submitter;
78
78
  if ((r?.hasAttribute("formmethod") ? r.getAttribute("formmethod") : n.getAttribute("method"))?.toLowerCase() !== "dialog") return;
79
79
  let i = r instanceof HTMLButtonElement || r instanceof HTMLInputElement ? r.value : void 0;
@@ -122,7 +122,7 @@ var p = 24, m = /* @__PURE__ */ new Set([
122
122
  return [...this.querySelectorAll(e), ...this.renderRoot.querySelectorAll(e)].find((e) => !e.matches(":disabled")) ?? null;
123
123
  }
124
124
  get initialFocusTarget() {
125
- return this.querySelector("[autofocus]") || ([...this.querySelectorAll(g)].find((e) => h(e) && !e.matches(":disabled")) ?? this.defaultButton);
125
+ return [...this.querySelectorAll("*")].find((e) => e.hasAttribute("autofocus") || _(e)) || ([...this.querySelectorAll(g)].find((e) => h(e) && !e.matches(":disabled")) ?? this.defaultButton);
126
126
  }
127
127
  #c() {
128
128
  let e = this.initialFocusTarget;
@@ -195,7 +195,7 @@ var p = 24, m = /* @__PURE__ */ new Set([
195
195
  if (this.open && !e.open) {
196
196
  this.#p = document.activeElement, this.returnValue = "", e.showModal();
197
197
  let n = this.#c();
198
- this.settle(), this.#S(e), this.#s.attach(), t(this, "vf-show", { focus: n });
198
+ this.settle(), this.#S(e), this.#s.attach(), t(this, "vf-show", { focus: n }), n && _(n) && n.select?.();
199
199
  } else !this.open && e.open && e.close();
200
200
  }
201
201
  }
@@ -233,14 +233,14 @@ var p = 24, m = /* @__PURE__ */ new Set([
233
233
  s([d({
234
234
  type: Boolean,
235
235
  reflect: !0
236
- })], v.prototype, "open", void 0), s([d({ type: Number })], v.prototype, "width", void 0), s([d({ type: Number })], v.prototype, "height", void 0), s([d({ type: Number })], v.prototype, "top", void 0), s([d({ type: Number })], v.prototype, "left", void 0), s([d({
236
+ })], y.prototype, "open", void 0), s([d({ type: Number })], y.prototype, "width", void 0), s([d({ type: Number })], y.prototype, "height", void 0), s([d({ type: Number })], y.prototype, "top", void 0), s([d({ type: Number })], y.prototype, "left", void 0), s([d({
237
237
  type: Boolean,
238
238
  reflect: !0,
239
239
  attribute: "light-dismiss"
240
- })], v.prototype, "lightDismiss", void 0), s([f("dialog")], v.prototype, "_dialog", void 0);
241
- function y(e) {
242
- for (let t = e.parentElement; t; t = t.parentElement) if (t instanceof v) return t;
240
+ })], y.prototype, "lightDismiss", void 0), s([f("dialog")], y.prototype, "_dialog", void 0);
241
+ function b(e) {
242
+ for (let t = e.parentElement; t; t = t.parentElement) if (t instanceof y) return t;
243
243
  return null;
244
244
  }
245
245
  //#endregion
246
- export { v as VfModalDialog, _ as modalDialogStyles };
246
+ export { y as VfModalDialog, v as modalDialogStyles };
@@ -32,13 +32,15 @@ export declare const TRASH = "trash";
32
32
  export declare const DISK = "disk";
33
33
  /** A folder's kind. */
34
34
  export declare const FOLDER = "folder";
35
+ /** An application's icon: the kind the shell registers, whose data names the application it opens. */
36
+ export declare const APP_KIND = "app";
35
37
  /** The name a new folder takes, counted up where it is taken. */
36
38
  export declare const UNTITLED_FOLDER = "untitled folder";
37
39
  /** One item of the catalog. */
38
40
  export interface Item {
39
41
  id: string;
40
42
  name: string;
41
- /** `folder`, a volume's (`trash`, `disk`), or a kind an application registers. */
43
+ /** `folder`, a volume's (`trash`, `disk`), the shell's `app`, or a kind an application registers. */
42
44
  kind: string;
43
45
  /** A folder's id, a volume's, or null for the desktop. */
44
46
  parent: string | null;
@@ -107,6 +109,8 @@ export interface CatalogArchive {
107
109
  export declare const isContainerKind: (kind: string) => boolean;
108
110
  /** Whether `id` names a volume. */
109
111
  export declare const isVolume: (id: string | null | undefined) => boolean;
112
+ /** The application an `app` item stands for: its `data.app`, or null. */
113
+ export declare function appIdOf(item: Item): string | null;
110
114
  /** The item with `id`, or null. */
111
115
  export declare function itemOf(state: CatalogState, id: string | null | undefined): Item | null;
112
116
  /** The container `parent` resolves to: that container while it is listed, else the desktop (null). */