@oh-my-pi/pi-tui 16.2.8 → 16.2.9
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/CHANGELOG.md
CHANGED
|
@@ -111,6 +111,7 @@ export declare class Editor implements Component, Focusable {
|
|
|
111
111
|
*/
|
|
112
112
|
undoPastTransientText(transientText: string): void;
|
|
113
113
|
setText(text: string): void;
|
|
114
|
+
submit(): void;
|
|
114
115
|
/** Insert text at the current cursor position */
|
|
115
116
|
insertText(text: string): void;
|
|
116
117
|
/** Delete up to `count` characters immediately before the cursor on the current line.
|
|
@@ -16,6 +16,8 @@ export interface EditorComponent extends Component {
|
|
|
16
16
|
handleInput(data: string): void;
|
|
17
17
|
/** Called when user submits (e.g., Enter key) */
|
|
18
18
|
onSubmit?: (text: string) => void;
|
|
19
|
+
/** Programmatically trigger submission (optional, e.g. for voice submit). */
|
|
20
|
+
submit?(): void;
|
|
19
21
|
/** Called when text changes */
|
|
20
22
|
onChange?: (text: string) => void;
|
|
21
23
|
/** Add text to history for up/down navigation */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@oh-my-pi/pi-tui",
|
|
4
|
-
"version": "16.2.
|
|
4
|
+
"version": "16.2.9",
|
|
5
5
|
"description": "Terminal User Interface library with differential rendering for efficient text-based applications",
|
|
6
6
|
"homepage": "https://omp.sh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"fmt": "biome format --write ."
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@oh-my-pi/pi-natives": "16.2.
|
|
41
|
-
"@oh-my-pi/pi-utils": "16.2.
|
|
40
|
+
"@oh-my-pi/pi-natives": "16.2.9",
|
|
41
|
+
"@oh-my-pi/pi-utils": "16.2.9",
|
|
42
42
|
"lru-cache": "11.5.1",
|
|
43
43
|
"marked": "^18.0.5"
|
|
44
44
|
},
|
package/src/components/editor.ts
CHANGED
|
@@ -1594,6 +1594,10 @@ export class Editor implements Component, Focusable {
|
|
|
1594
1594
|
this.#resetKillSequence();
|
|
1595
1595
|
this.#setTextInternal(text);
|
|
1596
1596
|
}
|
|
1597
|
+
submit(): void {
|
|
1598
|
+
if (this.disableSubmit) return;
|
|
1599
|
+
this.#submitValue();
|
|
1600
|
+
}
|
|
1597
1601
|
|
|
1598
1602
|
#exitHistoryForEditing(): void {
|
|
1599
1603
|
if (this.#historyIndex === -1) return;
|
package/src/editor-component.ts
CHANGED
|
@@ -29,6 +29,9 @@ export interface EditorComponent extends Component {
|
|
|
29
29
|
/** Called when user submits (e.g., Enter key) */
|
|
30
30
|
onSubmit?: (text: string) => void;
|
|
31
31
|
|
|
32
|
+
/** Programmatically trigger submission (optional, e.g. for voice submit). */
|
|
33
|
+
submit?(): void;
|
|
34
|
+
|
|
32
35
|
/** Called when text changes */
|
|
33
36
|
onChange?: (text: string) => void;
|
|
34
37
|
|