@mak-98/dirvi-cli 0.3.2 → 0.4.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.
Files changed (61) hide show
  1. package/dist/application/action.d.ts +25 -18
  2. package/dist/application/dir-buffer-helpers.d.ts +5 -2
  3. package/dist/application/dir-buffer-helpers.js +17 -17
  4. package/dist/application/display-rows.d.ts +10 -3
  5. package/dist/application/display-rows.d.ts.map +1 -1
  6. package/dist/application/display-rows.js +54 -41
  7. package/dist/application/effect-to-action.d.ts +7 -4
  8. package/dist/application/effect-to-action.d.ts.map +1 -1
  9. package/dist/application/effect-to-action.js +84 -75
  10. package/dist/application/fold-helpers.d.ts +22 -6
  11. package/dist/application/fold-helpers.js +36 -32
  12. package/dist/application/intent-to-effect.d.ts +57 -37
  13. package/dist/application/intent-to-effect.d.ts.map +1 -1
  14. package/dist/application/intent-to-effect.js +116 -103
  15. package/dist/application/reducer-action.d.ts +22 -18
  16. package/dist/application/reducer.d.ts +1 -1
  17. package/dist/application/reducer.d.ts.map +1 -1
  18. package/dist/application/reducer.js +40 -28
  19. package/dist/application/user-input-to-intent.d.ts +38 -14
  20. package/dist/application/user-input-to-intent.d.ts.map +1 -1
  21. package/dist/application/user-input-to-intent.js +103 -49
  22. package/dist/domain/event-message.d.ts +14 -11
  23. package/dist/domain/print-message.d.ts +10 -8
  24. package/dist/index.d.ts +1 -1
  25. package/dist/index.js +35 -30
  26. package/dist/infrastructure/ink-input-to-user-input.d.ts +7 -0
  27. package/dist/infrastructure/ink-input-to-user-input.d.ts.map +1 -0
  28. package/dist/infrastructure/ink-input-to-user-input.js +45 -0
  29. package/dist/infrastructure/input.d.ts +7 -2
  30. package/dist/infrastructure/input.js +71 -71
  31. package/dist/infrastructure/load-initial-props.d.ts +1 -1
  32. package/dist/infrastructure/load-initial-props.d.ts.map +1 -1
  33. package/dist/infrastructure/load-initial-props.js +32 -25
  34. package/dist/infrastructure/user-input.d.ts +31 -16
  35. package/dist/infrastructure/user-input.d.ts.map +1 -1
  36. package/dist/infrastructure/user-input.js +42 -32
  37. package/dist/ui/App.d.ts +11 -6
  38. package/dist/ui/App.d.ts.map +1 -1
  39. package/dist/ui/App.js +127 -89
  40. package/dist/ui/App2.d.ts +11 -6
  41. package/dist/ui/App2.js +95 -84
  42. package/dist/ui/AppShell.d.ts +12 -7
  43. package/dist/ui/AppShell.js +11 -6
  44. package/dist/ui/components/DirEntries.d.ts +8 -5
  45. package/dist/ui/components/DirEntries.js +56 -31
  46. package/dist/ui/components/StatusBar.d.ts +10 -0
  47. package/dist/ui/components/StatusBar.d.ts.map +1 -0
  48. package/dist/ui/components/StatusBar.js +32 -0
  49. package/dist/ui/components/UnixEntry.d.ts +8 -5
  50. package/dist/ui/components/UnixEntry.js +17 -10
  51. package/dist/ui/components/UnixEntryComponent.d.ts +8 -5
  52. package/dist/ui/components/UnixEntryComponent.js +17 -10
  53. package/dist/ui/components/ViewRowComponent.d.ts +6 -4
  54. package/dist/ui/components/ViewRowComponent.js +30 -10
  55. package/dist/ui/hooks/useView.d.ts +6 -2
  56. package/dist/ui/hooks/useView.d.ts.map +1 -1
  57. package/dist/ui/hooks/useView.js +30 -22
  58. package/dist/ui/view.d.ts +15 -10
  59. package/dist/ui/view.d.ts.map +1 -1
  60. package/dist/ui/view.js +63 -59
  61. package/package.json +3 -2
@@ -1,118 +1,131 @@
1
1
  import { Cursor, View } from 'dirvi-lib';
