@fairyhunter13/opentui-core 0.1.133 → 0.1.134

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/index.js CHANGED
@@ -65,11 +65,12 @@ import {
65
65
  createCoreSlotRegistry,
66
66
  createSlotRegistry,
67
67
  createTimeline,
68
+ defaultTextareaKeyBindings,
68
69
  engine,
69
70
  registerCorePlugin,
70
71
  resolveCoreSlot,
71
72
  vstyles
72
- } from "./index-1mvpesey.js";
73
+ } from "./index-x59exf1c.js";
73
74
  import {
74
75
  ASCIIFontSelectionHelper,
75
76
  ATTRIBUTE_BASE_BITS,
@@ -239,6 +240,7 @@ import {
239
240
  stringToStyledText,
240
241
  stripAnsiSequences,
241
242
  t,
243
+ terminalNamedSingleStrokeKeys,
242
244
  treeSitterToStyledText,
243
245
  treeSitterToTextChunks,
244
246
  underline,
@@ -246,7 +248,7 @@ import {
246
248
  white,
247
249
  wrapWithDelegates,
248
250
  yellow
249
- } from "./index-cs6ygy1c.js";
251
+ } from "./index-n2b7w731.js";
250
252
  export {
251
253
  yellow,
252
254
  wrapWithDelegates,
@@ -257,6 +259,7 @@ export {
257
259
  underline,
258
260
  treeSitterToTextChunks,
259
261
  treeSitterToStyledText,
262
+ terminalNamedSingleStrokeKeys,
260
263
  t,
261
264
  stripAnsiSequences,
262
265
  stringToStyledText,
@@ -331,6 +334,7 @@ export {
331
334
  dim,
332
335
  detectLinks,
333
336
  delegate,
337
+ defaultTextareaKeyBindings,
334
338
  decodePasteBytes,
335
339
  decodeColorTag,
336
340
  cyan,
@@ -494,5 +498,5 @@ export {
494
498
  ACHROMATOPSIA_MATRIX
495
499
  };
496
500
 
497
- //# debugId=56BA2D9B78C8356A64756E2164756E21
501
+ //# debugId=300B52F6C6F4E0DC64756E2164756E21
498
502
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -4,6 +4,6 @@
4
4
  "sourcesContent": [
5
5
  ],
6
6
  "mappings": "",
7
- "debugId": "56BA2D9B78C8356A64756E2164756E21",
7
+ "debugId": "300B52F6C6F4E0DC64756E2164756E21",
8
8
  "names": []
9
9
  }
@@ -1,2 +1,3 @@
1
1
  import type { ParsedKey } from "./parse.keypress.js";
2
+ export declare const kittyNamedSingleStrokeKeys: string[];
2
3
  export declare function parseKittyKeyboard(sequence: string): ParsedKey | null;
@@ -1,5 +1,6 @@
1
1
  import { Buffer } from "node:buffer";
2
2
  export declare const nonAlphanumericKeys: string[];
3
+ export declare const terminalNamedSingleStrokeKeys: string[];
3
4
  export type KeyEventType = "press" | "repeat" | "release";
4
5
  export interface ParsedKey {
5
6
  name: string;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "type": "module",
7
- "version": "0.1.133",
7
+ "version": "0.1.134",
8
8
  "description": "OpenTUI is a TypeScript library on a native Zig core for building terminal user interfaces (TUIs)",
9
9
  "license": "MIT",
10
10
  "repository": {
@@ -67,12 +67,12 @@
67
67
  "bun-webgpu": "0.1.5",
68
68
  "planck": "^1.4.2",
69
69
  "three": "0.177.0",
70
- "@fairyhunter13/opentui-core-darwin-x64": "0.1.133",
71
- "@fairyhunter13/opentui-core-darwin-arm64": "0.1.133",
72
- "@fairyhunter13/opentui-core-linux-x64": "0.1.133",
73
- "@fairyhunter13/opentui-core-linux-arm64": "0.1.133",
74
- "@fairyhunter13/opentui-core-win32-x64": "0.1.133",
75
- "@fairyhunter13/opentui-core-win32-arm64": "0.1.133"
70
+ "@fairyhunter13/opentui-core-darwin-x64": "0.1.134",
71
+ "@fairyhunter13/opentui-core-darwin-arm64": "0.1.134",
72
+ "@fairyhunter13/opentui-core-linux-x64": "0.1.134",
73
+ "@fairyhunter13/opentui-core-linux-arm64": "0.1.134",
74
+ "@fairyhunter13/opentui-core-win32-x64": "0.1.134",
75
+ "@fairyhunter13/opentui-core-win32-arm64": "0.1.134"
76
76
  },
77
77
  "publishConfig": {
78
78
  "access": "public"
@@ -4,7 +4,8 @@ import type { KeyEvent } from "../lib/KeyHandler.js";
4
4
  import { type ColorInput } from "../lib/RGBA.js";
5
5
  import { Renderable, type RenderableOptions } from "../Renderable.js";
6
6
  import type { RenderContext } from "../types.js";
7
- import { type KeyBinding as BaseKeyBinding, type KeyAliasMap } from "../lib/keymapping.js";
7
+ import { type KeyBinding as BaseKeyBinding } from "../lib/keybinding.internal.js";
8
+ type KeyAliasMap = Record<string, string>;
8
9
  export interface SelectOption {
9
10
  name: string;
10
11
  description: string;
@@ -113,3 +114,4 @@ export declare class SelectRenderable extends Renderable {
113
114
  set keyAliasMap(aliases: KeyAliasMap);
114
115
  set selectedIndex(value: number);
115
116
  }
117
+ export {};
@@ -3,7 +3,8 @@ import { OptimizedBuffer } from "../buffer.js";
3
3
  import { type ColorInput } from "../lib/RGBA.js";
4
4
  import type { KeyEvent } from "../lib/KeyHandler.js";
5
5
  import type { RenderContext } from "../types.js";
6
- import { type KeyBinding as BaseKeyBinding, type KeyAliasMap } from "../lib/keymapping.js";
6
+ import { type KeyBinding as BaseKeyBinding } from "../lib/keybinding.internal.js";
7
+ type KeyAliasMap = Record<string, string>;
7
8
  export interface TabSelectOption {
8
9
  name: string;
9
10
  description: string;
@@ -94,3 +95,4 @@ export declare class TabSelectRenderable extends Renderable {
94
95
  set keyBindings(bindings: TabSelectKeyBinding[]);
95
96
  set keyAliasMap(aliases: KeyAliasMap);
96
97
  }
98
+ export {};
@@ -2,11 +2,13 @@ import type { KeyEvent, PasteEvent } from "../lib/KeyHandler.js";
2
2
  import { RGBA, type ColorInput } from "../lib/RGBA.js";
3
3
  import { type RenderContext } from "../types.js";
4
4
  import { EditBufferRenderable, type EditBufferOptions } from "./EditBufferRenderable.js";
5
- import { type KeyBinding as BaseKeyBinding, type KeyAliasMap } from "../lib/keymapping.js";
5
+ import { type KeyBinding as BaseKeyBinding } from "../lib/keybinding.internal.js";
6
6
  import { type StyledText } from "../lib/styled-text.js";
7
7
  import type { ExtmarksController } from "../lib/extmarks.js";
8
8
  export type TextareaAction = "move-left" | "move-right" | "move-up" | "move-down" | "select-left" | "select-right" | "select-up" | "select-down" | "line-home" | "line-end" | "select-line-home" | "select-line-end" | "visual-line-home" | "visual-line-end" | "select-visual-line-home" | "select-visual-line-end" | "buffer-home" | "buffer-end" | "select-buffer-home" | "select-buffer-end" | "delete-line" | "delete-to-line-end" | "delete-to-line-start" | "backspace" | "delete" | "newline" | "undo" | "redo" | "word-forward" | "word-backward" | "select-word-forward" | "select-word-backward" | "delete-word-forward" | "delete-word-backward" | "select-all" | "submit";
9
9
  export type KeyBinding = BaseKeyBinding<TextareaAction>;
10
+ export type TextareaKeyAliasMap = Record<string, string>;
11
+ export declare const defaultTextareaKeyBindings: KeyBinding[];
10
12
  export interface SubmitEvent {
11
13
  }
12
14
  export interface TextareaOptions extends EditBufferOptions {
@@ -18,7 +20,7 @@ export interface TextareaOptions extends EditBufferOptions {
18
20
  placeholder?: StyledText | string | null;
19
21
  placeholderColor?: ColorInput;
20
22
  keyBindings?: KeyBinding[];
21
- keyAliasMap?: KeyAliasMap;
23
+ keyAliasMap?: TextareaKeyAliasMap;
22
24
  onSubmit?: (event: SubmitEvent) => void;
23
25
  }
24
26
  export declare class TextareaRenderable extends EditBufferRenderable {
@@ -58,6 +60,6 @@ export declare class TextareaRenderable extends EditBufferRenderable {
58
60
  set onSubmit(handler: ((event: SubmitEvent) => void) | undefined);
59
61
  get onSubmit(): ((event: SubmitEvent) => void) | undefined;
60
62
  set keyBindings(bindings: KeyBinding[]);
61
- set keyAliasMap(aliases: KeyAliasMap);
63
+ set keyAliasMap(aliases: TextareaKeyAliasMap);
62
64
  get extmarks(): ExtmarksController;
63
65
  }
package/renderer.d.ts CHANGED
@@ -147,6 +147,7 @@ export declare enum CliRenderEvents {
147
147
  RESIZE = "resize",
148
148
  FOCUS = "focus",
149
149
  BLUR = "blur",
150
+ FOCUSED_RENDERABLE = "focused_renderable",
150
151
  FOCUSED_EDITOR = "focused_editor",
151
152
  THEME_MODE = "theme_mode",
152
153
  CAPABILITIES = "capabilities",
@@ -2,9 +2,9 @@
2
2
  import {
3
3
  createRuntimePlugin,
4
4
  runtimeModuleIdForSpecifier
5
- } from "./index-4xe091hk.js";
6
- import"./index-1mvpesey.js";
7
- import"./index-cs6ygy1c.js";
5
+ } from "./index-ckgv87ep.js";
6
+ import"./index-x59exf1c.js";
7
+ import"./index-n2b7w731.js";
8
8
 
9
9
  // src/runtime-plugin-support.ts
10
10
  var {plugin: registerBunPlugin } = globalThis.Bun;
package/runtime-plugin.js CHANGED
@@ -3,9 +3,9 @@ import {
3
3
  createRuntimePlugin,
4
4
  isCoreRuntimeModuleSpecifier,
5
5
  runtimeModuleIdForSpecifier
6
- } from "./index-4xe091hk.js";
7
- import"./index-1mvpesey.js";
8
- import"./index-cs6ygy1c.js";
6
+ } from "./index-ckgv87ep.js";
7
+ import"./index-x59exf1c.js";
8
+ import"./index-n2b7w731.js";
9
9
  export {
10
10
  runtimeModuleIdForSpecifier,
11
11
  isCoreRuntimeModuleSpecifier,
package/testing.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  TreeSitterClient,
6
6
  calculateRenderGeometry,
7
7
  resolveRenderLib
8
- } from "./index-cs6ygy1c.js";
8
+ } from "./index-n2b7w731.js";
9
9
 
10
10
  // src/testing/test-renderer.ts
11
11
  import { Readable, Writable } from "stream";
package/types.d.ts CHANGED
@@ -52,6 +52,7 @@ export interface RendererEvents {
52
52
  arrayBuffers: number;
53
53
  }) => void;
54
54
  selection: (selection: Selection) => void;
55
+ focused_renderable: (current: Renderable | null, previous: Renderable | null) => void;
55
56
  focused_editor: (current: EditBufferRenderable | null, previous: EditBufferRenderable | null) => void;
56
57
  "debugOverlay:toggle": (enabled: boolean) => void;
57
58
  theme_mode: (mode: ThemeMode) => void;