@hanzo/app 0.3.89 → 0.3.90

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.
@@ -17,7 +17,14 @@ import { called } from '../team.js';
17
17
  import { VaultDialog, readVault } from '../vault.js';
18
18
  import { actComputer, bootOrResumeComputer, disk, findBotComputer, grant, parkComputer, updateBotMeta, } from './api.js';
19
19
  import { CLIP, PILL, WORD } from './kit.js';
20
- import { DIM, FLOOR, INK, LINE, PICKED, RAISED } from './ink.js';
20
+ import { DIM } from './ink.js';
21
+ // Always-dark translucent surfaces inside the pure-black desktop window chrome,
22
+ // invariant across light and dark page themes.
23
+ const FLOOR = 'var(--white-05)';
24
+ const RAISED = 'var(--white-08)';
25
+ const PICKED = 'var(--white-16)';
26
+ const LINE = 'var(--white-15)';
27
+ const INK = 'var(--pure-white)';
21
28
  function PulsingCluster({ label }) {
22
29
  const [step, setStep] = useState(0);
23
30
  useEffect(() => {
@@ -326,7 +333,7 @@ export function ComputerDialog({ open, onOpenChange, bot, box, onUpdated, }) {
326
333
  : t('Manage Vault & Password Managers…') }) })] })] }), _jsx(XStack, { render: "button", type: 'button', "aria-label": t('Paste clipboard to desktop'), onClick: () => void pasteClipboardToDesktop(), width: 26, height: 26, rounded: 999, items: "center", justify: "center", bg: "transparent", borderWidth: 0, cursor: "pointer", hoverStyle: { bg: RAISED }, children: _jsx(ClipboardPaste, { size: 13, color: "var(--pure-white)", opacity: 0.7, "aria-hidden": true }) }), _jsx(XStack, { render: "button", type: 'button', "aria-label": t('Capture screenshot'), onClick: () => void captureScreenshot(), width: 26, height: 26, rounded: 999, items: "center", justify: "center", bg: "transparent", borderWidth: 0, cursor: "pointer", hoverStyle: { bg: RAISED }, children: _jsx(Camera, { size: 13, color: "var(--pure-white)", opacity: 0.7, "aria-hidden": true }) }), _jsx(XStack, { render: "button", type: 'button', "aria-label": t('Reconnect stream'), onClick: () => {
327
334
  setSnapDataUrl(null);
328
335
  void openStream(activeBox.id, mode, control === 'watching');
329
- }, width: 26, height: 26, rounded: 999, items: "center", justify: "center", bg: "transparent", borderWidth: 0, cursor: "pointer", hoverStyle: { bg: RAISED }, children: _jsx(RefreshCw, { size: 13, color: "var(--pure-white)", opacity: 0.7, "aria-hidden": true }) }), frameUrl ? (_jsx(XStack, { render: "button", type: 'button', "aria-label": t('Open stream in new tab'), onClick: () => window.open(frameUrl, '_blank', 'noopener,noreferrer'), width: 26, height: 26, rounded: 999, items: "center", justify: "center", bg: "transparent", borderWidth: 0, cursor: "pointer", hoverStyle: { bg: RAISED }, children: _jsx(ExternalLink, { size: 13, color: "var(--pure-white)", opacity: 0.7, "aria-hidden": true }) })) : null, _jsxs(XStack, { render: "button", type: 'button', "aria-label": t('Park desktop'), disabled: busy, onClick: () => void handlePark(), height: 26, px: 9, gap: 4, rounded: 999, items: "center", bg: RAISED, borderWidth: 1, borderColor: LINE, cursor: "pointer", children: [_jsx(Pause, { size: 11, color: "var(--pure-white)", "aria-hidden": true }), _jsx(Text, { fontSize: 11, lineHeight: 15, color: "var(--pure-white)", opacity: 0.85, children: t('Park') })] })] })) : null, _jsx(XStack, { render: "button", type: 'button', "aria-label": expanded ? t('Collapse window') : t('Expand window'), onClick: () => setExpanded((v) => !v), width: 28, height: 28, rounded: 8, items: "center", justify: "center", bg: "transparent", borderWidth: 0, cursor: "pointer", hoverStyle: { bg: RAISED }, children: expanded ? (_jsx(Minimize2, { size: 14, color: "var(--pure-white)", opacity: 0.65, "aria-hidden": true })) : (_jsx(Maximize2, { size: 14, color: "var(--pure-white)", opacity: 0.65, "aria-hidden": true })) })] })] }), _jsx(YStack, { flex: 1, minH: 0, px: 10, pt: 4, pb: showBottomBar ? 0 : 12, items: "center", justify: "center", children: phase === 'starting' && !frameUrl ? (_jsx(YStack, { flex: 1, width: "100%", items: "center", justify: "center", children: _jsx(PulsingCluster, { label: t('Starting desktop') }) })) : phase === 'parked' || (!awake && !busy && !frameUrl) ? (_jsxs(YStack, { flex: 1, width: "100%", rounded: 12, borderWidth: 1, borderColor: LINE, bg: FLOOR, items: "center", justify: "center", gap: 14, px: 24, children: [_jsx(Text, { fontSize: 16, lineHeight: 22, fontWeight: "600", color: "var(--pure-white)", text: "center", children: phase === 'parked' ? t('Desktop is parked') : t('{name}’s resumable desktop', { name: displayName }) }), _jsx(Text, { fontSize: 13, lineHeight: 19, maxW: 440, color: "var(--pure-white)", opacity: 0.62, text: "center", children: t('Persistent home volume preserves open files, browser sessions, and tools across sleep/wake cycles.') }), error ? (_jsx(Text, { role: "alert", fontSize: 12, lineHeight: 17, color: "var(--pure-white)", opacity: 0.75, text: "center", children: error })) : null, _jsxs(XStack, { ...PILL, bg: "var(--pure-white)", borderColor: "var(--pure-white)", disabled: busy, onClick: () => void startOrResume(true), children: [_jsx(Play, { size: 13, color: "var(--pure-black)", "aria-hidden": true }), _jsx(Text, { ...WORD, color: "var(--pure-black)", children: phase === 'parked' ? t('Resume desktop') : t('Start desktop') })] })] })) : (_jsx(YStack, { flex: 1, width: "100%", rounded: 10, borderWidth: 1, borderColor: LINE, bg: FLOOR, overflow: "hidden", position: "relative", items: "center", justify: "center", children: snapDataUrl ? (_jsxs(YStack, { width: "100%", height: "100%", items: "center", justify: "center", position: "relative", children: [_jsx(YStack, { render: "img", src: snapDataUrl, alt: `${displayName} desktop screenshot`, maxW: "100%", maxH: "100%", objectFit: "contain" }), _jsx(XStack, { position: "absolute", t: 12, r: 12, children: _jsx(XStack, { ...PILL, height: 30, px: 12, onClick: () => setSnapDataUrl(null), children: _jsx(Text, { fontSize: 12, lineHeight: 16, color: INK, children: t('Back to live desktop') }) }) })] })) : frameUrl ? (_jsx(YStack, { ref: iframeRef, render: "iframe", src: frameUrl,
336
+ }, width: 26, height: 26, rounded: 999, items: "center", justify: "center", bg: "transparent", borderWidth: 0, cursor: "pointer", hoverStyle: { bg: RAISED }, children: _jsx(RefreshCw, { size: 13, color: "var(--pure-white)", opacity: 0.7, "aria-hidden": true }) }), frameUrl ? (_jsx(XStack, { render: "button", type: 'button', "aria-label": t('Open stream in new tab'), onClick: () => window.open(frameUrl, '_blank', 'noopener,noreferrer'), width: 26, height: 26, rounded: 999, items: "center", justify: "center", bg: "transparent", borderWidth: 0, cursor: "pointer", hoverStyle: { bg: RAISED }, children: _jsx(ExternalLink, { size: 13, color: "var(--pure-white)", opacity: 0.7, "aria-hidden": true }) })) : null, _jsxs(XStack, { render: "button", type: 'button', "aria-label": t('Park desktop'), disabled: busy, onClick: () => void handlePark(), height: 26, px: 9, gap: 4, rounded: 999, items: "center", bg: RAISED, borderWidth: 1, borderColor: LINE, cursor: "pointer", children: [_jsx(Pause, { size: 11, color: "var(--pure-white)", "aria-hidden": true }), _jsx(Text, { fontSize: 11, lineHeight: 15, color: "var(--pure-white)", opacity: 0.85, children: t('Park') })] })] })) : null, _jsx(XStack, { render: "button", type: 'button', "aria-label": expanded ? t('Collapse window') : t('Expand window'), onClick: () => setExpanded((v) => !v), width: 28, height: 28, rounded: 8, items: "center", justify: "center", bg: "transparent", borderWidth: 0, cursor: "pointer", hoverStyle: { bg: RAISED }, children: expanded ? (_jsx(Minimize2, { size: 14, color: "var(--pure-white)", opacity: 0.65, "aria-hidden": true })) : (_jsx(Maximize2, { size: 14, color: "var(--pure-white)", opacity: 0.65, "aria-hidden": true })) })] })] }), _jsx(YStack, { flex: 1, minH: 0, px: 10, pt: 4, pb: showBottomBar ? 0 : 12, items: "center", justify: "center", children: phase === 'starting' && !frameUrl ? (_jsx(YStack, { flex: 1, width: "100%", items: "center", justify: "center", children: _jsx(PulsingCluster, { label: t('Starting desktop') }) })) : phase === 'parked' || (!awake && !busy && !frameUrl) ? (_jsxs(YStack, { flex: 1, width: "100%", rounded: 12, borderWidth: 1, borderColor: LINE, bg: FLOOR, items: "center", justify: "center", gap: 14, px: 24, children: [_jsx(Text, { fontSize: 16, lineHeight: 22, fontWeight: "600", color: "var(--pure-white)", text: "center", children: phase === 'parked' ? t('Desktop is parked') : t('{name}’s resumable desktop', { name: displayName }) }), _jsx(Text, { fontSize: 13, lineHeight: 19, maxW: 440, color: "var(--pure-white)", opacity: 0.62, text: "center", children: t('Persistent home volume preserves open files, browser sessions, and tools across sleep/wake cycles.') }), error ? (_jsx(Text, { role: "alert", fontSize: 12, lineHeight: 17, color: "var(--pure-white)", opacity: 0.75, text: "center", children: error })) : null, _jsxs(XStack, { ...PILL, bg: "var(--pure-white)", borderColor: "var(--pure-white)", disabled: busy, onClick: () => void startOrResume(true), children: [_jsx(Play, { size: 13, color: "var(--pure-black)", "aria-hidden": true }), _jsx(Text, { ...WORD, color: "var(--pure-black)", children: phase === 'parked' ? t('Resume desktop') : t('Start desktop') })] })] })) : (_jsx(YStack, { flex: 1, width: "100%", rounded: 10, borderWidth: 1, borderColor: LINE, bg: FLOOR, overflow: "hidden", position: "relative", items: "center", justify: "center", children: snapDataUrl ? (_jsxs(YStack, { width: "100%", height: "100%", items: "center", justify: "center", position: "relative", children: [_jsx(YStack, { render: "img", src: snapDataUrl, alt: `${displayName} desktop screenshot`, maxW: "100%", maxH: "100%", objectFit: "contain" }), _jsx(XStack, { position: "absolute", t: 12, r: 12, children: _jsx(XStack, { ...PILL, height: 30, px: 12, bg: RAISED, borderColor: LINE, onClick: () => setSnapDataUrl(null), children: _jsx(Text, { fontSize: 12, lineHeight: 16, color: INK, children: t('Back to live desktop') }) }) })] })) : frameUrl ? (_jsx(YStack, { ref: iframeRef, render: "iframe", src: frameUrl,
330
337
  title: `${displayName} desktop ${mode}`,
331
338
  allow: 'clipboard-read; clipboard-write; fullscreen', width: "100%", height: "100%", borderWidth: 0 })) : (_jsx(PulsingCluster, { label: t('Connecting') })) })) }), promptOpen && awake ? (_jsx(YStack, { px: 16, pt: 10, gap: 8, children: _jsxs(XStack, { render: "form", onSubmit: (e) => void submitComputerTask(e), gap: 8, items: "center", children: [_jsx(Input, { unstyled: true, autoFocus: true, value: task, onChange: (e) => setTask(e.target.value), placeholder: t('Tell {name} what to do on this desktop (e.g., "Log in with my GitHub vault credentials and review open PRs")…', { name: displayName }), "aria-label": t('Co-work with {name} on desktop', { name: displayName }), flex: 1, height: 36, px: 14, rounded: 999, bg: RAISED, borderWidth: 1, borderColor: LINE, color: INK, fontSize: 13, placeholderTextColor: "$placeholderColor" }), _jsxs(XStack, { ...PILL, type: 'submit', height: 36, px: 14, bg: "var(--pure-white)", borderColor: "var(--pure-white)", disabled: !task.trim() || runningTask, opacity: !task.trim() || runningTask ? 0.5 : 1, children: [_jsx(Send, { size: 12, color: "var(--pure-black)", "aria-hidden": true }), _jsx(Text, { ...WORD, fontSize: 12, color: "var(--pure-black)", children: runningTask ? t('Working…') : t('Run on desktop') })] })] }) })) : null, showBottomBar ? (_jsxs(XStack, { height: 58, px: 16, items: "center", justify: "space-between", gap: 12, shrink: 0, children: [_jsx(XStack, { flex: 1, items: "center", gap: 8, minW: 0, children: error ? (_jsx(Text, { ...CLIP, role: "alert", fontSize: 12, lineHeight: 16, color: "var(--pure-white)", opacity: 0.75, children: error })) : statusToast ? (_jsx(Text, { ...CLIP, fontSize: 12, lineHeight: 16, color: "var(--pure-white)", opacity: 0.68, children: statusToast })) : null }), _jsxs(XStack, { "data-parity-key": "bots.computer.control-pill", height: 38, pl: 14, pr: 5, gap: 12, rounded: 999, items: "center", bg: RAISED, borderWidth: 1, borderColor: LINE, children: [_jsxs(XStack, { items: "center", gap: 7, children: [control === 'watching' ? (_jsx(Eye, { size: 14, color: "var(--pure-white)", opacity: 0.75, "aria-hidden": true })) : (_jsx(MousePointerClick, { size: 14, color: "var(--state-online)", "aria-hidden": true })), _jsx(Text, { fontSize: 13, lineHeight: 18, fontWeight: "500", color: "var(--pure-white)", opacity: 0.88, children: control === 'watching' ? t('Watching') : t('In control') })] }), control === 'watching' ? (_jsx(XStack, { render: "button", type: 'button', onClick: () => toggleControl('controlling'), height: 28, px: 13, rounded: 999, items: "center", justify: "center", bg: "var(--pure-white)", borderWidth: 0, cursor: "pointer", children: _jsx(Text, { fontSize: 12, lineHeight: 16, fontWeight: "600", color: "var(--pure-black)", children: t('Take control') }) })) : (_jsx(XStack, { render: "button", type: 'button', onClick: () => toggleControl('watching'), height: 28, px: 13, rounded: 999, items: "center", justify: "center", bg: PICKED, borderWidth: 1, borderColor: LINE, cursor: "pointer", children: _jsx(Text, { fontSize: 12, lineHeight: 16, fontWeight: "500", color: "var(--pure-white)", children: t('Watch only') }) }))] }), _jsx(XStack, { flex: 1, items: "center", justify: "flex-end", gap: 8, children: awake ? (_jsxs(XStack, { render: "button", type: 'button', onClick: () => setPromptOpen((v) => !v), height: 30, px: 11, gap: 6, rounded: 999, items: "center", bg: promptOpen ? PICKED : 'transparent', borderWidth: 1, borderColor: promptOpen ? LINE : 'transparent', cursor: "pointer", hoverStyle: { bg: RAISED }, children: [_jsx(Sparkles, { size: 12, color: "var(--pure-white)", opacity: 0.78, "aria-hidden": true }), _jsx(Text, { fontSize: 12, lineHeight: 16, color: "var(--pure-white)", opacity: 0.78, children: runningTask ? t('{name} working…', { name: displayName }) : t('Work with {name}', { name: displayName }) })] })) : null })] })) : null] }) }) }), _jsx(VaultDialog, { open: vaultOpen, onOpenChange: (next) => {
332
339
  setVaultOpen(next);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/app",
3
- "version": "0.3.89",
3
+ "version": "0.3.90",
4
4
  "description": "Hanzo's app: the shell and its apps (Home, Chat, Inbox, Contacts, Meet, Calendar, Drive, Board, Work, Bots), once, for every Hanzo surface.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",