@zenbu-labs/pixel 0.0.13 → 0.0.15
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.
|
@@ -33,12 +33,12 @@ function handleDevtoolsKey(key) {
|
|
|
33
33
|
function Tab(props) {
|
|
34
34
|
const { id, label, active, rem } = props;
|
|
35
35
|
return ((0, jsx_runtime_1.jsx)(components_1.Box, { style: {
|
|
36
|
-
padding: { left: rem * 0.
|
|
36
|
+
padding: { left: rem * 0.95, right: rem * 0.95, top: rem * 0.5, bottom: rem * 0.5 },
|
|
37
37
|
background: active ? theme_1.theme.bg : undefined,
|
|
38
38
|
hoverBackground: active ? theme_1.theme.bg : theme_1.theme.chromeActive,
|
|
39
39
|
}, onClick: () => stores_1.devtoolsStore.update((s) => ({ ...s, tab: id })), children: (0, jsx_runtime_1.jsx)(components_1.Text, { style: {
|
|
40
40
|
color: active ? theme_1.theme.text : theme_1.theme.dim,
|
|
41
|
-
fontSize: rem * 0.
|
|
41
|
+
fontSize: rem * 0.82,
|
|
42
42
|
wrap: false,
|
|
43
43
|
}, children: label }) }));
|
|
44
44
|
}
|
|
@@ -48,7 +48,7 @@ function LogPanel(props) {
|
|
|
48
48
|
const { rem } = props;
|
|
49
49
|
const programBuffer = (0, store_1.useStore)(stores_1.consoleLogs.store);
|
|
50
50
|
const engineBuffer = (0, store_1.useStore)(stores_1.engineLogs.store);
|
|
51
|
-
const [source, setSource] = (0, react_1.useState)("
|
|
51
|
+
const [source, setSource] = (0, react_1.useState)("both");
|
|
52
52
|
const [filter, setFilter] = (0, react_1.useState)("");
|
|
53
53
|
const [level, setLevel] = (0, react_1.useState)("all");
|
|
54
54
|
const follow = (0, react_1.useRef)(true);
|
|
@@ -11,27 +11,27 @@ const theme_1 = require("./theme");
|
|
|
11
11
|
function Button(props) {
|
|
12
12
|
const { label, onClick, active, danger, rem } = props;
|
|
13
13
|
return ((0, jsx_runtime_1.jsx)(components_1.Box, { style: {
|
|
14
|
-
padding: { left: rem * 0.
|
|
14
|
+
padding: { left: rem * 0.7, right: rem * 0.7, top: rem * 0.4, bottom: rem * 0.4 },
|
|
15
15
|
cornerRadius: rem * 0.25,
|
|
16
16
|
background: active ? theme_1.theme.accentDim : undefined,
|
|
17
17
|
hoverBackground: active ? theme_1.theme.accentDim : theme_1.theme.hover,
|
|
18
18
|
border: active ? { width: 1, color: theme_1.theme.accent } : { width: 1, color: theme_1.theme.border },
|
|
19
19
|
}, onClick: onClick, children: (0, jsx_runtime_1.jsx)(components_1.Text, { style: {
|
|
20
20
|
color: danger ? theme_1.theme.danger : active ? theme_1.theme.accent : theme_1.theme.text,
|
|
21
|
-
fontSize: rem * 0.
|
|
21
|
+
fontSize: rem * 0.82,
|
|
22
22
|
wrap: false,
|
|
23
23
|
}, children: label }) }));
|
|
24
24
|
}
|
|
25
25
|
function Chip(props) {
|
|
26
26
|
const { label, onClick, active, color, rem } = props;
|
|
27
27
|
return ((0, jsx_runtime_1.jsx)(components_1.Box, { style: {
|
|
28
|
-
padding: { left: rem * 0.
|
|
28
|
+
padding: { left: rem * 0.6, right: rem * 0.6, top: rem * 0.38, bottom: rem * 0.38 },
|
|
29
29
|
cornerRadius: rem * 0.5,
|
|
30
30
|
background: active ? theme_1.theme.accentDim : theme_1.theme.chrome,
|
|
31
31
|
hoverBackground: onClick ? theme_1.theme.chromeActive : undefined,
|
|
32
32
|
}, onClick: onClick, children: (0, jsx_runtime_1.jsx)(components_1.Text, { style: {
|
|
33
33
|
color: color ?? (active ? theme_1.theme.accent : theme_1.theme.dim),
|
|
34
|
-
fontSize: rem * 0.
|
|
34
|
+
fontSize: rem * 0.8,
|
|
35
35
|
wrap: false,
|
|
36
36
|
}, children: label }) }));
|
|
37
37
|
}
|
|
@@ -39,8 +39,8 @@ function Toolbar(props) {
|
|
|
39
39
|
return ((0, jsx_runtime_1.jsx)(components_1.Box, { style: {
|
|
40
40
|
flexDirection: "row",
|
|
41
41
|
alignItems: "center",
|
|
42
|
-
gap: props.rem * 0.
|
|
43
|
-
padding: props.rem * 0.
|
|
42
|
+
gap: props.rem * 0.5,
|
|
43
|
+
padding: props.rem * 0.45,
|
|
44
44
|
background: theme_1.theme.panel,
|
|
45
45
|
border: { width: 0, color: theme_1.theme.border },
|
|
46
46
|
flexShrink: 0,
|
package/dist/react/index.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export interface RootOptions {
|
|
|
51
51
|
}) => void;
|
|
52
52
|
onPaste?: (text: string) => void;
|
|
53
53
|
onFocus?: (focused: boolean) => void;
|
|
54
|
+
onVisible?: (visible: boolean) => void;
|
|
54
55
|
onPasteImage?: (image: PastedImage) => void;
|
|
55
56
|
onEngineExit?: (error: string | null) => void;
|
|
56
57
|
onResize?: (size: {
|
package/dist/react/index.js
CHANGED
|
@@ -313,6 +313,9 @@ function createRoot(options = {}) {
|
|
|
313
313
|
case "focus":
|
|
314
314
|
options.onFocus?.(!!event.focused);
|
|
315
315
|
break;
|
|
316
|
+
case "visible":
|
|
317
|
+
options.onVisible?.(!!event.visible);
|
|
318
|
+
break;
|
|
316
319
|
case "devtools":
|
|
317
320
|
enableDevtools();
|
|
318
321
|
(0, controller_1.attachDevtools)(bridge);
|
package/dist/root.js
CHANGED
|
@@ -164,6 +164,7 @@ function createRoot(options = {}) {
|
|
|
164
164
|
options.onFocus?.(focused);
|
|
165
165
|
registry?.handleTerminalFocus(focused);
|
|
166
166
|
},
|
|
167
|
+
onVisible: (visible) => options.onVisible?.(visible),
|
|
167
168
|
onResize: (size) => {
|
|
168
169
|
const ratio = cellZoom.ratio(engineRoot.info);
|
|
169
170
|
if (registry) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenbu-labs/pixel",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"description": "[placeholder copy: Electron apps that render into your terminal pane]",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -58,10 +58,10 @@
|
|
|
58
58
|
"react": "^18.3.1"
|
|
59
59
|
},
|
|
60
60
|
"optionalDependencies": {
|
|
61
|
-
"@zenbu-labs/pixel-native-darwin-arm64": "0.0.
|
|
62
|
-
"@zenbu-labs/pixel-native-darwin-x64": "0.0.
|
|
63
|
-
"@zenbu-labs/pixel-native-linux-arm64": "0.0.
|
|
64
|
-
"@zenbu-labs/pixel-native-linux-x64": "0.0.
|
|
61
|
+
"@zenbu-labs/pixel-native-darwin-arm64": "0.0.15",
|
|
62
|
+
"@zenbu-labs/pixel-native-darwin-x64": "0.0.15",
|
|
63
|
+
"@zenbu-labs/pixel-native-linux-arm64": "0.0.15",
|
|
64
|
+
"@zenbu-labs/pixel-native-linux-x64": "0.0.15"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@types/node": "^22.0.0",
|