@rse/ink-editor 0.9.1 → 0.9.2

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.
Files changed (38) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dst-stage1/ink-editor-cli.js +1 -1
  3. package/dst-stage1/ink-editor-engine-emacs.d.ts +1 -1
  4. package/dst-stage1/ink-editor-engine-emacs.js +1 -1
  5. package/dst-stage1/ink-editor-engine-nano.d.ts +1 -1
  6. package/dst-stage1/ink-editor-engine-nano.js +1 -1
  7. package/dst-stage1/ink-editor-engine-vim.d.ts +1 -1
  8. package/dst-stage1/ink-editor-engine-vim.js +1 -1
  9. package/dst-stage1/ink-editor-engine-vscode.d.ts +1 -1
  10. package/dst-stage1/ink-editor-engine-vscode.js +1 -1
  11. package/dst-stage1/ink-editor-mode-emacs.d.ts +2 -2
  12. package/dst-stage1/ink-editor-mode-emacs.js +2 -2
  13. package/dst-stage1/ink-editor-mode-nano.d.ts +2 -2
  14. package/dst-stage1/ink-editor-mode-nano.js +2 -2
  15. package/dst-stage1/ink-editor-mode-vim.d.ts +2 -2
  16. package/dst-stage1/ink-editor-mode-vim.js +2 -2
  17. package/dst-stage1/ink-editor-mode-vscode.d.ts +2 -2
  18. package/dst-stage1/ink-editor-mode-vscode.js +2 -2
  19. package/dst-stage1/ink-editor-mode.d.ts +1 -1
  20. package/dst-stage1/ink-editor-widget.d.ts +2 -2
  21. package/dst-stage1/ink-editor.d.ts +11 -11
  22. package/dst-stage1/ink-editor.js +6 -6
  23. package/dst-stage2/ink-editor-C-JxUrxy.js +5972 -0
  24. package/dst-stage2/ink-editor-cli.esm.js +1 -1
  25. package/dst-stage2/ink-editor.esm.js +1 -5972
  26. package/package.json +1 -1
  27. package/src/ink-editor-cli.ts +2 -2
  28. package/src/ink-editor-engine-emacs.ts +2 -2
  29. package/src/ink-editor-engine-nano.ts +2 -2
  30. package/src/ink-editor-engine-vim.ts +2 -2
  31. package/src/ink-editor-engine-vscode.ts +2 -2
  32. package/src/ink-editor-mode-emacs.ts +4 -4
  33. package/src/ink-editor-mode-nano.ts +4 -4
  34. package/src/ink-editor-mode-vim.ts +4 -4
  35. package/src/ink-editor-mode-vscode.ts +4 -4
  36. package/src/ink-editor-mode.ts +1 -1
  37. package/src/ink-editor-widget.ts +3 -3
  38. package/src/ink-editor.ts +11 -11
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
  ChangeLog
3
3
  =========
4
4
 
5
+ 0.9.2 (2026-12-03)
6
+ ------------------
7
+
8
+ - BUGFIX: use `.js` extensions on all relative imports, so the emitted
9
+ type declarations resolve under the `nodenext` module resolution, too
10
+
5
11
  0.9.0 (2026-12-03)
6
12
  ------------------
7
13
 
@@ -30,7 +30,7 @@ import React from "react";
30
30
  import { useApp, useWindowSize } from "ink";
31
31
  import { render } from "better-ink-ui";
32
32
  /* internal dependencies */
33
- import { Editor, editorModes as modes, syntaxLanguage, syntaxLoad } from "./ink-editor";
33
+ import { Editor, editorModes as modes, syntaxLanguage, syntaxLoad } from "./ink-editor.js";
34
34
  const h = React.createElement;
35
35
  /* statistics of the data of a file on disk */
