@fusion.dev/helix-headless 0.203.0 → 0.204.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fusion.dev/helix-headless",
3
3
  "description": "Headless component tier. Structure, accessibility, state, and form participation. No styling.",
4
- "version": "0.203.0",
4
+ "version": "0.204.1",
5
5
  "license": "MIT",
6
6
  "author": "Ross Sheppard <ross.sheppard@fusion.dev>",
7
7
  "repository": {
@@ -53,14 +53,14 @@
53
53
  },
54
54
  "bugs": "https://github.com/project-fusion/fusion/issues",
55
55
  "dependencies": {
56
- "@fusion.dev/helix-core": "0.203.0",
57
- "@fusion.dev/helix-icons": "0.203.0",
56
+ "@fusion.dev/helix-core": "0.204.1",
57
+ "@fusion.dev/helix-icons": "0.204.1",
58
58
  "tslib": "^2.8.1",
59
59
  "uqr": "^0.1.3"
60
60
  },
61
61
  "devDependencies": {
62
- "@fusion.dev/helix-cem": "0.203.0",
63
- "@fusion.dev/helix-testing": "0.203.0",
62
+ "@fusion.dev/helix-cem": "0.204.1",
63
+ "@fusion.dev/helix-testing": "0.204.1",
64
64
  "@fusion.dev/scripts": "0.0.0-dev",
65
65
  "@happy-dom/global-registrator": "^20.14.5",
66
66
  "@lit-labs/ssr": "^4.1.0",
package/types/jsx.d.ts CHANGED
@@ -19811,6 +19811,12 @@ export type HelixHeadlessLogHelixExpandElementEvent =
19811
19811
  /** `helix-pin` event type */
19812
19812
  export type HelixHeadlessLogHelixPinElementEvent =
19813
19813
  HelixHeadlessLogElementEvent<HelixPinEvent>;
19814
+ /** `helix-select` event type */
19815
+ export type HelixHeadlessLogHelixSelectElementEvent =
19816
+ HelixHeadlessLogElementEvent<HelixSelectEvent>;
19817
+ /** `helix-selected` event type */
19818
+ export type HelixHeadlessLogHelixSelectedElementEvent =
19819
+ HelixHeadlessLogElementEvent<HelixSelectedEvent>;
19814
19820
 
19815
19821
  export type HelixHeadlessLogProps = {
19816
19822
  /** Whether the log opens following its newest line, when `pinned` is not set.
@@ -19846,6 +19852,11 @@ many arrived together and `{text}` is the first of them. */
19846
19852
  "fallback-label"?: (HelixHeadlessLog["fallbackLabel"]) | undefined;
19847
19853
  /** The log's name, read by screen readers, where `label` is empty. */
19848
19854
  fallbackLabel?: (HelixHeadlessLog["fallbackLabel"]) | undefined;
19855
+ /** The format written text is in, read with a parser Helix ships:
19856
+ `github-actions` reads a GitHub Actions log's workflow commands into steps
19857
+ and levels, and `vercel` a Vercel build log's phases and warnings. Absent
19858
+ reads none. `parse` wins over it. */
19859
+ format?: (HelixHeadlessLog["format"]) | undefined;
19849
19860
  /** What a screen reader hears when a step finishes or fails. `{heading}` is
19850
19861
  the step's heading and `{status}` is `done` or `failed`. */
19851
19862
  "group-label"?: (HelixHeadlessLog["groupLabel"]) | undefined;
@@ -19894,6 +19905,16 @@ true would write the attribute on upgrade. */
19894
19905
  "resume-label"?: (HelixHeadlessLog["resumeLabel"]) | undefined;
19895
19906
  /** The words on the button that returns to the newest line, where `resume` is empty. */
19896
19907
  resumeLabel?: (HelixHeadlessLog["resumeLabel"]) | undefined;
19908
+ /** Whether pressing a line's number selects the line, and pressing another
19909
+ with Shift selects every line between them. Each number is then a
19910
+ button, or a link with `line-href`, and the arrow keys move between them. */
19911
+ selectable?: (HelixHeadlessLog["selectable"]) | undefined;
19912
+ /** The lines selected, as a number or a range such as `12-20`. Empty selects
19913
+ none. A reader's press asks first: `helix-select` is cancelable. */
19914
+ "selected-lines"?: (HelixHeadlessLog["selectedLines"]) | undefined;
19915
+ /** The lines selected, as a number or a range such as `12-20`. Empty selects
19916
+ none. A reader's press asks first: `helix-select` is cancelable. */
19917
+ selectedLines?: (HelixHeadlessLog["selectedLines"]) | undefined;
19897
19918
  /** How near the newest line still counts as being at it, in pixels. */
19898
19919
  threshold?: (HelixHeadlessLog["threshold"]) | undefined;
19899
19920
  /** How each line shows its `at`: `absolute` on the clock, `relative` as the
@@ -19924,8 +19945,8 @@ Replaced rather than mutated: setting it starts the log over with these
19924
19945
  lines, and `write` adds to them. Set it or write children, not both. */
19925
19946
  lines?: (HelixHeadlessLog["lines"]) | undefined;
19926
19947
  /** Reads each finished line of written text: return the fields to set, such
19927
- as `level` or `group`, or `null` to drop the line. Lines in `lines` are
19928
- taken as they are. */
19948
+ as `level`, `open` or `close` to start or end a step, or `null` to drop
19949
+ the line. Lines in `lines` are taken as they are. Wins over `format`. */
19929
19950
  parse?: (HelixHeadlessLog["parse"]) | undefined;
19930
19951
  /** Text to read as it arrives, to the end: a `ReadableStream` of text or
19931
19952
  bytes, such as a `fetch` response's body, or an async iterable. Bytes are
@@ -19937,10 +19958,14 @@ reading the last one. */
19937
19958
  "onhelix-before-pin"?: ((
19938
19959
  e: HelixHeadlessLogHelixBeforePinElementEvent,
19939
19960
  ) => void) | undefined;
19940
- /** Fired after a reader opens or closes a group drawn from `groups`, with the `id` of every open group in `detail.value`, separated by commas. */
19961
+ /** Fired after a reader opens or closes a step drawn from `groups` or opened by a parser, with the `id` of every open group in `detail.value`, separated by commas. */
19941
19962
  "onhelix-expand"?: ((e: HelixHeadlessLogHelixExpandElementEvent) => void) | undefined;
19942
19963
  /** Fired after the log follows the newest line or lets go of it, with `true` or `false` in `detail.value`. */
19943
19964
  "onhelix-pin"?: ((e: HelixHeadlessLogHelixPinElementEvent) => void) | undefined;
19965
+ /** Fired when a reader presses a number to change the selection, with the lines asked for in `detail.value`. Cancelable. */
19966
+ "onhelix-select"?: ((e: HelixHeadlessLogHelixSelectElementEvent) => void) | undefined;
19967
+ /** Fired after the selection changes, with the lines now selected in `detail.value`, such as `12-20`. */
19968
+ "onhelix-selected"?: ((e: HelixHeadlessLogHelixSelectedElementEvent) => void) | undefined;
19944
19969
  };
19945
19970
 
19946
19971
  export type HelixHeadlessLogSolidJsProps = {
@@ -19977,6 +20002,11 @@ many arrived together and `{text}` is the first of them. */
19977
20002
  "attr:fallback-label"?: (HelixHeadlessLog["fallbackLabel"]) | undefined;
19978
20003
  /** The log's name, read by screen readers, where `label` is empty. */
19979
20004
  "prop:fallbackLabel"?: (HelixHeadlessLog["fallbackLabel"]) | undefined;
20005
+ /** The format written text is in, read with a parser Helix ships:
20006
+ `github-actions` reads a GitHub Actions log's workflow commands into steps
20007
+ and levels, and `vercel` a Vercel build log's phases and warnings. Absent
20008
+ reads none. `parse` wins over it. */
20009
+ "prop:format"?: (HelixHeadlessLog["format"]) | undefined;
19980
20010
  /** What a screen reader hears when a step finishes or fails. `{heading}` is
19981
20011
  the step's heading and `{status}` is `done` or `failed`. */
19982
20012
  "attr:group-label"?: (HelixHeadlessLog["groupLabel"]) | undefined;
@@ -20025,6 +20055,16 @@ true would write the attribute on upgrade. */
20025
20055
  "attr:resume-label"?: (HelixHeadlessLog["resumeLabel"]) | undefined;
20026
20056
  /** The words on the button that returns to the newest line, where `resume` is empty. */
20027
20057
  "prop:resumeLabel"?: (HelixHeadlessLog["resumeLabel"]) | undefined;
20058
+ /** Whether pressing a line's number selects the line, and pressing another
20059
+ with Shift selects every line between them. Each number is then a
20060
+ button, or a link with `line-href`, and the arrow keys move between them. */
20061
+ "prop:selectable"?: (HelixHeadlessLog["selectable"]) | undefined;
20062
+ /** The lines selected, as a number or a range such as `12-20`. Empty selects
20063
+ none. A reader's press asks first: `helix-select` is cancelable. */
20064
+ "attr:selected-lines"?: (HelixHeadlessLog["selectedLines"]) | undefined;
20065
+ /** The lines selected, as a number or a range such as `12-20`. Empty selects
20066
+ none. A reader's press asks first: `helix-select` is cancelable. */
20067
+ "prop:selectedLines"?: (HelixHeadlessLog["selectedLines"]) | undefined;
20028
20068
  /** How near the newest line still counts as being at it, in pixels. */
20029
20069
  "prop:threshold"?: (HelixHeadlessLog["threshold"]) | undefined;
20030
20070
  /** How each line shows its `at`: `absolute` on the clock, `relative` as the
@@ -20055,8 +20095,8 @@ Replaced rather than mutated: setting it starts the log over with these
20055
20095
  lines, and `write` adds to them. Set it or write children, not both. */
20056
20096
  "prop:lines"?: (HelixHeadlessLog["lines"]) | undefined;
20057
20097
  /** Reads each finished line of written text: return the fields to set, such
20058
- as `level` or `group`, or `null` to drop the line. Lines in `lines` are
20059
- taken as they are. */
20098
+ as `level`, `open` or `close` to start or end a step, or `null` to drop
20099
+ the line. Lines in `lines` are taken as they are. Wins over `format`. */
20060
20100
  "prop:parse"?: (HelixHeadlessLog["parse"]) | undefined;
20061
20101
  /** Text to read as it arrives, to the end: a `ReadableStream` of text or
20062
20102
  bytes, such as a `fetch` response's body, or an async iterable. Bytes are
@@ -20067,10 +20107,14 @@ reading the last one. */
20067
20107
  "on:helix-before-pin"?: ((
20068
20108
  e: HelixHeadlessLogHelixBeforePinElementEvent,
20069
20109
  ) => void) | undefined;
20070
- /** Fired after a reader opens or closes a group drawn from `groups`, with the `id` of every open group in `detail.value`, separated by commas. */
20110
+ /** Fired after a reader opens or closes a step drawn from `groups` or opened by a parser, with the `id` of every open group in `detail.value`, separated by commas. */
20071
20111
  "on:helix-expand"?: ((e: HelixHeadlessLogHelixExpandElementEvent) => void) | undefined;
20072
20112
  /** Fired after the log follows the newest line or lets go of it, with `true` or `false` in `detail.value`. */
20073
20113
  "on:helix-pin"?: ((e: HelixHeadlessLogHelixPinElementEvent) => void) | undefined;
20114
+ /** Fired when a reader presses a number to change the selection, with the lines asked for in `detail.value`. Cancelable. */
20115
+ "on:helix-select"?: ((e: HelixHeadlessLogHelixSelectElementEvent) => void) | undefined;
20116
+ /** Fired after the selection changes, with the lines now selected in `detail.value`, such as `12-20`. */
20117
+ "on:helix-selected"?: ((e: HelixHeadlessLogHelixSelectedElementEvent) => void) | undefined;
20074
20118
 
20075
20119
  /** Set the innerHTML of the element */
20076
20120
  innerHTML?: (string) | undefined;
@@ -54785,9 +54829,10 @@ export type CustomElements = {
54785
54829
  * - `line-debug`: The row of a line at `debug`.
54786
54830
  * - `line-error`: The row of a line at `error`.
54787
54831
  * - `line-marked`: The row of a line `mark-lines` names on the log.
54832
+ * - `line-selected`: The row of a line in the log's selection.
54788
54833
  * - `line-warn`: The row of a line at `warn`.
54789
54834
  * - `match`: Text that matches the log's `query`, in a line the log draws from data.
54790
- * - `number`: The line's number, shown with `line-numbers`, and a link with `line-href`.
54835
+ * - `number`: The line's number, shown with `line-numbers`: a link with `line-href`, and a button on a `selectable` log.
54791
54836
  * - `run`: A stretch of text drawn in an ANSI style, in a line the log draws from data. Its color is `--log-run-color` and its background `--log-run-background-color`.
54792
54837
  * - `run-bold`: A run drawn bold.
54793
54838
  * - `run-dim`: A run drawn faint.
@@ -54827,8 +54872,15 @@ export type CustomElements = {
54827
54872
  * starts the line over, so a progress bar stays one line, and the line still
54828
54873
  * being written is shown as it stands. ANSI colors and weights are drawn, in
54829
54874
  * the sixteen colors the styled tier takes from your theme, and every other
54830
- * escape code is dropped. Give `parse` a function to read each finished line,
54831
- * such as a level off its prefix or a group off a marker.
54875
+ * escape code is dropped.
54876
+ *
54877
+ * **Read a CI log's own markers with `format`.** `github-actions` reads the
54878
+ * workflow commands a step writes, `::group::` and `::error::` among them,
54879
+ * and the times at the start of a downloaded log. `vercel` reads a Vercel
54880
+ * build log's phases and its warnings. Each step opens as it starts, folds
54881
+ * once it passes, stays open where it failed, and is timed from its lines.
54882
+ * For any other log, give `parse` a function that reads each finished line:
54883
+ * it returns a level, a group, or `open` and `close` to start and end a step.
54832
54884
  *
54833
54885
  * **Steps fold.** Lines that name a group in `groups` stand under its heading,
54834
54886
  * which shows its status and how long it took and opens and closes the lines.
@@ -54843,6 +54895,18 @@ export type CustomElements = {
54843
54895
  * to one. `timestamps` shows each line's `at`, on the clock or as the time
54844
54896
  * into the run. `mark-lines` marks lines, such as `12, 40-44`.
54845
54897
  *
54898
+ * **`selectable` lets a reader select lines**, as a code host does: pressing a
54899
+ * number selects its line, and pressing another with Shift selects every line
54900
+ * between them. `selected-lines` holds the selection, such as `12-20`, and
54901
+ * `helix-select` asks before it changes. With a `line-href` that is a
54902
+ * fragment, the address follows the selection, `#L12` or `#L12-L20`, and a
54903
+ * page opened at one selects it and scrolls to it.
54904
+ *
54905
+ * **The numbers are one tab stop.** Where they are links or buttons, Tab
54906
+ * reaches the one a reader last used, or the first selected, and the arrow
54907
+ * keys move between them, with Home and End for the first and the last. With
54908
+ * Shift on a `selectable` log, the selection follows.
54909
+ *
54846
54910
  * **What a screen reader hears.** The log is a `log` and stays quiet as lines
54847
54911
  * arrive, since reading a build aloud line by line helps nobody. A separate
54848
54912
  * status region says each line at `error` once it arrives, each step once it
@@ -54873,6 +54937,10 @@ export type CustomElements = {
54873
54937
  * - `error-label`/`errorLabel`: What a screen reader hears when lines at `error` arrive. `{count}` is how
54874
54938
  * many arrived together and `{text}` is the first of them.
54875
54939
  * - `fallback-label`/`fallbackLabel`: The log's name, read by screen readers, where `label` is empty.
54940
+ * - `format`: The format written text is in, read with a parser Helix ships:
54941
+ * `github-actions` reads a GitHub Actions log's workflow commands into steps
54942
+ * and levels, and `vercel` a Vercel build log's phases and warnings. Absent
54943
+ * reads none. `parse` wins over it.
54876
54944
  * - `group-label`/`groupLabel`: What a screen reader hears when a step finishes or fails. `{heading}` is
54877
54945
  * the step's heading and `{status}` is `done` or `failed`.
54878
54946
  * - `label`: The log's name, read by screen readers.
@@ -54893,6 +54961,11 @@ export type CustomElements = {
54893
54961
  * true would write the attribute on upgrade.
54894
54962
  * - `query`: Text a line has to hold to be shown, ignoring case. Empty shows every line.
54895
54963
  * - `resume-label`/`resumeLabel`: The words on the button that returns to the newest line, where `resume` is empty.
54964
+ * - `selectable`: Whether pressing a line's number selects the line, and pressing another
54965
+ * with Shift selects every line between them. Each number is then a
54966
+ * button, or a link with `line-href`, and the arrow keys move between them.
54967
+ * - `selected-lines`/`selectedLines`: The lines selected, as a number or a range such as `12-20`. Empty selects
54968
+ * none. A reader's press asks first: `helix-select` is cancelable.
54896
54969
  * - `threshold`: How near the newest line still counts as being at it, in pixels.
54897
54970
  * - `timestamps`: How each line shows its `at`: `absolute` on the clock, `relative` as the
54898
54971
  * time since the first line. Absent shows no time.
@@ -54914,8 +54987,8 @@ export type CustomElements = {
54914
54987
  * Replaced rather than mutated: setting it starts the log over with these
54915
54988
  * lines, and `write` adds to them. Set it or write children, not both. (property only)
54916
54989
  * - `parse`: Reads each finished line of written text: return the fields to set, such
54917
- * as `level` or `group`, or `null` to drop the line. Lines in `lines` are
54918
- * taken as they are. (property only)
54990
+ * as `level`, `open` or `close` to start or end a step, or `null` to drop
54991
+ * the line. Lines in `lines` are taken as they are. Wins over `format`. (property only)
54919
54992
  * - `source`: Text to read as it arrives, to the end: a `ReadableStream` of text or
54920
54993
  * bytes, such as a `fetch` response's body, or an async iterable. Bytes are
54921
54994
  * read as UTF-8. The log sets `done` when it ends, and a new source stops
@@ -54948,8 +55021,10 @@ export type CustomElements = {
54948
55021
  * Events that will be emitted by the component.
54949
55022
  *
54950
55023
  * - `helix-before-pin`: Fired when the reader leaves the newest line by scrolling, or comes back to it. Cancelable.
54951
- * - `helix-expand`: Fired after a reader opens or closes a group drawn from `groups`, with the `id` of every open group in `detail.value`, separated by commas.
55024
+ * - `helix-expand`: Fired after a reader opens or closes a step drawn from `groups` or opened by a parser, with the `id` of every open group in `detail.value`, separated by commas.
54952
55025
  * - `helix-pin`: Fired after the log follows the newest line or lets go of it, with `true` or `false` in `detail.value`.
55026
+ * - `helix-select`: Fired when a reader presses a number to change the selection, with the lines asked for in `detail.value`. Cancelable.
55027
+ * - `helix-selected`: Fired after the selection changes, with the lines now selected in `detail.value`, such as `12-20`.
54953
55028
  *
54954
55029
  * ## Slots
54955
55030
  *
@@ -55028,6 +55103,7 @@ export type CustomElements = {
55028
55103
  * - `line-run-italic`: A run drawn italic.
55029
55104
  * - `line-run-strike`: A run drawn struck through.
55030
55105
  * - `line-run-underline`: A run drawn underlined.
55106
+ * - `line-selected`: The row of a line drawn from data that is selected.
55031
55107
  * - `line-text`: The text of a line drawn from data.
55032
55108
  * - `line-time`: The time of a line drawn from data.
55033
55109
  * - `line-warn`: The row of a line drawn from data at `warn`.
@@ -87097,9 +87173,10 @@ export type CustomElementsSolidJs = {
87097
87173
  * - `line-debug`: The row of a line at `debug`.
87098
87174
  * - `line-error`: The row of a line at `error`.
87099
87175
  * - `line-marked`: The row of a line `mark-lines` names on the log.
87176
+ * - `line-selected`: The row of a line in the log's selection.
87100
87177
  * - `line-warn`: The row of a line at `warn`.
87101
87178
  * - `match`: Text that matches the log's `query`, in a line the log draws from data.
87102
- * - `number`: The line's number, shown with `line-numbers`, and a link with `line-href`.
87179
+ * - `number`: The line's number, shown with `line-numbers`: a link with `line-href`, and a button on a `selectable` log.
87103
87180
  * - `run`: A stretch of text drawn in an ANSI style, in a line the log draws from data. Its color is `--log-run-color` and its background `--log-run-background-color`.
87104
87181
  * - `run-bold`: A run drawn bold.
87105
87182
  * - `run-dim`: A run drawn faint.
@@ -87142,8 +87219,15 @@ export type CustomElementsSolidJs = {
87142
87219
  * starts the line over, so a progress bar stays one line, and the line still
87143
87220
  * being written is shown as it stands. ANSI colors and weights are drawn, in
87144
87221
  * the sixteen colors the styled tier takes from your theme, and every other
87145
- * escape code is dropped. Give `parse` a function to read each finished line,
87146
- * such as a level off its prefix or a group off a marker.
87222
+ * escape code is dropped.
87223
+ *
87224
+ * **Read a CI log's own markers with `format`.** `github-actions` reads the
87225
+ * workflow commands a step writes, `::group::` and `::error::` among them,
87226
+ * and the times at the start of a downloaded log. `vercel` reads a Vercel
87227
+ * build log's phases and its warnings. Each step opens as it starts, folds
87228
+ * once it passes, stays open where it failed, and is timed from its lines.
87229
+ * For any other log, give `parse` a function that reads each finished line:
87230
+ * it returns a level, a group, or `open` and `close` to start and end a step.
87147
87231
  *
87148
87232
  * **Steps fold.** Lines that name a group in `groups` stand under its heading,
87149
87233
  * which shows its status and how long it took and opens and closes the lines.
@@ -87158,6 +87242,18 @@ export type CustomElementsSolidJs = {
87158
87242
  * to one. `timestamps` shows each line's `at`, on the clock or as the time
87159
87243
  * into the run. `mark-lines` marks lines, such as `12, 40-44`.
87160
87244
  *
87245
+ * **`selectable` lets a reader select lines**, as a code host does: pressing a
87246
+ * number selects its line, and pressing another with Shift selects every line
87247
+ * between them. `selected-lines` holds the selection, such as `12-20`, and
87248
+ * `helix-select` asks before it changes. With a `line-href` that is a
87249
+ * fragment, the address follows the selection, `#L12` or `#L12-L20`, and a
87250
+ * page opened at one selects it and scrolls to it.
87251
+ *
87252
+ * **The numbers are one tab stop.** Where they are links or buttons, Tab
87253
+ * reaches the one a reader last used, or the first selected, and the arrow
87254
+ * keys move between them, with Home and End for the first and the last. With
87255
+ * Shift on a `selectable` log, the selection follows.
87256
+ *
87161
87257
  * **What a screen reader hears.** The log is a `log` and stays quiet as lines
87162
87258
  * arrive, since reading a build aloud line by line helps nobody. A separate
87163
87259
  * status region says each line at `error` once it arrives, each step once it
@@ -87188,6 +87284,10 @@ export type CustomElementsSolidJs = {
87188
87284
  * - `error-label`/`errorLabel`: What a screen reader hears when lines at `error` arrive. `{count}` is how
87189
87285
  * many arrived together and `{text}` is the first of them.
87190
87286
  * - `fallback-label`/`fallbackLabel`: The log's name, read by screen readers, where `label` is empty.
87287
+ * - `format`: The format written text is in, read with a parser Helix ships:
87288
+ * `github-actions` reads a GitHub Actions log's workflow commands into steps
87289
+ * and levels, and `vercel` a Vercel build log's phases and warnings. Absent
87290
+ * reads none. `parse` wins over it.
87191
87291
  * - `group-label`/`groupLabel`: What a screen reader hears when a step finishes or fails. `{heading}` is
87192
87292
  * the step's heading and `{status}` is `done` or `failed`.
87193
87293
  * - `label`: The log's name, read by screen readers.
@@ -87208,6 +87308,11 @@ export type CustomElementsSolidJs = {
87208
87308
  * true would write the attribute on upgrade.
87209
87309
  * - `query`: Text a line has to hold to be shown, ignoring case. Empty shows every line.
87210
87310
  * - `resume-label`/`resumeLabel`: The words on the button that returns to the newest line, where `resume` is empty.
87311
+ * - `selectable`: Whether pressing a line's number selects the line, and pressing another
87312
+ * with Shift selects every line between them. Each number is then a
87313
+ * button, or a link with `line-href`, and the arrow keys move between them.
87314
+ * - `selected-lines`/`selectedLines`: The lines selected, as a number or a range such as `12-20`. Empty selects
87315
+ * none. A reader's press asks first: `helix-select` is cancelable.
87211
87316
  * - `threshold`: How near the newest line still counts as being at it, in pixels.
87212
87317
  * - `timestamps`: How each line shows its `at`: `absolute` on the clock, `relative` as the
87213
87318
  * time since the first line. Absent shows no time.
@@ -87229,8 +87334,8 @@ export type CustomElementsSolidJs = {
87229
87334
  * Replaced rather than mutated: setting it starts the log over with these
87230
87335
  * lines, and `write` adds to them. Set it or write children, not both. (property only)
87231
87336
  * - `parse`: Reads each finished line of written text: return the fields to set, such
87232
- * as `level` or `group`, or `null` to drop the line. Lines in `lines` are
87233
- * taken as they are. (property only)
87337
+ * as `level`, `open` or `close` to start or end a step, or `null` to drop
87338
+ * the line. Lines in `lines` are taken as they are. Wins over `format`. (property only)
87234
87339
  * - `source`: Text to read as it arrives, to the end: a `ReadableStream` of text or
87235
87340
  * bytes, such as a `fetch` response's body, or an async iterable. Bytes are
87236
87341
  * read as UTF-8. The log sets `done` when it ends, and a new source stops
@@ -87263,8 +87368,10 @@ export type CustomElementsSolidJs = {
87263
87368
  * Events that will be emitted by the component.
87264
87369
  *
87265
87370
  * - `helix-before-pin`: Fired when the reader leaves the newest line by scrolling, or comes back to it. Cancelable.
87266
- * - `helix-expand`: Fired after a reader opens or closes a group drawn from `groups`, with the `id` of every open group in `detail.value`, separated by commas.
87371
+ * - `helix-expand`: Fired after a reader opens or closes a step drawn from `groups` or opened by a parser, with the `id` of every open group in `detail.value`, separated by commas.
87267
87372
  * - `helix-pin`: Fired after the log follows the newest line or lets go of it, with `true` or `false` in `detail.value`.
87373
+ * - `helix-select`: Fired when a reader presses a number to change the selection, with the lines asked for in `detail.value`. Cancelable.
87374
+ * - `helix-selected`: Fired after the selection changes, with the lines now selected in `detail.value`, such as `12-20`.
87268
87375
  *
87269
87376
  * ## Slots
87270
87377
  *
@@ -87343,6 +87450,7 @@ export type CustomElementsSolidJs = {
87343
87450
  * - `line-run-italic`: A run drawn italic.
87344
87451
  * - `line-run-strike`: A run drawn struck through.
87345
87452
  * - `line-run-underline`: A run drawn underlined.
87453
+ * - `line-selected`: The row of a line drawn from data that is selected.
87346
87454
  * - `line-text`: The text of a line drawn from data.
87347
87455
  * - `line-time`: The time of a line drawn from data.
87348
87456
  * - `line-warn`: The row of a line drawn from data at `warn`.
package/types/vue.d.ts CHANGED
@@ -84,7 +84,6 @@ import type {
84
84
  HelixHeadlessListbox,
85
85
  HelixHeadlessLoader,
86
86
  HelixHeadlessLogGroup,
87
- timeOf,
88
87
  HelixHeadlessLogLine,
89
88
  HelixHeadlessLog,
90
89
  HelixHeadlessMapArea,
@@ -10137,6 +10136,12 @@ export type HelixHeadlessLogHelixExpandElementEvent =
10137
10136
  /** `helix-pin` event type */
10138
10137
  export type HelixHeadlessLogHelixPinElementEvent =
10139
10138
  HelixHeadlessLogElementEvent<HelixPinEvent>;
10139
+ /** `helix-select` event type */
10140
+ export type HelixHeadlessLogHelixSelectElementEvent =
10141
+ HelixHeadlessLogElementEvent<HelixSelectEvent>;
10142
+ /** `helix-selected` event type */
10143
+ export type HelixHeadlessLogHelixSelectedElementEvent =
10144
+ HelixHeadlessLogElementEvent<HelixSelectedEvent>;
10140
10145
 
10141
10146
  export type HelixHeadlessLogVueProps = {
10142
10147
  /** Whether the log opens following its newest line, when `pinned` is not set.
@@ -10172,6 +10177,11 @@ many arrived together and `{text}` is the first of them. */
10172
10177
  "fallback-label"?: (HelixHeadlessLog["fallbackLabel"]) | undefined;
10173
10178
  /** The log's name, read by screen readers, where `label` is empty. */
10174
10179
  fallbackLabel?: (HelixHeadlessLog["fallbackLabel"]) | undefined;
10180
+ /** The format written text is in, read with a parser Helix ships:
10181
+ `github-actions` reads a GitHub Actions log's workflow commands into steps
10182
+ and levels, and `vercel` a Vercel build log's phases and warnings. Absent
10183
+ reads none. `parse` wins over it. */
10184
+ format?: (HelixHeadlessLog["format"]) | undefined;
10175
10185
  /** What a screen reader hears when a step finishes or fails. `{heading}` is
10176
10186
  the step's heading and `{status}` is `done` or `failed`. */
10177
10187
  "group-label"?: (HelixHeadlessLog["groupLabel"]) | undefined;
@@ -10220,6 +10230,16 @@ true would write the attribute on upgrade. */
10220
10230
  "resume-label"?: (HelixHeadlessLog["resumeLabel"]) | undefined;
10221
10231
  /** The words on the button that returns to the newest line, where `resume` is empty. */
10222
10232
  resumeLabel?: (HelixHeadlessLog["resumeLabel"]) | undefined;
10233
+ /** Whether pressing a line's number selects the line, and pressing another
10234
+ with Shift selects every line between them. Each number is then a
10235
+ button, or a link with `line-href`, and the arrow keys move between them. */
10236
+ selectable?: (HelixHeadlessLog["selectable"]) | undefined;
10237
+ /** The lines selected, as a number or a range such as `12-20`. Empty selects
10238
+ none. A reader's press asks first: `helix-select` is cancelable. */
10239
+ "selected-lines"?: (HelixHeadlessLog["selectedLines"]) | undefined;
10240
+ /** The lines selected, as a number or a range such as `12-20`. Empty selects
10241
+ none. A reader's press asks first: `helix-select` is cancelable. */
10242
+ selectedLines?: (HelixHeadlessLog["selectedLines"]) | undefined;
10223
10243
  /** How near the newest line still counts as being at it, in pixels. */
10224
10244
  threshold?: (HelixHeadlessLog["threshold"]) | undefined;
10225
10245
  /** How each line shows its `at`: `absolute` on the clock, `relative` as the
@@ -10250,8 +10270,8 @@ Replaced rather than mutated: setting it starts the log over with these
10250
10270
  lines, and `write` adds to them. Set it or write children, not both. */
10251
10271
  lines?: (HelixHeadlessLog["lines"]) | undefined;
10252
10272
  /** Reads each finished line of written text: return the fields to set, such
10253
- as `level` or `group`, or `null` to drop the line. Lines in `lines` are
10254
- taken as they are. */
10273
+ as `level`, `open` or `close` to start or end a step, or `null` to drop
10274
+ the line. Lines in `lines` are taken as they are. Wins over `format`. */
10255
10275
  parse?: (HelixHeadlessLog["parse"]) | undefined;
10256
10276
  /** Text to read as it arrives, to the end: a `ReadableStream` of text or
10257
10277
  bytes, such as a `fetch` response's body, or an async iterable. Bytes are
@@ -10263,10 +10283,14 @@ reading the last one. */
10263
10283
  export type HelixHeadlessLogVueEvents = {
10264
10284
  /** Fired when the reader leaves the newest line by scrolling, or comes back to it. Cancelable. */
10265
10285
  "helix-before-pin": HelixHeadlessLogHelixBeforePinElementEvent;
10266
- /** Fired after a reader opens or closes a group drawn from `groups`, with the `id` of every open group in `detail.value`, separated by commas. */
10286
+ /** Fired after a reader opens or closes a step drawn from `groups` or opened by a parser, with the `id` of every open group in `detail.value`, separated by commas. */
10267
10287
  "helix-expand": HelixHeadlessLogHelixExpandElementEvent;
10268
10288
  /** Fired after the log follows the newest line or lets go of it, with `true` or `false` in `detail.value`. */
10269
10289
  "helix-pin": HelixHeadlessLogHelixPinElementEvent;
10290
+ /** Fired when a reader presses a number to change the selection, with the lines asked for in `detail.value`. Cancelable. */
10291
+ "helix-select": HelixHeadlessLogHelixSelectElementEvent;
10292
+ /** Fired after the selection changes, with the lines now selected in `detail.value`, such as `12-20`. */
10293
+ "helix-selected": HelixHeadlessLogHelixSelectedElementEvent;
10270
10294
  };
10271
10295
 
10272
10296
  /** `HelixHeadlessMapArea` component event */
@@ -21012,7 +21036,7 @@ export interface WcToolkitVueGlobalComponents {
21012
21036
  HelixHeadlessLogLineVueProps,
21013
21037
  HelixHeadlessLogLineVueEvents
21014
21038
  >;
21015
- /** A log holds lines in the order they were written and keeps the reader at the newest one, until they scroll up to read. It stays where they left it while lines keep arriving, and a button returns them to the end ('resume-label', "Jump to latest"). **Lines arrive two ways.** For a log you serve whole, write 'Log.Line' elements as children, inside 'Log.Group' elements for the steps. For a log that is still being written, hand it text: 'write(chunk)' takes text as it arrives, in pieces that need not end at a line break, and 'source' takes a 'ReadableStream' or an async iterable and reads it to the end. 'lines' takes the lines as data. Text drawn from data is drawn one window at a time, so a log of a hundred thousand lines holds a screenful of elements, and the log needs a block size of its own. Do not use both ways at once. **Written text is read the way a terminal shows it.** A carriage return starts the line over, so a progress bar stays one line, and the line still being written is shown as it stands. ANSI colors and weights are drawn, in the sixteen colors the styled tier takes from your theme, and every other escape code is dropped. Give 'parse' a function to read each finished line, such as a level off its prefix or a group off a marker. **Steps fold.** Lines that name a group in 'groups' stand under its heading, which shows its status and how long it took and opens and closes the lines. A group a reader opens or closes fires 'helix-expand' with every open group. **Search with 'query'.** The log shows only the lines that hold it, marks each match, opens the groups that hold one, and says how many lines match. 'line-numbers' numbers the lines from the first ever written, so a number still names its line once 'limit' has let older lines go, and 'line-href' makes each number a link, such as '#L{n}'. 'scrollToLine(n)' takes a reader to one. 'timestamps' shows each line's 'at', on the clock or as the time into the run. 'mark-lines' marks lines, such as '12, 40-44'. **What a screen reader hears.** The log is a 'log' and stays quiet as lines arrive, since reading a build aloud line by line helps nobody. A separate status region says each line at 'error' once it arrives, each step once it finishes or fails, and the end of the run once 'done' is set or 'source' ends. Set 'done' yourself when output you 'write' is complete. The log scrolls on this tier. It carries 'data-scroller', so following the newest line and drawing a window work with no stylesheet. Give the log a block size, such as 'helix-headless-log::part(log) { block-size: 20rem }'. '''js import '@fusion.dev/helix/log' ''' */
21039
+ /** A log holds lines in the order they were written and keeps the reader at the newest one, until they scroll up to read. It stays where they left it while lines keep arriving, and a button returns them to the end ('resume-label', "Jump to latest"). **Lines arrive two ways.** For a log you serve whole, write 'Log.Line' elements as children, inside 'Log.Group' elements for the steps. For a log that is still being written, hand it text: 'write(chunk)' takes text as it arrives, in pieces that need not end at a line break, and 'source' takes a 'ReadableStream' or an async iterable and reads it to the end. 'lines' takes the lines as data. Text drawn from data is drawn one window at a time, so a log of a hundred thousand lines holds a screenful of elements, and the log needs a block size of its own. Do not use both ways at once. **Written text is read the way a terminal shows it.** A carriage return starts the line over, so a progress bar stays one line, and the line still being written is shown as it stands. ANSI colors and weights are drawn, in the sixteen colors the styled tier takes from your theme, and every other escape code is dropped. **Read a CI log's own markers with 'format'.** 'github-actions' reads the workflow commands a step writes, '::group::' and '::error::' among them, and the times at the start of a downloaded log. 'vercel' reads a Vercel build log's phases and its warnings. Each step opens as it starts, folds once it passes, stays open where it failed, and is timed from its lines. For any other log, give 'parse' a function that reads each finished line: it returns a level, a group, or 'open' and 'close' to start and end a step. **Steps fold.** Lines that name a group in 'groups' stand under its heading, which shows its status and how long it took and opens and closes the lines. A group a reader opens or closes fires 'helix-expand' with every open group. **Search with 'query'.** The log shows only the lines that hold it, marks each match, opens the groups that hold one, and says how many lines match. 'line-numbers' numbers the lines from the first ever written, so a number still names its line once 'limit' has let older lines go, and 'line-href' makes each number a link, such as '#L{n}'. 'scrollToLine(n)' takes a reader to one. 'timestamps' shows each line's 'at', on the clock or as the time into the run. 'mark-lines' marks lines, such as '12, 40-44'. **'selectable' lets a reader select lines**, as a code host does: pressing a number selects its line, and pressing another with Shift selects every line between them. 'selected-lines' holds the selection, such as '12-20', and 'helix-select' asks before it changes. With a 'line-href' that is a fragment, the address follows the selection, '#L12' or '#L12-L20', and a page opened at one selects it and scrolls to it. **The numbers are one tab stop.** Where they are links or buttons, Tab reaches the one a reader last used, or the first selected, and the arrow keys move between them, with Home and End for the first and the last. With Shift on a 'selectable' log, the selection follows. **What a screen reader hears.** The log is a 'log' and stays quiet as lines arrive, since reading a build aloud line by line helps nobody. A separate status region says each line at 'error' once it arrives, each step once it finishes or fails, and the end of the run once 'done' is set or 'source' ends. Set 'done' yourself when output you 'write' is complete. The log scrolls on this tier. It carries 'data-scroller', so following the newest line and drawing a window work with no stylesheet. Give the log a block size, such as 'helix-headless-log::part(log) { block-size: 20rem }'. '''js import '@fusion.dev/helix/log' ''' */
21016
21040
  "helix-headless-log": DefineCustomElement<
21017
21041
  HelixHeadlessLog,
21018
21042
  HelixHeadlessLogVueProps,