@thazhemadam/vim-state 0.1.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.
@@ -0,0 +1,174 @@
1
+ import { type SnapshotFrom } from "xstate";
2
+ import { type VimContext } from "./context.js";
3
+ import type { VimCaseTransform, VimFindDirection, VimFindOperation, VimLineTarget, VimMotion, VimNoun, VimOperator, VimOperatorTarget, VimVisualMode } from "./editor.js";
4
+ export declare const vimMachine: import("xstate").StateMachine<VimContext, import("./events.js").VimKeyEvent, {}, never, {
5
+ type: "delete";
6
+ params: {
7
+ target: VimOperatorTarget;
8
+ };
9
+ } | {
10
+ type: "change";
11
+ params: {
12
+ target: VimOperatorTarget;
13
+ };
14
+ } | {
15
+ type: "yank";
16
+ params: {
17
+ target: VimOperatorTarget;
18
+ };
19
+ } | {
20
+ type: "replace";
21
+ params: {
22
+ target: VimOperatorTarget;
23
+ };
24
+ } | {
25
+ type: "appendCount";
26
+ params: import("xstate").NonReducibleUnknown;
27
+ } | {
28
+ type: "clearCount";
29
+ params: import("xstate").NonReducibleUnknown;
30
+ } | {
31
+ type: "setOperator";
32
+ params: {
33
+ name: VimOperator["name"];
34
+ };
35
+ } | {
36
+ type: "clearOperator";
37
+ params: import("xstate").NonReducibleUnknown;
38
+ } | {
39
+ type: "startVisual";
40
+ params: {
41
+ mode: VimVisualMode;
42
+ };
43
+ } | {
44
+ type: "clearVisual";
45
+ params: import("xstate").NonReducibleUnknown;
46
+ } | {
47
+ type: "swapVisualAnchor";
48
+ params: import("xstate").NonReducibleUnknown;
49
+ } | {
50
+ type: "placeCaretAfterCursor";
51
+ params: unknown;
52
+ } | {
53
+ type: "placeCaretAtLineEnd";
54
+ params: unknown;
55
+ } | {
56
+ type: "move";
57
+ params: {
58
+ motion: VimMotion;
59
+ };
60
+ } | {
61
+ type: "moveByEventNoun";
62
+ params: unknown;
63
+ } | {
64
+ type: "moveToChar";
65
+ params: {
66
+ operation: VimFindOperation;
67
+ direction: VimFindDirection;
68
+ };
69
+ } | {
70
+ type: "applyPendingOperatorToNoun";
71
+ params: {
72
+ noun: VimNoun;
73
+ };
74
+ } | {
75
+ type: "insertLineBelow";
76
+ params: unknown;
77
+ } | {
78
+ type: "insertLineAbove";
79
+ params: unknown;
80
+ } | {
81
+ type: "joinLines";
82
+ params: unknown;
83
+ } | {
84
+ type: "join";
85
+ params: {
86
+ target: VimOperatorTarget;
87
+ };
88
+ } | {
89
+ type: "goToLine";
90
+ params: {
91
+ line: VimLineTarget;
92
+ };
93
+ } | {
94
+ type: "placeCaretAtLineStart";
95
+ params: unknown;
96
+ } | {
97
+ type: "put";
98
+ params: {
99
+ placement: "before" | "after";
100
+ };
101
+ } | {
102
+ type: "replaceCharUnderCursor";
103
+ params: {
104
+ char: string;
105
+ };
106
+ } | {
107
+ type: "transformCase";
108
+ params: {
109
+ target: VimOperatorTarget;
110
+ transform: VimCaseTransform;
111
+ };
112
+ } | {
113
+ type: "toggleCase";
114
+ params: unknown;
115
+ } | {
116
+ type: "undo";
117
+ params: unknown;
118
+ } | {
119
+ type: "redo";
120
+ params: unknown;
121
+ }, {
122
+ type: "keyIs";
123
+ params: {
124
+ key: string;
125
+ };
126
+ } | {
127
+ type: "keyIsPrintable";
128
+ params: unknown;
129
+ } | {
130
+ type: "keyIsPrintableWithOperator";
131
+ params: {
132
+ name: VimOperator["name"];
133
+ };
134
+ } | {
135
+ type: "keyIsWithOperator";
136
+ params: {
137
+ key: string;
138
+ name: VimOperator["name"];
139
+ };
140
+ } | {
141
+ type: "keyExtendsCount";
142
+ params: unknown;
143
+ } | {
144
+ type: "keyIsMotionNoun";
145
+ params: unknown;
146
+ } | {
147
+ type: "keyIsOperatorNoun";
148
+ params: {
149
+ name: VimOperator["name"];
150
+ };
151
+ }, never, "insert" | "normal" | "replace" | "replace-once" | "find-forward" | "find-backward" | "till-forward" | "till-backward" | "operator-find-forward" | "operator-find-backward" | "operator-till-forward" | "operator-till-backward" | "operator-inner-object" | "operator-around-object" | "g-prefix" | "operator-pending" | "visual-char" | "visual-line", string, VimContext, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
152
+ id: "vim-pi";
153
+ states: {
154
+ readonly insert: {};
155
+ readonly replace: {};
156
+ readonly "replace-once": {};
157
+ readonly "find-forward": {};
158
+ readonly "find-backward": {};
159
+ readonly "till-forward": {};
160
+ readonly "till-backward": {};
161
+ readonly "operator-find-forward": {};
162
+ readonly "operator-find-backward": {};
163
+ readonly "operator-till-forward": {};
164
+ readonly "operator-till-backward": {};
165
+ readonly "operator-inner-object": {};
166
+ readonly "operator-around-object": {};
167
+ readonly "g-prefix": {};
168
+ readonly "operator-pending": {};
169
+ readonly "visual-char": {};
170
+ readonly "visual-line": {};
171
+ readonly normal: {};
172
+ };
173
+ }>;
174
+ export type VimSnapshot = SnapshotFrom<typeof vimMachine>;