36
36
  const stats = (data) => {
@@ -1,4 +1,4 @@
1
- import type { TextOps } from "./ink-editor-text";
1
+ import type { TextOps } from "./ink-editor-text.js";
2
2
  export type EmacsOutcome = {
3
3
  message: string;
4
4
  error: boolean;
@@ -24,7 +24,7 @@
24
24
  /* Emacs editing engine, operating on a plain string value and key tokens
25
25
  (dependency-free: it knows nothing about React, Ink, or any terminal) */
26
26
  /* internal dependencies */
27
- import { lineStart, lineEnd, lineNo, lineAt, toCursor, toOffset, isSpace, isBlank, wordEnd, wordBegin, paragraphEnd, paragraphBegin, literalRegExp, goalColumn, rowMove, fillParagraph } from "./ink-editor-text";
27
+ import { lineStart, lineEnd, lineNo, lineAt, toCursor, toOffset, isSpace, isBlank, wordEnd, wordBegin, paragraphEnd, paragraphBegin, literalRegExp, goalColumn, rowMove, fillParagraph } from "./ink-editor-text.js";
28
28
  /* the key bindings, from key sequences to command names */
29
29
  const BINDINGS = new Map(Object.entries({
30
30
  /* motion */
@@ -1,4 +1,4 @@
1
- import type { TextOps } from "./ink-editor-text";
1
+ import type { TextOps } from "./ink-editor-text.js";
2
2
  export type NanoOutcome = {
3
3
  message: string;
4
4
  error: boolean;
@@ -24,7 +24,7 @@
24
24
  /* Nano editing engine, operating on a plain string value and key tokens
25
25
  (dependency-free: it knows nothing about React, Ink, or any terminal) */
26
26
  /* internal dependencies */
27
- import { lineStart, lineEnd, lineNo, lineAt, toOffset, isWord, wordBegin, paragraphEnd, paragraphBegin, isBlank, literalRegExp, findNext, findPrevious, goalColumn, rowMove, fillParagraph } from "./ink-editor-text";
27
+ import { lineStart, lineEnd, lineNo, lineAt, toOffset, isWord, wordBegin, paragraphEnd, paragraphBegin, isBlank, literalRegExp, findNext, findPrevious, goalColumn, rowMove, fillParagraph } from "./ink-editor-text.js";
28
28
  /* the key bindings, from keys to the function names of Nano */
29
29
  const BINDINGS = new Map(Object.entries({
30
30
  "^G": "help",
@@ -1,4 +1,4 @@
1
- import type { TextOps } from "./ink-editor-text";
1
+ import type { TextOps } from "./ink-editor-text.js";
2
2
  export type Mode = "normal" | "insert" | "replace" | "visual" | "vline" | "cmdline";
3
3
  export declare const toRegExp: (pattern: string, icase?: boolean) => RegExp | null;
4
4
  export declare const defaultOps: TextOps;
@@ -24,7 +24,7 @@
24
24
  /* Vim editing engine, operating on a plain string value and key tokens
25
25
  (dependency-free: it knows nothing about React, Ink, or any terminal) */
26
26
  /* internal dependencies */
27
- import { lineStart, lineEnd, lineNo, lineAt, toCursor, toOffset, isSpace, isIdent } from "./ink-editor-text";
27
+ import { lineStart, lineEnd, lineNo, lineAt, toCursor, toOffset, isSpace, isIdent } from "./ink-editor-text.js";
28
28
  /* the command vocabulary */
29
29
  const MOTIONS = new Set([
30
30
  "h", "j", "k", "l", "w", "b", "e", "W", "B", "E", "ge", "gE", "0", "^", "$", "g_", "|",
@@ -1,4 +1,4 @@
1
- import type { TextOps } from "./ink-editor-text";
1
+ import type { TextOps } from "./ink-editor-text.js";
2
2
  export type CodeOutcome = {
3
3
  message: string;
4
4
  error: boolean;
@@ -24,7 +24,7 @@
24
24
  /* VS Code-style editing engine, operating on a plain string value and key tokens
25
25
  (dependency-free: it knows nothing about React, Ink, or any terminal) */
26
26
  /* internal dependencies */
27
- import { lineStart, lineEnd, lineNo, lineAt, toOffset, isIdent, isSpace, wordEnd, wordBegin, escapeRegExp, literalRegExp, findNext, findPrevious, goalColumn, rowMove } from "./ink-editor-text";
27
+ import { lineStart, lineEnd, lineNo, lineAt, toOffset, isIdent, isSpace, wordEnd, wordBegin, escapeRegExp, literalRegExp, findNext, findPrevious, goalColumn, rowMove } from "./ink-editor-text.js";
28
28
  /* the key bindings, from keys to command names (the "shift+" variants of the cursor commands select) */
29
29
  const BINDINGS = new Map(Object.entries({
30
30
  "ctrl+s": "save",
@@ -1,5 +1,5 @@
1
- import { Emacs } from "./ink-editor-engine-emacs";
2
- import type { EditorKey, EditorBinding, EditorMode, EditorResult, EditorStatus } from "./ink-editor-mode";
1
+ import { Emacs } from "./ink-editor-engine-emacs.js";
2
+ import type { EditorKey, EditorBinding, EditorMode, EditorResult, EditorStatus } from "./ink-editor-mode.js";
3
3
  export declare class EmacsMode extends Emacs implements EditorMode {
4
4
  private hl;
5
5
  bind(binding: EditorBinding): void;
@@ -24,8 +24,8 @@
24
24
  /* Emacs editing mode, adapting the Emacs editing engine to the editor
25
25
  (dependency-free: it knows nothing about React, Ink, or any terminal) */
26
26
  /* internal dependencies */
27
- import { literalRegExp } from "./ink-editor-text";
28
- import { Emacs } from "./ink-editor-engine-emacs";
27
+ import { literalRegExp } from "./ink-editor-text.js";
28
+ import { Emacs } from "./ink-editor-engine-emacs.js";
29
29
  /* mapping of a key press onto Emacs key tokens like "x", "C-x", "M-f", or "<up>" */
30
30
  const keyOf = (input, key) => {
31
31
  const mods = (key.ctrl ? "C-" : "") + (key.meta ? "M-" : "");
@@ -1,5 +1,5 @@
1
- import { Nano } from "./ink-editor-engine-nano";
2
- import type { EditorKey, EditorBinding, EditorMode, EditorResult, EditorStatus } from "./ink-editor-mode";
1
+ import { Nano } from "./ink-editor-engine-nano.js";
2
+ import type { EditorKey, EditorBinding, EditorMode, EditorResult, EditorStatus } from "./ink-editor-mode.js";
3
3
  export declare class NanoMode extends Nano implements EditorMode {
4
4
  private hl;
5
5
  bind(binding: EditorBinding): void;
@@ -24,8 +24,8 @@
24
24
  /* Nano editing mode, adapting the Nano editing engine to the editor
25
25
  (dependency-free: it knows nothing about React, Ink, or any terminal) */
26
26
  /* internal dependencies */
27
- import { literalRegExp } from "./ink-editor-text";
28
- import { Nano } from "./ink-editor-engine-nano";
27
+ import { literalRegExp } from "./ink-editor-text.js";
28
+ import { Nano } from "./ink-editor-engine-nano.js";
29
29
  /* mapping of a key press onto Nano key tokens like "x", "^X", "M-U", or "Up" */
30
30
  const keyOf = (input, key) => {
31
31
  const mod = key.ctrl ? "^" : key.meta ? "M-" : "";
@@ -1,5 +1,5 @@
1
- import { Vim } from "./ink-editor-engine-vim";
2
- import type { EditorKey, EditorBinding, EditorMode, EditorResult, EditorStatus } from "./ink-editor-mode";
1
+ import { Vim } from "./ink-editor-engine-vim.js";
2
+ import type { EditorKey, EditorBinding, EditorMode, EditorResult, EditorStatus } from "./ink-editor-mode.js";
3
3
  export declare class VimMode extends Vim implements EditorMode {
4
4
  private hl;
5
5
  bind(binding: EditorBinding): void;
@@ -24,8 +24,8 @@
24
24
  /* Vim editing mode, adapting the Vim editing engine to the editor
25
25
  (dependency-free: it knows nothing about React, Ink, or any terminal) */
26
26
  /* internal dependencies */
27
- import { lineAt, lineEnd } from "./ink-editor-text";
28
- import { Vim, toRegExp } from "./ink-editor-engine-vim";
27
+ import { lineAt, lineEnd } from "./ink-editor-text.js";
28
+ import { Vim, toRegExp } from "./ink-editor-engine-vim.js";
29
29
  /* mapping of a key press onto Vim key tokens like "x" or "<C-r>" */
30
30
  const keyOf = (input, key) => {
31
31
  if (key.escape)
@@ -1,5 +1,5 @@
1
- import { Code } from "./ink-editor-engine-vscode";
2
- import type { EditorKey, EditorBinding, EditorMode, EditorResult, EditorStatus } from "./ink-editor-mode";
1
+ import { Code } from "./ink-editor-engine-vscode.js";
2
+ import type { EditorKey, EditorBinding, EditorMode, EditorResult, EditorStatus } from "./ink-editor-mode.js";
3
3
  export declare class CodeMode extends Code implements EditorMode {
4
4
  private hl;
5
5
  bind(binding: EditorBinding): void;
@@ -24,8 +24,8 @@
24
24
  /* VS Code-style editing mode, adapting the VS Code-style editing engine to the editor
25
25
  (dependency-free: it knows nothing about React, Ink, or any terminal) */
26
26
  /* internal dependencies */
27
- import { literalRegExp } from "./ink-editor-text";
28
- import { Code } from "./ink-editor-engine-vscode";
27
+ import { literalRegExp } from "./ink-editor-text.js";
28
+ import { Code } from "./ink-editor-engine-vscode.js";
29
29
  /* mapping of a key press onto VS Code key tokens like "x", "ctrl+s", or "shift+alt+down" */
30
30
  const keyOf = (input, key) => {
31
31
  const mods = (key.ctrl ? "ctrl+" : "") + (key.shift ? "shift+" : "") + (key.meta ? "alt+" : "");
@@ -1,4 +1,4 @@
1
- import type { TextOps } from "./ink-editor-text";
1
+ import type { TextOps } from "./ink-editor-text.js";
2
2
  export interface EditorKey {
3
3
  escape: boolean;
4
4
  return: boolean;
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
- import type { EditorModeFactory, EditorHost, EditorResult } from "./ink-editor-mode";
3
- import type { Syntax } from "./ink-editor-syntax";
2
+ import type { EditorModeFactory, EditorHost, EditorResult } from "./ink-editor-mode.js";
3
+ import type { Syntax } from "./ink-editor-syntax.js";
4
4
  export interface EditorProps {
5
5
  value: string;
6
6
  onChange: (value: string) => void;
@@ -1,13 +1,13 @@
1
- import type { EditorModeFactory } from "./ink-editor-mode";
2
- import { VimMode } from "./ink-editor-mode-vim";
3
- import { EmacsMode } from "./ink-editor-mode-emacs";
4
- import { NanoMode } from "./ink-editor-mode-nano";
5
- import { CodeMode } from "./ink-editor-mode-vscode";
6
- export type * from "./ink-editor-mode";
7
- export type { TextOps } from "./ink-editor-text";
8
- export type { Syntax, SyntaxRange, SyntaxStyle } from "./ink-editor-syntax";
9
- export type { EditorProps } from "./ink-editor-widget";
10
- export { Editor } from "./ink-editor-widget";
11
- export { syntaxLanguage, syntaxLoad } from "./ink-editor-syntax";
1
+ import type { EditorModeFactory } from "./ink-editor-mode.js";
2
+ import { VimMode } from "./ink-editor-mode-vim.js";
3
+ import { EmacsMode } from "./ink-editor-mode-emacs.js";
4
+ import { NanoMode } from "./ink-editor-mode-nano.js";
5
+ import { CodeMode } from "./ink-editor-mode-vscode.js";
6
+ export type * from "./ink-editor-mode.js";
7
+ export type { TextOps } from "./ink-editor-text.js";
8
+ export type { Syntax, SyntaxRange, SyntaxStyle } from "./ink-editor-syntax.js";
9
+ export type { EditorProps } from "./ink-editor-widget.js";
10
+ export { Editor } from "./ink-editor-widget.js";
11
+ export { syntaxLanguage, syntaxLoad } from "./ink-editor-syntax.js";
12
12
  export { VimMode, EmacsMode, NanoMode, CodeMode };
13
13
  export declare const editorModes: Record<string, EditorModeFactory>;
@@ -21,12 +21,12 @@
21
21
  ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
22
  ** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
23
  */
24
- import { VimMode } from "./ink-editor-mode-vim";
25
- import { EmacsMode } from "./ink-editor-mode-emacs";
26
- import { NanoMode } from "./ink-editor-mode-nano";
27
- import { CodeMode } from "./ink-editor-mode-vscode";
28
- export { Editor } from "./ink-editor-widget";
29
- export { syntaxLanguage, syntaxLoad } from "./ink-editor-syntax";
24
+ import { VimMode } from "./ink-editor-mode-vim.js";
25
+ import { EmacsMode } from "./ink-editor-mode-emacs.js";
26
+ import { NanoMode } from "./ink-editor-mode-nano.js";
27
+ import { CodeMode } from "./ink-editor-mode-vscode.js";
28
+ export { Editor } from "./ink-editor-widget.js";
29
+ export { syntaxLanguage, syntaxLoad } from "./ink-editor-syntax.js";
30
30
  export { VimMode, EmacsMode, NanoMode, CodeMode };
31
31
  /* the editing modes, by their name */
32
32
  export const editorModes = {