2
2
  function dispatchAction(action) {
3
- return {
4
- effectType: 'dispatchEffectAsAction',
5
- action,
6
- };
3
+ return {
4
+ effectType: 'dispatchEffectAsAction',
5
+ action,
6
+ };
7
7
  }
8
8
  function interactRightToEffect(state) {
9
- const currentEntry = View.getEntryAtCursor(state);
10
- if (currentEntry === undefined) {
11
- return undefined;
12
- }
13
- const path = Cursor.getPath(state.cursor);
14
- if (path === undefined) {
15
- return undefined;
16
- }
17
- if (currentEntry.kind === 'directory') {
18
- if (currentEntry.entries === undefined) {
19
- return {
20
- effectType: 'loadDir',
21
- path,
22
- };
23
- }
24
- else {
25
- return dispatchAction({
26
- kind: 'updateDir',
27
- path,
28
- entries: undefined,
29
- });
30
- }
31
- }
32
- if (currentEntry.kind === 'file') {
33
- return {
34
- effectType: 'printFile',
35
- path,
36
- };
37
- }
38
- // TODO Later: Peeking on folds
9
+ const currentEntry = View.getEntryAtCursor(state);
10
+ if (currentEntry === undefined) {
11
+ return undefined;
12
+ }
13
+ const path = Cursor.getPath(state.cursor);
14
+ if (path === undefined) {
39
15
  return undefined;
16
+ }
17
+ if (currentEntry.kind === 'directory') {
18
+ if (currentEntry.entries === undefined) {
19
+ return {
20
+ effectType: 'loadDir',
21
+ path,
22
+ };
23
+ } else {
24
+ return dispatchAction({
25
+ kind: 'updateDir',
26
+ path,
27
+ entries: undefined,
28
+ });
29
+ }
30
+ }
31
+ if (currentEntry.kind === 'file') {
32
+ return {
33
+ effectType: 'printFile',
34
+ path,
35
+ };
36
+ }
37
+ // TODO Later: Peeking on folds
38
+ return undefined;
40
39
  }
41
40
  function interactLeftToEffect(state) {
42
- if (state.cursor.parentPath.length === 0) {
43
- return undefined;
44
- }
45
- return dispatchAction({
46
- kind: 'outDir',
47
- });
41
+ if (state.cursor.parentPath.length === 0) {
42
+ return undefined;
43
+ }
44
+ return dispatchAction({
45
+ kind: 'outDir',
46
+ });
48
47
  }
49
48
  // Here if the updated command buffer reaches a recognized motion,
50
49
  // sends the effect.
51
50
  function commandBufferToEffectResult(updatedCommandBuffer) {
52
- switch (updatedCommandBuffer) {
53
- case 'q':
54
- return {
55
- commandBuffer: '',
56
- effect: {
57
- effectType: 'exit',
58
- exitMessage: '',
59
- },
60
- };
61
- case 'za':
62
- return {
63
- commandBuffer: '',
64
- effect: dispatchAction({
65
- kind: 'toggleFold',
66
- }),
67
- };
68
- case 'zc':
69
- return {
70
- commandBuffer: '',
71
- effect: dispatchAction({
72
- kind: 'fold',
73
- }),
74
- };
75
- case 'zo':
76
- return {
77
- commandBuffer: '',
78
- effect: dispatchAction({
79
- kind: 'unfold',
80
- }),
81
- };
82
- default:
83
- return {
84
- commandBuffer: updatedCommandBuffer,
85
- };
86
- }
51
+ switch (updatedCommandBuffer) {
52
+ case 'q':
53
+ return {
54
+ effectType: 'exit',
55
+ exitMessage: '',
56
+ };
57
+ case 'z':
58
+ return {
59
+ effectType: 'changeInput',
60
+ inputMode: 'normal',
61
+ commandBuffer: updatedCommandBuffer,
62
+ commandLine: '',
63
+ };
64
+ case 'za':
65
+ return dispatchAction({
66
+ kind: 'toggleFold',
67
+ });
68
+ case 'zc':
69
+ return dispatchAction({
70
+ kind: 'fold',
71
+ });
72
+ case 'zo':
73
+ return dispatchAction({
74
+ kind: 'unfold',
75
+ });
76
+ default:
77
+ return {
78
+ effectType: 'changeInput',
79
+ inputMode: 'normal',
80
+ commandBuffer: '',
81
+ commandLine: '',
82
+ };
83
+ }
87
84
  }
