hinacode 0.2.0-alpha.1 → 0.2.0-alpha.2

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.
@@ -4,7 +4,7 @@ import { homedir, hostname } from "node:os";
4
4
  import { dirname, delimiter, basename, join } from "node:path";
5
5
  import { fileURLToPath } from "node:url";
6
6
  import QRCode from "qrcode";
7
- import { S as Struct, e as effect, U as Updates, g as gen, u as unsupported, E as Events, t as tryPromise, d as decodeUnknownSync, m as make$1, s as suspend, r as repeat, a as spaced, f as forkScoped, T as Threads, W as Worktrees, b as Terminals, c as forEach, o as orElseSucceed, h as sync, i as isThreadBusy, j as String$1, v as void_, k as andThen, l as matchEffect, n as forkDetach, p as flatMap, q as UsageError, w as USAGE, x as parseCommand, y as serveConfig, z as hydratePath, A as make$2, B as makeAppLayer, C as autoUpdate, D as applyServeRelay, R as RemoteAccess, F as layer$1, G as provideMerge, H as mergeAll, I as layer$2, J as layer$3, K as noKeyring, L as layer$4, M as provide, N as succeed, O as MinimumLogLevel, P as Settings, Q as storedTunnel, V as isPortInUse, X as pairingUrl, Y as restartCommand } from "./chunks/shellPath-b-g7j5HA.js";
7
+ import { S as Struct, e as effect, U as Updates, g as gen, u as unsupported, E as Events, t as tryPromise, d as decodeUnknownSync, m as make$1, s as suspend, r as repeat, a as spaced, f as forkScoped, T as Threads, W as Worktrees, b as Terminals, c as forEach, o as orElseSucceed, h as sync, i as isThreadBusy, j as String$1, v as void_, k as andThen, l as matchEffect, n as forkDetach, p as flatMap, q as UsageError, w as USAGE, x as parseCommand, y as serveConfig, z as hydratePath, A as make$2, B as makeAppLayer, C as autoUpdate, D as applyServeRelay, R as RemoteAccess, F as layer$1, G as provideMerge, H as mergeAll, I as layer$2, J as layer$3, K as noKeyring, L as layer$4, M as provide, N as succeed, O as MinimumLogLevel, P as Settings, Q as storedTunnel, V as isPortInUse, X as pairingUrl, Y as restartCommand } from "./chunks/shellPath-B4T8uBcy.js";
8
8
  import { execFile } from "node:child_process";
9
9
  import { promisify } from "node:util";
10
10
  import "node:crypto";
package/out/main/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { existsSync, renameSync } from "node:fs";
2
2
  import { join, delimiter } from "node:path";
3
3
  import { pathToFileURL } from "node:url";
4
- import { Notification, nativeImage, BrowserWindow, ipcMain, app, shell, dialog, protocol, safeStorage, powerMonitor, Menu, net, session } from "electron";
5
- import { h as sync, Z as catchDefect, _ as succeed, $ as callback, a0 as timeoutOrElse, a1 as seconds, a2 as TaggedError, j as String$1, a3 as promise, t as tryPromise, a4 as EVENT_CHANNEL, a5 as RPC_CHANNEL, a6 as isTrustedSender, a7 as route, a8 as map, a9 as externalUrl, v as void_, aa as catch_, ab as logWarning, g as gen, u as unsupported, E as Events, ac as runFork, r as repeat, a as spaced, f as forkScoped, U as Updates, s as suspend, e as effect, ad as ignore, z as hydratePath, ae as ATTACHMENT_PROTOCOL, af as GITHUB_ASSET_PROTOCOL, ag as PROJECT_FILE_PROTOCOL, ah as decodeUnknownOption, ai as RpcMethods, N as succeed$1, aj as Keyring, A as make$1, B as makeAppLayer, p as flatMap, ak as Environments, al as isInside, am as githubAssetId, an as GitHub, ao as projectFileRequest, ap as Files, aq as BROWSER_PARTITION, ar as lockDownWebview, as as getOrUndefined, at as isAllowedNavigation } from "./chunks/shellPath-b-g7j5HA.js";
4
+ import { Notification, nativeImage, BrowserWindow, ipcMain, app, shell, dialog, nativeTheme, protocol, safeStorage, powerMonitor, Menu, net, session } from "electron";
5
+ import { h as sync, Z as catchDefect, _ as succeed, $ as callback, a0 as timeoutOrElse, a1 as seconds, a2 as TaggedError, j as String$1, a3 as promise, t as tryPromise, a4 as EVENT_CHANNEL, a5 as RPC_CHANNEL, a6 as isTrustedSender, a7 as route, a8 as map, a9 as externalUrl, v as void_, aa as catch_, ab as logWarning, g as gen, u as unsupported, E as Events, ac as runFork, r as repeat, a as spaced, f as forkScoped, U as Updates, s as suspend, e as effect, ad as ignore, z as hydratePath, ae as ATTACHMENT_PROTOCOL, af as GITHUB_ASSET_PROTOCOL, ag as PROJECT_FILE_PROTOCOL, ah as decodeUnknownOption, ai as RpcMethods, N as succeed$1, aj as Keyring, A as make$1, B as makeAppLayer, p as flatMap, ak as Environments, al as isInside, am as githubAssetId, an as GitHub, ao as projectFileRequest, ap as Files, aq as BROWSER_PARTITION, ar as LIQUID_GLASS_ARGUMENT, as as lockDownWebview, at as getOrUndefined, au as isAllowedNavigation } from "./chunks/shellPath-B4T8uBcy.js";
6
6
  import { createRequire } from "node:module";
