@opentui/keymap 0.0.0-20260424-2e949539 → 0.1.107
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/README.md
CHANGED
|
@@ -65,8 +65,7 @@ bun install @opentui/keymap
|
|
|
65
65
|
bun run build
|
|
66
66
|
bun run test
|
|
67
67
|
bun src/keymap-benchmark.ts
|
|
68
|
-
bun run serve:keymap-html
|
|
69
68
|
```
|
|
70
69
|
|
|
71
70
|
- `bun src/keymap-benchmark.ts` runs the benchmark suite from `src/keymap-benchmark.ts`.
|
|
72
|
-
-
|
|
71
|
+
- The HTML demo now lives in the docs app at `/demos/keymap-html/` under `packages/web`.
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "src/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.1.107",
|
|
8
8
|
"description": "Standalone keymap package for OpenTUI",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@opentui/core": "0.
|
|
53
|
+
"@opentui/core": "0.1.107"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@opentui/react": "workspace:*",
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"typescript": "^5"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
|
-
"@opentui/react": "0.
|
|
67
|
-
"@opentui/solid": "0.
|
|
66
|
+
"@opentui/react": "0.1.107",
|
|
67
|
+
"@opentui/solid": "0.1.107",
|
|
68
68
|
"react": ">=19.0.0",
|
|
69
69
|
"solid-js": "1.9.12"
|
|
70
70
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { ErrorEvent, Keymap, WarningEvent } from "../index.js";
|
|
2
|
-
export interface DiagnosticCapture {
|
|
3
|
-
warnings: string[];
|
|
4
|
-
errors: string[];
|
|
5
|
-
warningEvents: WarningEvent[];
|
|
6
|
-
errorEvents: ErrorEvent[];
|
|
7
|
-
externalWarningListeners: number;
|
|
8
|
-
externalErrorListeners: number;
|
|
9
|
-
takeWarnings(): {
|
|
10
|
-
warnings: string[];
|
|
11
|
-
warningEvents: WarningEvent[];
|
|
12
|
-
};
|
|
13
|
-
takeErrors(): {
|
|
14
|
-
errors: string[];
|
|
15
|
-
errorEvents: ErrorEvent[];
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
export interface DiagnosticHarness {
|
|
19
|
-
trackKeymap<TKeymap extends Keymap<any, any>>(keymap: TKeymap): TKeymap;
|
|
20
|
-
captureDiagnostics<TKeymap extends Keymap<any, any>>(keymap: TKeymap): DiagnosticCapture;
|
|
21
|
-
assertNoUnhandledDiagnostics(): void;
|
|
22
|
-
}
|
|
23
|
-
export declare function createDiagnosticHarness(): DiagnosticHarness;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { BoxRenderable, KeyEvent, type Renderable } from "@opentui/core";
|
|
2
|
-
import { type ActiveKey, type ActiveKeyOptions, type BindingParser, type CommandRecord, type ErrorEvent, type EventMatchResolverContext, type KeyMatch, type Keymap, type ReactiveMatcher, type WarningEvent } from "../index.js";
|
|
3
|
-
import { type TestRenderer } from "@opentui/core/testing";
|
|
4
|
-
import { type DiagnosticHarness } from "./diagnostic-harness.js";
|
|
5
|
-
export type OpenTuiKeymap = Keymap<Renderable, KeyEvent>;
|
|
6
|
-
export interface ReactiveBoolean extends ReactiveMatcher {
|
|
7
|
-
set(next: boolean): void;
|
|
8
|
-
readonly subscriptions: number;
|
|
9
|
-
readonly subscribeCalls: number;
|
|
10
|
-
readonly disposeCalls: number;
|
|
11
|
-
}
|
|
12
|
-
export declare function createKeymapTestHelpers(diagnostics: DiagnosticHarness, getRenderer: () => TestRenderer): {
|
|
13
|
-
createFocusableBox: (id: string) => BoxRenderable;
|
|
14
|
-
getActiveKey: (keymap: OpenTuiKeymap, name: string, options?: ActiveKeyOptions) => ActiveKey | undefined;
|
|
15
|
-
getActiveKeyNames: (keymap: OpenTuiKeymap) => string[];
|
|
16
|
-
getParserKeymap: () => OpenTuiKeymap;
|
|
17
|
-
getKeymap: (renderer: TestRenderer) => OpenTuiKeymap;
|
|
18
|
-
createBareKeymap: (renderer: TestRenderer) => OpenTuiKeymap;
|
|
19
|
-
getCommand: (keymap: OpenTuiKeymap, name: string) => CommandRecord | undefined;
|
|
20
|
-
getCommandEntry: (keymap: OpenTuiKeymap, name: string) => import("../types.js").CommandEntry<Renderable, KeyEvent> | undefined;
|
|
21
|
-
getActiveKeyDisplay: (keymap: OpenTuiKeymap, display: string, options?: ActiveKeyOptions) => ActiveKey | undefined;
|
|
22
|
-
captureDiagnostics: (keymap: OpenTuiKeymap) => {
|
|
23
|
-
warningEvents: WarningEvent[];
|
|
24
|
-
errorEvents: ErrorEvent[];
|
|
25
|
-
warnings: string[];
|
|
26
|
-
errors: string[];
|
|
27
|
-
takeWarnings: () => {
|
|
28
|
-
warnings: string[];
|
|
29
|
-
warningEvents: WarningEvent[];
|
|
30
|
-
};
|
|
31
|
-
takeErrors: () => {
|
|
32
|
-
errors: string[];
|
|
33
|
-
errorEvents: ErrorEvent[];
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
matchEventAs: (ctx: EventMatchResolverContext, event: KeyEvent, name: string) => KeyMatch;
|
|
37
|
-
createBracketTokenParser: (options?: {
|
|
38
|
-
preserveDisplayCase?: boolean;
|
|
39
|
-
}) => BindingParser;
|
|
40
|
-
createReactiveBoolean: (initial: boolean) => ReactiveBoolean;
|
|
41
|
-
};
|