@fusion.dev/helix-terminal 0.212.2 → 0.213.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.
@@ -24,12 +24,18 @@ export interface TerminalOptions {
24
24
  /** Whether the renderer keeps an accessible copy of the grid and says new output. */
25
25
  screenReader: boolean;
26
26
  }
27
- /** How a search through the output moves. */
27
+ /** How a search through the output moves, and what it matches. */
28
28
  export interface TerminalSearchOptions {
29
29
  /** Toward the top of the output, for the previous match. */
30
30
  backward: boolean;
31
+ /** Whether case has to match, so "Error" does not find "error". */
32
+ caseSensitive: boolean;
31
33
  /** Whether the reader is still typing, so the match in hand stays where it still matches. */
32
34
  incremental: boolean;
35
+ /** Whether the query is a regular expression, in JavaScript's syntax, which the frame has checked reads. */
36
+ regex: boolean;
37
+ /** Whether a match has to be a whole word. */
38
+ wholeWord: boolean;
33
39
  }
34
40
  /**
35
41
  * What a renderer has to answer for the frame to drive it, and nothing that is
@@ -75,8 +75,9 @@ export interface XtermSearch extends Addon {
75
75
  resultIndex: number;
76
76
  }) => void): Disposable;
77
77
  }
78
- /** The search options the driver passes, which are what turn on the result count. */
78
+ /** The search options the driver passes: the reader's three, and the decorations that turn on the result count. */
79
79
  interface XtermSearchOptions {
80
+ caseSensitive?: boolean;
80
81
  decorations?: {
81
82
  activeMatchBackground?: string;
82
83
  activeMatchBorder?: string;
@@ -85,6 +86,8 @@ interface XtermSearchOptions {
85
86
  matchOverviewRuler: string;
86
87
  };
87
88
  incremental?: boolean;
89
+ regex?: boolean;
90
+ wholeWord?: boolean;
88
91
  }
89
92
  /** `@xterm/addon-web-links`'s `WebLinksAddon` class, which the driver makes with its own handler. */
90
93
  export type XtermWebLinks = new (handler: (event: MouseEvent, uri: string) => void) => Addon;
@@ -119,8 +119,9 @@ export const xtermDriver = (terminal, addons = {}) => {
119
119
  if (search) {
120
120
  driver.search = {
121
121
  end: () => search.clearDecorations(),
122
- find: (query, { backward, incremental }, matches) => {
122
+ find: (query, { backward, caseSensitive, incremental, regex, wholeWord }, matches) => {
123
123
  const options = {
124
+ caseSensitive,
124
125
  decorations: {
125
126
  activeMatchBorder: matches.activeBorder,
126
127
  activeMatchColorOverviewRuler: matches.ruler,
@@ -131,6 +132,8 @@ export const xtermDriver = (terminal, addons = {}) => {
131
132
  ...(matches.background ? { matchBackground: matches.background } : {}),
132
133
  },
133
134
  incremental,
135
+ regex,
136
+ wholeWord,
134
137
  };
135
138
  if (backward) {
136
139
  search.findPrevious(query, options);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fusion.dev/helix-terminal",
3
3
  "description": "Connects the Helix Terminal frame to a terminal emulator: xterm.js, or a driver of your own, themed with your tokens.",
4
- "version": "0.212.2",
4
+ "version": "0.213.0",
5
5
  "license": "MIT",
6
6
  "author": "Ross Sheppard <ross.sheppard@fusion.dev>",
7
7
  "repository": {
@@ -36,11 +36,11 @@
36
36
  },
37
37
  "bugs": "https://github.com/project-fusion/fusion/issues",
38
38
  "dependencies": {
39
- "@fusion.dev/helix-core": "0.212.2"
39
+ "@fusion.dev/helix-core": "0.213.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@fusion.dev/helix-headless": "0.212.2",
43
- "@fusion.dev/helix-testing": "0.212.2",
42
+ "@fusion.dev/helix-headless": "0.213.0",
43
+ "@fusion.dev/helix-testing": "0.213.0",
44
44
  "@types/bun": "^1.4.2",
45
45
  "@xterm/addon-fit": "^0.11.0",
46
46
  "@xterm/addon-search": "^0.16.0",