tinky 1.2.2 → 1.3.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.
@@ -8,6 +8,7 @@ import { StderrContext } from "../contexts/StderrContext.js";
8
8
  import { FocusContext } from "../contexts/FocusContext.js";
9
9
  import { ErrorOverview } from "./ErrorOverview.js";
10
10
  import { EventEmitter } from "../utils/event-emitter.js";
11
+ import { process } from "../utils/node-adapater.js";
11
12
  const tab = "\t";
12
13
  const shiftTab = "\u001B[Z";
13
14
  const escape = "\u001B";
@@ -40,6 +41,7 @@ export class App extends PureComponent {
40
41
  render() {
41
42
  return (_jsx(AppContext.Provider, { value: {
42
43
  exit: this.handleExit,
44
+ platform: process?.platform,
43
45
  }, children: _jsx(StdinContext.Provider, { value: {
44
46
  stdin: this.props.stdin,
45
47
  setRawMode: this.handleSetRawMode,
@@ -6,6 +6,10 @@ export interface AppProps {
6
6
  * Exit (unmount) the whole Tinky app.
7
7
  */
8
8
  readonly exit: (error?: Error) => void;
9
+ /**
10
+ * The platform the app is running on.
11
+ */
12
+ readonly platform?: string;
9
13
  }
10
14
  /**
11
15
  * `AppContext` is a React context that exposes a method to manually exit the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinky",
3
- "version": "1.2.2",
3
+ "version": "1.3.0",
4
4
  "description": "React for CLIs, re-imagined with the Taffy engine",
5
5
  "keywords": [
6
6
  "react",