@adecore/editor-core 0.54.2 → 0.54.4

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/dist/document.js CHANGED
@@ -2021,7 +2021,7 @@ export class DocumentModel {
2021
2021
  }
2022
2022
  /*
2023
2023
  * A caret on the next occurrence of what is selected, a word to begin with, whose later occurrences have to be
2024
- * whole words too. An occurrence that is already a selection is left, and so is the end of the text: the next
2024
+ * whole words too. An occurrence that is already a selection is left, and so is the end of the text. The next
2025
2025
  * press starts again from its beginning.
2026
2026
  */
2027
2027
  selectNextOccurrence() {
package/dist/enter.js CHANGED
@@ -366,7 +366,7 @@ class Enter {
366
366
  source.lineAt(closeAt) === index &&
367
367
  isIndentOnly(source.slice(to, closeAt)) &&
368
368
  isIndentOnly(source.slice(closeAt + 2, line.end))) {
369
- // Nothing left to say after the caret: the closer gets a line of its own, under the opener's star.
369
+ // Nothing left to say after the caret, so the closer gets a line of its own, under the opener's star.
370
370
  const star = this.starPrefix(line, lead, false, isDoc);
371
371
  return { from, to: line.end, text: `${newline}${star}${newline}${lead} */`, caret: newline.length + star.length };
372
372
  }
@@ -8,7 +8,7 @@ const EXPRESSION_STARTS = '(,=:[!&|?{>~^%*+-';
8
8
  const CLOSERS = { '{': '}', '(': ')', '[': ']' };
9
9
  /*
10
10
  * The stretches of a script that are JSX elements, as offsets, outermost first. A scanner and not a
11
- * parser: an element that does not close as one is left out, and a file that costs more than a few
11
+ * parser, so an element that does not close as one is left out, and a file that costs more than a few
12
12
  * passes over its text gives up with what it found.
13
13
  */
14
14
  class JsxScanner {
package/dist/paste.js CHANGED
@@ -37,7 +37,7 @@ function reindent(source, from, text, options) {
37
37
  const measured = widths.filter((width, index) => width !== null && !(anchored && index === 0));
38
38
  const trailingBreak = isBlank(lines.at(-1));
39
39
  if (measured.length > 0) {
40
- // A reduce, not a spread: a paste of a few hundred thousand lines is more arguments than V8 takes in one call.
40
+ // A reduce, not a spread, since a paste of a few hundred thousand lines is more arguments than V8 takes in one call.
41
41
  const delta = target - measured.reduce((least, width) => Math.min(least, width));
42
42
  for (const [index, entry] of lines.entries()) {
43
43
  const width = widths[index];
package/dist/structure.js CHANGED
@@ -104,7 +104,7 @@ export function deriveFoldingRanges(ranges, lineAt, lineCount, getLine, options
104
104
  }
105
105
  }
106
106
  if (options.indentation) {
107
- // One push per fold: a long file has more of them than V8 takes as arguments in one call.
107
+ // One push per fold, since a long file has more of them than V8 takes as arguments in one call.
108
108
  for (const fold of indentationFolds(lineCount, getLine, tabWidth(options), minimum)) {
109
109
  result.push(fold);
110
110
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adecore/editor-core",
3
- "version": "0.54.2",
3
+ "version": "0.54.4",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -16,7 +16,7 @@
16
16
  "test": "bun test --conditions=source"
17
17
  },
18
18
  "dependencies": {
19
- "@adecore/utils": "0.54.2"
19
+ "@adecore/utils": "0.54.4"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@types/bun": "^1.4.4",
package/src/document.ts CHANGED
@@ -2833,7 +2833,7 @@ export class DocumentModel {
2833
2833
 
2834
2834
  /*
2835
2835
  * A caret on the next occurrence of what is selected, a word to begin with, whose later occurrences have to be
2836
- * whole words too. An occurrence that is already a selection is left, and so is the end of the text: the next
2836
+ * whole words too. An occurrence that is already a selection is left, and so is the end of the text. The next
2837
2837
  * press starts again from its beginning.
2838
2838
  */
2839
2839
  private selectNextOccurrence(): boolean {
package/src/enter.ts CHANGED
@@ -511,7 +511,7 @@ class Enter {
511
511
  isIndentOnly(source.slice(to, closeAt)) &&
512
512
  isIndentOnly(source.slice(closeAt + 2, line.end))
513
513
  ) {
514
- // Nothing left to say after the caret: the closer gets a line of its own, under the opener's star.
514
+ // Nothing left to say after the caret, so the closer gets a line of its own, under the opener's star.
515
515
  const star = this.starPrefix(line, lead, false, isDoc);
516
516
 
517
517
  return { from, to: line.end, text: `${newline}${star}${newline}${lead} */`, caret: newline.length + star.length };
@@ -11,7 +11,7 @@ const CLOSERS: Readonly<Record<string, string>> = { '{': '}', '(': ')', '[': ']'
11
11
 
12
12
  /*
13
13
  * The stretches of a script that are JSX elements, as offsets, outermost first. A scanner and not a
14
- * parser: an element that does not close as one is left out, and a file that costs more than a few
14
+ * parser, so an element that does not close as one is left out, and a file that costs more than a few
15
15
  * passes over its text gives up with what it found.
16
16
  */
17
17
  class JsxScanner {
package/src/paste.ts CHANGED
@@ -7,7 +7,7 @@ import type { Selection, TextEdit } from './types.ts';
7
7
  export interface PasteOptions {
8
8
  tabSize: number;
9
9
  insertSpaces: boolean;
10
- /* The text was copied from a caret with nothing selected: a caret with nothing selected takes it as lines above its own. */
10
+ /* The text was copied from a caret with nothing selected. A caret with nothing selected takes it as lines above its own. */
11
11
  wholeLines: boolean;
12
12
  /* Moves a pasted block to the indentation of the place it lands on. */
13
13
  reindent: boolean;
@@ -56,7 +56,7 @@ function reindent(source: EditSource, from: number, text: string, options: Paste
56
56
  const trailingBreak = isBlank(lines.at(-1)!);
57
57
 
58
58
  if (measured.length > 0) {
59
- // A reduce, not a spread: a paste of a few hundred thousand lines is more arguments than V8 takes in one call.
59
+ // A reduce, not a spread, since a paste of a few hundred thousand lines is more arguments than V8 takes in one call.
60
60
  const delta = target - measured.reduce((least, width) => Math.min(least, width));
61
61
 
62
62
  for (const [index, entry] of lines.entries()) {
package/src/structure.ts CHANGED
@@ -230,7 +230,7 @@ export function deriveFoldingRanges(
230
230
  }
231
231
 
232
232
  if (options.indentation) {
233
- // One push per fold: a long file has more of them than V8 takes as arguments in one call.
233
+ // One push per fold, since a long file has more of them than V8 takes as arguments in one call.
234
234
  for (const fold of indentationFolds(lineCount, getLine, tabWidth(options), minimum)) {
235
235
  result.push(fold);
236
236
  }
package/src/types.ts CHANGED
@@ -63,7 +63,7 @@ export interface EditOptions {
63
63
  historyGroup?: string;
64
64
  /* Joins the undo step before it when the document is exactly as that step left it, so one undo takes both back. */
65
65
  joinPrevious?: boolean;
66
- /* Reported on the snapshot: the edit is what a person's typing did, though it ran as a command. */
66
+ /* Reported on the snapshot. The edit is what a person's typing did, though it ran as a command. */
67
67
  typed?: boolean;
68
68
  }
69
69