7
7
  import { execFile, spawn } from "node:child_process";
8
8
  import { access } from "node:fs/promises";
@@ -29,10 +29,10 @@ import "node:stream/promises";
29
29
  import "node:zlib";
30
30
  import "node:net";
31
31
  import "node:tls";
32
- const require$1 = createRequire(import.meta.url);
32
+ const require$2 = createRequire(import.meta.url);
33
33
  const notificationPermission = sync(() => {
34
34
  if (process.platform !== "darwin") return "unknown";
35
- const { getAuthStatus } = require$1("node-mac-permissions");
35
+ const { getAuthStatus } = require$2("node-mac-permissions");
36
36
  const status = getAuthStatus("notifications");
37
37
  switch (status) {
38
38
  case "authorized":
@@ -137,6 +137,9 @@ const desktopCalls = (window) => ({
137
137
  focus: sync(() => {
138
138
  if (window) bringToFront(window);
139
139
  }),
140
+ setColorScheme: (scheme) => sync(() => {
141
+ nativeTheme.themeSource = scheme;
142
+ }),
140
143
  reveal: (path) => sync(() => shell.showItemInFolder(path)),
141
144
  openExternal: (url) => {
142
145
  const allowed = externalUrl(url);
@@ -182,6 +185,15 @@ const startResourceMonitor = (userData) => {
182
185
  }).on("error", (error) => console.error(`Resource monitor did not start: ${error.message}`)).unref();
183
186
  console.log(`Resource monitor log: ${log}`);
184
187
  };
188
+ const require$1 = createRequire(import.meta.url);
189
+ const liquidGlass = (() => {
190
+ if (process.platform !== "darwin") return void 0;
191
+ try {
192
+ return require$1("electron-liquid-glass");
193
+ } catch {
194
+ return void 0;
195
+ }
196
+ })();
185
197
  const CHECK_INTERVAL = "4 hours";
186
198
  const make = gen(function* () {
187
199
  const current = app.getVersion();
@@ -321,7 +333,8 @@ const createWindow = () => {
321
333
  minWidth: 720,
322
334
  minHeight: 480,
323
335
  show: false,
324
- backgroundColor: "#0a0a0a",
336
+ // The glass draws behind the web contents, so the window itself must be clear.
337
+ ...liquidGlass ? { transparent: true, backgroundColor: "#00000000" } : { backgroundColor: "#0a0a0a" },
325
338
  title: "HinaCode",
326
339
  icon,
327
340
  // The renderer draws its own title bar around the traffic lights (see TitleBar.tsx).
@@ -330,9 +343,11 @@ const createWindow = () => {
330
343
  preload: join(import.meta.dirname, "../preload/index.cjs"),
331
344
  sandbox: true,
332
345
  contextIsolation: true,
333
- webviewTag: true
346
+ webviewTag: true,
347
+ additionalArguments: liquidGlass ? [LIQUID_GLASS_ARGUMENT] : []
334
348
  }
335
349
  });
350
+ liquidGlass?.addView(window.getNativeWindowHandle());
336
351
  window.webContents.setWindowOpenHandler(({ url }) => {
337
352
  const external = externalUrl(url);
338
353
  if (external) void shell.openExternal(external);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hinacode",
3
- "version": "0.2.0-alpha.1",
3
+ "version": "0.2.0-alpha.2",
4
4
  "description": "Run coding agents on this machine and drive them from the HinaCode desktop or phone app",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -73,6 +73,7 @@
73
73
  "@pierre/diffs": "1.5.2",
74
74
  "@playwright/test": "1.64.0",
75
75
  "@pulls.review/core": "0.3.4",
76
+ "@tailwindcss/typography": "0.5.20",
76
77
  "@tailwindcss/vite": "4.3.3",
77
78
  "@tanstack/react-hotkeys": "0.13.0",
78
79
  "@tanstack/react-router": "1.170.42",