@rse/ink-editor 0.0.0-stage → 0.9.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.
Files changed (63) hide show
  1. package/.claude/CLAUDE.md +1 -0
  2. package/AGENTS.md +99 -0
  3. package/CHANGELOG.md +9 -0
  4. package/README.md +116 -2
  5. package/dst-stage1/ink-editor-cli.d.ts +2 -0
  6. package/dst-stage1/ink-editor-cli.js +174 -0
  7. package/dst-stage1/ink-editor-engine-emacs.d.ts +103 -0
  8. package/dst-stage1/ink-editor-engine-emacs.js +1530 -0
  9. package/dst-stage1/ink-editor-engine-nano.d.ts +78 -0
  10. package/dst-stage1/ink-editor-engine-nano.js +884 -0
  11. package/dst-stage1/ink-editor-engine-vim.d.ts +124 -0
  12. package/dst-stage1/ink-editor-engine-vim.js +2220 -0
  13. package/dst-stage1/ink-editor-engine-vscode.d.ts +79 -0
  14. package/dst-stage1/ink-editor-engine-vscode.js +850 -0
  15. package/dst-stage1/ink-editor-mode-emacs.d.ts +12 -0
  16. package/dst-stage1/ink-editor-mode-emacs.js +143 -0
  17. package/dst-stage1/ink-editor-mode-nano.d.ts +12 -0
  18. package/dst-stage1/ink-editor-mode-nano.js +140 -0
  19. package/dst-stage1/ink-editor-mode-vim.d.ts +12 -0
  20. package/dst-stage1/ink-editor-mode-vim.js +230 -0
  21. package/dst-stage1/ink-editor-mode-vscode.d.ts +12 -0
  22. package/dst-stage1/ink-editor-mode-vscode.js +133 -0
  23. package/dst-stage1/ink-editor-mode.d.ts +72 -0
  24. package/dst-stage1/ink-editor-mode.js +24 -0
  25. package/dst-stage1/ink-editor-syntax.d.ts +14 -0
  26. package/dst-stage1/ink-editor-syntax.js +149 -0
  27. package/dst-stage1/ink-editor-text.d.ts +38 -0
  28. package/dst-stage1/ink-editor-text.js +177 -0
  29. package/dst-stage1/ink-editor-widget.d.ts +15 -0
  30. package/dst-stage1/ink-editor-widget.js +132 -0
  31. package/dst-stage1/ink-editor.d.ts +13 -0
  32. package/dst-stage1/ink-editor.js +37 -0
  33. package/dst-stage1/tsc.tsbuildinfo +1 -0
  34. package/dst-stage2/ink-editor-cli.esm.js +177 -0
  35. package/dst-stage2/ink-editor.esm.js +5972 -0
  36. package/etc/c8.json +17 -0
  37. package/etc/eslint.mts +84 -0
  38. package/etc/knip.jsonc +51 -0
  39. package/etc/stx.conf +103 -0
  40. package/etc/tsc.json +29 -0
  41. package/etc/vite.mts +79 -0
  42. package/package.d/@typescript-eslint+typescript-estree+8.74.0.patch +12 -0
  43. package/package.d/vite+8.4.1.patch +12 -0
  44. package/package.json +79 -5
  45. package/src/ink-editor-cli.ts +200 -0
  46. package/src/ink-editor-engine-emacs.ts +1648 -0
  47. package/src/ink-editor-engine-nano.ts +978 -0
  48. package/src/ink-editor-engine-vim.ts +2203 -0
  49. package/src/ink-editor-engine-vscode.ts +938 -0
  50. package/src/ink-editor-mode-emacs.ts +137 -0
  51. package/src/ink-editor-mode-nano.ts +135 -0
  52. package/src/ink-editor-mode-vim.ts +223 -0
  53. package/src/ink-editor-mode-vscode.ts +129 -0
  54. package/src/ink-editor-mode.ts +137 -0
  55. package/src/ink-editor-syntax.ts +176 -0
  56. package/src/ink-editor-text.ts +205 -0
  57. package/src/ink-editor-widget.ts +182 -0
  58. package/src/ink-editor.ts +48 -0
  59. package/tst/ink-editor-1-vim.spec.ts +177 -0
  60. package/tst/ink-editor-2-emacs.spec.ts +211 -0
  61. package/tst/ink-editor-3-nano.spec.ts +187 -0
  62. package/tst/ink-editor-4-vscode.spec.ts +187 -0
  63. package/tst/tsc.json +27 -0
@@ -0,0 +1,78 @@
1
+ import type { TextOps } from "./ink-editor-text";
2
+ export type NanoOutcome = {
3
+ message: string;
4
+ error: boolean;
5
+ exists?: boolean;
6
+ };
7
+ export interface NanoFiles {
8
+ name(): string;
9
+ modified(): boolean;
10
+ write(file: string, force: boolean, rename: boolean): NanoOutcome;
11
+ quit(failed?: boolean): void;
12
+ }
13
+ export declare class Nano {
14
+ emit: (value: string) => void;
15
+ clip: (text: string) => void;
16
+ files: NanoFiles | null;
17
+ ops: TextOps;
18
+ height: number;
19
+ value: string;
20
+ off: number;
21
+ mark: number | null;
22
+ message: string;
23
+ error: boolean;
24
+ private seen;
25
+ private esc;
26
+ private cmd;
27
+ private lastCmd;
28
+ private recorded;
29
+ private typing;
30
+ private undos;
31
+ private redos;
32
+ private cutbuf;
33
+ private goal;
34
+ private found;
35
+ private input;
36
+ private question;
37
+ private rep;
38
+ private verbatim;
39
+ private lastSearch;
40
+ constructor(value: string, ops: TextOps);
41
+ sync(value: string): void;
42
+ keys(tokens: string[]): boolean;
43
+ paste(text: string): void;
44
+ onText(value: string): void;
45
+ onCursor(cursor: [number, number]): void;
46
+ onSelect(sel: [number, number] | null): boolean;
47
+ selection(): [number, number] | null;
48
+ prompt(): string | null;
49
+ searched(): string | null;
50
+ private dispatch;
51
+ private bufferKey;
52
+ private exec;
53
+ private nextWord;
54
+ private rows;
55
+ private findBracket;
56
+ private region;
57
+ private cutRegion;
58
+ private lines;
59
+ private indent;
60
+ private comment;
61
+ private record;
62
+ private undo;
63
+ private replace;
64
+ private insert;
65
+ private search;
66
+ private replaceStart;
67
+ private replaceNext;
68
+ private replaceOne;
69
+ private replaceKey;
70
+ private read;
71
+ private ask;
72
+ private inputKey;
73
+ private need;
74
+ private outcome;
75
+ private writeOut;
76
+ protected say(text: string): void;
77
+ protected fail(text: string): void;
78
+ }