88
85
  // Effect derived from Intent and the state.
89
86
  export function intentToEffect(intent, state) {
90
- switch (intent.intentType) {
91
- case 'updateCommandBuffer':
92
- return commandBufferToEffectResult(intent.updatedCommandBuffer);
93
- case 'interactRight':
94
- return {
95
- commandBuffer: '',
96
- effect: interactRightToEffect(state),
97
- };
98
- case 'interactLeft':
99
- return {
100
- commandBuffer: '',
101
- effect: interactLeftToEffect(state),
102
- };
103
- case 'interactDown':
104
- return {
105
- commandBuffer: '',
106
- effect: dispatchAction({
107
- kind: 'nextEntry',
108
- }),
109
- };
110
- case 'interactUp':
111
- return {
112
- commandBuffer: '',
113
- effect: dispatchAction({
114
- kind: 'prevEntry',
115
- }),
116
- };
117
- }
87
+ switch (intent.intentType) {
88
+ case 'setNormalBuffer':
89
+ return commandBufferToEffectResult(intent.commandBuffer);
90
+ case 'interactRight':
91
+ return interactRightToEffect(state);
92
+ case 'interactLeft':
93
+ return interactLeftToEffect(state);
94
+ case 'interactDown':
95
+ return dispatchAction({
96
+ kind: 'nextEntry',
97
+ });
98
+ case 'interactUp':
99
+ return dispatchAction({
100
+ kind: 'prevEntry',
101
+ });
102
+ case 'enterCommandLineMode':
103
+ return {
104
+ effectType: 'changeInput',
105
+ inputMode: 'command',
106
+ commandBuffer: '',
107
+ commandLine: ':',
108
+ };
109
+ case 'setCommandLine':
110
+ return {
111
+ effectType: 'changeInput',
112
+ inputMode: 'command',
113
+ commandBuffer: '',
114
+ commandLine: intent.commandLine,
115
+ };
116
+ case 'exitCommandLineMode':
117
+ return {
118
+ effectType: 'changeInput',
119
+ inputMode: 'normal',
120
+ commandBuffer: '',
121
+ commandLine: '',
122
+ };
123
+ case 'executeCommandLine':
124
+ return {
125
+ effectType: 'changeInput',
126
+ inputMode: 'normal',
127
+ commandBuffer: '',
128
+ commandLine: '',
129
+ };
130
+ }
118
131
  }
@@ -1,19 +1,23 @@
1
1
  import { Cursor, UnixEntry, UnixEntryPath } from 'dirvi-lib';
2
- export type ReducerAction = {
3
- kind: 'changeCursor';
4
- cursor: Cursor;
5
- } | {
6
- kind: 'updateDir';
7
- path: UnixEntryPath;
8
- entries: UnixEntry[] | undefined;
9
- } | {
10
- kind: 'fold';
11
- parentPath: UnixEntryPath;
12
- entry: UnixEntry;
13
- cursor: Cursor;
14
- } | {
15
- kind: 'unfold';
16
- parentPath: UnixEntryPath;
17
- cursor: Cursor;
18
- };
19
- //# sourceMappingURL=reducer-action.d.ts.map
2
+ export type ReducerAction =
3
+ | {
4
+ kind: 'changeCursor';
5
+ cursor: Cursor;
6
+ }
7
+ | {
8
+ kind: 'updateDir';
9
+ path: UnixEntryPath;
10
+ entries: UnixEntry[] | undefined;
11
+ }
12
+ | {
13
+ kind: 'fold';
14
+ parentPath: UnixEntryPath;
15
+ entry: UnixEntry;
16
+ cursor: Cursor;
17
+ }
18
+ | {
19
+ kind: 'unfold';
20
+ parentPath: UnixEntryPath;
21
+ cursor: Cursor;
22
+ };
23
+ //# sourceMappingURL=reducer-action.d.ts.map
@@ -1,4 +1,4 @@
1
1
  import { State } from 'dirvi-lib';
2
2
  import { ReducerAction } from './reducer-action.js';
