@tectra-ng/code-editor 0.3.2 → 0.4.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,6 +1,6 @@
1
1
  {
2
2
  "name": "@tectra-ng/code-editor",
3
- "version": "0.3.2",
3
+ "version": "0.4.1",
4
4
  "description": "Code editor for tectra: HTML, CSS, JavaScript, TypeScript, JSON and Markdown with highlighting from design tokens, search and replace, forms support, an inline or side by side diff and a static server-rendered code view.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://tectra-ng.com/components/code-editor",
@@ -32,10 +32,10 @@
32
32
  "@angular/common": "^22.2.0",
33
33
  "@angular/core": "^22.2.0",
34
34
  "@angular/forms": "^22.2.0",
35
- "@tectra-ng/core": "^0.3.2",
36
- "@tectra-ng/icons": "^0.3.2",
37
- "@tectra-ng/themes": "^0.3.2",
38
- "@tectra-ng/ui": "^0.3.2"
35
+ "@tectra-ng/core": "^0.4.1",
36
+ "@tectra-ng/icons": "^0.4.1",
37
+ "@tectra-ng/themes": "^0.4.1",
38
+ "@tectra-ng/ui": "^0.4.1"
39
39
  },
40
40
  "dependencies": {
41
41
  "@codemirror/state": "^6.7.6",
@@ -1,115 +1,234 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import { TxPassThroughOptions } from "@tectra-ng/core/config";
3
3
  import { TectraCodeHighlightTokens, TectraCodeSyntaxTokens, TectraDeepPartial } from "@tectra-ng/themes";
4
+ /**
5
+ * Languages the tokenizers know; other names resolve through aliases such as `js`, `ts` or `md`, and unknown ones fall back to `plain`.
6
+ */
4
7
  export type TxCodeLanguage = 'html' | 'css' | 'javascript' | 'typescript' | 'json' | 'markdown' | 'plain';
8
+ /** Kind of a token, which becomes the `tx-code-tok-<type>` class and picks its colour. */
5
9
  export type TxCodeTokenType = 'comment' | 'keyword' | 'literal' | 'string' | 'number' | 'regexp' | 'type' | 'delimiter' | 'tag' | 'tag-delimiter' | 'meta' | 'attribute' | 'attribute-value' | 'property' | 'value' | 'key' | 'heading' | 'strong' | 'emphasis' | 'link' | 'code' | 'quote';
10
+ /** A highlighted span of one line: character offsets and a type. */
6
11
  export interface TxCodeToken {
12
+ /** Offset of the first character in the line. */
7
13
  readonly from: number;
14
+ /** Offset after the last character in the line. */
8
15
  readonly to: number;
16
+ /** Kind of the span, which decides its colour. */
9
17
  readonly type: TxCodeTokenType;
10
18
  }
19
+ /** Comment markers of a language, used by the comment toggle of the editor. */
11
20
  export interface TxCodeComments {
21
+ /** Prefix of a line comment, such as `//`; missing when the language has none. */
12
22
  readonly line?: string;
23
+ /** Opening and closing marker of a block comment, as a pair; missing when the language has none. */
13
24
  readonly block?: readonly [string, string];
14
25
  }
26
+ /**
27
+ * Tokenizer of one language: it reads a line from a stream and keeps a state that carries over to the next line.
28
+ */
15
29
  export interface TxCodeMode<S = unknown> {
30
+ /** The language this mode reads. */
16
31
  readonly language: TxCodeLanguage;
32
+ /** Comment markers of the language. */
17
33
  readonly comments: TxCodeComments;
34
+ /** Creates the state at the first line of a text. */
18
35
  start(): S;
36
+ /** Copies a state so a line can be tokenized again without changing the stored one. */
19
37
  copy(state: S): S;
38
+ /**
39
+ * Reads the next token from the stream, advancing it, and returns its type; `null` leaves the text unstyled.
40
+ */
20
41
  token(stream: TxCodeStreamLike, state: S): TxCodeTokenType | null;
21
42
  }
43
+ /** Cursor over one line of code that a mode reads from. */
22
44
  export interface TxCodeStreamLike {
45
+ /** The whole line. */
23
46
  readonly string: string;
47
+ /** Current offset in the line. */
24
48
  pos: number;
49
+ /** Offset where the token being read began. */
25
50
  start: number;
51
+ /** Whether the cursor is at the end of the line. */
26
52
  eol(): boolean;
53
+ /** Whether the cursor is at the start of the line. */
27
54
  sol(): boolean;
55
+ /** Returns the character at `offset` from the cursor (default 0) without moving; empty past the end. */
28
56
  peek(offset?: number): string;
57
+ /** Moves one character on and returns it; empty at the end. */
29
58
  next(): string;
59
+ /**
60
+ * Moves past the next character when it equals a string or fits a pattern, and returns it; empty otherwise.
61
+ */
30
62
  eat(match: string | RegExp): string;
63
+ /** Moves past characters while they fit the pattern; `true` when it moved. */
31
64
  eatWhile(match: RegExp): boolean;
65
+ /** Moves past whitespace; `true` when it moved. */
32
66
  eatSpace(): boolean;
67
+ /** Moves to the end of the line. */
33
68
  skipToEnd(): void;
69
+ /** Moves to the next occurrence of the text without consuming it; `false` when there is none. */
34
70
  skipTo(text: string): boolean;
71
+ /** Matches a pattern at the cursor and returns the match, moving past it unless `consume` is `false`. */
35
72
  match(pattern: RegExp, consume?: boolean): RegExpExecArray | null;
73
+ /**
74
+ * Checks that the text follows the cursor, moving past it unless `consume` is `false`; `ignoreCase` ignores case.
75
+ */
36
76
  matchText(text: string, consume?: boolean, ignoreCase?: boolean): boolean;
77
+ /** Text of the token read so far, from `start` to `pos`. */
37
78
  current(): string;
79
+ /** Text from the cursor to the end of the line. */
38
80
  rest(): string;
81
+ /** Text of the line before the current token. */
39
82
  before(): string;
40
83
  }
84
+ /** Parts of `tx-code-highlight` that `pt` can style. */
41
85
  export type TxCodeHighlightPart = 'root' | 'gutter' | 'content' | 'line';
86
+ /** Default cursor over one line of code, used by the tokenizers. */
42
87
  export declare class TxCodeStream implements TxCodeStreamLike {
88
+ /** The line being read. */
43
89
  readonly string: string;
90
+ /** Current offset in the line. */
44
91
  pos: number;
92
+ /** Offset where the token being read began. */
45
93
  start: number;
46
- constructor(string: string);
94
+ /** The whole line. */
95
+ constructor(
96
+ /** The line being read. */
97
+ string: string);
98
+ /** Whether the cursor is at the end of the line. */
47
99
  eol(): boolean;
100
+ /** Whether the cursor is at the start of the line. */
48
101
  sol(): boolean;
102
+ /** Returns the character at `offset` from the cursor (default 0) without moving; empty past the end. */
49
103
  peek(offset?: number): string;
104
+ /** Moves one character on and returns it; empty at the end. */
50
105
  next(): string;
106
+ /**
107
+ * Moves past the next character when it equals a string or fits a pattern, and returns it; empty otherwise.
108
+ */
51
109
  eat(match: string | RegExp): string;
110
+ /** Moves past characters while they fit the pattern; `true` when it moved. */
52
111
  eatWhile(match: RegExp): boolean;
112
+ /** Moves past whitespace; `true` when it moved. */
53
113
  eatSpace(): boolean;
114
+ /** Moves to the end of the line. */
54
115
  skipToEnd(): void;
116
+ /** Moves to the next occurrence of the text without consuming it; `false` when there is none. */
55
117
  skipTo(text: string): boolean;
118
+ /** Matches a pattern at the cursor and returns the match, moving past it unless `consume` is `false`. */
56
119
  match(pattern: RegExp, consume?: boolean): RegExpExecArray | null;
120
+ /**
121
+ * Checks that the text follows the cursor, moving past it unless `consume` is `false`; `ignoreCase` ignores case.
122
+ */
57
123
  matchText(text: string, consume?: boolean, ignoreCase?: boolean): boolean;
124
+ /** Text of the token read so far, from `start` to `pos`. */
58
125
  current(): string;
126
+ /** Text from the cursor to the end of the line. */
59
127
  rest(): string;
128
+ /** Text of the line before the current token. */
60
129
  before(): string;
61
130
  }
131
+ /**
132
+ * Runs a reader on the part of the line before `end`, then moves the stream to where the reader stopped; used by modes that embed another language.
133
+ */
62
134
  export declare function tokenInside<S>(stream: TxCodeStreamLike, end: number, run: (inner: TxCodeStreamLike) => S): S;
135
+ /** Resolves a language name or alias (`js`, `ts`, `md`) to a language; `null` for an unknown name. */
63
136
  export declare function resolveCodeLanguage(name: string | null | undefined): TxCodeLanguage | null;
137
+ /** Gives the tokenizer of a language name; unknown names get the plain one. */
64
138
  export declare function getCodeMode(language: TxCodeLanguage | string | null | undefined): TxCodeMode;
139
+ /** Tokens of one line, read with a mode and the state carried over from the lines before. */
65
140
  export declare function tokenizeLine(mode: TxCodeMode, text: string, state: unknown): TxCodeToken[];
141
+ /** Splits code into lines at `\n`, `\r\n` or `\r`. */
66
142
  export declare function splitCodeLines(code: string): string[];
143
+ /** Tokens of every line of the code in the given language (default `plain`). */
67
144
  export declare function highlightCode(code: string, language?: TxCodeLanguage | string): TxCodeToken[][];
145
+ /** Caches the tokenizer state at the start of each line, so an editor can re-highlight only what changed. */
68
146
  export declare class TxCodeLineStates {
69
147
  private readonly mode;
70
148
  private readonly states;
71
149
  constructor(mode: TxCodeMode);
150
+ /** The language of the mode. */
72
151
  get language(): TxCodeLanguage;
152
+ /** Forgets the stored states after the given line; call it when that line or a line above changes. */
73
153
  invalidateFrom(line: number): void;
154
+ /** Tokens of a line; `lineText` supplies the text of any line, read on demand to catch up the states. */
74
155
  tokens(line: number, lineText: (line: number) => string): TxCodeToken[];
75
156
  }
157
+ /** A piece of a line with one class: text and the token class it takes. */
76
158
  export interface TxCodeSegment {
159
+ /** The text of the piece. */
77
160
  readonly text: string;
161
+ /** The `tx-code-tok-*` class of the piece; `null` for unstyled text. */
78
162
  readonly className: string | null;
79
163
  }
164
+ /** One rendered line of `tx-code-highlight`. */
80
165
  export interface TxCodeLine {
166
+ /** Line number shown in the gutter. */
81
167
  readonly number: number;
168
+ /** The text of the line cut into highlighted pieces. */
82
169
  readonly segments: readonly TxCodeSegment[];
170
+ /** Indent as a CSS length (`4ch`) used to align wrapped lines; `null` for an unindented or blank line. */
83
171
  readonly indent: string | null;
172
+ /** Number of indent guides to draw on the line. */
84
173
  readonly guides: number;
85
174
  }
175
+ /**
176
+ * Indent guide count for lines `from` to `to`; blank lines take the smaller of the nearest indented lines around them, looked up within `reach` lines.
177
+ */
86
178
  export declare function guideLevels(count: number, lineText: (index: number) => string, tabSize?: number, from?: number, to?: number, reach?: number): number[];
179
+ /**
180
+ * Indent of a line as a CSS length in `ch` (tabs count to the next tab stop); `null` for a blank or unindented line.
181
+ */
87
182
  export declare function lineIndent(text: string, tabSize?: number): string | null;
183
+ /** Class name for a token type, `tx-code-tok-<type>`. */
88
184
  export declare function tokenClass(type: string): string;
185
+ /** Cuts a line into pieces by its tokens, with unstyled text between them. */
89
186
  export declare function lineSegments(text: string, tokens: readonly TxCodeToken[]): TxCodeSegment[];
187
+ /** Highlighted lines of the code with numbers, indent and guides, ready to render. */
90
188
  export declare function codeLines(code: string, language: TxCodeLanguage | string, firstLine?: number, tabSize?: number): TxCodeLine[];
189
+ /**
190
+ * Loads the syntax colours (`tx-code-tok-*` classes) for highlighted code; add it once where code is shown without another code component.
191
+ */
91
192
  export declare class TxCodeSyntaxStyles {
92
193
  private readonly highlightTheme;
93
194
  static ɵfac: i0.ɵɵFactoryDeclaration<TxCodeSyntaxStyles, never>;
94
195
  static ɵcmp: i0.ɵɵComponentDeclaration<TxCodeSyntaxStyles, "tx-code-syntax-styles", never, {}, {}, never, never, true, never>;
95
196
  }
197
+ /** Design tokens of `tx-code-highlight` for `dt`: the `codeHighlight` group and `syntax` colours. */
96
198
  export type TxCodeHighlightTokens = TectraCodeHighlightTokens & {
97
199
  syntax: TectraCodeSyntaxTokens;
98
200
  };
201
+ /**
202
+ * Part of `@tectra-ng/code-editor`, without the editor engine: the tokenizers of HTML (with `<script>` and `<style>` inside), CSS, JavaScript, TypeScript, JSON, Markdown (with fenced code) and plain text, and `tx-code-highlight` — highlighted code rendered on the server, with the colours of the code editor.
203
+ * @see https://tectra-ng.com/components/code-highlight
204
+ */
99
205
  export declare class TxCodeHighlight {
100
206
  private readonly highlightTheme;
207
+ /** The code to show */
101
208
  readonly code: import("@angular/core").InputSignal<string | null | undefined>;
209
+ /** `html`, `css`, `javascript`, `typescript`, `json`, `markdown` or `plain` */
102
210
  readonly language: import("@angular/core").InputSignal<string>;
211
+ /** Shows the line numbers */
103
212
  readonly lineNumbers: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
213
+ /** Wraps long lines instead of scrolling sideways */
104
214
  readonly wordWrap: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
215
+ /** Thin vertical lines at every indent level */
105
216
  readonly indentGuides: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
217
+ /** Columns per indent level for the guides and tabs */
106
218
  readonly tabSize: import("@angular/core").InputSignalWithTransform<number, unknown>;
219
+ /** Number of the first line */
107
220
  readonly firstLine: import("@angular/core").InputSignalWithTransform<number, unknown>;
221
+ /** Fixed height; it scrolls inside. By default it follows the code */
108
222
  readonly height: import("@angular/core").InputSignal<string | undefined>;
223
+ /** Accessible name of the code region */
109
224
  readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
225
+ /** Design tokens of this view (`codeHighlight`); `syntax` changes the colours of the code */
110
226
  readonly dt: import("@angular/core").InputSignal<TectraDeepPartial<TxCodeHighlightTokens> | undefined>;
227
+ /** Classes and styles of the parts: `root`, `content`, `line`, `gutter` */
111
228
  readonly pt: import("@angular/core").InputSignal<Partial<Record<TxCodeHighlightPart, import("@tectra-ng/core/config").TxPassThroughValue<TxCodeHighlight>>> | undefined>;
229
+ /** How `pt` merges with the global pass-through */
112
230
  readonly ptOptions: import("@angular/core").InputSignal<TxPassThroughOptions | undefined>;
231
+ /** Drops the tectra styles */
113
232
  readonly unstyled: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
114
233
  readonly isUnstyled: import("@angular/core").Signal<boolean>;
115
234
  readonly passThrough: import("@angular/core").Signal<Partial<Record<TxCodeHighlightPart, import("@tectra-ng/core/config").TxPassThroughPart>>>;
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-code-editor-highlight.d.ts","names":[],"sources":["../../../../packages/code-editor/highlight/src/code-highlight.types.ts","../../../../packages/code-editor/highlight/src/stream.ts","../../../../packages/code-editor/highlight/src/tokenize.ts","../../../../packages/code-editor/highlight/src/code-lines.ts","../../../../packages/code-editor/highlight/src/code-syntax-styles.component.ts","../../../../packages/code-editor/highlight/src/code-highlight.component.ts"],"mappings":";;;YAAY;YAEA;iBAwBK;WACN;WACA;WACA,MAAM;;iBAGA;WACN;WACA;;iBAGM,WAAW;WACjB,UAAU;WACV,UAAU;EACnB,SAAS;EACT,KAAK,OAAO,IAAI;EAChB,MAAM,QAAQ,kBAAkB,OAAO,IAAI;;iBAG5B;WACN;EACT;EACA;EACA;EACA;EACA,KAAK;EACL;EACA,IAAI,gBAAgB;EACpB,SAAS,OAAO;EAChB;EACA;EACA,OAAO;EACP,MAAM,SAAS,QAAQ,oBAAoB;EAC3C,UAAU,cAAc,mBAAmB;EAC3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;;SAxBP,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAe;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA"}
1
+ {"version":3,"file":"tectra-ng-code-editor-highlight.d.ts","names":[],"sources":["../../../../packages/code-editor/highlight/src/code-highlight.types.ts","../../../../packages/code-editor/highlight/src/stream.ts","../../../../packages/code-editor/highlight/src/tokenize.ts","../../../../packages/code-editor/highlight/src/code-lines.ts","../../../../packages/code-editor/highlight/src/code-syntax-styles.component.ts","../../../../packages/code-editor/highlight/src/code-highlight.component.ts"],"mappings":";;;;;;YAGY;;YAGA;;iBAyBK;;WAEN;;WAEA;;WAEA,MAAM;;;iBAIA;;WAEN;;WAEA;;;;;iBAMM,WAAW;;WAEjB,UAAU;;WAEV,UAAU;;EAEnB,SAAS;;EAET,KAAK,OAAO,IAAI;;;;EAIhB,MAAM,QAAQ,kBAAkB,OAAO,IAAI;;;iBAI5B;;WAEN;;EAET;;EAEA;;EAEA;;EAEA;;EAEA,KAAK;;EAEL;;;;EAIA,IAAI,gBAAgB;;EAEpB,SAAS,OAAO;;EAEhB;;EAEA;;EAEA,OAAO;;EAEP,MAAM,SAAS,QAAQ,oBAAoB;;;;EAI3C,UAAU,cAAc,mBAAmB;;EAE3C;;EAEA;;EAEA;;;YAIU;;qBC/FC,wBAAwB;;WASxB;;EAPX;;EAEA;;;;EAKW;;EAIX;;EAKA;;EAKA,KAAK;;EAKL;;;;EAOA,IAAI,gBAAgB;;EAUpB,SAAS,OAAO;;EAOhB;;EA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AA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA"}
@@ -5,99 +5,191 @@ import { TxPassThroughOptions } from "@tectra-ng/core/config";
5
5
  import { TectraCodeDiffTokens, TectraCodeEditorTokens, TectraCodeSyntaxTokens, TectraDeepPartial } from "@tectra-ng/themes";
6
6
  import * as i0 from "@angular/core";
7
7
  import { ControlValueAccessor } from "@angular/forms";
8
+ /** Parts of `tx-code-editor` that `pt` can style. */
8
9
  export type TxCodeEditorPart = 'root' | 'editor' | 'gutter' | 'content' | 'search' | 'searchInput';
10
+ /** Layout of a diff: `inline` stacks removed and added lines, `split` shows both versions side by side. */
9
11
  export type TxCodeDiffView = 'inline' | 'split';
12
+ /** Parts of `tx-code-diff` that `pt` can style. */
10
13
  export type TxCodeDiffPart = 'root' | 'original' | 'modified' | 'gutter' | 'content';
14
+ /** Totals of a diff: lines added, lines removed and number of changed blocks. */
11
15
  export interface TxCodeDiffSummary {
16
+ /** Number of lines added in the modified text. */
12
17
  readonly added: number;
18
+ /** Number of lines removed from the original text. */
13
19
  readonly removed: number;
20
+ /** Number of changed blocks. */
14
21
  readonly changes: number;
15
22
  }
23
+ /** A span of text as character offsets; `to` is exclusive. */
16
24
  export interface TxTextRange {
25
+ /** Offset of the first character. */
17
26
  readonly from: number;
27
+ /** Offset after the last character. */
18
28
  readonly to: number;
19
29
  }
30
+ /** One changed block: the lines it covers in both versions and the characters that differ inside them. */
20
31
  export interface TxCodeDiffChange {
32
+ /** First changed line of the original text (0-based). */
21
33
  readonly originalFrom: number;
34
+ /** Line after the last changed line of the original text; equals `originalFrom` for a pure insertion. */
22
35
  readonly originalTo: number;
36
+ /** First changed line of the modified text (0-based). */
23
37
  readonly modifiedFrom: number;
38
+ /** Line after the last changed line of the modified text; equals `modifiedFrom` for a pure removal. */
24
39
  readonly modifiedTo: number;
40
+ /** Characters removed inside the block, as offsets from the start of its first original line. */
25
41
  readonly originalRanges: readonly TxTextRange[];
42
+ /** Characters added inside the block, as offsets from the start of its first modified line. */
26
43
  readonly modifiedRanges: readonly TxTextRange[];
27
44
  }
45
+ /** Options of `diffCode`. */
28
46
  export interface TxCodeDiffOptions {
47
+ /** Treats lines that differ only in leading and trailing whitespace as equal (default `true`). */
29
48
  readonly ignoreTrimWhitespace?: boolean;
49
+ /**
50
+ * Largest edit distance to search for (default 2000); above it the whole block counts as replaced, which keeps huge diffs fast.
51
+ */
30
52
  readonly maxCost?: number;
31
53
  }
54
+ /** Kind of one step of a diff: a stretch kept, inserted or deleted. */
32
55
  type DiffOpType = 'equal' | 'insert' | 'delete';
56
+ /**
57
+ * One step of a diff: a stretch of the first sequence (`aFrom`..`aTo`) matched to a stretch of the second (`bFrom`..`bTo`).
58
+ */
33
59
  interface DiffOp {
60
+ /** Whether the stretch is kept, inserted or deleted. */
34
61
  type: DiffOpType;
62
+ /** First index of the stretch in the first sequence. */
35
63
  aFrom: number;
64
+ /** Index after the stretch in the first sequence. */
36
65
  aTo: number;
66
+ /** First index of the stretch in the second sequence. */
37
67
  bFrom: number;
68
+ /** Index after the stretch in the second sequence. */
38
69
  bTo: number;
39
70
  }
71
+ /**
72
+ * Compares two sequences and returns the steps that turn the first into the second; `equal` decides when two items match and `maxCost` caps the search.
73
+ */
40
74
  export declare function diffSequences<T>(a: readonly T[], b: readonly T[], equal?: (x: T, y: T) => boolean, maxCost?: number): DiffOp[];
75
+ /** Splits text into lines at `\n`, `\r\n` or `\r`. */
41
76
  export declare function splitDiffLines(text: string): string[];
77
+ /** Finds the changed line blocks between two texts, with the differing characters inside each block. */
42
78
  export declare function diffCode(original: string, modified: string, options?: TxCodeDiffOptions): TxCodeDiffChange[];
79
+ /**
80
+ * Cuts text ranges into per-line ranges, one list for every line, with offsets relative to the line start.
81
+ */
43
82
  export declare function rangesByLine(lines: readonly string[], ranges: readonly TxTextRange[]): TxTextRange[][];
83
+ /** Counts the added and removed lines and the changed blocks of a diff. */
44
84
  export declare function summarizeDiff(changes: readonly TxCodeDiffChange[]): {
45
85
  added: number;
46
86
  removed: number;
47
87
  changes: number;
48
88
  };
89
+ /** What the search panel of the code editor looks for. */
49
90
  export interface TxCodeSearchQuery {
91
+ /** The text or, with `regexp`, the pattern to find. */
50
92
  readonly text: string;
93
+ /** Distinguishes upper and lower case. */
51
94
  readonly matchCase: boolean;
95
+ /** Matches only whole words. */
52
96
  readonly wholeWord: boolean;
97
+ /** Reads `text` as a regular expression. */
53
98
  readonly regexp: boolean;
54
99
  }
100
+ /** One found occurrence in the document. */
55
101
  export interface TxCodeSearchMatch {
102
+ /** Offset of the first character of the match. */
56
103
  readonly from: number;
104
+ /** Offset after the last character of the match. */
57
105
  readonly to: number;
58
106
  }
107
+ /** Everything a search found in a text. */
59
108
  export interface TxCodeSearchResult {
109
+ /** All matches in document order (at most 10000). */
60
110
  readonly matches: readonly TxCodeSearchMatch[];
111
+ /** `false` when the query is a regular expression that does not compile. */
61
112
  readonly valid: boolean;
113
+ /** The compiled expression behind the search; `null` for an empty or invalid query. */
62
114
  readonly pattern: RegExp | null;
63
115
  }
116
+ /** Builds the regular expression of a query; `null` when the text is empty or the expression is invalid. */
64
117
  export declare function searchPattern(query: TxCodeSearchQuery): RegExp | null;
118
+ /** Finds every non-empty match of a query in a text. */
65
119
  export declare function findMatches(text: string, query: TxCodeSearchQuery): TxCodeSearchResult;
120
+ /**
121
+ * Gives the text that replaces a match; with `regexp` the groups of the match fill `$1`, `$2` and so on in the replacement.
122
+ */
66
123
  export declare function replacementFor(state: EditorState, match: TxCodeSearchMatch, query: TxCodeSearchQuery, replacement: string): string;
124
+ /**
125
+ * Effect that sets the highlighted matches and which of them is the current one; used by `tx-code-editor`.
126
+ */
67
127
  export declare const setSearchMarks: import("@codemirror/state").StateEffectType<{
68
128
  matches: readonly TxCodeSearchMatch[];
69
129
  current: number;
70
130
  }>;
131
+ /** Editor state that draws the matches of the search panel and keeps them in place while the text changes. */
71
132
  export declare const searchMarks: StateField<DecorationSet>;
133
+ /**
134
+ * Kind of a diff row: unchanged, inserted, removed, or an empty `filler` that keeps the two sides of a split view aligned.
135
+ */
72
136
  type TxDiffRowKind = 'equal' | 'inserted' | 'removed' | 'filler';
137
+ /** One rendered line of `tx-code-diff`. */
73
138
  interface TxDiffRow {
139
+ /** How the row differs between the versions. */
74
140
  readonly kind: TxDiffRowKind;
141
+ /** Line number shown in the gutter; `null` for a filler row. */
75
142
  readonly number: number | null;
143
+ /** The text of the line cut into highlighted pieces. */
76
144
  readonly segments: readonly TxCodeSegment[];
145
+ /** Indent as a CSS length (`4ch`) used to align wrapped lines; `null` for an unindented or blank line. */
77
146
  readonly indent: string | null;
147
+ /** Number of indent guides to draw on the line. */
78
148
  readonly guides: number;
79
149
  }
150
+ /** Design tokens of `tx-code-diff` for `dt`: the `codeDiff` group and `syntax` colours. */
80
151
  export type TxCodeDiffTokens = TectraCodeDiffTokens & {
81
152
  syntax: TectraCodeSyntaxTokens;
82
153
  };
154
+ /**
155
+ * Shows the changes from `original` to `value`: removed and added lines and the changed characters inside them, inline (removed lines above the added ones) or side by side with aligned rows and shared scrolling. It scrolls to the first change. Without `readOnly` the new side is an editor with the same keys as `tx-code-editor`. The diff is computed by the package (Myers on lines, then on characters), with no library.
156
+ * @see https://tectra-ng.com/components/code-diff
157
+ */
83
158
  export declare class TxCodeDiff {
84
159
  private readonly codeEditorTheme;
160
+ /** The original text */
85
161
  readonly original: import("@angular/core").InputSignal<string | null>;
162
+ /** Two-way: the new text */
86
163
  readonly value: import("@angular/core").ModelSignal<string | null>;
164
+ /** Language of both texts, as in `tx-code-editor` */
87
165
  readonly language: import("@angular/core").InputSignal<string>;
166
+ /** `inline` (one column) or `split` (side by side) */
88
167
  readonly view: import("@angular/core").InputSignal<TxCodeDiffView>;
168
+ /** Blocks edits of the new side */
89
169
  readonly readOnly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
170
+ /** Shows the line numbers */
90
171
  readonly lineNumbers: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
172
+ /** Wraps long lines in the inline view */
91
173
  readonly wordWrap: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
174
+ /** Thin vertical lines at every indent level */
92
175
  readonly indentGuides: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
176
+ /** Spaces at the start and end of a line do not count as a change */
93
177
  readonly ignoreTrimWhitespace: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
178
+ /** Scrolls to the first change when the texts load */
94
179
  readonly scrollToFirstChange: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
180
+ /** Height of the diff, e.g. `400px`; `100%` fills the parent */
95
181
  readonly height: import("@angular/core").InputSignal<string | undefined>;
182
+ /** Accessible name of the diff */
96
183
  readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
184
+ /** Design tokens of this diff (`codeDiff`); `syntax` changes the colours of the code */
97
185
  readonly dt: import("@angular/core").InputSignal<TectraDeepPartial<TxCodeDiffTokens> | undefined>;
186
+ /** Classes and styles of the parts: `root`, `original`, `modified` */
98
187
  readonly pt: import("@angular/core").InputSignal<Partial<Record<TxCodeDiffPart, import("@tectra-ng/core/config").TxPassThroughValue<TxCodeDiff>>> | undefined>;
188
+ /** How `pt` merges with the global pass-through */
99
189
  readonly ptOptions: import("@angular/core").InputSignal<TxPassThroughOptions | undefined>;
190
+ /** Drops the tectra styles, keeps the behaviour */
100
191
  readonly unstyled: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
192
+ /** `{ added, removed, changes }` — counts of added and removed lines and of changed blocks */
101
193
  readonly changed: import("@angular/core").OutputEmitterRef<TxCodeDiffSummary>;
102
194
  readonly isUnstyled: import("@angular/core").Signal<boolean>;
103
195
  readonly passThrough: import("@angular/core").Signal<Partial<Record<TxCodeDiffPart, import("@tectra-ng/core/config").TxPassThroughPart>>>;
@@ -131,6 +223,7 @@ export declare class TxCodeDiff {
131
223
  private readonly compartments;
132
224
  private readonly originalCompartments;
133
225
  constructor();
226
+ /** Moves to the next or previous change */
134
227
  nextChange(): boolean;
135
228
  previousChange(): boolean;
136
229
  private goToChange;
@@ -227,35 +320,65 @@ export declare class TxCodeDiff {
227
320
  "changed": "changed";
228
321
  }, never, never, true, never>;
229
322
  }
323
+ /** Design tokens of `tx-code-editor` for `dt`: the `codeEditor` group and `syntax` colours. */
230
324
  export type TxCodeEditorTokens = TectraCodeEditorTokens & {
231
325
  syntax: TectraCodeSyntaxTokens;
232
326
  };
327
+ /**
328
+ * Its own package: `tectra-ng` and `@tectra-ng/ui` do not include it, so apps without a code editor do not carry the engine. It needs `@tectra-ng/ui` (and with it `core`, `themes`, `icons`) of the same version.
329
+ * @see https://tectra-ng.com/components/code-editor
330
+ */
233
331
  export declare class TxCodeEditor implements ControlValueAccessor {
234
332
  private readonly codeEditorTheme;
333
+ /** Two-way: the text; a form control works too */
235
334
  readonly value: import("@angular/core").ModelSignal<string | null>;
335
+ /** `html`, `css`, `javascript`, `typescript`, `json`, `markdown` or `plain`; short names (`js`, `ts`, `md`, `plaintext`) work too */
236
336
  readonly language: import("@angular/core").InputSignal<string>;
337
+ /** Height of the editor, e.g. `400px`; `100%` fills the parent */
237
338
  readonly height: import("@angular/core").InputSignal<string | undefined>;
339
+ /** Keeps the cursor, selection, copy and search, blocks edits */
238
340
  readonly readOnly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
341
+ /** Shows the line numbers */
239
342
  readonly lineNumbers: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
343
+ /** Wraps long lines instead of scrolling sideways; the rest of a line keeps its indent */
240
344
  readonly wordWrap: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
345
+ /** Thin vertical lines at every indent level; they go on over blank lines */
241
346
  readonly indentGuides: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
347
+ /** Spaces per indent; taken from the text when not set */
242
348
  readonly tabSize: import("@angular/core").InputSignalWithTransform<number | undefined, unknown>;
349
+ /** Text shown while the editor is empty */
243
350
  readonly placeholder: import("@angular/core").InputSignal<string>;
351
+ /** Turns on search and replace (Ctrl/⌘+F) */
244
352
  readonly search: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
353
+ /** Turns the editor off; follows the form control by default */
245
354
  readonly disabled: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
355
+ /** Red frame; follows the form control by default */
246
356
  readonly invalid: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
357
+ /** Accessible name of the text area */
247
358
  readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
359
+ /** Id of the element that names the text area */
248
360
  readonly ariaLabelledBy: import("@angular/core").InputSignal<string | undefined>;
361
+ /** Shows the changes from `originalValue` to `value` inline instead of the editor */
249
362
  readonly diffMode: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
363
+ /** The original text for `diffMode` */
250
364
  readonly originalValue: import("@angular/core").InputSignal<string | null>;
365
+ /** `inline` or `split` for `diffMode` */
251
366
  readonly diffView: import("@angular/core").InputSignal<TxCodeDiffView>;
367
+ /** Design tokens of this editor (`codeEditor`); `syntax` changes the colours of the code (`codeSyntax`) */
252
368
  readonly dt: import("@angular/core").InputSignal<TectraDeepPartial<TxCodeEditorTokens> | undefined>;
369
+ /** Classes and styles of the parts: `root`, `editor`, `search`, `searchInput` */
253
370
  readonly pt: import("@angular/core").InputSignal<Partial<Record<TxCodeEditorPart, import("@tectra-ng/core/config").TxPassThroughValue<TxCodeEditor>>> | undefined>;
371
+ /** How `pt` merges with the global pass-through */
254
372
  readonly ptOptions: import("@angular/core").InputSignal<TxPassThroughOptions | undefined>;
373
+ /** Drops the tectra styles, keeps the behaviour */
255
374
  readonly unstyled: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
375
+ /** The text after every edit (same as `valueChange`) */
256
376
  readonly codeChanged: import("@angular/core").OutputEmitterRef<string>;
377
+ /** The text area got focus */
257
378
  readonly focused: import("@angular/core").OutputEmitterRef<FocusEvent>;
379
+ /** The text area lost focus; touches the form control */
258
380
  readonly blurred: import("@angular/core").OutputEmitterRef<FocusEvent>;
381
+ /** Counts of added and removed lines in `diffMode` */
259
382
  readonly diffChanged: import("@angular/core").OutputEmitterRef<TxCodeDiffSummary>;
260
383
  readonly isUnstyled: import("@angular/core").Signal<boolean>;
261
384
  readonly passThrough: import("@angular/core").Signal<Partial<Record<TxCodeEditorPart, import("@tectra-ng/core/config").TxPassThroughPart>>>;
@@ -305,13 +428,19 @@ export declare class TxCodeEditor implements ControlValueAccessor {
305
428
  registerOnChange(fn: (value: string) => void): void;
306
429
  registerOnTouched(fn: () => void): void;
307
430
  setDisabledState(isDisabled: boolean): void;
431
+ /** Moves focus into the editor */
308
432
  focus(): void;
433
+ /** Undoes or redoes the last change */
309
434
  undo(): boolean;
310
435
  redo(): boolean;
436
+ /** Opens search, or search and replace */
311
437
  openSearch(replace?: boolean): void;
438
+ /** Closes search and returns focus to the text */
312
439
  closeSearch(): void;
440
+ /** Selects the next or previous match */
313
441
  findNext(): void;
314
442
  findPrevious(): void;
443
+ /** Replaces the selected match or every match */
315
444
  replaceCurrent(): void;
316
445
  replaceAll(): void;
317
446
  protected toggleReplace(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-code-editor.d.ts","names":["TxCodeLanguage","_$__diff_diff_rows0.TxDiffRow","TxCodeLanguage"],"sources":["../../../../packages/code-editor/src/code-editor.types.ts","../../../../packages/code-editor/src/diff/diff.ts","../../../../packages/code-editor/src/engine/search.ts","../../../../packages/code-editor/src/diff/diff-rows.ts","../../../../packages/code-editor/src/code-diff.component.ts","../../../../packages/code-editor/src/code-editor.component.ts"],"mappings":";;;;;;;YAEY;YAEA;YAEA;iBAEK;WACN;W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ts","names":["TxCodeLanguage","_$__diff_diff_rows0.TxDiffRow","TxCodeLanguage"],"sources":["../../../../packages/code-editor/src/code-editor.types.ts","../../../../packages/code-editor/src/diff/diff.ts","../../../../packages/code-editor/src/engine/search.ts","../../../../packages/code-editor/src/diff/diff-rows.ts","../../../../packages/code-editor/src/code-diff.component.ts","../../../../packages/code-editor/src/code-editor.component.ts"],"mappings":";;;;;;;;YAGY;;YAGA;;YAGA;;iBAGK;;WAEN;;WAEA;;WAEA;;;iBCjBM;;WAEN;;WAEA;;;iBAIM;;WAEN;;WAEA;;WAEA;;WAEA;;WAEA,yBAAyB;;WAEzB,yBAAyB;;;iBAInB;;WAEN;;;;WAIA;;;KAIN;;;;UAKK;;EAER,MAAM;;EAEN;;EAEA;;EAEA;;EAEA;;;;;wBA6Fc,cAAc,GAAG,YAAY,KAAK,YAAY,KAAK,SAAQ,GAAG,GAAG,GAAG,eAAmC,mBAAiB;;wBAwHxH,eAAe;;wBAKf,SAAS,kBAAkB,kBAAkB,UAAS,oBAAyB;;;;wBAgC/E,aAAa,0BAA0B,iBAAiB,gBAAgB;;wBAkBxE,cAAc,kBAAkB;EAAuB;EAAe;EAAiB;;;iBC1TtF;;WAEN;;WAEA;;WAEA;;WAEA;;;iBAIM;;WAEN;;WAEA;;;iBAIM;;WAEN,kBAAkB;;WAElB;;WAEA,SAAS;;;wBAYJ,cAAc,OAAO,oBAAoB;;wBAgBzC,YAAY,cAAc,OAAO,oBAAoB;;;;wBAuBrD,eAAe,OAAO,aAAa,OAAO,mBAAmB,OAAO,mBAAmB;;;;qBAe1F,4CAAc;EAAiC,kBAAS;EAA8B;;;qBAGtF,aAAW,WAAA;;;;KC5FZ;;UAGK;;WAEN,MAAM;;WAEN;;WAEA,mBAAmB;;WAEnB;;WAEA;;;YCmBC,mBAAmB;EAAyB,QAAQ;;;;;;qBAyBnD;mBACM;;WAER,kCAAQ;;WACR,+BAAK;;WACL,kCAAQ;;WACR,8BAAI,YAAA;;WACJ,kCAAQ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