@oh-my-pi/pi-tui 15.0.1 → 15.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [15.0.2] - 2026-05-15
6
+
7
+ ### Added
8
+
9
+ - Restored the `Key` runtime helper on `@oh-my-pi/pi-tui` to mirror upstream `@mariozechner/pi-tui`'s surface. `Key.enter`, `Key.escape`, `Key.tab`, … return the canonical key-name strings; modifier methods (`Key.ctrl(k)`, `Key.shift(k)`, `Key.ctrlShift(k)`, etc.) build precisely-typed `KeyId` literals like `"ctrl+c"`. Pure runtime convenience for typed key-id construction — plugins built against the upstream package surface that import `Key` (e.g. `@plannotator/pi-extension`, `@juicesharp/rpiv-ask-user-question`) load again now that the specifier shim remaps them onto this package.
10
+
5
11
  ## [15.0.1] - 2026-05-14
6
12
  ### Breaking Changes
7
13
 
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@oh-my-pi/pi-tui",
4
- "version": "15.0.1",
4
+ "version": "15.1.0",
5
5
  "description": "Terminal User Interface library with differential rendering for efficient text-based applications",
6
- "homepage": "https://github.com/can1357/oh-my-pi",
6
+ "homepage": "https://omp.sh",
7
7
  "author": "Can Boluk",
8
8
  "contributors": [
9
9
  "Mario Zechner"
@@ -37,8 +37,8 @@
37
37
  "fmt": "biome format --write ."
38
38
  },
39
39
  "dependencies": {
40
- "@oh-my-pi/pi-natives": "15.0.1",
41
- "@oh-my-pi/pi-utils": "15.0.1",
40
+ "@oh-my-pi/pi-natives": "15.1.0",
41
+ "@oh-my-pi/pi-utils": "15.1.0",
42
42
  "lru-cache": "11.3.6",
43
43
  "marked": "^18.0.3"
44
44
  },
package/src/keys.ts CHANGED
@@ -186,6 +186,100 @@ type ModifiedKeyId<Key extends string, RemainingModifiers extends ModifierName =
186
186
  */
187
187
  export type KeyId = BaseKey | ModifiedKeyId<BaseKey>;
188
188
 
189
+ /**
190
+ * Typed helper for constructing key identifiers with autocomplete.
191
+ *
192
+ * The runtime values are just the canonical key-name strings (so `Key.enter`
193
+ * is literally `"enter"`); the value of `Key` over a bag of magic strings is
194
+ * that each property is typed to the exact `KeyId` literal it produces and the
195
+ * modifier methods return precisely-typed concatenations (e.g. `Key.ctrl("c")`
196
+ * is `"ctrl+c"`, not just `string`). This mirrors the upstream
197
+ * `@mariozechner/pi-tui` `Key` export verbatim so plugins built against any
198
+ * scope alias (`@mariozechner`, `@earendil-works`, `@oh-my-pi`) keep working
199
+ * once the specifier shim remaps them to this package.
200
+ */
201
+ export const Key = {
202
+ escape: "escape",
203
+ esc: "esc",
204
+ enter: "enter",
205
+ return: "return",
206
+ tab: "tab",
207
+ space: "space",
208
+ backspace: "backspace",
209
+ delete: "delete",
210
+ insert: "insert",
211
+ clear: "clear",
212
+ home: "home",
213
+ end: "end",
214
+ pageUp: "pageUp",
215
+ pageDown: "pageDown",
216
+ up: "up",
217
+ down: "down",
218
+ left: "left",
219
+ right: "right",
220
+ f1: "f1",
221
+ f2: "f2",
222
+ f3: "f3",
223
+ f4: "f4",
224
+ f5: "f5",
225
+ f6: "f6",
226
+ f7: "f7",
227
+ f8: "f8",
228
+ f9: "f9",
229
+ f10: "f10",
230
+ f11: "f11",
231
+ f12: "f12",
232
+ backtick: "`",
233
+ hyphen: "-",
234
+ equals: "=",
235
+ leftbracket: "[",
236
+ rightbracket: "]",
237
+ backslash: "\\",
238
+ semicolon: ";",
239
+ quote: "'",
240
+ comma: ",",
241
+ period: ".",
242
+ slash: "/",
243
+ exclamation: "!",
244
+ at: "@",
245
+ hash: "#",
246
+ dollar: "$",
247
+ percent: "%",
248
+ caret: "^",
249
+ ampersand: "&",
250
+ asterisk: "*",
251
+ leftparen: "(",
252
+ rightparen: ")",
253
+ underscore: "_",
254
+ plus: "+",
255
+ pipe: "|",
256
+ tilde: "~",
257
+ leftbrace: "{",
258
+ rightbrace: "}",
259
+ colon: ":",
260
+ lessthan: "<",
261
+ greaterthan: ">",
262
+ question: "?",
263
+ ctrl: <K extends BaseKey>(key: K) => `ctrl+${key}` as const,
264
+ shift: <K extends BaseKey>(key: K) => `shift+${key}` as const,
265
+ alt: <K extends BaseKey>(key: K) => `alt+${key}` as const,
266
+ super: <K extends BaseKey>(key: K) => `super+${key}` as const,
267
+ ctrlShift: <K extends BaseKey>(key: K) => `ctrl+shift+${key}` as const,
268
+ shiftCtrl: <K extends BaseKey>(key: K) => `shift+ctrl+${key}` as const,
269
+ ctrlAlt: <K extends BaseKey>(key: K) => `ctrl+alt+${key}` as const,
270
+ altCtrl: <K extends BaseKey>(key: K) => `alt+ctrl+${key}` as const,
271
+ shiftAlt: <K extends BaseKey>(key: K) => `shift+alt+${key}` as const,
272
+ altShift: <K extends BaseKey>(key: K) => `alt+shift+${key}` as const,
273
+ ctrlSuper: <K extends BaseKey>(key: K) => `ctrl+super+${key}` as const,
274
+ superCtrl: <K extends BaseKey>(key: K) => `super+ctrl+${key}` as const,
275
+ shiftSuper: <K extends BaseKey>(key: K) => `shift+super+${key}` as const,
276
+ superShift: <K extends BaseKey>(key: K) => `super+shift+${key}` as const,
277
+ altSuper: <K extends BaseKey>(key: K) => `alt+super+${key}` as const,
278
+ superAlt: <K extends BaseKey>(key: K) => `super+alt+${key}` as const,
279
+ ctrlShiftAlt: <K extends BaseKey>(key: K) => `ctrl+shift+alt+${key}` as const,
280
+ ctrlShiftSuper: <K extends BaseKey>(key: K) => `ctrl+shift+super+${key}` as const,
281
+ } as const;
282
+
189
283
  // =============================================================================
190
284
  // Kitty Protocol Parsing
191
285
  // =============================================================================