3
3
  export declare function reducer(state: State, action: ReducerAction): State;
4
- //# sourceMappingURL=reducer.d.ts.map
4
+ //# sourceMappingURL=reducer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../src/application/reducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,EACN,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,wBAAgB,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,GAAG,KAAK,CA8ClE"}
1
+ {"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../src/application/reducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,EAAY,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,wBAAgB,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,GAAG,KAAK,CA8ClE"}
@@ -1,31 +1,43 @@
1
- import { UnixEntry, FoldNode, } from 'dirvi-lib';
1
+ import { UnixEntry, FoldNode } from 'dirvi-lib';
2
2
  export function reducer(state, action) {
3
- switch (action.kind) {
4
- case 'changeCursor':
5
- return {
6
- ...state,
7
- cursor: action.cursor,
8
- };
9
- case 'updateDir':
10
- return {
11
- ...state,
12
- buffer: UnixEntry.setEntriesAtPath(state.buffer, action.path, action.entries),
13
- };
14
- case 'fold': {
15
- const folds = FoldNode.addFoldedEntryAtPath(state.folds, action.parentPath, action.entry);
16
- return {
17
- ...state,
18
- folds,
19
- cursor: action.cursor,
20
- };
21
- }
22
- case 'unfold': {
23
- const folds = FoldNode.modifyAtPath(state.folds, action.parentPath, (node) => FoldNode.clearFoldedEntries(node));
24
- return {
25
- ...state,
26
- folds,
27
- cursor: action.cursor,
28
- };
29
- }
3
+ switch (action.kind) {
4
+ case 'changeCursor':
5
+ return {
6
+ ...state,
7
+ cursor: action.cursor,
8
+ };
9
+ case 'updateDir':
10
+ return {
11
+ ...state,
12
+ buffer: UnixEntry.setEntriesAtPath(
13
+ state.buffer,
14
+ action.path,
15
+ action.entries,
16
+ ),
17
+ };
18
+ case 'fold': {
19
+ const folds = FoldNode.addFoldedEntryAtPath(
20
+ state.folds,
21
+ action.parentPath,
22
+ action.entry,
23
+ );
24
+ return {
25
+ ...state,
26
+ folds,
27
+ cursor: action.cursor,
28
+ };
30
29
  }
30
+ case 'unfold': {
31
+ const folds = FoldNode.modifyAtPath(
32
+ state.folds,
33
+ action.parentPath,
34
+ (node) => FoldNode.clearFoldedEntries(node),
35
+ );
36
+ return {
37
+ ...state,
38
+ folds,
39
+ cursor: action.cursor,
40
+ };
41
+ }
42
+ }
31
43
  }
@@ -1,15 +1,39 @@
1
1
  import { UserInput } from '../infrastructure/user-input.js';
2
- export type Intent = {
3
- intentType: 'interactRight';
4
- } | {
5
- intentType: 'interactLeft';
6
- } | {
7
- intentType: 'interactDown';
8
- } | {
9
- intentType: 'interactUp';
10
- } | {
11
- intentType: 'updateCommandBuffer';
12
- updatedCommandBuffer: string;
13
- };
14
- export declare function userInputToIntent(userInput: UserInput, commandBuffer: string): Intent | undefined;
15
- //# sourceMappingURL=user-input-to-intent.d.ts.map
2
+ export type InputMode = 'normal' | 'command';
3
+ export type Intent =
4
+ | {
5
+ intentType: 'interactRight';
6
+ }
7
+ | {
8
+ intentType: 'interactLeft';
9
+ }
10
+ | {
11
+ intentType: 'interactDown';
12
+ }
13
+ | {
14
+ intentType: 'interactUp';
15
+ }
16
+ | {
17
+ intentType: 'setNormalBuffer';
18
+ commandBuffer: string;
19
+ }
20
+ | {
21
+ intentType: 'enterCommandLineMode';
22
+ }
23
+ | {
24
+ intentType: 'setCommandLine';
25
+ commandLine: string;
26
+ }
27
+ | {
28
+ intentType: 'executeCommandLine';
29
+ }
30
+ | {
31
+ intentType: 'exitCommandLineMode';
32
+ };
33
+ export declare function userInputToIntent(
34
+ userInput: UserInput,
35
+ inputMode: InputMode,
36
+ normalBuffer: string,
37
+ commandLine: string,
38
+ ): Intent | undefined;
39
+ //# sourceMappingURL=user-input-to-intent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"user-input-to-intent.d.ts","sourceRoot":"","sources":["../../src/application/user-input-to-intent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,MAAM,MAAM,MAAM,GACd;IACE,UAAU,EAAE,eAAe,CAAC;CAC7B,GACD;IACE,UAAU,EAAE,cAAc,CAAC;CAC5B,GACD;IACE,UAAU,EAAE,cAAc,CAAC;CAC5B,GACD;IACE,UAAU,EAAE,YAAY,CAAC;CAC1B,GACD;IACE,UAAU,EAAE,qBAAqB,CAAC;IAClC,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAqCN,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,MAAM,GACpB,MAAM,GAAG,SAAS,CAiCpB"}
1
+ {"version":3,"file":"user-input-to-intent.d.ts","sourceRoot":"","sources":["../../src/application/user-input-to-intent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE7C,MAAM,MAAM,MAAM,GACd;IACE,UAAU,EAAE,eAAe,CAAC;CAC7B,GACD;IACE,UAAU,EAAE,cAAc,CAAC;CAC5B,GACD;IACE,UAAU,EAAE,cAAc,CAAC;CAC5B,GACD;IACE,UAAU,EAAE,YAAY,CAAC;CAC1B,GACD;IACE,UAAU,EAAE,iBAAiB,CAAC;IAC9B,aAAa,EAAE,MAAM,CAAC;CACvB,GACD;IACE,UAAU,EAAE,sBAAsB,CAAC;CACpC,GACD;IACE,UAAU,EAAE,gBAAgB,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;CACrB,GACD;IACE,UAAU,EAAE,oBAAoB,CAAC;CAClC,GACD;IACE,UAAU,EAAE,qBAAqB,CAAC;CACnC,CAAC;AAGN,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,MAAM,GAClB,MAAM,GAAG,SAAS,CAUpB"}
@@ -1,56 +1,110 @@
1
- function characterToIntent(character, commandBuffer) {
2
- if (commandBuffer === '') {
3
- switch (character) {
4
- case 'l':
5
- return {
6
- intentType: 'interactRight',
7
- };
8
- case 'h':
9
- return {
10
- intentType: 'interactLeft',
11
- };
12
- case 'j':
13
- return {
14
- intentType: 'interactDown',
15
- };
16
- case 'k':
17
- return {
18
- intentType: 'interactUp',
19
- };
20
- }
21
- }
1
+ // Derive the intent from the user input, the input mode, and the input buffers.
2
+ export function userInputToIntent(
3
+ userInput,
4
+ inputMode,
5
+ normalBuffer,
6
+ commandLine,
7
+ ) {
8
+ if (inputMode === 'normal') {
9
+ normalUserInputToIntent(userInput, normalBuffer);
10
+ }
11
+ if (inputMode === 'command') {
12
+ commandUserInputToIntent(userInput, commandLine);
13
+ }
14
+ return undefined;
15
+ }
16
+ function normalUserInputToIntent(userInput, normalBuffer) {
17
+ if (userInput.userInputType === 'esc') {
22
18
  return {
23
- intentType: 'updateCommandBuffer',
24
- updatedCommandBuffer: commandBuffer + character,
19
+ intentType: 'setNormalBuffer',
20
+ commandBuffer: '',
25
21
  };
22
+ }
23
+ if (userInput.userInputType === 'character') {
24
+ return normalCharacterToIntent(userInput.string, normalBuffer);
25
+ }
26
+ switch (userInput.userInputType) {
27
+ case 'rightArrow':
28
+ return {
29
+ intentType: 'interactRight',
30
+ };
31
+ case 'leftArrow':
32
+ return {
33
+ intentType: 'interactLeft',
34
+ };
35
+ case 'downArrow':
36
+ return {
37
+ intentType: 'interactDown',
38
+ };
39
+ case 'upArrow':
40
+ return {
41
+ intentType: 'interactUp',
42
+ };
43
+ }
26
44
  }
27
- // Derive the intent from the user input and the commandBuffer.
28
- export function userInputToIntent(userInput, commandBuffer) {
29
- if (userInput.userInputType === 'esc') {
45
+ function normalCharacterToIntent(character, commandBuffer) {
46
+ if (commandBuffer === '') {
47
+ switch (character) {
48
+ case 'l':
30
49
  return {
31
- intentType: 'updateCommandBuffer',
32
- updatedCommandBuffer: '',
50
+ intentType: 'interactRight',
51
+ };
52
+ case 'h':
53
+ return {
54
+ intentType: 'interactLeft',
55
+ };
56
+ case 'j':
57
+ return {
58
+ intentType: 'interactDown',
59
+ };
60
+ case 'k':
61
+ return {
62
+ intentType: 'interactUp',
63
+ };
64
+ case ':':
65
+ return {
66
+ intentType: 'enterCommandLineMode',
33
67
  };
34
68
  }
35
- if (userInput.userInputType === 'character') {
36
- return characterToIntent(userInput.string, commandBuffer);
37
- }
38
- switch (userInput.userInputType) {
39
- case 'rightArrow':
40
- return {
41
- intentType: 'interactRight',
42
- };
43
- case 'leftArrow':
44
- return {
45
- intentType: 'interactLeft',
46
- };
47
- case 'downArrow':
48
- return {
49
- intentType: 'interactDown',
50
- };
51
- case 'upArrow':
52
- return {
53
- intentType: 'interactUp',
54
- };
55
- }
69
+ }
70
+ return {
71
+ intentType: 'setNormalBuffer',
72
+ commandBuffer: commandBuffer + character,
73
+ };
74
+ }
75
+ function commandUserInputToIntent(userInput, commandLine) {
76
+ if (userInput.userInputType === 'esc') {
77
+ return {
78
+ intentType: 'exitCommandLineMode',
79
+ };
80
+ }
81
+ if (userInput.userInputType === 'enter') {
82
+ return {
83
+ intentType: 'executeCommandLine',
84
+ };
85
+ }
86
+ if (userInput.userInputType === 'character') {
87
+ return {
88
+ intentType: 'setCommandLine',
89
+ commandLine: commandLine + userInput.string,
90
+ };
91
+ }
92
+ switch (userInput.userInputType) {
93
+ case 'rightArrow':
94
+ return {
95
+ intentType: 'interactRight',
96
+ };
97
+ case 'leftArrow':
98
+ return {
99
+ intentType: 'interactLeft',
100
+ };
101
+ case 'downArrow':
102
+ return {
103
+ intentType: 'interactDown',
104
+ };
105
+ case 'upArrow':
106
+ return {
107
+ intentType: 'interactUp',
108
+ };
109
+ }
56
110
  }
@@ -1,12 +1,15 @@
1
1
  import { UnixEntryPath, State } from 'dirvi-lib';
2
- export type EventMessage = {
3
- type: 'view';
4
- view: State;
5
- } | {
6
- type: 'displayed-files-paths';
7
- paths: string[];
8
- } | {
9
- type: 'file';
10
- path: UnixEntryPath;
11
- };
12
- //# sourceMappingURL=event-message.d.ts.map
2
+ export type EventMessage =
3
+ | {
4
+ type: 'view';
5
+ view: State;
6
+ }
7
+ | {
8
+ type: 'displayed-files-paths';
9
+ paths: string[];
10
+ }
11
+ | {
12
+ type: 'file';
13
+ path: UnixEntryPath;
14
+ };
15
+ //# sourceMappingURL=event-message.d.ts.map
@@ -1,9 +1,11 @@
1
1
  import { EntryPath, View } from 'dirvi-lib';
2
- export type PrintMessage = {
3
- type: 'view';
4
- view: View;
5
- } | {
6
- type: 'file';
7
- path: EntryPath;
8
- };
9
- //# sourceMappingURL=print-message.d.ts.map
2
+ export type PrintMessage =
3
+ | {
4
+ type: 'view';
5
+ view: View;
6
+ }
7
+ | {
8
+ type: 'file';
9
+ path: EntryPath;
10
+ };
11
+ //# sourceMappingURL=print-message.d.ts.map
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  export {};
3
- //# sourceMappingURL=index.d.ts.map
3
+ //# sourceMappingURL=index.d.ts.map