@fusion.dev/helix 0.219.0 → 0.220.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/types/svelte.d.ts CHANGED
@@ -83,6 +83,7 @@ declare module 'svelte/elements' {
83
83
  'helix-filter-menu': Helix<'helix-filter-menu'>
84
84
  'helix-filter-operator': Helix<'helix-filter-operator'>
85
85
  'helix-filter-input': Helix<'helix-filter-input'>
86
+ 'helix-find': Helix<'helix-find'>
86
87
  'helix-flex': Helix<'helix-flex'>
87
88
  'helix-format-date': Helix<'helix-format-date'>
88
89
  'helix-graph': Helix<'helix-graph'>
package/types/vue.d.ts CHANGED
@@ -102,8 +102,10 @@ import type {
102
102
  HelixFilterMenu,
103
103
  HelixFilterOperator,
104
104
  HelixFilteredEvent,
105
+ HelixFind,
105
106
  HelixFlex,
106
107
  HelixFormatDate,
108
+ HelixFoundEvent,
107
109
  HelixGraph,
108
110
  HelixGraphFilterEvent,
109
111
  HelixGraphLayoutEvent,
@@ -4565,6 +4567,9 @@ export type HelixCodeEditorElementEvent<E = Event> = TypedEvent<
4565
4567
  /** `helix-before-change` event type */
4566
4568
  export type HelixCodeEditorHelixBeforeChangeElementEvent =
4567
4569
  HelixCodeEditorElementEvent<HelixBeforeChangeEvent>;
4570
+ /** `helix-found` event type */
4571
+ export type HelixCodeEditorHelixFoundElementEvent =
4572
+ HelixCodeEditorElementEvent<HelixFoundEvent>;
4568
4573
 
4569
4574
  export type HelixCodeEditorVueProps = {
4570
4575
  /** Covers the container instead of taking a height of its own, for an
@@ -4768,6 +4773,8 @@ export type HelixCodeEditorVueEvents = {
4768
4773
  change: HelixCodeEditorElementEvent;
4769
4774
  /** The text is about to change. Cancelable: cancel it to keep the current text. */
4770
4775
  "helix-before-change": HelixCodeEditorHelixBeforeChangeElementEvent;
4776
+ /** The find bar searched or moved among the matches, with `count` and the selected match's `index`, counting from 0, or -1 for none. */
4777
+ "helix-found": HelixCodeEditorHelixFoundElementEvent;
4771
4778
  /** Fired after the text changes. */
4772
4779
  input: HelixCodeEditorElementEvent;
4773
4780
  };
@@ -9541,6 +9548,138 @@ export type HelixFilterInputVueEvents = {
9541
9548
  input: HelixFilterInputElementEvent;
9542
9549
  };
9543
9550
 
9551
+ /** `HelixFind` component event */
9552
+ export type HelixFindElementEvent<E = Event> = TypedEvent<HelixFind, E>;
9553
+ /** `toggle` event type */
9554
+ export type HelixFindToggleElementEvent = HelixFindElementEvent<ToggleEvent>;
9555
+ /** `helix-before-close` event type */
9556
+ export type HelixFindHelixBeforeCloseElementEvent =
9557
+ HelixFindElementEvent<HelixBeforeCloseEvent>;
9558
+ /** `helix-before-open` event type */
9559
+ export type HelixFindHelixBeforeOpenElementEvent =
9560
+ HelixFindElementEvent<HelixBeforeOpenEvent>;
9561
+ /** `helix-found` event type */
9562
+ export type HelixFindHelixFoundElementEvent =
9563
+ HelixFindElementEvent<HelixFoundEvent>;
9564
+
9565
+ export type HelixFindVueProps = {
9566
+ /** Whether the element starts open. Ignored once `open` is written. */
9567
+ "default-open"?: (HelixFind["defaultOpen"]) | undefined;
9568
+ /** Whether the element starts open. Ignored once `open` is written. */
9569
+ defaultOpen?: (HelixFind["defaultOpen"]) | undefined;
9570
+ /** Whether the element is open.
9571
+
9572
+ One property, not two, so `dialog.open` answers the question anyone
9573
+ asking it meant. Writing always applies; `<helix-dialog open>` is the
9574
+ same statement in markup.
9575
+
9576
+ **Not reflected, and that is required rather than tidy.** Reflection
9577
+ writes the resolved state back as an attribute, so an element that opened
9578
+ itself would put `open` on its own host: cloned, serialized for
9579
+ hydration, or diffed by a framework, it comes back holding whatever the
9580
+ last reader did rather than what the author wrote. `:state(open)` carries
9581
+ the resolved state for stylesheets, which is what the mirror is for. */
9582
+ open?: (HelixFind["open"]) | undefined;
9583
+ /** The close button's label. */
9584
+ "close-label"?: (HelixFind["closeLabel"]) | undefined;
9585
+ /** The close button's label. */
9586
+ closeLabel?: (HelixFind["closeLabel"]) | undefined;
9587
+ /** The name of the bar's toolbar, read by screen readers. */
9588
+ "controls-label"?: (HelixFind["controlsLabel"]) | undefined;
9589
+ /** The name of the bar's toolbar, read by screen readers. */
9590
+ controlsLabel?: (HelixFind["controlsLabel"]) | undefined;
9591
+ /** The id of the element whose text Find searches, in the same tree as Find.
9592
+ With a finder attached, it names only where the find key opens the bar. */
9593
+ for?: (HelixFind["for"]) | undefined;
9594
+ /** What the count says when the regular expression cannot be read. */
9595
+ "invalid-label"?: (HelixFind["invalidLabel"]) | undefined;
9596
+ /** What the count says when the regular expression cannot be read. */
9597
+ invalidLabel?: (HelixFind["invalidLabel"]) | undefined;
9598
+ /** The field's name and placeholder, and the name of the bar. */
9599
+ label?: (HelixFind["label"]) | undefined;
9600
+ /** Whether case has to match, so "Error" does not find "error". The reader turns it on and off from the bar. */
9601
+ "match-case"?: (HelixFind["matchCase"]) | undefined;
9602
+ /** Whether case has to match, so "Error" does not find "error". The reader turns it on and off from the bar. */
9603
+ matchCase?: (HelixFind["matchCase"]) | undefined;
9604
+ /** The match case button's label. */
9605
+ "match-case-label"?: (HelixFind["matchCaseLabel"]) | undefined;
9606
+ /** The match case button's label. */
9607
+ matchCaseLabel?: (HelixFind["matchCaseLabel"]) | undefined;
9608
+ /** What the count says of the matches. `{index}` is the current match,
9609
+ counting from 1, and `{count}` how many there are. */
9610
+ "matches-label"?: (HelixFind["matchesLabel"]) | undefined;
9611
+ /** What the count says of the matches. `{index}` is the current match,
9612
+ counting from 1, and `{count}` how many there are. */
9613
+ matchesLabel?: (HelixFind["matchesLabel"]) | undefined;
9614
+ /** The next match button's label. */
9615
+ "next-label"?: (HelixFind["nextLabel"]) | undefined;
9616
+ /** The next match button's label. */
9617
+ nextLabel?: (HelixFind["nextLabel"]) | undefined;
9618
+ /** Which options the bar draws, as a list of `match-case`, `whole-word`, and
9619
+ `regex`, or `none`. They are always drawn in that order. */
9620
+ options?: (HelixFind["options"]) | undefined;
9621
+ /** The previous match button's label. */
9622
+ "previous-label"?: (HelixFind["previousLabel"]) | undefined;
9623
+ /** The previous match button's label. */
9624
+ previousLabel?: (HelixFind["previousLabel"]) | undefined;
9625
+ /** What the field holds: what the reader typed, or what you set. */
9626
+ query?: (HelixFind["query"]) | undefined;
9627
+ /** Hides replacing, for content the reader cannot change. The attribute is `readonly`, the platform's spelling. */
9628
+ readonly?: (HelixFind["readOnly"]) | undefined;
9629
+ /** Hides replacing, for content the reader cannot change. The attribute is `readonly`, the platform's spelling. */
9630
+ readOnly?: (HelixFind["readOnly"]) | undefined;
9631
+ /** Whether the field reads as a regular expression, in JavaScript's syntax. The reader turns it on and off from the bar. */
9632
+ regex?: (HelixFind["regex"]) | undefined;
9633
+ /** The regular expression button's label. */
9634
+ "regex-label"?: (HelixFind["regexLabel"]) | undefined;
9635
+ /** The regular expression button's label. */
9636
+ regexLabel?: (HelixFind["regexLabel"]) | undefined;
9637
+ /** The Replace all button's words. */
9638
+ "replace-all-label"?: (HelixFind["replaceAllLabel"]) | undefined;
9639
+ /** The Replace all button's words. */
9640
+ replaceAllLabel?: (HelixFind["replaceAllLabel"]) | undefined;
9641
+ /** The replace field's name and placeholder. */
9642
+ "replace-field-label"?: (HelixFind["replaceFieldLabel"]) | undefined;
9643
+ /** The replace field's name and placeholder. */
9644
+ replaceFieldLabel?: (HelixFind["replaceFieldLabel"]) | undefined;
9645
+ /** The Replace button's words. */
9646
+ "replace-label"?: (HelixFind["replaceLabel"]) | undefined;
9647
+ /** The Replace button's words. */
9648
+ replaceLabel?: (HelixFind["replaceLabel"]) | undefined;
9649
+ /** What the replace field holds, which Replace puts in place of a match. */
9650
+ replacement?: (HelixFind["replacement"]) | undefined;
9651
+ /** The label of the button that shows the replace row. */
9652
+ "replace-toggle-label"?: (HelixFind["replaceToggleLabel"]) | undefined;
9653
+ /** The label of the button that shows the replace row. */
9654
+ replaceToggleLabel?: (HelixFind["replaceToggleLabel"]) | undefined;
9655
+ /** The key that opens the bar, as a chord such as `mod+f`, where `mod` is
9656
+ Command on an Apple keyboard and Control elsewhere. Empty turns the key
9657
+ off, as for a bar the page opens itself. */
9658
+ shortcut?: (HelixFind["shortcut"]) | undefined;
9659
+ /** Elements inside the content whose text is not searched, as a selector,
9660
+ such as line numbers or the buttons beside each message. */
9661
+ skip?: (HelixFind["skip"]) | undefined;
9662
+ /** Whether only whole words match. The reader turns it on and off from the bar. */
9663
+ "whole-word"?: (HelixFind["wholeWord"]) | undefined;
9664
+ /** Whether only whole words match. The reader turns it on and off from the bar. */
9665
+ wholeWord?: (HelixFind["wholeWord"]) | undefined;
9666
+ /** The whole word button's label. */
9667
+ "whole-word-label"?: (HelixFind["wholeWordLabel"]) | undefined;
9668
+ /** The whole word button's label. */
9669
+ wholeWordLabel?: (HelixFind["wholeWordLabel"]) | undefined;
9670
+ };
9671
+
9672
+ export type HelixFindVueEvents = {
9673
+ /** Sent when the bar opens or closes, with `newState` and `oldState`. */
9674
+ toggle: HelixFindToggleElementEvent;
9675
+ /** Fired before the bar closes, and cancelable. */
9676
+ "helix-before-close": HelixFindHelixBeforeCloseElementEvent;
9677
+ /** Fired before the bar opens, and cancelable. Canceling it keeps the bar closed. */
9678
+ "helix-before-open": HelixFindHelixBeforeOpenElementEvent;
9679
+ /** Sent after each search and each move among the matches, with `count` and the current match's `index`, counting from 0, or -1 for none. */
9680
+ "helix-found": HelixFindHelixFoundElementEvent;
9681
+ };
9682
+
9544
9683
  export type HelixFlexVueProps = {
9545
9684
  /** How the lines of a wrapping row share the space across it, set as
9546
9685
  `align-content`.
@@ -21506,6 +21645,9 @@ export type HelixTerminalElementEvent<E = Event> = TypedEvent<HelixTerminal, E>;
21506
21645
  /** `helix-copy` event type */
21507
21646
  export type HelixTerminalHelixCopyElementEvent =
21508
21647
  HelixTerminalElementEvent<HelixCopyEvent>;
21648
+ /** `helix-found` event type */
21649
+ export type HelixTerminalHelixFoundElementEvent =
21650
+ HelixTerminalElementEvent<HelixFoundEvent>;
21509
21651
  /** `helix-terminal-bell` event type */
21510
21652
  export type HelixTerminalHelixTerminalBellElementEvent =
21511
21653
  HelixTerminalElementEvent<HelixTerminalBellEvent>;
@@ -21681,6 +21823,8 @@ write. Connect it to a setting your reader can turn on. */
21681
21823
  export type HelixTerminalVueEvents = {
21682
21824
  /** The copy control or its key put the selection on the clipboard. */
21683
21825
  "helix-copy": HelixTerminalHelixCopyElementEvent;
21826
+ /** The find bar searched or moved among the matches, with `count` and the current match's `index`, counting from 0, or -1 for none. */
21827
+ "helix-found": HelixTerminalHelixFoundElementEvent;
21684
21828
  /** The program rang the bell. The frame flashes once. */
21685
21829
  "helix-terminal-bell": HelixTerminalHelixTerminalBellElementEvent;
21686
21830
  /** The reader typed or pasted, with `data` encoded for the program. Write it to the process. Not sent while `readonly`, or once `exit-code` is set. */
@@ -26064,6 +26208,12 @@ export type CustomCssProperties = {
26064
26208
  "--filter-input-shadow"?: (string) | undefined;
26065
26209
  /** The height of the empty field. The field grows from this height. */
26066
26210
  "--filter-input-size"?: (string) | undefined;
26211
+ /** The bar's fill. Defaults to the raised surface. */
26212
+ "--find-background-color"?: (string) | undefined;
26213
+ /** The line under the bar and the fields' edges. */
26214
+ "--find-border-color"?: (string) | undefined;
26215
+ /** The fields' fill. Defaults to the page's background. */
26216
+ "--find-field-background-color"?: (string) | undefined;
26067
26217
  /** The narrowest the growing item of a `flank` layout gets before the two stack, as a share of the row. Defaults to `50%`. */
26068
26218
  "--flex-flank-min"?: (string) | undefined;
26069
26219
  /** The width of the fixed item of a `flank` layout. Defaults to its own width. */
@@ -28248,6 +28398,12 @@ export interface WcToolkitVueGlobalComponents {
28248
28398
  HelixFilterInputVueProps,
28249
28399
  HelixFilterInputVueEvents
28250
28400
  >;
28401
+ /** Drawn as the find bars of Terminal and Code Editor are: a dense strip on the raised surface, with a line under it where it meets the content. Place it above the content it searches, such as at the top of a pane, or make it sticky with 'position: sticky' on the element. Every match is painted with '::highlight(helix-find-match)' and the current one with '::highlight(helix-find-current)', both in the base layer. Text is painted from the tree it lives in, so content in a shadow root of your own needs the two rules in that root's styles. */
28402
+ "helix-find": DefineCustomElement<
28403
+ HelixFind,
28404
+ HelixFindVueProps,
28405
+ HelixFindVueEvents
28406
+ >;
28251
28407
  /** The host is the flex container and its only child is a slot, so '<helix-flex>' adds no box beyond the '<div>' it replaces. There is no separate Stack component. For a stack, set 'direction="column"'. 'gap' takes a space token name, so spacing stays on the scale. 'row-gap' and 'column-gap' set one axis each and win over 'gap' on theirs. 'layout' sets up a common pattern, and any attribute you also write wins over the pattern's own value: - 'cluster': items in a wrapping row, centered on one line, such as tags. - 'split': the first item at the start, the last at the end, and any between them spaced evenly, such as a title and its actions. Put several actions in a flex of their own so they stay together at the end. Wraps when there is no room. - 'flank' and 'flank-end': a fixed item beside one that takes the rest, such as an icon and its text, or a field and its button. The item that takes the rest stays at least '--flex-flank-min' wide, and the pair stacks once it cannot. - 'switch': the items share a row while the flex is at least '--flex-switch-at' wide, and each takes a line of its own below that, such as cards that stack on a narrow screen. It answers the width the flex is given, wherever it sits, with no breakpoint to maintain. Flex is presentation only, so it has no headless tier. */
28252
28408
  "helix-flex": DefineCustomElement<
28253
28409
  HelixFlex,
package/types/words.d.ts CHANGED
@@ -2030,6 +2030,93 @@ declare module '@fusion.dev/helix-core' {
2030
2030
  */
2031
2031
  label: Message
2032
2032
  }
2033
+ 'helix-find': {
2034
+ /**
2035
+ * The close button's label.
2036
+ *
2037
+ * English: `Close find`
2038
+ */
2039
+ closeLabel: Message
2040
+ /**
2041
+ * The name of the bar's toolbar, read by screen readers.
2042
+ *
2043
+ * English: `Find controls`
2044
+ */
2045
+ controlsLabel: Message
2046
+ /**
2047
+ * What the count says when the regular expression cannot be read.
2048
+ *
2049
+ * English: `Not a valid regular expression`
2050
+ */
2051
+ invalidLabel: Message
2052
+ /**
2053
+ * The field's name and placeholder, and the name of the bar.
2054
+ *
2055
+ * English: `Find`
2056
+ */
2057
+ label: Message
2058
+ /**
2059
+ * The match case button's label.
2060
+ *
2061
+ * English: `Match case`
2062
+ */
2063
+ matchCaseLabel: Message
2064
+ /**
2065
+ * What the count says of the matches. `{index}` is the current match,
2066
+ * counting from 1, and `{count}` how many there are.
2067
+ *
2068
+ * English: `{count, plural, =0 {No matches} one {{index} of # match} other {{index} of # matches}}`
2069
+ */
2070
+ matchesLabel: Message
2071
+ /**
2072
+ * The next match button's label.
2073
+ *
2074
+ * English: `Next match`
2075
+ */
2076
+ nextLabel: Message
2077
+ /**
2078
+ * The previous match button's label.
2079
+ *
2080
+ * English: `Previous match`
2081
+ */
2082
+ previousLabel: Message
2083
+ /**
2084
+ * The regular expression button's label.
2085
+ *
2086
+ * English: `Use regular expression`
2087
+ */
2088
+ regexLabel: Message
2089
+ /**
2090
+ * The Replace all button's words.
2091
+ *
2092
+ * English: `Replace all`
2093
+ */
2094
+ replaceAllLabel: Message
2095
+ /**
2096
+ * The replace field's name and placeholder.
2097
+ *
2098
+ * English: `Replace with`
2099
+ */
2100
+ replaceFieldLabel: Message
2101
+ /**
2102
+ * The Replace button's words.
2103
+ *
2104
+ * English: `Replace`
2105
+ */
2106
+ replaceLabel: Message
2107
+ /**
2108
+ * The label of the button that shows the replace row.
2109
+ *
2110
+ * English: `Find and replace`
2111
+ */
2112
+ replaceToggleLabel: Message
2113
+ /**
2114
+ * The whole word button's label.
2115
+ *
2116
+ * English: `Match whole word`
2117
+ */
2118
+ wholeWordLabel: Message
2119
+ }
2033
2120
  'helix-graph': {
2034
2121
  /**
2035
2122
  * The hint shown when a surface waiting to be pressed is scrolled or