paintcannon-react 0.0.12 → 0.0.14

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.
Files changed (2) hide show
  1. package/README.md +17 -0
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -97,6 +97,21 @@ These components map to PaintCannon's DOM-like core API and support typed style
97
97
  props, bubbling events, forms, focus handling, controlled inputs, and mouse
98
98
  interactions. The subset of the React-DOM props they support is as follows:
99
99
 
100
+ Host component `onFocus` and `onBlur` are element focus events. Terminal
101
+ window/pane focus is exposed by the underlying PaintCannon instance as
102
+ `paintCannon.hasFocus` and app-level `focus`/`blur` events. The root returned
103
+ from `render()` includes that instance:
104
+
105
+ ```tsx
106
+ const app = render(<App />, { alternateScreen: true });
107
+
108
+ app.paintCannon.addEventListener("blur", () => {
109
+ // Dim or pause the app while the terminal is unfocused.
110
+ });
111
+ ```
112
+
113
+ Inside tmux, terminal focus reporting requires `set -g focus-events on`.
114
+
100
115
  ### Common props:
101
116
 
102
117
  All host components accept:
@@ -125,6 +140,8 @@ All host components accept these event props:
125
140
  both supported:
126
141
 
127
142
  - `display`
143
+ - `visibility` (accepts `"visible"` or `"hidden"`; hidden elements keep their
144
+ layout space but do not paint or receive hit tests)
128
145
  - `overflow`
129
146
  - `overflow-x` / `overflowX`
130
147
  - `overflow-y` / `overflowY`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "paintcannon-react",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
4
  "license": "ISC",
5
5
  "repository": {
6
6
  "type": "git",
@@ -36,7 +36,7 @@
36
36
  "scheduler": "^0.25.0"
37
37
  },
38
38
  "peerDependencies": {
39
- "paintcannon": "^0.0.12",
39
+ "paintcannon": "^0.0.14",
40
40
  "react": "^19.0.0"
41
41
  },
42
42
  "devDependencies": {