@hanzo/app 0.3.93 → 0.3.95
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.
- package/dist/Account.d.ts +9 -3
- package/dist/Account.js +142 -141
- package/dist/App.js +71 -37
- package/dist/Bar.js +1 -1
- package/dist/Betas.d.ts +1 -1
- package/dist/Betas.js +16 -22
- package/dist/Board.js +113 -47
- package/dist/CalScheduler.d.ts +1 -0
- package/dist/CalScheduler.js +223 -57
- package/dist/Chat.js +432 -153
- package/dist/Contacts.js +35 -31
- package/dist/ContextMenu.js +126 -42
- package/dist/Directory.js +1 -1
- package/dist/Drawer.js +1 -1
- package/dist/Drive.js +351 -119
- package/dist/Gate.js +156 -13
- package/dist/Home.js +31 -53
- package/dist/Inbox.js +29 -15
- package/dist/InlineRename.d.ts +6 -0
- package/dist/InlineRename.js +41 -0
- package/dist/Learning.js +132 -13
- package/dist/Market.js +13 -9
- package/dist/Meet.d.ts +5 -0
- package/dist/Meet.js +75 -51
- package/dist/MoreMenu.d.ts +19 -0
- package/dist/MoreMenu.js +33 -0
- package/dist/NeedMoreUsage.js +2 -2
- package/dist/OrgSwitcher.js +6 -2
- package/dist/Rail.d.ts +73 -7
- package/dist/Rail.js +372 -111
- package/dist/Recents.js +77 -24
- package/dist/RightPane.js +2 -2
- package/dist/Search.d.ts +13 -1
- package/dist/Search.js +366 -50
- package/dist/Setup.js +34 -5
- package/dist/Shared.js +12 -12
- package/dist/Shell.js +210 -151
- package/dist/Sidebar.d.ts +14 -3
- package/dist/Sidebar.js +411 -129
- package/dist/SkipLink.d.ts +8 -0
- package/dist/SkipLink.js +11 -0
- package/dist/Start.js +51 -52
- package/dist/Terminals.js +159 -11
- package/dist/ToBottom.js +1 -1
- package/dist/Upgrade.d.ts +8 -3
- package/dist/Upgrade.js +194 -103
- package/dist/Usage.d.ts +1 -1
- package/dist/Usage.js +186 -82
- package/dist/WalletPill.js +8 -2
- package/dist/Work.js +162 -53
- package/dist/archive.d.ts +8 -0
- package/dist/archive.js +16 -0
- package/dist/bots/Bots.js +1 -1
- package/dist/bots/ComputerDialog.js +53 -26
- package/dist/bots/ConnectorsDialog.js +34 -15
- package/dist/bots/Make.js +5 -1
- package/dist/bots/Panel.js +37 -31
- package/dist/bots/Roster.js +18 -13
- package/dist/bots/Thread.js +54 -27
- package/dist/bots/face.js +6 -2
- package/dist/bots/kit.d.ts +1 -0
- package/dist/bots/kit.js +1 -1
- package/dist/bots/refusal.d.ts +13 -4
- package/dist/bots/refusal.js +62 -8
- package/dist/chord.d.ts +13 -0
- package/dist/chord.js +30 -1
- package/dist/crew.js +47 -4
- package/dist/ground.d.ts +1 -1
- package/dist/ground.js +1 -1
- package/dist/help.d.ts +7 -3
- package/dist/help.js +19 -14
- package/dist/keys.d.ts +28 -0
- package/dist/keys.js +58 -0
- package/dist/lib/arrival.d.ts +5 -0
- package/dist/lib/arrival.js +10 -0
- package/dist/lib/betas.d.ts +2 -0
- package/dist/lib/betas.js +10 -0
- package/dist/lib/branch.d.ts +11 -0
- package/dist/lib/branch.js +11 -0
- package/dist/lib/chatPreferences.d.ts +1 -1
- package/dist/lib/chatPreferences.js +1 -1
- package/dist/lib/dev-mode.d.ts +18 -0
- package/dist/lib/dev-mode.js +102 -0
- package/dist/lib/info-hint.d.ts +7 -0
- package/dist/lib/info-hint.js +8 -0
- package/dist/lib/model-picker.d.ts +2 -0
- package/dist/lib/model-picker.js +12 -0
- package/dist/lib/owners.d.ts +5 -0
- package/dist/lib/owners.js +15 -0
- package/dist/lib/pay.d.ts +2 -0
- package/dist/lib/pay.js +4 -0
- package/dist/lib/todo.d.ts +6 -0
- package/dist/lib/todo.js +37 -25
- package/dist/look.js +39 -8
- package/dist/rail-open.d.ts +9 -0
- package/dist/rail-open.js +34 -0
- package/dist/renaming.d.ts +10 -0
- package/dist/renaming.js +25 -0
- package/dist/thread.d.ts +2 -1
- package/dist/thread.js +85 -44
- package/package.json +11 -11
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
import type { Thread } from '@hanzo/ai';
|
|
3
|
+
/**
|
|
4
|
+
* The two ways out of renaming a conversation in its row: save and cancel. Either one closes the field and puts
|
|
5
|
+
* focus back on the row it stood in, so the keyboard is not left on nothing; only a changed, non-empty title is sent.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useRenaming(from: RefObject<HTMLElement | null>, close: (id: null) => void, rename: (thread: Thread, title: string) => void, untitled: string): {
|
|
8
|
+
commit: (thread: Thread, next: string) => void;
|
|
9
|
+
cancel: () => void;
|
|
10
|
+
};
|
package/dist/renaming.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useCallback } from 'react';
|
|
2
|
+
import { tidy } from './lib/title.js';
|
|
3
|
+
/**
|
|
4
|
+
* The two ways out of renaming a conversation in its row: save and cancel. Either one closes the field and puts
|
|
5
|
+
* focus back on the row it stood in, so the keyboard is not left on nothing; only a changed, non-empty title is sent.
|
|
6
|
+
*/
|
|
7
|
+
export function useRenaming(from, close, rename, untitled) {
|
|
8
|
+
const refocus = useCallback(() => {
|
|
9
|
+
requestAnimationFrame(() => {
|
|
10
|
+
if (from.current?.isConnected)
|
|
11
|
+
from.current.focus();
|
|
12
|
+
});
|
|
13
|
+
}, [from]);
|
|
14
|
+
const cancel = useCallback(() => {
|
|
15
|
+
close(null);
|
|
16
|
+
refocus();
|
|
17
|
+
}, [close, refocus]);
|
|
18
|
+
const commit = useCallback((thread, next) => {
|
|
19
|
+
cancel();
|
|
20
|
+
const trimmed = next.trim();
|
|
21
|
+
if (trimmed && trimmed !== tidy(thread.title, 80, untitled))
|
|
22
|
+
rename(thread, trimmed);
|
|
23
|
+
}, [cancel, rename, untitled]);
|
|
24
|
+
return { commit, cancel };
|
|
25
|
+
}
|
package/dist/thread.d.ts
CHANGED
|
@@ -35,12 +35,13 @@ export declare const href: (id: string) => string;
|
|
|
35
35
|
* task that runs itself.
|
|
36
36
|
*/
|
|
37
37
|
export type ThreadActions = ReturnType<typeof useThreadActions>;
|
|
38
|
-
export declare function ConversationMenu({ threads, active, onGone, onSchedule, customActions, hrefOf, primary, children, }: {
|
|
38
|
+
export declare function ConversationMenu({ threads, active, onGone, onSchedule, customActions, canShare, hrefOf, primary, children, }: {
|
|
39
39
|
threads: Map<string, Thread>;
|
|
40
40
|
active?: string | null;
|
|
41
41
|
onGone?: () => void;
|
|
42
42
|
onSchedule?: (t: Thread) => void;
|
|
43
43
|
customActions?: ThreadActions;
|
|
44
|
+
canShare?: boolean;
|
|
44
45
|
hrefOf?: (id: string) => string;
|
|
45
46
|
primary?: boolean;
|
|
46
47
|
children: ReactElement;
|
package/dist/thread.js
CHANGED
|
@@ -22,6 +22,9 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
22
22
|
// device they sign in on.
|
|
23
23
|
import { useI18n } from '@hanzo/i18n/react';
|
|
24
24
|
import { tidy } from './lib/title.js';
|
|
25
|
+
import { InlineRename } from './InlineRename.js';
|
|
26
|
+
import { archiveWithUndo } from './archive.js';
|
|
27
|
+
import { useRenaming } from './renaming.js';
|
|
25
28
|
import { createContext, useCallback, useContext, useEffect, useId, useMemo, useRef, useState, useSyncExternalStore, } from 'react';
|
|
26
29
|
import { useAi } from '@hanzo/ai/react';
|
|
27
30
|
import { Archive, ArchiveRestore, Check, CheckSquare, Clock, ExternalLink, FolderInput, Link2, MoreHorizontal, Pencil, Pin, PinOff, Share2, Trash2, X } from 'lucide-react';
|
|
@@ -155,6 +158,10 @@ async function copy(id, t, toUrl = href) {
|
|
|
155
158
|
const DANGER = BAD;
|
|
156
159
|
const mac = () => typeof navigator !== 'undefined' && /Mac|iPhone|iPad|iPod/.test(navigator.platform || navigator.userAgent);
|
|
157
160
|
const Rows = createContext(null);
|
|
161
|
+
/** A menu's rows in page order: the rows that carry its id. */
|
|
162
|
+
function listRows(list) {
|
|
163
|
+
return typeof document === 'undefined' ? [] : [...document.querySelectorAll(`[data-thread][data-menu-of="${CSS.escape(list)}"]`)];
|
|
164
|
+
}
|
|
158
165
|
const keyed = new Set();
|
|
159
166
|
/**
|
|
160
167
|
* A keydown anywhere on the page, before anything inside it handles it (an
|
|
@@ -187,7 +194,7 @@ function listen(keys) {
|
|
|
187
194
|
}
|
|
188
195
|
/** The element of a row that takes focus: the row itself, a button. */
|
|
189
196
|
const own = (row) => row?.querySelector('[data-slot="sidebar-item"], [role="button"]') ?? null;
|
|
190
|
-
export function ConversationMenu({ threads, active = null, onGone = empty, onSchedule, customActions, hrefOf = href, primary = true, children, }) {
|
|
197
|
+
export function ConversationMenu({ threads, active = null, onGone = empty, onSchedule, customActions, canShare = !customActions, hrefOf = href, primary = true, children, }) {
|
|
191
198
|
const { t } = useI18n();
|
|
192
199
|
const defaultAct = useThreadActions();
|
|
193
200
|
const act = customActions ?? defaultAct;
|
|
@@ -198,6 +205,7 @@ export function ConversationMenu({ threads, active = null, onGone = empty, onSch
|
|
|
198
205
|
const list = useId();
|
|
199
206
|
const [menu, setMenu] = useState(null);
|
|
200
207
|
const [dialogue, setDialogue] = useState(null);
|
|
208
|
+
const [renaming, setRenaming] = useState(null);
|
|
201
209
|
const [selected, setSelected] = useState(() => new Set());
|
|
202
210
|
const [selectMode, setSelectMode] = useState(false);
|
|
203
211
|
const [organizeGroup, setOrganizeGroup] = useState('');
|
|
@@ -207,10 +215,12 @@ export function ConversationMenu({ threads, active = null, onGone = empty, onSch
|
|
|
207
215
|
const didDragSelectRef = useRef(false);
|
|
208
216
|
const selecting = selectMode || selected.size > 0;
|
|
209
217
|
const orderedIds = useCallback(() => {
|
|
210
|
-
|
|
211
|
-
|
|
218
|
+
if (typeof document === 'undefined')
|
|
219
|
+
return [...threads.keys()];
|
|
220
|
+
const own = listRows(list);
|
|
221
|
+
if (!own.length)
|
|
212
222
|
return [...threads.keys()];
|
|
213
|
-
return
|
|
223
|
+
return own.map((el) => el.getAttribute('data-thread') ?? '').filter(Boolean);
|
|
214
224
|
}, [list, threads]);
|
|
215
225
|
const selectRange = useCallback((fromId, toId, additive = false) => {
|
|
216
226
|
const ids = orderedIds();
|
|
@@ -263,7 +273,7 @@ export function ConversationMenu({ threads, active = null, onGone = empty, onSch
|
|
|
263
273
|
const dy = Math.abs(e.clientY - dragStartYRef.current);
|
|
264
274
|
const hit = typeof document !== 'undefined' ? document.elementFromPoint(e.clientX, e.clientY)?.closest?.('[data-thread]') : null;
|
|
265
275
|
const hitId = hit?.getAttribute('data-thread') ?? null;
|
|
266
|
-
const inThisList = hit ?
|
|
276
|
+
const inThisList = hit ? hit.getAttribute('data-menu-of') === list : false;
|
|
267
277
|
if (dy > 6 || (hitId && inThisList && hitId !== startId)) {
|
|
268
278
|
didDragSelectRef.current = true;
|
|
269
279
|
window.getSelection?.()?.removeAllRanges?.();
|
|
@@ -318,6 +328,7 @@ export function ConversationMenu({ threads, active = null, onGone = empty, onSch
|
|
|
318
328
|
onGone();
|
|
319
329
|
});
|
|
320
330
|
}, [act, onGone]);
|
|
331
|
+
const archiveOne = useCallback((target) => archiveWithUndo(act, t, target), [act, t]);
|
|
321
332
|
const batchArchive = useCallback((targets) => {
|
|
322
333
|
if (!targets.length)
|
|
323
334
|
return;
|
|
@@ -325,8 +336,28 @@ export function ConversationMenu({ threads, active = null, onGone = empty, onSch
|
|
|
325
336
|
setSelectMode(false);
|
|
326
337
|
setSelected(new Set());
|
|
327
338
|
setMenu(null);
|
|
328
|
-
|
|
329
|
-
|
|
339
|
+
const toToggle = targets.filter((th) => Boolean(th.archived) === allArchived);
|
|
340
|
+
void Promise.all(toToggle.map((th) => act.archive(th))).then((results) => {
|
|
341
|
+
const succeeded = toToggle.filter((_, i) => results[i]);
|
|
342
|
+
if (!succeeded.length)
|
|
343
|
+
return;
|
|
344
|
+
if (!allArchived) {
|
|
345
|
+
const snapshots = succeeded.map((th) => ({ ...th, archived: true }));
|
|
346
|
+
toast(snapshots.length === 1 ? t('Archived chat') : t('Archived {n} chats', { n: snapshots.length }), {
|
|
347
|
+
duration: 5000,
|
|
348
|
+
action: {
|
|
349
|
+
label: t('Undo'),
|
|
350
|
+
onClick: () => {
|
|
351
|
+
void Promise.all(snapshots.map((th) => act.archive(th)));
|
|
352
|
+
},
|
|
353
|
+
},
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
else {
|
|
357
|
+
toast.success(succeeded.length === 1 ? t('Unarchived chat') : t('Unarchived {n} chats', { n: succeeded.length }));
|
|
358
|
+
}
|
|
359
|
+
});
|
|
360
|
+
}, [act, t]);
|
|
330
361
|
const batchPin = useCallback((targets) => {
|
|
331
362
|
if (!targets.length)
|
|
332
363
|
return;
|
|
@@ -395,11 +426,21 @@ export function ConversationMenu({ threads, active = null, onGone = empty, onSch
|
|
|
395
426
|
const from = useRef(null);
|
|
396
427
|
// What a right-click or a long-press landed on, before the menu decides to open.
|
|
397
428
|
const pointed = useRef(null);
|
|
398
|
-
const ask = useCallback((d,
|
|
399
|
-
setAimed(
|
|
429
|
+
const ask = useCallback((d, thread) => {
|
|
430
|
+
setAimed(thread.id);
|
|
400
431
|
setMenu(null);
|
|
432
|
+
if (d === 'rename' && typeof document !== 'undefined') {
|
|
433
|
+
const hasRow = listRows(list).some((el) => el.getAttribute('data-thread') === thread.id);
|
|
434
|
+
if (hasRow) {
|
|
435
|
+
setDialogue(null);
|
|
436
|
+
setRenaming(thread.id);
|
|
437
|
+
return;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
setRenaming(null);
|
|
401
441
|
setDialogue(d);
|
|
402
|
-
}, []);
|
|
442
|
+
}, [list]);
|
|
443
|
+
const { commit: commitRename, cancel: cancelRename } = useRenaming(from, setRenaming, (thread, title) => void act.rename(thread, title), t('Untitled'));
|
|
403
444
|
const aim = useCallback((t, el) => {
|
|
404
445
|
from.current = el;
|
|
405
446
|
setAimed(t.id);
|
|
@@ -437,7 +478,7 @@ export function ConversationMenu({ threads, active = null, onGone = empty, onSch
|
|
|
437
478
|
const keys = useRef(null);
|
|
438
479
|
keys.current = {
|
|
439
480
|
open: menu !== null,
|
|
440
|
-
held: dialogue !== null,
|
|
481
|
+
held: dialogue !== null || renaming !== null,
|
|
441
482
|
target: () => (menu !== null ? subject : active ? (threads.get(active) ?? null) : null),
|
|
442
483
|
act: (a, t) => {
|
|
443
484
|
// With no menu open, focus goes back to wherever the keys were pressed.
|
|
@@ -451,8 +492,12 @@ export function ConversationMenu({ threads, active = null, onGone = empty, onSch
|
|
|
451
492
|
};
|
|
452
493
|
useEffect(() => listen(keys), []);
|
|
453
494
|
const rows = useMemo(() => ({
|
|
495
|
+
list,
|
|
454
496
|
aim,
|
|
455
497
|
open: menu ? aimed : null,
|
|
498
|
+
renaming,
|
|
499
|
+
commitRename,
|
|
500
|
+
cancelRename,
|
|
456
501
|
selected,
|
|
457
502
|
selecting,
|
|
458
503
|
setSelectMode,
|
|
@@ -465,7 +510,7 @@ export function ConversationMenu({ threads, active = null, onGone = empty, onSch
|
|
|
465
510
|
toggleSelect,
|
|
466
511
|
clearSelect,
|
|
467
512
|
hrefOf,
|
|
468
|
-
}), [aim, menu, aimed, selected, selecting, active, selectRange, toggleSelect, clearSelect, hrefOf]);
|
|
513
|
+
}), [list, aim, menu, aimed, renaming, commitRename, cancelRename, selected, selecting, active, selectRange, toggleSelect, clearSelect, hrefOf]);
|
|
469
514
|
// The menu is named by its conversation: gui would name it by its trigger, the
|
|
470
515
|
// list itself for a right-click, and the ⋯ for the other.
|
|
471
516
|
const untitled = t('Untitled');
|
|
@@ -500,7 +545,7 @@ export function ConversationMenu({ threads, active = null, onGone = empty, onSch
|
|
|
500
545
|
},
|
|
501
546
|
{
|
|
502
547
|
key: 'batch-select-all',
|
|
503
|
-
label: allSelected ? t('Deselect
|
|
548
|
+
label: allSelected ? t('Deselect all') : t('Select all ({n})', { n: threads.size }),
|
|
504
549
|
icon: _jsx(CheckSquare, { size: 16, "aria-hidden": true }),
|
|
505
550
|
shortcut: apple ? '⌘A' : 'Ctrl+A',
|
|
506
551
|
run: () => {
|
|
@@ -517,15 +562,6 @@ export function ConversationMenu({ threads, active = null, onGone = empty, onSch
|
|
|
517
562
|
shortcut: 'Esc',
|
|
518
563
|
run: () => clearSelect(),
|
|
519
564
|
},
|
|
520
|
-
{ key: 'gone', line: true },
|
|
521
|
-
{
|
|
522
|
-
key: 'batch-delete',
|
|
523
|
-
label: t('Delete ({n})', { n: selectedThreads.length }),
|
|
524
|
-
icon: _jsx(Trash2, { size: 16, color: DANGER, "aria-hidden": true }),
|
|
525
|
-
shortcut: '⌫',
|
|
526
|
-
destructive: true,
|
|
527
|
-
run: () => batchRemove(selectedThreads),
|
|
528
|
-
},
|
|
529
565
|
]
|
|
530
566
|
: subject
|
|
531
567
|
? [
|
|
@@ -545,7 +581,7 @@ export function ConversationMenu({ threads, active = null, onGone = empty, onSch
|
|
|
545
581
|
keys: named('pin'),
|
|
546
582
|
run: () => void act.pin(subject),
|
|
547
583
|
},
|
|
548
|
-
{ key: 'share', label: t('Share…'), icon: _jsx(Share2, { size: 16, "aria-hidden": true }), run: () => ask('share', subject) },
|
|
584
|
+
...(canShare ? [{ key: 'share', label: t('Share…'), icon: _jsx(Share2, { size: 16, "aria-hidden": true }), run: () => ask('share', subject) }] : []),
|
|
549
585
|
...(onSchedule ? [{ key: 'schedule', label: t('Schedule…'), icon: _jsx(Clock, { size: 16, "aria-hidden": true }), run: () => onSchedule(subject) }] : []),
|
|
550
586
|
{ key: 'copy', label: t('Copy link'), icon: _jsx(Link2, { size: 16, "aria-hidden": true }), run: () => void copy(subject.id, t, hrefOf) },
|
|
551
587
|
{ key: 'tab', label: t('Open in new tab'), icon: _jsx(ExternalLink, { size: 16, "aria-hidden": true }), run: () => away(subject.id, hrefOf) },
|
|
@@ -553,10 +589,10 @@ export function ConversationMenu({ threads, active = null, onGone = empty, onSch
|
|
|
553
589
|
key: 'archive',
|
|
554
590
|
label: t(subject.archived ? 'Unarchive' : 'Archive'),
|
|
555
591
|
icon: subject.archived ? _jsx(ArchiveRestore, { size: 16, "aria-hidden": true }) : _jsx(Archive, { size: 16, "aria-hidden": true }),
|
|
556
|
-
run: () => void
|
|
592
|
+
run: () => void archiveOne(subject),
|
|
557
593
|
},
|
|
558
594
|
{ key: 'gone', line: true },
|
|
559
|
-
{ key: 'delete', label: t('Delete'), icon: _jsx(Trash2, { size: 16,
|
|
595
|
+
{ key: 'delete', label: t('Delete'), icon: _jsx(Trash2, { size: 16, "aria-hidden": true }), run: () => ask('delete', subject) },
|
|
560
596
|
]
|
|
561
597
|
: [];
|
|
562
598
|
return (_jsxs(Rows.Provider, { value: rows, children: [_jsxs(DropdownMenu, { open: menu === 'dots', onOpenChange: (open) => setMenu(open ? 'dots' : null), children: [_jsxs(ContextMenu
|
|
@@ -581,22 +617,22 @@ export function ConversationMenu({ threads, active = null, onGone = empty, onSch
|
|
|
581
617
|
}, onContextMenu: point, onPointerDown: (e) => {
|
|
582
618
|
if (e.pointerType !== 'mouse')
|
|
583
619
|
point(e);
|
|
584
|
-
}, children: children }), _jsx(ContextMenuContent, { minW: 220, onCloseAutoFocus: back, "aria-labelledby": undefined, "aria-label": title, children: entries.map((one) => 'line' in one ? (_jsx(ContextMenuSeparator, {}, one.key)) : (_jsx(ContextMenuItem, { variant: one.destructive ? 'destructive' : 'default', "aria-keyshortcuts": one.keys, onSelect: one.run, children: _jsx(Face, { entry: one, Shortcut: ContextMenuShortcut }) }, one.key))) })] }), _jsx(DropdownMenuContent, { align: "end", minW: 220, onCloseAutoFocus: back, "aria-labelledby": undefined, "aria-label": title, children: entries.map((one) => 'line' in one ? (_jsx(DropdownMenuSeparator, {}, one.key)) : (_jsx(DropdownMenuItem, { variant: one.destructive ? 'destructive' : 'default', "aria-keyshortcuts": one.keys, onSelect: one.run, children: _jsx(Face, { entry: one, Shortcut: DropdownMenuShortcut }) }, one.key))) })] }), (primary && selecting) || (!primary && selected.size > 0) ? (_jsxs(YStack, { "data-slot": "batch-bar", gap: "$1.5", p: "$2", mt: "$2", rounded: "$4", bg: "$
|
|
620
|
+
}, children: children }), _jsx(ContextMenuContent, { minW: 220, onCloseAutoFocus: back, "aria-labelledby": undefined, "aria-label": title, children: entries.map((one) => 'line' in one ? (_jsx(ContextMenuSeparator, {}, one.key)) : (_jsx(ContextMenuItem, { variant: one.destructive ? 'destructive' : 'default', "aria-keyshortcuts": one.keys, onSelect: one.run, children: _jsx(Face, { entry: one, Shortcut: ContextMenuShortcut }) }, one.key))) })] }), _jsx(DropdownMenuContent, { align: "end", minW: 220, onCloseAutoFocus: back, "aria-labelledby": undefined, "aria-label": title, children: entries.map((one) => 'line' in one ? (_jsx(DropdownMenuSeparator, {}, one.key)) : (_jsx(DropdownMenuItem, { variant: one.destructive ? 'destructive' : 'default', "aria-keyshortcuts": one.keys, onSelect: one.run, children: _jsx(Face, { entry: one, Shortcut: DropdownMenuShortcut }) }, one.key))) })] }), (primary && selecting) || (!primary && selected.size > 0) ? (_jsxs(YStack, { "data-slot": "batch-bar", gap: "$1.5", p: "$2", mt: "$2", rounded: "$4", bg: "$panel", borderWidth: 1, borderColor: "var(--border-strong)",
|
|
585
621
|
// Pinned to the list's foot, over the rows (their marks sit at 2).
|
|
586
622
|
position: "sticky", b: 0, z: "var(--z-raised)", "$platform-web": {
|
|
587
623
|
backdropFilter: 'blur(16px)',
|
|
588
624
|
boxShadow: 'var(--shadow-lg)',
|
|
589
|
-
}, children: [_jsxs(XStack, { items: "center", justify: "space-between", px: "$1", children: [_jsx(XStack, { render: "button", cursor: "pointer",
|
|
625
|
+
}, children: [_jsxs(XStack, { items: "center", justify: "space-between", gap: "$2", px: "$1", children: [_jsx(XStack, { render: "button", ...{ type: 'button' }, cursor: "pointer", px: "$1.5", py: "$0.5", rounded: "$2", onClick: () => {
|
|
590
626
|
if (allSelected)
|
|
591
627
|
setSelected(new Set());
|
|
592
628
|
else
|
|
593
629
|
setSelected(new Set(orderedIds()));
|
|
594
|
-
}, hoverStyle: {
|
|
630
|
+
}, hoverStyle: { bg: '$hover' }, focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: 'var(--ring)' }, "$max-sm": { minH: 44, items: 'center' }, children: _jsx(SizableText, { size: "$1", fontWeight: "500", color: "$soft", children: allSelected ? t('Deselect all') : t('Select all') }) }), _jsx(SizableText, { size: "$1", fontWeight: "600", color: "$ink", numberOfLines: 1, children: t('{n} selected', { n: selectedThreads.length }) }), _jsx(XStack, { render: "button", ...{ type: 'button' }, "aria-label": t('Clear selection'), cursor: "pointer", px: "$1.5", py: "$0.5", rounded: "$2", onClick: clearSelect, hoverStyle: { bg: '$hover' }, focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: 'var(--ring)' }, "$max-sm": { minH: 44, items: 'center' }, children: _jsx(SizableText, { size: "$1", fontWeight: "600", color: "$ink", children: t('Done') }) })] }), _jsxs(XStack, { items: "center", justify: "space-between", gap: "$1", pt: "$0.5", flexWrap: "wrap", children: [_jsxs(XStack, { render: "button", ...{ type: 'button' }, "aria-label": t(allPinned ? 'Unpin selected' : 'Pin selected'), disabled: !selectedThreads.length, opacity: selectedThreads.length ? 1 : 0.4, flex: 1, minW: 52, height: 28, px: "$1.5", rounded: "$3", items: "center", justify: "center", gap: 4, borderWidth: 1, borderColor: "transparent", cursor: selectedThreads.length ? 'pointer' : 'default', transition: "quickest", hoverStyle: selectedThreads.length ? { bg: '$hover', borderColor: 'var(--border-strong)' } : undefined, focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: 'var(--ring)' }, "$max-sm": { minH: 44 }, onClick: () => batchPin(selectedThreads), children: [allPinned ? _jsx(PinOff, { size: 13, color: "var(--foreground)", "aria-hidden": true }) : _jsx(Pin, { size: 13, color: "var(--foreground)", "aria-hidden": true }), _jsx(SizableText, { size: "$1", fontWeight: "500", color: "$ink", children: t(allPinned ? 'Unpin' : 'Pin') })] }), _jsxs(XStack, { render: "button", ...{ type: 'button' }, "aria-label": t(allArchived ? 'Unarchive selected' : 'Archive selected'), disabled: !selectedThreads.length, opacity: selectedThreads.length ? 1 : 0.4, flex: 1, minW: 56, height: 28, px: "$1.5", rounded: "$3", items: "center", justify: "center", gap: 4, borderWidth: 1, borderColor: "transparent", cursor: selectedThreads.length ? 'pointer' : 'default', transition: "quickest", hoverStyle: selectedThreads.length ? { bg: '$hover', borderColor: 'var(--border-strong)' } : undefined, focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: 'var(--ring)' }, "$max-sm": { minH: 44 }, onClick: () => batchArchive(selectedThreads), children: [allArchived ? _jsx(ArchiveRestore, { size: 13, color: "var(--foreground)", "aria-hidden": true }) : _jsx(Archive, { size: 13, color: "var(--foreground)", "aria-hidden": true }), _jsx(SizableText, { size: "$1", fontWeight: "500", color: "$ink", children: t(allArchived ? 'Unarchive' : 'Archive') })] }), _jsxs(XStack, { render: "button", ...{ type: 'button' }, "aria-label": t('Organize selected'), disabled: !selectedThreads.length, opacity: selectedThreads.length ? 1 : 0.4, flex: 1, minW: 52, height: 28, px: "$1.5", rounded: "$3", items: "center", justify: "center", gap: 4, borderWidth: 1, borderColor: "transparent", cursor: selectedThreads.length ? 'pointer' : 'default', transition: "quickest", hoverStyle: selectedThreads.length ? { bg: '$hover', borderColor: 'var(--border-strong)' } : undefined, focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: 'var(--ring)' }, "$max-sm": { minH: 44 }, onClick: () => setDialogue('organize'), children: [_jsx(FolderInput, { size: 13, color: "var(--foreground)", "aria-hidden": true }), _jsx(SizableText, { size: "$1", fontWeight: "500", color: "$ink", children: t('Group') })] })] })] })) : null, _jsx(Rename, { t: subject, open: dialogue === 'rename', onOpenChange: shut, onCloseAutoFocus: after, save: (t, words) => {
|
|
595
631
|
if (words !== titleOf(t, untitled))
|
|
596
632
|
void act.rename(t, words);
|
|
597
633
|
} }), _jsx(Delete, { t: subject, open: dialogue === 'delete', onOpenChange: shut, onCloseAutoFocus: after, remove: (t) => {
|
|
598
634
|
// Focus goes on to the row after it, or the one before, not to the page.
|
|
599
|
-
const rows =
|
|
635
|
+
const rows = listRows(list);
|
|
600
636
|
const at = rows.findIndex((row) => row.getAttribute('data-thread') === t.id);
|
|
601
637
|
if (at >= 0)
|
|
602
638
|
from.current = own(rows[at + 1] ?? rows[at - 1] ?? null);
|
|
@@ -604,11 +640,11 @@ export function ConversationMenu({ threads, active = null, onGone = empty, onSch
|
|
|
604
640
|
if (ok && holds.current === t.id)
|
|
605
641
|
onGone();
|
|
606
642
|
});
|
|
607
|
-
} }), _jsx(ShareDialog, { thread: subject?.id ?? null, open: dialogue === 'share', onOpenChange: shut, onCloseAutoFocus: after }), _jsx(Dialog, { open: dialogue === 'organize', onOpenChange: shut, children: _jsxs(DialogContent, { maxW: 440, rounded: "$6", gap: "$3", onCloseAutoFocus: after, children: [_jsx(DialogTitle, { children: t('Organize {n} chats', { n: selectedThreads.length }) }), _jsx(SizableText, { size: "$2", color: "$soft", children: t('Group and tag the selected chats under a shared project or topic label.') }), _jsx(Input, { autoFocus: true, value: organizeGroup, onChangeText: setOrganizeGroup, placeholder: t('e.g. Research, Architecture, Q4 Launch'), "aria-label": t('Group or project name'), maxLength: 40, onKeyDown: (e) => {
|
|
643
|
+
} }), canShare ? _jsx(ShareDialog, { thread: subject?.id ?? null, open: dialogue === 'share', onOpenChange: shut, onCloseAutoFocus: after }) : null, _jsx(Dialog, { open: dialogue === 'organize', onOpenChange: shut, children: _jsxs(DialogContent, { maxW: 440, width: "calc(100vw - 24px)", rounded: "$6", gap: "$3", onCloseAutoFocus: after, children: [_jsx(DialogTitle, { children: t('Organize {n} chats', { n: selectedThreads.length }) }), _jsx(SizableText, { size: "$2", color: "$soft", children: t('Group and tag the selected chats under a shared project or topic label.') }), _jsx(Input, { autoFocus: true, value: organizeGroup, onChangeText: setOrganizeGroup, placeholder: t('e.g. Research, Architecture, Q4 Launch'), "aria-label": t('Group or project name'), borderColor: "var(--border-strong)", focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: 'var(--ring)' }, "$max-sm": { minH: 44 }, maxLength: 40, onKeyDown: (e) => {
|
|
608
644
|
if (e.key === 'Enter' && !e.nativeEvent?.isComposing && e.keyCode !== 229 && organizeGroup.trim()) {
|
|
609
645
|
batchOrganize(selectedThreads, organizeGroup);
|
|
610
646
|
}
|
|
611
|
-
} }), _jsxs(XStack, { gap: "$2", justify: "flex-end", children: [_jsx(Button, { size: "sm", variant: "outline", rounded: 999, onPress: () => shut(false), children: t('Cancel') }), _jsx(Button, { size: "sm", rounded: 999, disabled: !organizeGroup.trim(), onPress: () => batchOrganize(selectedThreads, organizeGroup), children: t('Apply to {n} chats', { n: selectedThreads.length }) })] })] }) })] }));
|
|
647
|
+
} }), _jsxs(XStack, { gap: "$2", justify: "flex-end", flexWrap: "wrap", children: [_jsx(Button, { size: "sm", variant: "outline", rounded: 999, borderColor: "var(--border-strong)", focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: 'var(--ring)' }, "$max-sm": { minH: 44 }, onPress: () => shut(false), children: t('Cancel') }), _jsx(Button, { size: "sm", rounded: 999, focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: 'var(--ring)' }, "$max-sm": { minH: 44 }, disabled: !organizeGroup.trim(), onPress: () => batchOrganize(selectedThreads, organizeGroup), children: t('Apply to {n} chats', { n: selectedThreads.length }) })] })] }) })] }));
|
|
612
648
|
}
|
|
613
649
|
/** One entry's line: its icon in a 16px well, its name, and its keys at the end. */
|
|
614
650
|
function Face({ entry, Shortcut, }) {
|
|
@@ -635,16 +671,20 @@ export function ThreadRow({ t: thread, active = false, aside, listed = true, chi
|
|
|
635
671
|
// What the ⋯ is for, said after its name: the row's title.
|
|
636
672
|
const about = useId();
|
|
637
673
|
const isSelected = menus.selected.has(thread.id);
|
|
638
|
-
|
|
639
|
-
|
|
674
|
+
const isRenaming = menus.renaming === thread.id;
|
|
675
|
+
// The ⋯ and the age share one place: on hover, focus, or when the row's menu is open, ⋯ replaces the age.
|
|
676
|
+
const menuOrFocus = menus.open === thread.id || focused;
|
|
640
677
|
// gui types these handlers by React Native's event; on the web they carry the DOM's.
|
|
641
678
|
const aim = (e) => menus.aim(thread, e.currentTarget);
|
|
642
679
|
// A new tab for the row itself, never for its ⋯.
|
|
643
680
|
const onDots = (target) => Boolean(target?.closest?.('[data-slot="thread-options"]'));
|
|
681
|
+
if (isRenaming) {
|
|
682
|
+
return (_jsx(YStack, { ...(listed ? { role: 'listitem' } : null), position: "relative", rounded: "$4", "data-thread": thread.id, "data-menu-of": menus.list, "data-renaming": "", children: _jsx(InlineRename, { initial: titleOf(thread, t('Untitled')), onSave: (next) => menus.commitRename(thread, next), onCancel: menus.cancelRename }) }));
|
|
683
|
+
}
|
|
644
684
|
return (_jsxs(YStack, { ...(listed ? { role: 'listitem' } : null), position: "relative", group: true, rounded: "$4", bg: isSelected ? '$hover' : undefined, "$platform-web": {
|
|
645
685
|
userSelect: 'none',
|
|
646
686
|
...(isSelected ? { backgroundColor: 'var(--glass)' } : null),
|
|
647
|
-
}, "data-thread": thread.id, "data-selected": isSelected ? '' : undefined, "data-pinned": thread.pinned ? '' : undefined, onPointerDownCapture: (down) => {
|
|
687
|
+
}, "data-thread": thread.id, "data-menu-of": menus.list, "data-selected": isSelected ? '' : undefined, "data-pinned": thread.pinned ? '' : undefined, "data-archived": thread.archived ? '' : undefined, onPointerDownCapture: (down) => {
|
|
648
688
|
const e = down;
|
|
649
689
|
if (e.button !== 0 || onDots(e.target))
|
|
650
690
|
return;
|
|
@@ -723,12 +763,9 @@ export function ThreadRow({ t: thread, active = false, aside, listed = true, chi
|
|
|
723
763
|
return;
|
|
724
764
|
e.preventDefault();
|
|
725
765
|
away(thread.id, menus.hrefOf);
|
|
726
|
-
}, children: [menus.selecting ? (_jsx(XStack, { position: "absolute", insetInlineStart: 6, t: 0, b: 0, items: "center", justify: "center", pointerEvents: "none", z:
|
|
727
|
-
// A thumb's 44px on a touch screen (lib/tap.ts), centred on the row and over its edges.
|
|
728
|
-
// On desktop, right-clicking the row opens the context menu directly without a "..." button.
|
|
729
|
-
$touchable: { display: 'flex', opacity: 1, minW: 44, minH: 44 }, hoverStyle: { bg: '$hover' },
|
|
766
|
+
}, children: [menus.selecting ? (_jsx(XStack, { position: "absolute", insetInlineStart: 6, t: 0, b: 0, items: "center", justify: "center", pointerEvents: "none", z: "var(--z-raised)", "aria-hidden": true, children: _jsx(XStack, { width: 18, height: 18, rounded: 999, items: "center", justify: "center", borderWidth: 1.5, borderStyle: "solid", bg: isSelected ? 'var(--foreground)' : 'transparent', borderColor: isSelected ? 'var(--foreground)' : 'var(--muted-foreground)', opacity: isSelected ? 1 : 0.65, children: isSelected ? _jsx(Check, { size: 11, strokeWidth: 3, color: "var(--background)", "aria-hidden": true }) : null }) })) : null, menus.selecting ? _jsx(YStack, { paddingInlineStart: 22, children: children }) : children, _jsx(Text, { id: about, display: "none", children: titleOf(thread, t('Untitled')) }), aside ? (_jsx(XStack, { position: "absolute", insetInlineEnd: "$2", t: 0, b: 0, items: "center", pointerEvents: "none", opacity: menuOrFocus ? 0 : 1, "$group-hover": { opacity: 0 }, $touchable: { opacity: 0 }, children: aside })) : null, _jsx(XStack, { position: "absolute", insetInlineEnd: "$1", t: 0, b: 0, items: "center", children: _jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(XStack, { render: "button", "aria-label": t('Chat options'), "aria-describedby": about, id: id, "data-slot": "thread-options", width: 26, height: 26, rounded: "$2", items: "center", justify: "center", cursor: "pointer", bg: menus.open === thread.id ? '$hover' : 'transparent', display: "flex", opacity: menuOrFocus ? 1 : 0, "$group-hover": { opacity: 1 }, focusStyle: { opacity: 1 }, focusVisibleStyle: { opacity: 1, outlineWidth: 2, outlineStyle: 'solid', outlineColor: 'var(--ring)' }, $touchable: { opacity: 1, minW: 44, minH: 44 }, "$max-sm": { opacity: 1, minW: 44, minH: 44 }, transition: "quickest", hoverStyle: { bg: '$hover' },
|
|
730
767
|
// Before gui's own press handler, which opens the menu and stops there.
|
|
731
|
-
onPointerDownCapture: aim, onKeyDownCapture: aim, onFocus: () => setFocused(true), onBlur: () => setFocused(false), children: _jsx(MoreHorizontal, { size: 15, "aria-hidden": true }) }) }) })] }));
|
|
768
|
+
onPointerDownCapture: aim, onKeyDownCapture: aim, onFocus: () => setFocused(true), onBlur: () => setFocused(false), children: _jsx(MoreHorizontal, { size: 15, color: "var(--muted-foreground)", "aria-hidden": true }) }) }) })] }));
|
|
732
769
|
}
|
|
733
770
|
/**
|
|
734
771
|
* The ⋯ of the conversation a pane holds, in its header: the trigger of the
|
|
@@ -745,7 +782,7 @@ export function ThreadMore({ t: thread }) {
|
|
|
745
782
|
const isOpen = menus.open === thread.id;
|
|
746
783
|
// gui types these handlers by React Native's event; on the web they carry the DOM's.
|
|
747
784
|
const aim = (e) => menus.aim(thread, e.currentTarget);
|
|
748
|
-
return (_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(XStack, { render: "button", "aria-label": t('Conversation options'), ...{ title: t('More') }, "data-slot": "conversation-options", width: 32, height: 32, rounded: "$3", items: "center", justify: "center", cursor: "pointer", bg: isOpen ? '$hover' : 'transparent', opacity: isOpen || focused || hovered ? 1 : 0.72, hoverStyle: { bg: '$hover', opacity: 1 }, focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: '
|
|
785
|
+
return (_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(XStack, { render: "button", "aria-label": t('Conversation options'), ...{ title: t('More') }, "data-slot": "conversation-options", width: 32, height: 32, rounded: "$3", items: "center", justify: "center", cursor: "pointer", bg: isOpen ? '$hover' : 'transparent', opacity: isOpen || focused || hovered ? 1 : 0.72, transition: "quickest", hoverStyle: { bg: '$hover', opacity: 1 }, focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: 'var(--ring)', opacity: 1 }, "$max-sm": { minW: 44, minH: 44 },
|
|
749
786
|
// Before gui's own press handler, which opens the menu and stops there.
|
|
750
787
|
onPointerDownCapture: aim, onKeyDownCapture: aim, onMouseEnter: () => setHovered(true), onMouseLeave: () => setHovered(false), onFocus: () => setFocused(true), onBlur: () => setFocused(false), children: _jsx(MoreHorizontal, { size: 16, "aria-hidden": true }) }) }));
|
|
751
788
|
}
|
|
@@ -768,18 +805,22 @@ function Rename({ t: thread, open, onOpenChange, onCloseAutoFocus, save, }) {
|
|
|
768
805
|
onOpenChange(false);
|
|
769
806
|
save(thread, title);
|
|
770
807
|
};
|
|
771
|
-
return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { maxW: 440, rounded: "$6", gap: "$3", onCloseAutoFocus: onCloseAutoFocus, children: [_jsx(DialogTitle, { children: t('Rename chat') }), _jsx(Input, { autoFocus: true, value: words, onChangeText: setWords, "aria-label": t('Chat title'), maxLength: 80, onKeyDown: (e) => {
|
|
808
|
+
return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { maxW: 440, width: "calc(100vw - 24px)", rounded: "$6", gap: "$3", onCloseAutoFocus: onCloseAutoFocus, children: [_jsx(DialogTitle, { children: t('Rename chat') }), _jsx(Input, { autoFocus: true, value: words, onChangeText: setWords, "aria-label": t('Chat title'), borderColor: "var(--border-strong)", focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: 'var(--ring)' }, "$max-sm": { minH: 44 }, maxLength: 80, onKeyDown: (e) => {
|
|
809
|
+
if (e.key === 'Escape') {
|
|
810
|
+
onOpenChange(false);
|
|
811
|
+
return;
|
|
812
|
+
}
|
|
772
813
|
// An Enter that ends an IME composition writes the word; it does not save.
|
|
773
814
|
if (e.key === 'Enter' && !e.nativeEvent?.isComposing && e.keyCode !== 229)
|
|
774
815
|
submit();
|
|
775
|
-
} }), _jsxs(XStack, { gap: "$2", justify: "flex-end", children: [_jsx(Button, { size: "sm", variant: "outline", rounded: 999, onPress: () => onOpenChange(false), children: t('Cancel') }), _jsx(Button, { size: "sm", rounded: 999, disabled: !words.trim(), onPress: submit, children: t('Save') })] })] }) }));
|
|
816
|
+
} }), _jsxs(XStack, { gap: "$2", justify: "flex-end", flexWrap: "wrap", children: [_jsx(Button, { size: "sm", variant: "outline", rounded: 999, borderColor: "var(--border-strong)", focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: 'var(--ring)' }, "$max-sm": { minH: 44 }, onPress: () => onOpenChange(false), children: t('Cancel') }), _jsx(Button, { size: "sm", rounded: 999, focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: 'var(--ring)' }, "$max-sm": { minH: 44 }, disabled: !words.trim(), onPress: submit, children: t('Save') })] })] }) }));
|
|
776
817
|
}
|
|
777
818
|
/** Deleting asks first, and says what goes with it: every turn, and every link it was shared by. */
|
|
778
819
|
function Delete({ t: thread, open, onOpenChange, onCloseAutoFocus, remove, }) {
|
|
779
820
|
const { t } = useI18n();
|
|
780
|
-
return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { maxW: 440, rounded: "$6", gap: "$3", onCloseAutoFocus: onCloseAutoFocus, children: [_jsx(DialogTitle, { children: t('Delete chat?') }), _jsx(SizableText, { size: "$2", color: "$soft", children: t('“{title}” is deleted for good, with every link it was shared by. To keep it out of the list instead, archive it.', {
|
|
821
|
+
return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { maxW: 440, width: "calc(100vw - 24px)", rounded: "$6", gap: "$3", onCloseAutoFocus: onCloseAutoFocus, children: [_jsx(DialogTitle, { children: t('Delete chat?') }), _jsx(SizableText, { size: "$2", color: "$soft", children: t('“{title}” is deleted for good, with every link it was shared by. To keep it out of the list instead, archive it.', {
|
|
781
822
|
title: thread ? titleOf(thread, t('Untitled')) : '',
|
|
782
|
-
}) }), _jsxs(XStack, { gap: "$2", justify: "flex-end", children: [_jsx(Button, { size: "sm", variant: "outline", rounded: 999, onPress: () => onOpenChange(false), children: t('Cancel') }), _jsx(Button, { size: "sm",
|
|
823
|
+
}) }), _jsxs(XStack, { gap: "$2", justify: "flex-end", flexWrap: "wrap", children: [_jsx(Button, { size: "sm", variant: "outline", rounded: 999, borderColor: "var(--border-strong)", focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: 'var(--ring)' }, "$max-sm": { minH: 44 }, onPress: () => onOpenChange(false), children: t('Cancel') }), _jsx(Button, { size: "sm", rounded: 999, bg: "var(--state-error)", borderColor: "var(--state-error)", color: "var(--pure-white)", hoverStyle: { bg: 'var(--state-error)', opacity: 0.9 }, focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: 'var(--ring)' }, "$max-sm": { minH: 44 }, disabled: !thread, onPress: () => {
|
|
783
824
|
// Once: a second press while the dialog closes would ask the store to delete it again.
|
|
784
825
|
if (!open || !thread)
|
|
785
826
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/app",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.95",
|
|
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",
|
|
@@ -50,18 +50,18 @@
|
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"@hanzo/ai": ">=0.7.0",
|
|
53
|
-
"@hanzo/appearance": ">=0.2.
|
|
54
|
-
"@hanzo/build": ">=0.2.
|
|
53
|
+
"@hanzo/appearance": ">=0.2.15",
|
|
54
|
+
"@hanzo/build": ">=0.2.127",
|
|
55
55
|
"@hanzo/composer": ">=0.2.0",
|
|
56
56
|
"@hanzo/design": ">=0.5.39",
|
|
57
|
-
"@hanzo/event": ">=0.3.
|
|
57
|
+
"@hanzo/event": ">=0.3.63",
|
|
58
58
|
"@hanzo/gui": "^8.3.5",
|
|
59
59
|
"@hanzo/i18n": ">=0.5.5",
|
|
60
60
|
"@hanzo/iam": ">=0.21.35",
|
|
61
61
|
"@hanzo/logo": ">=1.0.26",
|
|
62
|
-
"@hanzo/studio": ">=0.1.
|
|
62
|
+
"@hanzo/studio": ">=0.1.12",
|
|
63
63
|
"@hanzo/tabs": ">=0.1.8",
|
|
64
|
-
"@hanzo/ui": ">=8.
|
|
64
|
+
"@hanzo/ui": ">=8.33.5",
|
|
65
65
|
"@hanzo/usage": ">=0.1.18",
|
|
66
66
|
"@hanzo/voice": ">=0.1.16",
|
|
67
67
|
"@hanzogui/shell": "^8.3.20",
|
|
@@ -71,18 +71,18 @@
|
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@hanzo/ai": "0.7.0",
|
|
74
|
-
"@hanzo/appearance": "0.2.
|
|
75
|
-
"@hanzo/build": "0.2.
|
|
74
|
+
"@hanzo/appearance": "0.2.15",
|
|
75
|
+
"@hanzo/build": "0.2.127",
|
|
76
76
|
"@hanzo/composer": "0.2.0",
|
|
77
77
|
"@hanzo/design": "0.5.39",
|
|
78
|
-
"@hanzo/event": "0.3.
|
|
78
|
+
"@hanzo/event": "0.3.67",
|
|
79
79
|
"@hanzo/gui": "8.3.5",
|
|
80
80
|
"@hanzo/i18n": "0.5.5",
|
|
81
81
|
"@hanzo/iam": "0.21.35",
|
|
82
82
|
"@hanzo/logo": "1.0.26",
|
|
83
|
-
"@hanzo/studio": "0.1.
|
|
83
|
+
"@hanzo/studio": "0.1.12",
|
|
84
84
|
"@hanzo/tabs": "github:hanzo-inc/tabs",
|
|
85
|
-
"@hanzo/ui": "8.
|
|
85
|
+
"@hanzo/ui": "8.33.5",
|
|
86
86
|
"@hanzo/usage": "0.1.18",
|
|
87
87
|
"@hanzo/voice": "0.1.19",
|
|
88
88
|
"@hanzogui/config": "8.3.5",
|